Diff for /src/include/rpcsvc/nislib.h between versions 1.1 and 1.2

version 1.1, 2003/06/17 02:50:27 version 1.2, 2004/02/25 15:12:54
Line 25 Line 25
  * Sun Microsystems, Inc.   * Sun Microsystems, Inc.
  * 2550 Garcia Avenue   * 2550 Garcia Avenue
  * Mountain View, California  94043   * Mountain View, California  94043
    *
    * $DragonFly$
  */   */
   
 /*  /*
Line 42 Line 44
   
 /* From: #pragma ident  "@(#)nislib.h   1.16    94/05/03 SMI" */  /* From: #pragma ident  "@(#)nislib.h   1.16    94/05/03 SMI" */
   
#ifdef __cplusplus#include <sys/cdefs.h>
extern "C" {
#endif#define NUL '\0'
   
 struct signature {  struct signature {
         int signature_len;          int signature_len;
         char *signature_val;          char *signature_val;
 };  };
   
#ifdef __STDC____BEGIN_DECLS
extern void nis_freeresult(nis_result *); 
extern nis_result * nis_lookup(nis_name, u_long); 
extern nis_result * nis_list(nis_name, u_long, 
        int (*)(nis_name, nis_object *, void *), void *); 
extern nis_result * nis_add(nis_name, nis_object *); 
extern nis_result * nis_remove(nis_name, nis_object *); 
extern nis_result * nis_modify(nis_name, nis_object *); 
 
extern nis_result * nis_add_entry(nis_name, nis_object *, u_long); 
extern nis_result * nis_remove_entry(nis_name, nis_object *, u_long); 
extern nis_result * nis_modify_entry(nis_name, nis_object *, u_long); 
extern nis_result * nis_first_entry(nis_name); 
extern nis_result * nis_next_entry(nis_name, netobj *); 
 
extern nis_error nis_mkdir(nis_name, nis_server *); 
extern nis_error nis_rmdir(nis_name, nis_server *); 
extern name_pos nis_dir_cmp(nis_name, nis_name); 
 
extern nis_name * nis_getnames(nis_name); 
extern void nis_freenames(nis_name *); 
extern nis_name nis_domain_of(nis_name); 
extern nis_name nis_leaf_of(nis_name); 
extern nis_name nis_leaf_of_r(const nis_name, char *, size_t); 
extern nis_name nis_name_of(nis_name); 
extern nis_name nis_local_group(void); 
extern nis_name nis_local_directory(void); 
extern nis_name nis_local_principal(void); 
extern nis_name nis_local_host(void); 
 
extern void nis_destroy_object(nis_object *); 
extern nis_object * nis_clone_object(nis_object *, nis_object *); 
extern void nis_print_object(nis_object *); 
 
extern char * nis_sperrno(nis_error); 
extern void nis_perror(nis_error, char *); 
extern char * nis_sperror(nis_error, char *); 
extern void nis_lerror(nis_error, char *); 
 
extern void nis_print_group_entry(nis_name); 
extern bool_t nis_ismember(nis_name, nis_name); 
extern nis_error nis_creategroup(nis_name, u_long); 
extern nis_error nis_destroygroup(nis_name); 
extern nis_error nis_addmember(nis_name, nis_name); 
extern nis_error nis_removemember(nis_name, nis_name); 
extern nis_error nis_verifygroup(nis_name); 
 
extern void nis_freeservlist(nis_server **); 
extern nis_server ** nis_getservlist(nis_name); 
extern nis_error nis_stats(nis_server *, nis_tag *, int, nis_tag **); 
extern nis_error nis_servstate(nis_server *, nis_tag *, int, nis_tag **); 
extern void nis_freetags(nis_tag *, int); 
   
extern nis_result * nis_checkpoint(nis_name);void             nis_freeresult(nis_result *);
extern void nis_ping(nis_name, u_long, nis_object *);nis_result  *nis_lookup(nis_name, u_long);
 nis_result  *nis_list(nis_name, u_long,
                           int (*)(nis_name, nis_object *, void *), void *);
 nis_result      *nis_add(nis_name, nis_object *);
 nis_result      *nis_remove(nis_name, nis_object *);
 nis_result      *nis_modify(nis_name, nis_object *);
 
 nis_result      *nis_add_entry(nis_name, nis_object *, u_long);
 nis_result      *nis_remove_entry(nis_name, nis_object *, u_long);
 nis_result      *nis_modify_entry(nis_name, nis_object *, u_long);
 nis_result      *nis_first_entry(nis_name);
 nis_result      *nis_next_entry(nis_name, netobj *);
 
 nis_error        nis_mkdir(nis_name, nis_server *);
 nis_error        nis_rmdir(nis_name, nis_server *);
 name_pos         nis_dir_cmp(nis_name, nis_name);
 
 nis_name        *nis_getnames(nis_name);
 void             nis_freenames(nis_name *);
 nis_name         nis_domain_of(nis_name);
 nis_name         nis_leaf_of(nis_name);
 nis_name         nis_leaf_of_r(const nis_name, char *, size_t);
 nis_name         nis_name_of(nis_name);
 nis_name         nis_local_group(void);
 nis_name         nis_local_directory(void);
 nis_name         nis_local_principal(void);
 nis_name         nis_local_host(void);
 
 void             nis_destroy_object(nis_object *);
 nis_object      *nis_clone_object(nis_object *, nis_object *);
 void             nis_print_object(nis_object *);
 
 char            *nis_sperrno(nis_error);
 void             nis_perror(nis_error, char *);
 char            *nis_sperror(nis_error, char *);
 void             nis_lerror(nis_error, char *);
 
 void             nis_print_group_entry(nis_name);
 bool_t           nis_ismember(nis_name, nis_name);
 nis_error        nis_creategroup(nis_name, u_long);
 nis_error        nis_destroygroup(nis_name);
 nis_error        nis_addmember(nis_name, nis_name);
 nis_error        nis_removemember(nis_name, nis_name);
 nis_error        nis_verifygroup(nis_name);
 
 void             nis_freeservlist(nis_server **);
 nis_server *    *nis_getservlist(nis_name);
 nis_error        nis_stats(nis_server *, nis_tag *, int, nis_tag **);
 nis_error        nis_servstate(nis_server *, nis_tag *, int, nis_tag **);
 void             nis_freetags(nis_tag *, int);
   
/*nis_result       *nis_checkpoint(nis_name);
 * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNALvoid             nis_ping(nis_name, u_long, nis_object *);
 * TO NIS+ AND SHOULD NOT BE USED BY ANY APPLICATION PROGRAM. 
 * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE. 
 * SO, PLEASE DO NOT USE THEM.  YOU ARE WARNED!!!! 
 */ 
 
extern char ** __break_name(nis_name, int *); 
extern int __name_distance(char **, char **); 
extern nis_result * nis_make_error(nis_error, u_long, u_long, u_long, u_long); 
extern nis_attr * __cvt2attr(int *, char **); 
extern void nis_free_request(ib_request *); 
extern nis_error nis_get_request(nis_name, nis_object *, netobj*, ib_request*); 
extern nis_object * nis_read_obj(char *); 
extern int nis_write_obj(char *, nis_object *); 
extern int nis_in_table(nis_name, NIS_HASH_TABLE *, int *); 
extern int nis_insert_item(NIS_HASH_ITEM *, NIS_HASH_TABLE *); 
extern NIS_HASH_ITEM * nis_find_item(nis_name, NIS_HASH_TABLE *); 
extern NIS_HASH_ITEM * nis_remove_item(nis_name, NIS_HASH_TABLE *); 
extern void nis_insert_name(nis_name, NIS_HASH_TABLE *); 
extern void nis_remove_name(nis_name, NIS_HASH_TABLE *); 
extern CLIENT * nis_make_rpchandle(nis_server *, int, u_long, u_long, u_long, 
                                                                int, int); 
extern void * nis_get_static_storage(struct nis_sdata *, u_long, u_long); 
extern char * nis_data(char *); 
extern void nis_print_rights(u_long); 
extern void nis_print_directory(directory_obj *); 
extern void nis_print_group(group_obj *); 
extern void nis_print_table(table_obj *); 
extern void nis_print_link(link_obj *); 
extern void nis_print_entry(entry_obj *); 
extern nis_object * nis_get_object(char *, char *, char *, u_long, u_long, 
                                                                    zotypes); 
extern nis_server * __nis_init_callback(CLIENT *, 
    int (*)(nis_name, nis_object *, void *), void *); 
extern int nis_getdtblsize(void); 
extern int __nis_run_callback(netobj *, u_long, struct timeval *, CLIENT *); 
 
extern log_result *nis_dumplog(nis_server *, nis_name, u_long); 
extern log_result *nis_dump(nis_server *, nis_name, 
    int (*)(nis_name, nis_object *, void *)); 
 
extern bool_t __do_ismember(nis_name, nis_name, 
    nis_result *(*)(nis_name, u_long)); 
extern nis_name __nis_map_group(nis_name); 
extern nis_name __nis_map_group_r(nis_name, char*, size_t); 
 
extern nis_error __nis_CacheBind(char *, directory_obj *); 
extern nis_error __nis_CacheSearch(char *, directory_obj *); 
extern bool_t __nis_CacheRemoveEntry(directory_obj *); 
extern void __nis_CacheRestart(void); 
extern void __nis_CachePrint(void); 
extern void __nis_CacheDumpStatistics(void); 
extern bool_t writeColdStartFile(directory_obj *); 
 
extern CLIENT * __get_ti_clnt(char *, CLIENT *, char **, pid_t *); 
extern int __strcmp_case_insens(char *, char *); 
extern int __strncmp_case_insens(char *, char *); 
 
extern fd_result * nis_finddirectory(directory_obj *, nis_name); 
extern int __start_clock(int); 
extern u_long __stop_clock(int); 
 
/* 
 * This particular function is part of the FreeBSD NIS+ implementation 
 * only. Ideally it should be somewhere else, but it is used by both 
 * rpc.nisd and nis_cachemgr, and there aren't that many headers common 
 * to both programs. 
 */ 
 
extern struct signature *__nis_calculate_encrypted_cksum(unsigned char *, unsigned int, char *, int); 
 
#else 
 
/* Non-prototype definitions (old fashioned C) */ 
 
extern void nis_freeresult(); 
extern nis_result * nis_lookup(); 
extern nis_result * nis_list(); 
extern nis_result * nis_add(); 
extern nis_result * nis_remove(); 
extern nis_result * nis_modify(); 
 
extern nis_result * nis_add_entry(); 
extern nis_result * nis_remove_entry(); 
extern nis_result * nis_modify_entry(); 
extern nis_result * nis_first_entry(); 
extern nis_result * nis_next_entry(); 
 
extern nis_error nis_mkdir(); 
extern nis_error nis_rmdir(); 
extern name_pos nis_dir_cmp(); 
 
extern nis_name *nis_getnames(); 
extern void nis_freenames(); 
extern nis_name nis_domain_of(); 
extern nis_name nis_leaf_of(); 
extern nis_name nis_leaf_of_r(); 
extern nis_name nis_name_of(); 
extern nis_name nis_local_group(); 
extern nis_name nis_local_directory(); 
extern nis_name nis_local_principal(); 
extern nis_name nis_local_host(); 
 
extern void nis_destroy_object(); 
extern nis_object * nis_clone_object(); 
extern void nis_print_object(); 
 
extern char * nis_sperrno(); 
extern void nis_perror(); 
extern char * nis_sperror(); 
extern void nis_lerror(); 
 
extern void nis_print_group_entry(); 
extern bool_t nis_ismember(); 
extern nis_error nis_creategroup(); 
extern nis_error nis_destroygroup(); 
extern nis_error nis_addmember(); 
extern nis_error nis_removemember(); 
extern nis_error nis_verifygroup(); 
 
extern void nis_freeservlist(); 
extern nis_server ** nis_getservlist(); 
extern nis_error nis_stats(); 
extern nis_error nis_servstate(); 
extern void nis_freetags(); 
 
extern nis_result * nis_checkpoint(); 
extern void nis_ping(); 
   
 /*  /*
  * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNAL   * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNAL
Line 243  extern void nis_ping(); Line 116  extern void nis_ping();
  * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE.   * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE.
  * SO, PLEASE DO NOT USE THEM.  YOU ARE WARNED!!!!   * SO, PLEASE DO NOT USE THEM.  YOU ARE WARNED!!!!
  */   */
extern char ** __break_name();
extern int __name_distance();char            **__break_name(nis_name, int *);
extern nis_result * nis_make_error();int              __name_distance(char **, char **);
extern nis_attr * __cvt2attr();nis_result      *nis_make_error(nis_error, u_long, u_long, u_long, u_long);
extern void nis_free_request();nis_attr        *__cvt2attr(int *, char **);
extern nis_error nis_get_request();void            nis_free_request(ib_request *);
extern nis_object * nis_read_obj();nis_error        nis_get_request(nis_name, nis_object *, netobj*, ib_request*);
extern int nis_write_obj();nis_object      *nis_read_obj(char *);
extern int nis_in_table();int              nis_write_obj(char *, nis_object *);
extern int nis_insert_item();int              nis_in_table(nis_name, NIS_HASH_TABLE *, int *);
extern NIS_HASH_ITEM * nis_find_item();int              nis_insert_item(NIS_HASH_ITEM *, NIS_HASH_TABLE *);
extern NIS_HASH_ITEM * nis_remove_item();NIS_HASH_ITEM   *nis_find_item(nis_name, NIS_HASH_TABLE *);
extern void nis_insert_name();NIS_HASH_ITEM   *nis_remove_item(nis_name, NIS_HASH_TABLE *);
extern void nis_remove_name();void             nis_insert_name(nis_name, NIS_HASH_TABLE *);
extern CLIENT * nis_make_rpchandle();void             nis_remove_name(nis_name, NIS_HASH_TABLE *);
extern void * nis_get_static_storage();CLIENT           *nis_make_rpchandle(nis_server *, int, u_long, u_long, u_long,
extern char * nis_data();                                     int, int);
void            *nis_get_static_storage(struct nis_sdata *, u_long, u_long);
extern void nis_print_rights();char            *nis_data(char *);
extern void nis_print_directory();void             nis_print_rights(u_long);
extern void nis_print_group();void             nis_print_directory(directory_obj *);
extern void nis_print_table();void             nis_print_group(group_obj *);
extern void nis_print_link();void             nis_print_table(table_obj *);
extern void nis_print_entry();void             nis_print_link(link_obj *);
extern nis_object * nis_get_object();void             nis_print_entry(entry_obj *);
nis_object      *nis_get_object(char *, char *, char *, u_long, u_long,
extern nis_server * __nis_init_callback();                                zotypes);
extern int nis_getdtblsize();nis_server      *__nis_init_callback(CLIENT *,
extern int __nis_run_callback();                        int (*)(nis_name, nis_object *, void *), void *);
int              nis_getdtblsize(void);
extern log_result * nis_dump();int              __nis_run_callback(netobj *, u_long, struct timeval *, CLIENT *);
extern log_result * nis_dumplog();
log_result      *nis_dumplog(nis_server *, nis_name, u_long);
extern bool_t __do_ismember();log_result      *nis_dump(nis_server *, nis_name,
extern nis_name __nis_map_group();                          int (*)(nis_name, nis_object *, void *));
extern nis_name __nis_map_group_r();
bool_t           __do_ismember(nis_name, nis_name,
                               nis_result *(*)(nis_name, u_long));
extern nis_error __nis_CacheBind();nis_name         __nis_map_group(nis_name);
extern directory_obj * __nis_CacheSearch();nis_name         __nis_map_group_r(nis_name, char*, size_t);
extern bool_t __nis_CacheRemoveEntry();
extern void __nis_CacheRestart();nis_error        __nis_CacheBind(char *, directory_obj *);
extern void __nis_CachePrint();nis_error        __nis_CacheSearch(char *, directory_obj *);
extern void __nis_CacheDumpStatistics();bool_t           __nis_CacheRemoveEntry(directory_obj *);
extern bool_t writeColdStartFile();void             __nis_CacheRestart(void);
void             __nis_CachePrint(void);
extern CLIENT * __get_ti_clnt();void             __nis_CacheDumpStatistics(void);
extern int __strcmp_case_insens();bool_t           writeColdStartFile(directory_obj *);
extern int __strncmp_case_insens();
CLIENT          *__get_ti_clnt(char *, CLIENT *, char **, pid_t *);
extern fd_result * nis_finddirectory();int              __strcmp_case_insens(char *, char *);
extern int __start_clock();int              __strncmp_case_insens(char *, char *);
extern u_long __stop_clock();
 fd_result       *nis_finddirectory(directory_obj *, nis_name);
 int              __start_clock(int);
 u_long           __stop_clock(int);
   
 /*  /*
  * This particular function is part of the FreeBSD NIS+ implementation   * This particular function is part of the FreeBSD NIS+ implementation
Line 304  extern u_long __stop_clock(); Line 180  extern u_long __stop_clock();
  * to both programs.   * to both programs.
  */   */
   
extern struct signature *__nis_calculate_encrypted_cksum();struct signature *__nis_calculate_encrypted_cksum(unsigned char *,
                                                  unsigned int, char *, int);
#endif 
 
#define NUL '\0' 
   
#ifdef  __cplusplus__END_DECLS
} 
#endif 
   
 #endif  /* _RPCSVC_NISLIB_H */  #endif  /* _RPCSVC_NISLIB_H */

Removed from v.1.1  
changed lines
  Added in v.1.2