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)
- LDAP display template functions
cc [ flag... ] file... -lldap [ library... ] #include <lber.h> #include <ldap.h> int ldap_init_templates(char *file, struct ldap_disptmpl **tmpllistp);
int ldap_init_templates_buf(char *buf, unsigned long len, struct ldap_disptmpl **tmpllistp);
void ldap_free_templates(struct ldap_disptmpl *tmpllist);
struct ldap_disptmpl *ldap_first_disptmpl (struct ldap_disptmpl *tmpllist);
struct ldap_disptmpl *ldap_next_disptmpl (struct ldap_disptmpl *tmpllist,struct ldap_disptmpl *tmpl);
struct ldap_disptmpl *ldap_oc2template (char **oclist, struct ldap_disptmpl *tmpllist);
struct ldap_disptmpl *ldap_name2template (char *name, struct ldap_disptmpl *tmpllist);
char **ldap_tmplattrs(struct ldap_disptmpl *tmpl, char **includeattrs, int exclude, unsigned long syntaxmask);
struct ldap_tmplitem *ldap_first_tmplrow(struct ldap_disptmpl *tmpl);
struct ldap_tmplitem *ldap_next_tmplrow(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row);
struct ldap_tmplitem *ldap_first_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, struct ldap_tmplitem *col);
struct ldap_tmplitem *ldap_next_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, struct ldap_tmplitem *col);
These functions provide a standard way to access LDAP entry display templates. Entry display templates provide a standard way for LDAP applications to display directory entries. The general idea is that it is possible to map the list of object class values present in an entry to an appropriate display template. Display templates are defined in a configuration file. See ldaptemplates.conf(4). Each display template contains a pre-determined list of items, where each item generally corresponds to an attribute to be displayed. The items contain information and flags that the caller can use to display the attribute and values in a reasonable fashion. Each item has a syntaxid, which are described in the SYNTAX IDS section below. The ldap_entry2text(3LDAP) functions use the display template functions and produce text output.
ldap_init_templates() reads a sequence of templates from a valid LDAP template configuration file (see ldaptemplates.conf(4)). Upon success, 0 is returned, and tmpllistp is set to point to a list of templates. Each member of the list is an ldap_disptmpl structure (defined below in the DISPTMPL Structure Elements section).
ldap_init_templates_buf() reads a sequence of templates from buf (whose size is buflen). buf should point to the data in the format defined for an LDAP template configuration file (see ldaptemplates.conf(4)). Upon success, 0 is returned, and tmpllistp is set to point to a list of templates.
The LDAP_SET_DISPTMPL_APPDATA() macro is used to set the value of the dt_appdata field in an ldap_disptmpl structure. This field is reserved for the calling application to use; it is not used internally.
The LDAP_GET_DISPTMPL_APPDATA() macro is used to retrieve the value in the dt_appdata field.
The LDAP_IS_DISPTMPL_OPTION_SET() macro is used to test a ldap_disptmpl structure for the existence of a template option. The options currently defined are: LDAP_DTMPL_OPT_ADDABLE (it is appropriate to allow entries of this type to be added), LDAP_DTMPL_OPT_ALLOWMODRDN (it is appropriate to offer the “modify rdn”operation), LDAP_DTMPL_OPT_ALTVIEW (this template is merely an alternate view of another template, typically used for templates pointed to be an LDAP_SYN_LINKACTION item).
ldap_free_templates() disposes of the templates allocated by ldap_init_templates().
ldap_first_disptmpl() returns the first template in the list tmpllist. The tmpllist is typically obtained by calling ldap_init_templates() .
ldap_next_disptmpl() returns the template after tmpl in the template list tmpllist. A NULL pointer is returned if tmpl is the last template in the list.
ldap_oc2template() searches tmpllist for the best template to use to display an entry that has a specific set of objectClass values. oclist should be a null-terminated array of strings that contains the values of the objectClass attribute of the entry. A pointer to the first template where all of the object classes listed in one of the template's dt_oclist elements are contained in oclist is returned. A NULL pointer is returned if no appropriate template is found.
ldap_tmplattrs() returns a null-terminated array that contains the names of attributes that need to be retrieved if the template tmpl is to be used to display an entry. The attribute list should be freed using ldap_value_free( ). The includeattrs parameter contains a null-terminated array of attributes that should always be included (it may be NULL if no extra attributes are required). If syntaxmask is non-zero, it is used to restrict the attribute set returned. If exclude is zero, only attributes where the logical AND of the template item syntax id and the syntaxmask is non-zero are included. If exclude is non-zero, attributes where the logical AND of the template item syntax id and the syntaxmask is non-zero are excluded.
ldap_first_tmplrow() returns a pointer to the first row of items in template tmpl.
ldap_next_tmplrow() returns a pointer to the row that follows row in template tmpl.
ldap_first_tmplcol() returns a pointer to the first item (in the first column) of row row within template tmpl. A pointer to an ldap_tmplitem structure (defined below in the TMPLITEM Structure Elements section) is returned.
The LDAP_SET_TMPLITEM_APPDATA() macro is used to set the value of the ti_appdata field in a ldap_tmplitem structure. This field is reserved for the calling application to use; it is not used internally.
The LDAP_GET_TMPLITEM_APPDATA() macro is used to retrieve the value of the ti_appdata field.
The LDAP_IS_TMPLITEM_OPTION_SET() macro is used to test a ldap_tmplitem structure for the existence of an item option. The options currently defined are: LDAP_DITEM_OPT_READONLY (this attribute should not be modified), LDAP_DITEM_OPT_SORTVALUES (it makes sense to sort the values), LDAP_DITEM_OPT_SINGLEVALUED (this attribute can only hold a single value), LDAP_DITEM_OPT_VALUEREQUIRED (this attribute must contain at least one value), LDAP_DITEM_OPT_HIDEIFEMPTY (do not show this item if there are no values), and LDAP_DITEM_OPT_HIDEIFFALSE (for boolean attributes only: hide this item if the value is FALSE).
ldap_next_tmplcol() returns a pointer to the item (column) that follows column col within row row of template tmpl.
The ldap_disptmpl structure is defined as:
struct ldap_disptmpl { char *dt_name; char *dt_pluralname; char *dt_iconname; unsigned long dt_options; char *dt_authattrname; char *dt_defrdnattrname; char *dt_defaddlocation; struct ldap_oclist *dt_oclist; struct ldap_adddeflist *dt_adddeflist; struct ldap_tmplitem *dt_items; void *dt_appdata; struct ldap_disptmpl *dt_next; };
The dt_name member is the singular name of the template. The dt_pluralname is the plural name. The dt_iconname member will contain the name of an icon or other graphical element that can be used to depict entries that correspond to this display template. The dt_options contains options which may be tested using the LDAP_IS_TMPLITEM_OPTION_SET() macro.
The dt_authattrname contains the name of the DN-syntax attribute whose value(s) should be used to authenticate to make changes to an entry. If dt_authattrname is NULL, then authenticating as the entry itself is appropriate. The dt_defrdnattrname is the name of the attribute that is normally used to name entries of this type, for example, “cn”for person entries. The dt_defaddlocation is the distinguished name of an entry below which new entries of this type are typically created (its value is site-dependent).
dt_oclist is a pointer to a linked list of object class arrays, defined as:
struct ldap_oclist { char **oc_objclasses; struct ldap_oclist *oc_next; };
These are used by the ldap_oc2template() function.
dt_adddeflist is a pointer to a linked list of rules for defaulting the values of attributes when new entries are created. The ldap_adddeflist structure is defined as:
struct ldap_adddeflist { int ad_source; char *ad_attrname; char *ad_value; struct ldap_adddeflist *ad_next; };
The ad_attrname member contains the name of the attribute whose value this rule sets. If ad_source is LDAP_ADSRC_CONSTANTVALUE then the ad_value member contains the (constant) value to use. If ad_source is LDAP_ADSRC_ADDERSDN then ad_value is ignored and the distinguished name of the person who is adding the new entry is used as the default value for ad_attrname.
The ldap_tmplitem structure is defined as:
struct ldap_tmplitem { unsigned long ti_syntaxid; unsigned long ti_options; char *ti_attrname; char *ti_label; char **ti_args; struct ldap_tmplitem *ti_next_in_row; struct ldap_tmplitem *ti_next_in_col; void *ti_appdata; };
Syntax ids are found in the ldap_tmplitem structure element ti_syntaxid, and they can be used to determine how to display the values for the attribute associated with an item. The LDAP_GET_SYN_TYPE() macro can be used to return a general type from a syntax id. The five general types currently defined are: LDAP_SYN_TYPE_TEXT (for attributes that are most appropriately shown as text), LDAP_SYN_TYPE_IMAGE (for JPEG or FAX format images), LDAP_SYN_TYPE_BOOLEAN (for boolean attributes), LDAP_SYN_TYPE_BUTTON (for attributes whose values are to be retrieved and display only upon request, for example, in response to the press of a button, a JPEG image is retrieved, decoded, and displayed), and LDAP_SYN_TYPE_ACTION (for special purpose actions such as “search for the entries where this entry is listed in the seeAlso attribute”).
The LDAP_GET_SYN_OPTIONS macro can be used to retrieve an unsigned long bitmap that defines options. The only currently defined option is LDAP_SYN_OPT_DEFER, which (if set) implies that the values for the attribute should not be retrieved until requested.
There are sixteen distinct syntax ids currently defined. These generally correspond to one or more X.500 syntaxes.
LDAP_SYN_CASEIGNORESTR is used for text attributes which are simple strings whose case is ignored for comparison purposes.
LDAP_SYN_MULTILINESTR is used for text attributes which consist of multiple lines, for example, postalAddress, homePostalAddress, multilineDescription, or any attributes of syntax caseIgnoreList.
LDAP_SYN_RFC822ADDR is used for case ignore string attributes that are RFC-822 conformant mail addresses, for example, mail.
LDAP_SYN_DN is used for attributes with a Distinguished Name syntax, for example, seeAlso.
LDAP_SYN_BOOLEAN is used for attributes with a boolean syntax.
LDAP_SYN_JPEGIMAGE is used for attributes with a jpeg syntax, for example, jpegPhoto.
LDAP_SYN_JPEGBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve, decode, and display an attribute of jpeg syntax.
LDAP_SYN_FAXIMAGE is used for attributes with a photo syntax, for example, Photo. These are actually Group 3 Fax (T.4) format images.
LDAP_SYN_FAXBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve, decode, and display an attribute of photo syntax.
LDAP_SYN_AUDIOBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve and play an attribute of audio syntax. Audio values are in the “mu law” format, also known as “au” format.
LDAP_SYN_TIME is used for attributes with the UTCTime syntax, for example, lastModifiedTime. The value(s) should be displayed in complete date and time fashion.
LDAP_SYN_DATE is used for attributes with the UTCTime syntax, for example, lastModifiedTime. Only the date portion of the value(s) should be displayed.
LDAP_SYN_LABELEDURL is used for labeledURL attributes.
LDAP_SYN_SEARCHACTION is used to define a search that is used to retrieve related information. If ti_attrname is not NULL, it is assumed to be a boolean attribute which will cause no search to be performed if its value is FALSE. The ti_args structure member will have four strings in it: ti_args[ 0 ] should be the name of an attribute whose values are used to help construct a search filter or “-dn” is the distinguished name of the entry being displayed should be used, ti_args[ 1 ] should be a filter pattern where any occurrences of “%v” are replaced with the value derived from ti_args[ 0 ], ti_args[ 2 ] should be the name of an additional attribute to retrieve when performing the search, and ti_args[ 3 ] should be a human-consumable name for that attribute. The ti_args[ 2 ] attribute is typically displayed along with a list of distinguished names when multiple entries are returned by the search.
LDAP_SYN_LINKACTION is used to define a link to another template by name. ti_args[ 0 ] will contain the name of the display template to use. The ldap_name2template() function can be used to obtain a pointer to the correct ldap_disptmpl structure.
LDAP_SYN_ADDDNACTION and LDAP_SYN_VERIFYDNACTION are reserved as actions but currently undefined.
The init template functions return LDAP_TMPL_ERR_VERSION if buf points to data that is newer than can be handled, LDAP_TMPL_ERR_MEM if there is a memory allocation problem, LDAP_TMPL_ERR_SYNTAX if there is a problem with the format of the templates buffer or file. LDAP_TMPL_ERR_FILE is returned by ldap_init_templates if the file cannot be read. Other functions generally return NULL upon error.
See attributes(5) for a description of the following attributes:
|
ldap(3LDAP), ldap_entry2text(3LDAP), ldaptemplates.conf(4), attributes(5)