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)
- library routines for secure remote procedure calls
cc [ flag... ] file... -lnsl [ library...] #include <rpc/rpc.h> #include <sys/types.h> int authdes_getucred(const struct authdes_cred *adc, uid_t *uidp, gid_t *gidp, short *gidlenp, gid_t *gidlist);
AUTH *authdes_seccreate(const char *name, const uint_t window, const char *timehost, ckey);
int getnetname(char name [MAXNETNAMELEN+1]);
int host2netname(char name [MAXNETNAMELEN+1], const char *host, const char *domain);
int key_decryptsession(const char *remotename, des_block *deskey);
int key_encryptsession(const char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(const char *key);
int key_secretkey_is_set(void)
int netname2host(const char *name, char *host, const int hostlen);
int netname2user(const char *name, uid_t *uidp, gid_t *gidp, int *gidlenp, gid_t *gidlist [NGRPS]);
int user2netname(char name [MAXNETNAMELEN+1], const uid_t uid, const char *domain);
The RPC library functions allow C programs to make procedure calls on other machines across the network.
RPC supports various authentication flavors. Among them are:
No authentication (none).
Traditional UNIX-style authentication.
DES encryption-based authentication.
The authdes_getucred() and authdes_seccreate() functions implement the AUTH_DES authentication style. The keyserver daemon keyserv(1M) must be running for the AUTH_DES authentication system to work and keylogin(1) must have been run. The AUTH_DES style of authentication is discussed here. For information about the AUTH_NONE and AUTH_SYS flavors of authentication, refer to rpc_clnt_auth(3NSL). See rpc(3NSL) for the definition of the AUTH data structure.
The following functions documented on this page are MT-Safe. For the MT-levels of other authentication styles, see relevant man pages.
This is the first of two functions that interface to the RPC secure authentication system AUTH_DES. The second is the authdes_seccreate() function. The authdes_getucred() function is used on the server side to convert an AUTH_DES credential, which is operating system independent, to an AUTH_SYS credential. The authdes_getucred() function returns 1 if it succeeds, 0 if it fails.
The *uidp parameter is set to the user's numerical ID associated with adc. The *gidp parameter is set to the numerical ID of the user's group. The *gidlist parameter contains the numerical IDs of the other groups to which the user belongs. The *gidlenp parameter is set to the number of valid group ID entries specified by the *gidlist parameter.
The authdes_getucred() function fails if the authdes_cred structure was created with the netname of a host. In such a case, netname2host() should be used to get the host name from the host netname in the authdes_cred structure.
The second of two AUTH_DES authentication functions, the authdes_seccreate() function is used on the client side to return an authentication handle that enables the use of the secure authentication system. The first field, name, specifies the network name netname of the owner of the server process. The field usually represents a hostname derived from the host2netname() utility, but the field might also represent a user name converted with the user2netname() utility.
The second field, window, specifies the validity of the client credential in seconds. If the difference in time between the client's clock and the server's clock exceeds window, the server rejects the client's credentials and the clock will have to be resynchronized. A small window is more secure than a large one, but choosing too small a window increases the frequency of resynchronization due to clock drift.
The third parameter, timehost, is the host's name and is optional. If timehost is NULL, the authentication system assumes that the local clock is always in sync with the timehost clock and does not attempt resynchronization. If a timehost is supplied, the system consults the remote time service whenever resynchronization is required. The timehost parameter is usually the name of the host on which the server is running.
The final parameter, ckey, is also optional. If ckey is NULL, the authentication system generates a random DES key to be used for the encryption of credentials. If ckey is supplied, it is used for encryption.
If authdes_seccreate() fails, it returns NULL.
This function returns the unique, operating system independent netname of the caller in the fixed-length array name. The function returns 1 if it succeeds and 0 if it fails.
This function converts a domain-specific hostname host to an operating system independent netname. The function returns 1 if it succeeds and 0 if it fails. The host2netname() function is the inverse of the netname2host() function. If the domain is NULL, host2netname() uses the default domain name of the machine. If host is NULL, it defaults to that machine itself. If domain is NULL and host is an NIS name such as myhost.sun.example.com, the host2netname() function uses the domain sun.example.com rather than the default domain name of the machine.
This function is an interface to the keyserver daemon, which is associated with RPC's secure authentication system (AUTH_DES authentication). User programs rarely need to call key_decryptsession() or the associated functions key_encryptsession(), key_gendes(), and key_setsecret().
The key_decryptsession() function takes a server netname remotename and a DES key deskey, and decrypts the key by using the the public key of the server and the secret key associated with the effective UID of the calling process. The key_decryptsession() function is the inverse of key_encryptsession() function.
This function is a keyserver interface that takes a server netname remotename and a DES key deskey, and encrypts the key using the public key of the the server and the secret key associated with the effective UID of the calling process. If the keyserver does not have a key registered for the UID, it falls back to using the secret key for the netname nobody unless this feature has been disabled. See keyserv(1M). The key_encryptsession() function is the inverse of key_decryptsession() function. The key_encryptsession() function returns 0 if it succeeds, -1 if it fails.
This is a keyserver interface function used to ask the keyserver for a secure conversation key. Selecting a conversion key at random is generally not secure because the common ways of choosing random numbers are too easy to guess. The key_gendes() function returns 0 if it succeeds, -1 if it fails.
This is a keyserver interface function used to set the key for the effective UID of the calling process. This function returns 0 if it succeeds, -1 if it fails.
This is a keyserver interface function used to determine if a key has been set for the effective UID of the calling process. If the keyserver has a key stored for the effective UID of the calling process, the key_secretkey_is_set() function returns 1. Otherwise it returns 0.
This function converts an operating system independent netname name to a domain-specific hostname host. The hostlen parameter is the maximum size of host. The netname2host() function returns 1 if it succeeds and 0 if it fails. The function is the inverse of the host2netname() function.
This function converts an operating system independent netname to a domain-specific user ID. The netname2user() function returns 1 if it succeeds and 0 if it fails.The function is the inverse of the user2netname() function.
The *uidp parameter is set to the user's numerical ID associated with name. The *gidp parameter is set to the numerical ID of the user's group. The gidlist parameter contains the numerical IDs of the other groups to which the user belongs. The *gidlenp parameter is set to the number of valid group ID entries specified by the gidlist parameter.
This function converts a domain-specific username to an operating system independent netname. The user2netname() function returns 1 if it succeeds and 0 if it fails. The function is the inverse of netname2user() function.
See attributes(5) for descriptions of the following attributes:
|
chkey(1), keylogin(1), keyserv(1M), newkey(1M), rpc(3NSL), rpc_clnt_auth(3NSL), attributes(5)