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

📄 t_accept.3

📁 7号信令功能代码,为开源代码
💻 3
字号:
'\" rtp.\" -*- nroff -*- vim: ft=nroff.\".\" @(#) t_accept.3,v 1.1.4.1 2004/01/12 23:32:49 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/01/12 23:32:49 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_ACCEPT 3 "2004/01/12 23:32:49" "LiS-2_16_18-8" "Linux Fast-STREAMS XTI 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 12.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..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 .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 12.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 is used as the responding address..I call->addr.bufpoints to the responding address..TP 12.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 12.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 12.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 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 12.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 12.RB [ TBADADDR ]The address specified was of an invalid format or contained invalid information.This error is returned from the transport service provider..TP 12.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 12.RB [ TBADF ]The.IR fd " or " resfdfile descriptor was invalid or does not refer to a transport endpoint known tothe XTI library.  See.BR t_open (3)and.BR t_sync (3)for additional information..TP 12.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 12.RB [ TBADSEQ ]The.I sequencenumber provided was invalid, or is not associated with an outstandingconnection indication..TP 12.RB [ TINDOUT ]The file descriptor.IR resfd " (==" fd )has outstanding connection indications..TP 12.RB [ TLOOK ]An asynchronous event occured before the call could complete.  See \fBt_look\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 [ TPROVMISMATCH ]The transport provider associated with.I resfdis not the same as the transport provider associated with.IR fd ..TP 12.RB [ TRESADDR ]The file descriptor.I resfdwas bound to a different address than the responding address..TP 12.RB [ TRESQLEN ]The file descriptor.I resfdis listening (i.e. it was bound with a.I qlen> 0)..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 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$.].TI

⌨️ 快捷键说明

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