Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Networking Library Functions Oracle Solaris 10 1/13 Information Library |
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_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)
- get RPC entry
cc [ flag ... ] file ... -lnsl [ library ... ] #include <rpc/rpcent.h> struct rpcent *getrpcbyname(const char *name);
struct rpcent *getrpcbyname_r(const char *name, struct rpcent *result, char *buffer, int buflen);
struct rpcent *getrpcbynumber(const int number);
struct rpcent *getrpcbynumber_r(const int number, struct rpcent *result, char *buffer, int buflen);
struct rpcent *getrpcent(void);
struct rpcent *getrpcent_r(struct rpcent *result, char *buffer, int buflen);
void setrpcent(const int stayopen);
void endrpcent(void);
These functions are used to obtain entries for RPC (Remote Procedure Call) services. An entry may come from any of the sources for rpc specified in the /etc/nsswitch.conf file (see nsswitch.conf(4)).
getrpcbyname() searches for an entry with the RPC service name specified by the parameter name.
getrpcbynumber() searches for an entry with the RPC program number number.
The functions setrpcent(), getrpcent(), and endrpcent() are used to enumerate RPC entries from the database.
setrpcent() sets (or resets) the enumeration to the beginning of the set of RPC entries. This function should be called before the first call to getrpcent(). Calls to getrpcbyname() and getrpcbynumber() leave the enumeration position in an indeterminate state. If the stayopen flag is non-zero, the system may keep allocated resources such as open file descriptors until a subsequent call to endrpcent().
Successive calls to getrpcent() return either successive entries or NULL, indicating the end of the enumeration.
endrpcent() may be called to indicate that the caller expects to do no further RPC entry retrieval operations; the system may then deallocate resources it was using. It is still allowed, but possibly less efficient, for the process to call more RPC entry retrieval functions after calling endrpcent().
The functions getrpcbyname(), getrpcbynumber(), and getrpcent() use static storage that is re-used in each call, making these routines unsafe for use in multithreaded applications.
The functions getrpcbyname_r(), getrpcbynumber_r(), and getrpcent_r() provide reentrant interfaces for these operations.
Each reentrant interface performs the same operation as its non-reentrant counterpart, named by removing the ``_r'' suffix. The reentrant interfaces, however, use buffers supplied by the caller to store returned results, and are safe for use in both single-threaded and multithreaded applications.
Each reentrant interface takes the same parameters as its non-reentrant counterpart, as well as the following additional parameters. The parameter result must be a pointer to a struct rpcent structure allocated by the caller. On successful completion, the function returns the RPC entry in this structure. The parameter buffer must be a pointer to a buffer supplied by the caller. This buffer is used as storage space for the RPC entry data. All of the pointers within the returned struct rpcent result point to data stored within this buffer (see RETURN VALUES). The buffer must be large enough to hold all of the data associated with the RPC entry. The parameter buflen should give the size in bytes of the buffer indicated by buffer.
For enumeration in multithreaded applications, the position within the enumeration is a process-wide property shared by all threads. setrpcent() may be used in a multithreaded application but resets the enumeration position for all threads. If multiple threads interleave calls to getrpcent_r(), the threads will enumerate disjoint subsets of the RPC entry database.
Like their non-reentrant counterparts, getrpcbyname_r() and getrpcbynumber_r() leave the enumeration position in an indeterminate state.
RPC entries are represented by the struct rpcent structure defined in <rpc/rpcent.h>:
struct rpcent { char *r_name; /* name of this rpc service char **r_aliases; /* zero-terminated list of alternate names */ int r_number; /* rpc program number */ };
The functions getrpcbyname(), getrpcbyname_r( ), getrpcbynumber( ), and getrpcbynumber_r() each return a pointer to a struct rpcent if they successfully locate the requested entry; otherwise they return NULL.
The functions getrpcent() and getrpcent_r() each return a pointer to a struct rpcent if they successfully enumerate an entry; otherwise they return NULL, indicating the end of the enumeration.
The functions getrpcbyname(), getrpcbynumber(), and getrpcent() use static storage, so returned data must be copied before a subsequent call to any of these functions if the data is to be saved.
When the pointer returned by the reentrant functions getrpcbyname_r(), getrpcbynumber_r(), and getrpcent_r() is non-NULL, it is always equal to the result pointer that was supplied by the caller.
The reentrant functions getrpcyname_r(), getrpcbynumber_r( ) and getrpcent_r() will return NULL and set errno to ERANGE if the length of the buffer supplied by caller is not large enough to store the result. See Intro(2) for the proper usage and interpretation of errno in multithreaded applications.
/etc/rpc
/etc/nsswitch.conf
See attributes(5) for descriptions of the following attributes:
|
rpcinfo(1M), rpc(3NSL), nsswitch.conf(4), rpc(4), attributes(5)
The reentrant interfaces getrpcbyname_r(), getrpcbynumber_r(), and getrpcent_r() are included in this release on an uncommitted basis only, and are subject to change or removal in future minor releases.
When compiling multithreaded applications, see Intro(3), Notes On Multithreaded Applications, for information about the use of the _REENTRANT flag.
Use of the enumeration interfaces getrpcent() and getrpcent_r() is discouraged; enumeration may not be supported for all database sources. The semantics of enumeration are discussed further in nsswitch.conf(4).