/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NS_H
#define _NS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
/*
* Name Service reserved names for lookup
*/
/*
* Name Services supported
*/
/*
* Known Protocol Extensions
*/
/*
* get unique or full list of printer bindings
*/
#define NOTUNIQUE 0
/* BSD binding address structure */
struct ns_bsd_addr {
};
struct ns_kvp {
};
/* LDAP specific result codes */
typedef enum NSL_RESULT
{
} NSL_RESULT;
/* LDAP bind password security type */
typedef enum NS_PASSWD_TYPE {
NS_PW_INSECURE = 0,
/*
* Information needed to update a name service.
* Currently only used for ldap.
*/
struct ns_cred {
char *binddn;
char *passwd;
char *host;
};
/* LDAP specific NS Data */
typedef struct NS_LDAPDATA {
} NS_LDAPDATA;
/* Printer Object structure */
struct ns_printer {
};
extern ns_printer_t *ns_printer_get_name(const char *, const char *);
extern ns_printer_t **ns_printer_get_list(const char *);
extern int ns_printer_put(const ns_printer_t *);
extern void ns_printer_destroy(ns_printer_t *);
extern int setprinterentry(int, char *);
extern int endprinterentry();
extern int getprinterentry(char *, int, char *);
extern int getprinterbyname(char *, char *, int, char *);
extern char *_cvt_printer_to_entry(ns_printer_t *, char *, int);
extern ns_printer_t *_cvt_nss_entry_to_printer(char *, char *);
extern ns_printer_t *posix_name(const char *);
extern void *ns_get_value(const char *, const ns_printer_t *);
extern char *ns_get_value_string(const char *, const ns_printer_t *);
extern int ns_set_value(const char *, const void *, ns_printer_t *);
extern int ns_set_value_from_string(const char *, const char *,
ns_printer_t *);
extern ns_kvp_t *ns_kvp_create(const char *, const char *);
/* for BSD bindings only */
extern ns_bsd_addr_t *ns_bsd_addr_get_default();
extern ns_bsd_addr_t **ns_bsd_addr_get_all(int);
extern ns_bsd_addr_t **ns_bsd_addr_get_list(int);
/* others */
extern int ns_printer_match_name(ns_printer_t *, const char *);
extern char *ns_printer_name_list(const ns_printer_t *);
extern char *value_to_string(const char *, void *);
extern void *string_to_value(const char *, char *);
extern char *normalize_ns_name(char *);
extern char *strncat_escaped(char *, char *, int, char *);
#ifdef __cplusplus
}
#endif
#endif /* _NS_H */