nislib.h
001: 
002: 
003: 
004: <kukuk@suse.de>
005: 
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: #ifndef __RPCSVC_NISLIB_H__
022: #define __RPCSVC_NISLIB_H__
023: 
024: #include <features.h>
025: 
026: __BEGIN_DECLS
027: 
028: typedef const char *const_nis_name;
029: 
030: 
031: 
032: 
033: 
034: 
035: 
036: 
037: 
038: 
039: 
040: 
041: 
042: 
043: 
044: 
045: 
046: 
047: 
048: 
049: 
050: 
051: 
052: 
053: 
054: 
055: 
056: extern nis_result *nis_lookup (const_nis_name name, unsigned int flags)
057:      __THROW;
058: extern nis_result *nis_add (const_nis_name name, const nis_object *obj)
059:      __THROW;
060: extern nis_result *nis_remove (const_nis_name name,
061:                                const nis_object *obj) __THROW;
062: extern nis_result *nis_modify (const_nis_name name,
063:                                const nis_object *obj) __THROW;
064: 
065: 
066: 
067: 
068: 
069: 
070: 
071: 
072: 
073: 
074: 
075: 
076: 
077: 
078: 
079: 
080: 
081: 
082: 
083: 
084: 
085: 
086: 
087: 
088: 
089: 
090: 
091: 
092: 
093: 
094: 
095: 
096: 
097: 
098: 
099: 
100: 
101: 
102: 
103: 
104: 
105: 
106: 
107: 
108: 
109: 
110: 
111: 
112: 
113: 
114: 
115: extern nis_result *nis_list (const_nis_name __name, unsigned int __flags,
116:                              int (*__callback)(const_nis_name __table_name,
117:                                                const nis_object *__obj,
118:                                                const void *__userdata),
119:                              const void *__userdata) __THROW;
120: extern nis_result *nis_add_entry (const_nis_name __table_name,
121:                                   const nis_object *__obj,
122:                                   unsigned int __flags) __THROW;
123: extern nis_result *nis_modify_entry (const_nis_name __name,
124:                                      const nis_object *__obj,
125:                                      unsigned int __flags) __THROW;
126: extern nis_result *nis_remove_entry (const_nis_name __table_name,
127:                                      const nis_object *__obj,
128:                                      unsigned int __flags) __THROW;
129: extern nis_result *nis_first_entry (const_nis_name __table_name) __THROW;
130: extern nis_result *nis_next_entry (const_nis_name __table_name,
131:                                    const netobj *__cookie) __THROW;
132: 
133: 
134: 
135: extern nis_error nis_mkdir (const_nis_name __dirname,
136:                             const nis_server *__machine) __THROW;
137: extern nis_error nis_rmdir (const_nis_name __dirname,
138:                             const nis_server *__machine) __THROW;
139: extern nis_error nis_servstate (const nis_server *__machine,
140:                                 const nis_tag *__tags, int __numtags,
141:                                 nis_tag **__result) __THROW;
142: extern nis_error nis_stats (const nis_server *__machine,
143:                             const nis_tag *__tags, int __numtags,
144:                             nis_tag **__result) __THROW;
145: extern void nis_freetags (nis_tag *__tags, int __numtags) __THROW;
146: extern nis_server **nis_getservlist (const_nis_name __dirname) __THROW;
147: extern void nis_freeservlist (nis_server **__machines) __THROW;
148: 
149: 
150: 
151: 
152: extern nis_name nis_leaf_of (const_nis_name __name) __THROW;
153: extern nis_name nis_leaf_of_r (const_nis_name __name, char *__buffer,
154:                                size_t __buflen) __THROW;
155: extern nis_name nis_name_of (const_nis_name __name) __THROW;
156: extern nis_name nis_name_of_r (const_nis_name __name, char *__buffer,
157:                                size_t __buflen) __THROW;
158: extern nis_name nis_domain_of (const_nis_name __name) __THROW;
159: extern nis_name nis_domain_of_r (const_nis_name __name, char *__buffer,
160:                                  size_t __buflen) __THROW;
161: extern nis_name *nis_getnames (const_nis_name __name) __THROW;
162: extern void nis_freenames (nis_name *__namelist) __THROW;
163: extern name_pos nis_dir_cmp (const_nis_name __n1, const_nis_name __n2) __THROW;
164: extern nis_object *nis_clone_object (const nis_object *__src,
165:                                      nis_object *__dest) __THROW;
166: extern void nis_destroy_object (nis_object *__obj) __THROW;
167: extern void nis_print_object (const nis_object *__obj) __THROW;
168: 
169: 
170: 
171: 
172: extern nis_name nis_local_group (void) __THROW;
173: extern nis_name nis_local_directory (void) __THROW;
174: extern nis_name nis_local_principal (void) __THROW;
175: extern nis_name nis_local_host (void) __THROW;
176: 
177: 
178: 
179: 
180: extern const char *nis_sperrno (const nis_error __status) __THROW;
181: extern void nis_perror (const nis_error __status, const char *__label) __THROW;
182: extern void nis_lerror (const nis_error __status, const char *__label) __THROW;
183: extern char *nis_sperror (const nis_error status, const char *__label) __THROW;
184: extern char *nis_sperror_r (const nis_error __status, const char *__label,
185:                             char *__buffer, size_t __buflen) __THROW;
186: 
187: 
188: 
189: extern bool_t nis_ismember (const_nis_name __principal,
190:                             const_nis_name __group) __THROW;
191: extern nis_error nis_addmember (const_nis_name __member,
192:                                 const_nis_name __group) __THROW;
193: extern nis_error nis_removemember (const_nis_name __member,
194:                                    const_nis_name __group) __THROW;
195: extern nis_error nis_creategroup (const_nis_name __group,
196:                                   unsigned int __flags) __THROW;
197: extern nis_error nis_destroygroup (const_nis_name __group) __THROW;
198: extern void nis_print_group_entry (const_nis_name __group) __THROW;
199: extern nis_error nis_verifygroup (const_nis_name __group) __THROW;
200: 
201: 
202: 
203: 
204: extern void nis_ping (const_nis_name __dirname, uint32_t __utime,
205:                       const nis_object *__dirobj) __THROW;
206: extern nis_result *nis_checkpoint (const_nis_name __dirname) __THROW;
207: 
208: 
209: 
210: 
211: extern void nis_print_result (const nis_result *__result) __THROW;
212: extern void nis_print_rights (unsigned int __rights) __THROW;
213: extern void nis_print_directory (const directory_obj *__dirobj) __THROW;
214: extern void nis_print_group (const group_obj *__grpobj) __THROW;
215: extern void nis_print_table (const table_obj *__tblobj) __THROW;
216: extern void nis_print_link (const link_obj *__lnkobj) __THROW;
217: extern void nis_print_entry (const entry_obj *__enobj) __THROW;
218: 
219: 
220: 
221: 
222: extern directory_obj *readColdStartFile (void) __THROW;
223: extern bool_t writeColdStartFile (const directory_obj *__dirobj) __THROW;
224: extern nis_object *nis_read_obj (const char *__obj) __THROW;
225: extern bool_t nis_write_obj (const char *__file, const nis_object *__obj) __THROW;
226: 
227: 
228: 
229: 
230: extern directory_obj *nis_clone_directory (const directory_obj *__src,
231:                                            directory_obj *__dest) __THROW;
232: extern nis_result *nis_clone_result (const nis_result *__src,
233:                                      nis_result *__dest) __THROW;
234: 
235: 
236: extern void nis_freeresult (nis_result *__result) __THROW;
237: 
238: extern void nis_free_request (ib_request *__req) __THROW;
239: extern void nis_free_directory (directory_obj *__dirobj) __THROW;
240: extern void nis_free_object (nis_object *__obj) __THROW;
241: 
242: 
243: extern nis_name __nis_default_owner (char *) __THROW;
244: extern nis_name __nis_default_group (char *) __THROW;
245: extern uint32_t __nis_default_ttl (char *) __THROW;
246: extern unsigned int __nis_default_access (char *, unsigned int) __THROW;
247: extern fd_result *__nis_finddirectory (directory_obj *, const_nis_name) __THROW;
248: extern void __free_fdresult (fd_result *) __THROW;
249: extern uint32_t __nis_hash (const void *__keyarg, size_t __len) __THROW;
250: 
251: 
252: extern int __nis_lock_cache (void) __THROW;
253: extern int __nis_unlock_cache (void) __THROW;
254: 
255: 
256: #if defined (NIS_INTERNAL) || defined (_LIBC)
257: 
258: struct dir_binding
259: {
260:   CLIENT *clnt;                  
261:   nis_server *server_val;        
262:   unsigned int server_len;       
263:   unsigned int server_used;      
264:   unsigned int current_ep;       
265:   unsigned int trys;             
266:   unsigned int class;            
267:   bool_t master_only;            
268:   bool_t use_auth;               
269:   bool_t use_udp;                
270:   struct sockaddr_in addr;       
271:   int socket;                    
272: };
273: typedef struct dir_binding dir_binding;
274: 
275: extern nis_error __nisbind_create (dir_binding *, const nis_server *,
276:                                    unsigned int, unsigned int, unsigned int,
277:                                    unsigned int) __THROW;
278: extern nis_error __nisbind_connect (dir_binding *) __THROW;
279: extern nis_error __nisbind_next (dir_binding *) __THROW;
280: extern void __nisbind_destroy (dir_binding *) __THROW;
281: extern nis_error __nisfind_server (const_nis_name, int, directory_obj **,
282:                                    dir_binding *, unsigned int) __THROW;
283: 
284: #endif
285: 
286: __END_DECLS
287: 
288: #endif  
289: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved