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

📄 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 页
字号:
'\" rtp.\" -*- nroff -*- vim: ft=nroff noautoindent nocindent nosmartindent.\".\" @(#) t_optmgmt.3.man,v 0.9.2.2 2004/05/16 02:35:36 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.\" of the Federal Acquisition Regulations ("FAR") (or any success.\" 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/05/16 02:35:36 by brian.\".\" =========================================================================.so strxnet.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase strxnet.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".\".\".TH T_OPTMGMT 3 "2004/05/16 02:35:36" "strxnet-0_9_2-4" "OpenSS7 XTI/TLI 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.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.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.I flagsspecifies and returns management flags..RS.PPThe flags specified in .I req->flagsrequest one of four possible actions to be performed on the option containedin the request,.IR req->opt .The flags specifiedcan be one of the following values:.TP \w'T_PARTSUCCESS\(em'u.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.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.B T_CHECKrequests that the options specified in.I reqbe checked for validity and validity reported in.IR ret ..TP.B T_NEGOTIATErequests that the options specified in.I reqbe negoitated and the negotiated values returned in.IR ret ..PPThe flags returned in.I ret->flagsrepresents the single most severe result of the operation.  The flags returnedwill be one of the following values (in order of decreasing severity):.TP \w'T_PARTSUCCESS\(em'u.B T_NOTSUPPORTindicates that at least one of the options specified in.I req->optwas not supported by the transport provider at the current privilege level ofthe requesting user..TP.B T_READONLYindicates that at least one of the options specified in.I req->optis read-only (for the current XTI/TLI state).This return flag does not apply when the request flag was.BR T_DEFAULT ..TP.B T_FAILUREindicates that negotiation of at least one of the options specified in.I req->optfailed.  This is not used for illegal format or values.This return flag does not apply when the request flag was.BR T_DEFAULT " or " T_CURRENT ..TP.B T_PARTSUCCESSindicates that the negotiation of at least one of the options specified in.I req->optwas negotiated to a value of lesser quality than the value requested.This return flag only applies when the request flag was.BR T_NEGOTIATE ..TP.B T_SUCCESSindicates that all of the specified options were negotiated or returnedsuccessfully..RE.\".\".SH OPTIONS.PPOptions within the.I optbuffer of the.B t_optmgmtstructure (and other structures including XTI/TLI options) are formatted as acontiguous list of options.  Each option in the list begins 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.I lenthe length of the option including the length of this header and the length ofthe option value that follows..TP.I levelthe level of the option..I levelvalues are transport service provider specific with the exception of the.B XTI_GENERICoption level.(See.BR xti (3))..TP.I namethe name of the option within the.IR level ..I namevalues are transport service provider specific, with the exception of the.B XTI_GENERICoption names.(See.BR xti (3))..TP.I statusthe negotiation status of the option on return, ignored on input..TP.I valuethe value of the option.  This is a variable lenght field, the length of whichis specific to the option specified by.IR level " and " 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 the list willbegin on the next alignment boundary for a.B t_opthdrstructure.  A macro is provided to assist the XTI/TLI 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:.TP.BI 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..TP.BI 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..TP.BI 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 FLAGS.PP.BR t_optmgmt ()provides four flags to specify what management actions are to be performed onthe specified options:.BR T_DEFAULT ", " T_CURRENT ", " T_CHECK " and " T_NEGOTIATE ..PPFor all actions, the transport user specifies the options that are of interestand values (if required by the manamgement action) in.IR req->opt.buf .For each option level, the option.B T_ALLOPTcan be requested on input.  All supported options of this level will then beselected for the management action.If

⌨️ 快捷键说明

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