Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Networking Library Functions Oracle Solaris 11 Express 11/10 |
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)
- Routing header manipulation
cc [ flag ... ] file ... -lsocket [library] #include <netinet/in.h> socklen_t inet6_rth_space(int type, int segments);
void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
int inet6_rth_add(void *bp, const struct, in6_addr *addr);
int inet6_rth_reverse(const void *in, void *out);
int inet6_rth_segments(const void *bp);
struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
The inet6_rth functions enable users to manipulate routing headers without having knowledge of their structure.
The iet6_rth_init() function initializes the buffer pointed to by bp to contain a routing header of the specified type and sets ip6r_len based on the segments parameter. The bp_len argument is used only to verify that the buffer is large enough. The ip6r_segleft field is set to zero and inet6_rth_add() increments it. The caller allocates the buffer and its size can be determined by calling inet6_rth_space().
The inet6_rth_add() function adds the IPv6 address pointed to by addr to the end of the routing header that is being constructed.
The inet6_rth_reverse() function takes a routing header extension header pointed to by the first argument and writes a new routing header that sends datagrams along the reverse of the route. The function reverses the order of the addresses and sets the segleft member in the new routing header to the number of segments. Both arguments can point to the same buffer (that is, the reversal can occur in place).
The inet6_rth_segments() function returns the number of segments (addresses) contained in the routing header described by bp.
The inet6_rth_getaddr() function returns a pointer to the IPv6 address specified by index, which must have a value between 0 and one less than the value returned by inet6_rth_segments() in the routing header described by bp. Applications should first call inet6_rth_segments() to obtain the number of segments in the routing header.
The inet6_rth_space() function returns the size, but the function does not allocate the space required for the ancillary data routing header.
To receive a routing header, the application must enable the IPV6_RECVRTHDR socket option:
int on = 1; setsockopt (fd, IPPROTO_IPV6, IPV6_RECVRTHDR, &on, sizeof(on));
Each received routing header is returned as one ancillary data object described by a cmsghdr structure with cmsg_type set to IPV6_RTHDR.
To send a routing header, the application specifies it either as ancillary data in a call to sendmsg() or by using setsockopt(). For the sending side, this API assumes the number of occurrences of the routing header as described in RFC-2460. Applications can specify no more than one outgoing routing header.
The application can remove any sticky routing header by calling setsockopt() for IPV6_RTHDR with a zero option length.
When using ancillary data, a routing header is passed between the application and the kernel as follows: The cmsg_level member has a value of IPPROTO_IPV6 and the cmsg_type member has a value of IPV6_RTHDR. The contents of the cmsg_data member is implementation-dependent and should not be accessed directly by the application, but should be accessed using the inet6_rth functions.
The following constant is defined as a result of including the <netinet/in.h>:
#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0 */
Source routing in IPv6 is accomplished by specifying a routing header as an extension header. There are a number of different routing headers, but IPv6 currently defines only the Type 0 header. See RFC-2460. The Type 0 header supports up to 127 intermediate nodes, limited by the length field in the extension header. With this maximum number of intermediate nodes, a source, and a destination, there are 128 hops.
The inet6_rth_init() function returns a pointer to the buffer (bp) upon success.
For the inet6_rth_add() function, the segleft member of the routing header is updated to account for the new address in the routing header. The function returns 0 upon success and –1 upon failure.
The inet6_rth_reverse() function returns 0 upon success or –1 upon an error.
The inet6_rth_segments() function returns 0 or greater upon success and –1 upon an error.
The inet6_rth_getaddr() function returns NULL upon an error.
The inet6_rth_space() function returns the size of the buffer needed for the routing header.
See attributes(5) for descriptions of the following attributes:
|
RFC 3542– Advanced Sockets Application Programming Interface (API) for IPv6, The Internet Society. May 2003