GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TTCP(4) FreeBSD Kernel Interfaces Manual TTCP(4)

ttcp
?ȥ??󥹥ߥå????󥳥??ȥ??????ץ??ȥ????Υȥ??󥶥?????????ĥ??ǽ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> int setsockopt(sock, IPPROTO_TCP, TCP_NOPUSH, &One, sizeof One)
ssize_t sendto(sock, msg, len, MSG_EOF, &sin, sizeof sin)
ssize_t sendto(sock, msg, len, MSG_EOF, 0, 0)

T/TCP ?? TCP ?ץ??ȥ??? ( tcp(4) ?򻲾?) ?ؤγ?ĥ??ǽ?ν????Ǥ??? ?ܵ?ǽ?ˤ??꾯?̤Υǡ????? 2 ?ĤΥѥ??åȤθ򴹤Ǥ????Ȥꤹ?뤳?Ȥ??Ǥ??? ???ä?ɸ???? TCP ???ͥ?????????????ȯ??????;ʬ?ʱ????ˤ????ٱ???̵???????Ȥ??Ǥ??ޤ??? ?????åȥ??󥿥ե??????? T/TCP ?򥵥ݡ??Ȥ????褦?˽????????Ƥ??ꡢ ?ޤ??????Ǥ????Τʥ??????ˤĤ??ƾܽҤ??Ƥ??ޤ??? ?ץ??ȥ????˰?¸???ʤ???ʬ?Υ??ݡ??ȤˤĤ??Ƥ? socket(2) ?ڤ? send(2) ?Υޥ˥奢???ڡ????ǽҤ٤????Ƥ??ޤ??? T/TCP ?? RFC 1644 ???????????Ƥ??ޤ???

T/TCP ?????Υ??ͥ????????????????????Ȥˤ????ơ????륪?ץ??????? ?????Ĥ??ޤ??뤳?Ȥˤ??ꡢT/TCP ??ĥ?ϵ?ǽ???ޤ??? ?????ˤ??????ȤΥۥ??ȴ֤Ǥκǽ?????³?????????Ƥ? 3 ???????ϥ??ɥ?????????̵???????Ȥ??Ǥ??ޤ??? ??????Ʊ?????ץ????????Ѥ??ơ? ?Ť???ʣ?????ѥ??åȤ??????μ¤?Ƚ?̤??뤳?Ȥ???ǽ?Ǥ??ꡢ ???ä? TCP ?ץ??ȥ??뤬??³???Ĥ????塢???֤??ݤ??ʤ????Фʤ??ʤ? ???֤򸺤餹???Ȥ??Ǥ??ޤ??? “net.inet.tcp.rfc1644” ?? MIB ???ѿ??ϼ¹Ի??? T/TCP ?ͥ???????????????̵???????뤿???˻??Ѥ??뤳?Ȥ??Ǥ??ޤ??? ???????ʤ??顢?ܥץ??ȥ????ϡ?T/TCP ?ǤϤʤ??????ƥब T/TCP ??ĥ???줿?????ƥ????̿????褦?Ȥ????Ȥ??ˡ? ??ưŪ??ɸ???? TCP ???ᤷ???̿????뤳?Ȥ??ݾڤ??뤿?????߷פ??줿???ΤǤ???

T/TCP ???Ѥ??????? “?ȥ??󥶥???????” ?Υ??ǥ??Ϥ??ʤ?ñ???ʤ??ΤǤ?:
  1. ???饤?????ȥץ????????ϥ????Ф??????????׵??????????ޤ??? ??????ñ???? TCP ?????????Ȥ˼??ޤ뤯?餤??ʬ?????ʤ??ΤǤ??? ?????ƥ??ץ??????ȥǡ????ȶ??? SYN PUSH FIN ?????????Ȥ򥵡??Ф??????ޤ???
  2. ?????Хץ?????????ɸ???? TCP ??³??Ʊ?ͤˡ??׵??????????????ɤ??? ñ???Υ????????Ȥ˼??ޤ??礭???α????????????ޤ??? ?????׵᤬ T/TCP ?ξ??硢 ?????ϡ?(?ۤʤä?) ???ץ??????ȥǡ????ȶ??? ñ???? SYN PUSH FIN ACK ?????????Ȥǥ??饤?????Ȥ??֤????ޤ??? T/TCP ?ǤϤʤ??????ϡ? (?ۤ?) ?̾??? TCP ???ᤵ?줿??³?ˤʤ??ޤ??? ?????ФϤ??λ? T/TCP ?????åȤ򥯥????????ޤ???
  3. ???饤?????Ȥϱ??????ɤ߹??ߡ??????åȤ򥯥????????ޤ???

