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)
- get DLPI information
cc [ flag ... ] file ... -ldlpi [ library ... ] #include <libdlpi.h> int dlpi_info(dlpi_handle_t dh, dlpi_info_t *infop, uint_t version);
The dlpi_info() function provides DLPI information about the open DLPI link instance associated with DLPI handle dh. DLPI information can be retrieved in any state of dh, but some of the information might not be available if dh is in the DL_UNBOUND DLPI state. The DLPI information received is copied into infop, which must point to a dlpi_info_t allocated by the caller. The version argument specifies the version of the dlpi_info_t structure expected by the caller. Callers can use the macro DLPI_INFO_VERSION to specify the default version, which is currently 0. Callers can request version 1 of the dlpi_info_t structure by defining DLPI_INFO_VERSION to 1 before including <libdlpi.h> and passing the defined DLPI_INFO_VERSION value of 1 as the version argument. See the description of di_linkname below for the difference between version 0 and 1.
The dlpi_info_t is a structure defined in <libdlpi.h> as follows:
typedef struct { uint_t di_opts; uint_t di_max_sdu; uint_t di_min_sdu; uint_t di_state; uchar_t di_mactype; char di_linkname[DLPI_LINKNAME_MAX]; uchar_t di_physaddr[DLPI_PHYSADDR_MAX]; uchar_t di_physaddrlen; uchar_t di_bcastaddr[DLPI_PHYSADDR_MAX]; uchar_t di_bcastaddrlen; uint_t di_sap; int di_timeout; dl_qos_cl_sel1_t di_qos_sel; dl_qos_cl_range1_t di_qos_range; } dlpi_info_t;
Reserved for future dlpi_info_t expansion.
Maximum message size, in bytes, that the DLPI link is able to accept for transmission. The value is guaranteed to be greater than or equal to di_min_sdu.
Minimum message size, in bytes, that the DLPI link is able to accept for transmission. The value is guaranteed to be greater than or equal to one.
Current DLPI state of dh; either DL_UNBOUND or DL_IDLE.
MAC type supported by the DLPI link associated with dh. See <sys/dlpi.h> for the list of possible MAC types.
Link name associated with DLPI handle dh. If the caller specifies the default version argument value of 0, the size of this field is DLPI_LINKNAME_MAX. If the caller defines DLPI_INFO_VERSION to value 1 before including <libdlpi.h>, the size of this field is MAXLINKNAMESPECIFIER. See dlpi(7P) for information on link names and the supported maximum length of DLPI link names.
Link-layer physical address of bound dh. If dh is in the DL_UNBOUND DLPI state, the contents of di_physaddr are unspecified.
Physical address length, in bytes. If dh is in the DL_UNBOUND DLPI state, di_physaddrlen is set to zero.
Link-layer broadcast address. If the di_mactype of the DLPI link does not support broadcast, the contents of di_bcastaddr are unspecified.
Link-layer broadcast address length, in bytes. If the di_mactype of the DLPI link does not support broadcast, di_bcastaddrlen is set to zero.
SAP currently bound to handle. If dh is in the DL_UNBOUND DLPI state, di_sap is set to zero.
Current timeout value, in seconds, set on the dlpi handle.
Current QOS parameters supported by the DLPI link instance associated with dh. Unsupported QOS parameters are set to DL_UNKNOWN.
Available range of QOS parameters supported by a DLPI link instance associated with the DLPI handle dh. Unsupported QOS range values are set to DL_UNKNOWN.
Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in <sys/dlpi.h> or an error value listed in the following section is returned.
Bad DLPI message
Invalid DLPI handle
Invalid argument
Unsupported DLPI connection mode
DLPI operation timed out
Unsupported DLPI Version
DLPI operation failed
Example 1 Get link-layer broadcast address
The following example shows how dlpi_info() can be used.
#include <libdlpi.h> uchar_t * get_bcastaddr(const char *linkname, uchar_t *baddrlenp) { dlpi_handle_t dh; dlpi_info_t dlinfo; uchar_t *baddr; if (dlpi_open(linkname, &dh, 0) != DLPI_SUCCESS) return (NULL); if (dlpi_info(dh, &dlinfo, 0) != DLPI_SUCCESS) { dlpi_close(dh); return (NULL); } dlpi_close(dh); *baddrlenp = dlinfo.di_bcastaddrlen; if ((baddr = malloc(*baddrlenp)) == NULL) return (NULL); return (memcpy(baddr, dlinfo.di_bcastaddr, *baddrlenp)); }
See attributes(5) for description of the following attributes:
|