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

📄 t_sndvopt.3.man

📁 This a separate release of the OpenSS7 X/Open XTI/TLI library, TLI modules (timod, tirdwr) and the I
💻 MAN
字号:
'\" rtp.\" -*- nroff -*- vim: ft=nroff noautoindent nocindent nosmartindent.\".\" @(#) t_sndvopt.3.man,v 0.9.2.2 2004/05/16 02:35:37 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:37 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_SNDV 3 "2004/05/16 02:35:37" "strxnet-0_9_2-4" "OpenSS7 XTI/TLI Library".\".\".SH NAME.B t_sndvopt\- gather and send data with options.\".\".SH SYNOPSIS.PP.B #include <xti.h>.HP 8.BI "int t_sndvopt(int " fd ", const struct t_optmgmt *" options ", struct t_iovec *" iov ", unsigned int " iovcnt ", int " flags );.\".\".SH ARGUMENTS.PP.TP.I fdspecifies the local transport endpoint from which the data is to be sent..TP.I optionsa pointer to a.B t_optmgmtstructure containing information about the options to send..TP.I iovis a pointer to an array of.B t_iovecstructures that specify the scatter-gather buffer from which to gather thedata..TP.I iovcntis the number of.B t_iovecstructures in the array pointed to by.IR iov ..TP.I flagsdescribe additional information about the data being sent..\".\".SH DESCRIPTION.PP.BR t_sndvopt ()sends connection oriented data, gathering the data from a vector ofuser specified scatter-gather buffers..PPThe.I flagsare a bitwise OR of any of the following flags:.TP.B T_MOREspecifies that the next send operation will include data belonging to the sametransport service data unit or expedited transport service data unit..TP.B T_EXPEDITEDspecifies that the data is part of an expedited transport service data unit.When not set, specifies that the data is part of a normal transport servicedata unit..TP.B T_PUSHspecifies that any accumulated data should be sent without delay..PPThe.B t_iovecstructure is formatted as follows:.sp.nf\fC\s-1\struct t_iovec {        void *iov_base;        size_t iov_len;};\fR\s+1.fi.PPThe.B t_iovecstructure specifies the following members:.TP.I iov_baseThe base of the scatter-gather buffer..TP.I iov_lenThe length of the scatter-gather buffer pointed to by.IR iov_base ..PPWhen data is sent, each buffer in the array of scatter-gather buffers,.IR iov ,are used in order until they are exhausted and then data is sent from the nextsequential buffer in the array..PP.I optionsis a pointer to a.B t_optmgmtstructure that describes the options to be sent.The.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 the following members and information..TP.I optis a.BR netbuf (3)structure that contains passed inoptions names and values.  Options are structured as described below under.IR "\(lqOPTIONS\(rq" .The.IR options->opt.lenis significant on call.If.I optionsis.B NULLor.I options->opt.lenis zero on call, no option names and values are passed..TP.I flagsspecifies management flags ignored for this call..\".\".SH OPTIONSOptions with the.I optfield of the.B t_optmgmtstructure (and other structures including XTI/TLI 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.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..TP.I namethe name of the option within the.IR level ..I namevalues are transport service provider specific..TP.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/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:.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_sndvopt ()is only valid in the.BR T_DATAXFER " and " T_INRELstates..PP.BR t_sndvopt ()is only valid for transport service providers of service type.BR T_COTS " and " T_COTS_ORD ..PPIn synchronous mode,.BR t_sndvopt ()blocks until there is sufficient room to buffer the data for transmissionconsidering flow control.  In asynchronous mode where there is insufficientroom to buffer the data for transmission considering flow control,.BR t_sndvopt ()fails, returns -1 and sets.IR t_errno (3)to.RB [ TFLOW ]..PP.BR t_sndvopt ()is functionaly equivalent to.BR writev (2),and the two functions can be used interchangeably; however,.BR writev (2)does not maintain.IR t_errno (3)..\".\".SH "RETURN VALUE".PPUpon success,.BR t_sndvopt ()returns zero (0) or a positive integer reflecting the number of bytes sent.Upon failure,.BR t_sndvopt ()returns -1 and sets.IR t_errno (3)to an appropriate error number..\".\".SH ERRORS.PPWhen.BR t_sndvopt ()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 [ TBADOPT ]The options specified were of an invalid format or contained invalid information.See.BR t_optmgmt (3)for more information on option formats..TP.RB [ TBADFLAG ]The argument.I flagscontains invalid flags (other than.BR T_MORE ", " T_EXPEDITED " or " T_PUSH )..TP.RB [ TFLOW ]The call would block due to flow control but.I fdis in asynchronous mode.BR "" ( O_NONBLOCK " or " O_NDELAYwas set using.BR t_open (3)or.BR fcntl (2)..TP.RB [ TLOOK ]An asynchronous event occured before the call could complete.  See.BR t_look (3)for more information..TP.RB [ TNOTSUPPORT ]The call requires the use of a TLI primitive not supported by the underlying transport provider.The can occur when the transport service provider is of service type.BR T_CLTS ..TP.RB [ TOUTSTATE ]The call was issued with the interface in a state other than.BR T_DATAXFER " or " T_INREL ..TP.RB [ TPROTO ]A protocol error occured between the XTI/TLI library and the underlying transport provider..TP.RB [ TSYSERR ]A.B Linuxsystem error occured and the.B Linuxerror number is set in.IR errno (3)..\".\".SH "SEE ALSO".PP.BR errno (3),.BR fcntl (2),.BR t_errno (3),.BR t_look (3),.BR t_open (3),.BR t_snd (3),.BR writev (2)..\".\".SH "BUGS".PP.BR t_sndvopt ()has no known bugs..BR t_sndvopt ()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 + -