home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / internal / 1944 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.1 KB

  1. Xref: sparky comp.unix.internals:1944 comp.unix.programmer:5211
  2. Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
  3. From: torek@horse.ee.lbl.gov (Chris Torek)
  4. Newsgroups: comp.unix.internals,comp.unix.programmer
  5. Subject: Re: OOB question (a "wellknown" bug?)
  6. Date: 8 Nov 1992 12:55:40 GMT
  7. Organization: Lawrence Berkeley Laboratory, Berkeley
  8. Lines: 33
  9. Message-ID: <27301@dog.ee.lbl.gov>
  10. References: <1992Nov5.235946.19641@jarvis.csri.toronto.edu>
  11. Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
  12. NNTP-Posting-Host: 128.3.112.15
  13.  
  14. In article <1992Nov5.235946.19641@jarvis.csri.toronto.edu>
  15. jwang@sys.toronto.edu (Jingwen Wang) writes:
  16. >We have struggled with OOB wierd behavior for days ... [in our
  17. >application] OOB data is used to deliver control data, such as error
  18. >report from the remote process. 
  19.  
  20. This is a bad idea.
  21.  
  22. TCP does not have out of band data.  TCP has `urgent data', marked
  23. with the `urgent pointer'.  The Berkeley networking code tries to
  24. use this as if it were out of band data, with confusing results.
  25.  
  26. It `pulls out' the single supposed out of band data byte, as marked
  27. by the urgent pointer (if any), and stores it in a special location.
  28. Since there is only one byte, it will be overwritten if a second one
  29. shows up.
  30.  
  31. The SO_OOBINLINE socket option prevents this `pulling', eliminating
  32. this particualr hazard, but does not help with the fact that there
  33. is onlyh a single out of band marker.
  34.  
  35. Instead of trying to use TCP urgent data as `out of band data', one is
  36. generally best off with a completely separate `control' socket.  Since
  37. the control socket is separate, the control data is not subject to
  38. back-pressure from the `mainline' data (and thus you get the effect of
  39. urgency).  If the control data must be assocated somehow with specific
  40. mainline data, a separate protocol should be used (e.g., count the
  41. mainline data yourself and send an index with the control message, or
  42. put record counts around the mainline data and send a marker on that
  43. connection as well).
  44. -- 
  45. In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
  46. Berkeley, CA        Domain:    torek@ee.lbl.gov
  47.