?? t_optmgmt.3
字號:
'\" rtp.\" -*- nroff -*- vim: ft=nroff.\".\" @(#) t_optmgmt.3,v 1.1.4.1 2004/01/12 23:32:51 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004 OpenSS7 Corporation <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date. The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein. The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" -------------------------------------------------------------------------.\".\" U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software.\" on behalf of the U.S. Government ("Government"), the following.\" provisions apply to you. If the Software is supplied by the Department.\" of Defense ("DoD"), it is classified as "Commercial Computer Software".\" under paragraph 252.227-7014 of the DoD Supplement to the Federal.\" Acquisition Regulations ("DFARS") (or any successor regulations) and the.\" Government is acquiring only the license rights granted herein (the.\" license rights customarily provided to non-Government users). If the.\" Software is supplied to any unit or agency of the Government other than.\" DoD, it is classified as "Restricted Computer Software" and the.\" Government's rights in the Software are defined in paragraph 52.227-19.\" regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the.\" NASA Supplement to the FAR (or any successor regulations)..\".\" =========================================================================.\" .\" Commercial licensing and support of this software is available from.\" OpenSS7 Corporation at a fee. See http://www.openss7.com/.\" .\" =========================================================================.\".\" Last Modified 2004/01/12 23:32:51 by brian.\".\" =========================================================================.so lis.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase lis.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".\".\".TH T_OPTMGMT 3 "2004/01/12 23:32:51" "LiS-2_16_18-8" "Linux Fast-STREAMS XTI Library".\".\".SH NAME.B t_optmgmt\- manage transport options.\".\".SH SYNOPSIS.PP.B #include <xti.h>.HP 8.BI "int t_optmgmt(int " fd ", const struct t_optmgmt *" req ", struct t_optmgmt *" ret );.\".\".SH ARGUMENTS.PP.TP 12.I fdthe transport endpoint for which to manage options..TP.I reqa pointer to a.B t_optmgmtstructure containing the requested options..TP.I reta pointer to a.BR t_optmgmtstructure to contain the returned options..\".\".SH DESCRIPTION.PP.BR t_optmgmt ()manages options associated with the underlying transport provider for theendpoint.IR fd ..PP.I fdspecifies the local transport endpoint upon which to manage options..PP.I reqis a pointer to a.B t_optmgmtstructure that provides the passed in option names and values..PP.I retis a pointer to a.B t_optmgmtstructure that provides the returned option names and values..PPThe.B t_optmgmtstructure is formatted as follows:.sp.nf\fC\s-1\struct t_optmgmt { struct netbuf opt; t_scalar_t flags;};\fR\s+1.fi.PPThe.B t_optmgmtstructure passes and returns the following members and information..TP 12.I optis a.BR netbuf (3)structure that contains passed in.IR "" ( req )or returned.IR "" ( ret )options names and values. Options are structured as described below under.IR "\(lqOPTIONS\(rq" .The.IR req->opt.len and ret->opt.maxlenis significant on call and the.I ret->opt.lenis significant on return.If.I req->opt.lenis zero on call, no option names and values are passed.If.I ret->opt.maxlenis zero on call or.I ret->opt.lenis zero on return, no option names and values are returned..TP 12.I flagsspecifies and returns management flags which can be one of the followingvalues:.RS.TP 12.B T_DEFAULTrequests that the default options for the specified option names, or if.I req->opt.lenis zero, all default options, be returned..TP 12.B T_CURRENTrequests that the current options for the specified option names, or if.I req->opt.lenis zero, all current options, be returned..TP 12.B T_CHECKrequests that the options specified in.I reqbe checked for validity and validity reported in.IR ret ..TP 12.B T_NEGOTIATErequests that the options specified in.I reqbe negoitated and the negotiated values returned in.IR ret ..RE.\".\".SH OPTIONSOptions with the.I optfield of the.B t_optmgmtstructure (and other structures including XTI options)are a formatted as a contiguous list of options. Each option in the listbegins with a.B t_opthdrstructure formatted as follows:.sp.nf\fC\s-1\struct t_opthdr { t_uscalar_t len; /* Option length, incl. header */ t_uscalar_t level; /* Option level */ t_uscalar_t name; /* Option name */ t_uscalar_t status; /* Negotiation result */ char value[0]; /* and onwards... */};\fR\s+1.fi.PPThe.B t_opthdrstrucuture contains the following members:.TP 12.I lenthe length of the option including the length of this header and the length ofthe option value that follows..TP 12.I levelthe level of the option..I levelvalues are transport service provider specific..TP 12.I namethe name of the option within the.IR level ..I namevalues are transport service provider specific..TP 12.I valuethe value of the option. This is a variable lenght field, the length of whichis specific to the option specified by.I leveland.IR name.The format of option values is transport service provider specific..PPOption headers in the options list are always aligned in memory to permitdirect access to the header. This means that the next option in thelist will begin on the next alignment boundary for a.B t_opthdrstructure. A macro is provided to assist the XTI application writer inlocating the next option in the option list..PPA number of macros are provided to assist with handling options in optionlists. These macros are decribed as follows:.HP 12.B T_OPT_FIRSTHDR(b)takes a an argument.I ba pointer to the.BR netbuf (3)structure describing the options list and returns a pointer to the first.B t_opthdrstructure in the list..HP 12.B T_OPT_NEXTHDR(b, p)takes as arguments.I ba pointer to the.BR netbuf (3)structure describing the options list and.I pa pointer to the.B t_opthdrfor the current option, and returns a pointer to the.B t_opthdrof the next option in the list, or.B NULLif there is no next option in the list..HP 12.B T_OPT_DATA(p)takes as an argument.I pa pointer to the.B t_opthdrfor the options and returns a unsigned character pointer to the.I valuefor the option..\".\".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 12.RB [ TBADF ].I fdis invalid..TP 12.RB [ TBADFLAG ]The argument.I req->flagscontains invalid flags..TP 12.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 12.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 12.RB [ TNOTSUPPORT ]The call requires the use of a TLI primitive not supported by the underlying transport provider..TP 12.RB [ TOUTSTATE ]The call was issued with the interface in an incorrect state..TP 12.RB [ TPROTO ]A protocol error occured between the XTI library and the underlying transport provider..TP 12.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$.].TI
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -