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

📄 t_connect.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_connect.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_CONNECT 3 "2004/05/16 02:35:36" "strxnet-0_9_2-4" "OpenSS7 XTI/TLI Library".\".\".SH NAME.B t_connect\- establish a transport connection.\".\".SH SYNOPSIS.PP.B #include <xti.h>.HP 8.BI "int t_connect(int " fd ", struct t_call *" sndcall ", struct t_call *" rcvcall );.\".\".SH ARGUMENTS.PP.TP.I fdthe transport endpoint to connect..TP.I sndcalla pointer to a.B t_callstructure specifying the peer address, options and data..TP.I rcvcalla pointer to a.B t_callstructure returning the responding address, options and data..\".\".SH DESCRIPTION.PP.I fdis the file descriptor of the local transport endpoint..PP.I sndcallis a.B t_callstructure that specifies the address of the peer and the options andconnection data to send to the peer..PP.I rcvcallis a.B t_callstructure that specifies the responding address, response options andconnection data received from the peer..PPThe.IR sndcall " and " rcvcallare.B t_callstructures that specify the called and responding addresses.  The.B t_callstructure is formated as follows:.sp.nf\fC\s-1\struct t_call {        struct netbuf addr;             /* address */        struct netbuf opt;              /* options */        struct netbuf udata;            /* user data */        int sequence;                   /* sequence number */};\fR\s+1.fi.TP.I addris a.BR netbuf (3)structure specifying the area and length of the protocol address..I sndcall->addrpasses in on call the called address for the connection, if any..I sndcall->addr.lenis significant and.I sndcall->addr.maxlenis not..I rcvcall->addrreturns the responding address for the connection, if any..I rcvcall->addr.maxlenis significant on call and.I rcvcall->addr.lenis significant on return..TP.I optis a.BR netbuf (3)structure specifying the area and length of the connection options..I sndcall->optpasses in on call the local connection options..I sndcall->opt.lenis significant and.I sndcall->opt.maxlenis not..I rcvcall->optreturns the remote connection options..I rcvcall->opt.maxlenis significant on call and.I rcvcall->opt.lenis significant on return..TP.I udatais a.BR netbuf (3)structure specifying the area and length of the connection data..I sndcall->udatapasses in on call the local connection data..I sndcall->udata.lenis significant and.I sndcall->udata.maxlenis not..I rcvcall->udatareturns the remote connection data..I rcvcall->udata.maxlenis significant on call and.I rcvcall->udata.lenis significant on return..TP.I sequenceis not significant in the.BR t_connect ()call..\".\".SH OPTIONS.PPOptions in the.I sndcall->optand.I rcvcall->optbuffers are 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_connect ()to either fail with.IR t_errno (3)set to.RB [ TBADOPT ],or the connection establishment to fail at a later stage, depending on whenthe implementation detects the illegal option.If multiple options are passed in.I sndcall->optand on of them is illegal, the call fails.  It is possible, however, that someor all of the submitted legal options were successfully negotiated.  Use the.B T_CURRENTmanagement flag to.BR t_optmgmt (3)to establish which options were successful..PPOptions specified in.I sndcall->optcan address multiple option levels.A legal option is ignored by.BR t_connect ()if it is for an option level unknown to the transport provider.  A legaloption is ignored by.BR t_connect ()if it is for an option name unsupported by (unknown to) the transport provider..PPIf a proposed value is an absolute requirement and the negotiated value is thesame, the returned option will have a status of.BR T_SUCCESS .If the option is supported and the negotiation is rejected, any attempt toestablish a connection aborts; a.B T_DISCONNECTevent occurs, and a synchronous call to.BR t_connect ()fails with.RB [ TLOOK ].When multiple options are provided and one of them is rejected and theconnection 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 retains their negotiated values..PPIf a proposed value is not an absolute requirement, and the negotiated valueequals the proposed value, the returned option will have a status of.BR T_SUCCESS .If the negotiated value is of lesser quality than the proposed value, thereturned option will have a status of.BR T_PARTSUCCESS .If the option is not supported, it is quietly ignored..PP.BR t_connect ()initiates the negotiation of all options with end-to-end significance.Options not explicitly specified in.I sndcall->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 requests negotiation of a read-only option, or anon-privileged user requests illegal access to a privileged option,.BR t_connect ()will either fail with.RB [ TACCES ],or the connection establishment aborts and a.B T_DISCONNECTevent occurs.  If the connection aborts, a synchronous call to.BR t_connect ()fails with.RB [ TLOOK ]..PP.BR t_connect ()returns in.I rcvcall->optthe values of all options with end-to-end significance that were received withthe connection response and the negotiated values of those options withoutend-to-end significance that had been specified in.IR sndcall->opt .However, options specified in.I sndcall->optthat are not supported or refer to an unknown option level are discarded andnot returned on output.  The status field of each option returned in.I rcvcall->optindicates if the proposed value.RB ( T_SUCCESS )or a degraded value.RB ( T_PARTSUCCESS )has been negotiated.  The status field of received ancilliary information that is notsubject to negotiation is always set to.BR T_SUCCESS ..\".\".SH CAVEATS.PP.BR t_connect ()is only valid in state.BR T_IDLE ..PPIn synchronous mode,.BR t_connect ()blocks until it successfully receives a connection confirmation.In asynchronous mode (i.e..BR O_NONBLOCK " or " O_NDELAYis set with.BR t_open "(3) or " fcntl (2)),.BR t_connect ()will return immediately after failing to read a connection confirmationwith a a return value of -1 and.IR t_errno (3)set to.BR T_NODATA ..\".\".SH "RETURN VALUE".PPUpon success,.BR t_connect ()returns zero (0), confirms the connection request and provides the respondingaddress, options and connection data in the.I rcvcall.B t_callstructure.Upon failure,.BR t_connect ()returns -1 and sets.IR t_errno (3)to an appropriate error number..\".\".SH ERRORS.PPWhen.BR t_connect ()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 use the address or options specified in.IR sndcall->addr " or " sndcall->opt ..TP.RB [ TADDRBUSY ]The.I sndcall->addrspecificed was already in use by another transport endpoint..TP.RB [ TBADADDR ]The.I sndcall->addrspecified was of an invalid format or contained invalid information..TP.RB [ TBADDATA ]The amount of data specified for the call.I sndcall->udata.lenprovider was invalid for the underlying transport service (i.e. was outsidethe protocol limits).  See.BR t_getinfo "(3) and " t_open (3)for more information..TP.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 [ TBUFOVFLW ]The.I maxlenfield of a.BR netbuf (3)structure,.IR rcvcall->addr.maxlen ", " rcvcall->opt.maxlen " or " rcvcall->udata.maxlen ,passed to the call was non-zero, but insufficient to hold the available opaqueinformation.  See,.BR netbuf (3)for more information..TP.RB [ TLOOK ]An asynchronous event occurred before the call could complete.  See.BR t_look (3)for more information..TP.RB [ TNODATA ]An attempt was made to read a connection confirmation but.I fdwas set for non-blocking operation with.BR O_NONBLOCK " or " O_NDELAYand no connection confirmation was available.The connection confirmation can be retrieved later with.BR t_rcvconnect (3)..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 occurred between the XTI/TLI library and the underlying transport provider..TP.RB [ TSYSERR ]A.B Linuxsystem error occurred and the.B Linuxerror number is set in.IR errno (3)..\".\".SH "SEE ALSO".PP.BR fcntl (2),.BR netbuf (3),.BR t_errno (3),.BR t_getinfo (3),.BR t_look (3),.BR t_open (3),.BR t_rcvconnect (3)..PP.\".\".SH "BUGS".PP.BR t_connect ()has no known bugs..BR t_connect ()has been tested for the described behaviour 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 + -