Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

t_sndudata(3xti) [ultrix man page]

t_sndudata(3xti)														  t_sndudata(3xti)

Name
       t_sndudata - send a data unit

Syntax
       #include <xti.h>

       int t_sndudata(fd, unitdata)
       int fd;
       struct t_unitdata *unitdata;

Arguments
       fd	 Identifies the local transport endpoint through which data will be sent.

       unitdata  Points to a t_unitdata structure containing the following members:
		 struct netbuf addr;
		 struct netbuf opt;
		 struct netbuf udata;

		 The members have the following meanings:

		 addr	     Specifies the protocol address of the destination user.

		 opt	     Identifies protocol-specific options that the user wants associated with the request.

		 udata	     Specifies the user data to be sent.

Description
       This function is used in connectionless mode to send a data unit to another transport user.

       --------------------------------------------------
       Parameters		Before Call   After Call
       --------------------------------------------------
       fd			x	      /
       unitdata->addr.maxlen	/	      /
       unitdata->addr.len	x	      /
       unitdata->opt.maxlen	/	      /
       unitdata->opt.len	x	      /
       unitdata->opt.buf	?(?)	      /
       unitdata->udata.maxlen	/	      /
       unitdata->udata.len	x	      /
       unitdata->udata.buf	x(x)	      /
       --------------------------------------------------

       If  the	len  field  of udata is zero, and sending of zero octets is not supported by the underlying transport service, the returns -1 with
       t_errno set to [TBADDATA].

       By default, operates in synchronous mode and may wait if flow control restrictions prevent the data from being accepted by the local trans-
       port provider at the time the call is made. However, if O_NONBLOCK is set by means of or executes in asynchronous mode and fails under such
       conditions. The process can arrange to be notified of the clearance of a flow control restriction by means of

       If the amount of data specified in udata exceeds the TSDU size as returned in the tsdu field of the info argument of or the provider gener-
       ates  a	protocol  error. See [TSYSERR] under the DIAGNOSTICS section. If is issued before the destination user has activated its transport
       endpoint, the data unit can be discarded.

Return Values
       Upon successful completion, a value of 0 is returned. On failure, a value of -1 is returned, and t_errno is set to indicate the error.

Diagnostics
       On failure, t_errno is set to one of the following:

       [TBADF]		   The specified file descriptor does not refer to a transport endpoint.

       [TOUTSTATE]	   The function was issued in the wrong sequence on the transport endpoint referenced by fd.

       [TFLOW]		   O_NONBLOCK was set, but the flow control mechanism prevented the transport provider from accepting  any  data  at  this
			   time.

       [TBADDATA]	   Illegal amount of data; zero octets are not supported.

       [TLOOK]		   An asynchronous event has occurred on the transport endpoint.

       [TNOTSUPPORT]	   This function is not supported by the underlying transport provider.

       [TSYSERR]	   A system error has occurred during execution of this function. A protocol error cannot cause to fail until a subsequent
			   access of the transport endpoint.

See Also
       fcntl(2), t_alloc(3xti), t_open(3xti), t_rcvudata(3xti), t_rcvuderr(3xti)

																  t_sndudata(3xti)

Check Out this Related Man Page

t_accept(3xti)															    t_accept(3xti)

Name
       t_accept - accept a connect request

Syntax
       #include <xti.h>

       int t_accept(fd, resfd, call)
       int fd;
       int resfd;
       struct t_call *call;

Arguments
       fd	 Identifies the local transport endpoint where the connect indication arrived.

       resfd	 Specifies the local transport endpoint where the connection is to be established.

       call	 Contains information required by the transport provider to complete the connection.

		 The Call argument points to a t_call structure that contains the following members:
		 struct netbuf addr;
		 struct netbuf opt;
		 struct netbuf udata;
		 int sequence;

		 In call, the members have the following meanings:

		 addr	     Specifies the address of the caller.

		 opt	     Indicates any protocol-specific parameters associated with the connection.

		 udata	     Points to any user data to be returned to the caller.

		 sequence    Is the value returned by that uniquely associates the response with a previously received connect indication.

Description
       A  transport  user  issues  this function to accept a connect request. A transport user can accept a connection on either the same, or on a
       different local transport endpoint than the one on which the connect indication arrived. Before the connection can be accepted on the  same
       endpoint  (resfd==fd),  the user must have responded to any previous connect indications received on that transport endpoint by means of or
       Otherwise, fails and sets t_errno to [TBADF].

       If a different transport endpoint is specified (resfd!=fd), the endpoint must be bound to a protocol address (if it is the same, qlen  must
       be set to 0) and must be in the T_IDLE state before the is issued.

       For  both  types  of endpoints, fails and sets t_errno to [TLOOK] if there are connection indications, (for example, connect or disconnect)
       waiting to be received on that endpoint.

       The values of parameters specified by opt and the syntax of those values are protocol-specific.	The  udata  argument  enables  the  called
       transport  user	to send user data to the caller and the amount of user data must not exceed the limits supported by the transport provider
       as returned in the connect field of the info argument of or If the len field of udata is zero, no data is sent to the caller.

       All the maxlen fields are meaningless.

       ----------------------------------------------
       Parameters	    Before Call   After Call
       ----------------------------------------------
       fd		    x		  /
       resfd		    x		  /
       call->addr.maxlen    /		  /
       call->addr.len	    x		  /
       call->addr.buf	    ?(?)	  /

       call->opt.maxlen     /		  /
       call->opt.len	    x		  /
       call->opt.buf	    ?(?)	  /
       call->udata.maxlen   /		  /
       call->udata.len	    x		  /
       call->udata.buf	    ?(?)	  /
       call->sequence	    x		  /
       ----------------------------------------------

Return Values
       Upon successful completion, a value of 0 is returned. On failure,  a value of -1 is returned, and t_errno is set to indicate the error.

Diagnostics
       On failure, t_errno is set to one of the following:

       [TBADF]		   The file descriptor fd or resfd does not refer to a transport endpoint, or the user is illegally accepting a connection
			   on the same transport endpoint on which the connect indication arrived.

       [TOUTSTATE]	   The	function  was  issued  in the wrong sequence on the transport endpoint referenced by fd, or the transport endpoint
			   referred to by resfd is not in the appropriate state.

       [TACCES] 	   The user does not have permission to accept a connection on the responding transport endpoint or to use  the  specified
			   options.

       [TBADOPT]	   The specified options were in an incorrect format or contained illegal information.

       [TBADDATA]	   The specific amount of user data was not within the bounds allowed by the transport provider.

       [TBADADDR]	   The specified protocol address was in an incorrect format or contained illegal information.

       [TBADSEQ]	   The specified sequence number was invalid.

       [TLOOK]		   An asynchronous event has occurred on the transport endpoint referenced by fd and requires immediate attention.

       [TNOTSUPPORT]	   This function is not supported by the underlying transport provider.

       [TSYSERR]	   A system error has occurred during execution of this function.

See Also
       t_connect(3xti), t_getstate(3xti), t_listen(3xti), t_open(3xti) , t_optmgmt(3xti), t_rcvconnect(3xti)

																    t_accept(3xti)
Man Page