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)
- LDAP entry display functions
cc[ flag... ] file... -lldap[ library... ] #include <lber.h> #include <ldap.h> int ldap_entry2text(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, int (*writeproc)(), void *writeparm, char *eol, int rdncount, unsigned long opts);
int ldap_entry2text_search(LDAP *ld, char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, int (*writeproc)(), void *writeparm, char *eol,int rdncount, unsigned long opts);
int ldap_vals2text(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned longsyntaxid, int (*writeproc)(), void *writeparm, char *eol, int rdncount);
int ldap_entry2html(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, int (*writeproc)(),void *writeparm, char *eol, int rdncount, unsigned long opts, char *urlprefix, char *base);
int ldap_entry2html_search(LDAP *ld, char *dn, LDAPMessage *entry, struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals, int (*writeproc)(), void *writeparm, char *eol, int rdncount, unsigned long opts, char *urlprefix);
int ldap_vals2html(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, int (*writeproc)(), void *writeparm, char *eol, int rdncount, char *urlprefix);
#define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001
#define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002
#define LDAP_DTMPL_BUFSIZ 2048
These functions use the LDAP display template functions (see ldap_disptmpl(3LDAP) and ldap_templates.conf(4)) to produce a plain text or an HyperText Markup Language (HTML) display of an entry or a set of values. Typical plain text output produced for an entry might look like:
"Barbara J Jensen, Information Technology Division" Also Known As: Babs Jensen Barbara Jensen Barbara J Jensen E-Mail Address: bjensen@terminator.rs.itd.umich.edu Work Address: 535 W. William Ann Arbor, MI 48103 Title: Mythical Manager, Research Systems ...
The exact output produced will depend on the display template configuration. HTML output is similar to the plain text output, but more richly formatted.
ldap_entry2text() produces a text representation of entry and writes the text by calling the writeproc function. All of the attributes values to be displayed must be present in entry; no interaction with the LDAP server will be performed within ldap_entry2text. ld is the LDAP pointer obtained by a previous call to ldap_open. writeproc should be declared as:
int writeproc( writeparm, p, len ) void *writeparm; char *p; int len;
where p is a pointer to text to be written and len is the length of the text. p is guaranteed to be zero-terminated. Lines of text are terminated with the string eol. buf is a pointer to a buffer of size LDAP_DTMPL_BUFSIZ or larger. If buf is NULL then a buffer is allocated and freed internally. tmpl is a pointer to the display template to be used (usually obtained by calling ldap_oc2template). If tmpl is NULL, no template is used and a generic display is produced. defattrs is a NULL-terminated array of LDAP attribute names which you wish to provide default values for (only used if entry contains no values for the attribute). An array of NULL-terminated arrays of default values corresponding to the attributes should be passed in defvals. The rdncount parameter is used to limit the number of Distinguished Name (DN) components that are actually displayed for DN attributes. If rdncount is zero, all components are shown. opts is used to specify output options. The only values currently allowed are zero (default output), LDAP_DISP_OPT_AUTOLABELWIDTH which causes the width for labels to be determined based on the longest label in tmpl, and LDAP_DISP_OPT_HTMLBODYONLY. The LDAP_DISP_OPT_HTMLBODYONLY option instructs the library not to include <HTML>, <HEAD>, <TITLE>, and <BODY> tags. In other words, an HTML fragment is generated, and the caller is responsible for prepending and appending the appropriate HTML tags to construct a correct HTML document.
ldap_entry2text_search() is similar to ldap_entry2text, and all of the like-named parameters have the same meaning except as noted below. If base is not NULL, it is the search base to use when executing search actions. If it is NULL, search action template items are ignored. If entry is not NULL, it should contain the objectClass attribute values for the entry to be displayed. If entry is NULL, dn must not be NULL, and ldap_entry2text_search will retrieve the objectClass values itself by calling ldap_search_s. ldap_entry2text_search will determine the appropriate display template to use by calling ldap_oc2template, and will call ldap_search_s to retrieve any attribute values to be displayed. The tmpllist parameter is a pointer to the entire list of templates available (usually obtained by calling ldap_init_templates or ldap_init_templates_buf). If tmpllist is NULL, ldap_entry2text_search will attempt to read a load templates from the default template configuration file ETCDIR/ldaptemplates.conf
ldap_vals2text produces a text representation of a single set of LDAP attribute values. The ld, buf, writeproc, writeparm, eol, and rdncount parameters are the same as the like-named parameters for ldap_entry2text. vals is a NULL-terminated list of values, usually obtained by a call to ldap_get_values. label is a string shown next to the values (usually a friendly form of an LDAP attribute name). labelwidth specifies the label margin, which is the number of blank spaces displayed to the left of the values. If zero is passed, a default label width is used. syntaxid is a display template attribute syntax identifier (see ldap_disptmpl(3LDAP) for a list of the pre-defined LDAP_SYN_... values).
ldap_entry2html produces an HTML representation of entry. It behaves exactly like ldap_entry2text(3LDAP), except for the formatted output and the addition of two parameters. urlprefix is the starting text to use when constructing an LDAP URL. The default is the string ldap:/// The second additional parameter, base, the search base to use when executing search actions. If it is NULL, search action template items are ignored.
ldap_entry2html_search behaves exactly like ldap_entry2text_search(3LDAP), except HTML output is produced and one additional parameter is required. urlprefix is the starting text to use when constructing an LDAP URL. The default is the string ldap:///
ldap_vals2html behaves exactly like ldap_vals2text,exceptHTMLoutputis and one additional parameter is required. urlprefix is the starting text to use when constructing an LDAP URL. The default is the string ldap:///
These functions all return an LDAP error code. LDAP_SUCCESS is returned if no error occurs. See ldap_error(3LDAP) for details. The ld_errno field of the ld parameter is also set to indicate the error.
ETCDIR/ldaptemplates.conf
See attributes(5) for a description of the following attributes:
|
ldap(3LDAP), ldap_disptmpl(3LDAP), ldaptemplates.conf(4) , attributes(5)