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)
- retrieve and set a socket's multicast filter
cc [ flag... ] file... -lsocket [ library... ] #include <netinet/in.h> int getsourcefilter(int s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t *fmode, uint_t *numsrc, struct sockaddr_storage *slist);
int setsourcefilter(int s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t fmode, uint_t numsrc, struct sockaddr_storage *slist);
int getipv4sourcefilter(int s, struct in_addr interface, struct in_addr group, uint32_t *fmode, uint32_t *numsrc, struct in_addr *slist);
int setipv4sourcefilter(int s, struct in_addr interface, struct in_addr group,uint32_t fmode, uint32_t numsrc, struct in_addr *slist);
These functions allow applications to retrieve and modify the multicast filtering state for a tuple consisting of socket, interface, and multicast group values.
A multicast filter is described by a filter mode, which is MODE_INCLUDE or MODE_EXCLUDE, and a list of source addresses which are filtered. If a group is simply joined with no source address restrictions, the filter mode is MODE_EXCLUDE and the source list is empty.
The getsourcefilter() and setsourcefilter() functions are protocol-independent. They can be used on either PF_INET or PF_INET6 sockets. The getipv4sourcefilter() and setipv4sourcefilter() functions are IPv4-specific. They must be used only on PF_INET sockets.
For the protocol-independent functions, the first four arguments identify the socket, interface, multicast group tuple values. The argument s is an open socket of type SOCK_DGRAM or SOCK_RAW. The interface argument is the interface index. The interface name can be mapped to the index using if_nametoindex(3SOCKET). The group points to either a sockaddr_in containing an IPv4 multicast address if the socket is PF_INET or a sockaddr_in6 containing an IPv6 multicast address if the socket is PF_INET6. The grouplen is the size of the structure pointed to by group.
For the IPv4-specific functions, the first three arguments identify the same socket, interface, multicast group tuple values. The argument s is an open socket of type SOCK_DGRAM or SOCK_RAW and protocol family PF_INET. The interface argument is the IPv4 address assigned to the local interface. The group argument is the IPv4 multicast address.
The getsourcefilter() and getipv4sourcefilter() functions retrieve the current filter for the given tuple consisting of socket, interface, and multicast group values. On successful return, fmode contains either MODE_INCLUDE or MODE_EXCLUDE, indicating the filter mode. On input, the numsrc argument holds the number of addresses that can fit in the slist array. On return, slist contains as many addresses as fit, while numsrc contains the total number of source addresses in the filter. It is possible that numsrc can contain a number larger than the number of addresses in the slist array. An application might determine the required buffer size by calling getsourcefilter() with numsrc containing 0 and slist a NULL pointer. On return, numsrc contains the number of elements that the slist buffer must be able to hold. Alternatively, the maximum number of source addresses allowed by this implementation is defined in <netinet/in.h>:
#define MAX_SRC_FILTER_SIZE 64
The setsourcefilter() and setipv4sourcefilter functions replace the current filter with the filter specified in the arguments fmode, numsrc, and slist. The fmode argument must be set to either MODE_INCLUDE or MODE_EXCLUDE. The numsrc argument is the number of addresses in the slist array. The slist argument points to the array of source addresses to be included or excluded, depending on the fmode value.
If successful, all four functions return 0. Otherwise, they return -1 and set errno to indicate the error.
These functions will fail if:
The s argument is not a valid descriptor.
The address family of the passed-in sockaddr is not AF_INET or AF_INET6.
The socket s is not of type SOCK_DGRAM or SOCK_RAW.
The address family of the group parameter does not match the protocol family of the socket.
Insufficient STREAMS resources available for the operation to complete.
The interface argument, either an index or an IPv4 address, does not identify a valid interface.
The getsourcefilter() and getipv4sourcefilter() functions will fail if:
The tuple consisting of socket, interface, and multicast group values does not exist; group is not being listened to on interface by socket.
The functions setsourcefilter()and setipv4sourcefilter() can fail in the following additional case:
The source filter list is larger than that allowed by the implementation.
See attributes(5) for descriptions of the following attributes:
|
if_nametoindex(3SOCKET), socket(3SOCKET), attributes(5)
RFC 3678