Skip Navigation Links | |
Exit Print View | |
man pages section 3: Networking Library Functions Oracle Solaris 11.1 Information Library |
DNSServiceConstructFullName(3DNS_SD)
DNSServiceCreateConnection(3DNS_SD)
DNSServiceEnumerateDomains(3DNS_SD)
DNSServiceProcessResult(3DNS_SD)
DNSServiceQueryRecord(3DNS_SD)
DNSServiceReconfirmRecord(3DNS_SD)
DNSServiceRefDeallocate(3DNS_SD)
DNSServiceRegisterRecord(3DNS_SD)
DNSServiceRemoveRecord(3DNS_SD)
DNSServiceUpdateRecord(3DNS_SD)
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_create_dialog_req_nocontact(3SIP)
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)
sip_unregister_all_sent_by(3SIP)
- receive a message from an SCTP socket
cc [ flag... ] file... -lsocket -lnsl -lsctp [ library... ] #include <sys/types.h> #include <sys/socket.h> #include <netinet/sctp.h> ssize_t sctp_recvv(int sd, const struct iovec *iov, int iovlen, struct sockaddr *from, socklen_t *fromlen, void *info, socklen_t *infolen, unsigned int *infotype, int *flags);
The socket descriptor.
The scatter buffer containing the received message.
The number of elements in iov.
A pointer to a buffer to be filled with the sender address of the received message.
The size of the from buffer. Upon return, it is set to the actual size of the sender's address.
A pointer to the buffer to hold the attributes of the received message. The structure type of info is determined by the infotype parameter.
The size of the info buffer. Upon return, it is set to the actual size of returned info buffer.
The type of the info buffer. The defined values are:
If both SCTP_RECVRCVINFO and SCTP_RECVNXTINFO options are not enabled, no attribute will be returned. If only the SCTP_RECVNXTINFO option is enabled but there is no next message in the buffer, there will also no attribute be returned. In these cases, infotype will be set to SCTP_RECVV_NOINFO.
The type of info is struct sctp_rcvinfo and the attribute is about the received message.
The type of info is struct sctp_nxtinfo and the attribute is about the next message in receive buffer. This is the case when only the SCTP_RECVNXTINFO option is enabled and there is a next message in the buffer.
The type of info is struct sctp_recvv_rn. The recvv_rcvinfo field is the attribute of the received message and the recvv_nxtinfo field is the attribute of the next message in buffer. This is the case when both SCTP_RECVRCVINFO and SCTP_RECVNXTINFO options are enabled and there is a next message in the receive buffer.
Flag for receive as in recvmsg(3SOCKET). On return, its value will be different from what was set in to the call. It has the same value as rcv_flags.
The sctp_recvv() function provides an extensible way for the SCTP stack to pass up different SCTP attributes associated with a received message to an application.
There are two types of attributes which can be returned by this call: the attribute of the received message and the attribute of the next message in receive buffer. The caller enables the SCTP_RECVRCVINFO and SCTP_RECVNXTINFO socket option to receive these attributes respectively. Attributes of the received message are returned in struct sctp_rcvinfo and attributes of the next message are returned in struct sctp_nxtinfo. If both options are enabled, both attributes are returned using the following structure.
struct sctp_recvv_rn { struct sctp_rcvinfo recvv_rcvinfo; struct sctp_nxtinfo recvv_nxtinfo; };
The sctp_rcvinfo structure is defined as:
struct sctp_rcvinfo { uint16_t rcv_sid; uint16_t rcv_ssn; uint16_t rcv_flags; uint32_t rcv_ppid; uint32_t rcv_tsn; uint32_t rcv_cumtsn; uint32_t rcv_context; sctp_assoc_t rcv_assoc_id; };
The stream number of the received message.
The stream sequence number that the peer endpoint assigned to the DATA chunk of this message. For fragmented messages, this is the same number for all deliveries of the message (if more than one sctp_recvv()) is needed to read the message).
This field may be set to following values:
This flag is set when the message was sent unordered.
This value is the same information that is passed by the peer socket to its SCTP stack. The SCTP stack performs no byte order modification of this field.
The transmission sequence number that the peer endpoint assigned to the received message.
The current cumulative transmission sequence number of the association known to the SCTP stack.
The association identifier of the association of the received message. This field applies only to a one-to-many style socket.
This value is an opaque 32 bit context datum that was set by the caller with the SCTP_CONTEXT socket option. This value is passed back to the upper layer if an error occurs on the transmission of a message and is retrieved with each undelivered message.
The sctp_nxtinfo structure is defined as follows:
struct sctp_nxtinfo { uint16_t nxt_sid; uint16_t nxt_flags; uint32_t nxt_ppid; size_t nxt_length; sctp_assoc_t nxt_assoc_id; };
The stream number of the next message.
This field can contain any of the following flags and is composed of a bitwise OR of the following values:
The next message was sent unordered.
The entire message has been received and is in the socket buffer. This flag has special implications with respect to the nxt_length field.
The next message is not a user message but instead is a notification.
This value is the same information that was passed by the peer socket to its SCTP stack when sending the next message. The SCTP stack performs no byte order modification of this field.
The length of the message currently received in the socket buffer. This might not be the entire length of the next message since a partial delivery may be in progress. Only if the flag SCTP_COMPLETE is set in the nxt_flags field does this field represent the entire next message size.
The association identifier of the association of the next message. This field applies only to a one-to-many style socket.
New structures can be defined to hold new types of attributes. The new structures do not need to be based on struct sctp_recvv_rn or struct sctp_rcvinfo.
Upon successful completion, the sctp_recvv() function returns the number of bytes received. The function returns -1 if an error occurs and errno is set to indicate the error.
The sctp_recvv() function will fail if:
The sd parameter is not a valid file descriptor.
A parameter can not be accessed.
The operation was interrupted by delivery of a signal before any data could be buffered to be sent.
The operation was interrupted by delivery of a signal before any data is available to be received.
A parameter provided is invalid for this operation.
Insufficient memory is available to complete the operation.
The socket is marked as non-blocking, and the requested operation would block.
See attributes(5) for descriptions of the following attributes:
|
libsctp(3LIB), recvmsg(3SOCKET), setsockopt(3SOCKET), socket(3SOCKET), attributes(5), sctp(7P)