???饤??????¦?Υ??ݡ??Ȥϡ? “???ۤ???³” ?ڤ? “?????ȥ????åȥ?????” ?γ?ǰ?????򤹤??ͤ? sendto(2) ?ڤ? sendmsg(2) ?????ƥॳ?????ΰ?̣????ĥ???뤳?Ȥˤ????󶡤????ޤ??? ?ȥ??󥶥????????ˤ????׵????????????ˤ? sendto(2) ?????ƥॳ???????̾????Ѥ????????????ͤˤ??ޤ?:
char request[REQ_LEN];
struct sockaddr_in sin;
int sock, req_len;

sock = socket(PF_INET, SOCK_STREAM, 0);

/* request[] ?? sin ?ν??? */

err = sendto(sock, request, req_len, MSG_EOF,
	(struct sockaddr *)&sin, sin.sin_len);

/* ???顼???? */

req_len = read(sock, request, sizeof request);
close(sock);

/* ???????? */

sendto() ???ƤӽФ??ȡ????λ??Υ????åȤξ??֤? connect(2) ?ڤ? shutdown(2) ?????ƥॳ???뤬?Ȥ??줿???? Ʊ?????֤ˤʤ뤳?Ȥ????դ??Ʋ??????? ?Ĥޤꡢ???Υ????åȾ??Ǽ¹Ԥ????Τ?Ŭ?????????ϡ? read(2) ?????? close(2) ?????Ǥ? (???饤?????Ȥ? TCP ???????Ϥ??Ǥ˥????åȥ????󤵤??Ƥ????Τǡ? ???Υ????åȤ?¾?????????? connect(2) ???뤳?ȤϤǤ??ޤ???)??

T/TCP ?????Ѥ????ݤ˥????Ф????Ѳ?ǽ?ʥ??ץ??????? 2 ?Ĥ????ޤ?:
  1. ?????åȥ??ץ??????򥻥åȤ??? ɸ???? write(2) ?????????ȤäƱ??????ԤäƲ???????
  2. ???饤?????Ȥξ?????Ʊ?ͤˡ? sendto(2) ?? MSG_EOF ?ե饰?ȶ??˻??Ѥ??Ʋ??????? ???????????????ϻ??ꤷ?ޤ?????

??¸?Υ????Ф? T/TCP ??ĥ??ǽ?????Ѥ????褦???ѹ????Ԥ??ݤˤϡ? ?ǽ??Υ??ץ????????Ѥ????Τϰ???Ū?????????????Ǥ??? ñ???? setsockopt(sock, IPPROTO_TCP, TCP_NOPUSH, &One, sizeof One) (?????? One ?? 0 ?ʳ????ͤ????????ѿ??Ǥ?) ?ؤΥ????????ɲä??????????????Ǥ??? ?????ǡ??????????????????? (?????åȤΥХåե???˰?¤??Ƥ??ʤ??¤?) ??????¦?Υ????åȤ??Ĥ??Ƥ??ʤ????Фʤ??ޤ?????

2 ???ܤΥ??ץ??????ϡ????????????ФˤϤ???˾?ޤ??????ΤǤ??? ?????ˤ??äƤϡ??Ť??????Фˤ?Ŭ?ѤǤ??뤯?餤??ñ?Ǥ??? ???ξ??硢?????ʳ????̾? write() ?θƤӽФ????ޤ??Ǥ??ޤ????? ?????򼡤Τ褦???֤??????ޤ? :

sendto(sock, buf, len, MSG_EOF, (struct sockaddr *)0, 0)

???ξ??硢??????ľ?????????????ޤ????????饤?????Ȥξ?????Ʊ?ͤˡ? ?????åȤϤ??λ????Dz??ˤ????Ѥ??뤳?ȤϽ????ޤ????? ľ???˥??????????٤??Ǥ???

T/TCP ??ĥ??ǽ?????Ѥ????ˤϡ? Ŭ?ڤ? TCP ???ץ????????????????褦?? MIB ?ѿ? “net.inet.tcp.rfc1644” ?????Ǥ??뤳?Ȥ?ɬ?פȤ??ޤ??? ?ܺ٤? tcp(4) ?򻲾Ȥ??Ʋ???????

send(2), setsockopt(2), inet(4), tcp(4) R. Braden, T/TCP - TCP Extensions for Transactions, RFC 1644.

T/TCP ?Υ??ݡ??Ȥ? FreeBSD 2.1 ?ǽ????ƹԤ????ޤ????? ?????? The University of Southern California ?? Information Sciences Institute ?? Bob Braden ?? Liming Wei ???񤤤??????ɤ????ˤ??Ƥ??ꡢ The University of Twente ?? Andras Olah ???ܿ????ޤ?????
January 18, 1995 FreeBSD 2.1

Search for    or go to Top of page |  Section 4 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.