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