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

📄 t_optmgmt.3.man

📁 This a separate release of the OpenSS7 X/Open XTI/TLI library, TLI modules (timod, tirdwr) and the I
💻 MAN
📖 第 1 页 / 共 2 页
字号:
.I req->opt.lenis zero; that is, no option buffer is specified on input, then all optionsknown to the transport service provider are selected..PPThe result of options processing is returned in the.I ret->opt.bufbuffer and the.I ret->flagsoverall result flags.If.I ret->opt.lenis zero; that is, no option buffer is provided for return,.I ret->flagswill be set as described below, but the returned options and their status will bediscarded.If.I retis specified as.BR NULL ,option processing will be performed as described below, however, the returnedoptions and flags will be discarded..PPOptions processing may abort and.BR t_optmgmt ()will return.RB [ TBADOPT ]if an illegal option or an option with an unknown level is ecountered.An illegal option consists of any an option header that does not completelyfit within the remaining option buffer, has a length less than the optionheader size, has a length that exceeds the option buffer boundaries, has avalue length that is illegal for the option, or has a value that is illegalfor the option..PPIf.BR t_optmgmt ()encounters an illegal option, option processing ceases and.RB [ TBADOPT ]is returned.If.BR t_optmgmt ()encounters an option level that is unknown to the transportprovider, option processing ceases and.RB [ TBADOPT ]is returned.If.BR t_optmgmt ()encounters an option level that is known to the transport provider, butan option name that is not, it returns.B T_NOTSUPPORTin the.I statusfield of the returned option.When option processing is aborted and the action is.BR T_NEGOTIATE ,some options may have been succesfully negotiated before options processingwas aborted.  These options will retain their negotiated values.  To determinewhich options may have retained a negotiated value, use the.B T_CURRENTmanagement flag..\".\".SS T_DEFAULTThe.B T_DEFAULTmanagement flagallows the transport user to retrieve the default option values..PPThe user specifies the options of interest in.IR req->opt.buf .The option values are irrelevant and will be ignored; it is sufficient tospecify the.B t_opthdrpart of an option only.For each level, the option.B T_ALLOPT(see below) can be requested on input.  All supported options of this levelwith their default values are then returned.  In this case,.I ret->opt.maxlenmust be given at least the value.I info->options(see.BR t_getinfo "(3), " t_open (3))before the call. If.I req->opt.lenis zero; that is, an empty option buffer is specified, then the optionsselected are all options known to the transport service provider..PPThe default values are then returned in.IR ret->opt.buf .The.I statusfield returned is.B T_NOTSUPPORTif the protocol level does not support this option or the transport userillegally requested a privileged option,.B T_READONLYif the option is read-only, and set to.B T_SUCCESSin all other cases.The overall result of the request is returned in.IR ret->flags .This field contains the worst single result, whereby the rating is the same asfor.BR T_NEGOTIATE ..\".\".SS T_CURRENTThe.B T_CURRENTmanagement flag allows the transport user to retrieve the currently effectiveoption values..PPThe user specifies the options of interest in.IR req->opt.buf .The option values are irrelevant and will be ignored; it is sufficient tospecify the.B t_opthdrpart of an option only.For each level, the option.B T_ALLOPT(see below) can be requested on input.  All supported options of this levelwith their currently effective values are then returned. If.I req->opt.lenis zero; that is, an emtpy option buffer is specified, then the optionsselected are all options known to the transport service provider..PPThe currently effective values are then returned in.IR ret->opt.buf .The.I statusfield returned is.B T_NOTSUPPORTif the protocol level does not support this option or the transport userillegally requested a privileged option,.B T_READONLYif the option is read-only, and set to.B T_SUCCESSin all other cases.The overall result of the request is returned in.IR ret->flags .This field contains the worst single result, whereby the rating is the same asfor.BR T_NEGOTIATE ..\".\".SS T_CHECKThe.B T_CHECKmanagement flagallows the user to verify whether the options specified in the.B T_OPTMGMT_REQare supported by the transport provider..PPThe user specifies the options of interest in.IR req->opt.buf .The special option name.B T_ALLOPTcannot be used for.B T_CHECKand will generate a.RB [ TBADOPT ]error if specified.  Also, if.I req->opt.lenis zero,.BR [ TBADOPT ]will be returned..PPIf an option is specified with no option value (it consists of only a.B t_opthdrstructure), the option is returned with its.I statusfield set to.B T_SUCCESSif it is supported,.B T_NOTSUPPORTif it is not or needs additional user priviledges, and.B T_READONLYif it is read-only (in the current XTI/TLI state).  No option value is returned.If an option is specified with an option value, the.I statusfield of thereturned option has the same value as if the user had tried to negotiate thisvalue with.BR T_NEGOTIATE .If the.I statusis.BR T_SUCCESS ", " T_FAILURE ", " T_NOTSUPPORT " or " T_READONLY ,the returned option value is the same as the one requested on input. .\".\".SS T_NEGOTIATEThe.B T_NEGOTIATEmanagement flagallows the transport user to negotiate option values..PPThe user specifies the options of interest and their values in the.BR T_OPTMGMT_REQ .The negotiated option values are returned in the.BR T_OPTMGMT_ACK .For each level the option.B T_ALLOPTcan be requested on input.  No value is given with this option; only the.B t_opthdrpart is specified.  This input request to negotiate all supported options ofthis level to their default values.  The result is returned option by optionin.BR T_OPTMGMT_ACK .(Note that depending on the state of the transport endpoint, not all requeststo negotiate the default value may be successful.) If.I req->opt.lenis zero; that is, an empty option buffer is specified, then the optionsselected for negotation are all options known to the transport provider.  Thiswill initiate a negotiation of all options to their default values..PPThe.I statusfield of each returned option is set to indicate the result of thenegotiation.  The value is.B T_SUCCESSif the proposed value was negotiated,.B T_PARTSUCCESSif a degrated value was negotiated,.B T_FAILUREif the negotiation failed (according to the negotiation rules),.B T_NOTSUPPORTif the transport provider does not support this option or illegally requestnegotiation of a privileged option, and.B T_READONLYif modification of a read-only option was requested.  If the.I statusis.BR T_SUCCESS ", " T_FAILURE ", " T_NOTSUPPORT " or " T_READONLY ,the returned option value is the same as the one requested on input.The overall result of the negotiation is returned in.IR ret->flags .This field contains the worst single result, whereby the rating is doneaccording to the order.BR T_NOTSUPPORT ", " T_READONLY ", " T_FAILURE ", " T_PARTSUCCESS ", " T_SUCCESS .The value.B T_NOTSUPPORTis the worst result and.B T_SUCCESSis the best..\".\".SH CAVEATS.PP.BR t_optmgmt ()is valid in any state other than.BR T_UNINIT ..PP.BR t_optmgmt ()is valid for all transport service providers regardless of service type.Not all transport service providers necessarily support this function..\".\".SH "RETURN VALUE".PPUpon success,.BR t_optmgmt ()returns zero (0).Upon failure,.BR t_optmgmt ()returns -1 and sets.IR t_errno (3)to an appropriate error number..\".\".SH ERRORS.PPWhen.BR t_optmgmt ()fails, it returns -1 and sets.IR t_errno (3)to an appropriate error number as follows:.TP \w'[TNOTSUPPORT]\(em'u.RB [ TBADF ].I fdis invalid..TP.RB [ TBADFLAG ]The argument.I req->flagscontains invalid flags..TP.RB [ TBADOPT ]The options specified were of an invalid format or contained invalid information.See.IR "\(lqOPTIONS\(rq" ,above, for more information on option formats..TP.RB [ TBUFOVFLW ]The \fImaxlen\fR field of a \fBnetbuf\fR(3) structure passed to the call wasnon-zero, but insufficient to hold the available opaque information.  See,\fBnetbuf\fR(3) for more information..TP.RB [ TNOTSUPPORT ]The call requires the use of a TLI primitive not supported by the underlying transport provider..TP.RB [ TOUTSTATE ]The call was issued with the interface in an incorrect state..TP.RB [ TPROTO ]A protocol error occured between the XTI/TLI library and the underlying transport provider..TP.RB [ TSYSERR ]A \fBLinux\fR system error occured and the \fBLinux\fR error number is set in \fIerrno\fR(3)..\".\".SH "SEE ALSO".PP.BR errno (3),.BR netbuf (3),.BR t_errno (3)..\".\".SH "BUGS".PP.BR t_optmgmt ()has no known bugs..BR t_optmgmt ()has been tested for the described behavior using the.I /usr/bin/test-xnetconformance test program..\".\".SH "CONFORMING TO".PPXTI/TLI,.[XTI.]TPI,.[TPI Revision 2.0.0.]XPG5,XNS 5.2,.[xns.]SUSv2..[susv2.].\".\".[$LIST$.].T4

⌨️ 快捷键说明

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