T_SNDVUDATA(3NSL) Networking Services Library Functions T_SNDVUDATA(3NSL) NNAAMMEE t_sndvudata - send a data unit from one or more noncontiguous buffers SSYYNNOOPPSSIISS #include iinntt tt__ssnnddvvuuddaattaa(iinntt _f_d, ssttrruucctt tt__uunniittddaattaa **_u_n_i_t_d_a_t_a, ssttrruucctt tt__iioovveecc **_i_o_v, uunnssiiggnneedd iinntt _i_o_v_c_o_u_n_t); DDEESSCCRRIIPPTTIIOONN This function is used in connectionless mode to send a data unit to another transport user. The argument _f_d identifies the local transport endpoint through which data will be sent, _i_o_v_c_o_u_n_t contains the number of non-contiguous _u_d_a_t_a buffers and is limited to an implementation-defined value given by TT__IIOOVV__MMAAXX which is at least 16, and _u_n_i_t_d_a_t_a points to a tt__uunniittddaattaa structure containing the following members: struct netbuf addr; struct netbuf opt; struct netbuf udata; If the limit on _i_o_v_c_o_u_n_t is exceeded, the function fails with TTBBAADDDDAATTAA. In uunniittddaattaa, _a_d_d_r specifies the protocol address of the destination user, and _o_p_t identifies options that the user wants associated with this request. The _u_d_a_t_a field is not used. The user may choose not to specify what protocol options are associated with the transfer by setting the _l_e_n field of _o_p_t to zero. In this case, the provider may use default options. The data to be sent is identified by _i_o_v[[00]] through _i_o_v _[_i_o_v_c_o_u_n_t_-_1_].. Note that the limit on the total number of bytes available in all buffers passed: _i_o_v_(_0_)_._i_o_v___l_e_n _+ _. _. _+ _i_o_v_(_i_o_v_c_o_u_n_t_-_1_)_._i_o_v___l_e_n may be constrained by implementation limits. If no other constraint applies, it will be limited by IINNTT__MMAAXX. In practice, the availability of memory to an application is likely to impose a lower limit on the amount of data that can be sent or received using scatter/gather functions. By default, tt__ssnnddvvuuddaattaa(()) operates in synchronous mode and may wait if flow control restrictions prevent the data from being accepted by the local transport provider at the time the call is made. However, if OO__NNOONNBBLLOOCCKK is set by means of tt__ooppeenn(3NSL) or ffccnnttll(2), tt__ssnnddvvuuddaattaa(()) executes in asynchronous mode and will fail under such conditions. The process can arrange to be notified of the clearance of a flow control restriction by means of either tt__llooookk(3NSL) or the EM interface. If the amount of data specified in _i_o_v00 through _i_o_v _[_i_o_v_c_o_u_n_t_-_1_] exceeds the TSDU size as returned in the _t_s_d_u field of the _i_n_f_o argument of tt__ooppeenn(3NSL) or tt__ggeettiinnffoo(3NSL), or is zero and sending of zero octets is not supported by the underlying transport service, a TTBBAADDDDAATTAA error is generated. If tt__ssnnddvvuuddaattaa(()) is called before the destination user has activated its transport endpoint (see tt__bbiinndd(3NSL)), the data unit may be discarded. If it is not possible for the transport provider to immediately detect the conditions that cause the errors TTBBAADDAADDDDRR and TTBBAADDOOPPTT, these errors will alternatively be returned by tt__rrccvvuuddeerrrr(3NSL). An application must therefore be prepared to receive these errors in both of these ways. RREETTUURRNN VVAALLUUEESS Upon successful completion, a value of 00 is returned. Otherwise, a value of -1 is returned and tt__eerrrrnnoo is set to indicate an error. VVAALLIIDD SSTTAATTEESS TT__IIDDLLEE. EERRRROORRSS On failure, tt__eerrrrnnoo is set to one of the following: TTBBAADDAADDDDRR The specified protocol address was in an incorrect format or contained illegal information. TTBBAADDDDAATTAA Illegal amount of data. o A single send was attempted specifying a TSDU greater than that specified in the _i_n_f_o argument, or a send of a zero byte TSDU is not supported by the provider. o _i_o_v_c_o_u_n_t is greater than TT__IIOOVV__MMAAXX.. TTBBAADDFF The specified file descriptor does not refer to a transport endpoint. TTBBAADDOOPPTT The specified options were in an incorrect format or contained illegal information. TTFFLLOOWW OO__NNOONNBBLLOOCCKK ii was set, but the flow control mechanism prevented the transport provider from accepting any data at this time. TTLLOOOOKK An asynchronous event has occurred on this transport endpoint. TTNNOOTTSSUUPPPPOORRTT This function is not supported by the underlying transport provider. TTOOUUTTSSTTAATTEE The communications endpoint referenced by _f_d is not in one of the states in which a call to this function is valid. TTPPRROOTTOO This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI error ((tt__eerrrrnnoo)). TTSSYYSSEERRRR A system error has occurred during execution of this function. TTLLII CCOOMMPPAATTIIBBIILLIITTYY In the TTLLII interface definition, no counterpart of this routine was defined. AATTTTRRIIBBUUTTEESS See aattttrriibbuutteess(5) for descriptions of the following attributes: +---------------+-----------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+-----------------+ |MT Level | Safe | +---------------+-----------------+ SSEEEE AALLSSOO ffccnnttll(2), tt__aalllloocc(3NSL), tt__ooppeenn(3NSL), tt__rrccvvuuddaattaa(3NSL), tt__rrccvvvvuuddaattaa(3NSL) tt__rrccvvuuddeerrrr(3NSL), tt__ssnndduuddaattaa(3NSL), aattttrriibbuutteess(5) August 23, 2001 T_SNDVUDATA(3NSL)