⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tirdwr.4

📁 7号信令功能代码,为开源代码
💻 4
📖 第 1 页 / 共 2 页
字号:
When a .BR read (2),.BR readv (2),.BR write "(2) or ".BR writev (2)system call fails, it returns -1 and sets.IR errno (3)to an appropriate error number as documented on the appropriate manual page.In addition, tirdwr may return the following errors in response to a.BR read (2),.BR readv (2),.BR write "(2) or ".BR writev (2):.TP 12.RB [ EPROTO ]The stream user has violoated the read-write protocol.  This error will bereturned on all subsequent read or write operations.  The stream must beclosed and re-opened..TP 12.RB [ ENXIO ]An attempt was made to write to the stream, however, the transport connectionwas disconnected in an unorderly fashion.  All subsequent write operations onthe stream will fail with this error.  Read operations will continue to readbuffered data.  This is similar to the.RB [ EPIPE ]error of.BR pipe (2s)..\".\".SH NOTICES.PPAny data associated with abortive disconnect.BR T_DISCON_IND (7)or orderly release.BR T_ORDREL_IND (7)is discarded.  It is unclear whether this is correct behavior or not..PPDue to interaction with the.BR read "(2), " readv "(2), " write "(2) and " writev (2)system calls, the priorityforms of the.BR getmsg "(2), " getpmsg "(2), " putmsg "(2) and " putpmsg (2)system calls,and non-zero band form of the.BR getpmsg "(2) and " putpmsg (2)system calls,cannot be used with.BR tirdwr .Use of the.BR putmsg (2)or.BR putpmsg (2)system calls in this fashion will result in an.RB [ EPROTO ]error being returned and subsequent failure of all system calls on the stream.Use of the.BR getmsg (2)or.BR getpmsg (2)system calls cannot be detected by the module and should be avoided by theuser..PPWhen system calls.BR putmsg "(2) and " putpmsg (2)are used in conjunction with.BR tirdwr ,no control part can be specified.Specification of a control part will result in an.RB [ EPROTO ]error and failure of all subsequent system calls on the stream.When system calls.BR getmsg "(2) and " getpmsg (2)are used in conjunction with.BR tirdwr ,no control part will be returned..\".\".SH MODULES.PP.B tirdwr.I STREAMSmodule..\".\".SH "SEE ALSO".PP.BR T_ORDREL_IND (7),.BR T_DISCON_IND (7),.IR errno (3),.BR write (2),.BR read (2),.BR T_OPTDATA_IND (7),.BR T_DISCON_REQ (7),.BR xti (3),.BR writev (2),.BR tpi (7),.BR timod (4),.BR t_open (3),.BR t_connect (3),.BR socksys (4),.BR sockmod (4),.BR readv (2),.BR read (2), .BR qopen (9),.BR putpmsg (2),.BR putmsg (2),.BR getpmsg (2),.BR getmsg (2),.BR T_ORDREL_REQ (7),.BR T_EXDATA_IND (7),.BR T_DATA_IND (7)..\".\".SH FILES.PP.I /lib/modules/\`uname -r\`/streams-timod.o.\".\".SH BUGS.PP.B tirdwrhas been tested with the.I /usr/bin/test-tirdwrconformance test suite..PP.B tirdwrhas no known bugs..\".\".SH COMPATIBILITY.PP.B tirdwris compatible with.BR "XNS 5.2".[xns.]and.BR "SVR 4.2" ,.[svr42spg.]and descriptions for.BR UnixWare7 \(rg,.[uw7doc.].BR AIX \(rg,.[aixdoc.].BR DigitalUNIX \(rg,.[osfdoc.].BR HP-UX \(rg,.[hpuxdoc.].BR Solaris \(rg,.[soldoc.].BR SUPER-UX \(rg,.[suxdoc.]with the following portability considerations:.PPThis.B Linux Fast-STREAMS.[lfs.]implementation of.B tirdwrwas backported to.B LiS.[LiS.]to repair serious bugs in the previous.B LiSimplementation..B LiSpreviously had a implementation of.B tirdwrthat was full of bugs.  This implementation is free of these many bugs and is,therefore, not compatible with the old buggy.BR tirdwr .Following are the bugs exhibited by the old implementation:.IP \(em \w'\(em\ \ 'uZero length data messages, whether they have a control portion or not, are notsupposed to be passed upstream by the.B tirdwrmodule.  This is because a zero-length data message will generate anend-of-file condition for.BR read "(2), " readv "(2), " getmsg "(2) and " getpmsg (2).The.B tirdwrmodule that comes with.B LiS.[lis.]passes all.B M_DATAand.BR T_DATA_IND (7).B M_DATAportions upstream without examining them to see if they contain zero-lengthdata messages.  This is a bug with no work around..When a.BR T_DISCON_IND (7)primitive is received by the.B tirdwrmodule, it is supposed to cause all further write system calls.RB ( write "(2), " writev "(2), " putmsg "(2) and " putpmsg (2))to fail with error.RB [ ENXIO ];however, all read system calls.RB ( read "(2), " readv "(2), " getmsg "(2) and " getpmsg (2))system calls are supposed to succeed.This corresponds to a hungup stream head that has been sent a.B M_HANGUPmessage.The.B tirdwrmodule that comes with.B LiS.[lis.]uses the.BR putctl1 (9)form of the.B M_ERRORmessage which causes all system calls to fail with error.RB [ ENXIO ].This is a bug with no workaround..IP \(emWhen the.B tirdwrmodule is pushed on a TI stream, all XTI/TLI library calls are supposed tofail and return error.RB [ EPROTO ],causing all further system calls to fail on the stream.The.B tirdwrmodule that comes with.B LiS.[lis.]passes.BR M_IOCTL ", " M_IOCDATA ", " M_IOCACK ", " M_IOCNAK ", " M_COPYIN " and " M_COPYOUTmessages transparently, meaning that a number of XTI/TLI functions will notgenerate an error.  This is a bug.  A workaround is to refrain from callingXTI/TLI functions on streams upon which.B tirdwrhas been pushed..IP \(emWhen a.B tirdwrmodule receives an.B M_READmessage from upstream and a.BR T_ORDREL_IND (7)has been received and processed for the stream, a zero-length.B M_DATAblockor a read size.B M_ERRORmessage should be sent upstream in response to reassert end-of-file and tokeep the reader from blocking indefinitely on read system calls after anorderly release.The.B tirdwrmodule that comes with.B LiS.[lis.]does not perform this function.  Coupled with passing zero-length datamessages on the read side, this can cause problem with loopback transports andmake it difficult to determine when an end-of-file has actually occurred andyet not block indefinitely in synchronous file mode..IP \(emWhen the.B tirdwrmodule is popped (closed) and no.BR T_ORDREL_IND (7)or.BR T_DISCON_IND (7)has been received for the stream, or if the stream hasencountered an error and has not received a.BR T_DISCON_IND (7),the.B tirdwrmodule should send a.BR T_DISCON_REQ (7)downstream before completing the close.The.B tirdwrmdoule that comes with.B LiS.[lis.]does not send.BR T_DISCON_REQ (7)in any circumstance.The workaround is to always close the stream instead of popping the moduleusing.IR I_POP ..\".\".SH CONFORMANCE.PP.BR SVID ,.[svid.].BR XID ,.[xbd5.].BR "XNS 5.2" ,.[xns.].BR SUSv2 ,.[susv2.].BR SUSv3 / POSIX ,.[susv3.].\".\".SH HISTORY.PP.B tirdwrfirst appeared in.B SVR 3.[svr3.].\".\".[$LIST$.].TI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -