Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Networking Library Functions Oracle Solaris 10 8/11 Information Library |
gss_create_empty_oid_set(3GSS)
gss_inquire_cred_by_mech(3GSS)
gss_inquire_mechs_for_name(3GSS)
gss_inquire_names_for_mech(3GSS)
gss_process_context_token(3GSS)
ldap_enable_translation(3LDAP)
ldap_get_entry_controls(3LDAP)
ldap_get_lang_values_len(3LDAP)
ldap_init_getfilter_buf(3LDAP)
ldap_init_searchprefs_buf(3LDAP)
ldap_init_templates_buf(3LDAP)
ldap_parse_extended_result(3LDAP)
ldap_parse_sasl_bind_result(3LDAP)
ldap_sasl_interactive_bind_s(3LDAP)
ldap_set_string_translators(3LDAP)
ldap_translate_from_t61(3LDAP)
rpc_gss_get_principal_name(3NSL)
rpc_gss_svc_max_data_length(3NSL)
sasl_auxprop_add_plugin(3SASL)
sasl_canonuser_add_plugin(3SASL)
sasl_client_plug_init_t(3SASL)
sasl_server_plug_init_t(3SASL)
sasl_server_userdb_checkpass_t(3SASL)
sasl_server_userdb_setpass_t(3SASL)
sdp_add_connection(3COMMPUTIL)
sdp_add_information(3COMMPUTIL)
sdp_delete_all_field(3COMMPUTIL)
sdp_delete_all_media_field(3COMMPUTIL)
sdp_delete_attribute(3COMMPUTIL)
sdp_find_attribute(3COMMPUTIL)
sdp_find_media_rtpmap(3COMMPUTIL)
sdp_session_to_str(3COMMPUTIL)
sip_delete_header_by_name(3SIP)
sip_disable_dialog_logging(3SIP)
sip_disable_trans_logging(3SIP)
sip_enable_dialog_logging(3SIP)
sip_enable_trans_logging(3SIP)
sip_get_contact_display_name(3SIP)
sip_get_content_sub_type(3SIP)
sip_get_dialog_local_contact_uri(3SIP)
sip_get_dialog_local_cseq(3SIP)
sip_get_dialog_local_tag(3SIP)
sip_get_dialog_local_uri(3SIP)
sip_get_dialog_remote_cseq(3SIP)
sip_get_dialog_remote_tag(3SIP)
sip_get_dialog_remote_target_uri(3SIP)
sip_get_dialog_remote_uri(3SIP)
sip_get_dialog_route_set(3SIP)
sip_get_from_display_name(3SIP)
sip_get_passertedid_display_name(3SIP)
sip_get_passertedid_uri_str(3SIP)
sip_get_ppreferredid_display_name(3SIP)
sip_get_ppreferredid_uri_str(3SIP)
sip_get_proxy_authen_param(3SIP)
sip_get_proxy_authen_scheme(3SIP)
sip_get_proxy_author_param(3SIP)
sip_get_proxy_author_scheme(3SIP)
sip_get_replyto_display_name(3SIP)
sip_get_retry_after_cmts(3SIP)
sip_get_retry_after_time(3SIP)
sip_get_route_display_name(3SIP)
sip_get_via_sent_by_host(3SIP)
sip_get_via_sent_by_port(3SIP)
sip_get_via_sent_protocol_name(3SIP)
sip_get_via_sent_protocol_version(3SIP)
sip_get_via_sent_transport(3SIP)
sip_get_www_authen_param(3SIP)
sip_get_www_authen_scheme(3SIP)
- send data or expedited data over a connection
#include <xti.h> int t_snd(int fd, void *buf, unsigned int nbytes, int flags);
This routine is part of the XTI interfaces which evolved from the TLI interfaces. XTI represents the future evolution of these interfaces. However, TLI interfaces are supported for compatibility. When using a TLI routine that has the same name as an XTI routine, the tiuser.h header file must be used. Refer to the TLI COMPATIBILITY section for a description of differences between the two interfaces.
This function is used to send either normal or expedited data. The argument fd identifies the local transport endpoint over which data should be sent, buf points to the user data, nbytes specifies the number of bytes of user data to be sent, and flags specifies any optional flags described below:
If set in flags, the data will be sent as expedited data and will be subject to the interpretations of the transport provider.
If set in flags, this indicates to the transport provider that the transport service data unit (TSDU) (or expedited transport service data unit - ETSDU) is being sent through multiple t_snd() calls. Each t_snd() with the T_MORE flag set indicates that another t_snd() will follow with more data for the current TSDU (or ETSDU).
The end of the TSDU (or ETSDU) is identified by a t_snd() call with the T_MORE flag not set. Use of T_MORE enables a user to break up large logical data units without losing the boundaries of those units at the other end of the connection. The flag implies nothing about how the data is packaged for transfer below the transport interface. If the transport provider does not support the concept of a TSDU as indicated in the info argument on return from t_open(3NSL) or t_getinfo(3NSL), the T_MORE flag is not meaningful and will be ignored if set.
The sending of a zero-length fragment of a TSDU or ETSDU is only permitted where this is used to indicate the end of a TSDU or ETSDU; that is, when the T_MORE flag is not set. Some transport providers also forbid zero-length TSDUs and ETSDUs.
If set in flags, requests that the provider transmit all data that it has accumulated but not sent. The request is a local action on the provider and does not affect any similarly named protocol flag (for example, the TCP PUSH flag). This effect of setting this flag is protocol-dependent, and it may be ignored entirely by transport providers which do not support the use of this feature.
Note that the communications provider is free to collect data in a send buffer until it accumulates a sufficient amount for transmission.
By default, t_snd() 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 O_NONBLOCK is set by means of t_open(3NSL) or fcntl(2), t_snd() will execute in asynchronous mode, and will fail immediately if there are flow control restrictions. The process can arrange to be informed when the flow control restrictions are cleared by means of either t_look(3NSL) or the EM interface.
On successful completion, t_snd() returns the number of bytes (octets) accepted by the communications provider. Normally this will equal the number of octets specified in nbytes. However, if O_NONBLOCK is set or the function is interrupted by a signal, it is possible that only part of the data has actually been accepted by the communications provider. In this case, t_snd() returns a value that is less than the value of nbytes. If t_snd() is interrupted by a signal before it could transfer data to the communications provider, it returns –1 with t_errno set to TSYSERR and errno set to EINTR.
If nbytes is zero and sending of zero bytes is not supported by the underlying communications service, t_snd() returns -1 with t_errno set to TBADDATA.
The size of each TSDU or ETSDU must not exceed the limits of the transport provider as specified by the current values in the TSDU or ETSDU fields in the info argument returned by t_getinfo(3NSL).
The error TLOOK is returned for asynchronous events. It is required only for an incoming disconnect event but may be returned for other events.
On successful completion, t_snd() returns the number of bytes accepted by the transport provider. Otherwise, –1 is returned on failure and t_errno is set to indicate the error.
Note that if the number of bytes accepted by the communications provider is less than the number of bytes requested, this may either indicate that O_NONBLOCK is set and the communications provider is blocked due to flow control, or that O_NONBLOCK is clear and the function was interrupted by a signal.
On failure, t_errno is set to one of the following:
Illegal amount of data:
A single send was attempted specifying a TSDU (ETSDU) or fragment TSDU (ETSDU) greater than that specified by the current values of the TSDU or ETSDU fields in the info argument.
A send of a zero byte TSDU (ETSDU) or zero byte fragment of a TSDU (ETSDU) is not supported by the provider.
Multiple sends were attempted resulting in a TSDU (ETSDU) larger than that specified by the current value of the TSDU or ETSDU fields in the info argument – the ability of an XTI implementation to detect such an error case is implementation-dependent. See WARNINGS, below.
The specified file descriptor does not refer to a transport endpoint.
An invalid flag was specified.
O_NONBLOCK was set, but the flow control mechanism prevented the transport provider from accepting any data at this time.
An asynchronous event has occurred on this transport endpoint.
This function is not supported by the underlying transport provider.
The communications endpoint referenced by fd is not in one of the states in which a call to this function is valid.
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 (t_errno).
A system error has occurred during execution of this function.
The XTI and TLI interface definitions have common names but use different header files. This, and other semantic differences between the two interfaces are described in the subsections below.
The XTI interfaces use the header file, xti.h. TLI interfaces should not use this header. They should use the header:
|
The t_errno values that can be set by the XTI interface and cannot be set by the TLI interface are:
|
The t_errno values that this routine can return under different circumstances than its XTI counterpart are:
|
In the TBADDATA error cases described above, TBADDATA is returned, only for illegal zero byte TSDU ( ETSDU) send attempts.
See attributes(5) for descriptions of the following attributes:
|
fcntl(2), t_getinfo(3NSL), t_look(3NSL), t_open(3NSL), t_rcv(3NSL), attributes(5)
It is important to remember that the transport provider treats all users of a transport endpoint as a single user. Therefore if several processes issue concurrent t_snd() calls then the different data may be intermixed.
Multiple sends which exceed the maximum TSDU or ETSDU size may not be discovered by XTI. In this case an implementation-dependent error will result, generated by the transport provider, perhaps on a subsequent XTI call. This error may take the form of a connection abort, a TSYSERR, a TBADDATA or a TPROTO error.
If multiple sends which exceed the maximum TSDU or ETSDU size are detected by XTI, t_snd() fails with TBADDATA.