1 / 7

Out-of-Band Data

Out-of-Band Data. Chap 24. TCP OOB concepts Notification SIGURG signal Exception ready Position of OOB byte Value of OOB byte. TCP Urgent Mode and Socket OOB Data. write(fd,…); write(fd, …) send(fd, “a”, … , MSG_OOB); write(fd, …);. handler(){ recv(fd,…, MSG_OOB); }.

len-lynn
Download Presentation

Out-of-Band Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Out-of-Band Data Chap 24

  2. TCP OOB concepts Notification SIGURG signal Exception ready Position of OOB byte Value of OOB byte TCP Urgent Mode and Socket OOB Data write(fd,…); write(fd, …) send(fd, “a”, … , MSG_OOB); write(fd, …); handler(){ recv(fd,…, MSG_OOB); } select(…, xset, …); … recv(fd,…, MSG_OOB); SIGURG Socket API OOB mark OOB buffer (1Byte) a a send buffer receive buffer a TCP (receiver) TCP (sender)

  3. Sending TCP OOB data • TCP Sender • OOB data는 socket send buffer의 맨 뒤에 append되고 urgent offset이 그 다음을 가리킨다. • Urgent offset 바로 앞 byte가 OOB byte가 된다. • Normal data와 순서대로 전송된다. (normal data에 우선적으로 전송되지 않는다) • not true out-of-band data (expedited data) • Enter Urgent mode: Flow control에 의해 segment 전송이 stop되더라도 (i.e. receiver의 socket receive buffer가 full일 때), urgent notification (URG segment with no data)은 항상 전송된다. • 그러나 아직 OOB data는 전송되지 못했을 수 있음. • OOB data sender • send(fd, “a”, 1, MSG_OOB); • send(fd, “abc”, 3, MSG_OOB); • Which is the OOB byte?

  4. Receiving TCP OOB Data (1) • TCP Receiver • URG segment가 도착하면, urgent notification을 receiver에게 알려준다. • SIGURG signal is delivered • Exception set becomes ready (in case of select) • 그러나, OOB byte가 도착하지 않았을 수도있다. Why? • Read()는 OOB byte 바로 전 normal data까지 읽는다. • Receiver도 sockatmark()를 이용하여 OOB byte를 읽을 차례인지 알수 있다. •  OOB는 end-of-record mark로 쓸 수 있다. • Then, receive OOB data recv(fd, &buff, sizeof(buff), MSG_OOB); • OOB byte를 가져가기 전에 새로운 OOB byte가 도착하면 overwrite되고 OOB mark도 갱신된다.

  5. Receiving TCP OOB Data (2) • OOB data receiver • Notification of URG segment by means of • SIGURG signal sent to owner of the socket • select with exception set • notify되었다고 해서 반드시 OOB data가 도착한 것은 아님 . 즉 socket receive buffer가 full이어서 OOB byte가 도착 못할 수 있음. • Then, receive OOB data recv(fd, &buff, sizeof(buff), MSG_OOB); • OOB byte를 정확히 수신하고자 하면, OOB data가 도착했는지(즉, out-of-band mark에 있는지) 확인하고, 도착하지 않았으면, normal data를 읽어들여 flow control이 stop된 것을 해지하고 다시 확인 필요 • 단지 exception이 발생했는지 여부를 알고자 하면 OOB notification 받은 것으로 충분 (예, rlogin)

  6. URG Notification: URG segment received By SIGURG: oob/tcprecv01 By exception ready: oob/tcprecv03

  7. Set inline mode: OOB byte도 normal data처럼 read 가능하게 됨 check out-of-band mark and receive OOB data Receiving OOB data with inline oob/tcprecv04

More Related