t_accept.3.man

来自「This a separate release of the OpenSS7 X」· MAN 代码 · 共 474 行

MAN
474
字号
'\" rtp.\" -*- nroff -*- vim: ft=nroff noautoindent nocindent nosmartindent.\".\" @(#) t_accept.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_ACCEPT 3 "2004/05/16 02:35:36" "strxnet-0_9_2-4" "OpenSS7 XTI/TLI Library".\".\".SH NAME.B t_accept\- accept a connection request.\".\".SH SYNOPSIS.PP.B #include <xti.h>.HP 8.BI "int t_accept(int" fd ", int " resfd ", struct t_call *" call );.\".\".SH ARGUMENTS.PP.TP.I fdthe transport endpoint upon which a connection indication was received..TP.I resfdthe transport endpoint upon which to accept the connection..TP.I calla pointer to a .B t_callstructure containing information about the responding endpoint and any data tobe transferred in response..\".\".SH DESCRIPTION.PPThe.I fdargument is an integer file descriptor specifying the stream upon which aprevious connection indication was received with.BR t_listen (3),and for which the connection indication is to now be accepted..PPThe.I resfdargument is an integer file descriptor specifying the stream upon which toaccept the transport connection..I resfdcan be the same as.I fdor different.When.I resfdis different from.IR fd ,the caller specifies that the connection is to be accepted on the streamassociated with.IR resfd .When.I resfdis different from.IR fd ,the stream associated with.I resfdmust be an XTI/TLI.[XTI.].[TPI Revision 2.0.0.].[XNS.]stream on the same transport provider that is either in the.B T_UNBNDstate, or is in the.B T_IDLEstate and bound to the same address as the responding address.When in the.B T_UNBNDstate,.I resfdwill be bound to the address specified in.IR call->addr ..PPThe.I callargument is a pointer to a.B t_callstructure,specifying the responding address,.IR addr ,the response options,.IR opt ,and any response user data,.IR udata .The.B t_callstructure is formatted as follows:.sp.nf\fC\s-1\struct t_call {        struct netbuf addr;     /* address              */        struct netbuf opt;      /* options              */        struct netbuf udata;    /* data                 */        int sequence;           /* identification       */};\fR\s+1.fi.PPThe.IR addr ", " opt " and " udatamembers of the.B t_callstructure are.BR netbuf (3)structures, each formatted as follows:.sp.nf\fC\s-1\struct netbuf {        unsigned int maxlen;    /* max length           */        unsigned int len;       /* current length       */        char *buf;              /* data                 */};\fR\s+1.fi.TP.I addrA.BR netbuf (3)structure that specifies the responding address.  The reponding address is theaddress accepting the connection..I call->addr.maxlenis set to zero (0) by the caller and ignored by the provider..I call->addr.lenis set to the length of the responding address.  If the length of theresponding address is zero (0) then the destination address of the connectionindication or the bound address of the responding transport endpoint,.IR resfd ,is used as the responding address..I call->addr.bufpoints to the responding address..TP.I optA.BR netbuf (3)structure that specifies the responding options.  The responding options can beboth end-to-end and local transport options..I call->opt.maxlenis set to zero (0) by the caller and is ignored by the provider..I call->opt.lenis set to the length of the options.  If the length of the responding optionsis zero (0) no options are specified..I call->opt.bufpoints to the options..TP.I udataA.BR netbuf (3)structure that specifies the data to send with the connectionresponse..I call->udata.maxlenis set to zero (0) by the caller and is ignored by the provider..I call->udata.lenis set to the length of the data.  If the length of the data is zero (0) nodata is included in the response message..I call->udata.bufpoints to the data..TP.I sequencespecifies a sequence number of the connection indication that is to beaccepted.  This value was returned by a previous call to.BR t_listen (3)..\".\".SH OPTIONS.PPOptions in the.I call->optbuffer is formatted as described in.BR t_optmgmt(3)..PPIllegal options (where the.I t_opthdr.lenexceeds the remaining size of the option buffer, or where the option value isillegal) cause.BR t_accept ()to either faile with.IR t_errno (3)set to.RB [ TBADOPT ],or the connection establishment to faile at a later stage, depending on whenthe implementation detects the illegal option.  If multiple options are passedin.IR call->opt ,and one of them is illegal, the call fails.  It is possible, however, thatsome or all of the submitted legal options were successfully negotiated.  Usethe.B T_CURRENTmanagement flag to.BR t_optmgmt (3)to establish which options were successful..PPOptions specified in.I call->optcan address multiple option levels.  A legal option is ignored by.BR t_accept ()if it is for an option level unknown to the transport provider.  A legaloption is ignored by.BR t_accept() if it is for an option name unsupported by (unknown to) thetransport provider..PPIf a proposed value is an absolute requirement and the negotiated value isrejected, the connection establishment aborts and a.B T_DISCONNECTevent occurs.  When multiple options are provided and one of them is rejectedand the connection establishment fails, one or all of the options successfullynegotiated before failure may retain their negotiated values.  Use.BR t_optmgmt (3)with the.B T_CURRENTflag to determine which options retain their negotiated values..PPIf a proposed value is not an absolute requirement, the negotiated value willbe used.  If the option is not supported, it is quietly ignored..PP.BR t_accept ()completes the negotiation of all options with end-to-end significance.Options not explicitly negotiated by.I call->optare taken from an internal option buffer used by the transport provider thatcontains the previously negotiated values or default values for the implicitoptions of end-to-end significance..PPIf a transport user responsds to negotiation with a read-only option, or anon-privileged user responds with illegal access toa  privileged option,.BR t_accept ()will either fail with.BR [ TACCES ],or the connection establishment aborts and a.B T_DISCONNECTevent occurs..\".\".SH CAVEATS.PP.BR t_accept ()is only valid in state.B T_INCONwith an outstanding number of connection indications greater than zero (0)..PP.BR t_accept ()is only valid for transport service providers of service type.BR T_COTS " or " T_COTS_ORD ..\".\".SH "RETURN VALUE".PPUpon success,.BR t_accept ()returns zero (0).Upon failure,.BR t_accept ()returns -1 and sets.IR t_errno (3)to an appropriate error number..\".\".SH ERRORS.PPWhen.BR t_accept ()fails, it returns -1 and sets.IR t_errno (3)to an appropriate error number as follows:.TP \w'[TNOTSUPPORT]\(em'u.RB [ TACCES ]The caller did not have sufficient permissions to accept a connection on the.I resfdfile descriptor, did not have sufficient permissions to use the respondingaddress specified in.IR call->addr ,or did not have sufficient permissions to use the responding options specifiedin.IR call->opt ..TP.RB [ TBADADDR ]The address specified was of an invalid format or contained invalid information.This error is returned from the transport service provider..TP.RB [ TBADDATA ]The amount of data specified for the call and underlying transport serviceprovider was invalid (i.e. was outside the protocol limits).  See\fBt_getinfo\fR(3) and \fBt_open\fR(3) for more information..TP.RB [ TBADF ]The.IR fd " or " resfdfile descriptor was invalid or does not refer to a transport endpoint known tothe XTI/TLI library.  See.BR t_open (3)and.BR t_sync (3)for additional information..TP.RB [ TBADOPT ]The options specified were of an invalid format or contained invalid information.This error is returned from the transport service provider.See.BR t_optmgmt (3)for more information on option formats..TP.RB [ TBADSEQ ]The.I sequencenumber provided was invalid, or is not associated with an outstandingconnection indication..TP.RB [ TINDOUT ]The file descriptor.IR resfd " (==" fd )has outstanding connection indications..TP.RB [ TLOOK ]An asynchronous event occured before the call could complete.  See \fBt_look\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 [ TPROVMISMATCH ]The transport provider associated with.I resfdis not the same as the transport provider associated with.IR fd ..TP.RB [ TRESADDR ]The file descriptor.I resfdwas bound to a different address than the responding address..TP.RB [ TRESQLEN ]The file descriptor.I resfdis listening (i.e. it was bound with a.I qlen> 0)..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 netbuf (3),.BR t_listen (3)..\".\".SH "BUGS".PP.BR t_accept ()has no known bugs..BR t_accept ()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 + =
减小字号Ctrl + -
显示快捷键?