printing: Add new parameter "cups timeout".
[jra/samba/.git] / source3 / include / proto.h
1 /*
2  * Unix SMB/CIFS implementation.
3  * collected prototypes header
4  *
5  * frozen from "make proto" in May 2008
6  *
7  * Copyright (C) Michael Adam 2008
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, see <http://www.gnu.org/licenses/>.
21  */
22
23 #ifndef _PROTO_H_
24 #define _PROTO_H_
25
26
27 /* The following definitions come from auth/auth.c  */
28
29 NTSTATUS smb_register_auth(int version, const char *name, auth_init_function init);
30 bool load_auth_module(struct auth_context *auth_context, 
31                       const char *module, auth_methods **ret) ;
32 NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) ;
33 NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8]) ;
34
35 /* The following definitions come from auth/auth_builtin.c  */
36
37 NTSTATUS auth_builtin_init(void);
38
39 /* The following definitions come from auth/auth_compat.c  */
40
41 NTSTATUS check_plaintext_password(const char *smb_name, DATA_BLOB plaintext_password, auth_serversupplied_info **server_info);
42 bool password_ok(const char *smb_name, DATA_BLOB password_blob);
43
44 /* The following definitions come from auth/auth_domain.c  */
45
46 NTSTATUS auth_domain_init(void) ;
47
48 /* The following definitions come from auth/auth_ntlmssp.c  */
49
50 NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state);
51 void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state);
52 NTSTATUS auth_ntlmssp_update(AUTH_NTLMSSP_STATE *auth_ntlmssp_state, 
53                              const DATA_BLOB request, DATA_BLOB *reply) ;
54
55 /* The following definitions come from auth/auth_sam.c  */
56
57 NTSTATUS auth_sam_init(void);
58
59 /* The following definitions come from auth/auth_server.c  */
60
61 NTSTATUS auth_server_init(void);
62
63 /* The following definitions come from auth/auth_unix.c  */
64
65 NTSTATUS auth_unix_init(void);
66
67 /* The following definitions come from auth/auth_util.c  */
68
69 NTSTATUS make_user_info_map(auth_usersupplied_info **user_info, 
70                             const char *smb_name, 
71                             const char *client_domain, 
72                             const char *wksta_name, 
73                             DATA_BLOB *lm_pwd, DATA_BLOB *nt_pwd,
74                             DATA_BLOB *lm_interactive_pwd, DATA_BLOB *nt_interactive_pwd,
75                             DATA_BLOB *plaintext, 
76                             bool encrypted);
77 bool make_user_info_netlogon_network(auth_usersupplied_info **user_info, 
78                                      const char *smb_name, 
79                                      const char *client_domain, 
80                                      const char *wksta_name, 
81                                      uint32 logon_parameters,
82                                      const uchar *lm_network_pwd,
83                                      int lm_pwd_len,
84                                      const uchar *nt_network_pwd,
85                                      int nt_pwd_len);
86 bool make_user_info_netlogon_interactive(auth_usersupplied_info **user_info, 
87                                          const char *smb_name, 
88                                          const char *client_domain, 
89                                          const char *wksta_name, 
90                                          uint32 logon_parameters,
91                                          const uchar chal[8], 
92                                          const uchar lm_interactive_pwd[16], 
93                                          const uchar nt_interactive_pwd[16], 
94                                          const uchar *dc_sess_key);
95 bool make_user_info_for_reply(auth_usersupplied_info **user_info, 
96                               const char *smb_name, 
97                               const char *client_domain,
98                               const uint8 chal[8],
99                               DATA_BLOB plaintext_password);
100 NTSTATUS make_user_info_for_reply_enc(auth_usersupplied_info **user_info, 
101                                       const char *smb_name,
102                                       const char *client_domain, 
103                                       DATA_BLOB lm_resp, DATA_BLOB nt_resp);
104 bool make_user_info_guest(auth_usersupplied_info **user_info) ;
105 NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, 
106                               struct samu *sampass);
107 NTSTATUS create_local_token(auth_serversupplied_info *server_info);
108 NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
109                                     bool is_guest,
110                                     uid_t *uid, gid_t *gid,
111                                     char **found_username,
112                                     struct nt_user_token **token);
113 bool user_in_group_sid(const char *username, const DOM_SID *group_sid);
114 bool user_in_group(const char *username, const char *groupname);
115 NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info, 
116                              char *unix_username,
117                              struct passwd *pwd);
118 NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
119                                        const char *username,
120                                        bool is_guest,
121                                        struct auth_serversupplied_info **presult);
122 struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
123                                                  auth_serversupplied_info *src);
124 bool init_guest_info(void);
125 bool server_info_set_session_key(struct auth_serversupplied_info *info,
126                                  DATA_BLOB session_key);
127 NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
128                                 auth_serversupplied_info **server_info);
129 bool copy_current_user(struct current_user *dst, struct current_user *src);
130 struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
131                              fstring save_username, bool create );
132 NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, 
133                                 const char *sent_nt_username,
134                                 const char *domain,
135                                 auth_serversupplied_info **server_info, 
136                                 struct netr_SamInfo3 *info3);
137 NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
138                                           const char *sent_nt_username,
139                                           const char *domain,
140                                           const struct wbcAuthUserInfo *info,
141                                           auth_serversupplied_info **server_info);
142 void free_user_info(auth_usersupplied_info **user_info);
143 bool make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method) ;
144 bool is_trusted_domain(const char* dom_name);
145
146 /* The following definitions come from auth/auth_winbind.c  */
147
148 NTSTATUS auth_winbind_init(void);
149
150 /* The following definitions come from auth/pampass.c  */
151
152 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
153 bool smb_pam_close_session(char *user, char *tty, char *rhost);
154 NTSTATUS smb_pam_accountcheck(const char * user);
155 NTSTATUS smb_pam_passcheck(const char * user, const char * password);
156 bool smb_pam_passchange(const char * user, const char * oldpassword, const char * newpassword);
157 NTSTATUS smb_pam_accountcheck(const char * user);
158 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
159 bool smb_pam_close_session(char *in_user, char *tty, char *rhost);
160
161 /* The following definitions come from auth/pass_check.c  */
162
163 void dfs_unlogin(void);
164 NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *password, 
165                     int pwlen, bool (*fn) (const char *, const char *), bool run_cracker);
166
167 /* The following definitions come from auth/token_util.c  */
168
169 bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token );
170 bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid );
171 NT_USER_TOKEN *get_root_nt_token( void );
172 NTSTATUS add_aliases(const DOM_SID *domain_sid,
173                      struct nt_user_token *token);
174 NTSTATUS create_builtin_users(const DOM_SID *sid);
175 NTSTATUS create_builtin_administrators(const DOM_SID *sid);
176 struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
177                                             const DOM_SID *user_sid,
178                                             bool is_guest,
179                                             int num_groupsids,
180                                             const DOM_SID *groupsids);
181 void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
182 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
183                            int n_groups, gid_t *groups);
184
185 /* The following definitions come from groupdb/mapping.c  */
186
187 NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
188 bool get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map);
189 int smb_create_group(const char *unix_group, gid_t *new_gid);
190 int smb_delete_group(const char *unix_group);
191 int smb_set_primary_group(const char *unix_group, const char* unix_user);
192 int smb_add_user_group(const char *unix_group, const char *unix_user);
193 int smb_delete_user_group(const char *unix_group, const char *unix_user);
194 NTSTATUS pdb_default_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
195                                  DOM_SID sid);
196 NTSTATUS pdb_default_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
197                                  gid_t gid);
198 NTSTATUS pdb_default_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
199                                  const char *name);
200 NTSTATUS pdb_default_add_group_mapping_entry(struct pdb_methods *methods,
201                                                 GROUP_MAP *map);
202 NTSTATUS pdb_default_update_group_mapping_entry(struct pdb_methods *methods,
203                                                    GROUP_MAP *map);
204 NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
205                                                    DOM_SID sid);
206 NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
207                                            const DOM_SID *sid, enum lsa_SidType sid_name_use,
208                                            GROUP_MAP **pp_rmap, size_t *p_num_entries,
209                                            bool unix_only);
210 NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
211                                   const char *name, uint32 *rid);
212 NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods,
213                                   const DOM_SID *sid);
214 NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
215                                    const DOM_SID *sid,
216                                    struct acct_info *info);
217 NTSTATUS pdb_default_set_aliasinfo(struct pdb_methods *methods,
218                                    const DOM_SID *sid,
219                                    struct acct_info *info);
220 NTSTATUS pdb_default_add_aliasmem(struct pdb_methods *methods,
221                                   const DOM_SID *alias, const DOM_SID *member);
222 NTSTATUS pdb_default_del_aliasmem(struct pdb_methods *methods,
223                                   const DOM_SID *alias, const DOM_SID *member);
224 NTSTATUS pdb_default_enum_aliasmem(struct pdb_methods *methods,
225                                    const DOM_SID *alias, DOM_SID **pp_members,
226                                    size_t *p_num_members);
227 NTSTATUS pdb_default_alias_memberships(struct pdb_methods *methods,
228                                        TALLOC_CTX *mem_ctx,
229                                        const DOM_SID *domain_sid,
230                                        const DOM_SID *members,
231                                        size_t num_members,
232                                        uint32 **pp_alias_rids,
233                                        size_t *p_num_alias_rids);
234 NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
235                                  DOM_SID sid);
236 NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
237                                  gid_t gid);
238 NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
239                                  const char *name);
240 NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
241                                                 GROUP_MAP *map);
242 NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
243                                                    GROUP_MAP *map);
244 NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
245                                                    DOM_SID sid);
246 NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
247                                            enum lsa_SidType sid_name_use,
248                                            GROUP_MAP **rmap, size_t *num_entries,
249                                            bool unix_only);
250 bool pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info);
251 bool pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info);
252 NTSTATUS pdb_create_builtin_alias(uint32 rid);
253
254 /* The following definitions come from groupdb/mapping_ldb.c  */
255
256 const struct mapping_backend *groupdb_ldb_init(void);
257
258 /* The following definitions come from groupdb/mapping_tdb.c  */
259
260 const struct mapping_backend *groupdb_tdb_init(void);
261
262 /* The following definitions come from intl/lang_tdb.c  */
263
264 bool lang_tdb_init(const char *lang);
265 const char *lang_msg(const char *msgid);
266 void lang_msg_free(const char *msgstr);
267 char *lang_tdb_current(void);
268
269 /* The following definitions come from lib/access.c  */
270
271 bool client_match(const char *tok, const void *item);
272 bool list_match(const char **list,const void *item,
273                 bool (*match_fn)(const char *, const void *));
274 bool allow_access(const char **deny_list,
275                 const char **allow_list,
276                 const char *cname,
277                 const char *caddr);
278 bool check_access(int sock, const char **allow_list, const char **deny_list);
279
280 /* The following definitions come from lib/account_pol.c  */
281
282 void account_policy_names_list(const char ***names, int *num_names);
283 const char *decode_account_policy_name(int field);
284 const char *get_account_policy_attr(int field);
285 const char *account_policy_get_desc(int field);
286 int account_policy_name_to_fieldnum(const char *name);
287 bool account_policy_get_default(int account_policy, uint32 *val);
288 bool init_account_policy(void);
289 bool account_policy_get(int field, uint32 *value);
290 bool account_policy_set(int field, uint32 value);
291 bool cache_account_policy_set(int field, uint32 value);
292 bool cache_account_policy_get(int field, uint32 *value);
293 struct db_context *get_account_pol_db( void );
294
295 /* The following definitions come from lib/adt_tree.c  */
296
297
298 /* The following definitions come from lib/afs.c  */
299
300 char *afs_createtoken_str(const char *username, const char *cell);
301 bool afs_login(connection_struct *conn);
302 bool afs_login(connection_struct *conn);
303 char *afs_createtoken_str(const char *username, const char *cell);
304
305 /* The following definitions come from lib/afs_settoken.c  */
306
307 int afs_syscall( int subcall,
308           char * path,
309           int cmd,
310           char * cmarg,
311           int follow);
312 bool afs_settoken_str(const char *token_string);
313 bool afs_settoken_str(const char *token_string);
314
315 /* The following definitions come from lib/arc4.c  */
316
317 void smb_arc4_init(unsigned char arc4_state_out[258], const unsigned char *key, size_t keylen);
318 void smb_arc4_crypt(unsigned char arc4_state_inout[258], unsigned char *data, size_t len);
319
320 /* The following definitions come from lib/audit.c  */
321
322 const char *audit_category_str(uint32 category);
323 const char *audit_param_str(uint32 category);
324 const char *audit_description_str(uint32 category);
325 bool get_audit_category_from_param(const char *param, uint32 *audit_category);
326 const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
327
328 /* The following definitions come from lib/bitmap.c  */
329
330 struct bitmap *bitmap_allocate(int n);
331 void bitmap_free(struct bitmap *bm);
332 struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
333 int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
334 bool bitmap_set(struct bitmap *bm, unsigned i);
335 bool bitmap_clear(struct bitmap *bm, unsigned i);
336 bool bitmap_query(struct bitmap *bm, unsigned i);
337 int bitmap_find(struct bitmap *bm, unsigned ofs);
338
339 /* The following definitions come from lib/charcnv.c  */
340
341 char lp_failed_convert_char(void);
342 void lazy_initialize_conv(void);
343 void gfree_charcnv(void);
344 void init_iconv(void);
345 size_t convert_string(charset_t from, charset_t to,
346                       void const *src, size_t srclen, 
347                       void *dest, size_t destlen, bool allow_bad_conv);
348 bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
349                              void const *src, size_t srclen, void *dst,
350                              size_t *converted_size, bool allow_bad_conv);
351 bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to,
352                            void const *src, size_t srclen, void *dst,
353                            size_t *converted_size, bool allow_bad_conv);
354 size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
355 char *strdup_upper(const char *s);
356 char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s);
357 size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen);
358 char *strdup_lower(const char *s);
359 char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s);
360 size_t ucs2_align(const void *base_ptr, const void *p, int flags);
361 size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags);
362 size_t push_ascii_fstring(void *dest, const char *src);
363 size_t push_ascii_nstring(void *dest, const char *src);
364 bool push_ascii_allocate(char **dest, const char *src, size_t *converted_size);
365 size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
366 size_t pull_ascii_fstring(char *dest, const void *src);
367 size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src);
368 size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_len, int flags);
369 bool push_ucs2_allocate(smb_ucs2_t **dest, const char *src,
370                         size_t *converted_size);
371 size_t push_utf8_fstring(void *dest, const char *src);
372 bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
373                       size_t *converted_size);
374 bool push_utf8_allocate(char **dest, const char *src, size_t *converted_size);
375 size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
376 size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
377                         const void *base_ptr,
378                         char **ppdest,
379                         const void *src,
380                         size_t src_len,
381                         int flags);
382 size_t pull_ucs2_fstring(char *dest, const void *src);
383 bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
384                       size_t *converted_size);
385 bool pull_ucs2_allocate(char **dest, const smb_ucs2_t *src,
386                         size_t *converted_size);
387 bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
388                       size_t *converted_size);
389 bool pull_utf8_allocate(char **dest, const char *src, size_t *converted_size);
390 bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src,
391                       size_t *converted_size);
392 bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
393                        size_t *converted_size);
394 size_t push_string_fn(const char *function, unsigned int line,
395                       const void *base_ptr, uint16 flags2,
396                       void *dest, const char *src,
397                       size_t dest_len, int flags);
398 size_t pull_string_fn(const char *function,
399                         unsigned int line,
400                         const void *base_ptr,
401                         uint16 smb_flags2,
402                         char *dest,
403                         const void *src,
404                         size_t dest_len,
405                         size_t src_len,
406                         int flags);
407 size_t pull_string_talloc_fn(const char *function,
408                         unsigned int line,
409                         TALLOC_CTX *ctx,
410                         const void *base_ptr,
411                         uint16 smb_flags2,
412                         char **ppdest,
413                         const void *src,
414                         size_t src_len,
415                         int flags);
416 size_t align_string(const void *base_ptr, const char *p, int flags);
417 codepoint_t next_codepoint(const char *str, size_t *size);
418
419 /* The following definitions come from lib/clobber.c  */
420
421 void clobber_region(const char *fn, unsigned int line, char *dest, size_t len);
422
423 /* The following definitions come from lib/conn_tdb.c  */
424
425 struct db_record *connections_fetch_record(TALLOC_CTX *mem_ctx,
426                                            TDB_DATA key);
427 struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
428                                           connection_struct *conn,
429                                           const char *name);
430 int connections_traverse(int (*fn)(struct db_record *rec,
431                                    void *private_data),
432                          void *private_data);
433 int connections_forall(int (*fn)(struct db_record *rec,
434                                  const struct connections_key *key,
435                                  const struct connections_data *data,
436                                  void *private_data),
437                        void *private_data);
438 bool connections_init(bool rw);
439
440 /* The following definitions come from lib/crc32.c  */
441
442 uint32 crc32_calc_buffer(const char *buf, size_t size);
443
444 /* The following definitions come from lib/data_blob.c  */
445
446 DATA_BLOB data_blob(const void *p, size_t length);
447 DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
448 void data_blob_free(DATA_BLOB *d);
449 void data_blob_clear(DATA_BLOB *d);
450 void data_blob_clear_free(DATA_BLOB *d);
451 DATA_BLOB data_blob_string_const(const char *str);
452 DATA_BLOB data_blob_const(const void *p, size_t length);
453 DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length);
454 _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
455
456 /* The following definitions come from lib/dbwrap_util.c  */
457
458 int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
459 int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
460 bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
461                          uint32_t *val);
462 bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
463 uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
464                                      uint32_t *oldval, uint32_t change_val);
465 int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
466                                  int32 *oldval, int32 change_val);
467 NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
468                             int flag);
469 NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key);
470 NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr,
471                                   int32_t v);
472 NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr,
473                                    uint32_t v);
474 NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key,
475                                      TDB_DATA data, int flags);
476 NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key);
477
478 /* The following definitions come from lib/debug.c  */
479
480 void gfree_debugsyms(void);
481 const char *debug_classname_from_index(int ndx);
482 int debug_add_class(const char *classname);
483 int debug_lookup_classname(const char *classname);
484 bool debug_parse_levels(const char *params_str);
485 void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data);
486 void debug_init(void);
487 void debug_register_msgs(struct messaging_context *msg_ctx);
488 void setup_logging(const char *pname, bool interactive);
489 void debug_set_logfile(const char *name);
490 bool reopen_logs( void );
491 void force_check_log_size( void );
492 bool need_to_check_log_size( void );
493 void check_log_size( void );
494 void dbgflush( void );
495 bool dbghdr(int level, int cls, const char *file, const char *func, int line);
496 TALLOC_CTX *debug_ctx(void);
497
498 /* The following definitions come from lib/display_sec.c  */
499
500 char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type);
501 void display_sec_access(SEC_ACCESS *info);
502 void display_sec_ace_flags(uint8_t flags);
503 void display_sec_ace(SEC_ACE *ace);
504 void display_sec_acl(SEC_ACL *sec_acl);
505 void display_acl_type(uint16 type);
506 void display_sec_desc(SEC_DESC *sec);
507
508 /* The following definitions come from lib/dmallocmsg.c  */
509
510 void register_dmalloc_msgs(struct messaging_context *msg_ctx);
511
512 /* The following definitions come from lib/dprintf.c  */
513
514 void display_set_stderr(void);
515
516 /* The following definitions come from lib/errmap_unix.c  */
517
518 NTSTATUS map_nt_error_from_unix(int unix_error);
519
520 /* The following definitions come from lib/events.c  */
521
522 struct timed_event *event_add_timed(struct event_context *event_ctx,
523                                 TALLOC_CTX *mem_ctx,
524                                 struct timeval when,
525                                 const char *event_name,
526                                 void (*handler)(struct event_context *event_ctx,
527                                                 struct timed_event *te,
528                                                 const struct timeval *now,
529                                                 void *private_data),
530                                 void *private_data);
531 struct fd_event *event_add_fd(struct event_context *event_ctx,
532                               TALLOC_CTX *mem_ctx,
533                               int fd, uint16_t flags,
534                               void (*handler)(struct event_context *event_ctx,
535                                               struct fd_event *event,
536                                               uint16 flags,
537                                               void *private_data),
538                               void *private_data);
539 void event_fd_set_writeable(struct fd_event *fde);
540 void event_fd_set_not_writeable(struct fd_event *fde);
541 void event_fd_set_readable(struct fd_event *fde);
542 void event_fd_set_not_readable(struct fd_event *fde);
543 bool event_add_to_select_args(struct event_context *event_ctx,
544                               const struct timeval *now,
545                               fd_set *read_fds, fd_set *write_fds,
546                               struct timeval *timeout, int *maxfd);
547 bool events_pending(struct event_context *event_ctx);
548 bool run_events(struct event_context *event_ctx,
549                 int selrtn, fd_set *read_fds, fd_set *write_fds);
550 struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
551                                          struct timeval *to_ret);
552 int event_loop_once(struct event_context *ev);
553 struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
554 int set_event_dispatch_time(struct event_context *event_ctx,
555                             const char *event_name, struct timeval when);
556 int cancel_named_event(struct event_context *event_ctx,
557                        const char *event_name);
558 void dump_event_list(struct event_context *event_ctx);
559
560 /* The following definitions come from lib/fault.c  */
561
562 void fault_setup(void (*fn)(void *));
563 void dump_core_setup(const char *progname);
564
565 /* The following definitions come from lib/file_id.c  */
566
567 struct file_id file_id_create_dev(SMB_DEV_T dev, SMB_INO_T inode);
568 struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf);
569 bool file_id_equal(const struct file_id *id1, const struct file_id *id2);
570 const char *file_id_string_tos(const struct file_id *id);
571 void push_file_id_16(char *buf, const struct file_id *id);
572 void pull_file_id_16(char *buf, struct file_id *id);
573
574 /* The following definitions come from lib/fsusage.c  */
575
576 int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
577
578 /* The following definitions come from lib/gencache.c  */
579
580 bool gencache_init(void);
581 bool gencache_shutdown(void);
582 bool gencache_set(const char *keystr, const char *value, time_t timeout);
583 bool gencache_del(const char *keystr);
584 bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
585 bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired);
586 bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout);
587 void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
588                       void* data, const char* keystr_pattern);
589 int gencache_lock_entry( const char *key );
590 void gencache_unlock_entry( const char *key );
591
592 /* The following definitions come from lib/genrand.c  */
593
594 void set_rand_reseed_callback(void (*fn)(int *));
595 void set_need_random_reseed(void);
596 void generate_random_buffer( unsigned char *out, int len);
597 char *generate_random_str(size_t len);
598
599 /* The following definitions come from lib/hmacmd5.c  */
600
601 void hmac_md5_init_rfc2104(const unsigned char *key, int key_len, HMACMD5Context *ctx);
602 void hmac_md5_init_limK_to_64(const unsigned char* key, int key_len,
603                         HMACMD5Context *ctx);
604 void hmac_md5_update(const unsigned char *text, int text_len, HMACMD5Context *ctx);
605 void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx);
606 void hmac_md5( unsigned char key[16], const unsigned char *data, int data_len,
607                unsigned char *digest);
608
609 /* The following definitions come from lib/iconv.c  */
610
611 NTSTATUS smb_register_charset(struct charset_functions *funcs) ;
612 size_t smb_iconv(smb_iconv_t cd, 
613                  const char **inbuf, size_t *inbytesleft,
614                  char **outbuf, size_t *outbytesleft);
615 smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
616 int smb_iconv_close (smb_iconv_t cd);
617
618 /* The following definitions come from lib/interface.c  */
619
620 bool ismyaddr(const struct sockaddr_storage *ip);
621 bool ismyip_v4(struct in_addr ip);
622 bool is_local_net(const struct sockaddr_storage *from);
623 void setup_linklocal_scope_id(struct sockaddr_storage *pss);
624 bool is_local_net_v4(struct in_addr from);
625 int iface_count(void);
626 int iface_count_v4_nl(void);
627 const struct in_addr *first_ipv4_iface(void);
628 struct interface *get_interface(int n);
629 const struct sockaddr_storage *iface_n_sockaddr_storage(int n);
630 const struct in_addr *iface_n_ip_v4(int n);
631 const struct in_addr *iface_n_bcast_v4(int n);
632 const struct sockaddr_storage *iface_n_bcast(int n);
633 const struct sockaddr_storage *iface_ip(const struct sockaddr_storage *ip);
634 bool iface_local(const struct sockaddr_storage *ip);
635 void load_interfaces(void);
636 void gfree_interfaces(void);
637 bool interfaces_changed(void);
638
639 /* The following definitions come from lib/ldap_debug_handler.c  */
640
641 void init_ldap_debugging(void);
642
643 /* The following definitions come from lib/ldap_escape.c  */
644
645 char *escape_ldap_string_alloc(const char *s);
646 char *escape_rdn_val_string_alloc(const char *s);
647
648 /* The following definitions come from lib/md4.c  */
649
650 void mdfour(unsigned char *out, const unsigned char *in, int n);
651
652 /* The following definitions come from lib/md5.c  */
653
654 void MD5Init(struct MD5Context *ctx);
655 void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
656 void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
657
658 /* The following definitions come from lib/module.c  */
659
660 NTSTATUS smb_load_module(const char *module_name);
661 int smb_load_modules(const char **modules);
662 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
663 NTSTATUS smb_load_module(const char *module_name);
664 int smb_load_modules(const char **modules);
665 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
666 void init_modules(void);
667
668 /* The following definitions come from lib/ms_fnmatch.c  */
669
670 int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
671                bool is_case_sensitive);
672 int gen_fnmatch(const char *pattern, const char *string);
673
674 /* The following definitions come from lib/pam_errors.c  */
675
676 NTSTATUS pam_to_nt_status(int pam_error);
677 int nt_status_to_pam(NTSTATUS nt_status);
678 NTSTATUS pam_to_nt_status(int pam_error);
679 int nt_status_to_pam(NTSTATUS nt_status);
680
681 /* The following definitions come from lib/pidfile.c  */
682
683 pid_t pidfile_pid(const char *name);
684 void pidfile_create(const char *program_name);
685
686 /* The following definitions come from lib/popt_common.c  */
687
688
689 /* The following definitions come from lib/privileges.c  */
690
691 bool get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount);
692 NTSTATUS privilege_enumerate_accounts(DOM_SID **sids, int *num_sids);
693 NTSTATUS privilege_enum_sids(const SE_PRIV *mask, TALLOC_CTX *mem_ctx,
694                              DOM_SID **sids, int *num_sids);
695 bool grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
696 bool grant_privilege_by_name(DOM_SID *sid, const char *name);
697 bool revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
698 bool revoke_all_privileges( DOM_SID *sid );
699 bool revoke_privilege_by_name(DOM_SID *sid, const char *name);
700 NTSTATUS privilege_create_account(const DOM_SID *sid );
701 NTSTATUS privilege_set_init(PRIVILEGE_SET *priv_set);
702 NTSTATUS privilege_set_init_by_ctx(TALLOC_CTX *mem_ctx, PRIVILEGE_SET *priv_set);
703 void privilege_set_free(PRIVILEGE_SET *priv_set);
704 NTSTATUS dup_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR *old_la, int count);
705 bool is_privileged_sid( const DOM_SID *sid );
706 bool grant_all_privileges( const DOM_SID *sid );
707
708 /* The following definitions come from lib/privileges_basic.c  */
709
710 bool se_priv_copy( SE_PRIV *dst, const SE_PRIV *src );
711 bool se_priv_put_all_privileges(SE_PRIV *mask);
712 void se_priv_add( SE_PRIV *mask, const SE_PRIV *addpriv );
713 void se_priv_remove( SE_PRIV *mask, const SE_PRIV *removepriv );
714 bool se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 );
715 bool se_priv_from_name( const char *name, SE_PRIV *mask );
716 void dump_se_priv( int dbg_cl, int dbg_lvl, const SE_PRIV *mask );
717 bool is_privilege_assigned(const SE_PRIV *privileges,
718                            const SE_PRIV *check);
719 const char* get_privilege_dispname( const char *name );
720 bool user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege);
721 bool user_has_any_privilege(NT_USER_TOKEN *token, const SE_PRIV *privilege);
722 int count_all_privileges( void );
723 LUID_ATTR get_privilege_luid( SE_PRIV *mask );
724 const char *luid_to_privilege_name(const LUID *set);
725 bool se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask );
726 bool privilege_set_to_se_priv( SE_PRIV *mask, struct lsa_PrivilegeSet *privset );
727
728 /* The following definitions come from lib/readline.c  */
729
730 char *smb_readline(const char *prompt, void (*callback)(void),
731                    char **(completion_fn)(const char *text, int start, int end));
732 const char *smb_readline_get_line_buffer(void);
733 void smb_readline_ca_char(char c);
734 int cmd_history(void);
735
736 /* The following definitions come from lib/recvfile.c  */
737
738 ssize_t sys_recvfile(int fromfd,
739                         int tofd,
740                         SMB_OFF_T offset,
741                         size_t count);
742 ssize_t sys_recvfile(int fromfd,
743                         int tofd,
744                         SMB_OFF_T offset,
745                         size_t count);
746 ssize_t drain_socket(int sockfd, size_t count);
747
748 /* The following definitions come from lib/secace.c  */
749
750 bool sec_ace_object(uint8 type);
751 void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src);
752 void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type,
753                   uint32 mask, uint8 flag);
754 NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask);
755 NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask);
756 NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 *num, DOM_SID *sid);
757 bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2);
758 int nt_ace_inherit_comp( SEC_ACE *a1, SEC_ACE *a2);
759 int nt_ace_canon_comp( SEC_ACE *a1, SEC_ACE *a2);
760 void dacl_sort_into_canonical_order(SEC_ACE *srclist, unsigned int num_aces);
761 bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace);
762
763 /* The following definitions come from lib/secacl.c  */
764
765 SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision,
766                       int num_aces, SEC_ACE *ace_list);
767 SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src);
768 bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2);
769
770 /* The following definitions come from lib/secdesc.c  */
771
772 bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2);
773 SEC_DESC_BUF *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
774 SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
775                         enum security_descriptor_revision revision,
776                         uint16 type,
777                         const DOM_SID *owner_sid, const DOM_SID *grp_sid,
778                         SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size);
779 SEC_DESC *dup_sec_desc(TALLOC_CTX *ctx, const SEC_DESC *src);
780 NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
781                            struct security_descriptor *secdesc,
782                            uint8 **data, size_t *len);
783 NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len,
784                              struct security_descriptor **psecdesc);
785 SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
786                                  SEC_ACL *dacl, size_t *sd_size);
787 SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
788 SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src);
789 NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size);
790 NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
791 NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t *sd_size);
792 SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, 
793                                       bool child_container);
794 void init_sec_access(uint32 *t, uint32 mask);
795
796 /* The following definitions come from lib/select.c  */
797
798 void sys_select_signal(char c);
799 int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
800 int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
801
802 /* The following definitions come from lib/sendfile.c  */
803
804 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
805 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
806 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
807 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
808 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
809 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
810 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
811
812 /* The following definitions come from lib/server_mutex.c  */
813
814 struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
815                                      int timeout);
816
817 /* The following definitions come from lib/sharesec.c  */
818
819 SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def_access);
820 SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
821                               size_t *psize);
822 bool set_share_security(const char *share_name, SEC_DESC *psd);
823 bool delete_share_security(const char *servicename);
824 bool share_access_check(const NT_USER_TOKEN *token, const char *sharename,
825                         uint32 desired_access);
826 bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd);
827
828 /* The following definitions come from lib/signal.c  */
829
830 void BlockSignals(bool block,int signum);
831 void (*CatchSignal(int signum,void (*handler)(int )))(int);
832 void CatchChild(void);
833 void CatchChildLeaveStatus(void);
834
835 /* The following definitions come from lib/smbldap.c  */
836
837 int smb_ldap_start_tls(LDAP *ldap_struct, int version);
838 int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri);
839 int smb_ldap_upgrade_conn(LDAP *ldap_struct, int *new_version) ;
840 int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri);
841 int smbldap_search(struct smbldap_state *ldap_state, 
842                    const char *base, int scope, const char *filter, 
843                    const char *attrs[], int attrsonly, 
844                    LDAPMessage **res);
845 int smbldap_search_paged(struct smbldap_state *ldap_state, 
846                          const char *base, int scope, const char *filter, 
847                          const char **attrs, int attrsonly, int pagesize,
848                          LDAPMessage **res, void **cookie);
849 int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
850 int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
851 int smbldap_delete(struct smbldap_state *ldap_state, const char *dn);
852 int smbldap_extended_operation(struct smbldap_state *ldap_state, 
853                                LDAP_CONST char *reqoid, struct berval *reqdata, 
854                                LDAPControl **serverctrls, LDAPControl **clientctrls, 
855                                char **retoidp, struct berval **retdatap);
856 int smbldap_search_suffix (struct smbldap_state *ldap_state,
857                            const char *filter, const char **search_attr,
858                            LDAPMessage ** result);
859 void smbldap_free_struct(struct smbldap_state **ldap_state) ;
860 NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
861                       const char *location,
862                       struct smbldap_state **smbldap_state);
863 char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry);
864 bool smbldap_has_control(LDAP *ld, const char *control);
865 bool smbldap_has_extension(LDAP *ld, const char *extension);
866 bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
867 bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
868
869 /* The following definitions come from lib/smbldap_util.c  */
870
871 NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
872                                     LDAPMessage ** result, const char *domain_name,
873                                     bool try_add);
874
875 /* The following definitions come from lib/smbrun.c  */
876
877 int smbrun_no_sanitize(const char *cmd, int *outfd);
878 int smbrun(const char *cmd, int *outfd);
879 int smbrunsecret(const char *cmd, const char *secret);
880
881 /* The following definitions come from lib/sock_exec.c  */
882
883 int sock_exec(const char *prog);
884
885 /* The following definitions come from lib/substitute.c  */
886
887 void free_local_machine_name(void);
888 bool set_local_machine_name(const char *local_name, bool perm);
889 const char *get_local_machine_name(void);
890 bool set_remote_machine_name(const char *remote_name, bool perm);
891 const char *get_remote_machine_name(void);
892 void sub_set_smb_name(const char *name);
893 void set_current_user_info(const char *smb_name, const char *unix_name,
894                            const char *full_name, const char *domain);
895 const char *get_current_username(void);
896 void standard_sub_basic(const char *smb_name, const char *domain_name,
897                         char *str, size_t len);
898 char *talloc_sub_basic(TALLOC_CTX *mem_ctx, const char *smb_name,
899                        const char *domain_name, const char *str);
900 char *alloc_sub_basic(const char *smb_name, const char *domain_name,
901                       const char *str);
902 char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
903                         const char *input_string,
904                         const char *username,
905                         const char *domain,
906                         uid_t uid,
907                         gid_t gid);
908 char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
909                           const char *servicename, const char *user,
910                           const char *connectpath, gid_t gid,
911                           const char *smb_name, const char *domain_name,
912                           const char *str);
913 void standard_sub_advanced(const char *servicename, const char *user,
914                            const char *connectpath, gid_t gid,
915                            const char *smb_name, const char *domain_name,
916                            char *str, size_t len);
917 char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str);
918
919 /* The following definitions come from lib/sysacls.c  */
920
921 int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
922 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
923 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
924 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
925 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
926 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
927 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
928 char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
929 SMB_ACL_T sys_acl_init(int count);
930 int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
931 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
932 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
933 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
934 int sys_acl_free_text(char *text);
935 int sys_acl_free_acl(SMB_ACL_T acl_d) ;
936 int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
937 int sys_acl_valid(SMB_ACL_T acl_d);
938 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, 
939                            const char *path_p, SMB_ACL_TYPE_T type);
940 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
941 int sys_acl_set_file(vfs_handle_struct *handle,
942                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
943 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
944                    SMB_ACL_T acl_d);
945 int sys_acl_delete_def_file(vfs_handle_struct *handle,
946                             const char *path);
947 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
948                            const char *path_p, SMB_ACL_TYPE_T type);
949 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
950 int sys_acl_set_file(vfs_handle_struct *handle,
951                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
952 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
953                    SMB_ACL_T acl_d);
954 int sys_acl_delete_def_file(vfs_handle_struct *handle,
955                             const char *path);
956 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
957                            const char *path_p, SMB_ACL_TYPE_T type);
958 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
959 int sys_acl_set_file(vfs_handle_struct *handle,
960                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
961 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
962                    SMB_ACL_T acl_d);
963 int sys_acl_delete_def_file(vfs_handle_struct *handle,
964                             const char *path);
965 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
966                            const char *path_p, SMB_ACL_TYPE_T type);
967 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
968 int sys_acl_set_file(vfs_handle_struct *handle,
969                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
970 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
971                    SMB_ACL_T acl_d);
972 int sys_acl_delete_def_file(vfs_handle_struct *handle,
973                             const char *path);
974 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
975                            const char *path_p, SMB_ACL_TYPE_T type);
976 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
977 int sys_acl_set_file(vfs_handle_struct *handle,
978                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
979 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
980                    SMB_ACL_T acl_d);
981 int sys_acl_delete_def_file(vfs_handle_struct *handle,
982                             const char *path);
983 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
984                            const char *path_p, SMB_ACL_TYPE_T type);
985 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
986 int sys_acl_set_file(vfs_handle_struct *handle,
987                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
988 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
989                    SMB_ACL_T acl_d);
990 int sys_acl_delete_def_file(vfs_handle_struct *handle,
991                             const char *path);
992 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
993                            const char *path_p, SMB_ACL_TYPE_T type);
994 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
995 int sys_acl_set_file(vfs_handle_struct *handle,
996                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
997 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
998                    SMB_ACL_T acl_d);
999 int sys_acl_delete_def_file(vfs_handle_struct *handle,
1000                             const char *path);
1001 int no_acl_syscall_error(int err);
1002
1003 /* The following definitions come from lib/sysquotas.c  */
1004
1005 int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1006 int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1007
1008 /* The following definitions come from lib/sysquotas_4A.c  */
1009
1010 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1011 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1012
1013 /* The following definitions come from lib/sysquotas_linux.c  */
1014
1015 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1016 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1017
1018 /* The following definitions come from lib/sysquotas_xfs.c  */
1019
1020 int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1021 int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1022
1023 /* The following definitions come from lib/system.c  */
1024
1025 void *sys_memalign( size_t align, size_t size );
1026 int sys_usleep(long usecs);
1027 ssize_t sys_read(int fd, void *buf, size_t count);
1028 ssize_t sys_write(int fd, const void *buf, size_t count);
1029 ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off);
1030 ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off);
1031 ssize_t sys_send(int s, const void *msg, size_t len, int flags);
1032 ssize_t sys_sendto(int s,  const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
1033 ssize_t sys_recv(int fd, void *buf, size_t count, int flags);
1034 ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
1035 int sys_fcntl_ptr(int fd, int cmd, void *arg);
1036 int sys_fcntl_long(int fd, int cmd, long arg);
1037 int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
1038 int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
1039 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
1040 int sys_ftruncate(int fd, SMB_OFF_T offset);
1041 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
1042 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
1043 SMB_OFF_T sys_ftell(FILE *fp);
1044 int sys_creat(const char *path, mode_t mode);
1045 int sys_open(const char *path, int oflag, mode_t mode);
1046 FILE *sys_fopen(const char *path, const char *type);
1047 void kernel_flock(int fd, uint32 share_mode);
1048 SMB_STRUCT_DIR *sys_opendir(const char *name);
1049 SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
1050 void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
1051 long sys_telldir(SMB_STRUCT_DIR *dirp);
1052 void sys_rewinddir(SMB_STRUCT_DIR *dirp);
1053 int sys_closedir(SMB_STRUCT_DIR *dirp);
1054 int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
1055 char *sys_realpath(const char *path, char *resolved_path);
1056 int sys_waitpid(pid_t pid,int *status,int options);
1057 char *sys_getwd(char *s);
1058 int sys_symlink(const char *oldpath, const char *newpath);
1059 int sys_readlink(const char *path, char *buf, size_t bufsiz);
1060 int sys_link(const char *oldpath, const char *newpath);
1061 int sys_chown(const char *fname,uid_t uid,gid_t gid);
1062 int sys_lchown(const char *fname,uid_t uid,gid_t gid);
1063 int sys_chroot(const char *dname);
1064 void set_effective_capability(enum smbd_capability capability);
1065 void drop_effective_capability(enum smbd_capability capability);
1066 long sys_random(void);
1067 void sys_srandom(unsigned int seed);
1068 int groups_max(void);
1069 int sys_getgroups(int setlen, gid_t *gidset);
1070 int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
1071 void sys_setpwent(void);
1072 struct passwd *sys_getpwent(void);
1073 void sys_endpwent(void);
1074 struct passwd *sys_getpwnam(const char *name);
1075 struct passwd *sys_getpwuid(uid_t uid);
1076 struct group *sys_getgrnam(const char *name);
1077 struct group *sys_getgrgid(gid_t gid);
1078 pid_t sys_fork(void);
1079 pid_t sys_getpid(void);
1080 int sys_popen(const char *command);
1081 int sys_pclose(int fd);
1082 void *sys_dlopen(const char *name, int flags);
1083 void *sys_dlsym(void *handle, const char *symbol);
1084 int sys_dlclose (void *handle);
1085 const char *sys_dlerror(void);
1086 int sys_dup2(int oldfd, int newfd) ;
1087 ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
1088 ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size);
1089 ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
1090 ssize_t sys_listxattr (const char *path, char *list, size_t size);
1091 ssize_t sys_llistxattr (const char *path, char *list, size_t size);
1092 ssize_t sys_flistxattr (int filedes, char *list, size_t size);
1093 int sys_removexattr (const char *path, const char *name);
1094 int sys_lremovexattr (const char *path, const char *name);
1095 int sys_fremovexattr (int filedes, const char *name);
1096 int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1097 int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1098 int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
1099 uint32 unix_dev_major(SMB_DEV_T dev);
1100 uint32 unix_dev_minor(SMB_DEV_T dev);
1101 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1102 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1103 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1104 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1105 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1106 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1107 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1108 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1109 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1110 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1111 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1112 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1113 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1114 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1115 int sys_getpeereid( int s, uid_t *uid);
1116 int sys_getnameinfo(const struct sockaddr *psa,
1117                         socklen_t salen,
1118                         char *host,
1119                         size_t hostlen,
1120                         char *service,
1121                         size_t servlen,
1122                         int flags);
1123 int sys_connect(int fd, const struct sockaddr * addr);
1124
1125 /* The following definitions come from lib/system_smbd.c  */
1126
1127 bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
1128                          gid_t primary_gid,
1129                          gid_t **ret_groups, size_t *p_ngroups);
1130
1131 /* The following definitions come from lib/tallocmsg.c  */
1132
1133 void register_msg_pool_usage(struct messaging_context *msg_ctx);
1134
1135 /* The following definitions come from lib/time.c  */
1136
1137 time_t get_time_t_max(void);
1138 void GetTimeOfDay(struct timeval *tval);
1139 time_t nt_time_to_unix(NTTIME nt);
1140 void unix_to_nt_time(NTTIME *nt, time_t t);
1141 bool null_time(time_t t);
1142 bool null_nttime(NTTIME t);
1143 bool null_timespec(struct timespec ts);
1144 void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset);
1145 void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1146 void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1147 time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
1148 time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
1149 time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
1150 char *http_timestring(time_t t);
1151 char *timestring(TALLOC_CTX *mem_ctx, time_t t);
1152 const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt);
1153 NTTIME nttime_from_string(const char *s);
1154 int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2);
1155 struct timeval timeval_zero(void);
1156 bool timeval_is_zero(const struct timeval *tv);
1157 struct timeval timeval_current(void);
1158 struct timeval timeval_set(uint32_t secs, uint32_t usecs);
1159 struct timeval timeval_add(const struct timeval *tv,
1160                            uint32_t secs, uint32_t usecs);
1161 struct timeval timeval_sum(const struct timeval *tv1,
1162                            const struct timeval *tv2);
1163 struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
1164 int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
1165 bool timeval_expired(const struct timeval *tv);
1166 double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2);
1167 double timeval_elapsed(const struct timeval *tv);
1168 struct timeval timeval_min(const struct timeval *tv1,
1169                            const struct timeval *tv2);
1170 struct timeval timeval_max(const struct timeval *tv1,
1171                            const struct timeval *tv2);
1172 struct timeval timeval_until(const struct timeval *tv1,
1173                              const struct timeval *tv2);
1174 NTTIME timeval_to_nttime(const struct timeval *tv);
1175 uint32 convert_time_t_to_uint32(time_t t);
1176 time_t convert_uint32_to_time_t(uint32 u);
1177 int get_time_zone(time_t t);
1178 bool nt_time_is_zero(const NTTIME *nt);
1179 time_t generalized_to_unix_time(const char *str);
1180 int get_server_zone_offset(void);
1181 int set_server_zone_offset(time_t t);
1182 char *current_timestring(TALLOC_CTX *ctx, bool hires);
1183 void srv_put_dos_date(char *buf,int offset,time_t unixdate);
1184 void srv_put_dos_date2(char *buf,int offset, time_t unixdate);
1185 void srv_put_dos_date3(char *buf,int offset,time_t unixdate);
1186 void put_long_date_timespec(char *p, struct timespec ts);
1187 void put_long_date(char *p, time_t t);
1188 struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,bool fake_dirs);
1189 struct timespec get_atimespec(const SMB_STRUCT_STAT *pst);
1190 void set_atimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1191 struct timespec get_mtimespec(const SMB_STRUCT_STAT *pst);
1192 void set_mtimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1193 struct timespec get_ctimespec(const SMB_STRUCT_STAT *pst);
1194 void set_ctimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1195 void dos_filetime_timespec(struct timespec *tsp);
1196 time_t srv_make_unix_date(const void *date_ptr);
1197 time_t srv_make_unix_date2(const void *date_ptr);
1198 time_t srv_make_unix_date3(const void *date_ptr);
1199 time_t convert_timespec_to_time_t(struct timespec ts);
1200 struct timespec convert_time_t_to_timespec(time_t t);
1201 struct timespec convert_timeval_to_timespec(const struct timeval tv);
1202 struct timeval convert_timespec_to_timeval(const struct timespec ts);
1203 struct timespec timespec_current(void);
1204 struct timespec timespec_min(const struct timespec *ts1,
1205                            const struct timespec *ts2);
1206 int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
1207 struct timespec interpret_long_date(const char *p);
1208 void cli_put_dos_date(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1209 void cli_put_dos_date2(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1210 void cli_put_dos_date3(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1211 time_t cli_make_unix_date(struct cli_state *cli, const void *date_ptr);
1212 time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr);
1213 time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr);
1214 struct timespec nt_time_to_unix_timespec(NTTIME *nt);
1215 bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2);
1216 void TimeInit(void);
1217 void get_process_uptime(struct timeval *ret_time);
1218 time_t nt_time_to_unix_abs(const NTTIME *nt);
1219 time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
1220 void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
1221 void unix_to_nt_time_abs(NTTIME *nt, time_t t);
1222 bool null_mtime(time_t mtime);
1223 const char *time_to_asc(const time_t t);
1224 const char *display_time(NTTIME nttime);
1225 bool nt_time_is_set(const NTTIME *nt);
1226
1227 /* The following definitions come from lib/ufc.c  */
1228
1229 char *ufc_crypt(const char *key,const char *salt);
1230
1231 /* The following definitions come from lib/username.c  */
1232
1233 char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);
1234 struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
1235
1236 /* The following definitions come from lib/util.c  */
1237
1238 bool set_global_myname(const char *myname);
1239 const char *global_myname(void);
1240 bool set_global_myworkgroup(const char *myworkgroup);
1241 const char *lp_workgroup(void);
1242 bool set_global_scope(const char *scope);
1243 const char *global_scope(void);
1244 void gfree_names(void);
1245 void gfree_all( void );
1246 const char *my_netbios_names(int i);
1247 bool set_netbios_aliases(const char **str_array);
1248 bool init_names(void);
1249 const char *get_cmdline_auth_info_username(void);
1250 void set_cmdline_auth_info_username(const char *username);
1251 const char *get_cmdline_auth_info_password(void);
1252 void set_cmdline_auth_info_password(const char *password);
1253 bool set_cmdline_auth_info_signing_state(const char *arg);
1254 int get_cmdline_auth_info_signing_state(void);
1255 void set_cmdline_auth_info_use_kerberos(bool b);
1256 bool get_cmdline_auth_info_use_kerberos(void);
1257 void set_cmdline_auth_info_use_krb5_ticket(void);
1258 void set_cmdline_auth_info_smb_encrypt(void);
1259 void set_cmdline_auth_info_use_machine_account(void);
1260 bool get_cmdline_auth_info_got_pass(void);
1261 bool get_cmdline_auth_info_smb_encrypt(void);
1262 bool get_cmdline_auth_info_use_machine_account(void);
1263 bool get_cmdline_auth_info_copy(struct user_auth_info *info);
1264 bool set_cmdline_auth_info_machine_account_creds(void);
1265 const char *tmpdir(void);
1266 bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
1267                              gid_t **gids, size_t *num_gids);
1268 const char *get_numlist(const char *p, uint32 **num, int *count);
1269 bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf);
1270 bool socket_exist(const char *fname);
1271 time_t file_modtime(const char *fname);
1272 bool directory_exist(char *dname,SMB_STRUCT_STAT *st);
1273 SMB_OFF_T get_file_size(char *file_name);
1274 char *attrib_string(uint16 mode);
1275 void show_msg(char *buf);
1276 void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num);
1277 void smb_setlen(char *buf,int len);
1278 int set_message_bcc(char *buf,int num_bytes);
1279 ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
1280 char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
1281 char *clean_name(TALLOC_CTX *ctx, const char *s);
1282 void close_low_fds(bool stderr_too);
1283 ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos);
1284 int set_blocking(int fd, bool set);
1285 void smb_msleep(unsigned int t);
1286 void become_daemon(bool Fork, bool no_process_group);
1287 bool reinit_after_fork(struct messaging_context *msg_ctx,
1288                        bool parent_longlived);
1289 bool yesno(const char *p);
1290 void *malloc_(size_t size);
1291 void *malloc_array(size_t el_size, unsigned int count);
1292 void *memalign_array(size_t el_size, size_t align, unsigned int count);
1293 void *calloc_array(size_t size, size_t nmemb);
1294 void *Realloc(void *p, size_t size, bool free_old_on_error);
1295 void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error);
1296 void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
1297                         void *element, void *_array, uint32 *num_elements,
1298                         ssize_t *array_size);
1299 void safe_free(void *p);
1300 char *get_myname(TALLOC_CTX *ctx);
1301 char *get_mydnsdomname(TALLOC_CTX *ctx);
1302 int interpret_protocol(const char *str,int def);
1303 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1304 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1305 bool process_exists(const struct server_id pid);
1306 bool process_exists_by_pid(pid_t pid);
1307 const char *uidtoname(uid_t uid);
1308 char *gidtoname(gid_t gid);
1309 uid_t nametouid(const char *name);
1310 gid_t nametogid(const char *name);
1311 void smb_panic(const char *const why);
1312 void log_stack_trace(void);
1313 const char *readdirname(SMB_STRUCT_DIR *p);
1314 bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
1315 void set_namearray(name_compare_entry **ppname_array, const char *namelist);
1316 void free_namearray(name_compare_entry *name_array);
1317 bool fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
1318 bool fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
1319 bool is_myname(const char *s);
1320 bool is_myworkgroup(const char *s);
1321 void ra_lanman_string( const char *native_lanman );
1322 const char *get_remote_arch_str(void);
1323 void set_remote_arch(enum remote_arch_types type);
1324 enum remote_arch_types get_remote_arch(void);
1325 void print_asc(int level, const unsigned char *buf,int len);
1326 void dump_data(int level, const unsigned char *buf1,int len);
1327 void dump_data_pw(const char *msg, const uchar * data, size_t len);
1328 const char *tab_depth(int level, int depth);
1329 int str_checksum(const char *s);
1330 void zero_free(void *p, size_t size);
1331 int set_maxfiles(int requested_max);
1332 int smb_mkstemp(char *name_template);
1333 void *smb_xmalloc_array(size_t size, unsigned int count);
1334 void *smb_xmemdup(const void *p, size_t size);
1335 char *smb_xstrdup(const char *s);
1336 char *smb_xstrndup(const char *s, size_t n);
1337 void *memdup(const void *p, size_t size);
1338 char *myhostname(void);
1339 char *lock_path(const char *name);
1340 char *pid_path(const char *name);
1341 char *lib_path(const char *name);
1342 char *modules_path(const char *name);
1343 char *data_path(const char *name);
1344 char *state_path(const char *name);
1345 const char *shlib_ext(void);
1346 char *parent_dirname(const char *path);
1347 bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir,
1348                            char **parent, const char **name);
1349 bool ms_has_wild(const char *s);
1350 bool ms_has_wild_w(const smb_ucs2_t *s);
1351 bool mask_match(const char *string, const char *pattern, bool is_case_sensitive);
1352 bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive);
1353 bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
1354 bool unix_wild_match(const char *pattern, const char *string);
1355 bool name_to_fqdn(fstring fqdn, const char *name);
1356 void *talloc_check_name_abort(const void *ptr, const char *name);
1357 void *talloc_append_blob(TALLOC_CTX *mem_ctx, void *buf, DATA_BLOB blob);
1358 uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options);
1359 pid_t procid_to_pid(const struct server_id *proc);
1360 void set_my_vnn(uint32 vnn);
1361 uint32 get_my_vnn(void);
1362 struct server_id pid_to_procid(pid_t pid);
1363 struct server_id procid_self(void);
1364 struct server_id server_id_self(void);
1365 bool procid_equal(const struct server_id *p1, const struct server_id *p2);
1366 bool cluster_id_equal(const struct server_id *id1,
1367                       const struct server_id *id2);
1368 bool procid_is_me(const struct server_id *pid);
1369 struct server_id interpret_pid(const char *pid_string);
1370 char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid);
1371 char *procid_str_static(const struct server_id *pid);
1372 bool procid_valid(const struct server_id *pid);
1373 bool procid_is_local(const struct server_id *pid);
1374 int this_is_smp(void);
1375 bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1376 char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1377 char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1378 int get_safe_SVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1379 int get_safe_IVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1380 void split_domain_user(TALLOC_CTX *mem_ctx,
1381                        const char *full_name,
1382                        char **domain,
1383                        char **user);
1384 void *_talloc_zero_zeronull(const void *ctx, size_t size, const char *name);
1385 void *_talloc_memdup_zeronull(const void *t, const void *p, size_t size, const char *name);
1386 void *_talloc_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1387 void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1388 void *talloc_zeronull(const void *context, size_t size, const char *name);
1389 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
1390                                 char **pbase, char **pstream);
1391 bool is_valid_policy_hnd(const POLICY_HND *hnd);
1392 bool policy_hnd_equal(const struct policy_handle *hnd1,
1393                       const struct policy_handle *hnd2);
1394 const char *strip_hostname(const char *s);
1395
1396 /* The following definitions come from lib/util_file.c  */
1397
1398 char *fgets_slash(char *s2,int maxlen,XFILE *f);
1399 char *fd_load(int fd, size_t *psize, size_t maxsize);
1400 char *file_load(const char *fname, size_t *size, size_t maxsize);
1401 bool unmap_file(void* start, size_t size);
1402 void *map_file(char *fname, size_t size);
1403 char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
1404 char **fd_lines_load(int fd, int *numlines, size_t maxsize);
1405 char **file_lines_pload(char *syscmd, int *numlines);
1406 void file_lines_free(char **lines);
1407 void file_lines_slashcont(char **lines);
1408 bool file_save(const char *fname, void *packet, size_t length);
1409
1410 /* The following definitions come from lib/util_nscd.c  */
1411
1412 void smb_nscd_flush_user_cache(void);
1413 void smb_nscd_flush_group_cache(void);
1414
1415 /* The following definitions come from lib/util_nttoken.c  */
1416
1417 NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken);
1418 NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
1419                         const struct nt_user_token *token_1,
1420                         const struct nt_user_token *token_2,
1421                         struct nt_user_token **token_out);
1422
1423 /* The following definitions come from lib/util_pw.c  */
1424
1425 struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx, const struct passwd *from) ;
1426 void flush_pwnam_cache(void);
1427 struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name);
1428 struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
1429
1430 /* The following definitions come from lib/util_reg.c  */
1431
1432 const char *reg_type_lookup(enum winreg_Type type);
1433 WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len,
1434                          uint32 *num_values, char ***values);
1435
1436 /* The following definitions come from lib/util_reg_api.c  */
1437
1438 WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
1439                            struct registry_value **pvalue,
1440                            enum winreg_Type type, uint8 *data,
1441                            uint32 size, uint32 length);
1442 WERROR registry_push_value(TALLOC_CTX *mem_ctx,
1443                            const struct registry_value *value,
1444                            DATA_BLOB *presult);
1445
1446 /* The following definitions come from lib/util_seaccess.c  */
1447
1448 void se_map_generic(uint32 *access_mask, const struct generic_mapping *mapping);
1449 void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
1450 bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
1451                      uint32 acc_desired, uint32 *acc_granted, 
1452                      NTSTATUS *status);
1453 NTSTATUS samr_make_sam_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd_size);
1454
1455 /* The following definitions come from lib/util_sec.c  */
1456
1457 void sec_init(void);
1458 uid_t sec_initial_uid(void);
1459 gid_t sec_initial_gid(void);
1460 bool non_root_mode(void);
1461 void gain_root_privilege(void);
1462 void gain_root_group_privilege(void);
1463 void set_effective_uid(uid_t uid);
1464 void set_effective_gid(gid_t gid);
1465 void save_re_uid(void);
1466 void restore_re_uid_fromroot(void);
1467 void restore_re_uid(void);
1468 void save_re_gid(void);
1469 void restore_re_gid(void);
1470 int set_re_uid(void);
1471 void become_user_permanently(uid_t uid, gid_t gid);
1472 bool is_setuid_root(void) ;
1473
1474 /* The following definitions come from lib/util_sid.c  */
1475
1476 const char *sid_type_lookup(uint32 sid_type) ;
1477 NT_USER_TOKEN *get_system_token(void) ;
1478 const char *get_global_sam_name(void) ;
1479 char *sid_to_fstring(fstring sidstr_out, const DOM_SID *sid);
1480 char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid);
1481 char *sid_string_dbg(const DOM_SID *sid);
1482 char *sid_string_tos(const DOM_SID *sid);
1483 bool string_to_sid(DOM_SID *sidout, const char *sidstr);
1484 DOM_SID *string_sid_talloc(TALLOC_CTX *mem_ctx, const char *sidstr);
1485 bool sid_append_rid(DOM_SID *sid, uint32 rid);
1486 bool sid_compose(DOM_SID *dst, const DOM_SID *domain_sid, uint32 rid);
1487 bool sid_split_rid(DOM_SID *sid, uint32 *rid);
1488 bool sid_peek_rid(const DOM_SID *sid, uint32 *rid);
1489 bool sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid);
1490 void sid_copy(DOM_SID *dst, const DOM_SID *src);
1491 bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid);
1492 bool sid_parse(const char *inbuf, size_t len, DOM_SID *sid);
1493 int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
1494 int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2);
1495 bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
1496 bool non_mappable_sid(DOM_SID *sid);
1497 char *sid_binstring(const DOM_SID *sid);
1498 char *sid_binstring_hex(const DOM_SID *sid);
1499 DOM_SID *sid_dup_talloc(TALLOC_CTX *ctx, const DOM_SID *src);
1500 NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1501                           DOM_SID **sids, size_t *num);
1502 NTSTATUS add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1503                                  DOM_SID **sids, size_t *num_sids);
1504 void del_sid_from_array(const DOM_SID *sid, DOM_SID **sids, size_t *num);
1505 bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
1506                                     uint32 rid, uint32 **pp_rids, size_t *p_num);
1507 bool is_null_sid(const DOM_SID *sid);
1508 NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
1509                               const struct netr_SamInfo3 *info3,
1510                               DOM_SID **user_sids,
1511                               size_t *num_user_sids,
1512                               bool include_user_group_rid,
1513                               bool skip_ressource_groups);
1514
1515 /* The following definitions come from lib/util_sock.c  */
1516
1517 bool is_ipaddress_v4(const char *str);
1518 bool is_ipaddress(const char *str);
1519 bool is_broadcast_addr(const struct sockaddr_storage *pss);
1520 uint32 interpret_addr(const char *str);
1521 struct in_addr *interpret_addr2(struct in_addr *ip, const char *str);
1522 bool interpret_string_addr(struct sockaddr_storage *pss,
1523                 const char *str,
1524                 int flags);
1525 bool is_loopback_ip_v4(struct in_addr ip);
1526 bool is_loopback_addr(const struct sockaddr_storage *pss);
1527 bool is_zero_ip_v4(struct in_addr ip);
1528 bool is_zero_addr(const struct sockaddr_storage *pss);
1529 void zero_ip_v4(struct in_addr *ip);
1530 void zero_addr(struct sockaddr_storage *pss);
1531 bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
1532 void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
1533                 struct in_addr ip);
1534 bool same_net(const struct sockaddr_storage *ip1,
1535                 const struct sockaddr_storage *ip2,
1536                 const struct sockaddr_storage *mask);
1537 bool addr_equal(const struct sockaddr_storage *ip1,
1538                 const struct sockaddr_storage *ip2);
1539 bool is_address_any(const struct sockaddr_storage *psa);
1540 uint16_t get_sockaddr_port(const struct sockaddr_storage *pss);
1541 char *print_sockaddr(char *dest,
1542                         size_t destlen,
1543                         const struct sockaddr_storage *psa);
1544 char *print_canonical_sockaddr(TALLOC_CTX *ctx,
1545                         const struct sockaddr_storage *pss);
1546 void set_sockaddr_port(struct sockaddr_storage *psa, uint16 port);
1547 const char *client_name(int fd);
1548 const char *client_addr(int fd, char *addr, size_t addrlen);
1549 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
1550 int client_socket_port(int fd);
1551 void set_smb_read_error(enum smb_read_errors *pre,
1552                         enum smb_read_errors newerr);
1553 void cond_set_smb_read_error(enum smb_read_errors *pre,
1554                         enum smb_read_errors newerr);
1555 bool is_a_socket(int fd);
1556 void set_socket_options(int fd, const char *options);
1557 ssize_t read_udp_v4_socket(int fd,
1558                         char *buf,
1559                         size_t len,
1560                         struct sockaddr_storage *psa);
1561 NTSTATUS read_socket_with_timeout(int fd, char *buf,
1562                                   size_t mincnt, size_t maxcnt,
1563                                   unsigned int time_out,
1564                                   size_t *size_ret);
1565 NTSTATUS read_data(int fd, char *buffer, size_t N);
1566 ssize_t write_data(int fd, const char *buffer, size_t N);
1567 bool send_keepalive(int client);
1568 NTSTATUS read_smb_length_return_keepalive(int fd, char *inbuf,
1569                                           unsigned int timeout,
1570                                           size_t *len);
1571 NTSTATUS read_smb_length(int fd, char *inbuf, unsigned int timeout,
1572                          size_t *len);
1573 NTSTATUS receive_smb_raw(int fd,
1574                         char *buffer,
1575                         size_t buflen,
1576                         unsigned int timeout,
1577                         size_t maxlen,
1578                         size_t *p_len);
1579 int open_socket_in(int type,
1580                 uint16_t port,
1581                 int dlevel,
1582                 const struct sockaddr_storage *psock,
1583                 bool rebind);
1584 int open_socket_out(int type,
1585                 const struct sockaddr_storage *pss,
1586                 uint16_t port,
1587                 int timeout);
1588 bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
1589                          int timeout, int *fd_index, int *fd);
1590 int open_udp_socket(const char *host, int port);
1591 const char *get_peer_name(int fd, bool force_lookup);
1592 const char *get_peer_addr(int fd, char *addr, size_t addr_len);
1593 int create_pipe_sock(const char *socket_dir,
1594                      const char *socket_name,
1595                      mode_t dir_perms);
1596 const char *get_mydnsfullname(void);
1597 bool is_myname_or_ipaddr(const char *s);
1598
1599 /* The following definitions come from lib/util_str.c  */
1600
1601 bool next_token(const char **ptr, char *buff, const char *sep, size_t bufsize);
1602 bool next_token_talloc(TALLOC_CTX *ctx,
1603                         const char **ptr,
1604                         char **pp_buff,
1605                         const char *sep);
1606 bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
1607                         const char **ptr,
1608                         char **pp_buff,
1609                         const char *sep);
1610 int StrCaseCmp(const char *s, const char *t);
1611 int StrnCaseCmp(const char *s, const char *t, size_t len);
1612 bool strequal(const char *s1, const char *s2);
1613 bool strnequal(const char *s1,const char *s2,size_t n);
1614 bool strcsequal(const char *s1,const char *s2);
1615 int strwicmp(const char *psz1, const char *psz2);
1616 void strnorm(char *s, int case_default);
1617 bool strisnormal(const char *s, int case_default);
1618 void string_replace( char *s, char oldc, char newc );
1619 char *push_skip_string(char *buf);
1620 char *skip_string(const char *base, size_t len, char *buf);
1621 size_t str_charnum(const char *s);
1622 size_t str_ascii_charnum(const char *s);
1623 bool trim_char(char *s,char cfront,char cback);
1624 bool trim_string(char *s,const char *front,const char *back);
1625 bool strhasupper(const char *s);
1626 bool strhaslower(const char *s);
1627 size_t count_chars(const char *s,char c);
1628 char *safe_strcpy_fn(const char *fn,
1629                 int line,
1630                 char *dest,
1631                 const char *src,
1632                 size_t maxlength);
1633 char *safe_strcat_fn(const char *fn,
1634                 int line,
1635                 char *dest,
1636                 const char *src,
1637                 size_t maxlength);
1638 char *alpha_strcpy_fn(const char *fn,
1639                 int line,
1640                 char *dest,
1641                 const char *src,
1642                 const char *other_safe_chars,
1643                 size_t maxlength);
1644 char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
1645 size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len);
1646 DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex);
1647 char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
1648 bool in_list(const char *s, const char *list, bool casesensitive);
1649 void string_free(char **s);
1650 bool string_set(char **dest,const char *src);
1651 void string_sub2(char *s,const char *pattern, const char *insert, size_t len,
1652                  bool remove_unsafe_characters, bool replace_once,
1653                  bool allow_trailing_dollar);
1654 void string_sub_once(char *s, const char *pattern,
1655                 const char *insert, size_t len);
1656 void string_sub(char *s,const char *pattern, const char *insert, size_t len);
1657 void fstring_sub(char *s,const char *pattern,const char *insert);
1658 char *realloc_string_sub2(char *string,
1659                         const char *pattern,
1660                         const char *insert,
1661                         bool remove_unsafe_characters,
1662                         bool allow_trailing_dollar);
1663 char *realloc_string_sub(char *string,
1664                         const char *pattern,
1665                         const char *insert);
1666 char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
1667                         const char *pattern,
1668                         const char *insert,
1669                         bool remove_unsafe_characters,
1670                         bool replace_once,
1671                         bool allow_trailing_dollar);
1672 char *talloc_string_sub(TALLOC_CTX *mem_ctx,
1673                         const char *src,
1674                         const char *pattern,
1675                         const char *insert);
1676 void all_string_sub(char *s,const char *pattern,const char *insert, size_t len);
1677 char *talloc_all_string_sub(TALLOC_CTX *ctx,
1678                                 const char *src,
1679                                 const char *pattern,
1680                                 const char *insert);
1681 char *octal_string(int i);
1682 char *string_truncate(char *s, unsigned int length);
1683 char *strchr_m(const char *src, char c);
1684 char *strrchr_m(const char *s, char c);
1685 char *strnrchr_m(const char *s, char c, unsigned int n);
1686 char *strstr_m(const char *src, const char *findstr);
1687 void strlower_m(char *s);
1688 void strupper_m(char *s);
1689 size_t strlen_m(const char *s);
1690 size_t strlen_m_term(const char *s);
1691 size_t strlen_m_term_null(const char *s);
1692 char *binary_string_rfc2254(char *buf, int len);
1693 char *binary_string(char *buf, int len);
1694 int fstr_sprintf(fstring s, const char *fmt, ...);
1695 char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
1696 bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src);
1697 bool str_list_compare(char **list1, char **list2);
1698 int str_list_count( const char **list );
1699 bool str_list_sub_basic( char **list, const char *smb_name,
1700                          const char *domain_name );
1701 bool str_list_substitute(char **list, const char *pattern, const char *insert);
1702 char *ipstr_list_make(char **ipstr_list,
1703                         const struct ip_service *ip_list,
1704                         int ip_count);
1705 int ipstr_list_parse(const char *ipstr_list, struct ip_service **ip_list);
1706 void ipstr_list_free(char* ipstr_list);
1707 void rfc1738_unescape(char *buf);
1708 DATA_BLOB base64_decode_data_blob(const char *s);
1709 void base64_decode_inplace(char *s);
1710 char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
1711 SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
1712 SMB_OFF_T conv_str_size(const char * str);
1713 void string_append(char **left, const char *right);
1714 bool add_string_to_array(TALLOC_CTX *mem_ctx,
1715                          const char *str, const char ***strings,
1716                          int *num);
1717 void sprintf_append(TALLOC_CTX *mem_ctx, char **string, ssize_t *len,
1718                     size_t *bufsize, const char *fmt, ...);
1719 int asprintf_strupper_m(char **strp, const char *fmt, ...);
1720 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...);
1721 char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...);
1722 char *sstring_sub(const char *src, char front, char back);
1723 bool validate_net_name( const char *name,
1724                 const char *invalid_chars,
1725                 int max_len);
1726 size_t ascii_len_n(const char *src, size_t n);
1727 size_t utf16_len(const void *buf);
1728 size_t utf16_len_n(const void *src, size_t n);
1729 char *escape_shell_string(const char *src);
1730
1731 /* The following definitions come from lib/util_unistr.c  */
1732
1733 void gfree_case_tables(void);
1734 void load_case_tables(void);
1735 void init_valid_table(void);
1736 size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate);
1737 char *skip_unibuf(char *src, size_t len);
1738 int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags);
1739 int rpcstr_pull_talloc(TALLOC_CTX *ctx,
1740                         char **dest,
1741                         void *src,
1742                         int src_len,
1743                         int flags);
1744 int rpcstr_pull_unistr2_fstring(char *dest, UNISTR2 *src);
1745 char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const UNISTR2 *src);
1746 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
1747 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
1748 void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
1749 void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
1750 char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
1751 const char *unistr2_static(const UNISTR2 *str);
1752 smb_ucs2_t toupper_w(smb_ucs2_t val);
1753 smb_ucs2_t tolower_w( smb_ucs2_t val );
1754 bool islower_w(smb_ucs2_t c);
1755 bool isupper_w(smb_ucs2_t c);
1756 bool isvalid83_w(smb_ucs2_t c);
1757 size_t strlen_w(const smb_ucs2_t *src);
1758 size_t strnlen_w(const smb_ucs2_t *src, size_t max);
1759 smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1760 smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c);
1761 smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1762 smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
1763 smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
1764 bool strlower_w(smb_ucs2_t *s);
1765 bool strupper_w(smb_ucs2_t *s);
1766 void strnorm_w(smb_ucs2_t *s, int case_default);
1767 int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1768 int strncmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1769 int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1770 int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1771 bool strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
1772 bool strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n);
1773 smb_ucs2_t *strdup_w(const smb_ucs2_t *src);
1774 smb_ucs2_t *strndup_w(const smb_ucs2_t *src, size_t len);
1775 smb_ucs2_t *strncpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1776 smb_ucs2_t *strncat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1777 smb_ucs2_t *strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src);
1778 void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc);
1779 bool trim_string_w(smb_ucs2_t *s, const smb_ucs2_t *front,
1780                                   const smb_ucs2_t *back);
1781 int strcmp_wa(const smb_ucs2_t *a, const char *b);
1782 int strncmp_wa(const smb_ucs2_t *a, const char *b, size_t len);
1783 smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p);
1784 smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins);
1785 int unistrlen(uint16 *s);
1786 int unistrcpy(uint16 *dst, uint16 *src);
1787 UNISTR2* ucs2_to_unistr2(TALLOC_CTX *ctx, UNISTR2* dst, smb_ucs2_t* src);
1788 int toupper_ascii(int c);
1789 int tolower_ascii(int c);
1790 int isupper_ascii(int c);
1791 int islower_ascii(int c);
1792
1793 /* The following definitions come from lib/util_uuid.c  */
1794
1795 void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr);
1796 void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu);
1797 void smb_uuid_generate_random(struct GUID *uu);
1798 const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu);
1799 bool smb_string_to_uuid(const char *in, struct GUID* uu);
1800 char *guid_binstring(const struct GUID *guid);
1801
1802 /* The following definitions come from lib/version.c  */
1803
1804 const char *samba_version_string(void);
1805
1806 /* The following definitions come from lib/winbind_util.c  */
1807
1808 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1809                          enum lsa_SidType *name_type);
1810 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1811                         const char **domain, const char **name,
1812                         enum lsa_SidType *name_type);
1813 bool winbind_ping(void);
1814 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1815 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1816 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1817 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1818 wbcErr wb_is_trusted_domain(const char *domain);
1819 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1820                          const DOM_SID *domain_sid,
1821                          int num_rids, uint32 *rids,
1822                          const char **domain_name,
1823                          const char ***names, enum lsa_SidType **types);
1824 bool winbind_allocate_uid(uid_t *uid);
1825 bool winbind_allocate_gid(gid_t *gid);
1826 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1827                          enum lsa_SidType *name_type);
1828 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1829                         const char **domain, const char **name,
1830                         enum lsa_SidType *name_type);
1831 bool winbind_ping(void);
1832 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1833 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1834 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1835 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1836 wbcErr wb_is_trusted_domain(const char *domain);
1837 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1838                          const DOM_SID *domain_sid,
1839                          int num_rids, uint32 *rids,
1840                          const char **domain_name,
1841                          const char ***names, enum lsa_SidType **types);
1842 bool winbind_allocate_uid(uid_t *uid);
1843 bool winbind_allocate_gid(gid_t *gid);
1844
1845 /* The following definitions come from lib/wins_srv.c  */
1846
1847 bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip);
1848 void wins_srv_alive(struct in_addr wins_ip, struct in_addr src_ip);
1849 void wins_srv_died(struct in_addr wins_ip, struct in_addr src_ip);
1850 unsigned wins_srv_count(void);
1851 char **wins_srv_tags(void);
1852 void wins_srv_tags_free(char **list);
1853 struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip);
1854 unsigned wins_srv_count_tag(const char *tag);
1855
1856 /* The following definitions come from lib/xfile.c  */
1857
1858 int x_setvbuf(XFILE *f, char *buf, int mode, size_t size);
1859 XFILE *x_fopen(const char *fname, int flags, mode_t mode);
1860 XFILE *x_fdup(const XFILE *f);
1861 int x_fclose(XFILE *f);
1862 size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f);
1863 int x_fileno(const XFILE *f);
1864 int x_fflush(XFILE *f);
1865 void x_setbuffer(XFILE *f, char *buf, size_t size);
1866 void x_setbuf(XFILE *f, char *buf);
1867 void x_setlinebuf(XFILE *f);
1868 int x_feof(XFILE *f);
1869 int x_ferror(XFILE *f);
1870 int x_fgetc(XFILE *f);
1871 size_t x_fread(void *p, size_t size, size_t nmemb, XFILE *f);
1872 char *x_fgets(char *s, int size, XFILE *stream) ;
1873 off_t x_tseek(XFILE *f, off_t offset, int whence);
1874
1875 /* The following definitions come from libads/ads_status.c  */
1876
1877 ADS_STATUS ads_build_error(enum ads_error_type etype, 
1878                            int rc, int minor_status);
1879 ADS_STATUS ads_build_nt_error(enum ads_error_type etype, 
1880                            NTSTATUS nt_status);
1881 NTSTATUS ads_ntstatus(ADS_STATUS status);
1882 const char *ads_errstr(ADS_STATUS status);
1883 NTSTATUS gss_err_to_ntstatus(uint32 maj, uint32 min);
1884
1885 /* The following definitions come from libads/ads_struct.c  */
1886
1887 char *ads_build_path(const char *realm, const char *sep, const char *field, int reverse);
1888 char *ads_build_dn(const char *realm);
1889 char *ads_build_domain(const char *dn);
1890 ADS_STRUCT *ads_init(const char *realm, 
1891                      const char *workgroup,
1892                      const char *ldap_server);
1893 void ads_destroy(ADS_STRUCT **ads);
1894
1895 /* The following definitions come from libads/ads_utils.c  */
1896
1897 uint32 ads_acb2uf(uint32 acb);
1898 uint32 ads_uf2acb(uint32 uf);
1899 uint32 ads_uf2atype(uint32 uf);
1900 uint32 ads_gtype2atype(uint32 gtype);
1901 enum lsa_SidType ads_atype_map(uint32 atype);
1902
1903 /* The following definitions come from libads/authdata.c  */
1904
1905 struct PAC_LOGON_INFO *get_logon_info_from_pac(struct PAC_DATA *pac_data);
1906 NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
1907                              const char *name,
1908                              const char *pass,
1909                              time_t time_offset,
1910                              time_t *expire_time,
1911                              time_t *renew_till_time,
1912                              const char *cache_name,
1913                              bool request_pac,
1914                              bool add_netbios_addr,
1915                              time_t renewable_time,
1916                              struct PAC_DATA **pac_ret);
1917 NTSTATUS kerberos_return_info3_from_pac(TALLOC_CTX *mem_ctx,
1918                                         const char *name,
1919                                         const char *pass,
1920                                         time_t time_offset,
1921                                         time_t *expire_time,
1922                                         time_t *renew_till_time,
1923                                         const char *cache_name,
1924                                         bool request_pac,
1925                                         bool add_netbios_addr,
1926                                         time_t renewable_time,
1927                                         struct netr_SamInfo3 **info3);
1928
1929 /* The following definitions come from libads/cldap.c  */
1930
1931 bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
1932                         const char *server,
1933                         const char *realm,
1934                         uint32_t *nt_version,
1935                         union nbt_cldap_netlogon **reply);
1936 bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
1937                           const char *server,
1938                           const char *realm,
1939                           struct nbt_cldap_netlogon_5 *reply5);
1940 bool pull_mailslot_cldap_reply(TALLOC_CTX *mem_ctx,
1941                                const DATA_BLOB *blob,
1942                                union nbt_cldap_netlogon *r,
1943                                uint32_t *nt_version);
1944
1945 /* The following definitions come from libads/disp_sec.c  */
1946
1947 void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, SEC_DESC *sd);
1948
1949 /* The following definitions come from libads/dns.c  */
1950
1951 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
1952                                 const char *dnsdomain,
1953                                 struct dns_rr_ns **nslist,
1954                                 int *numns);
1955 bool sitename_store(const char *realm, const char *sitename);
1956 char *sitename_fetch(const char *realm);
1957 bool stored_sitename_changed(const char *realm, const char *sitename);
1958 NTSTATUS ads_dns_query_dcs(TALLOC_CTX *ctx,
1959                            const char *realm,
1960                            const char *sitename,
1961                            struct dns_rr_srv **dclist,
1962                            int *numdcs );
1963 NTSTATUS ads_dns_query_gcs(TALLOC_CTX *ctx,
1964                            const char *realm,
1965                            const char *sitename,
1966                            struct dns_rr_srv **dclist,
1967                            int *numdcs );
1968 NTSTATUS ads_dns_query_kdcs(TALLOC_CTX *ctx,
1969                             const char *dns_forest_name,
1970                             const char *sitename,
1971                             struct dns_rr_srv **dclist,
1972                             int *numdcs );
1973 NTSTATUS ads_dns_query_pdc(TALLOC_CTX *ctx,
1974                            const char *dns_domain_name,
1975                            struct dns_rr_srv **dclist,
1976                            int *numdcs );
1977 NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
1978                                 const char *dns_forest_name,
1979                                 const struct GUID *domain_guid,
1980                                 struct dns_rr_srv **dclist,
1981                                 int *numdcs );
1982
1983 /* The following definitions come from libads/kerberos.c  */
1984
1985 int kerberos_kinit_password_ext(const char *principal,
1986                                 const char *password,
1987                                 int time_offset,
1988                                 time_t *expire_time,
1989                                 time_t *renew_till_time,
1990                                 const char *cache_name,
1991                                 bool request_pac,
1992                                 bool add_netbios_addr,
1993                                 time_t renewable_time,
1994                                 NTSTATUS *ntstatus);
1995 int ads_kinit_password(ADS_STRUCT *ads);
1996 int ads_kdestroy(const char *cc_name);
1997 char* kerberos_standard_des_salt( void );
1998 bool kerberos_secrets_store_des_salt( const char* salt );
1999 char* kerberos_secrets_fetch_des_salt( void );
2000 char *kerberos_get_default_realm_from_ccache( void );
2001 bool kerberos_secrets_store_salting_principal(const char *service,
2002                                               int enctype,
2003                                               const char *principal);
2004 int kerberos_kinit_password(const char *principal,
2005                             const char *password,
2006                             int time_offset,
2007                             const char *cache_name);
2008 bool create_local_private_krb5_conf_for_domain(const char *realm,
2009                                                 const char *domain,
2010                                                 const char *sitename,
2011                                                 struct sockaddr_storage *pss);
2012
2013 /* The following definitions come from libads/kerberos_keytab.c  */
2014
2015 int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
2016 int ads_keytab_flush(ADS_STRUCT *ads);
2017 int ads_keytab_create_default(ADS_STRUCT *ads);
2018 int ads_keytab_list(const char *keytab_name);
2019
2020 /* The following definitions come from libads/kerberos_verify.c  */
2021
2022 NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
2023                            const char *realm,
2024                            time_t time_offset,
2025                            const DATA_BLOB *ticket,
2026                            char **principal,
2027                            struct PAC_DATA **pac_data,
2028                            DATA_BLOB *ap_rep,
2029                            DATA_BLOB *session_key,
2030                            bool use_replay_cache);
2031
2032 /* The following definitions come from libads/krb5_errs.c  */
2033
2034
2035 /* The following definitions come from libads/krb5_setpw.c  */
2036
2037 ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ, 
2038                                  const char *newpw, int time_offset);
2039 ADS_STATUS kerberos_set_password(const char *kpasswd_server, 
2040                                  const char *auth_principal, const char *auth_password,
2041                                  const char *target_principal, const char *new_password,
2042                                  int time_offset);
2043 ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
2044                                     const char *machine_account,
2045                                     const char *password);
2046
2047 /* The following definitions come from libads/ldap.c  */
2048
2049 bool ads_sitename_match(ADS_STRUCT *ads);
2050 bool ads_closest_dc(ADS_STRUCT *ads);
2051 ADS_STATUS ads_connect(ADS_STRUCT *ads);
2052 ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
2053 ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
2054 void ads_disconnect(ADS_STRUCT *ads);
2055 ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
2056                                 int scope, const char *expr, const char **attrs,
2057                                 bool (*fn)(ADS_STRUCT *, char *, void **, void *), 
2058                                 void *data_area);
2059 void ads_memfree(ADS_STRUCT *ads, void *mem);
2060 char *ads_parent_dn(const char *dn);
2061 ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
2062 ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods, 
2063                        const char *name, const char *val);
2064 ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2065                            const char *name, const char **vals);
2066 ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods);
2067 ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods);
2068 ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn);
2069 char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit);
2070 char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
2071 ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2072                                 const char *name, const char **vals);
2073 uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
2074 uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
2075 ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
2076 ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name, 
2077                                           const char *my_fqdn, const char *spn);
2078 ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2079                                    const char *org_unit);
2080 ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2081                                  const char *org_unit, bool *moved);
2082 int ads_count_replies(ADS_STRUCT *ads, void *res);
2083 ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn);
2084 ADS_STATUS ads_current_time(ADS_STRUCT *ads);
2085 ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32 *val);
2086 ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, DOM_SID *sid);
2087 ADS_STATUS ads_site_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char **site_name);
2088 ADS_STATUS ads_site_dn_for_machine(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site_dn);
2089 ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffixes, size_t *num_suffixes);
2090 ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
2091                                 TALLOC_CTX *mem_ctx,
2092                                 char ***ous,
2093                                 size_t *num_ous);
2094 bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx, 
2095                                   const char *extended_dn, 
2096                                   enum ads_extended_dn_flags flags, 
2097                                   DOM_SID *sid);
2098 char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2099 char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2100 char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2101 ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
2102                         uint32 account_type, const char *org_unit);
2103 ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname);
2104 ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
2105                                TALLOC_CTX *mem_ctx,
2106                                const char *samaccountname,
2107                                uint32 *uac_ret,
2108                                const char **dn_ret);
2109 ADS_STATUS ads_config_path(ADS_STRUCT *ads, 
2110                            TALLOC_CTX *mem_ctx, 
2111                            char **config_path);
2112 const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads, 
2113                                                 const char *config_path, 
2114                                                 TALLOC_CTX *mem_ctx, 
2115                                                 const struct GUID *rights_guid);
2116 ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
2117                            ADS_STRUCT *ads,
2118                            const char **account_ou);
2119
2120 /* The following definitions come from libads/ldap_printer.c  */
2121
2122 ADS_STATUS ads_mod_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2123                                  TALLOC_CTX *ctx, const ADS_MODLIST *mods);
2124 ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2125                                         TALLOC_CTX *ctx, ADS_MODLIST *mods);
2126 WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, 
2127                                           TALLOC_CTX *mem_ctx,
2128                                           ADS_MODLIST *mods,
2129                                           const char *printer);
2130 bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
2131                                        ADS_MODLIST *mods,
2132                                        NT_PRINTER_DATA *data);
2133
2134 /* The following definitions come from libads/ldap_schema.c  */
2135
2136 ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
2137                                      const char *schema_path,
2138                                      const char **OIDs, size_t num_OIDs, 
2139                                      char ***OIDs_out, char ***names, size_t *count);
2140 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
2141                                      const char *schema_path, 
2142                                      TALLOC_CTX *mem_ctx, 
2143                                      const struct GUID *schema_guid);
2144 const char *ads_get_attrname_by_oid(ADS_STRUCT *ads, const char *schema_path, TALLOC_CTX *mem_ctx, const char * OID);
2145 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
2146 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
2147                                           ADS_STRUCT *ads,
2148                                           enum wb_posix_mapping map_type,
2149                                           struct posix_schema **s ) ;
2150
2151 /* The following definitions come from libads/ldap_user.c  */
2152
2153 ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user, 
2154                              const char *container, const char *fullname);
2155 ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group, 
2156                               const char *container, const char *comment);
2157
2158 /* The following definitions come from libads/ldap_utils.c  */
2159
2160 ADS_STATUS ads_ranged_search(ADS_STRUCT *ads, 
2161                              TALLOC_CTX *mem_ctx,
2162                              int scope,
2163                              const char *base,
2164                              const char *filter,
2165                              void *args,
2166                              const char *range_attr,
2167                              char ***strings,
2168                              size_t *num_strings);
2169 ADS_STATUS ads_ranged_search_internal(ADS_STRUCT *ads, 
2170                                       TALLOC_CTX *mem_ctx,
2171                                       int scope,
2172                                       const char *base,
2173                                       const char *filter,
2174                                       const char **attrs,
2175                                       void *args,
2176                                       const char *range_attr,
2177                                       char ***strings,
2178                                       size_t *num_strings,
2179                                       uint32 *first_usn,
2180                                       int *num_retries,
2181                                       bool *more_values);
2182
2183 /* The following definitions come from libads/ndr.c  */
2184
2185 void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r);
2186 void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r);
2187
2188 /* The following definitions come from libads/sasl.c  */
2189
2190 ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads);
2191
2192 /* The following definitions come from libads/sasl_wrapping.c  */
2193
2194 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2195                                    const struct ads_saslwrap_ops *ops,
2196                                    void *private_data);
2197 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2198                                    const struct ads_saslwrap_ops *ops,
2199                                    void *private_data);
2200
2201 /* The following definitions come from libads/util.c  */
2202
2203 ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_principal);
2204 ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
2205                                        char **returned_principal);
2206
2207 /* The following definitions come from libgpo/gpext/gpext.c  */
2208
2209 struct gp_extension *get_gp_extension_list(void);
2210 NTSTATUS unregister_gp_extension(const char *name);
2211 NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
2212                                int version,
2213                                const char *name,
2214                                const char *guid,
2215                                struct gp_extension_methods *methods);
2216 NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
2217                                const char *module,
2218                                const char *ext_guid,
2219                                struct gp_extension_reg_table *table,
2220                                struct gp_extension_reg_info *info);
2221 NTSTATUS shutdown_gp_extensions(void);
2222 NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx);
2223 NTSTATUS free_gp_extensions(void);
2224 void debug_gpext_header(int lvl,
2225                         const char *name,
2226                         uint32_t flags,
2227                         struct GROUP_POLICY_OBJECT *gpo,
2228                         const char *extension_guid,
2229                         const char *snapin_guid);
2230 NTSTATUS process_gpo_list_with_extension(ADS_STRUCT *ads,
2231                            TALLOC_CTX *mem_ctx,
2232                            uint32_t flags,
2233                            const struct nt_user_token *token,
2234                            struct GROUP_POLICY_OBJECT *gpo_list,
2235                            const char *extension_guid,
2236                            const char *snapin_guid);
2237 NTSTATUS gpext_process_extension(ADS_STRUCT *ads,
2238                                  TALLOC_CTX *mem_ctx,
2239                                  uint32_t flags,
2240                                  const struct nt_user_token *token,
2241                                  struct registry_key *root_key,
2242                                  struct GROUP_POLICY_OBJECT *gpo,
2243                                  const char *extension_guid,
2244                                  const char *snapin_guid);
2245
2246 /* The following definitions come from libgpo/gpo_fetch.c  */
2247
2248 NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
2249                                  const char *file_sys_path,
2250                                  char **server,
2251                                  char **service,
2252                                  char **nt_path,
2253                                  char **unix_path);
2254 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
2255                          struct cli_state *cli,
2256                          struct GROUP_POLICY_OBJECT *gpo);
2257 NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx,
2258                                     const char *unix_path,
2259                                     uint32_t *sysvol_version,
2260                                     char **display_name);
2261
2262 /* The following definitions come from libgpo/gpo_filesync.c  */
2263
2264 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
2265                        struct cli_state *cli,
2266                        const char *nt_path,
2267                        const char *unix_path);
2268 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
2269                               struct cli_state *cli,
2270                               const char *nt_path,
2271                               const char *local_path);
2272
2273 /* The following definitions come from libgpo/gpo_ini.c  */
2274
2275 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
2276                        const char *filename,
2277                        uint32_t *version,
2278                        char **display_name);
2279
2280 /* The following definitions come from libgpo/gpo_ldap.c  */
2281
2282 bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
2283                       const char *extension_raw,
2284                       struct GP_EXT **gp_ext);
2285 ADS_STATUS ads_get_gpo_link(ADS_STRUCT *ads,
2286                             TALLOC_CTX *mem_ctx,
2287                             const char *link_dn,
2288                             struct GP_LINK *gp_link_struct);
2289 ADS_STATUS ads_add_gpo_link(ADS_STRUCT *ads,
2290                             TALLOC_CTX *mem_ctx,
2291                             const char *link_dn,
2292                             const char *gpo_dn,
2293                             uint32_t gpo_opt);
2294 ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads,
2295                                TALLOC_CTX *mem_ctx,
2296                                const char *link_dn,
2297                                const char *gpo_dn);
2298 ADS_STATUS ads_get_gpo(ADS_STRUCT *ads,
2299                        TALLOC_CTX *mem_ctx,
2300                        const char *gpo_dn,
2301                        const char *display_name,
2302                        const char *guid_name,
2303                        struct GROUP_POLICY_OBJECT *gpo);
2304 ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
2305                              TALLOC_CTX *mem_ctx,
2306                              const char *dn,
2307                              struct nt_user_token **token);
2308 ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
2309                             TALLOC_CTX *mem_ctx,
2310                             const char *dn,
2311                             uint32_t flags,
2312                             const struct nt_user_token *token,
2313                             struct GROUP_POLICY_OBJECT **gpo_list);
2314
2315 /* The following definitions come from libgpo/gpo_reg.c  */
2316
2317 struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
2318 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
2319                        const char *initial_path,
2320                        uint32_t desired_access,
2321                        const struct nt_user_token *token,
2322                        struct gp_registry_context **reg_ctx);
2323 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
2324 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
2325                            const char *subkeyname,
2326                            struct registry_key *curr_key,
2327                            struct registry_key **new_key);
2328 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
2329                           struct gp_registry_context *reg_ctx,
2330                           const char *subkeyname,
2331                           struct registry_key **key);
2332 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
2333                            struct registry_key *key,
2334                            const char *val_name,
2335                            const char *val);
2336 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
2337                           struct registry_key *key,
2338                           const char *val_name,
2339                           const char **val);
2340 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
2341                           uint32_t flags,
2342                           const char *dn,
2343                           const struct nt_user_token *token,
2344                           struct GROUP_POLICY_OBJECT *gpo_list);
2345 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
2346                          uint32_t flags,
2347                          const DOM_SID *sid,
2348                          struct GROUP_POLICY_OBJECT **gpo_list);
2349 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
2350                      uint32_t flags,
2351                      struct registry_key *key,
2352                      const DOM_SID *sid);
2353 void dump_reg_val(int lvl, const char *direction,
2354                   const char *key, const char *subkey,
2355                   struct registry_value *val);
2356 void dump_reg_entry(uint32_t flags,
2357                     const char *dir,
2358                     struct gp_registry_entry *entry);
2359 void dump_reg_entries(uint32_t flags,
2360                       const char *dir,
2361                       struct gp_registry_entry *entries,
2362                       size_t num_entries);
2363 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
2364                                     struct gp_registry_entry *entry,
2365                                     struct gp_registry_entry **entries,
2366                                     size_t *num);
2367 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
2368                                 struct registry_key *root_key,
2369                                 struct gp_registry_context *reg_ctx,
2370                                 struct gp_registry_entry *entry,
2371                                 const struct nt_user_token *token,
2372                                 uint32_t flags);
2373
2374 /* The following definitions come from libgpo/gpo_sec.c  */
2375
2376 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo,
2377                                       const struct nt_user_token *token);
2378
2379 /* The following definitions come from libgpo/gpo_util.c  */
2380
2381 const char *cse_gpo_guid_string_to_name(const char *guid);
2382 const char *cse_gpo_name_to_guid_string(const char *name);
2383 const char *cse_snapin_gpo_guid_string_to_name(const char *guid);
2384 void dump_gp_ext(struct GP_EXT *gp_ext, int debuglevel);
2385 void dump_gpo(ADS_STRUCT *ads,
2386               TALLOC_CTX *mem_ctx,
2387               struct GROUP_POLICY_OBJECT *gpo,
2388               int debuglevel);
2389 void dump_gpo_list(ADS_STRUCT *ads,
2390                    TALLOC_CTX *mem_ctx,
2391                    struct GROUP_POLICY_OBJECT *gpo_list,
2392                    int debuglevel);
2393 void dump_gplink(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct GP_LINK *gp_link);
2394 ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
2395                              TALLOC_CTX *mem_ctx,
2396                              const struct nt_user_token *token,
2397                              struct registry_key *root_key,
2398                              struct GROUP_POLICY_OBJECT *gpo,
2399                              const char *extension_guid_filter,
2400                              uint32_t flags);
2401 ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
2402                                 TALLOC_CTX *mem_ctx,
2403                                 const struct nt_user_token *token,
2404                                 struct GROUP_POLICY_OBJECT *gpo_list,
2405                                 const char *extensions_guid_filter,
2406                                 uint32_t flags);
2407 NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
2408                            TALLOC_CTX *mem_ctx,
2409                            uint32_t flags,
2410                            struct GROUP_POLICY_OBJECT *gpo,
2411                            struct cli_state **cli_out);
2412 NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
2413                                 TALLOC_CTX *mem_ctx,
2414                                 uint32_t flags,
2415                                 struct GROUP_POLICY_OBJECT *gpo_list);
2416 NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx,
2417                            struct GROUP_POLICY_OBJECT *gpo,
2418                            char **unix_path);
2419 char *gpo_flag_str(uint32_t flags);
2420 NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
2421                       uint32_t flags,
2422                       const char *filename,
2423                       const char *suffix,
2424                       const char **filename_out);
2425 ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
2426                                 TALLOC_CTX *mem_ctx,
2427                                 const char *dn,
2428                                 struct nt_user_token **token);
2429
2430 /* The following definitions come from librpc/gen_ndr/ndr_dfs.c  */
2431
2432 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r);
2433 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r);
2434 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r);
2435 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2436 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2437 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r);
2438 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r);
2439 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2440 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2441 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r);
2442 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r);
2443 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r);
2444 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r);
2445 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2446 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2447 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2448 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r);
2449 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r);
2450 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r);
2451 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r);
2452 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r);
2453 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r);
2454 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r);
2455 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r);
2456 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r);
2457 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r);
2458 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r);
2459 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r);
2460 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r);
2461 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r);
2462 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r);
2463 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r);
2464 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r);
2465 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r);
2466 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r);
2467 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r);
2468 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r);
2469 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r);
2470 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r);
2471 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r);
2472 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r);
2473 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r);
2474 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r);
2475 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r);
2476 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r);
2477 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r);
2478 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r);
2479 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r);
2480 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r);
2481 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r);
2482 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r);
2483 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r);
2484 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r);
2485 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r);
2486 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r);
2487 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r);
2488 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r);
2489 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r);
2490 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r);
2491 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r);
2492 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r);
2493 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r);
2494 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r);
2495 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r);
2496 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r);
2497 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r);
2498 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r);
2499 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r);
2500 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r);
2501 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r);
2502 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r);
2503
2504 /* The following definitions come from librpc/gen_ndr/ndr_dssetup.c  */
2505
2506 _PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r);
2507 _PUBLIC_ void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2508 _PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r);
2509 _PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r);
2510 _PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r);
2511 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r);
2512 _PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r);
2513 _PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r);
2514 _PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r);
2515 _PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r);
2516 _PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r);
2517 _PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r);
2518 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r);
2519 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r);
2520 _PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r);
2521 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r);
2522 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r);
2523 _PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r);
2524 _PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r);
2525 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r);
2526 _PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
2527
2528 /* The following definitions come from librpc/gen_ndr/ndr_echo.c  */
2529
2530 _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r);
2531 _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r);
2532 _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r);
2533 _PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r);
2534 _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r);
2535 _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r);
2536 _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r);
2537 _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const union echo_Info *r);
2538 _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum echo_Enum1 r);
2539 _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, enum echo_Enum1_32 r);
2540 _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, const struct echo_Enum2 *r);
2541 _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, const union echo_Enum3 *r);
2542 _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r);
2543 _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, const struct echo_AddOne *r);
2544 _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, const struct echo_EchoData *r);
2545 _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SinkData *r);
2546 _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SourceData *r);
2547 _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall *r);
2548 _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r);
2549 _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSleep *r);
2550 _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r);
2551 _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r);
2552 _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r);
2553
2554 /* The following definitions come from librpc/gen_ndr/ndr_eventlog.c  */
2555
2556 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r);
2557 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r);
2558 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r);
2559 _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, const struct eventlog_Record *r);
2560 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r);
2561 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r);
2562 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r);
2563 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r);
2564 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r);
2565 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r);
2566 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r);
2567 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r);
2568 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r);
2569 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r);
2570 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r);
2571 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r);
2572 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r);
2573 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r);
2574 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r);
2575 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r);
2576 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r);
2577 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r);
2578 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r);
2579 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r);
2580 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r);
2581 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r);
2582 _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
2583 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
2584
2585 /* The following definitions come from librpc/gen_ndr/ndr_initshutdown.c  */
2586
2587 _PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
2588 _PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
2589 _PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
2590 _PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
2591 _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
2592 _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
2593 _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
2594
2595 /* The following definitions come from librpc/gen_ndr/ndr_krb5pac.c  */
2596
2597 _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
2598 _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r);
2599 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
2600 _PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
2601 _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
2602 _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r);
2603 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
2604 _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
2605 _PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r);
2606 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r);
2607 _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r);
2608 _PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r);
2609 _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
2610 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
2611 _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
2612 _PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
2613 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r);
2614 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r);
2615 _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r);
2616 _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r);
2617 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r);
2618 _PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r);
2619 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r);
2620 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r);
2621 _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r);
2622 _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r);
2623 _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r);
2624 _PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r);
2625 _PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r);
2626 _PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r);
2627 _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r);
2628
2629 /* The following definitions come from librpc/gen_ndr/ndr_lsa.c  */
2630
2631 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r);
2632 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r);
2633 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r);
2634 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r);
2635 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r);
2636 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r);
2637 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r);
2638 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r);
2639 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r);
2640 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r);
2641 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r);
2642 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r);
2643 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r);
2644 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r);
2645 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r);
2646 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r);
2647 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r);
2648 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r);
2649 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r);
2650 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r);
2651 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r);
2652 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r);
2653 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r);
2654 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2655 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2656 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
2657 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r);
2658 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r);
2659 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r);
2660 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r);
2661 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r);
2662 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r);
2663 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r);
2664 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r);
2665 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r);
2666 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r);
2667 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r);
2668 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r);
2669 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r);
2670 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r);
2671 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r);
2672 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r);
2673 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r);
2674 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r);
2675 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r);
2676 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r);
2677 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r);
2678 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r);
2679 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r);
2680 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r);
2681 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r);
2682 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r);
2683 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r);
2684 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r);
2685 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
2686 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
2687 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
2688 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
2689 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
2690 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
2691 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
2692 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r);
2693 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
2694 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
2695 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
2696 _PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
2697 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
2698 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
2699 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
2700 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
2701 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r);
2702 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r);
2703 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r);
2704 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r);
2705 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r);
2706 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r);
2707 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r);
2708 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r);
2709 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r);
2710 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r);
2711 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r);
2712 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r);
2713 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r);
2714 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r);
2715 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r);
2716 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r);
2717 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r);
2718 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r);
2719 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r);
2720 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r);
2721 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r);
2722 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r);
2723 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r);
2724 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r);
2725 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r);
2726 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r);
2727 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r);
2728 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r);
2729 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r);
2730 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r);
2731 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r);
2732 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r);
2733 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r);
2734 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r);
2735 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r);
2736 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r);
2737 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r);
2738 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r);
2739 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r);
2740 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r);
2741 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r);
2742 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r);
2743 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r);
2744 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r);
2745 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r);
2746 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r);
2747 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r);
2748 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r);
2749 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r);
2750 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r);
2751 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r);
2752 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r);
2753 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r);
2754 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r);
2755 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r);
2756 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r);
2757 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r);
2758 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r);
2759 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r);
2760 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r);
2761 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r);
2762 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r);
2763 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r);
2764 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r);
2765 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r);
2766 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r);
2767 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r);
2768 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r);
2769 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r);
2770 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r);
2771 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r);
2772 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r);
2773 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r);
2774 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r);
2775 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r);
2776 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r);
2777 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r);
2778 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r);
2779 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r);
2780 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r);
2781 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r);
2782 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r);
2783 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r);
2784 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r);
2785 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r);
2786 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r);
2787 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r);
2788 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r);
2789 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r);
2790 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r);
2791 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r);
2792 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r);
2793 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r);
2794 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r);
2795 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r);
2796 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r);
2797 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r);
2798 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r);
2799 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r);
2800 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r);
2801 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r);
2802 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r);
2803 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r);
2804 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r);
2805 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r);
2806 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r);
2807 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r);
2808 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r);
2809 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r);
2810 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r);
2811 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r);
2812 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
2813 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r);
2814 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r);
2815 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r);
2816 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r);
2817 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r);
2818 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r);
2819 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r);
2820 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r);
2821 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r);
2822 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r);
2823 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r);
2824 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r);
2825 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
2826 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r);
2827 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r);
2828 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r);
2829 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r);
2830 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r);
2831 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r);
2832 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
2833 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
2834 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r);
2835
2836 /* The following definitions come from librpc/gen_ndr/ndr_misc.c  */
2837
2838 _PUBLIC_ enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r);
2839 _PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r);
2840 _PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, int flags);
2841 _PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r);
2842 _PUBLIC_ enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r);
2843 _PUBLIC_ void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r);
2844 _PUBLIC_ enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
2845 _PUBLIC_ enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
2846 _PUBLIC_ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
2847 _PUBLIC_ enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r);
2848 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r);
2849 _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r);
2850 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r);
2851 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r);
2852 _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r);
2853 _PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r);
2854 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r);
2855 _PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r);
2856
2857 /* The following definitions come from librpc/gen_ndr/ndr_nbt.c  */
2858
2859 _PUBLIC_ void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r);
2860 _PUBLIC_ void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r);
2861 _PUBLIC_ void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r);
2862 _PUBLIC_ void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r);
2863 _PUBLIC_ void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r);
2864 _PUBLIC_ void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r);
2865 _PUBLIC_ void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r);
2866 _PUBLIC_ void ndr_print_nbt_rdata_address(struct ndr_print *ndr, const char *name, const struct nbt_rdata_address *r);
2867 _PUBLIC_ void ndr_print_nbt_rdata_netbios(struct ndr_print *ndr, const char *name, const struct nbt_rdata_netbios *r);
2868 _PUBLIC_ void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const struct nbt_statistics *r);
2869 _PUBLIC_ void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r);
2870 _PUBLIC_ void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r);
2871 _PUBLIC_ void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r);
2872 _PUBLIC_ void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r);
2873 _PUBLIC_ void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r);
2874 _PUBLIC_ enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r);
2875 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r);
2876 _PUBLIC_ void ndr_print_nbt_name_packet(struct ndr_print *ndr, const char *name, const struct nbt_name_packet *r);
2877 _PUBLIC_ void ndr_print_dgram_msg_type(struct ndr_print *ndr, const char *name, enum dgram_msg_type r);
2878 _PUBLIC_ void ndr_print_dgram_flags(struct ndr_print *ndr, const char *name, uint8_t r);
2879 _PUBLIC_ void ndr_print_smb_command(struct ndr_print *ndr, const char *name, enum smb_command r);
2880 _PUBLIC_ void ndr_print_smb_trans_body(struct ndr_print *ndr, const char *name, const struct smb_trans_body *r);
2881 _PUBLIC_ void ndr_print_smb_body(struct ndr_print *ndr, const char *name, const union smb_body *r);
2882 _PUBLIC_ enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int ndr_flags, const struct dgram_smb_packet *r);
2883 _PUBLIC_ enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int ndr_flags, struct dgram_smb_packet *r);
2884 _PUBLIC_ void ndr_print_dgram_smb_packet(struct ndr_print *ndr, const char *name, const struct dgram_smb_packet *r);
2885 _PUBLIC_ void ndr_print_dgram_message_body(struct ndr_print *ndr, const char *name, const union dgram_message_body *r);
2886 _PUBLIC_ void ndr_print_dgram_message(struct ndr_print *ndr, const char *name, const struct dgram_message *r);
2887 _PUBLIC_ void ndr_print_dgram_err_code(struct ndr_print *ndr, const char *name, enum dgram_err_code r);
2888 _PUBLIC_ void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union dgram_data *r);
2889 _PUBLIC_ enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r);
2890 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r);
2891 _PUBLIC_ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r);
2892 _PUBLIC_ void ndr_print_nbt_netlogon_command(struct ndr_print *ndr, const char *name, enum nbt_netlogon_command r);
2893 _PUBLIC_ void ndr_print_nbt_netlogon_version(struct ndr_print *ndr, const char *name, uint32_t r);
2894 _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r);
2895 _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc2 *r);
2896 _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r);
2897 _PUBLIC_ void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r);
2898 _PUBLIC_ void ndr_print_nbt_dc_sock_addr(struct ndr_print *ndr, const char *name, const struct nbt_dc_sock_addr *r);
2899 _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc2 *r);
2900 _PUBLIC_ void ndr_print_nbt_db_change(struct ndr_print *ndr, const char *name, const struct nbt_db_change *r);
2901 _PUBLIC_ void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_announce_uas *r);
2902 _PUBLIC_ void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r);
2903 _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r);
2904 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r);
2905 _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r);
2906 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_1(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_1 *r);
2907 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_3(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_3 *r);
2908 _PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_5(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_5 *r);
2909 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_5(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_5 *r);
2910 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_5(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_5 *r);
2911 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_13(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_13 *r);
2912 _PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_15(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_15 *r);
2913 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_15(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_15 *r);
2914 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_15(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_15 *r);
2915 _PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_29(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_29 *r);
2916 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_29(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_29 *r);
2917 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_29(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_29 *r);
2918 _PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon(struct ndr_push *ndr, int ndr_flags, const union nbt_cldap_netlogon *r);
2919 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon(struct ndr_pull *ndr, int ndr_flags, union nbt_cldap_netlogon *r);
2920 _PUBLIC_ void ndr_print_nbt_cldap_netlogon(struct ndr_print *ndr, const char *name, const union nbt_cldap_netlogon *r);
2921 _PUBLIC_ void ndr_print_nbt_ntlogon_command(struct ndr_print *ndr, const char *name, enum nbt_ntlogon_command r);
2922 _PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon *r);
2923 _PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon_reply(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon_reply *r);
2924 _PUBLIC_ void ndr_print_nbt_ntlogon_request(struct ndr_print *ndr, const char *name, const union nbt_ntlogon_request *r);
2925 _PUBLIC_ enum ndr_err_code ndr_push_nbt_ntlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_packet *r);
2926 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_ntlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_packet *r);
2927 _PUBLIC_ void ndr_print_nbt_ntlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_packet *r);
2928 _PUBLIC_ void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r);
2929 _PUBLIC_ void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r);
2930 _PUBLIC_ void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r);
2931 _PUBLIC_ void ndr_print_nbt_browse_election_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_election_request *r);
2932 _PUBLIC_ void ndr_print_nbt_browse_backup_list_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_request *r);
2933 _PUBLIC_ void ndr_print_nbt_browse_backup_list_response(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_response *r);
2934 _PUBLIC_ void ndr_print_nbt_browse_become_backup(struct ndr_print *ndr, const char *name, const struct nbt_browse_become_backup *r);
2935 _PUBLIC_ void ndr_print_nbt_browse_domain_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_domain_announcement *r);
2936 _PUBLIC_ void ndr_print_nbt_browse_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_master_announcement *r);
2937 _PUBLIC_ void ndr_print_nbt_browse_reset_state(struct ndr_print *ndr, const char *name, const struct nbt_browse_reset_state *r);
2938 _PUBLIC_ void ndr_print_nbt_browse_local_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_local_master_announcement *r);
2939 _PUBLIC_ void ndr_print_nbt_browse_payload(struct ndr_print *ndr, const char *name, const union nbt_browse_payload *r);
2940 _PUBLIC_ enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_packet *r);
2941 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_packet *r);
2942 _PUBLIC_ void ndr_print_nbt_browse_packet(struct ndr_print *ndr, const char *name, const struct nbt_browse_packet *r);
2943
2944 /* The following definitions come from librpc/gen_ndr/ndr_netlogon.c  */
2945
2946 _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r);
2947 _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r);
2948 _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r);
2949 _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r);
2950 _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r);
2951 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2952 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2953 _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r);
2954 _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r);
2955 _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
2956 _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
2957 _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
2958 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r);
2959 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r);
2960 _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r);
2961 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
2962 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r);
2963 _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r);
2964 _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r);
2965 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r);
2966 _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r);
2967 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2968 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2969 _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2970 _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r);
2971 _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r);
2972 _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r);
2973 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r);
2974 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r);
2975 _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r);
2976 _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r);
2977 _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r);
2978 _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
2979 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r);
2980 _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r);
2981 _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r);
2982 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r);
2983 _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r);
2984 _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
2985 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r);
2986 _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r);
2987 _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r);
2988 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r);
2989 _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r);
2990 _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r);
2991 _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r);
2992 _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r);
2993 _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r);
2994 _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r);
2995 _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r);
2996 _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r);
2997 _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r);
2998 _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r);
2999 _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r);
3000 _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r);
3001 _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r);
3002 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r);
3003 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r);
3004 _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r);
3005 _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r);
3006 _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r);
3007 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_TRUST *r);
3008 _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r);
3009 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_ACCOUNT *r);
3010 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_SECRET *r);
3011 _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r);
3012 _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r);
3013 _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r);
3014 _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r);
3015 _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r);
3016 _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r);
3017 _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r);
3018 _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r);
3019 _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r);
3020 _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3021 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r);
3022 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r);
3023 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r);
3024 _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r);
3025 _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r);
3026 _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r);
3027 _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3028 _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
3029 _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r);
3030 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r);
3031 _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3032 _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
3033 _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
3034 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
3035 _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r);
3036 _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
3037 _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
3038 _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r);
3039 _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r);
3040 _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r);
3041 _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r);
3042 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r);
3043 _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r);
3044 _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3045 _PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
3046 _PUBLIC_ void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
3047 _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
3048 _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r);
3049 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r);
3050 _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r);
3051 _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r);
3052 _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r);
3053 _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r);
3054 _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r);
3055 _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r);
3056 _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r);
3057 _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r);
3058 _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r);
3059 _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r);
3060 _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r);
3061 _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r);
3062 _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r);
3063 _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r);
3064 _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r);
3065 _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r);
3066 _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r);
3067 _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r);
3068 _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r);
3069 _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r);
3070 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r);
3071 _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r);
3072 _PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r);
3073 _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
3074 _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r);
3075 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
3076 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
3077 _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r);
3078 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r);
3079 _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r);
3080 _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r);
3081 _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r);
3082 _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r);
3083 _PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r);
3084 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r);
3085 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r);
3086 _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
3087 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r);
3088 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r);
3089 _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r);
3090 _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r);
3091 _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r);
3092 _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r);
3093 _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r);
3094 _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r);
3095 _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r);
3096 _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r);
3097 _PUBLIC_ void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r);
3098
3099 /* The following definitions come from librpc/gen_ndr/ndr_notify.c  */
3100
3101 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r);
3102 _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r);
3103 _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r);
3104 _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r);
3105 _PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r);
3106 _PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r);
3107 _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r);
3108 _PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r);
3109 _PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r);
3110 _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r);
3111
3112 /* The following definitions come from librpc/gen_ndr/ndr_ntsvcs.c  */
3113
3114 _PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r);
3115 _PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r);
3116 _PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r);
3117 _PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r);
3118 _PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r);
3119 _PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r);
3120 _PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r);
3121 _PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r);
3122 _PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r);
3123 _PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r);
3124 _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r);
3125 _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r);
3126 _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r);
3127 _PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r);
3128 _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r);
3129 _PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r);
3130 _PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r);
3131 _PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r);
3132 _PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r);
3133 _PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r);
3134 _PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r);
3135 _PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r);
3136 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r);
3137 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r);
3138 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r);
3139 _PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r);
3140 _PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r);
3141 _PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r);
3142 _PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r);
3143 _PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r);
3144 _PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r);
3145 _PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r);
3146 _PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r);
3147 _PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r);
3148 _PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r);
3149 _PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r);
3150 _PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r);
3151 _PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r);
3152 _PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r);
3153 _PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r);
3154 _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r);
3155 _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r);
3156 _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r);
3157 _PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r);
3158 _PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r);
3159 _PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r);
3160 _PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r);
3161 _PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r);
3162 _PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r);
3163 _PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r);
3164 _PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r);
3165 _PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r);
3166 _PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r);
3167 _PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r);
3168 _PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r);
3169 _PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r);
3170 _PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r);
3171 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r);
3172 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r);
3173 _PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r);
3174 _PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r);
3175 _PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r);
3176 _PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r);
3177 _PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r);
3178 _PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r);
3179 _PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r);
3180
3181 /* The following definitions come from librpc/gen_ndr/ndr_samr.c  */
3182
3183 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3184 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3185 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3186 _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3187 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3188 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3189 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3190 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3191 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r);
3192 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r);
3193 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r);
3194 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3195 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3196 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
3197 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
3198 _PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r);
3199 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
3200 _PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r);
3201 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
3202 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
3203 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
3204 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
3205 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
3206 _PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r);
3207 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
3208 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
3209 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
3210 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r);
3211 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3212 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3213 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r);
3214 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r);
3215 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r);
3216 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r);
3217 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r);
3218 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r);
3219 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r);
3220 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r);
3221 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r);
3222 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r);
3223 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r);
3224 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r);
3225 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r);
3226 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r);
3227 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r);
3228 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r);
3229 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r);
3230 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r);
3231 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r);
3232 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r);
3233 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r);
3234 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r);
3235 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r);
3236 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r);
3237 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r);
3238 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r);
3239 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r);
3240 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r);
3241 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
3242 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
3243 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
3244 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r);
3245 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r);
3246 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3247 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r);
3248 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r);
3249 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r);
3250 _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r);
3251 _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r);
3252 _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r);
3253 _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r);
3254 _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r);
3255 _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r);
3256 _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r);
3257 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r);
3258 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r);
3259 _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r);
3260 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r);
3261 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r);
3262 _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r);
3263 _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r);
3264 _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r);
3265 _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r);
3266 _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r);
3267 _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r);
3268 _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r);
3269 _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r);
3270 _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r);
3271 _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r);
3272 _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r);
3273 _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r);
3274 _PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r);
3275 _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r);
3276 _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r);
3277 _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3278 _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r);
3279 _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r);
3280 _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r);
3281 _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r);
3282 _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r);
3283 _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r);
3284 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r);
3285 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r);
3286 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r);
3287 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r);
3288 _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r);
3289 _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r);
3290 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r);
3291 _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r);
3292 _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r);
3293 _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r);
3294 _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r);
3295 _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r);
3296 _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r);
3297 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r);
3298 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r);
3299 _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r);
3300 _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r);
3301 _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r);
3302 _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r);
3303 _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r);
3304 _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r);
3305 _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r);
3306 _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r);
3307 _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r);
3308 _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r);
3309 _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r);
3310 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r);
3311 _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r);
3312 _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r);
3313 _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r);
3314 _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r);
3315 _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r);
3316 _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r);
3317 _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r);
3318 _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r);
3319 _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r);
3320 _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r);
3321 _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r);
3322 _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r);
3323 _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r);
3324 _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r);
3325 _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r);
3326 _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r);
3327 _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r);
3328 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r);
3329 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r);
3330 _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r);
3331 _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r);
3332 _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r);
3333 _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r);
3334 _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r);
3335 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r);
3336 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r);
3337 _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r);
3338 _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r);
3339 _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r);
3340 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r);
3341 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r);
3342 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r);
3343 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r);
3344 _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r);
3345 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r);
3346 _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r);
3347 _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r);
3348 _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r);
3349 _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r);
3350 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r);
3351 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r);
3352 _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r);
3353 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r);
3354 _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r);
3355 _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r);
3356 _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r);
3357 _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r);
3358 _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r);
3359 _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r);
3360 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r);
3361 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r);
3362 _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r);
3363 _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r);
3364 _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r);
3365 _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r);
3366 _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r);
3367 _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r);
3368 _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r);
3369 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r);
3370 _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r);
3371 _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r);
3372 _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r);
3373 _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r);
3374
3375 /* The following definitions come from librpc/gen_ndr/ndr_security.c  */
3376
3377 _PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r);
3378 _PUBLIC_ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r);
3379 _PUBLIC_ void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r);
3380 _PUBLIC_ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r);
3381 _PUBLIC_ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r);
3382 _PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r);
3383 _PUBLIC_ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r);
3384 _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r);
3385 _PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r);
3386 _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r);
3387 _PUBLIC_ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r);
3388 _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r);
3389 _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r);
3390 _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r);
3391 _PUBLIC_ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r);
3392 _PUBLIC_ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r);
3393 _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r);
3394 _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r);
3395 _PUBLIC_ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r);
3396 _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r);
3397 _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r);
3398 _PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r);
3399 _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr_flags, const struct security_token *r);
3400 _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r);
3401 _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r);
3402 _PUBLIC_ enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3403 _PUBLIC_ enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3404 _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r);
3405
3406 /* The following definitions come from librpc/gen_ndr/ndr_srvsvc.c  */
3407
3408 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r);
3409 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r);
3410 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r);
3411 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r);
3412 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r);
3413 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r);
3414 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r);
3415 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r);
3416 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r);
3417 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r);
3418 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r);
3419 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r);
3420 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r);
3421 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r);
3422 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r);
3423 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r);
3424 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r);
3425 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r);
3426 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r);
3427 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r);
3428 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r);
3429 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r);
3430 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r);
3431 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r);
3432 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r);
3433 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r);
3434 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r);
3435 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r);
3436 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r);
3437 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r);
3438 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r);
3439 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r);
3440 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r);
3441 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r);
3442 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r);
3443 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r);
3444 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r);
3445 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r);
3446 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r);
3447 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r);
3448 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r);
3449 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r);
3450 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r);
3451 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r);
3452 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r);
3453 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r);
3454 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r);
3455 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r);
3456 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r);
3457 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r);
3458 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r);
3459 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r);
3460 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r);
3461 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r);
3462 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r);
3463 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r);
3464 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r);
3465 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r);
3466 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r);
3467 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r);
3468 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r);
3469 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r);
3470 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r);
3471 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r);
3472 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r);
3473 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r);
3474 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r);
3475 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r);
3476 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r);
3477 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r);
3478 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r);
3479 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r);
3480 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r);
3481 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r);
3482 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r);
3483 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r);
3484 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r);
3485 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r);
3486 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r);
3487 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r);
3488 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r);
3489 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r);
3490 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r);
3491 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r);
3492 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r);
3493 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r);
3494 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r);
3495 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r);
3496 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r);
3497 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r);
3498 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r);
3499 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r);
3500 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r);
3501 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r);
3502 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r);
3503 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r);
3504 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r);
3505 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r);
3506 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r);
3507 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r);
3508 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r);
3509 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r);
3510 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r);
3511 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r);
3512 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r);
3513 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r);
3514 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r);
3515 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r);
3516 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r);
3517 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r);
3518 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r);
3519 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r);
3520 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r);
3521 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r);
3522 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r);
3523 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r);
3524 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r);
3525 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r);
3526 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r);
3527 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r);
3528 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r);
3529 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r);
3530 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r);
3531 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r);
3532 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r);
3533 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r);
3534 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r);
3535 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r);
3536 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r);
3537 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r);
3538 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r);
3539 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r);
3540 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r);
3541 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r);
3542 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r);
3543 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r);
3544 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r);
3545 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r);
3546 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r);
3547 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r);
3548 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r);
3549 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r);
3550 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r);
3551 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r);
3552 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r);
3553 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r);
3554 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r);
3555 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r);
3556 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r);
3557 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r);
3558 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r);
3559 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r);
3560 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r);
3561 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r);
3562 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r);
3563 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r);
3564 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r);
3565 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r);
3566 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r);
3567 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r);
3568 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r);
3569 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r);
3570 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r);
3571 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r);
3572 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r);
3573 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r);
3574 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r);
3575 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r);
3576 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r);
3577 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r);
3578 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r);
3579 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r);
3580 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r);
3581 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r);
3582 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r);
3583 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r);
3584 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r);
3585 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r);
3586 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r);
3587 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r);
3588 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r);
3589 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r);
3590 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
3591 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
3592 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
3593 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r);
3594 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r);
3595 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r);
3596 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r);
3597 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
3598 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
3599 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
3600
3601 /* The following definitions come from librpc/gen_ndr/ndr_svcctl.c  */
3602
3603 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r);
3604 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r);
3605 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r);
3606 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3607 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3608 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
3609 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3610 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3611 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
3612 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
3613 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
3614 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r);
3615 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r);
3616 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r);
3617 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r);
3618 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r);
3619 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r);
3620 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r);
3621 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r);
3622 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r);
3623 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r);
3624 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r);
3625 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r);
3626 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r);
3627 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r);
3628 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r);
3629 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r);
3630 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r);
3631 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r);
3632 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r);
3633 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r);
3634 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r);
3635 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r);
3636 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r);
3637 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r);
3638 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r);
3639 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r);
3640 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r);
3641 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r);
3642 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r);
3643 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r);
3644 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r);
3645 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r);
3646 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r);
3647 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r);
3648 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r);
3649 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r);
3650 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r);
3651 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r);
3652 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r);
3653 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r);
3654 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r);
3655
3656 /* The following definitions come from librpc/gen_ndr/ndr_winreg.c  */
3657
3658 _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3659 _PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
3660 _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r);
3661 _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r);
3662 _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r);
3663 _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r);
3664 _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
3665 _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
3666 _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
3667 _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
3668 _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
3669 _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
3670 _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
3671 _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r);
3672 _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r);
3673 _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r);
3674 _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r);
3675 _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r);
3676 _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r);
3677 _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r);
3678 _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r);
3679 _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r);
3680 _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r);
3681 _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r);
3682 _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r);
3683 _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r);
3684 _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r);
3685 _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r);
3686 _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r);
3687 _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r);
3688 _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r);
3689 _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r);
3690 _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKey *r);
3691 _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetKeySecurity *r);
3692 _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetValue *r);
3693 _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r);
3694 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r);
3695 _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r);
3696 _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r);
3697 _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r);
3698 _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r);
3699 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r);
3700 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r);
3701 _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r);
3702 _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPT *r);
3703 _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPN *r);
3704 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r);
3705
3706 /* The following definitions come from librpc/gen_ndr/ndr_wkssvc.c  */
3707
3708 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo100 *r);
3709 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo101 *r);
3710 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo102 *r);
3711 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo502 *r);
3712 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1010 *r);
3713 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1011 *r);
3714 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1012 *r);
3715 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1013 *r);
3716 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1018 *r);
3717 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1023 *r);
3718 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1027 *r);
3719 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1028(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1028 *r);
3720 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1032(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1032 *r);
3721 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1033 *r);
3722 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1041(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1041 *r);
3723 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1042(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1042 *r);
3724 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1043(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1043 *r);
3725 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1044(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1044 *r);
3726 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1045(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1045 *r);
3727 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1046(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1046 *r);
3728 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1047(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1047 *r);
3729 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1048(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1048 *r);
3730 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1049(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1049 *r);
3731 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1050(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1050 *r);
3732 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1051(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1051 *r);
3733 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1052(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1052 *r);
3734 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1053(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1053 *r);
3735 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1054(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1054 *r);
3736 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1055(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1055 *r);
3737 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1056(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1056 *r);
3738 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1057(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1057 *r);
3739 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1058(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1058 *r);
3740 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1059(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1059 *r);
3741 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1060(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1060 *r);
3742 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1061(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1061 *r);
3743 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1062(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1062 *r);
3744 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaInfo *r);
3745 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo0 *r);
3746 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr0 *r);
3747 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1 *r);
3748 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr1 *r);
3749 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaEnumUsersCtr *r);
3750 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersInfo *r);
3751 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1101 *r);
3752 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetrWkstaUserInfo *r);
3753 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo0 *r);
3754 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportCtr0 *r);
3755 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaTransportCtr *r);
3756 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo *r);
3757 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo3(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo3 *r);
3758 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo2 *r);
3759 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo1 *r);
3760 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo0 *r);
3761 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfoCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseGetInfoCtr *r);
3762 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr2 *r);
3763 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr1 *r);
3764 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr0 *r);
3765 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseEnumCtr *r);
3766 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumInfo *r);
3767 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatistics(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWorkstationStatistics *r);
3768 _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *name, uint32_t r);
3769 _PUBLIC_ void ndr_print_wkssvc_NetValidateNameType(struct ndr_print *ndr, const char *name, enum wkssvc_NetValidateNameType r);
3770 _PUBLIC_ void ndr_print_wkssvc_NetJoinStatus(struct ndr_print *ndr, const char *name, enum wkssvc_NetJoinStatus r);
3771 _PUBLIC_ void ndr_print_wkssvc_PasswordBuffer(struct ndr_print *ndr, const char *name, const struct wkssvc_PasswordBuffer *r);
3772 _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name, uint32_t r);
3773 _PUBLIC_ void ndr_print_wkssvc_ComputerNameType(struct ndr_print *ndr, const char *name, enum wkssvc_ComputerNameType r);
3774 _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const char *name, const struct wkssvc_ComputerNamesCtr *r);
3775 _PUBLIC_ void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaGetInfo *r);
3776 _PUBLIC_ void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaSetInfo *r);
3777 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaEnumUsers *r);
3778 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserGetInfo *r);
3779 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserSetInfo *r);
3780 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaTransportEnum *r);
3781 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportAdd *r);
3782 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportDel *r);
3783 _PUBLIC_ void ndr_print_wkssvc_NetrUseAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseAdd *r);
3784 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseGetInfo *r);
3785 _PUBLIC_ void ndr_print_wkssvc_NetrUseDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseDel *r);
3786 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseEnum *r);
3787 _PUBLIC_ void ndr_print_wkssvc_NetrMessageBufferSend(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrMessageBufferSend *r);
3788 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWorkstationStatisticsGet *r);
3789 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameAdd *r);
3790 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameDel *r);
3791 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain *r);
3792 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain *r);
3793 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain *r);
3794 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName *r);
3795 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinInformation *r);
3796 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus *r);
3797 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain2 *r);
3798 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain2 *r);
3799 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain2 *r);
3800 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName2 *r);
3801 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus2 *r);
3802 _PUBLIC_ void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrAddAlternateComputerName *r);
3803 _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRemoveAlternateComputerName *r);
3804 _PUBLIC_ void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrSetPrimaryComputername *r);
3805 _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrEnumerateComputerNames *r);
3806
3807 /* The following definitions come from librpc/gen_ndr/ndr_xattr.c  */
3808
3809 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r);
3810 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r);
3811 _PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r);
3812 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r);
3813 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r);
3814 _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r);
3815
3816 /* The following definitions come from librpc/gen_ndr/srv_dfs.c  */
3817
3818 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3819 NTSTATUS rpc_netdfs_init(void);
3820
3821 /* The following definitions come from librpc/gen_ndr/srv_dssetup.c  */
3822
3823 void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns);
3824 NTSTATUS rpc_dssetup_init(void);
3825
3826 /* The following definitions come from librpc/gen_ndr/srv_echo.c  */
3827
3828 void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns);
3829 NTSTATUS rpc_rpcecho_init(void);
3830
3831 /* The following definitions come from librpc/gen_ndr/srv_eventlog.c  */
3832
3833 void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns);
3834 NTSTATUS rpc_eventlog_init(void);
3835
3836 /* The following definitions come from librpc/gen_ndr/srv_initshutdown.c  */
3837
3838 void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns);
3839 NTSTATUS rpc_initshutdown_init(void);
3840
3841 /* The following definitions come from librpc/gen_ndr/srv_lsa.c  */
3842
3843 void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3844 NTSTATUS rpc_lsarpc_init(void);
3845
3846 /* The following definitions come from librpc/gen_ndr/srv_netlogon.c  */
3847
3848 void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns);
3849 NTSTATUS rpc_netlogon_init(void);
3850
3851 /* The following definitions come from librpc/gen_ndr/srv_ntsvcs.c  */
3852
3853 void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3854 NTSTATUS rpc_ntsvcs_init(void);
3855
3856 /* The following definitions come from librpc/gen_ndr/srv_samr.c  */
3857
3858 void samr_get_pipe_fns(struct api_struct **fns, int *n_fns);
3859 NTSTATUS rpc_samr_init(void);
3860
3861 /* The following definitions come from librpc/gen_ndr/srv_srvsvc.c  */
3862
3863 void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3864 NTSTATUS rpc_srvsvc_init(void);
3865
3866 /* The following definitions come from librpc/gen_ndr/srv_svcctl.c  */
3867
3868 void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns);
3869 NTSTATUS rpc_svcctl_init(void);
3870
3871 /* The following definitions come from librpc/gen_ndr/srv_winreg.c  */
3872
3873 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns);
3874 NTSTATUS rpc_winreg_init(void);
3875
3876 /* The following definitions come from librpc/gen_ndr/srv_wkssvc.c  */
3877
3878 void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3879 NTSTATUS rpc_wkssvc_init(void);
3880
3881 /* The following definitions come from librpc/ndr/ndr.c  */
3882
3883 _PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n);
3884 _PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience);
3885 _PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
3886 _PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save);
3887 _PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save);
3888 _PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
3889 _PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
3890 _PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
3891 _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3892 _PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3893 _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
3894 _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3895 _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
3896 _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);
3897 _PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3898 _PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
3899                                 ndr_print_function_t fn, const char *name, 
3900                                 int flags, void *ptr);
3901 _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags);
3902 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
3903 const char *ndr_errstr(enum ndr_err_code err);
3904 _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
3905                                  enum ndr_err_code ndr_err,
3906                                  const char *format, ...) _PRINTF_ATTRIBUTE(3,4);
3907 _PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
3908                                  enum ndr_err_code ndr_err,
3909                                  const char *format, ...)  _PRINTF_ATTRIBUTE(3,4);
3910 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
3911                                    struct ndr_pull **_subndr,
3912                                    size_t header_size,
3913                                    ssize_t size_is);
3914 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr,
3915                                  struct ndr_pull *subndr,
3916                                  size_t header_size,
3917                                  ssize_t size_is);
3918 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
3919                                    struct ndr_push **_subndr,
3920                                    size_t header_size,
3921                                    ssize_t size_is);
3922 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr,
3923                                  struct ndr_push *subndr,
3924                                  size_t header_size,
3925                                  ssize_t size_is);
3926 _PUBLIC_ enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx,
3927                          struct ndr_token_list **list, 
3928                          const void *key, 
3929                          uint32_t value);
3930 _PUBLIC_ enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
3931                                    comparison_fn_t _cmp_fn, bool _remove_tok);
3932 _PUBLIC_ enum ndr_err_code ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v);
3933 _PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key);
3934 _PUBLIC_ enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p);
3935 _PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p);
3936 _PUBLIC_ enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size);
3937 _PUBLIC_ enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p);
3938 _PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p);
3939 _PUBLIC_ enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length);
3940 _PUBLIC_ enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val);
3941 _PUBLIC_ enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val);
3942 _PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val);
3943 _PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p);
3944 _PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
3945 _PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p);
3946 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p, ndr_pull_flags_fn_t fn);
3947 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
3948                                                     struct smb_iconv_convenience *iconv_convenience,
3949                                                     void *p, ndr_pull_flags_fn_t fn);
3950 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3951                              uint32_t level, ndr_pull_flags_fn_t fn);
3952 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3953                              uint32_t level, ndr_pull_flags_fn_t fn);
3954 _PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const void *p, ndr_push_flags_fn_t fn);
3955 _PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3956                              uint32_t level, ndr_push_flags_fn_t fn);
3957 _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
3958 _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
3959 _PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
3960 _PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset);
3961 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset);
3962 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p);
3963 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
3964 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p);
3965 _PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
3966 _PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
3967 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset);
3968 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p);
3969 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset);
3970 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p);
3971
3972 /* The following definitions come from librpc/ndr/ndr_basic.c  */
3973
3974 _PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n);
3975 _PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v);
3976 _PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v);
3977 _PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v);
3978 _PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v);
3979 _PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v);
3980 _PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v);
3981 _PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v);
3982 _PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v);
3983 _PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3984 _PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3985 _PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v);
3986 _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3987 _PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v);
3988 _PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status);
3989 _PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status);
3990 _PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r);
3991 _PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status);
3992 _PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status);
3993 _PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r);
3994 _PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n);
3995 _PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n);
3996 _PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v);
3997 _PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v);
3998 _PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v);
3999 _PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v);
4000 _PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v);
4001 _PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v);
4002 _PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4003 _PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4004 _PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v);
4005 _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4006 _PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v);
4007 _PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size);
4008 _PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
4009 _PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n);
4010 _PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
4011 _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n);
4012 _PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save);
4013 _PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save);
4014 _PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p);
4015 _PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p);
4016 _PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr);
4017 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4018 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4019 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4020 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4021 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4022 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4023 _PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t);
4024 _PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t);
4025 _PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address);
4026 _PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address);
4027 _PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, 
4028                            const char *address);
4029 _PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type);
4030 _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 
4031                     const char *val, uint32_t value);
4032 _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
4033 _PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v);
4034 _PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v);
4035 _PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v);
4036 _PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v);
4037 _PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v);
4038 _PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v);
4039 _PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v);
4040 _PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v);
4041 _PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v);
4042 _PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v);
4043 _PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v);
4044 _PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p);
4045 _PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t);
4046 _PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t);
4047 _PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t);
4048 _PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t);
4049 _PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type);
4050 _PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level);
4051 _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 
4052                            const uint8_t *data, uint32_t count);
4053 _PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r);
4054 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob);
4055 _PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob);
4056 _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags);
4057 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
4058 _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
4059
4060 /* The following definitions come from librpc/ndr/ndr_krb5pac.c  */
4061
4062 enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
4063 enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
4064 void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
4065
4066 /* The following definitions come from librpc/ndr/ndr_misc.c  */
4067
4068 bool all_zero(const uint8_t *ptr, size_t size);
4069 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
4070 bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,
4071                          const struct ndr_syntax_id *i2);
4072 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
4073 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
4074 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
4075
4076 /* The following definitions come from librpc/ndr/ndr_sec_helper.c  */
4077
4078 size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags);
4079 size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
4080 size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
4081 size_t ndr_size_security_ace(const struct security_ace *ace, int flags);
4082 size_t ndr_size_security_acl(const struct security_acl *acl, int flags);
4083 size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags);
4084 void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4085 void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4086 void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4087 void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4088
4089 /* The following definitions come from librpc/ndr/ndr_string.c  */
4090
4091 _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s);
4092 _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, const char *s);
4093 _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s);
4094 _PUBLIC_ void ndr_print_string(struct ndr_print *ndr, const char *name, const char *s);
4095 _PUBLIC_ uint32_t ndr_size_string(int ret, const char * const* string, int flags) ;
4096 _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_flags, const char ***_a);
4097 _PUBLIC_ enum ndr_err_code ndr_push_string_array(struct ndr_push *ndr, int ndr_flags, const char **a);
4098 _PUBLIC_ void ndr_print_string_array(struct ndr_print *ndr, const char *name, const char **a);
4099 _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size);
4100 _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size);
4101 _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset);
4102 _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset);
4103 _PUBLIC_ uint32_t ndr_charset_length(const void *var, charset_t chset);
4104
4105 /* The following definitions come from librpc/ndr/sid.c  */
4106
4107 enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r);
4108 enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r);
4109 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
4110 enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4111 enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4112 enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4113 enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4114 enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4115 enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4116
4117 /* The following definitions come from librpc/ndr/uuid.c  */
4118
4119 _PUBLIC_ NTSTATUS GUID_from_string(const char *s, struct GUID *guid);
4120 _PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);
4121 struct GUID GUID_random(void);
4122 _PUBLIC_ struct GUID GUID_zero(void);
4123 _PUBLIC_ bool GUID_all_zero(const struct GUID *u);
4124 _PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2);
4125 _PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2);
4126 _PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4127 _PUBLIC_ char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4128 _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4129 _PUBLIC_ bool policy_handle_empty(struct policy_handle *h) ;
4130
4131 /* The following definitions come from librpc/rpc/binding.c  */
4132
4133 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4134 _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
4135 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
4136 _PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax);
4137 const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4138 enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
4139 _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower);
4140 _PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 
4141                                    struct epm_tower *tower, 
4142                                    struct dcerpc_binding **b_out);
4143 _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower);
4144
4145 /* The following definitions come from librpc/rpc/dcerpc.c  */
4146
4147 struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct GUID *object, 
4148                                             const struct ndr_interface_table *table, uint32_t opnum, 
4149                                             TALLOC_CTX *mem_ctx, void *r);
4150 NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req);
4151 _PUBLIC_ NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, 
4152                                       const char *binding_string, const struct ndr_interface_table *table, 
4153                                       struct cli_credentials *credentials, struct event_context *ev, 
4154                                       struct loadparm_context *lp_ctx);
4155
4156 /* The following definitions come from libsmb/asn1.c  */
4157
4158 void asn1_free(ASN1_DATA *data);
4159 bool asn1_write(ASN1_DATA *data, const void *p, int len);
4160 bool asn1_write_uint8(ASN1_DATA *data, uint8 v);
4161 bool asn1_push_tag(ASN1_DATA *data, uint8 tag);
4162 bool asn1_pop_tag(ASN1_DATA *data);
4163 bool asn1_write_Integer(ASN1_DATA *data, int i);
4164 bool asn1_write_OID(ASN1_DATA *data, const char *OID);
4165 bool asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length);
4166 bool asn1_write_GeneralString(ASN1_DATA *data, const char *s);
4167 bool asn1_write_BOOLEAN(ASN1_DATA *data, bool v);
4168 bool asn1_write_BOOLEAN2(ASN1_DATA *data, bool v);
4169 bool asn1_check_BOOLEAN(ASN1_DATA *data, bool v);
4170 bool asn1_load(ASN1_DATA *data, DATA_BLOB blob);
4171 bool asn1_read(ASN1_DATA *data, void *p, int len);
4172 bool asn1_read_uint8(ASN1_DATA *data, uint8 *v);
4173 bool asn1_check_tag(ASN1_DATA *data, uint8 tag);
4174 bool asn1_start_tag(ASN1_DATA *data, uint8 tag);
4175 bool asn1_end_tag(ASN1_DATA *data);
4176 int asn1_tag_remaining(ASN1_DATA *data);
4177 bool asn1_read_OID(ASN1_DATA *data, char **OID);
4178 bool asn1_check_OID(ASN1_DATA *data, const char *OID);
4179 bool asn1_read_GeneralString(ASN1_DATA *data, char **s);
4180 bool asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob);
4181 bool asn1_read_Integer(ASN1_DATA *data, int *i);
4182 bool asn1_check_enumerated(ASN1_DATA *data, int v);
4183 bool asn1_write_enumerated(ASN1_DATA *data, uint8 v);
4184 bool ber_write_OID_String(DATA_BLOB *blob, const char *OID);
4185 bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID);
4186
4187 /* The following definitions come from libsmb/cliconnect.c  */
4188
4189 ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, 
4190                               const char *pass, const char *user_domain,
4191                                     const char * dest_realm);
4192
4193 NTSTATUS cli_session_setup(struct cli_state *cli,
4194                            const char *user,
4195                            const char *pass, int passlen,
4196                            const char *ntpass, int ntpasslen,
4197                            const char *workgroup);
4198 bool cli_ulogoff(struct cli_state *cli);
4199 bool cli_send_tconX(struct cli_state *cli, 
4200                     const char *share, const char *dev, const char *pass, int passlen);
4201 bool cli_tdis(struct cli_state *cli);
4202 void cli_negprot_send(struct cli_state *cli);
4203 bool cli_negprot(struct cli_state *cli);
4204 bool cli_session_request(struct cli_state *cli,
4205                          struct nmb_name *calling, struct nmb_name *called);
4206 NTSTATUS cli_connect(struct cli_state *cli,
4207                 const char *host,
4208                 struct sockaddr_storage *dest_ss);
4209 NTSTATUS cli_start_connection(struct cli_state **output_cli, 
4210                               const char *my_name, 
4211                               const char *dest_host, 
4212                               struct sockaddr_storage *dest_ss, int port,
4213                               int signing_state, int flags,
4214                               bool *retry) ;
4215 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
4216                              const char *my_name, 
4217                              const char *dest_host, 
4218                              struct sockaddr_storage *dest_ss, int port,
4219                              const char *service, const char *service_type,
4220                              const char *user, const char *domain, 
4221                              const char *password, int flags,
4222                              int signing_state,
4223                              bool *retry) ;
4224 bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
4225                                      struct sockaddr_storage *pdest_ss);
4226 NTSTATUS cli_raw_tcon(struct cli_state *cli, 
4227                       const char *service, const char *pass, const char *dev,
4228                       uint16 *max_xmit, uint16 *tid);
4229 struct cli_state *get_ipc_connect(char *server,
4230                                 struct sockaddr_storage *server_ss,
4231                                 const struct user_auth_info *user_info);
4232 struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
4233                                 struct ip_service *mb_ip,
4234                                 const struct user_auth_info *user_info,
4235                                 char **pp_workgroup_out);
4236 struct cli_state *get_ipc_connect_master_ip_bcast(TALLOC_CTX *ctx,
4237                                         const struct user_auth_info *user_info,
4238                                         char **pp_workgroup_out);
4239
4240 /* The following definitions come from libsmb/clidfs.c  */
4241
4242 NTSTATUS cli_cm_force_encryption(struct cli_state *c,
4243                         const char *username,
4244                         const char *password,
4245                         const char *domain,
4246                         const char *sharename);
4247 const char *cli_cm_get_mntpoint(struct cli_state *c);
4248 struct cli_state *cli_cm_open(TALLOC_CTX *ctx,
4249                                 struct cli_state *referring_cli,
4250                                 const char *server,
4251                                 const char *share,
4252                                 bool show_hdr,
4253                                 bool force_encrypt);
4254 void cli_cm_shutdown(void);
4255 void cli_cm_display(void);
4256 void cli_cm_set_credentials(void);
4257 void cli_cm_set_port(int port_number);
4258 void cli_cm_set_dest_name_type(int type);
4259 void cli_cm_set_signing_state(int state);
4260 void cli_cm_set_username(const char *username);
4261 void cli_cm_set_password(const char *newpass);
4262 void cli_cm_set_use_kerberos(void);
4263 void cli_cm_set_fallback_after_kerberos(void);
4264 void cli_cm_set_dest_ss(struct sockaddr_storage *pss);
4265 bool cli_dfs_get_referral(TALLOC_CTX *ctx,
4266                         struct cli_state *cli,
4267                         const char *path,
4268                         CLIENT_DFS_REFERRAL**refs,
4269                         size_t *num_refs,
4270                         uint16 *consumed);
4271 bool cli_resolve_path(TALLOC_CTX *ctx,
4272                         const char *mountpt,
4273                         struct cli_state *rootcli,
4274                         const char *path,
4275                         struct cli_state **targetcli,
4276                         char **pp_targetpath);
4277
4278 /* The following definitions come from libsmb/clidgram.c  */
4279
4280 bool cli_send_mailslot(struct messaging_context *msg_ctx,
4281                        bool unique, const char *mailslot,
4282                        uint16 priority,
4283                        char *buf, int len,
4284                        const char *srcname, int src_type,
4285                        const char *dstname, int dest_type,
4286                        const struct sockaddr_storage *dest_ss);
4287 bool send_getdc_request(TALLOC_CTX *mem_ctx,
4288                         struct messaging_context *msg_ctx,
4289                         struct sockaddr_storage *dc_ss,
4290                         const char *domain_name,
4291                         const DOM_SID *sid,
4292                         uint32_t nt_version);
4293 bool receive_getdc_response(TALLOC_CTX *mem_ctx,
4294                             struct sockaddr_storage *dc_ss,
4295                             const char *domain_name,
4296                             uint32_t *nt_version,
4297                             const char **dc_name,
4298                             union nbt_cldap_netlogon **reply);
4299
4300 /* The following definitions come from libsmb/clientgen.c  */
4301
4302 int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
4303 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
4304 int cli_set_port(struct cli_state *cli, int port);
4305 bool cli_receive_smb(struct cli_state *cli);
4306 ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len);
4307 bool cli_receive_smb_readX_header(struct cli_state *cli);
4308 bool cli_send_smb(struct cli_state *cli);
4309 bool cli_send_smb_direct_writeX(struct cli_state *cli,
4310                                 const char *p,
4311                                 size_t extradata);
4312 void cli_setup_packet_buf(struct cli_state *cli, char *buf);
4313 void cli_setup_packet(struct cli_state *cli);
4314 void cli_setup_bcc(struct cli_state *cli, void *p);
4315 void cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password);
4316 void cli_setup_signing_state(struct cli_state *cli, int signing_state);
4317 struct cli_state *cli_initialise(void);
4318 void cli_nt_pipes_close(struct cli_state *cli);
4319 void cli_shutdown(struct cli_state *cli);
4320 void cli_sockopt(struct cli_state *cli, const char *options);
4321 uint16 cli_setpid(struct cli_state *cli, uint16 pid);
4322 bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
4323 bool cli_send_keepalive(struct cli_state *cli);
4324 struct async_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
4325                                 struct cli_state *cli, uint16_t num_echos,
4326                                 DATA_BLOB data);
4327 NTSTATUS cli_echo_recv(struct async_req *req);
4328 NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data);
4329
4330 /* The following definitions come from libsmb/clierror.c  */
4331
4332 const char *cli_errstr(struct cli_state *cli);
4333 NTSTATUS cli_nt_error(struct cli_state *cli);
4334 void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode);
4335 int cli_errno(struct cli_state *cli);
4336 bool cli_is_error(struct cli_state *cli);
4337 bool cli_is_nt_error(struct cli_state *cli);
4338 bool cli_is_dos_error(struct cli_state *cli);
4339 NTSTATUS cli_get_nt_error(struct cli_state *cli);
4340 void cli_set_nt_error(struct cli_state *cli, NTSTATUS status);
4341 void cli_reset_error(struct cli_state *cli);
4342
4343 /* The following definitions come from libsmb/clifile.c  */
4344
4345 uint32 unix_perms_to_wire(mode_t perms);
4346 mode_t wire_perms_to_unix(uint32 perms);
4347 bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf);
4348 bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf);
4349 bool cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname);
4350 bool cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname);
4351 bool cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode);
4352 bool cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid);
4353 bool cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4354 bool cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4355 bool cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4356 bool cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs);
4357 bool cli_unlink(struct cli_state *cli, const char *fname);
4358 bool cli_mkdir(struct cli_state *cli, const char *dname);
4359 bool cli_rmdir(struct cli_state *cli, const char *dname);
4360 int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag);
4361 int cli_nt_create_full(struct cli_state *cli, const char *fname,
4362                  uint32 CreatFlags, uint32 DesiredAccess,
4363                  uint32 FileAttributes, uint32 ShareAccess,
4364                  uint32 CreateDisposition, uint32 CreateOptions,
4365                  uint8 SecuityFlags);
4366 int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess);
4367 uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str);
4368 struct async_req *cli_open_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
4369                                 struct cli_state *cli,
4370                                 const char *fname, int flags, int share_mode);
4371 NTSTATUS cli_open_recv(struct async_req *req, int *fnum);
4372 int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4373 struct async_req *cli_close_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
4374                                  struct cli_state *cli, int fnum);
4375 NTSTATUS cli_close_recv(struct async_req *req);
4376 bool cli_close(struct cli_state *cli, int fnum);
4377 bool cli_ftruncate(struct cli_state *cli, int fnum, uint64_t size);
4378 NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
4379                       uint32 offset, uint32 len,
4380                       int timeout, unsigned char locktype);
4381 bool cli_lock(struct cli_state *cli, int fnum,
4382               uint32 offset, uint32 len, int timeout, enum brl_type lock_type);
4383 bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len);
4384 bool cli_lock64(struct cli_state *cli, int fnum,
4385                 SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type);
4386 bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4387 bool cli_posix_lock(struct cli_state *cli, int fnum,
4388                         SMB_BIG_UINT offset, SMB_BIG_UINT len,
4389                         bool wait_lock, enum brl_type lock_type);
4390 bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4391 bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen);
4392 bool cli_getattrE(struct cli_state *cli, int fd,
4393                   uint16 *attr, SMB_OFF_T *size,
4394                   time_t *change_time,
4395                   time_t *access_time,
4396                   time_t *write_time);
4397 bool cli_getatr(struct cli_state *cli, const char *fname,
4398                 uint16 *attr, SMB_OFF_T *size, time_t *write_time);
4399 bool cli_setattrE(struct cli_state *cli, int fd,
4400                   time_t change_time,
4401                   time_t access_time,
4402                   time_t write_time);
4403 bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t);
4404 bool cli_chkpath(struct cli_state *cli, const char *path);
4405 bool cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
4406 int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path);
4407 NTSTATUS cli_raw_ioctl(struct cli_state *cli, int fnum, uint32 code, DATA_BLOB *blob);
4408 bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len);
4409 bool cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len);
4410 bool cli_get_ea_list_path(struct cli_state *cli, const char *path,
4411                 TALLOC_CTX *ctx,
4412                 size_t *pnum_eas,
4413                 struct ea_struct **pea_list);
4414 bool cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
4415                 TALLOC_CTX *ctx,
4416                 size_t *pnum_eas,
4417                 struct ea_struct **pea_list);
4418 int cli_posix_open(struct cli_state *cli, const char *fname, int flags, mode_t mode);
4419 int cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode);
4420 bool cli_posix_unlink(struct cli_state *cli, const char *fname);
4421 int cli_posix_rmdir(struct cli_state *cli, const char *fname);
4422
4423 /* The following definitions come from libsmb/clifsinfo.c  */
4424
4425 bool cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
4426                                         uint32 *pcaplow, uint32 *pcaphigh);
4427 bool cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
4428                                         uint32 caplow, uint32 caphigh);
4429 bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr);
4430 bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number);
4431 bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate);
4432 NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli, 
4433                                 const char *user,
4434                                 const char *pass,
4435                                 const char *domain);
4436 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4437 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4438 NTSTATUS cli_force_encryption(struct cli_state *c,
4439                         const char *username,
4440                         const char *password,
4441                         const char *domain);
4442
4443 /* The following definitions come from libsmb/clikrb5.c  */
4444
4445 bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx, 
4446                            DATA_BLOB *edata, 
4447                            DATA_BLOB *edata_out);
4448 bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data);
4449 int cli_krb5_get_ticket(const char *principal, time_t time_offset, 
4450                         DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, 
4451                         uint32 extra_ap_opts, const char *ccname, 
4452                         time_t *tgs_expire);
4453
4454 /* The following definitions come from libsmb/clilist.c  */
4455
4456 int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
4457                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4458 int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
4459                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4460 int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
4461              void (*fn)(const char *, file_info *, const char *, void *), void *state);
4462
4463 /* The following definitions come from libsmb/climessage.c  */
4464
4465 int cli_message_start_build(struct cli_state *cli, const char *host, const char *username);
4466 bool cli_message_start(struct cli_state *cli, const char *host, const char *username,
4467                               int *grp);
4468 int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int grp);
4469 bool cli_message_text(struct cli_state *cli, const char *msg, int len, int grp);
4470 int cli_message_end_build(struct cli_state *cli, int grp);
4471 bool cli_message_end(struct cli_state *cli, int grp);
4472
4473 /* The following definitions come from libsmb/clioplock.c  */
4474
4475 bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level);
4476 void cli_oplock_handler(struct cli_state *cli, 
4477                         bool (*handler)(struct cli_state *, int, unsigned char));
4478
4479 /* The following definitions come from libsmb/cliprint.c  */
4480
4481 int cli_print_queue(struct cli_state *cli,
4482                     void (*fn)(struct print_job_info *));
4483 int cli_printjob_del(struct cli_state *cli, int job);
4484 int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4485 bool cli_spl_close(struct cli_state *cli, int fnum);
4486
4487 /* The following definitions come from libsmb/cliquota.c  */
4488
4489 bool cli_get_quota_handle(struct cli_state *cli, int *quota_fnum);
4490 void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list);
4491 bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4492 bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4493 bool cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list);
4494 bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4495 bool cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4496 void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4497 void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4498
4499 /* The following definitions come from libsmb/clirap.c  */
4500
4501 bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
4502                   uint16 *setup, uint32 setup_count, uint32 max_setup_count,
4503                   char *params, uint32 param_count, uint32 max_param_count,
4504                   char *data, uint32 data_count, uint32 max_data_count,
4505                   char **rparam, uint32 *rparam_count,
4506                   char **rdata, uint32 *rdata_count);
4507 bool cli_api(struct cli_state *cli,
4508              char *param, int prcnt, int mprcnt,
4509              char *data, int drcnt, int mdrcnt,
4510              char **rparam, unsigned int *rprcnt,
4511              char **rdata, unsigned int *rdrcnt);
4512 bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
4513 int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
4514 bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
4515                        void (*fn)(const char *, uint32, const char *, void *),
4516                        void *state);
4517 bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
4518                              const char *old_password);
4519 bool cli_qpathinfo(struct cli_state *cli,
4520                         const char *fname,
4521                         time_t *change_time,
4522                         time_t *access_time,
4523                         time_t *write_time,
4524                         SMB_OFF_T *size,
4525                         uint16 *mode);
4526 bool cli_setpathinfo(struct cli_state *cli, const char *fname,
4527                      time_t create_time,
4528                      time_t access_time,
4529                      time_t write_time,
4530                      time_t change_time,
4531                      uint16 mode);
4532 bool cli_qpathinfo2(struct cli_state *cli, const char *fname,
4533                     struct timespec *create_time,
4534                     struct timespec *access_time,
4535                     struct timespec *write_time,
4536                     struct timespec *change_time,
4537                     SMB_OFF_T *size, uint16 *mode,
4538                     SMB_INO_T *ino);
4539 bool cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
4540                            TALLOC_CTX *mem_ctx,
4541                            unsigned int *pnum_streams,
4542                            struct stream_struct **pstreams);
4543 bool cli_qfilename(struct cli_state *cli, int fnum, char *name, size_t namelen);
4544 bool cli_qfileinfo(struct cli_state *cli, int fnum,
4545                    uint16 *mode, SMB_OFF_T *size,
4546                    struct timespec *create_time,
4547                    struct timespec *access_time,
4548                    struct timespec *write_time,
4549                    struct timespec *change_time,
4550                    SMB_INO_T *ino);
4551 bool cli_qpathinfo_basic( struct cli_state *cli, const char *name,
4552                           SMB_STRUCT_STAT *sbuf, uint32 *attributes );
4553 bool cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen);
4554 NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
4555
4556 /* The following definitions come from libsmb/clirap2.c  */
4557
4558 int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
4559 int cli_NetGroupAdd(struct cli_state *cli, RAP_GROUP_INFO_1 *grinfo);
4560 int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4561 int cli_RNetGroupEnum0(struct cli_state *cli,
4562                        void (*fn)(const char *, void *),
4563                        void *state);
4564 int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
4565 int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
4566 int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
4567 int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
4568 int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
4569 int cli_NetUserAdd(struct cli_state *cli, RAP_USER_INFO_1 * userinfo );
4570 int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
4571 int cli_RNetUserEnum0(struct cli_state *cli,
4572                       void (*fn)(const char *, void *),
4573                       void *state);
4574 int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
4575 int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
4576 int cli_NetFileEnum(struct cli_state *cli, const char * user,
4577                     const char * base_path,
4578                     void (*fn)(const char *, const char *, uint16, uint16,
4579                                uint32));
4580 int cli_NetShareAdd(struct cli_state *cli, RAP_SHARE_INFO_2 * sinfo );
4581 int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
4582 bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
4583 bool cli_get_server_domain(struct cli_state *cli);
4584 bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
4585 bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4586                          char **servername);
4587 bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
4588 bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
4589 int cli_NetPrintQEnum(struct cli_state *cli,
4590                 void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4591                 void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4592 int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
4593         void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4594         void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4595 int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4596 int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, uint, uint, uint, char *));
4597 int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
4598                 void (*fn)(const char *, const char *, uint16, uint16, uint16, uint, uint, uint, const char *));
4599 int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
4600 int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
4601                         void (*fn)(uint16_t conid, uint16_t contype,
4602                                 uint16_t numopens, uint16_t numusers,
4603                                 uint32_t contime, const char *username,
4604                                 const char *netname));
4605
4606 /* The following definitions come from libsmb/clireadwrite.c  */
4607
4608 struct async_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
4609                                      struct event_context *ev,
4610                                      struct cli_state *cli, int fnum,
4611                                      off_t offset, size_t size);
4612 NTSTATUS cli_read_andx_recv(struct async_req *req, ssize_t *received,
4613                             uint8_t **rcvbuf);
4614 struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx,
4615                                 struct event_context *ev,
4616                                 struct cli_state *cli,
4617                                 uint16_t fnum, off_t start_offset,
4618                                 SMB_OFF_T size, size_t window_size,
4619                                 NTSTATUS (*sink)(char *buf, size_t n,
4620                                                  void *priv),
4621                                 void *priv);
4622 NTSTATUS cli_pull_recv(struct async_req *req, SMB_OFF_T *received);
4623 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
4624                   off_t start_offset, SMB_OFF_T size, size_t window_size,
4625                   NTSTATUS (*sink)(char *buf, size_t n, void *priv),
4626                   void *priv, SMB_OFF_T *received);
4627 ssize_t cli_read(struct cli_state *cli, int fnum, char *buf,
4628                  off_t offset, size_t size);
4629 ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
4630 ssize_t cli_write(struct cli_state *cli,
4631                  int fnum, uint16 write_mode,
4632                  const char *buf, off_t offset, size_t size);
4633 ssize_t cli_smbwrite(struct cli_state *cli,
4634                      int fnum, char *buf, off_t offset, size_t size1);
4635
4636 /* The following definitions come from libsmb/clisecdesc.c  */
4637
4638 SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, 
4639                             TALLOC_CTX *mem_ctx);
4640 bool cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd);
4641
4642 /* The following definitions come from libsmb/clispnego.c  */
4643
4644 DATA_BLOB spnego_gen_negTokenInit(char guid[16], 
4645                                   const char *OIDs[], 
4646                                   const char *principal);
4647 DATA_BLOB gen_negTokenInit(const char *OID, DATA_BLOB blob);
4648 bool spnego_parse_negTokenInit(DATA_BLOB blob,
4649                                char *OIDs[ASN1_MAX_OIDS], 
4650                                char **principal);
4651 DATA_BLOB gen_negTokenTarg(const char *OIDs[], DATA_BLOB blob);
4652 bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob);
4653 DATA_BLOB spnego_gen_krb5_wrap(const DATA_BLOB ticket, const uint8 tok_id[2]);
4654 bool spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2]);
4655 int spnego_gen_negTokenTarg(const char *principal, int time_offset, 
4656                             DATA_BLOB *targ, 
4657                             DATA_BLOB *session_key_krb5, uint32 extra_ap_opts,
4658                             time_t *expire_time);
4659 bool spnego_parse_challenge(const DATA_BLOB blob,
4660                             DATA_BLOB *chal1, DATA_BLOB *chal2);
4661 DATA_BLOB spnego_gen_auth(DATA_BLOB blob);
4662 bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth);
4663 DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status,
4664                                    const char *mechOID);
4665 bool spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
4666                                 const char *mechOID,
4667                                 DATA_BLOB *auth);
4668
4669 /* The following definitions come from libsmb/clistr.c  */
4670
4671 size_t clistr_push_fn(const char *function,
4672                         unsigned int line,
4673                         struct cli_state *cli,
4674                         void *dest,
4675                         const char *src,
4676                         int dest_len,
4677                         int flags);
4678 size_t clistr_pull_fn(const char *function,
4679                         unsigned int line,
4680                         struct cli_state *cli,
4681                         char *dest,
4682                         const void *src,
4683                         int dest_len,
4684                         int src_len,
4685                         int flags);
4686 size_t clistr_pull_talloc_fn(const char *function,
4687                                 unsigned int line,
4688                                 TALLOC_CTX *ctx,
4689                                 struct cli_state *cli,
4690                                 char **pp_dest,
4691                                 const void *src,
4692                                 int src_len,
4693                                 int flags);
4694 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
4695 size_t clistr_align_in(struct cli_state *cli, const void *p, int flags);
4696
4697 /* The following definitions come from libsmb/clitrans.c  */
4698
4699 bool cli_send_trans(struct cli_state *cli, int trans,
4700                     const char *pipe_name,
4701                     int fid, int flags,
4702                     uint16 *setup, unsigned int lsetup, unsigned int msetup,
4703                     const char *param, unsigned int lparam, unsigned int mparam,
4704                     const char *data, unsigned int ldata, unsigned int mdata);
4705 bool cli_receive_trans(struct cli_state *cli,int trans,
4706                               char **param, unsigned int *param_len,
4707                               char **data, unsigned int *data_len);
4708 bool cli_send_nt_trans(struct cli_state *cli,
4709                        int function,
4710                        int flags,
4711                        uint16 *setup, unsigned int lsetup, unsigned int msetup,
4712                        char *param, unsigned int lparam, unsigned int mparam,
4713                        char *data, unsigned int ldata, unsigned int mdata);
4714 bool cli_receive_nt_trans(struct cli_state *cli,
4715                           char **param, unsigned int *param_len,
4716                           char **data, unsigned int *data_len);
4717 struct async_req *cli_trans_send(
4718         TALLOC_CTX *mem_ctx, struct event_context *ev,
4719         struct cli_state *cli, uint8_t trans_cmd,
4720         const char *pipe_name, uint16_t fid, uint16_t function, int flags,
4721         uint16_t *setup, uint8_t num_setup, uint8_t max_setup,
4722         uint8_t *param, uint32_t num_param, uint32_t max_param,
4723         uint8_t *data, uint32_t num_data, uint32_t max_data);
4724 NTSTATUS cli_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
4725                         uint16_t **setup, uint8_t *num_setup,
4726                         uint8_t **param, uint32_t *num_param,
4727                         uint8_t **data, uint32_t *num_data);
4728 NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4729                    uint8_t trans_cmd,
4730                    const char *pipe_name, uint16_t fid, uint16_t function,
4731                    int flags,
4732                    uint16_t *setup, uint8_t num_setup, uint8_t max_setup,
4733                    uint8_t *param, uint32_t num_param, uint32_t max_param,
4734                    uint8_t *data, uint32_t num_data, uint32_t max_data,
4735                    uint16_t **rsetup, uint8_t *num_rsetup,
4736                    uint8_t **rparam, uint32_t *num_rparam,
4737                    uint8_t **rdata, uint32_t *num_rdata);
4738
4739 /* The following definitions come from libsmb/conncache.c  */
4740
4741 NTSTATUS check_negative_conn_cache_timeout( const char *domain, const char *server, unsigned int failed_cache_timeout );
4742 NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
4743 void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
4744 void delete_negative_conn_cache(const char *domain, const char *server);
4745 void flush_negative_conn_cache( void );
4746 void flush_negative_conn_cache_for_domain(const char *domain);
4747
4748 /* The following definitions come from libsmb/credentials.c  */
4749
4750 char *credstr(const unsigned char *cred);
4751 void creds_server_init(uint32 neg_flags,
4752                         struct dcinfo *dc,
4753                         struct netr_Credential *clnt_chal,
4754                         struct netr_Credential *srv_chal,
4755                         const unsigned char mach_pw[16],
4756                         struct netr_Credential *init_chal_out);
4757 bool netlogon_creds_server_check(const struct dcinfo *dc,
4758                                  const struct netr_Credential *rcv_cli_chal_in);
4759 bool netlogon_creds_server_step(struct dcinfo *dc,
4760                                 const struct netr_Authenticator *received_cred,
4761                                 struct netr_Authenticator *cred_out);
4762 void creds_client_init(uint32 neg_flags,
4763                         struct dcinfo *dc,
4764                         struct netr_Credential *clnt_chal,
4765                         struct netr_Credential *srv_chal,
4766                         const unsigned char mach_pw[16],
4767                         struct netr_Credential *init_chal_out);
4768 bool netlogon_creds_client_check(const struct dcinfo *dc,
4769                                  const struct netr_Credential *rcv_srv_chal_in);
4770 void netlogon_creds_client_step(struct dcinfo *dc,
4771                                 struct netr_Authenticator *next_cred_out);
4772
4773 /* The following definitions come from libsmb/dcerpc_err.c  */
4774
4775 const char *dcerpc_errstr(uint32 fault_code);
4776
4777 /* The following definitions come from libsmb/doserr.c  */
4778
4779 const char *dos_errstr(WERROR werror);
4780 const char *get_friendly_werror_msg(WERROR werror);
4781 const char *win_errstr(WERROR werror);
4782
4783 /* The following definitions come from libsmb/dsgetdcname.c  */
4784
4785 void debug_dsdcinfo_flags(int lvl, uint32_t flags);
4786 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
4787                      struct messaging_context *msg_ctx,
4788                      const char *domain_name,
4789                      struct GUID *domain_guid,
4790                      const char *site_name,
4791                      uint32_t flags,
4792                      struct netr_DsRGetDCNameInfo **info);
4793
4794 /* The following definitions come from libsmb/errormap.c  */
4795
4796 NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode);
4797 void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode);
4798 NTSTATUS werror_to_ntstatus(WERROR error);
4799 WERROR ntstatus_to_werror(NTSTATUS error);
4800 NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor);
4801
4802 /* The following definitions come from libsmb/namecache.c  */
4803
4804 bool namecache_enable(void);
4805 bool namecache_shutdown(void);
4806 bool namecache_store(const char *name,
4807                         int name_type,
4808                         int num_names,
4809                         struct ip_service *ip_list);
4810 bool namecache_fetch(const char *name,
4811                         int name_type,
4812                         struct ip_service **ip_list,
4813                         int *num_names);
4814 bool namecache_delete(const char *name, int name_type);
4815 void namecache_flush(void);
4816 bool namecache_status_store(const char *keyname, int keyname_type,
4817                 int name_type, const struct sockaddr_storage *keyip,
4818                 const char *srvname);
4819 bool namecache_status_fetch(const char *keyname,
4820                                 int keyname_type,
4821                                 int name_type,
4822                                 const struct sockaddr_storage *keyip,
4823                                 char *srvname_out);
4824
4825 /* The following definitions come from libsmb/namequery.c  */
4826
4827 bool saf_store( const char *domain, const char *servername );
4828 bool saf_delete( const char *domain );
4829 char *saf_fetch( const char *domain );
4830 NODE_STATUS_STRUCT *node_status_query(int fd,
4831                                         struct nmb_name *name,
4832                                         const struct sockaddr_storage *to_ss,
4833                                         int *num_names,
4834                                         struct node_status_extra *extra);
4835 bool name_status_find(const char *q_name,
4836                         int q_type,
4837                         int type,
4838                         const struct sockaddr_storage *to_ss,
4839                         fstring name);
4840 int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2);
4841 struct sockaddr_storage *name_query(int fd,
4842                         const char *name,
4843                         int name_type,
4844                         bool bcast,
4845                         bool recurse,
4846                         const struct sockaddr_storage *to_ss,
4847                         int *count,
4848                         int *flags,
4849                         bool *timed_out);
4850 XFILE *startlmhosts(const char *fname);
4851 bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
4852                 struct sockaddr_storage *pss);
4853 void endlmhosts(XFILE *fp);
4854 NTSTATUS name_resolve_bcast(const char *name,
4855                         int name_type,
4856                         struct ip_service **return_iplist,
4857                         int *return_count);
4858 NTSTATUS resolve_wins(const char *name,
4859                 int name_type,
4860                 struct ip_service **return_iplist,
4861                 int *return_count);
4862 NTSTATUS internal_resolve_name(const char *name,
4863                                 int name_type,
4864                                 const char *sitename,
4865                                 struct ip_service **return_iplist,
4866                                 int *return_count,
4867                                 const char *resolve_order);
4868 bool resolve_name(const char *name,
4869                 struct sockaddr_storage *return_ss,
4870                 int name_type);
4871 NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
4872                 const char *name,
4873                 int name_type,
4874                 struct sockaddr_storage **return_ss_arr,
4875                 unsigned int *p_num_entries);
4876 bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
4877 bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
4878 NTSTATUS get_sorted_dc_list( const char *domain,
4879                         const char *sitename,
4880                         struct ip_service **ip_list,
4881                         int *count,
4882                         bool ads_only );
4883 NTSTATUS get_kdc_list( const char *realm,
4884                         const char *sitename,
4885                         struct ip_service **ip_list,
4886                         int *count);
4887
4888 /* The following definitions come from libsmb/namequery_dc.c  */
4889
4890 bool get_dc_name(const char *domain,
4891                 const char *realm,
4892                 fstring srv_name,
4893                 struct sockaddr_storage *ss_out);
4894
4895 /* The following definitions come from libsmb/nmblib.c  */
4896
4897 void debug_nmb_packet(struct packet_struct *p);
4898 void put_name(char *dest, const char *name, int pad, unsigned int name_type);
4899 char *nmb_namestr(const struct nmb_name *n);
4900 struct packet_struct *copy_packet(struct packet_struct *packet);
4901 void free_packet(struct packet_struct *packet);
4902 struct packet_struct *parse_packet(char *buf,int length,
4903                                    enum packet_type packet_type,
4904                                    struct in_addr ip,
4905                                    int port);
4906 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
4907 void make_nmb_name( struct nmb_name *n, const char *name, int type);
4908 bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
4909 int build_packet(char *buf, size_t buflen, struct packet_struct *p);
4910 bool send_packet(struct packet_struct *p);
4911 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
4912 struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id);
4913 struct packet_struct *receive_dgram_packet(int fd, int t,
4914                 const char *mailslot_name);
4915 bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
4916 int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
4917 void sort_query_replies(char *data, int n, struct in_addr ip);
4918 int name_mangle( char *In, char *Out, char name_type );
4919 int name_extract(char *buf,int ofs, fstring name);
4920 int name_len(char *s1);
4921
4922 /* The following definitions come from libsmb/nterr.c  */
4923
4924 const char *nt_errstr(NTSTATUS nt_code);
4925 const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
4926 const char *get_nt_error_c_code(NTSTATUS nt_code);
4927 NTSTATUS nt_status_string_to_code(char *nt_status_str);
4928 NTSTATUS nt_status_squash(NTSTATUS nt_status);
4929
4930 /* The following definitions come from libsmb/ntlm_check.c  */
4931
4932 NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
4933                              const DATA_BLOB *challenge,
4934                              const DATA_BLOB *lm_response,
4935                              const DATA_BLOB *nt_response,
4936                              const DATA_BLOB *lm_interactive_pwd,
4937                              const DATA_BLOB *nt_interactive_pwd,
4938                              const char *username, 
4939                              const char *client_username, 
4940                              const char *client_domain,
4941                              const uint8 *lm_pw, const uint8 *nt_pw, 
4942                              DATA_BLOB *user_sess_key, 
4943                              DATA_BLOB *lm_sess_key);
4944
4945 /* The following definitions come from libsmb/ntlmssp.c  */
4946
4947 void debug_ntlmssp_flags(uint32 neg_flags);
4948 NTSTATUS ntlmssp_set_username(NTLMSSP_STATE *ntlmssp_state, const char *user) ;
4949 NTSTATUS ntlmssp_set_hashes(NTLMSSP_STATE *ntlmssp_state,
4950                 const unsigned char lm_hash[16],
4951                 const unsigned char nt_hash[16]) ;
4952 NTSTATUS ntlmssp_set_password(NTLMSSP_STATE *ntlmssp_state, const char *password) ;
4953 NTSTATUS ntlmssp_set_domain(NTLMSSP_STATE *ntlmssp_state, const char *domain) ;
4954 NTSTATUS ntlmssp_set_workstation(NTLMSSP_STATE *ntlmssp_state, const char *workstation) ;
4955 NTSTATUS ntlmssp_store_response(NTLMSSP_STATE *ntlmssp_state,
4956                                 DATA_BLOB response) ;
4957 void ntlmssp_want_feature_list(NTLMSSP_STATE *ntlmssp_state, char *feature_list);
4958 void ntlmssp_want_feature(NTLMSSP_STATE *ntlmssp_state, uint32 feature);
4959 NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state, 
4960                         const DATA_BLOB in, DATA_BLOB *out) ;
4961 void ntlmssp_end(NTLMSSP_STATE **ntlmssp_state);
4962 DATA_BLOB ntlmssp_weaken_keys(NTLMSSP_STATE *ntlmssp_state, TALLOC_CTX *mem_ctx);
4963 NTSTATUS ntlmssp_server_start(NTLMSSP_STATE **ntlmssp_state);
4964 NTSTATUS ntlmssp_client_start(NTLMSSP_STATE **ntlmssp_state);
4965
4966 /* The following definitions come from libsmb/ntlmssp_parse.c  */
4967
4968 bool msrpc_gen(DATA_BLOB *blob,
4969                const char *format, ...);
4970 bool msrpc_parse(const DATA_BLOB *blob,
4971                  const char *format, ...);
4972
4973 /* The following definitions come from libsmb/ntlmssp_sign.c  */
4974
4975 NTSTATUS ntlmssp_sign_packet(NTLMSSP_STATE *ntlmssp_state,
4976                                     const uchar *data, size_t length, 
4977                                     const uchar *whole_pdu, size_t pdu_length, 
4978                                     DATA_BLOB *sig) ;
4979 NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
4980                                 const uchar *data, size_t length, 
4981                                 const uchar *whole_pdu, size_t pdu_length, 
4982                                 const DATA_BLOB *sig) ;
4983 NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
4984                              uchar *data, size_t length,
4985                              uchar *whole_pdu, size_t pdu_length,
4986                              DATA_BLOB *sig);
4987 NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
4988                                 uchar *data, size_t length,
4989                                 uchar *whole_pdu, size_t pdu_length,
4990                                 DATA_BLOB *sig);
4991 NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state);
4992
4993 /* The following definitions come from libsmb/passchange.c  */
4994
4995 NTSTATUS remote_password_change(const char *remote_machine, const char *user_name, 
4996                                 const char *old_passwd, const char *new_passwd,
4997                                 char **err_str);
4998
4999 /* The following definitions come from libsmb/pwd_cache.c  */
5000
5001 void pwd_set_cleartext(struct pwd_info *pwd, const char *clr);
5002 void pwd_get_cleartext(struct pwd_info *pwd, fstring clr);
5003
5004 /* The following definitions come from libsmb/samlogon_cache.c  */
5005
5006 bool netsamlogon_cache_init(void);
5007 bool netsamlogon_cache_shutdown(void);
5008 void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3);
5009 bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
5010 struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid);
5011 bool netsamlogon_cache_have(const DOM_SID *user_sid);
5012
5013 /* The following definitions come from libsmb/smb_seal.c  */
5014
5015 NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16 *p_enc_ctx_num);
5016 bool common_encryption_on(struct smb_trans_enc_state *es);
5017 NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf);
5018 NTSTATUS common_ntlm_encrypt_buffer(NTLMSSP_STATE *ntlmssp_state,
5019                                 uint16 enc_ctx_num,
5020                                 char *buf,
5021                                 char **ppbuf_out);
5022 NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, char **buf_out);
5023 NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf);
5024 void common_free_encryption_state(struct smb_trans_enc_state **pp_es);
5025 void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
5026 bool cli_encryption_on(struct cli_state *cli);
5027 void cli_free_encryption_context(struct cli_state *cli);
5028 void cli_free_enc_buffer(struct cli_state *cli, char *buf);
5029 NTSTATUS cli_decrypt_message(struct cli_state *cli);
5030 NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
5031
5032 /* The following definitions come from libsmb/smb_signing.c  */
5033
5034 bool cli_simple_set_signing(struct cli_state *cli,
5035                             const DATA_BLOB user_session_key,
5036                             const DATA_BLOB response);
5037 bool cli_null_set_signing(struct cli_state *cli);
5038 bool cli_temp_set_signing(struct cli_state *cli);
5039 void cli_free_signing_context(struct cli_state *cli);
5040 void cli_calculate_sign_mac(struct cli_state *cli, char *buf);
5041 bool cli_check_sign_mac(struct cli_state *cli, char *buf);
5042 bool client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid);
5043 bool client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid);
5044 bool client_is_signing_on(struct cli_state *cli);
5045 bool srv_oplock_set_signing(bool onoff);
5046 bool srv_check_sign_mac(const char *inbuf, bool must_be_ok);
5047 void srv_calculate_sign_mac(char *outbuf);
5048 void srv_defer_sign_response(uint16 mid);
5049 void srv_cancel_sign_response(uint16 mid);
5050 void srv_set_signing_negotiated(void);
5051 bool srv_is_signing_active(void);
5052 bool srv_is_signing_negotiated(void);
5053 bool srv_signing_started(void);
5054 void srv_set_signing(const DATA_BLOB user_session_key, const DATA_BLOB response);
5055
5056 /* The following definitions come from libsmb/smbdes.c  */
5057
5058 void des_crypt56(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
5059 void E_P16(const unsigned char *p14,unsigned char *p16);
5060 void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24);
5061 void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out);
5062 void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out);
5063 void des_crypt128(unsigned char out[8], const unsigned char in[8], const unsigned char key[16]);
5064 void des_crypt64(unsigned char out[8], const unsigned char in[8], const unsigned char key[8]);
5065 void des_crypt112(unsigned char out[8], const unsigned char in[8], const unsigned char key[14], int forw);
5066 void cred_hash3(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
5067 void des_crypt112_16(unsigned char out[16], unsigned char in[16], const unsigned char key[14], int forw);
5068 void SamOEMhash( unsigned char *data, const unsigned char key[16], size_t len);
5069 void SamOEMhashBlob( unsigned char *data, size_t len, DATA_BLOB *key);
5070 void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw);
5071
5072 /* The following definitions come from libsmb/smbencrypt.c  */
5073
5074 void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24]);
5075 bool SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24]);
5076 void E_md4hash(const char *passwd, uchar p16[16]);
5077 void E_md5hash(const uchar salt[16], const uchar nthash[16], uchar hash_out[16]);
5078 bool E_deshash(const char *passwd, uchar p16[16]);
5079 void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar p16[16]);
5080 bool ntv2_owf_gen(const uchar owf[16],
5081                   const char *user_in, const char *domain_in,
5082                   bool upper_case_domain, /* Transform the domain into UPPER case */
5083                   uchar kr_buf[16]);
5084 void SMBOWFencrypt(const uchar passwd[16], const uchar *c8, uchar p24[24]);
5085 void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p24[24]);
5086 void SMBNTencrypt_hash(const uchar nt_hash[16], uchar *c8, uchar *p24);
5087 void SMBNTencrypt(const char *passwd, uchar *c8, uchar *p24);
5088 void SMBOWFencrypt_ntv2(const uchar kr[16],
5089                         const DATA_BLOB *srv_chal,
5090                         const DATA_BLOB *cli_chal,
5091                         uchar resp_buf[16]);
5092 void SMBsesskeygen_ntv2(const uchar kr[16],
5093                         const uchar * nt_resp, uint8 sess_key[16]);
5094 void SMBsesskeygen_ntv1(const uchar kr[16],
5095                         const uchar * nt_resp, uint8 sess_key[16]);
5096 void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16],
5097                         const uchar lm_resp[24], /* only uses 8 */ 
5098                         uint8 sess_key[16]);
5099 DATA_BLOB NTLMv2_generate_names_blob(const char *hostname, 
5100                                      const char *domain);
5101 bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16], 
5102                       const DATA_BLOB *server_chal, 
5103                       const DATA_BLOB *names_blob,
5104                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5105                       DATA_BLOB *user_session_key) ;
5106 bool SMBNTLMv2encrypt(const char *user, const char *domain, const char *password, 
5107                       const DATA_BLOB *server_chal, 
5108                       const DATA_BLOB *names_blob,
5109                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5110                       DATA_BLOB *user_session_key) ;
5111 bool encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags);
5112 bool decode_pw_buffer(TALLOC_CTX *ctx,
5113                         uint8 in_buffer[516],
5114                         char **pp_new_pwrd,
5115                         uint32 *new_pw_len,
5116                         int string_flags);
5117 void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key);
5118 void sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *session_key, int forward);
5119 char *decrypt_trustdom_secret(uint8_t nt_hash[16], DATA_BLOB *data_in);
5120 void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5121                                         const char *pwd,
5122                                         DATA_BLOB *session_key,
5123                                         struct wkssvc_PasswordBuffer **pwd_buf);
5124 WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5125                                           struct wkssvc_PasswordBuffer *pwd_buf,
5126                                           DATA_BLOB *session_key,
5127                                           char **pwd);
5128 DATA_BLOB decrypt_drsuapi_blob(TALLOC_CTX *mem_ctx,
5129                                const DATA_BLOB *session_key,
5130                                bool rcrypt,
5131                                uint32_t rid,
5132                                const DATA_BLOB *buffer);
5133
5134 /* The following definitions come from libsmb/smberr.c  */
5135
5136 const char *smb_dos_err_name(uint8 e_class, uint16 num);
5137 const char *get_dos_error_msg(WERROR result);
5138 const char *smb_dos_err_class(uint8 e_class);
5139 char *smb_dos_errstr(char *inbuf);
5140 WERROR map_werror_from_unix(int error);
5141
5142 /* The following definitions come from libsmb/spnego.c  */
5143
5144 ssize_t read_spnego_data(DATA_BLOB data, SPNEGO_DATA *token);
5145 ssize_t write_spnego_data(DATA_BLOB *blob, SPNEGO_DATA *spnego);
5146 bool free_spnego_data(SPNEGO_DATA *spnego);
5147
5148 /* The following definitions come from libsmb/trustdom_cache.c  */
5149
5150 bool trustdom_cache_enable(void);
5151 bool trustdom_cache_shutdown(void);
5152 bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
5153                           time_t timeout);
5154 bool trustdom_cache_fetch(const char* name, DOM_SID* sid);
5155 uint32 trustdom_cache_fetch_timestamp( void );
5156 bool trustdom_cache_store_timestamp( uint32 t, time_t timeout );
5157 void trustdom_cache_flush(void);
5158 void update_trustdom_cache( void );
5159
5160 /* The following definitions come from libsmb/trusts_util.c  */
5161
5162 NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
5163                                       const char *domain,
5164                                       unsigned char orig_trust_passwd_hash[16],
5165                                       uint32 sec_channel_type);
5166 NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
5167                                            TALLOC_CTX *mem_ctx, 
5168                                            const char *domain) ;
5169 bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
5170                                      char ***domain_names, uint32 *num_domains,
5171                                      DOM_SID **sids );
5172
5173 /* The following definitions come from libsmb/unexpected.c  */
5174
5175 void unexpected_packet(struct packet_struct *p);
5176 void clear_unexpected(time_t t);
5177 struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
5178                                          const char *mailslot_name);
5179
5180 /* The following definitions come from locking/brlock.c  */
5181
5182 bool brl_same_context(const struct lock_context *ctx1, 
5183                              const struct lock_context *ctx2);
5184 void brl_init(bool read_only);
5185 void brl_shutdown(void);
5186 NTSTATUS brl_lock(struct messaging_context *msg_ctx,
5187                 struct byte_range_lock *br_lck,
5188                 uint32 smbpid,
5189                 struct server_id pid,
5190                 br_off start,
5191                 br_off size, 
5192                 enum brl_type lock_type,
5193                 enum brl_flavour lock_flav,
5194                 bool blocking_lock,
5195                 uint32 *psmbpid);
5196 bool brl_unlock(struct messaging_context *msg_ctx,
5197                 struct byte_range_lock *br_lck,
5198                 uint32 smbpid,
5199                 struct server_id pid,
5200                 br_off start,
5201                 br_off size,
5202                 enum brl_flavour lock_flav);
5203 bool brl_locktest(struct byte_range_lock *br_lck,
5204                 uint32 smbpid,
5205                 struct server_id pid,
5206                 br_off start,
5207                 br_off size, 
5208                 enum brl_type lock_type,
5209                 enum brl_flavour lock_flav);
5210 NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
5211                 uint32 *psmbpid,
5212                 struct server_id pid,
5213                 br_off *pstart,
5214                 br_off *psize, 
5215                 enum brl_type *plock_type,
5216                 enum brl_flavour lock_flav);
5217 bool brl_lock_cancel(struct byte_range_lock *br_lck,
5218                 uint32 smbpid,
5219                 struct server_id pid,
5220                 br_off start,
5221                 br_off size,
5222                 enum brl_flavour lock_flav);
5223 void brl_close_fnum(struct messaging_context *msg_ctx,
5224                     struct byte_range_lock *br_lck);
5225 int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
5226                           enum brl_type lock_type,
5227                           enum brl_flavour lock_flav,
5228                           br_off start, br_off size,
5229                           void *private_data),
5230                void *private_data);
5231 struct byte_range_lock *brl_get_locks(TALLOC_CTX *mem_ctx,
5232                                         files_struct *fsp);
5233 struct byte_range_lock *brl_get_locks_readonly(TALLOC_CTX *mem_ctx,
5234                                         files_struct *fsp);
5235 void brl_register_msgs(struct messaging_context *msg_ctx);
5236
5237 /* The following definitions come from locking/locking.c  */
5238
5239 const char *lock_type_name(enum brl_type lock_type);
5240 const char *lock_flav_name(enum brl_flavour lock_flav);
5241 bool is_locked(files_struct *fsp,
5242                 uint32 smbpid,
5243                 SMB_BIG_UINT count,
5244                 SMB_BIG_UINT offset, 
5245                 enum brl_type lock_type);
5246 NTSTATUS query_lock(files_struct *fsp,
5247                         uint32 *psmbpid,
5248                         SMB_BIG_UINT *pcount,
5249                         SMB_BIG_UINT *poffset,
5250                         enum brl_type *plock_type,
5251                         enum brl_flavour lock_flav);
5252 struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
5253                         files_struct *fsp,
5254                         uint32 lock_pid,
5255                         SMB_BIG_UINT count,
5256                         SMB_BIG_UINT offset,
5257                         enum brl_type lock_type,
5258                         enum brl_flavour lock_flav,
5259                         bool blocking_lock,
5260                         NTSTATUS *perr,
5261                         uint32 *plock_pid);
5262 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
5263                         files_struct *fsp,
5264                         uint32 lock_pid,
5265                         SMB_BIG_UINT count,
5266                         SMB_BIG_UINT offset,
5267                         enum brl_flavour lock_flav);
5268 NTSTATUS do_lock_cancel(files_struct *fsp,
5269                         uint32 lock_pid,
5270                         SMB_BIG_UINT count,
5271                         SMB_BIG_UINT offset,
5272                         enum brl_flavour lock_flav);
5273 void locking_close_file(struct messaging_context *msg_ctx,
5274                         files_struct *fsp);
5275 bool locking_init(void);
5276 bool locking_init_readonly(void);
5277 bool locking_end(void);
5278 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
5279 struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
5280                                             const struct file_id id,
5281                                             const char *servicepath,
5282                                             const char *fname,
5283                                             const struct timespec *old_write_time);
5284 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
5285                                                   const struct file_id id,
5286                                                   const char *servicepath,
5287                                                   const char *fname);
5288 bool rename_share_filename(struct messaging_context *msg_ctx,
5289                         struct share_mode_lock *lck,
5290                         const char *servicepath,
5291                         const char *newname);
5292 void get_file_infos(struct file_id id,
5293                     bool *delete_on_close,
5294                     struct timespec *write_time);
5295 bool is_valid_share_mode_entry(const struct share_mode_entry *e);
5296 bool is_deferred_open_entry(const struct share_mode_entry *e);
5297 bool is_unused_share_mode_entry(const struct share_mode_entry *e);
5298 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
5299                         uid_t uid, uint16 mid, uint16 op_type, bool initial_delete_on_close_allowed);
5300 void add_deferred_open(struct share_mode_lock *lck, uint16 mid,
5301                        struct timeval request_time,
5302                        struct file_id id);
5303 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
5304 void del_deferred_open_entry(struct share_mode_lock *lck, uint16 mid);
5305 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5306 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5307 NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
5308                                  uint32 dosmode);
5309 bool can_set_initial_delete_on_close(const struct share_mode_lock *lck);
5310 void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok);
5311 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok);
5312 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok);
5313 bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close);
5314 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
5315 bool set_write_time(struct file_id fileid, struct timespec write_time);
5316 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
5317                                  const char *, void *),
5318                       void *private_data);
5319
5320 /* The following definitions come from locking/posix.c  */
5321
5322 bool is_posix_locked(files_struct *fsp,
5323                         SMB_BIG_UINT *pu_offset,
5324                         SMB_BIG_UINT *pu_count,
5325                         enum brl_type *plock_type,
5326                         enum brl_flavour lock_flav);
5327 bool posix_locking_init(bool read_only);
5328 bool posix_locking_end(void);
5329 void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);
5330 int fd_close_posix(struct files_struct *fsp);
5331 bool set_posix_lock_windows_flavour(files_struct *fsp,
5332                         SMB_BIG_UINT u_offset,
5333                         SMB_BIG_UINT u_count,
5334                         enum brl_type lock_type,
5335                         const struct lock_context *lock_ctx,
5336                         const struct lock_struct *plocks,
5337                         int num_locks,
5338                         int *errno_ret);
5339 bool release_posix_lock_windows_flavour(files_struct *fsp,
5340                                 SMB_BIG_UINT u_offset,
5341                                 SMB_BIG_UINT u_count,
5342                                 enum brl_type deleted_lock_type,
5343                                 const struct lock_context *lock_ctx,
5344                                 const struct lock_struct *plocks,
5345                                 int num_locks);
5346 bool set_posix_lock_posix_flavour(files_struct *fsp,
5347                         SMB_BIG_UINT u_offset,
5348                         SMB_BIG_UINT u_count,
5349                         enum brl_type lock_type,
5350                         int *errno_ret);
5351 bool release_posix_lock_posix_flavour(files_struct *fsp,
5352                                 SMB_BIG_UINT u_offset,
5353                                 SMB_BIG_UINT u_count,
5354                                 const struct lock_context *lock_ctx,
5355                                 const struct lock_struct *plocks,
5356                                 int num_locks);
5357
5358 /* The following definitions come from modules/vfs_default.c  */
5359
5360 int vfswrap_lstat(vfs_handle_struct *handle,  const char *path, SMB_STRUCT_STAT *sbuf);
5361 ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
5362 ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
5363 NTSTATUS vfs_default_init(void);
5364
5365 /* The following definitions come from nmbd/asyncdns.c  */
5366
5367 int asyncdns_fd(void);
5368 void kill_async_dns_child(void);
5369 void start_async_dns(void);
5370 void run_dns_queue(void);
5371 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5372 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5373 void kill_async_dns_child(void);
5374
5375 /* The following definitions come from nmbd/nmbd.c  */
5376
5377 struct event_context *nmbd_event_context(void);
5378 struct messaging_context *nmbd_messaging_context(void);
5379
5380 /* The following definitions come from nmbd/nmbd_become_dmb.c  */
5381
5382 void add_domain_names(time_t t);
5383
5384 /* The following definitions come from nmbd/nmbd_become_lmb.c  */
5385
5386 void insert_permanent_name_into_unicast( struct subnet_record *subrec, 
5387                                                 struct nmb_name *nmbname, uint16 nb_type );
5388 void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work,
5389                                    bool force_new_election);
5390 void become_local_master_browser(struct subnet_record *subrec, struct work_record *work);
5391 void set_workgroup_local_master_browser_name( struct work_record *work, const char *newname);
5392
5393 /* The following definitions come from nmbd/nmbd_browserdb.c  */
5394
5395 void update_browser_death_time( struct browse_cache_record *browc );
5396 struct browse_cache_record *create_browser_in_lmb_cache( const char *work_name, 
5397                                                          const char *browser_name, 
5398                                                          struct in_addr ip );
5399 struct browse_cache_record *find_browser_in_lmb_cache( const char *browser_name );
5400 void expire_lmb_browsers( time_t t );
5401
5402 /* The following definitions come from nmbd/nmbd_browsesync.c  */
5403
5404 void dmb_expire_and_sync_browser_lists(time_t t);
5405 void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec,
5406                                                    struct work_record *work);
5407 void collect_all_workgroup_names_from_wins_server(time_t t);
5408 void sync_all_dmbs(time_t t);
5409
5410 /* The following definitions come from nmbd/nmbd_elections.c  */
5411
5412 void check_master_browser_exists(time_t t);
5413 void run_elections(time_t t);
5414 void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5415 bool check_elections(void);
5416 void nmbd_message_election(struct messaging_context *msg,
5417                            void *private_data,
5418                            uint32_t msg_type,
5419                            struct server_id server_id,
5420                            DATA_BLOB *data);
5421
5422 /* The following definitions come from nmbd/nmbd_incomingdgrams.c  */
5423
5424 void tell_become_backup(void);
5425 void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5426 void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5427 void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5428 void process_master_browser_announce(struct subnet_record *subrec, 
5429                                      struct packet_struct *p,char *buf);
5430 void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5431 void process_get_backup_list_request(struct subnet_record *subrec,
5432                                      struct packet_struct *p,char *buf);
5433 void process_reset_browser(struct subnet_record *subrec,
5434                                   struct packet_struct *p,char *buf);
5435 void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5436 void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5437
5438 /* The following definitions come from nmbd/nmbd_incomingrequests.c  */
5439
5440 void process_name_release_request(struct subnet_record *subrec, 
5441                                   struct packet_struct *p);
5442 void process_name_refresh_request(struct subnet_record *subrec,
5443                                   struct packet_struct *p);
5444 void process_name_registration_request(struct subnet_record *subrec, 
5445                                        struct packet_struct *p);
5446 void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p);
5447 void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p);
5448
5449 /* The following definitions come from nmbd/nmbd_lmhosts.c  */
5450
5451 void load_lmhosts_file(const char *fname);
5452 bool find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp);
5453
5454 /* The following definitions come from nmbd/nmbd_logonnames.c  */
5455
5456 void add_logon_names(void);
5457
5458 /* The following definitions come from nmbd/nmbd_mynames.c  */
5459
5460 void register_my_workgroup_one_subnet(struct subnet_record *subrec);
5461 bool register_my_workgroup_and_names(void);
5462 void release_wins_names(void);
5463 void refresh_my_names(time_t t);
5464
5465 /* The following definitions come from nmbd/nmbd_namelistdb.c  */
5466
5467 void set_samba_nb_type(void);
5468 void remove_name_from_namelist(struct subnet_record *subrec, 
5469                                 struct name_record *namerec );
5470 struct name_record *find_name_on_subnet(struct subnet_record *subrec,
5471                                 const struct nmb_name *nmbname,
5472                                 bool self_only);
5473 struct name_record *find_name_for_remote_broadcast_subnet(struct nmb_name *nmbname,
5474                                                 bool self_only);
5475 void update_name_ttl( struct name_record *namerec, int ttl );
5476 bool add_name_to_subnet( struct subnet_record *subrec,
5477                         const char *name,
5478                         int type,
5479                         uint16 nb_flags,
5480                         int ttl,
5481                         enum name_source source,
5482                         int num_ips,
5483                         struct in_addr *iplist);
5484 void standard_success_register(struct subnet_record *subrec, 
5485                              struct userdata_struct *userdata,
5486                              struct nmb_name *nmbname, uint16 nb_flags, int ttl,
5487                              struct in_addr registered_ip);
5488 void standard_fail_register( struct subnet_record   *subrec,
5489                              struct nmb_name        *nmbname );
5490 bool find_ip_in_name_record( struct name_record *namerec, struct in_addr ip );
5491 void add_ip_to_name_record( struct name_record *namerec, struct in_addr new_ip );
5492 void remove_ip_from_name_record( struct name_record *namerec,
5493                                  struct in_addr      remove_ip );
5494 void standard_success_release( struct subnet_record   *subrec,
5495                                struct userdata_struct *userdata,
5496                                struct nmb_name        *nmbname,
5497                                struct in_addr          released_ip );
5498 void expire_names(time_t t);
5499 void add_samba_names_to_subnet( struct subnet_record *subrec );
5500 void dump_name_record( struct name_record *namerec, XFILE *fp);
5501 void dump_all_namelists(void);
5502
5503 /* The following definitions come from nmbd/nmbd_namequery.c  */
5504
5505 bool query_name(struct subnet_record *subrec, const char *name, int type,
5506                    query_name_success_function success_fn,
5507                    query_name_fail_function fail_fn, 
5508                    struct userdata_struct *userdata);
5509 bool query_name_from_wins_server(struct in_addr ip_to, 
5510                    const char *name, int type,
5511                    query_name_success_function success_fn,
5512                    query_name_fail_function fail_fn, 
5513                    struct userdata_struct *userdata);
5514
5515 /* The following definitions come from nmbd/nmbd_nameregister.c  */
5516
5517 void register_name(struct subnet_record *subrec,
5518                    const char *name, int type, uint16 nb_flags,
5519                    register_name_success_function success_fn,
5520                    register_name_fail_function fail_fn,
5521                    struct userdata_struct *userdata);
5522 void wins_refresh_name(struct name_record *namerec);
5523
5524 /* The following definitions come from nmbd/nmbd_namerelease.c  */
5525
5526 void release_name(struct subnet_record *subrec, struct name_record *namerec,
5527                   release_name_success_function success_fn,
5528                   release_name_fail_function fail_fn,
5529                   struct userdata_struct *userdata);
5530
5531 /* The following definitions come from nmbd/nmbd_nodestatus.c  */
5532
5533 bool node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
5534                  struct in_addr send_ip, node_status_success_function success_fn, 
5535                  node_status_fail_function fail_fn, struct userdata_struct *userdata);
5536
5537 /* The following definitions come from nmbd/nmbd_packets.c  */
5538
5539 uint16 get_nb_flags(char *buf);
5540 void set_nb_flags(char *buf, uint16 nb_flags);
5541 struct response_record *queue_register_name( struct subnet_record *subrec,
5542                           response_function resp_fn,
5543                           timeout_response_function timeout_fn,
5544                           register_name_success_function success_fn,
5545                           register_name_fail_function fail_fn,
5546                           struct userdata_struct *userdata,
5547                           struct nmb_name *nmbname,
5548                           uint16 nb_flags);
5549 void queue_wins_refresh(struct nmb_name *nmbname,
5550                         response_function resp_fn,
5551                         timeout_response_function timeout_fn,
5552                         uint16 nb_flags,
5553                         struct in_addr refresh_ip,
5554                         const char *tag);
5555 struct response_record *queue_register_multihomed_name( struct subnet_record *subrec,
5556                                                         response_function resp_fn,
5557                                                         timeout_response_function timeout_fn,
5558                                                         register_name_success_function success_fn,
5559                                                         register_name_fail_function fail_fn,
5560                                                         struct userdata_struct *userdata,
5561                                                         struct nmb_name *nmbname,
5562                                                         uint16 nb_flags,
5563                                                         struct in_addr register_ip,
5564                                                         struct in_addr wins_ip);
5565 struct response_record *queue_release_name( struct subnet_record *subrec,
5566                                             response_function resp_fn,
5567                                             timeout_response_function timeout_fn,
5568                                             release_name_success_function success_fn,
5569                                             release_name_fail_function fail_fn,
5570                                             struct userdata_struct *userdata,
5571                                             struct nmb_name *nmbname,
5572                                             uint16 nb_flags,
5573                                             struct in_addr release_ip,
5574                                             struct in_addr dest_ip);
5575 struct response_record *queue_query_name( struct subnet_record *subrec,
5576                           response_function resp_fn,
5577                           timeout_response_function timeout_fn,
5578                           query_name_success_function success_fn,
5579                           query_name_fail_function fail_fn,
5580                           struct userdata_struct *userdata,
5581                           struct nmb_name *nmbname);
5582 struct response_record *queue_query_name_from_wins_server( struct in_addr to_ip,
5583                           response_function resp_fn,
5584                           timeout_response_function timeout_fn,
5585                           query_name_success_function success_fn,
5586                           query_name_fail_function fail_fn,
5587                           struct userdata_struct *userdata,
5588                           struct nmb_name *nmbname);
5589 struct response_record *queue_node_status( struct subnet_record *subrec,
5590                           response_function resp_fn,
5591                           timeout_response_function timeout_fn,
5592                           node_status_success_function success_fn,
5593                           node_status_fail_function fail_fn,
5594                           struct userdata_struct *userdata,
5595                           struct nmb_name *nmbname,
5596                           struct in_addr send_ip);
5597 void reply_netbios_packet(struct packet_struct *orig_packet,
5598                           int rcode, enum netbios_reply_type_code rcv_code, int opcode,
5599                           int ttl, char *data,int len);
5600 void queue_packet(struct packet_struct *packet);
5601 void run_packet_queue(void);
5602 void retransmit_or_expire_response_records(time_t t);
5603 bool listen_for_packets(bool run_election);
5604 bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len,
5605                    const char *srcname, int src_type,
5606                    const char *dstname, int dest_type,
5607                    struct in_addr dest_ip,struct in_addr src_ip,
5608                    int dest_port);
5609
5610 /* The following definitions come from nmbd/nmbd_processlogon.c  */
5611
5612 void process_logon_packet(struct packet_struct *p, char *buf,int len, 
5613                           const char *mailslot);
5614
5615 /* The following definitions come from nmbd/nmbd_responserecordsdb.c  */
5616
5617 void remove_response_record(struct subnet_record *subrec,
5618                                 struct response_record *rrec);
5619 struct response_record *make_response_record( struct subnet_record *subrec,
5620                                               struct packet_struct *p,
5621                                               response_function resp_fn,
5622                                               timeout_response_function timeout_fn,
5623                                               success_function success_fn,
5624                                               fail_function fail_fn,
5625                                               struct userdata_struct *userdata);
5626 struct response_record *find_response_record(struct subnet_record **ppsubrec,
5627                                 uint16 id);
5628 bool is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec);
5629
5630 /* The following definitions come from nmbd/nmbd_sendannounce.c  */
5631
5632 void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip);
5633 void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work);
5634 void announce_my_server_names(time_t t);
5635 void announce_my_lm_server_names(time_t t);
5636 void reset_announce_timer(void);
5637 void announce_myself_to_domain_master_browser(time_t t);
5638 void announce_my_servers_removed(void);
5639 void announce_remote(time_t t);
5640 void browse_sync_remote(time_t t);
5641
5642 /* The following definitions come from nmbd/nmbd_serverlistdb.c  */
5643
5644 void remove_all_servers(struct work_record *work);
5645 struct server_record *find_server_in_workgroup(struct work_record *work, const char *name);
5646 void remove_server_from_workgroup(struct work_record *work, struct server_record *servrec);
5647 struct server_record *create_server_on_workgroup(struct work_record *work,
5648                                                  const char *name,int servertype, 
5649                                                  int ttl, const char *comment);
5650 void update_server_ttl(struct server_record *servrec, int ttl);
5651 void expire_servers(struct work_record *work, time_t t);
5652 void write_browse_list_entry(XFILE *fp, const char *name, uint32 rec_type,
5653                 const char *local_master_browser_name, const char *description);
5654 void write_browse_list(time_t t, bool force_write);
5655
5656 /* The following definitions come from nmbd/nmbd_subnetdb.c  */
5657
5658 void close_subnet(struct subnet_record *subrec);
5659 struct subnet_record *make_normal_subnet(const struct interface *iface);
5660 bool create_subnets(void);
5661 bool we_are_a_wins_client(void);
5662 struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec);
5663 struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec);
5664
5665 /* The following definitions come from nmbd/nmbd_synclists.c  */
5666
5667 void sync_browse_lists(struct work_record *work,
5668                        char *name, int nm_type, 
5669                        struct in_addr ip, bool local, bool servers);
5670 void sync_check_completion(void);
5671
5672 /* The following definitions come from nmbd/nmbd_winsproxy.c  */
5673
5674 void make_wins_proxy_name_query_request( struct subnet_record *subrec, 
5675                                          struct packet_struct *incoming_packet,
5676                                          struct nmb_name *question_name);
5677
5678 /* The following definitions come from nmbd/nmbd_winsserver.c  */
5679
5680 struct name_record *find_name_on_wins_subnet(const struct nmb_name *nmbname, bool self_only);
5681 bool wins_store_changed_namerec(const struct name_record *namerec);
5682 bool add_name_to_wins_subnet(const struct name_record *namerec);
5683 bool remove_name_from_wins_namelist(struct name_record *namerec);
5684 void dump_wins_subnet_namelist(XFILE *fp);
5685 bool packet_is_for_wins_server(struct packet_struct *packet);
5686 bool initialise_wins(void);
5687 void wins_process_name_refresh_request( struct subnet_record *subrec,
5688                                         struct packet_struct *p );
5689 void wins_process_name_registration_request(struct subnet_record *subrec,
5690                                             struct packet_struct *p);
5691 void wins_process_multihomed_name_registration_request( struct subnet_record *subrec,
5692                                                         struct packet_struct *p);
5693 void fetch_all_active_wins_1b_names(void);
5694 void send_wins_name_query_response(int rcode, struct packet_struct *p, 
5695                                           struct name_record *namerec);
5696 void wins_process_name_query_request(struct subnet_record *subrec, 
5697                                      struct packet_struct *p);
5698 void wins_process_name_release_request(struct subnet_record *subrec,
5699                                        struct packet_struct *p);
5700 void initiate_wins_processing(time_t t);
5701 void wins_write_name_record(struct name_record *namerec, XFILE *fp);
5702 void wins_write_database(time_t t, bool background);
5703 void nmbd_wins_new_entry(struct messaging_context *msg,
5704                                        void *private_data,
5705                                        uint32_t msg_type,
5706                                        struct server_id server_id,
5707                                        DATA_BLOB *data);
5708
5709 /* The following definitions come from nmbd/nmbd_workgroupdb.c  */
5710
5711 struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec, 
5712                                              const char *name);
5713 struct work_record *create_workgroup_on_subnet(struct subnet_record *subrec,
5714                                                const char *name, int ttl);
5715 void update_workgroup_ttl(struct work_record *work, int ttl);
5716 void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_record *work);
5717 void dump_workgroups(bool force_write);
5718 void expire_workgroups_and_servers(time_t t);
5719
5720 /* The following definitions come from param/loadparm.c  */
5721
5722 char *lp_smb_ports(void);
5723 char *lp_dos_charset(void);
5724 char *lp_unix_charset(void);
5725 char *lp_display_charset(void);
5726 char *lp_logfile(void);
5727 char *lp_configfile(void);
5728 char *lp_smb_passwd_file(void);
5729 char *lp_private_dir(void);
5730 char *lp_serverstring(void);
5731 int lp_printcap_cache_time(void);
5732 char *lp_addport_cmd(void);
5733 char *lp_enumports_cmd(void);
5734 char *lp_addprinter_cmd(void);
5735 char *lp_deleteprinter_cmd(void);
5736 char *lp_os2_driver_map(void);
5737 char *lp_lockdir(void);
5738 char *lp_piddir(void);
5739 char *lp_mangling_method(void);
5740 int lp_mangle_prefix(void);
5741 char *lp_utmpdir(void);
5742 char *lp_wtmpdir(void);
5743 bool lp_utmp(void);
5744 char *lp_rootdir(void);
5745 char *lp_defaultservice(void);
5746 char *lp_msg_command(void);
5747 char *lp_get_quota_command(void);
5748 char *lp_set_quota_command(void);
5749 char *lp_auto_services(void);
5750 char *lp_passwd_program(void);
5751 char *lp_passwd_chat(void);
5752 char *lp_passwordserver(void);
5753 char *lp_name_resolve_order(void);
5754 char *lp_realm(void);
5755 const char *lp_afs_username_map(void);
5756 int lp_afs_token_lifetime(void);
5757 char *lp_log_nt_token_command(void);
5758 char *lp_username_map(void);
5759 const char *lp_logon_script(void);
5760 const char *lp_logon_path(void);
5761 const char *lp_logon_drive(void);
5762 const char *lp_logon_home(void);
5763 char *lp_remote_announce(void);
5764 char *lp_remote_browse_sync(void);
5765 const char **lp_wins_server_list(void);
5766 const char **lp_interfaces(void);
5767 char *lp_socket_address(void);
5768 char *lp_nis_home_map_name(void);
5769 const char **lp_netbios_aliases(void);
5770 const char *lp_passdb_backend(void);
5771 const char **lp_preload_modules(void);
5772 char *lp_panic_action(void);
5773 char *lp_adduser_script(void);
5774 char *lp_renameuser_script(void);
5775 char *lp_deluser_script(void);
5776 const char *lp_guestaccount(void);
5777 char *lp_addgroup_script(void);
5778 char *lp_delgroup_script(void);
5779 char *lp_addusertogroup_script(void);
5780 char *lp_deluserfromgroup_script(void);
5781 char *lp_setprimarygroup_script(void);
5782 char *lp_addmachine_script(void);
5783 char *lp_shutdown_script(void);
5784 char *lp_abort_shutdown_script(void);
5785 char *lp_username_map_script(void);
5786 char *lp_check_password_script(void);
5787 char *lp_wins_hook(void);
5788 const char *lp_template_homedir(void);
5789 const char *lp_template_shell(void);
5790 const char *lp_winbind_separator(void);
5791 int lp_acl_compatibility(void);
5792 bool lp_winbind_enum_users(void);
5793 bool lp_winbind_enum_groups(void);
5794 bool lp_winbind_use_default_domain(void);
5795 bool lp_winbind_trusted_domains_only(void);
5796 bool lp_winbind_nested_groups(void);
5797 int lp_winbind_expand_groups(void);
5798 bool lp_winbind_refresh_tickets(void);
5799 bool lp_winbind_offline_logon(void);
5800 bool lp_winbind_normalize_names(void);
5801 bool lp_winbind_rpc_only(void);
5802 const char **lp_idmap_domains(void);
5803 const char *lp_idmap_backend(void);
5804 char *lp_idmap_alloc_backend(void);
5805 int lp_idmap_cache_time(void);
5806 int lp_idmap_negative_cache_time(void);
5807 int lp_keepalive(void);
5808 bool lp_passdb_expand_explicit(void);
5809 char *lp_ldap_suffix(void);
5810 char *lp_ldap_admin_dn(void);
5811 int lp_ldap_ssl(void);
5812 int lp_ldap_passwd_sync(void);
5813 bool lp_ldap_delete_dn(void);
5814 int lp_ldap_replication_sleep(void);
5815 int lp_ldap_timeout(void);
5816 int lp_ldap_connection_timeout(void);
5817 int lp_ldap_page_size(void);
5818 int lp_ldap_debug_level(void);
5819 int lp_ldap_debug_threshold(void);
5820 char *lp_add_share_cmd(void);
5821 char *lp_change_share_cmd(void);
5822 char *lp_delete_share_cmd(void);
5823 char *lp_usershare_path(void);
5824 const char **lp_usershare_prefix_allow_list(void);
5825 const char **lp_usershare_prefix_deny_list(void);
5826 const char **lp_eventlog_list(void);
5827 bool lp_registry_shares(void);
5828 bool lp_usershare_allow_guests(void);
5829 bool lp_usershare_owner_only(void);
5830 bool lp_disable_netbios(void);
5831 bool lp_reset_on_zero_vc(void);
5832 bool lp_ms_add_printer_wizard(void);
5833 bool lp_dns_proxy(void);
5834 bool lp_wins_support(void);
5835 bool lp_we_are_a_wins_server(void);
5836 bool lp_wins_proxy(void);
5837 bool lp_local_master(void);
5838 bool lp_domain_logons(void);
5839 const char **lp_init_logon_delayed_hosts(void);
5840 int lp_init_logon_delay(void);
5841 bool lp_load_printers(void);
5842 bool lp_readraw(void);
5843 bool lp_large_readwrite(void);
5844 bool lp_writeraw(void);
5845 bool lp_null_passwords(void);
5846 bool lp_obey_pam_restrictions(void);
5847 bool lp_encrypted_passwords(void);
5848 bool lp_update_encrypted(void);
5849 int lp_client_schannel(void);
5850 int lp_server_schannel(void);
5851 bool lp_syslog_only(void);
5852 bool lp_timestamp_logs(void);
5853 bool lp_debug_prefix_timestamp(void);
5854 bool lp_debug_hires_timestamp(void);
5855 bool lp_debug_pid(void);
5856 bool lp_debug_uid(void);
5857 bool lp_debug_class(void);
5858 bool lp_enable_core_files(void);
5859 bool lp_browse_list(void);
5860 bool lp_nis_home_map(void);
5861 bool lp_bind_interfaces_only(void);
5862 bool lp_pam_password_change(void);
5863 bool lp_unix_password_sync(void);
5864 bool lp_passwd_chat_debug(void);
5865 int lp_passwd_chat_timeout(void);
5866 bool lp_nt_pipe_support(void);
5867 bool lp_nt_status_support(void);
5868 bool lp_stat_cache(void);
5869 int lp_max_stat_cache_size(void);
5870 bool lp_allow_trusted_domains(void);
5871 int lp_restrict_anonymous(void);
5872 bool lp_lanman_auth(void);
5873 bool lp_ntlm_auth(void);
5874 bool lp_client_plaintext_auth(void);
5875 bool lp_client_lanman_auth(void);
5876 bool lp_client_ntlmv2_auth(void);
5877 bool lp_host_msdfs(void);
5878 bool lp_kernel_oplocks(void);
5879 bool lp_enhanced_browsing(void);
5880 bool lp_use_mmap(void);
5881 bool lp_unix_extensions(void);
5882 bool lp_use_spnego(void);
5883 bool lp_client_use_spnego(void);
5884 bool lp_hostname_lookups(void);
5885 bool lp_change_notify(const struct share_params *p );
5886 bool lp_kernel_change_notify(const struct share_params *p );
5887 bool lp_use_kerberos_keytab(void);
5888 bool lp_defer_sharing_violations(void);
5889 bool lp_enable_privileges(void);
5890 bool lp_enable_asu_support(void);
5891 int lp_os_level(void);
5892 int lp_max_ttl(void);
5893 int lp_max_wins_ttl(void);
5894 int lp_min_wins_ttl(void);
5895 int lp_max_log_size(void);
5896 int lp_max_open_files(void);
5897 int lp_open_files_db_hash_size(void);
5898 int lp_maxxmit(void);
5899 int lp_maxmux(void);
5900 int lp_passwordlevel(void);
5901 int lp_usernamelevel(void);
5902 int lp_deadtime(void);
5903 bool lp_getwd_cache(void);
5904 int lp_maxprotocol(void);
5905 int lp_minprotocol(void);
5906 int lp_security(void);
5907 const char **lp_auth_methods(void);
5908 bool lp_paranoid_server_security(void);
5909 int lp_maxdisksize(void);
5910 int lp_lpqcachetime(void);
5911 int lp_max_smbd_processes(void);
5912 bool _lp_disable_spoolss(void);
5913 int lp_syslog(void);
5914 int lp_lm_announce(void);
5915 int lp_lm_interval(void);
5916 int lp_machine_password_timeout(void);
5917 int lp_map_to_guest(void);
5918 int lp_oplock_break_wait_time(void);
5919 int lp_lock_spin_time(void);
5920 int lp_usershare_max_shares(void);
5921 const char *lp_socket_options(void);
5922 int lp_config_backend(void);
5923 char *lp_preexec(int );
5924 char *lp_postexec(int );
5925 char *lp_rootpreexec(int );
5926 char *lp_rootpostexec(int );
5927 char *lp_servicename(int );
5928 const char *lp_const_servicename(int );
5929 char *lp_pathname(int );
5930 char *lp_dontdescend(int );
5931 char *lp_username(int );
5932 const char **lp_invalid_users(int );
5933 const char **lp_valid_users(int );
5934 const char **lp_admin_users(int );
5935 const char **lp_svcctl_list(void);
5936 char *lp_cups_options(int );
5937 char *lp_cups_server(void);
5938 char *lp_iprint_server(void);
5939 int lp_cups_timeout(void);
5940 const char *lp_ctdbd_socket(void);
5941 const char **lp_cluster_addresses(void);
5942 bool lp_clustering(void);
5943 char *lp_printcommand(int );
5944 char *lp_lpqcommand(int );
5945 char *lp_lprmcommand(int );
5946 char *lp_lppausecommand(int );
5947 char *lp_lpresumecommand(int );
5948 char *lp_queuepausecommand(int );
5949 char *lp_queueresumecommand(int );
5950 const char *lp_printjob_username(int );
5951 const char **lp_hostsallow(int );
5952 const char **lp_hostsdeny(int );
5953 char *lp_magicscript(int );
5954 char *lp_magicoutput(int );
5955 char *lp_comment(int );
5956 char *lp_force_user(int );
5957 char *lp_force_group(int );
5958 const char **lp_readlist(int );
5959 const char **lp_writelist(int );
5960 const char **lp_printer_admin(int );
5961 char *lp_fstype(int );
5962 const char **lp_vfs_objects(int );
5963 char *lp_msdfs_proxy(int );
5964 char *lp_veto_files(int );
5965 char *lp_hide_files(int );
5966 char *lp_veto_oplocks(int );
5967 bool lp_msdfs_root(int );
5968 char *lp_aio_write_behind(int );
5969 char *lp_dfree_command(int );
5970 bool lp_autoloaded(int );
5971 bool lp_preexec_close(int );
5972 bool lp_rootpreexec_close(int );
5973 int lp_casesensitive(int );
5974 bool lp_preservecase(int );
5975 bool lp_shortpreservecase(int );
5976 bool lp_hide_dot_files(int );
5977 bool lp_hide_special_files(int );
5978 bool lp_hideunreadable(int );
5979 bool lp_hideunwriteable_files(int );
5980 bool lp_browseable(int );
5981 bool lp_readonly(int );
5982 bool lp_no_set_dir(int );
5983 bool lp_guest_ok(int );
5984 bool lp_guest_only(int );
5985 bool lp_administrative_share(int );
5986 bool lp_print_ok(int );
5987 bool lp_map_hidden(int );
5988 bool lp_map_archive(int );
5989 bool lp_store_dos_attributes(int );
5990 bool lp_dmapi_support(int );
5991 bool lp_locking(const struct share_params *p );
5992 int lp_strict_locking(const struct share_params *p );
5993 bool lp_posix_locking(const struct share_params *p );
5994 bool lp_share_modes(int );
5995 bool lp_oplocks(int );
5996 bool lp_level2_oplocks(int );
5997 bool lp_onlyuser(int );
5998 bool lp_manglednames(const struct share_params *p );
5999 bool lp_widelinks(int );
6000 bool lp_symlinks(int );
6001 bool lp_syncalways(int );
6002 bool lp_strict_allocate(int );
6003 bool lp_strict_sync(int );
6004 bool lp_map_system(int );
6005 bool lp_delete_readonly(int );
6006 bool lp_fake_oplocks(int );
6007 bool lp_recursive_veto_delete(int );
6008 bool lp_dos_filemode(int );
6009 bool lp_dos_filetimes(int );
6010 bool lp_dos_filetime_resolution(int );
6011 bool lp_fake_dir_create_times(int );
6012 bool lp_blocking_locks(int );
6013 bool lp_inherit_perms(int );
6014 bool lp_inherit_acls(int );
6015 bool lp_inherit_owner(int );
6016 bool lp_use_client_driver(int );
6017 bool lp_default_devmode(int );
6018 bool lp_force_printername(int );
6019 bool lp_nt_acl_support(int );
6020 bool lp_force_unknown_acl_user(int );
6021 bool lp_ea_support(int );
6022 bool _lp_use_sendfile(int );
6023 bool lp_profile_acls(int );
6024 bool lp_map_acl_inherit(int );
6025 bool lp_afs_share(int );
6026 bool lp_acl_check_permissions(int );
6027 bool lp_acl_group_control(int );
6028 bool lp_acl_map_full_control(int );
6029 int lp_create_mask(int );
6030 int lp_force_create_mode(int );
6031 int lp_security_mask(int );
6032 int lp_force_security_mode(int );
6033 int lp_dir_mask(int );
6034 int lp_force_dir_mode(int );
6035 int lp_dir_security_mask(int );
6036 int lp_force_dir_security_mode(int );
6037 int lp_max_connections(int );
6038 int lp_defaultcase(int );
6039 int lp_minprintspace(int );
6040 int lp_printing(int );
6041 int lp_max_reported_jobs(int );
6042 int lp_oplock_contention_limit(int );
6043 int lp_csc_policy(int );
6044 int lp_write_cache_size(int );
6045 int lp_block_size(int );
6046 int lp_dfree_cache_time(int );
6047 int lp_allocation_roundup_size(int );
6048 int lp_aio_read_size(int );
6049 int lp_aio_write_size(int );
6050 int lp_map_readonly(int );
6051 int lp_directory_name_cache_size(int );
6052 int lp_smb_encrypt(int );
6053 char lp_magicchar(const struct share_params *p );
6054 int lp_winbind_cache_time(void);
6055 int lp_winbind_reconnect_delay(void);
6056 const char **lp_winbind_nss_info(void);
6057 int lp_algorithmic_rid_base(void);
6058 int lp_name_cache_timeout(void);
6059 int lp_client_signing(void);
6060 int lp_server_signing(void);
6061 int lp_client_ldap_sasl_wrapping(void);
6062 char *lp_parm_talloc_string(int snum, const char *type, const char *option, const char *def);
6063 const char *lp_parm_const_string(int snum, const char *type, const char *option, const char *def);
6064 const char **lp_parm_string_list(int snum, const char *type, const char *option, const char **def);
6065 int lp_parm_int(int snum, const char *type, const char *option, int def);
6066 unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsigned long def);
6067 bool lp_parm_bool(int snum, const char *type, const char *option, bool def);
6068 int lp_parm_enum(int snum, const char *type, const char *option,
6069                  const struct enum_list *_enum, int def);
6070 bool lp_add_home(const char *pszHomename, int iDefaultService,
6071                  const char *user, const char *pszHomedir);
6072 int lp_add_service(const char *pszService, int iDefaultService);
6073 bool lp_add_printer(const char *pszPrintername, int iDefaultService);
6074 bool lp_parameter_is_valid(const char *pszParmName);
6075 bool lp_parameter_is_global(const char *pszParmName);
6076 bool lp_parameter_is_canonical(const char *parm_name);
6077 bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
6078                                bool *inverse);
6079 bool lp_canonicalize_parameter_with_value(const char *parm_name,
6080                                           const char *val,
6081                                           const char **canon_parm,
6082                                           const char **canon_val);
6083 void show_parameter_list(void);
6084 bool lp_string_is_valid_boolean(const char *parm_value);
6085 bool lp_invert_boolean(const char *str, const char **inverse_str);
6086 bool lp_canonicalize_boolean(const char *str, const char**canon_str);
6087 bool service_ok(int iService);
6088 bool lp_config_backend_is_registry(void);
6089 bool lp_config_backend_is_file(void);
6090 bool lp_file_list_changed(void);
6091 bool lp_idmap_uid(uid_t *low, uid_t *high);
6092 bool lp_idmap_gid(gid_t *low, gid_t *high);
6093 const char *lp_ldap_machine_suffix(void);
6094 const char *lp_ldap_user_suffix(void);
6095 const char *lp_ldap_group_suffix(void);
6096 const char *lp_ldap_idmap_suffix(void);
6097 void *lp_local_ptr(int snum, void *ptr);
6098 bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue);
6099 void init_locals(void);
6100 bool lp_is_default(int snum, struct parm_struct *parm);
6101 bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
6102 struct parm_struct *lp_get_parameter(const char *param_name);
6103 struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
6104 bool lp_snum_ok(int iService);
6105 void lp_add_one_printer(char *name, char *comment);
6106 bool lp_loaded(void);
6107 void lp_killunused(bool (*snumused) (int));
6108 void lp_kill_all_services(void);
6109 void lp_killservice(int iServiceIn);
6110 const char* server_role_str(uint32 role);
6111 enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
6112                         SMB_STRUCT_STAT *psbuf,
6113                         const char *servicename,
6114                         int snum,
6115                         char **lines,
6116                         int numlines,
6117                         char **pp_sharepath,
6118                         char **pp_comment,
6119                         SEC_DESC **ppsd,
6120                         bool *pallow_guest);
6121 int load_usershare_service(const char *servicename);
6122 int load_usershare_shares(void);
6123 void gfree_loadparm(void);
6124 void lp_set_in_client(bool b);
6125 bool lp_is_in_client(void);
6126 bool lp_load_ex(const char *pszFname,
6127                 bool global_only,
6128                 bool save_defaults,
6129                 bool add_ipc,
6130                 bool initialize_globals,
6131                 bool allow_include_registry,
6132                 bool allow_registry_shares);
6133 bool lp_load(const char *pszFname,
6134              bool global_only,
6135              bool save_defaults,
6136              bool add_ipc,
6137              bool initialize_globals);
6138 bool lp_load_initial_only(const char *pszFname);
6139 bool lp_load_with_registry_shares(const char *pszFname,
6140                                   bool global_only,
6141                                   bool save_defaults,
6142                                   bool add_ipc,
6143                                   bool initialize_globals);
6144 int lp_numservices(void);
6145 void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
6146 void lp_dump_one(FILE * f, bool show_defaults, int snum);
6147 int lp_servicenumber(const char *pszServiceName);
6148 bool share_defined(const char *service_name);
6149 struct share_params *get_share_params(TALLOC_CTX *mem_ctx,
6150                                       const char *sharename);
6151 struct share_iterator *share_list_all(TALLOC_CTX *mem_ctx);
6152 struct share_params *next_share(struct share_iterator *list);
6153 struct share_params *next_printer(struct share_iterator *list);
6154 struct share_params *snum2params_static(int snum);
6155 const char *volume_label(int snum);
6156 int lp_server_role(void);
6157 bool lp_domain_master(void);
6158 bool lp_preferred_master(void);
6159 void lp_remove_service(int snum);
6160 void lp_copy_service(int snum, const char *new_name);
6161 int lp_default_server_announce(void);
6162 int lp_major_announce_version(void);
6163 int lp_minor_announce_version(void);
6164 void lp_set_name_resolve_order(const char *new_order);
6165 const char *lp_printername(int snum);
6166 void lp_set_logfile(const char *name);
6167 int lp_maxprintjobs(int snum);
6168 const char *lp_printcapname(void);
6169 bool lp_disable_spoolss( void );
6170 void lp_set_spoolss_state( uint32 state );
6171 uint32 lp_get_spoolss_state( void );
6172 bool lp_use_sendfile(int snum);
6173 void set_use_sendfile(int snum, bool val);
6174 void set_store_dos_attributes(int snum, bool val);
6175 void lp_set_mangling_method(const char *new_method);
6176 bool lp_posix_pathnames(void);
6177 void lp_set_posix_pathnames(void);
6178 enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp);
6179 void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
6180 int lp_min_receive_file_size(void);
6181
6182 /* The following definitions come from param/params.c  */
6183
6184 bool pm_process( const char *FileName,
6185                 bool (*sfunc)(const char *, void *),
6186                 bool (*pfunc)(const char *, const char *, void *),
6187                 void *userdata);
6188
6189 /* The following definitions come from param/util.c  */
6190
6191 uint32 get_int_param( const char* param );
6192 char* get_string_param( const char* param );
6193
6194 /* The following definitions come from passdb/login_cache.c  */
6195
6196 bool login_cache_init(void);
6197 bool login_cache_shutdown(void);
6198 LOGIN_CACHE * login_cache_read(struct samu *sampass);
6199 bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry);
6200 bool login_cache_delentry(const struct samu *sampass);
6201
6202 /* The following definitions come from passdb/lookup_sid.c  */
6203
6204 bool lookup_name(TALLOC_CTX *mem_ctx,
6205                  const char *full_name, int flags,
6206                  const char **ret_domain, const char **ret_name,
6207                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6208 bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
6209                  const char *full_name, int flags,
6210                  const char **ret_domain, const char **ret_name,
6211                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6212 NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
6213                      const DOM_SID **sids, int level,
6214                      struct lsa_dom_info **ret_domains,
6215                      struct lsa_name_info **ret_names);
6216 bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6217                 const char **ret_domain, const char **ret_name,
6218                 enum lsa_SidType *ret_type);
6219 void store_uid_sid_cache(const DOM_SID *psid, uid_t uid);
6220 void store_gid_sid_cache(const DOM_SID *psid, gid_t gid);
6221 void uid_to_sid(DOM_SID *psid, uid_t uid);
6222 void gid_to_sid(DOM_SID *psid, gid_t gid);
6223 bool sid_to_uid(const DOM_SID *psid, uid_t *puid);
6224 bool sid_to_gid(const DOM_SID *psid, gid_t *pgid);
6225
6226 /* The following definitions come from passdb/machine_sid.c  */
6227
6228 DOM_SID *get_global_sam_sid(void);
6229 void reset_global_sam_sid(void) ;
6230 bool sid_check_is_domain(const DOM_SID *sid);
6231 bool sid_check_is_in_our_domain(const DOM_SID *sid);
6232
6233 /* The following definitions come from passdb/passdb.c  */
6234
6235 const char *my_sam_name(void);
6236 struct samu *samu_new( TALLOC_CTX *ctx );
6237 NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
6238 NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd);
6239 char *pdb_encode_acct_ctrl(uint32 acct_ctrl, size_t length);
6240 uint32 pdb_decode_acct_ctrl(const char *p);
6241 void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32 acct_ctrl);
6242 bool pdb_gethexpwd(const char *p, unsigned char *pwd);
6243 void pdb_sethexhours(char *p, const unsigned char *hours);
6244 bool pdb_gethexhours(const char *p, unsigned char *hours);
6245 int algorithmic_rid_base(void);
6246 uid_t algorithmic_pdb_user_rid_to_uid(uint32 user_rid);
6247 uid_t max_algorithmic_uid(void);
6248 uint32 algorithmic_pdb_uid_to_user_rid(uid_t uid);
6249 gid_t pdb_group_rid_to_gid(uint32 group_rid);
6250 gid_t max_algorithmic_gid(void);
6251 uint32 algorithmic_pdb_gid_to_group_rid(gid_t gid);
6252 bool algorithmic_pdb_rid_is_user(uint32 rid);
6253 bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
6254                             enum lsa_SidType *type);
6255 NTSTATUS local_password_change(const char *user_name,
6256                                 int local_flags,
6257                                 const char *new_passwd, 
6258                                 char **pp_err_str,
6259                                 char **pp_msg_str);
6260 bool init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen);
6261 uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, bool size_only);
6262 bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
6263 bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
6264 bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
6265 bool pdb_increment_bad_password_count(struct samu *sampass);
6266 bool is_dc_trusted_domain_situation(const char *domain_name);
6267 bool get_trust_pw_clear(const char *domain, char **ret_pwd,
6268                         const char **account_name, uint32 *channel);
6269 bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
6270                        const char **account_name, uint32 *channel);
6271 struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx,
6272                                                 struct samu *pw);
6273
6274 /* The following definitions come from passdb/pdb_compat.c  */
6275
6276 uint32 pdb_get_user_rid (const struct samu *sampass);
6277 uint32 pdb_get_group_rid (struct samu *sampass);
6278 bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag);
6279 bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag);
6280
6281 /* The following definitions come from passdb/pdb_get_set.c  */
6282
6283 uint32 pdb_get_acct_ctrl(const struct samu *sampass);
6284 time_t pdb_get_logon_time(const struct samu *sampass);
6285 time_t pdb_get_logoff_time(const struct samu *sampass);
6286 time_t pdb_get_kickoff_time(const struct samu *sampass);
6287 time_t pdb_get_bad_password_time(const struct samu *sampass);
6288 time_t pdb_get_pass_last_set_time(const struct samu *sampass);
6289 time_t pdb_get_pass_can_change_time(const struct samu *sampass);
6290 time_t pdb_get_pass_can_change_time_noncalc(const struct samu *sampass);
6291 time_t pdb_get_pass_must_change_time(const struct samu *sampass);
6292 bool pdb_get_pass_can_change(const struct samu *sampass);
6293 uint16 pdb_get_logon_divs(const struct samu *sampass);
6294 uint32 pdb_get_hours_len(const struct samu *sampass);
6295 const uint8 *pdb_get_hours(const struct samu *sampass);
6296 const uint8 *pdb_get_nt_passwd(const struct samu *sampass);
6297 const uint8 *pdb_get_lanman_passwd(const struct samu *sampass);
6298 const uint8 *pdb_get_pw_history(const struct samu *sampass, uint32 *current_hist_len);
6299 const char *pdb_get_plaintext_passwd(const struct samu *sampass);
6300 const DOM_SID *pdb_get_user_sid(const struct samu *sampass);
6301 const DOM_SID *pdb_get_group_sid(struct samu *sampass);
6302 enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element);
6303 const char *pdb_get_username(const struct samu *sampass);
6304 const char *pdb_get_domain(const struct samu *sampass);
6305 const char *pdb_get_nt_username(const struct samu *sampass);
6306 const char *pdb_get_fullname(const struct samu *sampass);
6307 const char *pdb_get_homedir(const struct samu *sampass);
6308 const char *pdb_get_dir_drive(const struct samu *sampass);
6309 const char *pdb_get_logon_script(const struct samu *sampass);
6310 const char *pdb_get_profile_path(const struct samu *sampass);
6311 const char *pdb_get_acct_desc(const struct samu *sampass);
6312 const char *pdb_get_workstations(const struct samu *sampass);
6313 const char *pdb_get_comment(const struct samu *sampass);
6314 const char *pdb_get_munged_dial(const struct samu *sampass);
6315 uint16 pdb_get_bad_password_count(const struct samu *sampass);
6316 uint16 pdb_get_logon_count(const struct samu *sampass);
6317 uint32 pdb_get_unknown_6(const struct samu *sampass);
6318 void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods);
6319 bool pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum pdb_value_state flag);
6320 bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6321 bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6322 bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6323 bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6324 bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6325 bool pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6326 bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6327 bool pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state flag);
6328 bool pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state flag);
6329 bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag);
6330 bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag);
6331 bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag);
6332 bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag);
6333 bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag);
6334 bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag);
6335 bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag);
6336 bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag);
6337 bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag);
6338 bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag);
6339 bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag);
6340 bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag);
6341 bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag);
6342 bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag);
6343 bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag);
6344 bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag);
6345 bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag);
6346 bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag);
6347 bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag);
6348 bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag);
6349 bool pdb_set_bad_password_count(struct samu *sampass, uint16 bad_password_count, enum pdb_value_state flag);
6350 bool pdb_set_logon_count(struct samu *sampass, uint16 logon_count, enum pdb_value_state flag);
6351 bool pdb_set_unknown_6(struct samu *sampass, uint32 unkn, enum pdb_value_state flag);
6352 bool pdb_set_hours(struct samu *sampass, const uint8 *hours, enum pdb_value_state flag);
6353 bool pdb_set_backend_private_data(struct samu *sampass, void *private_data, 
6354                                    void (*free_fn)(void **), 
6355                                    const struct pdb_methods *my_methods, 
6356                                    enum pdb_value_state flag);
6357 bool pdb_set_pass_can_change(struct samu *sampass, bool canchange);
6358 bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext);
6359 uint32 pdb_build_fields_present(struct samu *sampass);
6360
6361 /* The following definitions come from passdb/pdb_interface.c  */
6362
6363 NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
6364 struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
6365 struct event_context *pdb_get_event_context(void);
6366 NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
6367 bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
6368 bool guest_user_info( struct samu *user );
6369 bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid) ;
6370 NTSTATUS pdb_create_user(TALLOC_CTX *mem_ctx, const char *name, uint32 flags,
6371                          uint32 *rid);
6372 NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct);
6373 NTSTATUS pdb_add_sam_account(struct samu *sam_acct) ;
6374 NTSTATUS pdb_update_sam_account(struct samu *sam_acct) ;
6375 NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) ;
6376 NTSTATUS pdb_rename_sam_account(struct samu *oldname, const char *newname);
6377 NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success);
6378 bool pdb_getgrsid(GROUP_MAP *map, DOM_SID sid);
6379 bool pdb_getgrgid(GROUP_MAP *map, gid_t gid);
6380 bool pdb_getgrnam(GROUP_MAP *map, const char *name);
6381 NTSTATUS pdb_create_dom_group(TALLOC_CTX *mem_ctx, const char *name,
6382                               uint32 *rid);
6383 NTSTATUS pdb_delete_dom_group(TALLOC_CTX *mem_ctx, uint32 rid);
6384 NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map);
6385 NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map);
6386 NTSTATUS pdb_delete_group_mapping_entry(DOM_SID sid);
6387 bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
6388                             size_t *p_num_entries, bool unix_only);
6389 NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
6390                                 const DOM_SID *sid,
6391                                 uint32 **pp_member_rids,
6392                                 size_t *p_num_members);
6393 NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
6394                                     DOM_SID **pp_sids, gid_t **pp_gids,
6395                                     size_t *p_num_groups);
6396 NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
6397 NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6398                           uint32 member_rid);
6399 NTSTATUS pdb_del_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6400                           uint32 member_rid);
6401 NTSTATUS pdb_create_alias(const char *name, uint32 *rid);
6402 NTSTATUS pdb_delete_alias(const DOM_SID *sid);
6403 NTSTATUS pdb_get_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6404 NTSTATUS pdb_set_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6405 NTSTATUS pdb_add_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6406 NTSTATUS pdb_del_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6407 NTSTATUS pdb_enum_aliasmem(const DOM_SID *alias,
6408                            DOM_SID **pp_members, size_t *p_num_members);
6409 NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
6410                                     const DOM_SID *domain_sid,
6411                                     const DOM_SID *members, size_t num_members,
6412                                     uint32 **pp_alias_rids,
6413                                     size_t *p_num_alias_rids);
6414 NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
6415                          int num_rids,
6416                          uint32 *rids,
6417                          const char **names,
6418                          enum lsa_SidType *attrs);
6419 NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
6420                           int num_names,
6421                           const char **names,
6422                           uint32 *rids,
6423                           enum lsa_SidType *attrs);
6424 bool pdb_get_account_policy(int policy_index, uint32 *value);
6425 bool pdb_set_account_policy(int policy_index, uint32 value);
6426 bool pdb_get_seq_num(time_t *seq_num);
6427 bool pdb_uid_to_rid(uid_t uid, uint32 *rid);
6428 bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid);
6429 bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid);
6430 bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
6431                    enum lsa_SidType *type);
6432 bool pdb_rid_algorithm(void);
6433 bool pdb_new_rid(uint32 *rid);
6434 bool initialize_password_db(bool reload, struct event_context *event_ctx);
6435 struct pdb_search *pdb_search_init(enum pdb_search_type type);
6436 struct pdb_search *pdb_search_users(uint32 acct_flags);
6437 struct pdb_search *pdb_search_groups(void);
6438 struct pdb_search *pdb_search_aliases(const DOM_SID *sid);
6439 uint32 pdb_search_entries(struct pdb_search *search,
6440                           uint32 start_idx, uint32 max_entries,
6441                           struct samr_displayentry **result);
6442 void pdb_search_destroy(struct pdb_search *search);
6443 bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid, 
6444                            time_t *pass_last_set_time);
6445 bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
6446                            const DOM_SID *sid);
6447 bool pdb_del_trusteddom_pw(const char *domain);
6448 NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6449                               struct trustdom_info ***domains);
6450 NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
6451
6452 /* The following definitions come from passdb/pdb_ldap.c  */
6453
6454 const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
6455 int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
6456                                           const char *user,
6457                                           LDAPMessage ** result,
6458                                           const char **attr);
6459 const char **talloc_attrs(TALLOC_CTX *mem_ctx, ...);
6460 NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
6461 NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
6462 NTSTATUS pdb_ldap_init(void);
6463
6464 /* The following definitions come from passdb/pdb_nds.c  */
6465
6466 int pdb_nds_get_password(
6467         struct smbldap_state *ldap_state,
6468         char *object_dn,
6469         size_t *pwd_len,
6470         char *pwd );
6471 int pdb_nds_set_password(
6472         struct smbldap_state *ldap_state,
6473         char *object_dn,
6474         const char *pwd );
6475 NTSTATUS pdb_nds_init(void);
6476
6477 /* The following definitions come from passdb/pdb_smbpasswd.c  */
6478
6479 NTSTATUS pdb_smbpasswd_init(void) ;
6480
6481 /* The following definitions come from passdb/pdb_tdb.c  */
6482
6483 bool init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen);
6484 NTSTATUS pdb_tdbsam_init(void);
6485
6486 /* The following definitions come from passdb/secrets.c  */
6487
6488 bool secrets_init(void);
6489 struct db_context *secrets_db_ctx(void);
6490 void secrets_shutdown(void);
6491 void *secrets_fetch(const char *key, size_t *size);
6492 bool secrets_store(const char *key, const void *data, size_t size);
6493 bool secrets_delete(const char *key);
6494 bool secrets_store_domain_sid(const char *domain, const DOM_SID *sid);
6495 bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid);
6496 bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
6497 bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
6498 void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
6499 uint32 get_default_sec_channel(void);
6500 bool secrets_fetch_trust_account_password_legacy(const char *domain,
6501                                                  uint8 ret_pwd[16],
6502                                                  time_t *pass_last_set_time,
6503                                                  uint32 *channel);
6504 bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
6505                                           time_t *pass_last_set_time,
6506                                           uint32 *channel);
6507 bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
6508                                            DOM_SID *sid, time_t *pass_last_set_time);
6509 bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
6510                                            const DOM_SID *sid);
6511 bool secrets_delete_machine_password(const char *domain);
6512 bool secrets_delete_machine_password_ex(const char *domain);
6513 bool secrets_delete_domain_sid(const char *domain);
6514 bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel);
6515 char *secrets_fetch_machine_password(const char *domain,
6516                                      time_t *pass_last_set_time,
6517                                      uint32 *channel);
6518 bool trusted_domain_password_delete(const char *domain);
6519 bool secrets_store_ldap_pw(const char* dn, char* pw);
6520 bool fetch_ldap_pw(char **dn, char** pw);
6521 NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6522                                  struct trustdom_info ***domains);
6523 bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile);
6524 bool secrets_fetch_afs_key(const char *cell, struct afs_key *result);
6525 void secrets_fetch_ipc_userpass(char **username, char **domain, char **password);
6526 bool secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
6527                                 const char *remote_machine,
6528                                 const struct dcinfo *pdc);
6529 bool secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
6530                                 const char *remote_machine,
6531                                 struct dcinfo **ppdc);
6532 bool secrets_store_generic(const char *owner, const char *key, const char *secret);
6533 char *secrets_fetch_generic(const char *owner, const char *key);
6534
6535 /* The following definitions come from passdb/util_builtin.c  */
6536
6537 bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name);
6538 bool lookup_builtin_name(const char *name, uint32 *rid);
6539 const char *builtin_domain_name(void);
6540 bool sid_check_is_builtin(const DOM_SID *sid);
6541 bool sid_check_is_in_builtin(const DOM_SID *sid);
6542
6543 /* The following definitions come from passdb/util_unixsids.c  */
6544
6545 bool sid_check_is_unix_users(const DOM_SID *sid);
6546 bool sid_check_is_in_unix_users(const DOM_SID *sid);
6547 bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid);
6548 bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid);
6549 const char *unix_users_domain_name(void);
6550 bool lookup_unix_user_name(const char *name, DOM_SID *sid);
6551 bool sid_check_is_unix_groups(const DOM_SID *sid);
6552 bool sid_check_is_in_unix_groups(const DOM_SID *sid);
6553 const char *unix_groups_domain_name(void);
6554 bool lookup_unix_group_name(const char *name, DOM_SID *sid);
6555
6556 /* The following definitions come from passdb/util_wellknown.c  */
6557
6558 bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name);
6559 bool sid_check_is_in_wellknown_domain(const DOM_SID *sid);
6560 bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6561                           const char **domain, const char **name);
6562 bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
6563                            DOM_SID *sid, const char **domain);
6564
6565 /* The following definitions come from printing/load.c  */
6566
6567 void load_printers(void);
6568
6569 /* The following definitions come from printing/lpq_parse.c  */
6570
6571 bool parse_lpq_entry(enum printing_types printing_type,char *line,
6572                      print_queue_struct *buf,
6573                      print_status_struct *status,bool first);
6574
6575 /* The following definitions come from printing/notify.c  */
6576
6577 int print_queue_snum(const char *qname);
6578 bool print_notify_messages_pending(void);
6579 void print_notify_send_messages(struct messaging_context *msg_ctx,
6580                                 unsigned int timeout);
6581 void notify_printer_status_byname(const char *sharename, uint32 status);
6582 void notify_printer_status(int snum, uint32 status);
6583 void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
6584                               uint32 flags);
6585 void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
6586 void notify_job_total_bytes(const char *sharename, uint32 jobid,
6587                             uint32 size);
6588 void notify_job_total_pages(const char *sharename, uint32 jobid,
6589                             uint32 pages);
6590 void notify_job_username(const char *sharename, uint32 jobid, char *name);
6591 void notify_job_name(const char *sharename, uint32 jobid, char *name);
6592 void notify_job_submitted(const char *sharename, uint32 jobid,
6593                           time_t submitted);
6594 void notify_printer_driver(int snum, char *driver_name);
6595 void notify_printer_comment(int snum, char *comment);
6596 void notify_printer_sharename(int snum, char *share_name);
6597 void notify_printer_printername(int snum, char *printername);
6598 void notify_printer_port(int snum, char *port_name);
6599 void notify_printer_location(int snum, char *location);
6600 void notify_printer_byname( const char *printername, uint32 change, const char *value );
6601 bool print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list);
6602
6603 /* The following definitions come from printing/nt_printing.c  */
6604
6605 bool nt_printing_init(struct messaging_context *msg_ctx);
6606 uint32 update_c_setprinter(bool initialize);
6607 uint32 get_c_setprinter(void);
6608 int get_builtin_ntforms(nt_forms_struct **list);
6609 bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form);
6610 int get_ntforms(nt_forms_struct **list);
6611 int write_ntforms(nt_forms_struct **list, int number);
6612 bool add_a_form(nt_forms_struct **list, const FORM *form, int *count);
6613 bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret);
6614 void update_a_form(nt_forms_struct **list, const FORM *form, int count);
6615 int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
6616 const char *get_short_archi(const char *long_archi);
6617 WERROR clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
6618                                                           uint32 level, struct current_user *user);
6619 WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, 
6620                                   struct current_user *user, WERROR *perr);
6621 int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
6622 uint32 del_a_printer(const char *sharename);
6623 NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
6624 NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode);
6625 void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
6626 int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen);
6627 int add_new_printer_key( NT_PRINTER_DATA *data, const char *name );
6628 int delete_printer_key( NT_PRINTER_DATA *data, const char *name );
6629 int lookup_printerkey( NT_PRINTER_DATA *data, const char *name );
6630 int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys );
6631 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6632 WERROR check_published_printers(void);
6633 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6634                           struct GUID *guid);
6635 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6636 WERROR check_published_printers(void);
6637 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6638                           struct GUID *guid);
6639 WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key );
6640 WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6641 WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value, 
6642                            uint32 type, uint8 *data, int real_len );
6643 REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6644 WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6645 bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6646 bool del_driver_init(char *drivername);
6647 WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *data, uint32 data_len);
6648 WERROR get_a_printer( Printer_entry *print_hnd,
6649                         NT_PRINTER_INFO_LEVEL **pp_printer,
6650                         uint32 level,
6651                         const char *sharename);
6652 WERROR get_a_printer_search( Printer_entry *print_hnd,
6653                         NT_PRINTER_INFO_LEVEL **pp_printer,
6654                         uint32 level,
6655                         const char *sharename);
6656 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
6657 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6658 WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
6659                             fstring drivername, const char *architecture, uint32 version);
6660 uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6661 bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
6662 bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
6663 WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
6664                               uint32 version, bool delete_files );
6665 WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr);
6666 bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
6667 void map_printer_permissions(SEC_DESC *sd);
6668 void map_job_permissions(SEC_DESC *sd);
6669 bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
6670                         int access_type);
6671 bool print_time_access_check(const char *servicename);
6672 char* get_server_name( Printer_entry *printer );
6673
6674 /* The following definitions come from printing/pcap.c  */
6675
6676 bool pcap_cache_add(const char *name, const char *comment);
6677 bool pcap_cache_loaded(void);
6678 void pcap_cache_reload(void);
6679 bool pcap_printername_ok(const char *printername);
6680 void pcap_printer_fn(void (*fn)(char *, char *));
6681
6682 /* The following definitions come from printing/print_aix.c  */
6683
6684 bool aix_cache_reload(void);
6685
6686 /* The following definitions come from printing/print_cups.c  */
6687
6688 bool cups_cache_reload(void);
6689 bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer);
6690
6691 /* The following definitions come from printing/print_generic.c  */
6692
6693
6694 /* The following definitions come from printing/print_iprint.c  */
6695
6696 bool iprint_cache_reload(void);
6697
6698 /* The following definitions come from printing/print_svid.c  */
6699
6700 bool sysv_cache_reload(void);
6701
6702 /* The following definitions come from printing/printfsp.c  */
6703
6704 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
6705                         uint16_t current_vuid, files_struct **result);
6706 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
6707
6708 /* The following definitions come from printing/printing.c  */
6709
6710 uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
6711 bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
6712 bool print_backend_init(struct messaging_context *msg_ctx);
6713 void printing_end(void);
6714 int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob );
6715 uint32 sysjob_to_jobid(int unix_jobid);
6716 void pjob_delete(const char* sharename, uint32 jobid);
6717 void start_background_queue(void);
6718 bool print_notify_register_pid(int snum);
6719 bool print_notify_deregister_pid(int snum);
6720 bool print_job_exists(const char* sharename, uint32 jobid);
6721 int print_job_fd(const char* sharename, uint32 jobid);
6722 char *print_job_fname(const char* sharename, uint32 jobid);
6723 NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
6724 bool print_job_set_place(const char *sharename, uint32 jobid, int place);
6725 bool print_job_set_name(const char *sharename, uint32 jobid, char *name);
6726 bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
6727                       uint32 jobid, WERROR *errcode);
6728 bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
6729                      uint32 jobid, WERROR *errcode);
6730 bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
6731                       uint32 jobid, WERROR *errcode);
6732 ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
6733 int print_queue_length(int snum, print_status_struct *pstatus);
6734 uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
6735                        char *jobname, NT_DEVICEMODE *nt_devmode );
6736 void print_job_endpage(int snum, uint32 jobid);
6737 bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
6738 int print_queue_status(int snum, 
6739                        print_queue_struct **ppqueue,
6740                        print_status_struct *status);
6741 bool print_queue_pause(struct auth_serversupplied_info *server_info, int snum,
6742                        WERROR *errcode);
6743 bool print_queue_resume(struct auth_serversupplied_info *server_info, int snum,
6744                         WERROR *errcode);
6745 bool print_queue_purge(struct auth_serversupplied_info *server_info, int snum,
6746                        WERROR *errcode);
6747
6748 /* The following definitions come from printing/printing_db.c  */
6749
6750 struct tdb_print_db *get_print_db_byname(const char *printername);
6751 void release_print_db( struct tdb_print_db *pdb);
6752 void close_all_print_db(void);
6753 TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
6754
6755 /* The following definitions come from profile/profile.c  */
6756
6757 void set_profile_level(int level, struct server_id src);
6758 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
6759
6760 /* The following definitions come from registry/reg_api.c  */
6761
6762 WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
6763                     uint32 desired_access,
6764                     const struct nt_user_token *token,
6765                     struct registry_key **pkey);
6766 WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
6767                    const char *name, uint32 desired_access,
6768                    struct registry_key **pkey);
6769 WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
6770                    uint32 idx, char **name, NTTIME *last_write_time);
6771 WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6772                      uint32 idx, char **pname, struct registry_value **pval);
6773 WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6774                       const char *name, struct registry_value **pval);
6775 WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
6776                         uint32_t *max_subkeylen, uint32_t *max_subkeysize, 
6777                         uint32_t *num_values, uint32_t *max_valnamelen, 
6778                         uint32_t *max_valbufsize, uint32_t *secdescsize,
6779                         NTTIME *last_changed_time);
6780 WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
6781                      const char *subkeypath, uint32 desired_access,
6782                      struct registry_key **pkey,
6783                      enum winreg_CreateAction *paction);
6784 WERROR reg_deletekey(struct registry_key *parent, const char *path);
6785 WERROR reg_setvalue(struct registry_key *key, const char *name,
6786                     const struct registry_value *val);
6787 WERROR reg_deletevalue(struct registry_key *key, const char *name);
6788 WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
6789                           struct security_descriptor **psecdesc);
6790 WERROR reg_setkeysecurity(struct registry_key *key,
6791                           struct security_descriptor *psecdesc);
6792 WERROR reg_getversion(uint32_t *version);
6793 WERROR reg_restorekey(struct registry_key *key, const char *fname);
6794 WERROR reg_savekey(struct registry_key *key, const char *fname);
6795 WERROR reg_deleteallvalues(struct registry_key *key);
6796 WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6797                      uint32 desired_access, const struct nt_user_token *token,
6798                      struct registry_key **pkey);
6799 WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
6800                                struct registry_key *parent,
6801                                const char *path);
6802 WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
6803                                    struct registry_key *parent,
6804                                    const char *path);
6805 WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6806                        uint32 desired_access,
6807                        const struct nt_user_token *token,
6808                        enum winreg_CreateAction *paction,
6809                        struct registry_key **pkey);
6810 WERROR reg_delete_path(const struct nt_user_token *token,
6811                        const char *orig_path);
6812
6813 /* The following definitions come from registry/reg_backend_current_version.c  */
6814
6815
6816 /* The following definitions come from registry/reg_backend_db.c  */
6817
6818 WERROR init_registry_key(const char *add_path);
6819 WERROR init_registry_data(void);
6820 WERROR regdb_init(void);
6821 WERROR regdb_open( void );
6822 int regdb_close( void );
6823 int regdb_get_seqnum(void);
6824 bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr);
6825 int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr);
6826 int regdb_fetch_values( const char* key, REGVAL_CTR *values );
6827 bool regdb_store_values( const char *key, REGVAL_CTR *values );
6828 bool regdb_subkeys_need_update(REGSUBKEY_CTR *subkeys);
6829 bool regdb_values_need_update(REGVAL_CTR *values);
6830
6831 /* The following definitions come from registry/reg_backend_hkpt_params.c  */
6832
6833
6834 /* The following definitions come from registry/reg_backend_netlogon_params.c  */
6835
6836
6837 /* The following definitions come from registry/reg_backend_perflib.c  */
6838
6839
6840 /* The following definitions come from registry/reg_backend_printing.c  */
6841
6842
6843 /* The following definitions come from registry/reg_backend_prod_options.c  */
6844
6845
6846 /* The following definitions come from registry/reg_backend_shares.c  */
6847
6848
6849 /* The following definitions come from registry/reg_backend_smbconf.c  */
6850
6851
6852 /* The following definitions come from registry/reg_backend_tcpip_params.c  */
6853
6854
6855 /* The following definitions come from registry/reg_cachehook.c  */
6856
6857 WERROR reghook_cache_init(void);
6858 WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops);
6859 REGISTRY_OPS *reghook_cache_find(const char *keyname);
6860 void reghook_dump_cache( int debuglevel );
6861
6862 /* The following definitions come from registry/reg_dispatcher.c  */
6863
6864 bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys );
6865 bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6866 int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr );
6867 int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6868 bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
6869                           const struct nt_user_token *token );
6870 WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key,
6871                           struct security_descriptor **psecdesc);
6872 WERROR regkey_set_secdesc(REGISTRY_KEY *key,
6873                           struct security_descriptor *psecdesc);
6874 bool reg_subkeys_need_update(REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys);
6875 bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values);
6876
6877 /* The following definitions come from registry/reg_eventlog.c  */
6878
6879 bool eventlog_init_keys(void);
6880 bool eventlog_add_source( const char *eventlog, const char *sourcename,
6881                           const char *messagefile );
6882
6883 /* The following definitions come from registry/reg_init_basic.c  */
6884
6885 WERROR registry_init_common(void);
6886 WERROR registry_init_basic(void);
6887
6888 /* The following definitions come from registry/reg_init_full.c  */
6889
6890 WERROR registry_init_full(void);
6891
6892 /* The following definitions come from registry/reg_init_smbconf.c  */
6893
6894 NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
6895                                      NT_USER_TOKEN **ptoken);
6896 WERROR registry_init_smbconf(const char *keyname);
6897
6898 /* The following definitions come from registry/reg_objects.c  */
6899
6900 WERROR regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname );
6901 int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname );
6902 bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname );
6903 int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr );
6904 char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index );
6905 int regval_ctr_numvals( REGVAL_CTR *ctr );
6906 REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val );
6907 void free_registry_value( REGISTRY_VALUE *val );
6908 uint8* regval_data_p( REGISTRY_VALUE *val );
6909 uint32 regval_size( REGISTRY_VALUE *val );
6910 char* regval_name( REGISTRY_VALUE *val );
6911 uint32 regval_type( REGISTRY_VALUE *val );
6912 REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx );
6913 bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value );
6914 REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type,
6915                                const char *data_p, size_t size);
6916 int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
6917                          const char *data_p, size_t size );
6918 int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val );
6919 int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name );
6920 REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name );
6921 uint32 regval_dword( REGISTRY_VALUE *val );
6922 char *regval_sz(REGISTRY_VALUE *val);
6923
6924 /* The following definitions come from registry/reg_perfcount.c  */
6925
6926 void perfcount_init_keys( void );
6927 uint32 reg_perfcount_get_base_index(void);
6928 uint32 reg_perfcount_get_last_counter(uint32 base_index);
6929 uint32 reg_perfcount_get_last_help(uint32 last_counter);
6930 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
6931 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
6932 bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data);
6933 bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
6934                                       prs_struct *ps,
6935                                       int instId,
6936                                       PERF_OBJECT_TYPE *obj,
6937                                       TDB_CONTEXT *names);
6938 bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
6939                                  prs_struct *ps,
6940                                  int instInd,
6941                                  TDB_CONTEXT *names);
6942 uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 
6943                                          prs_struct *ps, 
6944                                          PERF_DATA_BLOCK *block,
6945                                          const char *object_ids);
6946 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
6947
6948 /* The following definitions come from registry/reg_util.c  */
6949
6950 bool reg_split_path(char *path, char **base, char **new_path);
6951 bool reg_split_key(char *path, char **base, char **key);
6952 char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
6953 void normalize_dbkey(char *key);
6954 char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
6955 int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values );
6956 size_t regval_build_multi_sz( char **values, uint16 **buffer );
6957
6958 /* The following definitions come from registry/reg_util_legacy.c  */
6959
6960 WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey,
6961                              const char *path,
6962                              const struct nt_user_token *token,
6963                              uint32 access_desired );
6964
6965 /* The following definitions come from registry/regfio.c  */
6966
6967
6968 /* The following definitions come from rpc_client/cli_lsarpc.c  */
6969
6970 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
6971                                 TALLOC_CTX *mem_ctx,
6972                                 bool sec_qos, uint32 des_access,
6973                                 POLICY_HND *pol);
6974 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
6975                                  TALLOC_CTX *mem_ctx, bool sec_qos,
6976                                  uint32 des_access, POLICY_HND *pol);
6977 NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
6978                                 TALLOC_CTX *mem_ctx,
6979                                 POLICY_HND *pol,
6980                                 int num_sids,
6981                                 const DOM_SID *sids,
6982                                 char ***pdomains,
6983                                 char ***pnames,
6984                                 enum lsa_SidType **ptypes);
6985 NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
6986                                  TALLOC_CTX *mem_ctx,
6987                                  POLICY_HND *pol, int num_names,
6988                                  const char **names,
6989                                  const char ***dom_names,
6990                                  int level,
6991                                  DOM_SID **sids,
6992                                  enum lsa_SidType **types);
6993 bool fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid);
6994
6995 /* The following definitions come from rpc_client/cli_netlogon.c  */
6996
6997 NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
6998                                      const char *server_name,
6999                                      const char *domain,
7000                                      const char *clnt_name,
7001                                      const char *machine_account,
7002                                      const unsigned char machine_pwd[16],
7003                                      enum netr_SchannelType sec_chan_type,
7004                                      uint32_t *neg_flags_inout);
7005 NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
7006                                    TALLOC_CTX *mem_ctx,
7007                                    uint32 logon_parameters,
7008                                    const char *domain,
7009                                    const char *username,
7010                                    const char *password,
7011                                    const char *workstation,
7012                                    int logon_type);
7013 NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
7014                                            TALLOC_CTX *mem_ctx,
7015                                            uint32 logon_parameters,
7016                                            const char *server,
7017                                            const char *username,
7018                                            const char *domain,
7019                                            const char *workstation,
7020                                            const uint8 chal[8],
7021                                            DATA_BLOB lm_response,
7022                                            DATA_BLOB nt_response,
7023                                            struct netr_SamInfo3 **info3);
7024 NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
7025                                               TALLOC_CTX *mem_ctx,
7026                                               uint32 logon_parameters,
7027                                               const char *server,
7028                                               const char *username,
7029                                               const char *domain,
7030                                               const char *workstation,
7031                                               const uint8 chal[8],
7032                                               DATA_BLOB lm_response,
7033                                               DATA_BLOB nt_response,
7034                                               struct netr_SamInfo3 **info3);
7035 NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
7036                                             TALLOC_CTX *mem_ctx,
7037                                             const unsigned char orig_trust_passwd_hash[16],
7038                                             const char *new_trust_pwd_cleartext,
7039                                             const unsigned char new_trust_passwd_hash[16],
7040                                             uint32_t sec_channel_type);
7041
7042 /* The following definitions come from rpc_client/cli_pipe.c  */
7043
7044 NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
7045                         uint8 op_num,
7046                         prs_struct *in_data,
7047                         prs_struct *out_data);
7048 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
7049                        struct cli_pipe_auth_data *auth);
7050 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
7051                                 unsigned int timeout);
7052 bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
7053 struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
7054 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
7055                                struct cli_pipe_auth_data **presult);
7056 NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
7057                                   enum pipe_auth_type auth_type,
7058                                   enum pipe_auth_level auth_level,
7059                                   const char *domain,
7060                                   const char *username,
7061                                   const char *password,
7062                                   struct cli_pipe_auth_data **presult);
7063 NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
7064                                    enum pipe_auth_level auth_level,
7065                                    const uint8_t sess_key[16],
7066                                    struct cli_pipe_auth_data **presult);
7067 NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
7068                                    enum pipe_auth_level auth_level,
7069                                    const char *service_princ,
7070                                    const char *username,
7071                                    const char *password,
7072                                    struct cli_pipe_auth_data **presult);
7073 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
7074                            const struct ndr_syntax_id *abstract_syntax,
7075                            struct rpc_pipe_client **presult);
7076 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
7077                                const struct ndr_syntax_id *abstract_syntax,
7078                                struct rpc_pipe_client **presult);
7079 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
7080                                   const struct ndr_syntax_id *interface,
7081                                   struct rpc_pipe_client **presult);
7082 NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
7083                                    const struct ndr_syntax_id *interface,
7084                                    enum pipe_auth_level auth_level,
7085                                    const char *domain,
7086                                    const char *username,
7087                                    const char *password,
7088                                    struct rpc_pipe_client **presult);
7089 NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
7090                                           const struct ndr_syntax_id *interface,
7091                                           enum pipe_auth_level auth_level,
7092                                           const char *domain,
7093                                           const char *username,
7094                                           const char *password,
7095                                           struct rpc_pipe_client **presult);
7096 NTSTATUS get_schannel_session_key(struct cli_state *cli,
7097                                   const char *domain,
7098                                   uint32 *pneg_flags,
7099                                   struct rpc_pipe_client **presult);
7100 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
7101                                              const struct ndr_syntax_id *interface,
7102                                              enum pipe_auth_level auth_level,
7103                                              const char *domain,
7104                                              const struct dcinfo *pdc,
7105                                              struct rpc_pipe_client **presult);
7106 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
7107                                                  const struct ndr_syntax_id *interface,
7108                                                  enum pipe_auth_level auth_level,
7109                                                  const char *domain,
7110                                                  const char *username,
7111                                                  const char *password,
7112                                                  struct rpc_pipe_client **presult);
7113 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
7114                                     const struct ndr_syntax_id *interface,
7115                                     enum pipe_auth_level auth_level,
7116                                     const char *domain,
7117                                     struct rpc_pipe_client **presult);
7118 NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
7119                                 const struct ndr_syntax_id *interface,
7120                                 enum pipe_auth_level auth_level,
7121                                 const char *service_princ,
7122                                 const char *username,
7123                                 const char *password,
7124                                 struct rpc_pipe_client **presult);
7125 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
7126                              struct rpc_pipe_client *cli,
7127                              DATA_BLOB *session_key);
7128
7129
7130 /* The following definitions come from rpc_client/cli_reg.c  */
7131
7132 NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7133                          uint32 reg_type, uint32 access_mask,
7134                          POLICY_HND *reg_hnd);
7135 uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
7136
7137 /* The following definitions come from rpc_client/cli_samr.c  */
7138
7139 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
7140                                     TALLOC_CTX *mem_ctx,
7141                                     struct policy_handle *user_handle,
7142                                     const char *newpassword,
7143                                     const char *oldpassword);
7144 NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
7145                                      TALLOC_CTX *mem_ctx,
7146                                      const char *username,
7147                                      const char *newpassword,
7148                                      const char *oldpassword);
7149 NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
7150                                          TALLOC_CTX *mem_ctx,
7151                                          const char *username,
7152                                          DATA_BLOB new_nt_password_blob,
7153                                          DATA_BLOB old_nt_hash_enc_blob,
7154                                          DATA_BLOB new_lm_password_blob,
7155                                          DATA_BLOB old_lm_hash_enc_blob);
7156 NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
7157                                      TALLOC_CTX *mem_ctx,
7158                                      const char *username,
7159                                      const char *newpassword,
7160                                      const char *oldpassword,
7161                                      struct samr_DomInfo1 **dominfo1,
7162                                      struct samr_ChangeReject **reject);
7163 void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
7164                                uint32 *max_size);
7165 NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
7166                                   TALLOC_CTX *mem_ctx,
7167                                   uint32_t access_mask,
7168                                   POLICY_HND *connect_pol);
7169
7170 /* The following definitions come from rpc_client/cli_spoolss.c  */
7171
7172 WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7173                                 const char *printername, const char *datatype, uint32 access_required,
7174                                 const char *station, const char *username, POLICY_HND *pol);
7175 WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7176                                  POLICY_HND *pol);
7177 WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7178                                  char *name, uint32 flags, uint32 level,
7179                                  uint32 *num_printers, PRINTER_INFO_CTR *ctr);
7180 WERROR rpccli_spoolss_enum_ports(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7181                               uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr);
7182 WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7183                               POLICY_HND *pol, uint32 level, 
7184                               PRINTER_INFO_CTR *ctr);
7185 WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7186                               POLICY_HND *pol, uint32 level, 
7187                               PRINTER_INFO_CTR *ctr, uint32 command);
7188 WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, 
7189                                     TALLOC_CTX *mem_ctx, 
7190                                     POLICY_HND *pol, uint32 level, 
7191                                     const char *env, int version, PRINTER_DRIVER_CTR *ctr);
7192 WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, 
7193                                        TALLOC_CTX *mem_ctx,
7194                                        uint32 level, const char *env,
7195                                        uint32 *num_drivers,
7196                                        PRINTER_DRIVER_CTR *ctr);
7197 WERROR rpccli_spoolss_getprinterdriverdir (struct rpc_pipe_client *cli, 
7198                                         TALLOC_CTX *mem_ctx,
7199                                         uint32 level, char *env,
7200                                         DRIVER_DIRECTORY_CTR *ctr);
7201 WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, 
7202                                      TALLOC_CTX *mem_ctx, uint32 level,
7203                                      PRINTER_DRIVER_CTR *ctr);
7204 WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7205                                  uint32 level, PRINTER_INFO_CTR*ctr);
7206 WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli, 
7207                                          TALLOC_CTX *mem_ctx, const char *arch,
7208                                          const char *driver, int version);
7209 WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli, 
7210                                         TALLOC_CTX *mem_ctx, const char *arch,
7211                                         const char *driver);
7212 WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
7213                                               TALLOC_CTX *mem_ctx,
7214                                               char *name, char *environment,
7215                                               fstring procdir);
7216 WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7217                            POLICY_HND *handle, uint32 level, FORM *form);
7218 WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7219                            POLICY_HND *handle, uint32 level, 
7220                            const char *form_name, FORM *form);
7221 WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7222                            POLICY_HND *handle, const char *formname, 
7223                            uint32 level, FORM_1 *form);
7224 WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7225                               POLICY_HND *handle, const char *form_name);
7226 WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7227                              POLICY_HND *handle, int level, uint32 *num_forms,
7228                              FORM_1 **forms);
7229 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7230                             POLICY_HND *hnd, uint32 level, uint32 firstjob, 
7231                             uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr);
7232 WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7233                           POLICY_HND *hnd, uint32 jobid, uint32 level, 
7234                           uint32 command);
7235 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7236                           POLICY_HND *hnd, uint32 jobid, uint32 level,
7237                           JOB_INFO_CTR *ctr);
7238 WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7239                                     POLICY_HND *hnd);
7240 WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7241                                   POLICY_HND *hnd);
7242 WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7243                                    POLICY_HND *hnd, char *docname, 
7244                                    char *outputfile, char *datatype, 
7245                                    uint32 *jobid);
7246 WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7247                                   POLICY_HND *hnd);
7248 WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7249                                   POLICY_HND *hnd, const char *valuename, 
7250                                   REGISTRY_VALUE *value);
7251 WERROR rpccli_spoolss_getprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7252                                     POLICY_HND *hnd, const char *keyname, 
7253                                     const char *valuename, 
7254                                     REGISTRY_VALUE *value);
7255 WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7256                                   POLICY_HND *hnd, REGISTRY_VALUE *value);
7257 WERROR rpccli_spoolss_setprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7258                                     POLICY_HND *hnd, char *keyname, 
7259                                     REGISTRY_VALUE *value);
7260 WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7261                                    POLICY_HND *hnd, uint32 ndx,
7262                                    uint32 value_offered, uint32 data_offered,
7263                                    uint32 *value_needed, uint32 *data_needed,
7264                                    REGISTRY_VALUE *value);
7265 WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7266                                      POLICY_HND *hnd, const char *keyname, 
7267                                      REGVAL_CTR *ctr);
7268 WERROR rpccli_spoolss_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7269                                 POLICY_HND *hnd, uint32 data_size, char *data,
7270                                 uint32 *num_written);
7271 WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7272                                      POLICY_HND *hnd, char *valuename);
7273 WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7274                                        POLICY_HND *hnd, char *keyname, 
7275                                        char *valuename);
7276 WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7277                                   POLICY_HND *hnd, const char *keyname,
7278                                   uint16 **keylist, uint32 *len);
7279 WERROR rpccli_spoolss_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7280                                     POLICY_HND *hnd, char *keyname);
7281
7282 /* The following definitions come from rpc_client/cli_spoolss_notify.c  */
7283
7284 WERROR rpccli_spoolss_reply_open_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7285                                       const char *printer, uint32 printerlocal, uint32 type, 
7286                                       POLICY_HND *handle);
7287 WERROR rpccli_spoolss_reply_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7288                                        POLICY_HND *handle);
7289 WERROR rpccli_spoolss_routerreplyprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7290                                       POLICY_HND *pol, uint32 condition, uint32 change_id);
7291 WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7292                          POLICY_HND *pol, uint32 notify_data_len,
7293                          SPOOL_NOTIFY_INFO_DATA *notify_data,
7294                          uint32 change_low, uint32 change_high);
7295 WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7296                             POLICY_HND *pol, uint32 flags, uint32 options,
7297                             const char *localmachine, uint32 printerlocal,
7298                             SPOOL_NOTIFY_OPTION *option);
7299
7300 /* The following definitions come from rpc_client/cli_svcctl.c  */
7301
7302 WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7303                                       POLICY_HND *hSCM, uint32 type, uint32 state, 
7304                                       uint32 *returned, ENUM_SERVICES_STATUS **service_array  );
7305 WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7306                                 POLICY_HND *hService, SERVICE_CONFIG *config );
7307
7308 /* The following definitions come from rpc_client/init_lsa.c  */
7309
7310 void init_lsa_String(struct lsa_String *name, const char *s);
7311 void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s);
7312 void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s);
7313 void init_lsa_AsciiStringLarge(struct lsa_AsciiStringLarge *name, const char *s);
7314 void init_lsa_sec_qos(struct lsa_QosInfo *r,
7315                       uint32_t len,
7316                       uint16_t impersonation_level,
7317                       uint8_t context_mode,
7318                       uint8_t effective_only);
7319 void init_lsa_obj_attr(struct lsa_ObjectAttribute *r,
7320                        uint32_t len,
7321                        uint8_t *root_dir,
7322                        const char *object_name,
7323                        uint32_t attributes,
7324                        struct security_descriptor *sec_desc,
7325                        struct lsa_QosInfo *sec_qos);
7326 void init_lsa_translated_sid(struct lsa_TranslatedSid *r,
7327                              enum lsa_SidType sid_type,
7328                              uint32_t rid,
7329                              uint32_t sid_index);
7330 void init_lsa_translated_name2(struct lsa_TranslatedName2 *r,
7331                                enum lsa_SidType sid_type,
7332                                const char *name,
7333                                uint32_t sid_index,
7334                                uint32_t unknown);
7335
7336 /* The following definitions come from rpc_client/init_netlogon.c  */
7337
7338 void init_netr_SamBaseInfo(struct netr_SamBaseInfo *r,
7339                            NTTIME last_logon,
7340                            NTTIME last_logoff,
7341                            NTTIME acct_expiry,
7342                            NTTIME last_password_change,
7343                            NTTIME allow_password_change,
7344                            NTTIME force_password_change,
7345                            const char *account_name,
7346                            const char *full_name,
7347                            const char *logon_script,
7348                            const char *profile_path,
7349                            const char *home_directory,
7350                            const char *home_drive,
7351                            uint16_t logon_count,
7352                            uint16_t bad_password_count,
7353                            uint32_t rid,
7354                            uint32_t primary_gid,
7355                            struct samr_RidWithAttributeArray groups,
7356                            uint32_t user_flags,
7357                            struct netr_UserSessionKey key,
7358                            const char *logon_server,
7359                            const char *domain,
7360                            struct dom_sid2 *domain_sid,
7361                            struct netr_LMSessionKey LMSessKey,
7362                            uint32_t acct_flags);
7363 void init_netr_SamInfo3(struct netr_SamInfo3 *r,
7364                         NTTIME last_logon,
7365                         NTTIME last_logoff,
7366                         NTTIME acct_expiry,
7367                         NTTIME last_password_change,
7368                         NTTIME allow_password_change,
7369                         NTTIME force_password_change,
7370                         const char *account_name,
7371                         const char *full_name,
7372                         const char *logon_script,
7373                         const char *profile_path,
7374                         const char *home_directory,
7375                         const char *home_drive,
7376                         uint16_t logon_count,
7377                         uint16_t bad_password_count,
7378                         uint32_t rid,
7379                         uint32_t primary_gid,
7380                         struct samr_RidWithAttributeArray groups,
7381                         uint32_t user_flags,
7382                         struct netr_UserSessionKey key,
7383                         const char *logon_server,
7384                         const char *domain,
7385                         struct dom_sid2 *domain_sid,
7386                         struct netr_LMSessionKey LMSessKey,
7387                         uint32_t acct_flags,
7388                         uint32_t sidcount,
7389                         struct netr_SidAttr *sids);
7390 NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
7391                                 uint8_t pipe_session_key[16],
7392                                 struct netr_SamInfo3 *sam3);
7393 void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
7394                             const char *domain_name,
7395                             uint32_t parameter_control,
7396                             uint32_t logon_id_low,
7397                             uint32_t logon_id_high,
7398                             const char *account_name,
7399                             const char *workstation);
7400 void init_netr_NetworkInfo(struct netr_NetworkInfo *r,
7401                            const char *domain_name,
7402                            uint32_t parameter_control,
7403                            uint32_t logon_id_low,
7404                            uint32_t logon_id_high,
7405                            const char *account_name,
7406                            const char *workstation,
7407                            uint8_t challenge[8],
7408                            struct netr_ChallengeResponse nt,
7409                            struct netr_ChallengeResponse lm);
7410 void init_netr_PasswordInfo(struct netr_PasswordInfo *r,
7411                             const char *domain_name,
7412                             uint32_t parameter_control,
7413                             uint32_t logon_id_low,
7414                             uint32_t logon_id_high,
7415                             const char *account_name,
7416                             const char *workstation,
7417                             struct samr_Password lmpassword,
7418                             struct samr_Password ntpassword);
7419 void init_netr_CryptPassword(const char *pwd,
7420                              unsigned char session_key[16],
7421                              struct netr_CryptPassword *pwd_buf);
7422
7423 /* The following definitions come from rpc_client/init_samr.c  */
7424
7425 void init_samr_DomInfo1(struct samr_DomInfo1 *r,
7426                         uint16_t min_password_length,
7427                         uint16_t password_history_length,
7428                         uint32_t password_properties,
7429                         int64_t max_password_age,
7430                         int64_t min_password_age);
7431 void init_samr_DomInfo2(struct samr_DomInfo2 *r,
7432                         NTTIME force_logoff_time,
7433                         const char *comment,
7434                         const char *domain_name,
7435                         const char *primary,
7436                         uint64_t sequence_num,
7437                         uint32_t unknown2,
7438                         enum samr_Role role,
7439                         uint32_t unknown3,
7440                         uint32_t num_users,
7441                         uint32_t num_groups,
7442                         uint32_t num_aliases);
7443 void init_samr_DomInfo3(struct samr_DomInfo3 *r,
7444                         NTTIME force_logoff_time);
7445 void init_samr_DomInfo4(struct samr_DomInfo4 *r,
7446                         const char *comment);
7447 void init_samr_DomInfo5(struct samr_DomInfo5 *r,
7448                         const char *domain_name);
7449 void init_samr_DomInfo6(struct samr_DomInfo6 *r,
7450                         const char *primary);
7451 void init_samr_DomInfo7(struct samr_DomInfo7 *r,
7452                         enum samr_Role role);
7453 void init_samr_DomInfo8(struct samr_DomInfo8 *r,
7454                         uint64_t sequence_num,
7455                         NTTIME domain_create_time);
7456 void init_samr_DomInfo9(struct samr_DomInfo9 *r,
7457                         uint32_t unknown);
7458 void init_samr_DomInfo12(struct samr_DomInfo12 *r,
7459                          uint64_t lockout_duration,
7460                          uint64_t lockout_window,
7461                          uint16_t lockout_threshold);
7462 void init_samr_group_info1(struct samr_GroupInfoAll *r,
7463                            const char *name,
7464                            uint32_t attributes,
7465                            uint32_t num_members,
7466                            const char *description);
7467 void init_samr_group_info2(struct lsa_String *r, const char *group_name);
7468 void init_samr_group_info3(struct samr_GroupInfoAttributes *r,
7469                            uint32_t attributes);
7470 void init_samr_group_info4(struct lsa_String *r, const char *description);
7471 void init_samr_group_info5(struct samr_GroupInfoAll *r,
7472                            const char *name,
7473                            uint32_t attributes,
7474                            uint32_t num_members,
7475                            const char *description);
7476 void init_samr_alias_info1(struct samr_AliasInfoAll *r,
7477                            const char *name,
7478                            uint32_t num_members,
7479                            const char *description);
7480 void init_samr_alias_info3(struct lsa_String *r,
7481                            const char *description);
7482 void init_samr_user_info7(struct samr_UserInfo7 *r,
7483                           const char *account_name);
7484 void init_samr_user_info9(struct samr_UserInfo9 *r,
7485                           uint32_t primary_gid);
7486 void init_samr_user_info16(struct samr_UserInfo16 *r,
7487                            uint32_t acct_flags);
7488 void init_samr_user_info18(struct samr_UserInfo18 *r,
7489                            const uint8 lm_pwd[16],
7490                            const uint8 nt_pwd[16]);
7491 void init_samr_user_info20(struct samr_UserInfo20 *r,
7492                            struct lsa_BinaryString *parameters);
7493 void init_samr_user_info21(struct samr_UserInfo21 *r,
7494                            NTTIME last_logon,
7495                            NTTIME last_logoff,
7496                            NTTIME last_password_change,
7497                            NTTIME acct_expiry,
7498                            NTTIME allow_password_change,
7499                            NTTIME force_password_change,
7500                            const char *account_name,
7501                            const char *full_name,
7502                            const char *home_directory,
7503                            const char *home_drive,
7504                            const char *logon_script,
7505                            const char *profile_path,
7506                            const char *description,
7507                            const char *workstations,
7508                            const char *comment,
7509                            struct lsa_BinaryString *parameters,
7510                            uint32_t rid,
7511                            uint32_t primary_gid,
7512                            uint32_t acct_flags,
7513                            uint32_t fields_present,
7514                            struct samr_LogonHours logon_hours,
7515                            uint16_t bad_password_count,
7516                            uint16_t logon_count,
7517                            uint16_t country_code,
7518                            uint16_t code_page,
7519                            uint8_t nt_password_set,
7520                            uint8_t lm_password_set,
7521                            uint8_t password_expired);
7522 void init_samr_user_info23(struct samr_UserInfo23 *r,
7523                            NTTIME last_logon,
7524                            NTTIME last_logoff,
7525                            NTTIME last_password_change,
7526                            NTTIME acct_expiry,
7527                            NTTIME allow_password_change,
7528                            NTTIME force_password_change,
7529                            const char *account_name,
7530                            const char *full_name,
7531                            const char *home_directory,
7532                            const char *home_drive,
7533                            const char *logon_script,
7534                            const char *profile_path,
7535                            const char *description,
7536                            const char *workstations,
7537                            const char *comment,
7538                            struct lsa_BinaryString *parameters,
7539                            uint32_t rid,
7540                            uint32_t primary_gid,
7541                            uint32_t acct_flags,
7542                            uint32_t fields_present,
7543                            struct samr_LogonHours logon_hours,
7544                            uint16_t bad_password_count,
7545                            uint16_t logon_count,
7546                            uint16_t country_code,
7547                            uint16_t code_page,
7548                            uint8_t nt_password_set,
7549                            uint8_t lm_password_set,
7550                            uint8_t password_expired,
7551                            uint8_t data[516],
7552                            uint8_t pw_len);
7553 void init_samr_user_info24(struct samr_UserInfo24 *r,
7554                            uint8_t data[516],
7555                            uint8_t pw_len);
7556 void init_samr_CryptPasswordEx(const char *pwd,
7557                                DATA_BLOB *session_key,
7558                                struct samr_CryptPasswordEx *pwd_buf);
7559 void init_samr_CryptPassword(const char *pwd,
7560                              DATA_BLOB *session_key,
7561                              struct samr_CryptPassword *pwd_buf);
7562
7563 /* The following definitions come from rpc_client/init_srvsvc.c  */
7564
7565 void init_srvsvc_NetSrvInfo102(struct srvsvc_NetSrvInfo102 *r,
7566                                enum srvsvc_PlatformId platform_id,
7567                                const char *server_name,
7568                                uint32_t version_major,
7569                                uint32_t version_minor,
7570                                uint32_t server_type,
7571                                const char *comment,
7572                                uint32_t users,
7573                                uint32_t disc,
7574                                uint32_t hidden,
7575                                uint32_t announce,
7576                                uint32_t anndelta,
7577                                uint32_t licenses,
7578                                const char *userpath);
7579 void init_srvsvc_NetSrvInfo101(struct srvsvc_NetSrvInfo101 *r,
7580                                enum srvsvc_PlatformId platform_id,
7581                                const char *server_name,
7582                                uint32_t version_major,
7583                                uint32_t version_minor,
7584                                uint32_t server_type,
7585                                const char *comment);
7586 void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
7587                                enum srvsvc_PlatformId platform_id,
7588                                const char *server_name);
7589 void init_srvsvc_NetShareInfo0(struct srvsvc_NetShareInfo0 *r,
7590                                const char *name);
7591 void init_srvsvc_NetShareInfo1(struct srvsvc_NetShareInfo1 *r,
7592                                const char *name,
7593                                enum srvsvc_ShareType type,
7594                                const char *comment);
7595 void init_srvsvc_NetShareInfo2(struct srvsvc_NetShareInfo2 *r,
7596                                const char *name,
7597                                enum srvsvc_ShareType type,
7598                                const char *comment,
7599                                uint32_t permissions,
7600                                uint32_t max_users,
7601                                uint32_t current_users,
7602                                const char *path,
7603                                const char *password);
7604 void init_srvsvc_NetShareInfo501(struct srvsvc_NetShareInfo501 *r,
7605                                  const char *name,
7606                                  enum srvsvc_ShareType type,
7607                                  const char *comment,
7608                                  uint32_t csc_policy);
7609 void init_srvsvc_NetShareInfo502(struct srvsvc_NetShareInfo502 *r,
7610                                  const char *name,
7611                                  enum srvsvc_ShareType type,
7612                                  const char *comment,
7613                                  uint32_t permissions,
7614                                  uint32_t max_users,
7615                                  uint32_t current_users,
7616                                  const char *path,
7617                                  const char *password,
7618                                  struct sec_desc_buf *sd_buf);
7619 void init_srvsvc_NetShareInfo1004(struct srvsvc_NetShareInfo1004 *r,
7620                                   const char *comment);
7621 void init_srvsvc_NetShareInfo1005(struct srvsvc_NetShareInfo1005 *r,
7622                                   uint32_t dfs_flags);
7623 void init_srvsvc_NetShareInfo1006(struct srvsvc_NetShareInfo1006 *r,
7624                                   uint32_t max_users);
7625 void init_srvsvc_NetShareInfo1007(struct srvsvc_NetShareInfo1007 *r,
7626                                   uint32_t flags,
7627                                   const char *alternate_directory_name);
7628 void init_srvsvc_NetRemoteTODInfo(struct srvsvc_NetRemoteTODInfo *r,
7629                                   uint32_t elapsed,
7630                                   uint32_t msecs,
7631                                   uint32_t hours,
7632                                   uint32_t mins,
7633                                   uint32_t secs,
7634                                   uint32_t hunds,
7635                                   int32_t ttimezone,
7636                                   uint32_t tinterval,
7637                                   uint32_t day,
7638                                   uint32_t month,
7639                                   uint32_t year,
7640                                   uint32_t weekday);
7641 void init_srvsvc_NetSessInfo0(struct srvsvc_NetSessInfo0 *r,
7642                               const char *client);
7643 void init_srvsvc_NetSessInfo1(struct srvsvc_NetSessInfo1 *r,
7644                               const char *client,
7645                               const char *user,
7646                               uint32_t num_open,
7647                               uint32_t _time,
7648                               uint32_t idle_time,
7649                               uint32_t user_flags);
7650 void init_srvsvc_NetSessInfo2(struct srvsvc_NetSessInfo2 *r,
7651                               const char *client,
7652                               const char *user,
7653                               uint32_t num_open,
7654                               uint32_t _time,
7655                               uint32_t idle_time,
7656                               uint32_t user_flags,
7657                               const char *client_type);
7658 void init_srvsvc_NetSessInfo10(struct srvsvc_NetSessInfo10 *r,
7659                                const char *client,
7660                                const char *user,
7661                                uint32_t _time,
7662                                uint32_t idle_time);
7663 void init_srvsvc_NetSessInfo502(struct srvsvc_NetSessInfo502 *r,
7664                                const char *client,
7665                                const char *user,
7666                                uint32_t num_open,
7667                                uint32_t _time,
7668                                uint32_t idle_time,
7669                                uint32_t user_flags,
7670                                const char *client_type,
7671                                const char *transport);
7672 void init_srvsvc_NetFileInfo2(struct srvsvc_NetFileInfo2 *r,
7673                               uint32_t fid);
7674 void init_srvsvc_NetFileInfo3(struct srvsvc_NetFileInfo3 *r,
7675                               uint32_t fid,
7676                               uint32_t permissions,
7677                               uint32_t num_locks,
7678                               const char *path,
7679                               const char *user);
7680 void init_srvsvc_NetConnInfo0(struct srvsvc_NetConnInfo0 *r,
7681                               uint32_t conn_id);
7682 void init_srvsvc_NetConnInfo1(struct srvsvc_NetConnInfo1 *r,
7683                               uint32_t conn_id,
7684                               uint32_t conn_type,
7685                               uint32_t num_open,
7686                               uint32_t num_users,
7687                               uint32_t conn_time,
7688                               const char *user,
7689                               const char *share);
7690
7691 /* The following definitions come from rpc_client/ndr.c  */
7692
7693 NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
7694                         TALLOC_CTX *mem_ctx,
7695                         const struct ndr_interface_table *table,
7696                         uint32 opnum, void *r);
7697
7698 /* The following definitions come from rpc_parse/parse_buffer.c  */
7699
7700 void rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
7701 bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer);
7702 bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer);
7703 bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size);
7704 void rpcbuf_move(RPC_BUFFER *src, RPC_BUFFER **dest);
7705 uint32 rpcbuf_get_size(RPC_BUFFER *buffer);
7706 bool smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string);
7707 bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string);
7708 bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc);
7709 uint32 size_of_relative_string(UNISTR *string);
7710
7711 /* The following definitions come from rpc_parse/parse_eventlog.c  */
7712
7713 bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
7714                                  prs_struct *ps, int depth);
7715 bool eventlog_io_r_read_eventlog(const char *desc,
7716                                  EVENTLOG_Q_READ_EVENTLOG *q_u,
7717                                  EVENTLOG_R_READ_EVENTLOG *r_u,
7718                                  prs_struct *ps,
7719                                  int depth);
7720
7721 /* The following definitions come from rpc_parse/parse_misc.c  */
7722
7723 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
7724 bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime);
7725 uint32 get_enum_hnd(ENUM_HND *enh);
7726 void init_enum_hnd(ENUM_HND *enh, uint32 hnd);
7727 bool smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth);
7728 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
7729 void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid);
7730 bool smb_io_dom_sid2_p(const char *desc, prs_struct *ps, int depth, DOM_SID2 **sid2);
7731 bool smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth);
7732 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
7733                  prs_struct *ps, int depth);
7734 void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer);
7735 bool smb_io_strhdr(const char *desc,  STRHDR *hdr, prs_struct *ps, int depth);
7736 void init_uni_hdr(UNIHDR *hdr, UNISTR2 *str2);
7737 bool smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth);
7738 void init_buf_hdr(BUFHDR *hdr, int max_len, int len);
7739 bool smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset);
7740 bool smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, 
7741                                 uint32 ptr_hdrbuf, uint32 max_len, uint32 len);
7742 bool smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth);
7743 void init_unistr(UNISTR *str, const char *buf);
7744 bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
7745 void init_rpc_blob_uint32(RPC_DATA_BLOB *str, uint32 val);
7746 void init_rpc_blob_str(RPC_DATA_BLOB *str, const char *buf, int len);
7747 void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf);
7748 void init_rpc_blob_bytes(RPC_DATA_BLOB *str, uint8 *buf, size_t len);
7749 bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
7750 void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len);
7751 bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2);
7752 void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
7753 void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
7754 void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len);
7755 bool smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth);
7756 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
7757 void init_unistr4(UNISTR4 *uni4, const char *buf, enum unistr2_term_codes flags);
7758 void init_unistr4_w( TALLOC_CTX *ctx, UNISTR4 *uni4, const smb_ucs2_t *buf );
7759 void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
7760 void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR *from);
7761 void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
7762 bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2);
7763 bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 );
7764 bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
7765 bool prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7766 bool prs_unistr4_hdr(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7767 bool prs_unistr4_str(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7768 bool prs_unistr4_array(const char *desc, prs_struct *ps, int depth, UNISTR4_ARRAY *array );
7769 bool init_unistr4_array( UNISTR4_ARRAY *array, uint32 count, const char **strings );
7770 void init_dom_rid(DOM_RID *prid, uint32 rid, uint16 type, uint32 idx);
7771 bool smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth);
7772 bool smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth);
7773 void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type);
7774 bool smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth);
7775 void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid);
7776 void init_clnt_srv(DOM_CLNT_SRV *logcln, const char *logon_srv,
7777                    const char *comp_name);
7778 bool smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth);
7779 void init_log_info(DOM_LOG_INFO *loginfo, const char *logon_srv, const char *acct_name,
7780                 uint16 sec_chan, const char *comp_name);
7781 bool smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth);
7782 bool smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth);
7783 bool smb_io_cred(const char *desc,  DOM_CRED *cred, prs_struct *ps, int depth);
7784 void init_clnt_info2(DOM_CLNT_INFO2 *clnt,
7785                                 const char *logon_srv, const char *comp_name,
7786                                 const DOM_CRED *clnt_cred);
7787 bool smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth);
7788 void init_clnt_info(DOM_CLNT_INFO *clnt,
7789                 const char *logon_srv, const char *acct_name,
7790                 uint16 sec_chan, const char *comp_name,
7791                 const DOM_CRED *cred);
7792 bool smb_io_clnt_info(const char *desc,  DOM_CLNT_INFO *clnt, prs_struct *ps, int depth);
7793 void init_logon_id(DOM_LOGON_ID *logonid, uint32 log_id_low, uint32 log_id_high);
7794 bool smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth);
7795 void init_owf_info(OWF_INFO *hash, const uint8 data[16]);
7796 bool smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth);
7797 bool smb_io_gid(const char *desc,  DOM_GID *gid, prs_struct *ps, int depth);
7798 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
7799 void init_unistr3(UNISTR3 *str, const char *buf);
7800 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth);
7801 bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
7802 bool smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth);
7803 bool smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth);
7804 bool smb_io_rpc_blob(const char *desc, RPC_DATA_BLOB *blob, prs_struct *ps, int depth);
7805 bool make_uni_hdr(UNIHDR *hdr, int len);
7806 bool make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer);
7807 uint32 str_len_uni(UNISTR *source);
7808 bool policy_handle_is_valid(const POLICY_HND *hnd);
7809
7810 /* The following definitions come from rpc_parse/parse_ntsvcs.c  */
7811
7812 bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth);
7813 bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth);
7814 bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth);
7815 bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth);
7816
7817 /* The following definitions come from rpc_parse/parse_prs.c  */
7818
7819 void prs_dump(const char *name, int v, prs_struct *ps);
7820 void prs_dump_before(const char *name, int v, prs_struct *ps);
7821 void prs_dump_region(const char *name, int v, prs_struct *ps,
7822                      int from_off, int to_off);
7823 void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name);
7824 bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io);
7825 void prs_mem_free(prs_struct *ps);
7826 void prs_mem_clear(prs_struct *ps);
7827 char *prs_alloc_mem_(prs_struct *ps, size_t size, unsigned int count);
7828 char *prs_alloc_mem(prs_struct *ps, size_t size, unsigned int count);
7829 TALLOC_CTX *prs_get_mem_context(prs_struct *ps);
7830 void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic);
7831 char *prs_take_memory(prs_struct *ps, uint32 *psize);
7832 bool prs_set_buffer_size(prs_struct *ps, uint32 newsize);
7833 bool prs_grow(prs_struct *ps, uint32 extra_space);
7834 bool prs_force_grow(prs_struct *ps, uint32 extra_space);
7835 char *prs_data_p(prs_struct *ps);
7836 uint32 prs_data_size(prs_struct *ps);
7837 uint32 prs_offset(prs_struct *ps);
7838 bool prs_set_offset(prs_struct *ps, uint32 offset);
7839 bool prs_append_prs_data(prs_struct *dst, prs_struct *src);
7840 bool prs_append_some_data(prs_struct *dst, void *src_base, uint32_t start,
7841                           uint32_t len);
7842 bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len);
7843 bool prs_copy_data_in(prs_struct *dst, const char *src, uint32 len);
7844 bool prs_copy_data_out(char *dst, prs_struct *src, uint32 len);
7845 bool prs_copy_all_data_out(char *dst, prs_struct *src);
7846 void prs_set_endian_data(prs_struct *ps, bool endian);
7847 bool prs_align(prs_struct *ps);
7848 bool prs_align_uint16(prs_struct *ps);
7849 bool prs_align_uint64(prs_struct *ps);
7850 bool prs_align_custom(prs_struct *ps, uint8 boundary);
7851 bool prs_align_needed(prs_struct *ps, uint32 needed);
7852 char *prs_mem_get(prs_struct *ps, uint32 extra_size);
7853 void prs_switch_type(prs_struct *ps, bool io);
7854 void prs_force_dynamic(prs_struct *ps);
7855 void prs_set_session_key(prs_struct *ps, const char sess_key[16]);
7856 bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8);
7857 bool prs_pointer( const char *name, prs_struct *ps, int depth, 
7858                  void *dta, size_t data_size,
7859                  bool (*prs_fn)(const char*, prs_struct*, int, void*) );
7860 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
7861 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
7862 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
7863 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7864 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7865 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
7866 bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len);
7867 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7868 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7869 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
7870 bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
7871 bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf);
7872 bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str);
7873 bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
7874 bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
7875 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
7876 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size);
7877 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str);
7878 bool prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset);
7879 bool prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
7880                                 uint32 ptr_uint16, uint32 start_offset);
7881 bool prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset);
7882 bool prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
7883                                 uint32 ptr_uint32, uint32 data_size);
7884 int tdb_prs_store(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps);
7885 int tdb_prs_fetch(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps, TALLOC_CTX *mem_ctx);
7886 bool prs_hash1(prs_struct *ps, uint32 offset, int len);
7887 void schannel_encode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7888                    enum schannel_direction direction,
7889                    RPC_AUTH_SCHANNEL_CHK * verf,
7890                    char *data, size_t data_len);
7891 bool schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7892                    enum schannel_direction direction, 
7893                    RPC_AUTH_SCHANNEL_CHK * verf, char *data, size_t data_len);
7894 bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7895 bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7896
7897 /* The following definitions come from rpc_parse/parse_rpc.c  */
7898
7899 const char *cli_get_pipe_name_from_iface(TALLOC_CTX *mem_ctx,
7900                                          struct cli_state *cli,
7901                                          const struct ndr_syntax_id *interface);
7902 void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
7903                                 uint32 call_id, int data_len, int auth_len);
7904 bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth);
7905 void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
7906                       const RPC_IFACE *abstract, const RPC_IFACE *transfer);
7907 void init_rpc_hdr_rb(RPC_HDR_RB *rpc, 
7908                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7909                                 RPC_CONTEXT *context);
7910 bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth);
7911 bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth);
7912 void init_rpc_hdr_ba(RPC_HDR_BA *rpc, 
7913                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7914                                 const char *pipe_addr,
7915                                 uint8 num_results, uint16 result, uint16 reason,
7916                                 RPC_IFACE *transfer);
7917 bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth);
7918 void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum);
7919 bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth);
7920 bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth);
7921 bool smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth);
7922 void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
7923                                 uint8 auth_type, uint8 auth_level,
7924                                 uint8 auth_pad_len,
7925                                 uint32 auth_context_id);
7926 bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth);
7927 bool rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
7928                                 const char *signature, uint32 msg_type);
7929 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
7930                                 const char *signature, uint32 msg_type);
7931 bool smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7932 bool smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7933 void init_rpc_auth_schannel_neg(RPC_AUTH_SCHANNEL_NEG *neg,
7934                               const char *domain, const char *myname);
7935 bool smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
7936                                 prs_struct *ps, int depth);
7937 bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len, 
7938                                 RPC_AUTH_SCHANNEL_CHK * chk,
7939                                 prs_struct *ps, int depth);
7940
7941 /* The following definitions come from rpc_parse/parse_sec.c  */
7942
7943 bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
7944 bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
7945
7946 /* The following definitions come from rpc_parse/parse_spoolss.c  */
7947
7948 bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
7949 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
7950 bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
7951                                      prs_struct *ps, int depth);
7952 bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u );
7953 bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode);
7954 bool make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u,
7955                 const fstring printername, 
7956                 const fstring datatype, 
7957                 uint32 access_required,
7958                 const fstring clientname,
7959                 const fstring user_name);
7960 bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u, 
7961         const char *srv_name, const char* clientname, const char* user_name,
7962         uint32 level, PRINTER_INFO_CTR *ctr);
7963 bool make_spoolss_printer_info_2(TALLOC_CTX *ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, 
7964                                 PRINTER_INFO_2 *info);
7965 bool make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3, 
7966                                 PRINTER_INFO_3 *info);
7967 bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7, 
7968                                 PRINTER_INFO_7 *info);
7969 bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth);
7970 bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth);
7971 bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
7972 bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
7973 bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
7974                                            SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, 
7975                                            const char *server,
7976                                            const char* arch, 
7977                                            const char* driver,
7978                                            int version);
7979 bool make_spoolss_q_deleteprinterdriver(
7980         TALLOC_CTX *mem_ctx,
7981         SPOOL_Q_DELETEPRINTERDRIVER *q_u, 
7982         const char *server,
7983         const char* arch, 
7984         const char* driver 
7985 );
7986 bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
7987                                    const POLICY_HND *handle,
7988                                    const char *valuename, uint32 size);
7989 bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
7990                                      const POLICY_HND *handle,
7991                                      const char *keyname, 
7992                                      const char *valuename, uint32 size);
7993 bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
7994 bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth);
7995 bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth);
7996 bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth);
7997 bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth);
7998 bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
7999 bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd);
8000 bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth);
8001 bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth);
8002 bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth);
8003 bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth);
8004 bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8005 bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth);
8006 bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8007 bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth);
8008 bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth);
8009 bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth);
8010 bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth);
8011 bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth);
8012 bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth);
8013 bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth);
8014 bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth);
8015 bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth);
8016 bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth);
8017 bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth);
8018 bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth);
8019 bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth);
8020 bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
8021 bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
8022 bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
8023 bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth);
8024 bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth);
8025 bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth);
8026 bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth);
8027 bool smb_io_printer_info_3(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_3 *info, int depth);
8028 bool smb_io_printer_info_4(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_4 *info, int depth);
8029 bool smb_io_printer_info_5(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_5 *info, int depth);
8030 bool smb_io_printer_info_6(const char *desc, RPC_BUFFER *buffer,
8031                            PRINTER_INFO_6 *info, int depth);
8032 bool smb_io_printer_info_7(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_7 *info, int depth);
8033 bool smb_io_port_info_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
8034 bool smb_io_port_info_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
8035 bool smb_io_printer_driver_info_1(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) ;
8036 bool smb_io_printer_driver_info_2(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) ;
8037 bool smb_io_printer_driver_info_3(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_3 *info, int depth);
8038 bool smb_io_printer_driver_info_6(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_6 *info, int depth);
8039 bool smb_io_job_info_1(const char *desc, RPC_BUFFER *buffer, JOB_INFO_1 *info, int depth);
8040 bool smb_io_job_info_2(const char *desc, RPC_BUFFER *buffer, JOB_INFO_2 *info, int depth);
8041 bool smb_io_form_1(const char *desc, RPC_BUFFER *buffer, FORM_1 *info, int depth);
8042 bool smb_io_driverdir_1(const char *desc, RPC_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth);
8043 bool smb_io_port_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
8044 bool smb_io_port_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
8045 bool smb_io_printprocessor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth);
8046 bool smb_io_printprocdatatype_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth);
8047 bool smb_io_printmonitor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_1 *info, int depth);
8048 bool smb_io_printmonitor_info_2(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_2 *info, int depth);
8049 uint32 spoolss_size_printer_info_0(PRINTER_INFO_0 *info);
8050 uint32 spoolss_size_printer_info_1(PRINTER_INFO_1 *info);
8051 uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info);
8052 uint32 spoolss_size_printer_info_4(PRINTER_INFO_4 *info);
8053 uint32 spoolss_size_printer_info_5(PRINTER_INFO_5 *info);
8054 uint32 spoolss_size_printer_info_6(PRINTER_INFO_6 *info);
8055 uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info);
8056 uint32 spoolss_size_printer_info_7(PRINTER_INFO_7 *info);
8057 uint32 spoolss_size_printer_driver_info_1(DRIVER_INFO_1 *info);
8058 uint32 spoolss_size_printer_driver_info_2(DRIVER_INFO_2 *info);
8059 uint32 spoolss_size_string_array(uint16 *string);
8060 uint32 spoolss_size_printer_driver_info_3(DRIVER_INFO_3 *info);
8061 uint32 spoolss_size_printer_driver_info_6(DRIVER_INFO_6 *info);
8062 uint32 spoolss_size_job_info_1(JOB_INFO_1 *info);
8063 uint32 spoolss_size_job_info_2(JOB_INFO_2 *info);
8064 uint32 spoolss_size_form_1(FORM_1 *info);
8065 uint32 spoolss_size_port_info_1(PORT_INFO_1 *info);
8066 uint32 spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1 *info);
8067 uint32 spoolss_size_printprocessordirectory_info_1(PRINTPROCESSOR_DIRECTORY_1 *info);
8068 uint32 spoolss_size_port_info_2(PORT_INFO_2 *info);
8069 uint32 spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1 *info);
8070 uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info);
8071 uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
8072 uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info);
8073 uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info);
8074 bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, 
8075                                const POLICY_HND *hnd,
8076                                const fstring architecture,
8077                                uint32 level, uint32 clientmajor, uint32 clientminor,
8078                                RPC_BUFFER *buffer, uint32 offered);
8079 bool spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth);
8080 bool spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth);
8081 bool make_spoolss_q_enumprinters(
8082         SPOOL_Q_ENUMPRINTERS *q_u, 
8083         uint32 flags, 
8084         char *servername, 
8085         uint32 level, 
8086         RPC_BUFFER *buffer, 
8087         uint32 offered
8088 );
8089 bool make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u, 
8090                                 fstring servername, uint32 level, 
8091                                 RPC_BUFFER *buffer, uint32 offered);
8092 bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth);
8093 bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth);
8094 bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth);
8095 bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth);
8096 bool make_spoolss_q_getprinter(
8097         TALLOC_CTX *mem_ctx,
8098         SPOOL_Q_GETPRINTER *q_u, 
8099         const POLICY_HND *hnd, 
8100         uint32 level, 
8101         RPC_BUFFER *buffer, 
8102         uint32 offered
8103 );
8104 bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, 
8105                                 const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, 
8106                                 uint32 command);
8107 bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth);
8108 bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth);
8109 bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth);
8110 bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth);
8111 bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth);
8112 bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth);
8113 bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth);
8114 bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
8115                                 uint32 firstjob,
8116                                 uint32 numofjobs,
8117                                 uint32 level,
8118                                 RPC_BUFFER *buffer,
8119                                 uint32 offered);
8120 bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth);
8121 bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth);
8122 bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth);
8123 bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth);
8124 bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth);
8125 bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth);
8126 bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
8127                                 const char *name,
8128                                 const char *environment,
8129                                 uint32 level,
8130                                 RPC_BUFFER *buffer, uint32 offered);
8131 bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth);
8132 bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth);
8133 bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth);
8134 bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth);
8135 bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth);
8136 bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth);
8137 bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth);
8138 bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth);
8139 bool spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth);
8140 bool spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth);
8141 bool spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth);
8142 bool spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth);
8143 bool spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth);
8144 bool spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, 
8145                                prs_struct *ps, int depth);
8146 bool spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, 
8147                                           prs_struct *ps, int depth);
8148 bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, 
8149                                           prs_struct *ps, int depth);
8150 bool smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth);
8151 bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth);
8152 bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
8153                                 SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, 
8154                                 uint32 level, PRINTER_DRIVER_CTR *info);
8155 bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
8156         SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
8157                                 DRIVER_INFO_3 *info3);
8158 bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
8159 bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8160 bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8161 bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8162 bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8163 bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
8164                                 NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc);
8165 bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
8166                                 NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc);
8167 bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
8168                               NT_PRINTER_INFO_LEVEL_2  *d);
8169 bool make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
8170                                 fstring servername, fstring env_name, uint32 level,
8171                                 RPC_BUFFER *buffer, uint32 offered);
8172 bool spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth);
8173 bool spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth);
8174 bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth);
8175 bool spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth);
8176 bool spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth);
8177 bool spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth);
8178 bool spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth);
8179 bool spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth);
8180 bool spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth);
8181 bool spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth);
8182 bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
8183 bool spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth);
8184 bool make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
8185                 const POLICY_HND *hnd,
8186                 uint32 idx, uint32 valuelen, uint32 datalen);
8187 bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
8188                                       const POLICY_HND *hnd, const char *key,
8189                                       uint32 size);
8190 bool make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
8191                                    char* value, uint32 data_type, char* data, uint32 data_size);
8192 bool make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY_HND *hnd,
8193                                      char *key, char* value, uint32 data_type, char* data, 
8194                                      uint32 data_size);
8195 bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
8196 bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
8197 bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth);
8198 bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth);
8199 bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth);
8200 bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth);
8201 bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth);
8202 bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth);
8203 bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth);
8204 bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth);
8205 bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth);
8206 bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth);
8207 void free_devmode(DEVICEMODE *devmode);
8208 void free_printer_info_1(PRINTER_INFO_1 *printer);
8209 void free_printer_info_2(PRINTER_INFO_2 *printer);
8210 void free_printer_info_3(PRINTER_INFO_3 *printer);
8211 void free_printer_info_4(PRINTER_INFO_4 *printer);
8212 void free_printer_info_5(PRINTER_INFO_5 *printer);
8213 void free_printer_info_6(PRINTER_INFO_6 *printer);
8214 void free_printer_info_7(PRINTER_INFO_7 *printer);
8215 void free_job_info_2(JOB_INFO_2 *job);
8216 bool make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, 
8217                                const fstring string, uint32 printer, uint32 type);
8218 bool spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth);
8219 bool spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth);
8220 bool make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, 
8221                                         uint32 condition, uint32 change_id);
8222 bool spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth);
8223 bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth);
8224 bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
8225 bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
8226 bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
8227 bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
8228                                 uint32 change_low, uint32 change_high,
8229                                 SPOOL_NOTIFY_INFO *info);
8230 bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
8231 bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
8232 bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8233 bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8234 bool spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8235 bool spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8236 bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, 
8237                                    POLICY_HND *hnd, const char *key, 
8238                                    uint32 size);
8239 bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth);
8240 bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
8241 bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u, 
8242                                      POLICY_HND *hnd, char *keyname);
8243 bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth);
8244 bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth);
8245 bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8246 bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8247 bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered);
8248 bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth);
8249 bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth);
8250 bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth);
8251 bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, 
8252                             int level, FORM *form);
8253 bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, 
8254                             int level, const char *form_name, FORM *form);
8255 bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, 
8256                                const char *form);
8257 bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, 
8258                             const char *formname, uint32 level, 
8259                             RPC_BUFFER *buffer, uint32 offered);
8260 bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
8261                               uint32 level, RPC_BUFFER *buffer,
8262                               uint32 offered);
8263 bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, 
8264                            uint32 jobid, uint32 level, uint32 command);
8265 bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, 
8266                            uint32 jobid, uint32 level, RPC_BUFFER *buffer,
8267                            uint32 offered);
8268 bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u, 
8269                                      POLICY_HND *handle);
8270 bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u, 
8271                                    POLICY_HND *handle);
8272 bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u, 
8273                                     POLICY_HND *handle, uint32 level,
8274                                     char *docname, char *outputfile,
8275                                     char *datatype);
8276 bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u, 
8277                                   POLICY_HND *handle);
8278 bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u, 
8279                                  POLICY_HND *handle, uint32 data_size,
8280                                  char *data);
8281 bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u, 
8282                                  POLICY_HND *handle, char *valuename);
8283 bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u, 
8284                                         POLICY_HND *handle, char *key,
8285                                         char *value);
8286 bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
8287                              uint32 flags, uint32 options, const char *localmachine,
8288                              uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
8289 bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth);
8290 bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth);
8291 bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname );
8292 bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ;
8293
8294 /* The following definitions come from rpc_parse/parse_svcctl.c  */
8295
8296 bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth );
8297 bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth );
8298 uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status );
8299 uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config );
8300 bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth);
8301 bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth);
8302 bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth);
8303 bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth);
8304 bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth);
8305 void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc );
8306 bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth );
8307 uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc );
8308 bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth );
8309 uint32 svcctl_sizeof_service_fa( SERVICE_FAILURE_ACTIONS *fa);
8310 bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth);
8311 bool svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth);
8312 bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth);
8313
8314 /* The following definitions come from rpc_server/srv_dfs_nt.c  */
8315
8316 void _dfs_GetManagerVersion(pipes_struct *p, struct dfs_GetManagerVersion *r);
8317 WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r);
8318 WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r);
8319 WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r);
8320 WERROR _dfs_GetInfo(pipes_struct *p, struct dfs_GetInfo *r);
8321 WERROR _dfs_SetInfo(pipes_struct *p, struct dfs_SetInfo *r);
8322 WERROR _dfs_Rename(pipes_struct *p, struct dfs_Rename *r);
8323 WERROR _dfs_Move(pipes_struct *p, struct dfs_Move *r);
8324 WERROR _dfs_ManagerGetConfigInfo(pipes_struct *p, struct dfs_ManagerGetConfigInfo *r);
8325 WERROR _dfs_ManagerSendSiteInfo(pipes_struct *p, struct dfs_ManagerSendSiteInfo *r);
8326 WERROR _dfs_AddFtRoot(pipes_struct *p, struct dfs_AddFtRoot *r);
8327 WERROR _dfs_RemoveFtRoot(pipes_struct *p, struct dfs_RemoveFtRoot *r);
8328 WERROR _dfs_AddStdRoot(pipes_struct *p, struct dfs_AddStdRoot *r);
8329 WERROR _dfs_RemoveStdRoot(pipes_struct *p, struct dfs_RemoveStdRoot *r);
8330 WERROR _dfs_ManagerInitialize(pipes_struct *p, struct dfs_ManagerInitialize *r);
8331 WERROR _dfs_AddStdRootForced(pipes_struct *p, struct dfs_AddStdRootForced *r);
8332 WERROR _dfs_GetDcAddress(pipes_struct *p, struct dfs_GetDcAddress *r);
8333 WERROR _dfs_SetDcAddress(pipes_struct *p, struct dfs_SetDcAddress *r);
8334 WERROR _dfs_FlushFtTable(pipes_struct *p, struct dfs_FlushFtTable *r);
8335 WERROR _dfs_Add2(pipes_struct *p, struct dfs_Add2 *r);
8336 WERROR _dfs_Remove2(pipes_struct *p, struct dfs_Remove2 *r);
8337 WERROR _dfs_EnumEx(pipes_struct *p, struct dfs_EnumEx *r);
8338 WERROR _dfs_SetInfo2(pipes_struct *p, struct dfs_SetInfo2 *r);
8339
8340 /* The following definitions come from rpc_server/srv_dssetup_nt.c  */
8341
8342 WERROR _dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p,
8343                                                   struct dssetup_DsRoleGetPrimaryDomainInformation *r);
8344 WERROR _dssetup_DsRoleDnsNameToFlatName(pipes_struct *p,
8345                                         struct dssetup_DsRoleDnsNameToFlatName *r);
8346 WERROR _dssetup_DsRoleDcAsDc(pipes_struct *p,
8347                              struct dssetup_DsRoleDcAsDc *r);
8348 WERROR _dssetup_DsRoleDcAsReplica(pipes_struct *p,
8349                                   struct dssetup_DsRoleDcAsReplica *r);
8350 WERROR _dssetup_DsRoleDemoteDc(pipes_struct *p,
8351                                struct dssetup_DsRoleDemoteDc *r);
8352 WERROR _dssetup_DsRoleGetDcOperationProgress(pipes_struct *p,
8353                                              struct dssetup_DsRoleGetDcOperationProgress *r);
8354 WERROR _dssetup_DsRoleGetDcOperationResults(pipes_struct *p,
8355                                             struct dssetup_DsRoleGetDcOperationResults *r);
8356 WERROR _dssetup_DsRoleCancel(pipes_struct *p,
8357                              struct dssetup_DsRoleCancel *r);
8358 WERROR _dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p,
8359                                                 struct dssetup_DsRoleServerSaveStateForUpgrade *r);
8360 WERROR _dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p,
8361                                              struct dssetup_DsRoleUpgradeDownlevelServer *r);
8362 WERROR _dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p,
8363                                                   struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
8364
8365 /* The following definitions come from rpc_server/srv_echo_nt.c  */
8366
8367 void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r );
8368 void _echo_EchoData(pipes_struct *p, struct echo_EchoData *r);
8369 void _echo_SinkData(pipes_struct *p, struct echo_SinkData *r);
8370 void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r);
8371 void _echo_TestCall(pipes_struct *p, struct echo_TestCall *r);
8372 NTSTATUS _echo_TestCall2(pipes_struct *p, struct echo_TestCall2 *r);
8373 uint32 _echo_TestSleep(pipes_struct *p, struct echo_TestSleep *r);
8374 void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r);
8375 void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r);
8376 uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r);
8377
8378 /* The following definitions come from rpc_server/srv_eventlog.c  */
8379
8380 NTSTATUS rpc_eventlog2_init(void);
8381 void eventlog2_get_pipe_fns(struct api_struct **fns, int *n_fns);
8382
8383 /* The following definitions come from rpc_server/srv_eventlog_lib.c  */
8384
8385 TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
8386 char *elog_tdbname(TALLOC_CTX *ctx, const char *name );
8387 int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention );
8388 bool prune_eventlog( TDB_CONTEXT * tdb );
8389 bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed );
8390 ELOG_TDB *elog_open_tdb( char *logname, bool force_clear );
8391 int elog_close_tdb( ELOG_TDB *etdb, bool force_close );
8392 int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee );
8393 void fixup_eventlog_entry( Eventlog_entry * ee );
8394 bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor );
8395
8396 /* The following definitions come from rpc_server/srv_eventlog_nt.c  */
8397
8398 NTSTATUS _eventlog_OpenEventLogW(pipes_struct *p,
8399                                  struct eventlog_OpenEventLogW *r);
8400 NTSTATUS _eventlog_ClearEventLogW(pipes_struct *p,
8401                                   struct eventlog_ClearEventLogW *r);
8402 NTSTATUS _eventlog_CloseEventLog( pipes_struct * p, struct eventlog_CloseEventLog *r );
8403 NTSTATUS _eventlog_read_eventlog( pipes_struct * p,
8404                                 EVENTLOG_Q_READ_EVENTLOG * q_u,
8405                                 EVENTLOG_R_READ_EVENTLOG * r_u );
8406 NTSTATUS _eventlog_GetOldestRecord(pipes_struct *p,
8407                                    struct eventlog_GetOldestRecord *r);
8408 NTSTATUS _eventlog_GetNumRecords(pipes_struct *p,
8409                                  struct eventlog_GetNumRecords *r);
8410 NTSTATUS _eventlog_BackupEventLogW(pipes_struct *p, struct eventlog_BackupEventLogW *r);
8411 NTSTATUS _eventlog_DeregisterEventSource(pipes_struct *p, struct eventlog_DeregisterEventSource *r);
8412 NTSTATUS _eventlog_ChangeNotify(pipes_struct *p, struct eventlog_ChangeNotify *r);
8413 NTSTATUS _eventlog_RegisterEventSourceW(pipes_struct *p, struct eventlog_RegisterEventSourceW *r);
8414 NTSTATUS _eventlog_OpenBackupEventLogW(pipes_struct *p, struct eventlog_OpenBackupEventLogW *r);
8415 NTSTATUS _eventlog_ReadEventLogW(pipes_struct *p, struct eventlog_ReadEventLogW *r);
8416 NTSTATUS _eventlog_ReportEventW(pipes_struct *p, struct eventlog_ReportEventW *r);
8417 NTSTATUS _eventlog_ClearEventLogA(pipes_struct *p, struct eventlog_ClearEventLogA *r);
8418 NTSTATUS _eventlog_BackupEventLogA(pipes_struct *p, struct eventlog_BackupEventLogA *r);
8419 NTSTATUS _eventlog_OpenEventLogA(pipes_struct *p, struct eventlog_OpenEventLogA *r);
8420 NTSTATUS _eventlog_RegisterEventSourceA(pipes_struct *p, struct eventlog_RegisterEventSourceA *r);
8421 NTSTATUS _eventlog_OpenBackupEventLogA(pipes_struct *p, struct eventlog_OpenBackupEventLogA *r);
8422 NTSTATUS _eventlog_ReadEventLogA(pipes_struct *p, struct eventlog_ReadEventLogA *r);
8423 NTSTATUS _eventlog_ReportEventA(pipes_struct *p, struct eventlog_ReportEventA *r);
8424 NTSTATUS _eventlog_RegisterClusterSvc(pipes_struct *p, struct eventlog_RegisterClusterSvc *r);
8425 NTSTATUS _eventlog_DeregisterClusterSvc(pipes_struct *p, struct eventlog_DeregisterClusterSvc *r);
8426 NTSTATUS _eventlog_WriteClusterEvents(pipes_struct *p, struct eventlog_WriteClusterEvents *r);
8427 NTSTATUS _eventlog_GetLogIntormation(pipes_struct *p, struct eventlog_GetLogIntormation *r);
8428 NTSTATUS _eventlog_FlushEventLog(pipes_struct *p, struct eventlog_FlushEventLog *r);
8429
8430 /* The following definitions come from rpc_server/srv_initshutdown_nt.c  */
8431
8432 WERROR _initshutdown_Init(pipes_struct *p, struct initshutdown_Init *r);
8433 WERROR _initshutdown_InitEx(pipes_struct *p, struct initshutdown_InitEx *r);
8434 WERROR _initshutdown_Abort(pipes_struct *p, struct initshutdown_Abort *r);
8435
8436 /* The following definitions come from rpc_server/srv_lsa_hnd.c  */
8437
8438 bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name);
8439 bool create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr);
8440 bool find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p);
8441 bool close_policy_hnd(pipes_struct *p, POLICY_HND *hnd);
8442 void close_policy_by_pipe(pipes_struct *p);
8443 bool pipe_access_check(pipes_struct *p);
8444
8445 /* The following definitions come from rpc_server/srv_lsa_nt.c  */
8446
8447 NTSTATUS _lsa_OpenPolicy2(pipes_struct *p,
8448                           struct lsa_OpenPolicy2 *r);
8449 NTSTATUS _lsa_OpenPolicy(pipes_struct *p,
8450                          struct lsa_OpenPolicy *r);
8451 NTSTATUS _lsa_EnumTrustDom(pipes_struct *p,
8452                            struct lsa_EnumTrustDom *r);
8453 NTSTATUS _lsa_QueryInfoPolicy(pipes_struct *p,
8454                               struct lsa_QueryInfoPolicy *r);
8455 NTSTATUS _lsa_LookupSids(pipes_struct *p,
8456                          struct lsa_LookupSids *r);
8457 NTSTATUS _lsa_LookupSids2(pipes_struct *p,
8458                           struct lsa_LookupSids2 *r);
8459 NTSTATUS _lsa_LookupSids3(pipes_struct *p,
8460                           struct lsa_LookupSids3 *r);
8461 NTSTATUS _lsa_LookupNames(pipes_struct *p,
8462                           struct lsa_LookupNames *r);
8463 NTSTATUS _lsa_LookupNames2(pipes_struct *p,
8464                            struct lsa_LookupNames2 *r);
8465 NTSTATUS _lsa_LookupNames3(pipes_struct *p,
8466                            struct lsa_LookupNames3 *r);
8467 NTSTATUS _lsa_LookupNames4(pipes_struct *p,
8468                            struct lsa_LookupNames4 *r);
8469 NTSTATUS _lsa_Close(pipes_struct *p, struct lsa_Close *r);
8470 NTSTATUS _lsa_OpenSecret(pipes_struct *p, struct lsa_OpenSecret *r);
8471 NTSTATUS _lsa_OpenTrustedDomain(pipes_struct *p, struct lsa_OpenTrustedDomain *r);
8472 NTSTATUS _lsa_CreateTrustedDomain(pipes_struct *p, struct lsa_CreateTrustedDomain *r);
8473 NTSTATUS _lsa_CreateSecret(pipes_struct *p, struct lsa_CreateSecret *r);
8474 NTSTATUS _lsa_SetSecret(pipes_struct *p, struct lsa_SetSecret *r);
8475 NTSTATUS _lsa_DeleteObject(pipes_struct *p,
8476                            struct lsa_DeleteObject *r);
8477 NTSTATUS _lsa_EnumPrivs(pipes_struct *p,
8478                         struct lsa_EnumPrivs *r);
8479 NTSTATUS _lsa_LookupPrivDisplayName(pipes_struct *p,
8480                                     struct lsa_LookupPrivDisplayName *r);
8481 NTSTATUS _lsa_EnumAccounts(pipes_struct *p,
8482                            struct lsa_EnumAccounts *r);
8483 NTSTATUS _lsa_GetUserName(pipes_struct *p,
8484                           struct lsa_GetUserName *r);
8485 NTSTATUS _lsa_CreateAccount(pipes_struct *p,
8486                             struct lsa_CreateAccount *r);
8487 NTSTATUS _lsa_OpenAccount(pipes_struct *p,
8488                           struct lsa_OpenAccount *r);
8489 NTSTATUS _lsa_EnumPrivsAccount(pipes_struct *p,
8490                                struct lsa_EnumPrivsAccount *r);
8491 NTSTATUS _lsa_GetSystemAccessAccount(pipes_struct *p,
8492                                      struct lsa_GetSystemAccessAccount *r);
8493 NTSTATUS _lsa_SetSystemAccessAccount(pipes_struct *p,
8494                                      struct lsa_SetSystemAccessAccount *r);
8495 NTSTATUS _lsa_AddPrivilegesToAccount(pipes_struct *p,
8496                                      struct lsa_AddPrivilegesToAccount *r);
8497 NTSTATUS _lsa_RemovePrivilegesFromAccount(pipes_struct *p,
8498                                           struct lsa_RemovePrivilegesFromAccount *r);
8499 NTSTATUS _lsa_QuerySecurity(pipes_struct *p,
8500                             struct lsa_QuerySecurity *r);
8501 NTSTATUS _lsa_AddAccountRights(pipes_struct *p,
8502                                struct lsa_AddAccountRights *r);
8503 NTSTATUS _lsa_RemoveAccountRights(pipes_struct *p,
8504                                   struct lsa_RemoveAccountRights *r);
8505 NTSTATUS _lsa_EnumAccountRights(pipes_struct *p,
8506                                 struct lsa_EnumAccountRights *r);
8507 NTSTATUS _lsa_LookupPrivValue(pipes_struct *p,
8508                               struct lsa_LookupPrivValue *r);
8509 NTSTATUS _lsa_Delete(pipes_struct *p, struct lsa_Delete *r);
8510 NTSTATUS _lsa_SetSecObj(pipes_struct *p, struct lsa_SetSecObj *r);
8511 NTSTATUS _lsa_ChangePassword(pipes_struct *p, struct lsa_ChangePassword *r);
8512 NTSTATUS _lsa_SetInfoPolicy(pipes_struct *p, struct lsa_SetInfoPolicy *r);
8513 NTSTATUS _lsa_ClearAuditLog(pipes_struct *p, struct lsa_ClearAuditLog *r);
8514 NTSTATUS _lsa_GetQuotasForAccount(pipes_struct *p, struct lsa_GetQuotasForAccount *r);
8515 NTSTATUS _lsa_SetQuotasForAccount(pipes_struct *p, struct lsa_SetQuotasForAccount *r);
8516 NTSTATUS _lsa_QueryTrustedDomainInfo(pipes_struct *p, struct lsa_QueryTrustedDomainInfo *r);
8517 NTSTATUS _lsa_SetInformationTrustedDomain(pipes_struct *p, struct lsa_SetInformationTrustedDomain *r);
8518 NTSTATUS _lsa_QuerySecret(pipes_struct *p, struct lsa_QuerySecret *r);
8519 NTSTATUS _lsa_LookupPrivName(pipes_struct *p, struct lsa_LookupPrivName *r);
8520 NTSTATUS _lsa_EnumAccountsWithUserRight(pipes_struct *p, struct lsa_EnumAccountsWithUserRight *r);
8521 NTSTATUS _lsa_QueryTrustedDomainInfoBySid(pipes_struct *p, struct lsa_QueryTrustedDomainInfoBySid *r);
8522 NTSTATUS _lsa_SetTrustedDomainInfo(pipes_struct *p, struct lsa_SetTrustedDomainInfo *r);
8523 NTSTATUS _lsa_DeleteTrustedDomain(pipes_struct *p, struct lsa_DeleteTrustedDomain *r);
8524 NTSTATUS _lsa_StorePrivateData(pipes_struct *p, struct lsa_StorePrivateData *r);
8525 NTSTATUS _lsa_RetrievePrivateData(pipes_struct *p, struct lsa_RetrievePrivateData *r);
8526 NTSTATUS _lsa_QueryInfoPolicy2(pipes_struct *p, struct lsa_QueryInfoPolicy2 *r);
8527 NTSTATUS _lsa_SetInfoPolicy2(pipes_struct *p, struct lsa_SetInfoPolicy2 *r);
8528 NTSTATUS _lsa_QueryTrustedDomainInfoByName(pipes_struct *p, struct lsa_QueryTrustedDomainInfoByName *r);
8529 NTSTATUS _lsa_SetTrustedDomainInfoByName(pipes_struct *p, struct lsa_SetTrustedDomainInfoByName *r);
8530 NTSTATUS _lsa_EnumTrustedDomainsEx(pipes_struct *p, struct lsa_EnumTrustedDomainsEx *r);
8531 NTSTATUS _lsa_CreateTrustedDomainEx(pipes_struct *p, struct lsa_CreateTrustedDomainEx *r);
8532 NTSTATUS _lsa_CloseTrustedDomainEx(pipes_struct *p, struct lsa_CloseTrustedDomainEx *r);
8533 NTSTATUS _lsa_QueryDomainInformationPolicy(pipes_struct *p, struct lsa_QueryDomainInformationPolicy *r);
8534 NTSTATUS _lsa_SetDomainInformationPolicy(pipes_struct *p, struct lsa_SetDomainInformationPolicy *r);
8535 NTSTATUS _lsa_OpenTrustedDomainByName(pipes_struct *p, struct lsa_OpenTrustedDomainByName *r);
8536 NTSTATUS _lsa_TestCall(pipes_struct *p, struct lsa_TestCall *r);
8537 NTSTATUS _lsa_CreateTrustedDomainEx2(pipes_struct *p, struct lsa_CreateTrustedDomainEx2 *r);
8538 NTSTATUS _lsa_CREDRWRITE(pipes_struct *p, struct lsa_CREDRWRITE *r);
8539 NTSTATUS _lsa_CREDRREAD(pipes_struct *p, struct lsa_CREDRREAD *r);
8540 NTSTATUS _lsa_CREDRENUMERATE(pipes_struct *p, struct lsa_CREDRENUMERATE *r);
8541 NTSTATUS _lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
8542 NTSTATUS _lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p, struct lsa_CREDRREADDOMAINCREDENTIALS *r);
8543 NTSTATUS _lsa_CREDRDELETE(pipes_struct *p, struct lsa_CREDRDELETE *r);
8544 NTSTATUS _lsa_CREDRGETTARGETINFO(pipes_struct *p, struct lsa_CREDRGETTARGETINFO *r);
8545 NTSTATUS _lsa_CREDRPROFILELOADED(pipes_struct *p, struct lsa_CREDRPROFILELOADED *r);
8546 NTSTATUS _lsa_CREDRGETSESSIONTYPES(pipes_struct *p, struct lsa_CREDRGETSESSIONTYPES *r);
8547 NTSTATUS _lsa_LSARREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARREGISTERAUDITEVENT *r);
8548 NTSTATUS _lsa_LSARGENAUDITEVENT(pipes_struct *p, struct lsa_LSARGENAUDITEVENT *r);
8549 NTSTATUS _lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARUNREGISTERAUDITEVENT *r);
8550 NTSTATUS _lsa_lsaRQueryForestTrustInformation(pipes_struct *p, struct lsa_lsaRQueryForestTrustInformation *r);
8551 NTSTATUS _lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p, struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
8552 NTSTATUS _lsa_CREDRRENAME(pipes_struct *p, struct lsa_CREDRRENAME *r);
8553 NTSTATUS _lsa_LSAROPENPOLICYSCE(pipes_struct *p, struct lsa_LSAROPENPOLICYSCE *r);
8554 NTSTATUS _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
8555 NTSTATUS _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
8556 NTSTATUS _lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p, struct lsa_LSARADTREPORTSECURITYEVENT *r);
8557
8558 /* The following definitions come from rpc_server/srv_netlog_nt.c  */
8559
8560 WERROR _netr_LogonControl(pipes_struct *p,
8561                           struct netr_LogonControl *r);
8562 WERROR _netr_LogonControl2(pipes_struct *p,
8563                            struct netr_LogonControl2 *r);
8564 WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
8565                                          struct netr_NetrEnumerateTrustedDomains *r);
8566 NTSTATUS _netr_ServerReqChallenge(pipes_struct *p,
8567                                   struct netr_ServerReqChallenge *r);
8568 NTSTATUS _netr_ServerAuthenticate(pipes_struct *p,
8569                                   struct netr_ServerAuthenticate *r);
8570 NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p,
8571                                    struct netr_ServerAuthenticate2 *r);
8572 NTSTATUS _netr_ServerPasswordSet(pipes_struct *p,
8573                                  struct netr_ServerPasswordSet *r);
8574 NTSTATUS _netr_LogonSamLogoff(pipes_struct *p,
8575                               struct netr_LogonSamLogoff *r);
8576 NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
8577                              struct netr_LogonSamLogon *r);
8578 NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p,
8579                                struct netr_LogonSamLogonEx *r);
8580 WERROR _netr_LogonUasLogon(pipes_struct *p,
8581                            struct netr_LogonUasLogon *r);
8582 WERROR _netr_LogonUasLogoff(pipes_struct *p,
8583                             struct netr_LogonUasLogoff *r);
8584 NTSTATUS _netr_DatabaseDeltas(pipes_struct *p,
8585                               struct netr_DatabaseDeltas *r);
8586 NTSTATUS _netr_DatabaseSync(pipes_struct *p,
8587                             struct netr_DatabaseSync *r);
8588 NTSTATUS _netr_AccountDeltas(pipes_struct *p,
8589                              struct netr_AccountDeltas *r);
8590 NTSTATUS _netr_AccountSync(pipes_struct *p,
8591                            struct netr_AccountSync *r);
8592 WERROR _netr_GetDcName(pipes_struct *p,
8593                        struct netr_GetDcName *r);
8594 WERROR _netr_GetAnyDCName(pipes_struct *p,
8595                           struct netr_GetAnyDCName *r);
8596 NTSTATUS _netr_DatabaseSync2(pipes_struct *p,
8597                              struct netr_DatabaseSync2 *r);
8598 NTSTATUS _netr_DatabaseRedo(pipes_struct *p,
8599                             struct netr_DatabaseRedo *r);
8600 WERROR _netr_LogonControl2Ex(pipes_struct *p,
8601                              struct netr_LogonControl2Ex *r);
8602 WERROR _netr_DsRGetDCName(pipes_struct *p,
8603                           struct netr_DsRGetDCName *r);
8604 WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p,
8605                                     struct netr_NETRLOGONDUMMYROUTINE1 *r);
8606 WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p,
8607                                      struct netr_NETRLOGONSETSERVICEBITS *r);
8608 WERROR _netr_LogonGetTrustRid(pipes_struct *p,
8609                               struct netr_LogonGetTrustRid *r);
8610 WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p,
8611                                           struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
8612 WERROR _netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p,
8613                                           struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
8614 NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
8615                                    struct netr_ServerAuthenticate3 *r);
8616 WERROR _netr_DsRGetDCNameEx(pipes_struct *p,
8617                             struct netr_DsRGetDCNameEx *r);
8618 WERROR _netr_DsRGetSiteName(pipes_struct *p,
8619                             struct netr_DsRGetSiteName *r);
8620 NTSTATUS _netr_LogonGetDomainInfo(pipes_struct *p,
8621                                   struct netr_LogonGetDomainInfo *r);
8622 NTSTATUS _netr_ServerPasswordSet2(pipes_struct *p,
8623                                   struct netr_ServerPasswordSet2 *r);
8624 WERROR _netr_ServerPasswordGet(pipes_struct *p,
8625                                struct netr_ServerPasswordGet *r);
8626 WERROR _netr_NETRLOGONSENDTOSAM(pipes_struct *p,
8627                                 struct netr_NETRLOGONSENDTOSAM *r);
8628 WERROR _netr_DsRAddressToSitenamesW(pipes_struct *p,
8629                                     struct netr_DsRAddressToSitenamesW *r);
8630 WERROR _netr_DsRGetDCNameEx2(pipes_struct *p,
8631                              struct netr_DsRGetDCNameEx2 *r);
8632 WERROR _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p,
8633                                                  struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
8634 WERROR _netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p,
8635                                            struct netr_NetrEnumerateTrustedDomainsEx *r);
8636 WERROR _netr_DsRAddressToSitenamesExW(pipes_struct *p,
8637                                       struct netr_DsRAddressToSitenamesExW *r);
8638 WERROR _netr_DsrGetDcSiteCoverageW(pipes_struct *p,
8639                                    struct netr_DsrGetDcSiteCoverageW *r);
8640 WERROR _netr_DsrEnumerateDomainTrusts(pipes_struct *p,
8641                                       struct netr_DsrEnumerateDomainTrusts *r);
8642 WERROR _netr_DsrDeregisterDNSHostRecords(pipes_struct *p,
8643                                          struct netr_DsrDeregisterDNSHostRecords *r);
8644 NTSTATUS _netr_ServerTrustPasswordsGet(pipes_struct *p,
8645                                        struct netr_ServerTrustPasswordsGet *r);
8646 WERROR _netr_DsRGetForestTrustInformation(pipes_struct *p,
8647                                           struct netr_DsRGetForestTrustInformation *r);
8648 WERROR _netr_GetForestTrustInformation(pipes_struct *p,
8649                                        struct netr_GetForestTrustInformation *r);
8650 NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p,
8651                                       struct netr_LogonSamLogonWithFlags *r);
8652 WERROR _netr_NETRSERVERGETTRUSTINFO(pipes_struct *p,
8653                                     struct netr_NETRSERVERGETTRUSTINFO *r);
8654
8655 /* The following definitions come from rpc_server/srv_ntsvcs.c  */
8656
8657 void ntsvcs2_get_pipe_fns( struct api_struct **fns, int *n_fns );
8658 NTSTATUS rpc_ntsvcs2_init(void);
8659
8660 /* The following definitions come from rpc_server/srv_ntsvcs_nt.c  */
8661
8662 WERROR _PNP_GetVersion(pipes_struct *p,
8663                        struct PNP_GetVersion *r);
8664 WERROR _PNP_GetDeviceListSize(pipes_struct *p,
8665                               struct PNP_GetDeviceListSize *r);
8666 WERROR _ntsvcs_get_device_list( pipes_struct *p, NTSVCS_Q_GET_DEVICE_LIST *q_u, NTSVCS_R_GET_DEVICE_LIST *r_u );
8667 WERROR _ntsvcs_get_device_reg_property( pipes_struct *p, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u );
8668 WERROR _PNP_ValidateDeviceInstance(pipes_struct *p,
8669                                    struct PNP_ValidateDeviceInstance *r);
8670 WERROR _PNP_GetHwProfInfo(pipes_struct *p,
8671                           struct PNP_GetHwProfInfo *r);
8672 WERROR _PNP_HwProfFlags(pipes_struct *p,
8673                         struct PNP_HwProfFlags *r);
8674 WERROR _PNP_Disconnect(pipes_struct *p,
8675                        struct PNP_Disconnect *r);
8676 WERROR _PNP_Connect(pipes_struct *p,
8677                     struct PNP_Connect *r);
8678 WERROR _PNP_GetGlobalState(pipes_struct *p,
8679                            struct PNP_GetGlobalState *r);
8680 WERROR _PNP_InitDetection(pipes_struct *p,
8681                           struct PNP_InitDetection *r);
8682 WERROR _PNP_ReportLogOn(pipes_struct *p,
8683                         struct PNP_ReportLogOn *r);
8684 WERROR _PNP_GetRootDeviceInstance(pipes_struct *p,
8685                                   struct PNP_GetRootDeviceInstance *r);
8686 WERROR _PNP_GetRelatedDeviceInstance(pipes_struct *p,
8687                                      struct PNP_GetRelatedDeviceInstance *r);
8688 WERROR _PNP_EnumerateSubKeys(pipes_struct *p,
8689                              struct PNP_EnumerateSubKeys *r);
8690 WERROR _PNP_GetDeviceList(pipes_struct *p,
8691                           struct PNP_GetDeviceList *r);
8692 WERROR _PNP_GetDepth(pipes_struct *p,
8693                      struct PNP_GetDepth *r);
8694 WERROR _PNP_GetDeviceRegProp(pipes_struct *p,
8695                              struct PNP_GetDeviceRegProp *r);
8696 WERROR _PNP_SetDeviceRegProp(pipes_struct *p,
8697                              struct PNP_SetDeviceRegProp *r);
8698 WERROR _PNP_GetClassInstance(pipes_struct *p,
8699                              struct PNP_GetClassInstance *r);
8700 WERROR _PNP_CreateKey(pipes_struct *p,
8701                       struct PNP_CreateKey *r);
8702 WERROR _PNP_DeleteRegistryKey(pipes_struct *p,
8703                               struct PNP_DeleteRegistryKey *r);
8704 WERROR _PNP_GetClassCount(pipes_struct *p,
8705                           struct PNP_GetClassCount *r);
8706 WERROR _PNP_GetClassName(pipes_struct *p,
8707                          struct PNP_GetClassName *r);
8708 WERROR _PNP_DeleteClassKey(pipes_struct *p,
8709                            struct PNP_DeleteClassKey *r);
8710 WERROR _PNP_GetInterfaceDeviceAlias(pipes_struct *p,
8711                                     struct PNP_GetInterfaceDeviceAlias *r);
8712 WERROR _PNP_GetInterfaceDeviceList(pipes_struct *p,
8713                                    struct PNP_GetInterfaceDeviceList *r);
8714 WERROR _PNP_GetInterfaceDeviceListSize(pipes_struct *p,
8715                                        struct PNP_GetInterfaceDeviceListSize *r);
8716 WERROR _PNP_RegisterDeviceClassAssociation(pipes_struct *p,
8717                                            struct PNP_RegisterDeviceClassAssociation *r);
8718 WERROR _PNP_UnregisterDeviceClassAssociation(pipes_struct *p,
8719                                              struct PNP_UnregisterDeviceClassAssociation *r);
8720 WERROR _PNP_GetClassRegProp(pipes_struct *p,
8721                             struct PNP_GetClassRegProp *r);
8722 WERROR _PNP_SetClassRegProp(pipes_struct *p,
8723                             struct PNP_SetClassRegProp *r);
8724 WERROR _PNP_CreateDevInst(pipes_struct *p,
8725                           struct PNP_CreateDevInst *r);
8726 WERROR _PNP_DeviceInstanceAction(pipes_struct *p,
8727                                  struct PNP_DeviceInstanceAction *r);
8728 WERROR _PNP_GetDeviceStatus(pipes_struct *p,
8729                             struct PNP_GetDeviceStatus *r);
8730 WERROR _PNP_SetDeviceProblem(pipes_struct *p,
8731                              struct PNP_SetDeviceProblem *r);
8732 WERROR _PNP_DisableDevInst(pipes_struct *p,
8733                            struct PNP_DisableDevInst *r);
8734 WERROR _PNP_UninstallDevInst(pipes_struct *p,
8735                              struct PNP_UninstallDevInst *r);
8736 WERROR _PNP_AddID(pipes_struct *p,
8737                   struct PNP_AddID *r);
8738 WERROR _PNP_RegisterDriver(pipes_struct *p,
8739                            struct PNP_RegisterDriver *r);
8740 WERROR _PNP_QueryRemove(pipes_struct *p,
8741                         struct PNP_QueryRemove *r);
8742 WERROR _PNP_RequestDeviceEject(pipes_struct *p,
8743                                struct PNP_RequestDeviceEject *r);
8744 WERROR _PNP_IsDockStationPresent(pipes_struct *p,
8745                                  struct PNP_IsDockStationPresent *r);
8746 WERROR _PNP_RequestEjectPC(pipes_struct *p,
8747                            struct PNP_RequestEjectPC *r);
8748 WERROR _PNP_AddEmptyLogConf(pipes_struct *p,
8749                             struct PNP_AddEmptyLogConf *r);
8750 WERROR _PNP_FreeLogConf(pipes_struct *p,
8751                         struct PNP_FreeLogConf *r);
8752 WERROR _PNP_GetFirstLogConf(pipes_struct *p,
8753                             struct PNP_GetFirstLogConf *r);
8754 WERROR _PNP_GetNextLogConf(pipes_struct *p,
8755                            struct PNP_GetNextLogConf *r);
8756 WERROR _PNP_GetLogConfPriority(pipes_struct *p,
8757                                struct PNP_GetLogConfPriority *r);
8758 WERROR _PNP_AddResDes(pipes_struct *p,
8759                       struct PNP_AddResDes *r);
8760 WERROR _PNP_FreeResDes(pipes_struct *p,
8761                        struct PNP_FreeResDes *r);
8762 WERROR _PNP_GetNextResDes(pipes_struct *p,
8763                           struct PNP_GetNextResDes *r);
8764 WERROR _PNP_GetResDesData(pipes_struct *p,
8765                           struct PNP_GetResDesData *r);
8766 WERROR _PNP_GetResDesDataSize(pipes_struct *p,
8767                               struct PNP_GetResDesDataSize *r);
8768 WERROR _PNP_ModifyResDes(pipes_struct *p,
8769                          struct PNP_ModifyResDes *r);
8770 WERROR _PNP_DetectResourceLimit(pipes_struct *p,
8771                                 struct PNP_DetectResourceLimit *r);
8772 WERROR _PNP_QueryResConfList(pipes_struct *p,
8773                              struct PNP_QueryResConfList *r);
8774 WERROR _PNP_SetHwProf(pipes_struct *p,
8775                       struct PNP_SetHwProf *r);
8776 WERROR _PNP_QueryArbitratorFreeData(pipes_struct *p,
8777                                     struct PNP_QueryArbitratorFreeData *r);
8778 WERROR _PNP_QueryArbitratorFreeSize(pipes_struct *p,
8779                                     struct PNP_QueryArbitratorFreeSize *r);
8780 WERROR _PNP_RunDetection(pipes_struct *p,
8781                          struct PNP_RunDetection *r);
8782 WERROR _PNP_RegisterNotification(pipes_struct *p,
8783                                  struct PNP_RegisterNotification *r);
8784 WERROR _PNP_UnregisterNotification(pipes_struct *p,
8785                                    struct PNP_UnregisterNotification *r);
8786 WERROR _PNP_GetCustomDevProp(pipes_struct *p,
8787                              struct PNP_GetCustomDevProp *r);
8788 WERROR _PNP_GetVersionInternal(pipes_struct *p,
8789                                struct PNP_GetVersionInternal *r);
8790 WERROR _PNP_GetBlockedDriverInfo(pipes_struct *p,
8791                                  struct PNP_GetBlockedDriverInfo *r);
8792 WERROR _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p,
8793                                             struct PNP_GetServerSideDeviceInstallFlags *r);
8794
8795 /* The following definitions come from rpc_server/srv_pipe.c  */
8796
8797 bool create_next_pdu(pipes_struct *p);
8798 bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p);
8799 bool setup_fault_pdu(pipes_struct *p, NTSTATUS status);
8800 bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p);
8801 bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
8802                     RPC_IFACE* transfer, uint32 context_id);
8803 NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
8804                                     const char *srv,
8805                                     const struct ndr_syntax_id *interface,
8806                                     const struct api_struct *cmds, int size);
8807 bool is_known_pipename(const char *cli_filename);
8808 bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
8809 bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
8810 bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
8811                                         uint32 *p_ss_padding_len, NTSTATUS *pstatus);
8812 bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len);
8813 struct current_user *get_current_user(struct current_user *user, pipes_struct *p);
8814 void free_pipe_rpc_context( PIPE_RPC_FNS *list );
8815 bool api_pipe_request(pipes_struct *p);
8816
8817 /* The following definitions come from rpc_server/srv_pipe_hnd.c  */
8818
8819 pipes_struct *get_first_internal_pipe(void);
8820 pipes_struct *get_next_internal_pipe(pipes_struct *p);
8821 void set_pipe_handle_offset(int max_open_files);
8822 void reset_chain_p(void);
8823 void init_rpc_pipe_hnd(void);
8824 smb_np_struct *open_rpc_pipe_p(const char *pipe_name, 
8825                               connection_struct *conn, uint16 vuid);
8826 ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n);
8827 ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
8828                 bool *is_data_outstanding);
8829 bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority);
8830 bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state);
8831 bool close_rpc_pipe_hnd(smb_np_struct *p);
8832 void pipe_close_conn(connection_struct *conn);
8833 smb_np_struct *get_rpc_pipe_p(uint16 pnum);
8834 smb_np_struct *get_rpc_pipe(int pnum);
8835 struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
8836                                               const char *client_address,
8837                                               struct auth_serversupplied_info *server_info,
8838                                               uint16_t vuid);
8839 ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
8840                                 bool *is_data_outstanding);
8841 ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n);
8842
8843 /* The following definitions come from rpc_server/srv_samr_nt.c  */
8844
8845 NTSTATUS _samr_Close(pipes_struct *p, struct samr_Close *r);
8846 NTSTATUS _samr_OpenDomain(pipes_struct *p,
8847                           struct samr_OpenDomain *r);
8848 NTSTATUS _samr_GetUserPwInfo(pipes_struct *p,
8849                              struct samr_GetUserPwInfo *r);
8850 NTSTATUS _samr_SetSecurity(pipes_struct *p,
8851                            struct samr_SetSecurity *r);
8852 NTSTATUS _samr_QuerySecurity(pipes_struct *p,
8853                              struct samr_QuerySecurity *r);
8854 NTSTATUS _samr_EnumDomainUsers(pipes_struct *p,
8855                                struct samr_EnumDomainUsers *r);
8856 NTSTATUS _samr_EnumDomainGroups(pipes_struct *p,
8857                                 struct samr_EnumDomainGroups *r);
8858 NTSTATUS _samr_EnumDomainAliases(pipes_struct *p,
8859                                  struct samr_EnumDomainAliases *r);
8860 NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
8861                                 struct samr_QueryDisplayInfo *r);
8862 NTSTATUS _samr_QueryDisplayInfo2(pipes_struct *p,
8863                                  struct samr_QueryDisplayInfo2 *r);
8864 NTSTATUS _samr_QueryDisplayInfo3(pipes_struct *p,
8865                                  struct samr_QueryDisplayInfo3 *r);
8866 NTSTATUS _samr_QueryAliasInfo(pipes_struct *p,
8867                               struct samr_QueryAliasInfo *r);
8868 NTSTATUS _samr_LookupNames(pipes_struct *p,
8869                            struct samr_LookupNames *r);
8870 NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p,
8871                                    struct samr_ChangePasswordUser2 *r);
8872 NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
8873                                    struct samr_ChangePasswordUser3 *r);
8874 NTSTATUS _samr_LookupRids(pipes_struct *p,
8875                           struct samr_LookupRids *r);
8876 NTSTATUS _samr_OpenUser(pipes_struct *p,
8877                         struct samr_OpenUser *r);
8878 NTSTATUS _samr_QueryUserInfo(pipes_struct *p,
8879                              struct samr_QueryUserInfo *r);
8880 NTSTATUS _samr_GetGroupsForUser(pipes_struct *p,
8881                                 struct samr_GetGroupsForUser *r);
8882 NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
8883                                struct samr_QueryDomainInfo *r);
8884 NTSTATUS _samr_CreateUser2(pipes_struct *p,
8885                            struct samr_CreateUser2 *r);
8886 NTSTATUS _samr_Connect(pipes_struct *p,
8887                        struct samr_Connect *r);
8888 NTSTATUS _samr_Connect2(pipes_struct *p,
8889                         struct samr_Connect2 *r);
8890 NTSTATUS _samr_Connect4(pipes_struct *p,
8891                         struct samr_Connect4 *r);
8892 NTSTATUS _samr_Connect5(pipes_struct *p,
8893                         struct samr_Connect5 *r);
8894 NTSTATUS _samr_LookupDomain(pipes_struct *p,
8895                             struct samr_LookupDomain *r);
8896 NTSTATUS _samr_EnumDomains(pipes_struct *p,
8897                            struct samr_EnumDomains *r);
8898 NTSTATUS _samr_OpenAlias(pipes_struct *p,
8899                          struct samr_OpenAlias *r);
8900 NTSTATUS _samr_SetUserInfo(pipes_struct *p,
8901                            struct samr_SetUserInfo *r);
8902 NTSTATUS _samr_SetUserInfo2(pipes_struct *p,
8903                             struct samr_SetUserInfo2 *r);
8904 NTSTATUS _samr_GetAliasMembership(pipes_struct *p,
8905                                   struct samr_GetAliasMembership *r);
8906 NTSTATUS _samr_GetMembersInAlias(pipes_struct *p,
8907                                  struct samr_GetMembersInAlias *r);
8908 NTSTATUS _samr_QueryGroupMember(pipes_struct *p,
8909                                 struct samr_QueryGroupMember *r);
8910 NTSTATUS _samr_AddAliasMember(pipes_struct *p,
8911                               struct samr_AddAliasMember *r);
8912 NTSTATUS _samr_DeleteAliasMember(pipes_struct *p,
8913                                  struct samr_DeleteAliasMember *r);
8914 NTSTATUS _samr_AddGroupMember(pipes_struct *p,
8915                               struct samr_AddGroupMember *r);
8916 NTSTATUS _samr_DeleteGroupMember(pipes_struct *p,
8917                                  struct samr_DeleteGroupMember *r);
8918 NTSTATUS _samr_DeleteUser(pipes_struct *p,
8919                           struct samr_DeleteUser *r);
8920 NTSTATUS _samr_DeleteDomainGroup(pipes_struct *p,
8921                                  struct samr_DeleteDomainGroup *r);
8922 NTSTATUS _samr_DeleteDomAlias(pipes_struct *p,
8923                               struct samr_DeleteDomAlias *r);
8924 NTSTATUS _samr_CreateDomainGroup(pipes_struct *p,
8925                                  struct samr_CreateDomainGroup *r);
8926 NTSTATUS _samr_CreateDomAlias(pipes_struct *p,
8927                               struct samr_CreateDomAlias *r);
8928 NTSTATUS _samr_QueryGroupInfo(pipes_struct *p,
8929                               struct samr_QueryGroupInfo *r);
8930 NTSTATUS _samr_SetGroupInfo(pipes_struct *p,
8931                             struct samr_SetGroupInfo *r);
8932 NTSTATUS _samr_SetAliasInfo(pipes_struct *p,
8933                             struct samr_SetAliasInfo *r);
8934 NTSTATUS _samr_GetDomPwInfo(pipes_struct *p,
8935                             struct samr_GetDomPwInfo *r);
8936 NTSTATUS _samr_OpenGroup(pipes_struct *p,
8937                          struct samr_OpenGroup *r);
8938 NTSTATUS _samr_RemoveMemberFromForeignDomain(pipes_struct *p,
8939                                              struct samr_RemoveMemberFromForeignDomain *r);
8940 NTSTATUS _samr_QueryDomainInfo2(pipes_struct *p,
8941                                 struct samr_QueryDomainInfo2 *r);
8942 NTSTATUS _samr_SetDomainInfo(pipes_struct *p,
8943                              struct samr_SetDomainInfo *r);
8944 NTSTATUS _samr_GetDisplayEnumerationIndex(pipes_struct *p,
8945                                           struct samr_GetDisplayEnumerationIndex *r);
8946 NTSTATUS _samr_GetDisplayEnumerationIndex2(pipes_struct *p,
8947                                            struct samr_GetDisplayEnumerationIndex2 *r);
8948 NTSTATUS _samr_Shutdown(pipes_struct *p,
8949                         struct samr_Shutdown *r);
8950 NTSTATUS _samr_CreateUser(pipes_struct *p,
8951                           struct samr_CreateUser *r);
8952 NTSTATUS _samr_SetMemberAttributesOfGroup(pipes_struct *p,
8953                                           struct samr_SetMemberAttributesOfGroup *r);
8954 NTSTATUS _samr_ChangePasswordUser(pipes_struct *p,
8955                                   struct samr_ChangePasswordUser *r);
8956 NTSTATUS _samr_TestPrivateFunctionsDomain(pipes_struct *p,
8957                                           struct samr_TestPrivateFunctionsDomain *r);
8958 NTSTATUS _samr_TestPrivateFunctionsUser(pipes_struct *p,
8959                                         struct samr_TestPrivateFunctionsUser *r);
8960 NTSTATUS _samr_QueryUserInfo2(pipes_struct *p,
8961                               struct samr_QueryUserInfo2 *r);
8962 NTSTATUS _samr_AddMultipleMembersToAlias(pipes_struct *p,
8963                                          struct samr_AddMultipleMembersToAlias *r);
8964 NTSTATUS _samr_RemoveMultipleMembersFromAlias(pipes_struct *p,
8965                                               struct samr_RemoveMultipleMembersFromAlias *r);
8966 NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
8967                                       struct samr_OemChangePasswordUser2 *r);
8968 NTSTATUS _samr_SetBootKeyInformation(pipes_struct *p,
8969                                      struct samr_SetBootKeyInformation *r);
8970 NTSTATUS _samr_GetBootKeyInformation(pipes_struct *p,
8971                                      struct samr_GetBootKeyInformation *r);
8972 NTSTATUS _samr_Connect3(pipes_struct *p,
8973                         struct samr_Connect3 *r);
8974 NTSTATUS _samr_RidToSid(pipes_struct *p,
8975                         struct samr_RidToSid *r);
8976 NTSTATUS _samr_SetDsrmPassword(pipes_struct *p,
8977                                struct samr_SetDsrmPassword *r);
8978 NTSTATUS _samr_ValidatePassword(pipes_struct *p,
8979                                 struct samr_ValidatePassword *r);
8980
8981 /* The following definitions come from rpc_server/srv_samr_util.c  */
8982
8983 void copy_id20_to_sam_passwd(struct samu *to,
8984                              struct samr_UserInfo20 *from);
8985 void copy_id21_to_sam_passwd(const char *log_prefix,
8986                              struct samu *to,
8987                              struct samr_UserInfo21 *from);
8988 void copy_id23_to_sam_passwd(struct samu *to,
8989                              struct samr_UserInfo23 *from);
8990 void copy_id25_to_sam_passwd(struct samu *to,
8991                              struct samr_UserInfo25 *from);
8992
8993 /* The following definitions come from rpc_server/srv_spoolss.c  */
8994
8995 void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns );
8996 NTSTATUS rpc_spoolss_init(void);
8997
8998 /* The following definitions come from rpc_server/srv_spoolss_nt.c  */
8999
9000 WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *sharename );
9001 void do_drv_upgrade_printer(struct messaging_context *msg,
9002                             void *private_data,
9003                             uint32_t msg_type,
9004                             struct server_id server_id,
9005                             DATA_BLOB *data);
9006 void update_monitored_printq_cache( void );
9007 void reset_all_printerdata(struct messaging_context *msg,
9008                            void *private_data,
9009                            uint32_t msg_type,
9010                            struct server_id server_id,
9011                            DATA_BLOB *data);
9012 WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u);
9013 WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u);
9014 bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
9015                                 NT_DEVICEMODE **pp_nt_devmode);
9016 WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u);
9017 WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u);
9018 WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u);
9019 WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u);
9020 WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
9021                                   uint32 type, uint8 *data, int real_len  );
9022 WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
9023 WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u);
9024 void spoolss_notify_server_name(int snum,
9025                                        SPOOL_NOTIFY_INFO_DATA *data,
9026                                        print_queue_struct *queue,
9027                                        NT_PRINTER_INFO_LEVEL *printer,
9028                                        TALLOC_CTX *mem_ctx);
9029 void spoolss_notify_printer_name(int snum,
9030                                         SPOOL_NOTIFY_INFO_DATA *data,
9031                                         print_queue_struct *queue,
9032                                         NT_PRINTER_INFO_LEVEL *printer,
9033                                         TALLOC_CTX *mem_ctx);
9034 void spoolss_notify_share_name(int snum,
9035                                       SPOOL_NOTIFY_INFO_DATA *data,
9036                                       print_queue_struct *queue,
9037                                       NT_PRINTER_INFO_LEVEL *printer,
9038                                       TALLOC_CTX *mem_ctx);
9039 void spoolss_notify_port_name(int snum,
9040                                      SPOOL_NOTIFY_INFO_DATA *data,
9041                                      print_queue_struct *queue,
9042                                      NT_PRINTER_INFO_LEVEL *printer,
9043                                      TALLOC_CTX *mem_ctx);
9044 void spoolss_notify_driver_name(int snum,
9045                                        SPOOL_NOTIFY_INFO_DATA *data,
9046                                        print_queue_struct *queue,
9047                                        NT_PRINTER_INFO_LEVEL *printer,
9048                                        TALLOC_CTX *mem_ctx);
9049 void spoolss_notify_comment(int snum,
9050                                    SPOOL_NOTIFY_INFO_DATA *data,
9051                                    print_queue_struct *queue,
9052                                    NT_PRINTER_INFO_LEVEL *printer,
9053                                    TALLOC_CTX *mem_ctx);
9054 void spoolss_notify_location(int snum,
9055                                     SPOOL_NOTIFY_INFO_DATA *data,
9056                                     print_queue_struct *queue,
9057                                     NT_PRINTER_INFO_LEVEL *printer,
9058                                     TALLOC_CTX *mem_ctx);
9059 void spoolss_notify_sepfile(int snum,
9060                                    SPOOL_NOTIFY_INFO_DATA *data,
9061                                    print_queue_struct *queue,
9062                                    NT_PRINTER_INFO_LEVEL *printer,
9063                                    TALLOC_CTX *mem_ctx);
9064 void spoolss_notify_print_processor(int snum,
9065                                            SPOOL_NOTIFY_INFO_DATA *data,
9066                                            print_queue_struct *queue,
9067                                            NT_PRINTER_INFO_LEVEL *printer,
9068                                            TALLOC_CTX *mem_ctx);
9069 void spoolss_notify_parameters(int snum,
9070                                       SPOOL_NOTIFY_INFO_DATA *data,
9071                                       print_queue_struct *queue,
9072                                       NT_PRINTER_INFO_LEVEL *printer,
9073                                       TALLOC_CTX *mem_ctx);
9074 void spoolss_notify_datatype(int snum,
9075                                     SPOOL_NOTIFY_INFO_DATA *data,
9076                                     print_queue_struct *queue,
9077                                     NT_PRINTER_INFO_LEVEL *printer,
9078                                     TALLOC_CTX *mem_ctx);
9079 void spoolss_notify_attributes(int snum,
9080                                       SPOOL_NOTIFY_INFO_DATA *data,
9081                                       print_queue_struct *queue,
9082                                       NT_PRINTER_INFO_LEVEL *printer,
9083                                       TALLOC_CTX *mem_ctx);
9084 void spoolss_notify_cjobs(int snum,
9085                                  SPOOL_NOTIFY_INFO_DATA *data,
9086                                  print_queue_struct *queue,
9087                                  NT_PRINTER_INFO_LEVEL *printer,
9088                                  TALLOC_CTX *mem_ctx);
9089 void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id);
9090 WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
9091 DEVICEMODE *construct_dev_mode(const char *servicename);
9092 WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
9093 WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
9094 WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u);
9095 WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u);
9096 WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u);
9097 WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u);
9098 WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u);
9099 WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u);
9100 WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u);
9101 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
9102 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
9103 WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
9104 WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u);
9105 WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u);
9106 WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u);
9107 WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u);
9108 WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u);
9109 WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
9110 WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u);
9111 WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u);
9112 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
9113 WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u);
9114 WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u);
9115 WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, SPOOL_R_ADDPRINTERDRIVER *r_u);
9116 WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, SPOOL_R_ADDPRINTERDRIVEREX *r_u);
9117 WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u);
9118 WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
9119 WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
9120 WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u);
9121 WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u);
9122 WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u);
9123 WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u);
9124 WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u);
9125 WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u);
9126 WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u);
9127 WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u);
9128 WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u);
9129 WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u);
9130 WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u);
9131 WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u);
9132 WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
9133 WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u);
9134 WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
9135 WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u);
9136 WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_XCVDATAPORT *r_u);
9137
9138 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
9139
9140 WERROR _srvsvc_NetFileEnum(pipes_struct *p,
9141                            struct srvsvc_NetFileEnum *r);
9142 WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p,
9143                              struct srvsvc_NetSrvGetInfo *r);
9144 WERROR _srvsvc_NetSrvSetInfo(pipes_struct *p,
9145                              struct srvsvc_NetSrvSetInfo *r);
9146 WERROR _srvsvc_NetConnEnum(pipes_struct *p,
9147                            struct srvsvc_NetConnEnum *r);
9148 WERROR _srvsvc_NetSessEnum(pipes_struct *p,
9149                            struct srvsvc_NetSessEnum *r);
9150 WERROR _srvsvc_NetSessDel(pipes_struct *p,
9151                           struct srvsvc_NetSessDel *r);
9152 WERROR _srvsvc_NetShareEnumAll(pipes_struct *p,
9153                                struct srvsvc_NetShareEnumAll *r);
9154 WERROR _srvsvc_NetShareEnum(pipes_struct *p,
9155                             struct srvsvc_NetShareEnum *r);
9156 WERROR _srvsvc_NetShareGetInfo(pipes_struct *p,
9157                                struct srvsvc_NetShareGetInfo *r);
9158 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
9159 WERROR _srvsvc_NetShareSetInfo(pipes_struct *p,
9160                                struct srvsvc_NetShareSetInfo *r);
9161 WERROR _srvsvc_NetShareAdd(pipes_struct *p,
9162                            struct srvsvc_NetShareAdd *r);
9163 WERROR _srvsvc_NetShareDel(pipes_struct *p,
9164                            struct srvsvc_NetShareDel *r);
9165 WERROR _srvsvc_NetShareDelSticky(pipes_struct *p,
9166                                  struct srvsvc_NetShareDelSticky *r);
9167 WERROR _srvsvc_NetRemoteTOD(pipes_struct *p,
9168                             struct srvsvc_NetRemoteTOD *r);
9169 WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
9170                                   struct srvsvc_NetGetFileSecurity *r);
9171 WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
9172                                   struct srvsvc_NetSetFileSecurity *r);
9173 WERROR _srvsvc_NetDiskEnum(pipes_struct *p,
9174                            struct srvsvc_NetDiskEnum *r);
9175 WERROR _srvsvc_NetNameValidate(pipes_struct *p,
9176                                struct srvsvc_NetNameValidate *r);
9177 WERROR _srvsvc_NetFileClose(pipes_struct *p, struct srvsvc_NetFileClose *r);
9178 WERROR _srvsvc_NetCharDevEnum(pipes_struct *p, struct srvsvc_NetCharDevEnum *r);
9179 WERROR _srvsvc_NetCharDevGetInfo(pipes_struct *p, struct srvsvc_NetCharDevGetInfo *r);
9180 WERROR _srvsvc_NetCharDevControl(pipes_struct *p, struct srvsvc_NetCharDevControl *r);
9181 WERROR _srvsvc_NetCharDevQEnum(pipes_struct *p, struct srvsvc_NetCharDevQEnum *r);
9182 WERROR _srvsvc_NetCharDevQGetInfo(pipes_struct *p, struct srvsvc_NetCharDevQGetInfo *r);
9183 WERROR _srvsvc_NetCharDevQSetInfo(pipes_struct *p, struct srvsvc_NetCharDevQSetInfo *r);
9184 WERROR _srvsvc_NetCharDevQPurge(pipes_struct *p, struct srvsvc_NetCharDevQPurge *r);
9185 WERROR _srvsvc_NetCharDevQPurgeSelf(pipes_struct *p, struct srvsvc_NetCharDevQPurgeSelf *r);
9186 WERROR _srvsvc_NetFileGetInfo(pipes_struct *p, struct srvsvc_NetFileGetInfo *r);
9187 WERROR _srvsvc_NetShareCheck(pipes_struct *p, struct srvsvc_NetShareCheck *r);
9188 WERROR _srvsvc_NetServerStatisticsGet(pipes_struct *p, struct srvsvc_NetServerStatisticsGet *r);
9189 WERROR _srvsvc_NetTransportAdd(pipes_struct *p, struct srvsvc_NetTransportAdd *r);
9190 WERROR _srvsvc_NetTransportEnum(pipes_struct *p, struct srvsvc_NetTransportEnum *r);
9191 WERROR _srvsvc_NetTransportDel(pipes_struct *p, struct srvsvc_NetTransportDel *r);
9192 WERROR _srvsvc_NetSetServiceBits(pipes_struct *p, struct srvsvc_NetSetServiceBits *r);
9193 WERROR _srvsvc_NetPathType(pipes_struct *p, struct srvsvc_NetPathType *r);
9194 WERROR _srvsvc_NetPathCanonicalize(pipes_struct *p, struct srvsvc_NetPathCanonicalize *r);
9195 WERROR _srvsvc_NetPathCompare(pipes_struct *p, struct srvsvc_NetPathCompare *r);
9196 WERROR _srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p, struct srvsvc_NETRPRNAMECANONICALIZE *r);
9197 WERROR _srvsvc_NetPRNameCompare(pipes_struct *p, struct srvsvc_NetPRNameCompare *r);
9198 WERROR _srvsvc_NetShareDelStart(pipes_struct *p, struct srvsvc_NetShareDelStart *r);
9199 WERROR _srvsvc_NetShareDelCommit(pipes_struct *p, struct srvsvc_NetShareDelCommit *r);
9200 WERROR _srvsvc_NetServerTransportAddEx(pipes_struct *p, struct srvsvc_NetServerTransportAddEx *r);
9201 WERROR _srvsvc_NetServerSetServiceBitsEx(pipes_struct *p, struct srvsvc_NetServerSetServiceBitsEx *r);
9202 WERROR _srvsvc_NETRDFSGETVERSION(pipes_struct *p, struct srvsvc_NETRDFSGETVERSION *r);
9203 WERROR _srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p, struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
9204 WERROR _srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p, struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
9205 WERROR _srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
9206 WERROR _srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p, struct srvsvc_NETRDFSSETSERVERINFO *r);
9207 WERROR _srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p, struct srvsvc_NETRDFSCREATEEXITPOINT *r);
9208 WERROR _srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p, struct srvsvc_NETRDFSDELETEEXITPOINT *r);
9209 WERROR _srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p, struct srvsvc_NETRDFSMODIFYPREFIX *r);
9210 WERROR _srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p, struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
9211 WERROR _srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
9212 WERROR _srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p, struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
9213
9214 /* The following definitions come from rpc_server/srv_svcctl.c  */
9215
9216 void svcctl2_get_pipe_fns( struct api_struct **fns, int *n_fns );
9217 NTSTATUS rpc_svcctl2_init(void);
9218
9219 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
9220
9221 bool init_service_op_table( void );
9222 WERROR _svcctl_OpenSCManagerW(pipes_struct *p,
9223                               struct svcctl_OpenSCManagerW *r);
9224 WERROR _svcctl_OpenServiceW(pipes_struct *p,
9225                             struct svcctl_OpenServiceW *r);
9226 WERROR _svcctl_CloseServiceHandle(pipes_struct *p, struct svcctl_CloseServiceHandle *r);
9227 WERROR _svcctl_GetServiceDisplayNameW(pipes_struct *p,
9228                                       struct svcctl_GetServiceDisplayNameW *r);
9229 WERROR _svcctl_QueryServiceStatus(pipes_struct *p,
9230                                   struct svcctl_QueryServiceStatus *r);
9231 WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, SVCCTL_R_ENUM_SERVICES_STATUS *r_u);
9232 WERROR _svcctl_StartServiceW(pipes_struct *p,
9233                              struct svcctl_StartServiceW *r);
9234 WERROR _svcctl_ControlService(pipes_struct *p,
9235                               struct svcctl_ControlService *r);
9236 WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
9237                                       struct svcctl_EnumDependentServicesW *r);
9238 WERROR _svcctl_query_service_status_ex( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u );
9239 WERROR _svcctl_query_service_config( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u );
9240 WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u );
9241 WERROR _svcctl_LockServiceDatabase(pipes_struct *p,
9242                                    struct svcctl_LockServiceDatabase *r);
9243 WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p,
9244                                      struct svcctl_UnlockServiceDatabase *r);
9245 WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
9246                                           struct svcctl_QueryServiceObjectSecurity *r);
9247 WERROR _svcctl_SetServiceObjectSecurity(pipes_struct *p,
9248                                         struct svcctl_SetServiceObjectSecurity *r);
9249 WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r);
9250 WERROR _svcctl_SetServiceStatus(pipes_struct *p, struct svcctl_SetServiceStatus *r);
9251 WERROR _svcctl_NotifyBootConfigStatus(pipes_struct *p, struct svcctl_NotifyBootConfigStatus *r);
9252 WERROR _svcctl_SCSetServiceBitsW(pipes_struct *p, struct svcctl_SCSetServiceBitsW *r);
9253 WERROR _svcctl_ChangeServiceConfigW(pipes_struct *p, struct svcctl_ChangeServiceConfigW *r);
9254 WERROR _svcctl_CreateServiceW(pipes_struct *p, struct svcctl_CreateServiceW *r);
9255 WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesStatusW *r);
9256 WERROR _svcctl_QueryServiceConfigW(pipes_struct *p, struct svcctl_QueryServiceConfigW *r);
9257 WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct svcctl_QueryServiceLockStatusW *r);
9258 WERROR _svcctl_GetServiceKeyNameW(pipes_struct *p, struct svcctl_GetServiceKeyNameW *r);
9259 WERROR _svcctl_SCSetServiceBitsA(pipes_struct *p, struct svcctl_SCSetServiceBitsA *r);
9260 WERROR _svcctl_ChangeServiceConfigA(pipes_struct *p, struct svcctl_ChangeServiceConfigA *r);
9261 WERROR _svcctl_CreateServiceA(pipes_struct *p, struct svcctl_CreateServiceA *r);
9262 WERROR _svcctl_EnumDependentServicesA(pipes_struct *p, struct svcctl_EnumDependentServicesA *r);
9263 WERROR _svcctl_EnumServicesStatusA(pipes_struct *p, struct svcctl_EnumServicesStatusA *r);
9264 WERROR _svcctl_OpenSCManagerA(pipes_struct *p, struct svcctl_OpenSCManagerA *r);
9265 WERROR _svcctl_OpenServiceA(pipes_struct *p, struct svcctl_OpenServiceA *r);
9266 WERROR _svcctl_QueryServiceConfigA(pipes_struct *p, struct svcctl_QueryServiceConfigA *r);
9267 WERROR _svcctl_QueryServiceLockStatusA(pipes_struct *p, struct svcctl_QueryServiceLockStatusA *r);
9268 WERROR _svcctl_StartServiceA(pipes_struct *p, struct svcctl_StartServiceA *r);
9269 WERROR _svcctl_GetServiceDisplayNameA(pipes_struct *p, struct svcctl_GetServiceDisplayNameA *r);
9270 WERROR _svcctl_GetServiceKeyNameA(pipes_struct *p, struct svcctl_GetServiceKeyNameA *r);
9271 WERROR _svcctl_GetCurrentGroupeStateW(pipes_struct *p, struct svcctl_GetCurrentGroupeStateW *r);
9272 WERROR _svcctl_EnumServiceGroupW(pipes_struct *p, struct svcctl_EnumServiceGroupW *r);
9273 WERROR _svcctl_ChangeServiceConfig2A(pipes_struct *p, struct svcctl_ChangeServiceConfig2A *r);
9274 WERROR _svcctl_ChangeServiceConfig2W(pipes_struct *p, struct svcctl_ChangeServiceConfig2W *r);
9275 WERROR _svcctl_QueryServiceConfig2A(pipes_struct *p, struct svcctl_QueryServiceConfig2A *r);
9276 WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p, struct svcctl_QueryServiceConfig2W *r);
9277 WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p, struct svcctl_QueryServiceStatusEx *r);
9278 WERROR _EnumServicesStatusExA(pipes_struct *p, struct EnumServicesStatusExA *r);
9279 WERROR _EnumServicesStatusExW(pipes_struct *p, struct EnumServicesStatusExW *r);
9280 WERROR _svcctl_SCSendTSMessage(pipes_struct *p, struct svcctl_SCSendTSMessage *r);
9281
9282 /* The following definitions come from rpc_server/srv_winreg_nt.c  */
9283
9284 WERROR _winreg_CloseKey(pipes_struct *p, struct winreg_CloseKey *r);
9285 WERROR _winreg_OpenHKLM(pipes_struct *p, struct winreg_OpenHKLM *r);
9286 WERROR _winreg_OpenHKPD(pipes_struct *p, struct winreg_OpenHKPD *r);
9287 WERROR _winreg_OpenHKPT(pipes_struct *p, struct winreg_OpenHKPT *r);
9288 WERROR _winreg_OpenHKCR(pipes_struct *p, struct winreg_OpenHKCR *r);
9289 WERROR _winreg_OpenHKU(pipes_struct *p, struct winreg_OpenHKU *r);
9290 WERROR _winreg_OpenHKCU(pipes_struct *p, struct winreg_OpenHKCU *r);
9291 WERROR _winreg_OpenHKCC(pipes_struct *p, struct winreg_OpenHKCC *r);
9292 WERROR _winreg_OpenHKDD(pipes_struct *p, struct winreg_OpenHKDD *r);
9293 WERROR _winreg_OpenHKPN(pipes_struct *p, struct winreg_OpenHKPN *r);
9294 WERROR _winreg_OpenKey(pipes_struct *p, struct winreg_OpenKey *r);
9295 WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r);
9296 WERROR _winreg_QueryInfoKey(pipes_struct *p, struct winreg_QueryInfoKey *r);
9297 WERROR _winreg_GetVersion(pipes_struct *p, struct winreg_GetVersion *r);
9298 WERROR _winreg_EnumKey(pipes_struct *p, struct winreg_EnumKey *r);
9299 WERROR _winreg_EnumValue(pipes_struct *p, struct winreg_EnumValue *r);
9300 WERROR _winreg_InitiateSystemShutdown(pipes_struct *p, struct winreg_InitiateSystemShutdown *r);
9301 WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, struct winreg_InitiateSystemShutdownEx *r);
9302 WERROR _winreg_AbortSystemShutdown(pipes_struct *p, struct winreg_AbortSystemShutdown *r);
9303 WERROR _winreg_RestoreKey(pipes_struct *p, struct winreg_RestoreKey *r);
9304 WERROR _winreg_SaveKey(pipes_struct *p, struct winreg_SaveKey *r);
9305 WERROR _winreg_SaveKeyEx(pipes_struct *p, struct winreg_SaveKeyEx *r);
9306 WERROR _winreg_CreateKey( pipes_struct *p, struct winreg_CreateKey *r);
9307 WERROR _winreg_SetValue(pipes_struct *p, struct winreg_SetValue *r);
9308 WERROR _winreg_DeleteKey(pipes_struct *p, struct winreg_DeleteKey *r);
9309 WERROR _winreg_DeleteValue(pipes_struct *p, struct winreg_DeleteValue *r);
9310 WERROR _winreg_GetKeySecurity(pipes_struct *p, struct winreg_GetKeySecurity *r);
9311 WERROR _winreg_SetKeySecurity(pipes_struct *p, struct winreg_SetKeySecurity *r);
9312 WERROR _winreg_FlushKey(pipes_struct *p, struct winreg_FlushKey *r);
9313 WERROR _winreg_UnLoadKey(pipes_struct *p, struct winreg_UnLoadKey *r);
9314 WERROR _winreg_ReplaceKey(pipes_struct *p, struct winreg_ReplaceKey *r);
9315 WERROR _winreg_LoadKey(pipes_struct *p, struct winreg_LoadKey *r);
9316 WERROR _winreg_NotifyChangeKeyValue(pipes_struct *p, struct winreg_NotifyChangeKeyValue *r);
9317 WERROR _winreg_QueryMultipleValues(pipes_struct *p, struct winreg_QueryMultipleValues *r);
9318 WERROR _winreg_QueryMultipleValues2(pipes_struct *p, struct winreg_QueryMultipleValues2 *r);
9319
9320 /* The following definitions come from rpc_server/srv_wkssvc_nt.c  */
9321
9322 WERROR _wkssvc_NetWkstaGetInfo(pipes_struct *p, struct wkssvc_NetWkstaGetInfo *r);
9323 WERROR _wkssvc_NetWkstaSetInfo(pipes_struct *p, struct wkssvc_NetWkstaSetInfo *r);
9324 WERROR _wkssvc_NetWkstaEnumUsers(pipes_struct *p, struct wkssvc_NetWkstaEnumUsers *r);
9325 WERROR _wkssvc_NetrWkstaUserGetInfo(pipes_struct *p, struct wkssvc_NetrWkstaUserGetInfo *r);
9326 WERROR _wkssvc_NetrWkstaUserSetInfo(pipes_struct *p, struct wkssvc_NetrWkstaUserSetInfo *r);
9327 WERROR _wkssvc_NetWkstaTransportEnum(pipes_struct *p, struct wkssvc_NetWkstaTransportEnum *r);
9328 WERROR _wkssvc_NetrWkstaTransportAdd(pipes_struct *p, struct wkssvc_NetrWkstaTransportAdd *r);
9329 WERROR _wkssvc_NetrWkstaTransportDel(pipes_struct *p, struct wkssvc_NetrWkstaTransportDel *r);
9330 WERROR _wkssvc_NetrUseAdd(pipes_struct *p, struct wkssvc_NetrUseAdd *r);
9331 WERROR _wkssvc_NetrUseGetInfo(pipes_struct *p, struct wkssvc_NetrUseGetInfo *r);
9332 WERROR _wkssvc_NetrUseDel(pipes_struct *p, struct wkssvc_NetrUseDel *r);
9333 WERROR _wkssvc_NetrUseEnum(pipes_struct *p, struct wkssvc_NetrUseEnum *r);
9334 WERROR _wkssvc_NetrMessageBufferSend(pipes_struct *p, struct wkssvc_NetrMessageBufferSend *r);
9335 WERROR _wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p, struct wkssvc_NetrWorkstationStatisticsGet *r) ;
9336 WERROR _wkssvc_NetrLogonDomainNameAdd(pipes_struct *p, struct wkssvc_NetrLogonDomainNameAdd *r);
9337 WERROR _wkssvc_NetrLogonDomainNameDel(pipes_struct *p, struct wkssvc_NetrLogonDomainNameDel *r);
9338 WERROR _wkssvc_NetrJoinDomain(pipes_struct *p, struct wkssvc_NetrJoinDomain *r);
9339 WERROR _wkssvc_NetrUnjoinDomain(pipes_struct *p, struct wkssvc_NetrUnjoinDomain *r);
9340 WERROR _wkssvc_NetrRenameMachineInDomain(pipes_struct *p, struct wkssvc_NetrRenameMachineInDomain *r);
9341 WERROR _wkssvc_NetrValidateName(pipes_struct *p, struct wkssvc_NetrValidateName *r);
9342 WERROR _wkssvc_NetrGetJoinInformation(pipes_struct *p, struct wkssvc_NetrGetJoinInformation *r);
9343 WERROR _wkssvc_NetrGetJoinableOus(pipes_struct *p, struct wkssvc_NetrGetJoinableOus *r);
9344 WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
9345                                struct wkssvc_NetrJoinDomain2 *r);
9346 WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
9347                                  struct wkssvc_NetrUnjoinDomain2 *r);
9348 WERROR _wkssvc_NetrRenameMachineInDomain2(pipes_struct *p, struct wkssvc_NetrRenameMachineInDomain2 *r);
9349 WERROR _wkssvc_NetrValidateName2(pipes_struct *p, struct wkssvc_NetrValidateName2 *r);
9350 WERROR _wkssvc_NetrGetJoinableOus2(pipes_struct *p, struct wkssvc_NetrGetJoinableOus2 *r);
9351 WERROR _wkssvc_NetrAddAlternateComputerName(pipes_struct *p, struct wkssvc_NetrAddAlternateComputerName *r);
9352 WERROR _wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p, struct wkssvc_NetrRemoveAlternateComputerName *r);
9353 WERROR _wkssvc_NetrSetPrimaryComputername(pipes_struct *p, struct wkssvc_NetrSetPrimaryComputername *r);
9354 WERROR _wkssvc_NetrEnumerateComputerNames(pipes_struct *p, struct wkssvc_NetrEnumerateComputerNames *r);
9355
9356 /* The following definitions come from rpcclient/cmd_dfs.c  */
9357
9358
9359 /* The following definitions come from rpcclient/cmd_dssetup.c  */
9360
9361
9362 /* The following definitions come from rpcclient/cmd_echo.c  */
9363
9364
9365 /* The following definitions come from rpcclient/cmd_lsarpc.c  */
9366
9367
9368 /* The following definitions come from rpcclient/cmd_netlogon.c  */
9369
9370
9371 /* The following definitions come from rpcclient/cmd_ntsvcs.c  */
9372
9373
9374 /* The following definitions come from rpcclient/cmd_samr.c  */
9375
9376
9377 /* The following definitions come from rpcclient/cmd_shutdown.c  */
9378
9379
9380 /* The following definitions come from rpcclient/cmd_spoolss.c  */
9381
9382 void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch);
9383
9384 /* The following definitions come from rpcclient/cmd_srvsvc.c  */
9385
9386
9387 /* The following definitions come from rpcclient/cmd_test.c  */
9388
9389
9390 /* The following definitions come from rpcclient/cmd_wkssvc.c  */
9391
9392
9393 /* The following definitions come from rpcclient/rpcclient.c  */
9394
9395
9396 /* The following definitions come from services/services_db.c  */
9397
9398 void svcctl_init_keys( void );
9399 SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9400 bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token );
9401 const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9402 const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9403 REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token );
9404
9405 /* The following definitions come from services/svc_netlogon.c  */
9406
9407
9408 /* The following definitions come from services/svc_rcinit.c  */
9409
9410
9411 /* The following definitions come from services/svc_spoolss.c  */
9412
9413
9414 /* The following definitions come from services/svc_winreg.c  */
9415
9416
9417 /* The following definitions come from services/svc_wins.c  */
9418
9419
9420 /* The following definitions come from smbd/aio.c  */
9421
9422 void aio_request_done(uint16_t mid);
9423 bool aio_finished(void);
9424 void initialize_async_io_handler(void);
9425 bool schedule_aio_read_and_X(connection_struct *conn,
9426                              struct smb_request *req,
9427                              files_struct *fsp, SMB_OFF_T startpos,
9428                              size_t smb_maxcnt);
9429 bool schedule_aio_write_and_X(connection_struct *conn,
9430                               struct smb_request *req,
9431                               files_struct *fsp, char *data,
9432                               SMB_OFF_T startpos,
9433                               size_t numtowrite);
9434 int process_aio_queue(void);
9435 int wait_for_aio_completion(files_struct *fsp);
9436 void cancel_aio_by_fsp(files_struct *fsp);
9437 bool aio_finished(void);
9438 void initialize_async_io_handler(void);
9439 int process_aio_queue(void);
9440 bool schedule_aio_read_and_X(connection_struct *conn,
9441                              struct smb_request *req,
9442                              files_struct *fsp, SMB_OFF_T startpos,
9443                              size_t smb_maxcnt);
9444 bool schedule_aio_write_and_X(connection_struct *conn,
9445                               struct smb_request *req,
9446                               files_struct *fsp, char *data,
9447                               SMB_OFF_T startpos,
9448                               size_t numtowrite);
9449 void cancel_aio_by_fsp(files_struct *fsp);
9450 int wait_for_aio_completion(files_struct *fsp);
9451
9452 /* The following definitions come from smbd/blocking.c  */
9453
9454 bool push_blocking_lock_request( struct byte_range_lock *br_lck,
9455                 const struct smb_request *req,
9456                 files_struct *fsp,
9457                 int lock_timeout,
9458                 int lock_num,
9459                 uint32 lock_pid,
9460                 enum brl_type lock_type,
9461                 enum brl_flavour lock_flav,
9462                 SMB_BIG_UINT offset,
9463                 SMB_BIG_UINT count,
9464                 uint32 blocking_pid);
9465 void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck);
9466 void remove_pending_lock_requests_by_mid(int mid);
9467 bool blocking_lock_was_deferred(int mid);
9468 bool blocking_lock_cancel(files_struct *fsp,
9469                         uint32 lock_pid,
9470                         SMB_BIG_UINT offset,
9471                         SMB_BIG_UINT count,
9472                         enum brl_flavour lock_flav,
9473                         unsigned char locktype,
9474                         NTSTATUS err);
9475
9476 /* The following definitions come from smbd/change_trust_pw.c  */
9477
9478 NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
9479
9480 /* The following definitions come from smbd/chgpasswd.c  */
9481
9482 bool chgpasswd(const char *name, const struct passwd *pass,
9483                const char *oldpass, const char *newpass, bool as_root);
9484 bool chgpasswd(const char *name, const struct passwd *pass, 
9485                const char *oldpass, const char *newpass, bool as_root);
9486 bool check_lanman_password(char *user, uchar * pass1,
9487                            uchar * pass2, struct samu **hnd);
9488 bool change_lanman_password(struct samu *sampass, uchar *pass2);
9489 NTSTATUS pass_oem_change(char *user,
9490                          uchar password_encrypted_with_lm_hash[516],
9491                          const uchar old_lm_hash_encrypted[16],
9492                          uchar password_encrypted_with_nt_hash[516],
9493                          const uchar old_nt_hash_encrypted[16],
9494                          uint32 *reject_reason);
9495 NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason);
9496
9497 /* The following definitions come from smbd/close.c  */
9498
9499 void set_close_write_time(struct files_struct *fsp, struct timespec ts);
9500 NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type);
9501 void msg_close_file(struct messaging_context *msg_ctx,
9502                     void *private_data,
9503                     uint32_t msg_type,
9504                     struct server_id server_id,
9505                     DATA_BLOB *data);
9506
9507 /* The following definitions come from smbd/conn.c  */
9508
9509 void conn_init(void);
9510 int conn_num_open(void);
9511 bool conn_snum_used(int snum);
9512 connection_struct *conn_find(unsigned cnum);
9513 connection_struct *conn_new(void);
9514 bool conn_close_all(void);
9515 bool conn_idle_all(time_t t);
9516 void conn_clear_vuid_caches(uint16 vuid);
9517 void conn_free_internal(connection_struct *conn);
9518 void conn_free(connection_struct *conn);
9519 void msg_force_tdis(struct messaging_context *msg,
9520                     void *private_data,
9521                     uint32_t msg_type,
9522                     struct server_id server_id,
9523                     DATA_BLOB *data);
9524
9525 /* The following definitions come from smbd/connection.c  */
9526
9527 bool yield_connection(connection_struct *conn, const char *name);
9528 int count_current_connections( const char *sharename, bool clear  );
9529 int count_all_current_connections(void);
9530 bool claim_connection(connection_struct *conn, const char *name,
9531                       uint32 msg_flags);
9532 bool register_message_flags(bool doreg, uint32 msg_flags);
9533 bool store_pipe_opendb( smb_np_struct *p );
9534 bool delete_pipe_opendb( smb_np_struct *p );
9535
9536 /* The following definitions come from smbd/dfree.c  */
9537
9538 SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
9539                               SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
9540 SMB_BIG_UINT get_dfree_info(connection_struct *conn,
9541                         const char *path,
9542                         bool small_query,
9543                         SMB_BIG_UINT *bsize,
9544                         SMB_BIG_UINT *dfree,
9545                         SMB_BIG_UINT *dsize);
9546
9547 /* The following definitions come from smbd/dir.c  */
9548
9549 bool make_dir_struct(TALLOC_CTX *ctx,
9550                         char *buf,
9551                         const char *mask,
9552                         const char *fname,
9553                         SMB_OFF_T size,
9554                         uint32 mode,
9555                         time_t date,
9556                         bool uc);
9557 void init_dptrs(void);
9558 char *dptr_path(int key);
9559 char *dptr_wcard(int key);
9560 uint16 dptr_attr(int key);
9561 void dptr_close(int *key);
9562 void dptr_closecnum(connection_struct *conn);
9563 void dptr_idlecnum(connection_struct *conn);
9564 void dptr_closepath(char *path,uint16 spid);
9565 NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, bool expect_close,uint16 spid,
9566                 const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret);
9567 int dptr_CloseDir(struct dptr_struct *dptr);
9568 void dptr_SeekDir(struct dptr_struct *dptr, long offset);
9569 long dptr_TellDir(struct dptr_struct *dptr);
9570 bool dptr_has_wild(struct dptr_struct *dptr);
9571 int dptr_dnum(struct dptr_struct *dptr);
9572 const char *dptr_ReadDirName(TALLOC_CTX *ctx,
9573                         struct dptr_struct *dptr,
9574                         long *poffset,
9575                         SMB_STRUCT_STAT *pst);
9576 bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst);
9577 void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset);
9578 bool dptr_fill(char *buf1,unsigned int key);
9579 struct dptr_struct *dptr_fetch(char *buf,int *num);
9580 struct dptr_struct *dptr_fetch_lanman2(int dptr_num);
9581 bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype);
9582 bool get_dir_entry(TALLOC_CTX *ctx,
9583                 connection_struct *conn,
9584                 const char *mask,
9585                 uint32 dirtype,
9586                 char **pp_fname_out,
9587                 SMB_OFF_T *size,
9588                 uint32 *mode,
9589                 time_t *date,
9590                 bool check_descend,
9591                 bool ask_sharemode);
9592 bool is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, bool use_veto);
9593 struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
9594                         const char *name, const char *mask, uint32 attr);
9595 const char *ReadDirName(struct smb_Dir *dirp, long *poffset);
9596 void RewindDir(struct smb_Dir *dirp, long *poffset);
9597 void SeekDir(struct smb_Dir *dirp, long offset);
9598 long TellDir(struct smb_Dir *dirp);
9599 void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
9600 bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset);
9601 NTSTATUS can_delete_directory(struct connection_struct *conn,
9602                                 const char *dirname);
9603
9604 /* The following definitions come from smbd/dmapi.c  */
9605
9606 const void *dmapi_get_current_session(void);
9607 bool dmapi_have_session(void);
9608 bool dmapi_new_session(void);
9609 bool dmapi_destroy_session(void);
9610 uint32 dmapi_file_flags(const char * const path);
9611
9612 /* The following definitions come from smbd/dnsregister.c  */
9613
9614 void dns_register_close(struct dns_reg_state **dns_state_ptr);
9615 void dns_register_smbd(struct dns_reg_state ** dns_state_ptr,
9616                 unsigned port,
9617                 int *maxfd,
9618                 fd_set *listen_set,
9619                 struct timeval *timeout);
9620 bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
9621                 fd_set *lfds, struct timeval *timeout);
9622
9623 /* The following definitions come from smbd/dosmode.c  */
9624
9625 mode_t unix_mode(connection_struct *conn, int dosmode, const char *fname,
9626                  const char *inherit_from_dir);
9627 uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
9628 uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
9629 int file_set_dosmode(connection_struct *conn, const char *fname,
9630                      uint32 dosmode, SMB_STRUCT_STAT *st,
9631                      const char *parent_dir,
9632                      bool newfile);
9633 int file_ntimes(connection_struct *conn, const char *fname, const struct timespec ts[2]);
9634 bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
9635                          struct file_id fileid, const struct timespec mtime);
9636 bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
9637 bool update_write_time(struct files_struct *fsp);
9638
9639 /* The following definitions come from smbd/error.c  */
9640
9641 bool use_nt_status(void);
9642 void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
9643 int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
9644 void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
9645                     int line, const char *file);
9646 void reply_force_nt_error(struct smb_request *req, NTSTATUS ntstatus,
9647                           int line, const char *file);
9648 void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
9649                     int line, const char *file);
9650 void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
9651                       NTSTATUS status, int line, const char *file);
9652 void reply_openerror(struct smb_request *req, NTSTATUS status);
9653 void reply_unix_error(struct smb_request *req, uint8 defclass, uint32 defcode,
9654                         NTSTATUS defstatus, int line, const char *file);
9655
9656 /* The following definitions come from smbd/fake_file.c  */
9657
9658 enum FAKE_FILE_TYPE is_fake_file(const char *fname);
9659 NTSTATUS open_fake_file(connection_struct *conn,
9660                                 uint16_t current_vuid,
9661                                 enum FAKE_FILE_TYPE fake_file_type,
9662                                 const char *fname,
9663                                 uint32 access_mask,
9664                                 files_struct **result);
9665 void destroy_fake_file_handle(struct fake_file_handle **fh);
9666 NTSTATUS close_fake_file(files_struct *fsp);
9667
9668 /* The following definitions come from smbd/file_access.c  */
9669
9670 bool can_access_file_acl(struct connection_struct *conn,
9671                                 const char * fname,
9672                                 uint32_t access_mask);
9673 bool can_delete_file_in_directory(connection_struct *conn, const char *fname);
9674 bool can_access_file_data(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask);
9675 bool can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf);
9676 bool directory_has_default_acl(connection_struct *conn, const char *fname);
9677
9678 /* The following definitions come from smbd/fileio.c  */
9679
9680 ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
9681 void trigger_write_time_update(struct files_struct *fsp);
9682 void trigger_write_time_update_immediate(struct files_struct *fsp);
9683 ssize_t write_file(struct smb_request *req,
9684                         files_struct *fsp,
9685                         const char *data,
9686                         SMB_OFF_T pos,
9687                         size_t n);
9688 void delete_write_cache(files_struct *fsp);
9689 void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size);
9690 ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason);
9691 NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_through);
9692 int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst);
9693
9694 /* The following definitions come from smbd/filename.c  */
9695
9696 NTSTATUS unix_convert(TALLOC_CTX *ctx,
9697                         connection_struct *conn,
9698                         const char *orig_path,
9699                         bool allow_wcard_last_component,
9700                         char **pp_conv_path,
9701                         char **pp_saved_last_component,
9702                         SMB_STRUCT_STAT *pst);
9703 NTSTATUS check_name(connection_struct *conn, const char *name);
9704
9705 /* The following definitions come from smbd/files.c  */
9706
9707 NTSTATUS file_new(connection_struct *conn, files_struct **result);
9708 void file_close_conn(connection_struct *conn);
9709 void file_close_pid(uint16 smbpid, int vuid);
9710 void file_init(void);
9711 void file_close_user(int vuid);
9712 void file_dump_open_table(void);
9713 files_struct *file_find_fd(int fd);
9714 files_struct *file_find_dif(struct file_id id, unsigned long gen_id);
9715 files_struct *file_find_fsp(files_struct *orig_fsp);
9716 files_struct *file_find_di_first(struct file_id id);
9717 files_struct *file_find_di_next(files_struct *start_fsp);
9718 files_struct *file_find_print(void);
9719 void file_sync_all(connection_struct *conn);
9720 void file_free(files_struct *fsp);
9721 files_struct *file_fnum(uint16 fnum);
9722 files_struct *file_fsp(uint16 fid);
9723 void file_chain_reset(void);
9724 NTSTATUS dup_file_fsp(files_struct *fsp,
9725                                 uint32 access_mask,
9726                                 uint32 share_access,
9727                                 uint32 create_options,
9728                                 files_struct **result);
9729
9730 /* The following definitions come from smbd/ipc.c  */
9731
9732 void send_trans_reply(connection_struct *conn,
9733                       const uint8_t *inbuf,
9734                       char *rparam, int rparam_len,
9735                       char *rdata, int rdata_len,
9736                       bool buffer_too_large);
9737 void reply_trans(struct smb_request *req);
9738 void reply_transs(struct smb_request *req);
9739
9740 /* The following definitions come from smbd/lanman.c  */
9741
9742 void api_reply(connection_struct *conn, uint16 vuid,
9743                struct smb_request *req,
9744                char *data, char *params,
9745                int tdscnt, int tpscnt,
9746                int mdrcnt, int mprcnt);
9747
9748 /* The following definitions come from smbd/mangle.c  */
9749
9750 void mangle_reset_cache(void);
9751 void mangle_change_to_posix(void);
9752 bool mangle_is_mangled(const char *s, const struct share_params *p);
9753 bool mangle_is_8_3(const char *fname, bool check_case,
9754                    const struct share_params *p);
9755 bool mangle_is_8_3_wildcards(const char *fname, bool check_case,
9756                              const struct share_params *p);
9757 bool mangle_must_mangle(const char *fname,
9758                    const struct share_params *p);
9759 bool mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
9760                         const char *in,
9761                         char **out, /* talloced on the given context. */
9762                         const struct share_params *p);
9763 bool name_to_8_3(const char *in,
9764                 char out[13],
9765                 bool cache83,
9766                 const struct share_params *p);
9767
9768 /* The following definitions come from smbd/mangle_hash.c  */
9769
9770 struct mangle_fns *mangle_hash_init(void);
9771
9772 /* The following definitions come from smbd/mangle_hash2.c  */
9773
9774 struct mangle_fns *mangle_hash2_init(void);
9775 struct mangle_fns *posix_mangle_init(void);
9776
9777 /* The following definitions come from smbd/map_username.c  */
9778
9779 bool map_username(fstring user);
9780
9781 /* The following definitions come from smbd/message.c  */
9782
9783 void reply_sends(struct smb_request *req);
9784 void reply_sendstrt(struct smb_request *req);
9785 void reply_sendtxt(struct smb_request *req);
9786 void reply_sendend(struct smb_request *req);
9787
9788 /* The following definitions come from smbd/msdfs.c  */
9789
9790 bool is_msdfs_link(connection_struct *conn,
9791                 const char *path,
9792                 SMB_STRUCT_STAT *sbufp);
9793 NTSTATUS get_referred_path(TALLOC_CTX *ctx,
9794                         const char *dfs_path,
9795                         struct junction_map *jucn,
9796                         int *consumedcntp,
9797                         bool *self_referralp);
9798 int setup_dfs_referral(connection_struct *orig_conn,
9799                         const char *dfs_path,
9800                         int max_referral_level,
9801                         char **ppdata, NTSTATUS *pstatus);
9802 bool create_junction(TALLOC_CTX *ctx,
9803                 const char *dfs_path,
9804                 struct junction_map *jucn);
9805 bool create_msdfs_link(const struct junction_map *jucn);
9806 bool remove_msdfs_link(const struct junction_map *jucn);
9807 struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn);
9808 NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
9809                         connection_struct *conn,
9810                         bool dfs_pathnames,
9811                         const char *name_in,
9812                         char **pp_name_out);
9813 NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
9814                                 connection_struct *conn,
9815                                 bool dfs_pathnames,
9816                                 const char *name_in,
9817                                 char **pp_name_out,
9818                                 bool *ppath_contains_wcard);
9819 NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
9820                                 connection_struct **pconn,
9821                                 int snum,
9822                                 const char *path,
9823                             char **poldcwd);
9824
9825 /* The following definitions come from smbd/negprot.c  */
9826
9827 void reply_negprot(struct smb_request *req);
9828
9829 /* The following definitions come from smbd/notify.c  */
9830
9831 void change_notify_reply(connection_struct *conn,
9832                         const uint8 *request_buf, uint32 max_param,
9833                          struct notify_change_buf *notify_buf);
9834 NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
9835                               bool recursive);
9836 NTSTATUS change_notify_add_request(const struct smb_request *req,
9837                                 uint32 max_param,
9838                                 uint32 filter, bool recursive,
9839                                 struct files_struct *fsp);
9840 void remove_pending_change_notify_requests_by_mid(uint16 mid);
9841 void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
9842                                                   NTSTATUS status);
9843 void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
9844                   const char *path);
9845 char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter);
9846 struct sys_notify_context *sys_notify_context_create(connection_struct *conn,
9847                                                      TALLOC_CTX *mem_ctx, 
9848                                                      struct event_context *ev);
9849 NTSTATUS sys_notify_watch(struct sys_notify_context *ctx,
9850                           struct notify_entry *e,
9851                           void (*callback)(struct sys_notify_context *ctx, 
9852                                            void *private_data,
9853                                            struct notify_event *ev),
9854                           void *private_data, void *handle);
9855
9856 /* The following definitions come from smbd/notify_inotify.c  */
9857
9858 NTSTATUS inotify_watch(struct sys_notify_context *ctx,
9859                        struct notify_entry *e,
9860                        void (*callback)(struct sys_notify_context *ctx, 
9861                                         void *private_data,
9862                                         struct notify_event *ev),
9863                        void *private_data, 
9864                        void *handle_p);
9865
9866 /* The following definitions come from smbd/notify_internal.c  */
9867
9868 struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server, 
9869                                    struct messaging_context *messaging_ctx,
9870                                    struct event_context *ev,
9871                                    connection_struct *conn);
9872 NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0,
9873                     void (*callback)(void *, const struct notify_event *), 
9874                     void *private_data);
9875 NTSTATUS notify_remove(struct notify_context *notify, void *private_data);
9876 void notify_trigger(struct notify_context *notify,
9877                     uint32_t action, uint32_t filter, const char *path);
9878
9879 /* The following definitions come from smbd/ntquotas.c  */
9880
9881 int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9882 int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9883 int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list);
9884 void *init_quota_handle(TALLOC_CTX *mem_ctx);
9885
9886 /* The following definitions come from smbd/nttrans.c  */
9887
9888 void send_nt_replies(connection_struct *conn,
9889                         struct smb_request *req, NTSTATUS nt_error,
9890                      char *params, int paramsize,
9891                      char *pdata, int datasize);
9892 bool is_ntfs_stream_name(const char *fname);
9893 void reply_ntcreate_and_X(struct smb_request *req);
9894 void reply_ntcancel(struct smb_request *req);
9895 void reply_ntrename(struct smb_request *req);
9896 void reply_nttrans(struct smb_request *req);
9897 void reply_nttranss(struct smb_request *req);
9898
9899 /* The following definitions come from smbd/open.c  */
9900
9901 NTSTATUS fd_close(files_struct *fsp);
9902 bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func,
9903                                  uint32 *paccess_mask,
9904                                  uint32 *pshare_mode,
9905                                  uint32 *pcreate_disposition,
9906                                  uint32 *pcreate_options);
9907 NTSTATUS open_file_ntcreate(connection_struct *conn,
9908                             struct smb_request *req,
9909                             const char *fname,
9910                             SMB_STRUCT_STAT *psbuf,
9911                             uint32 access_mask,         /* access bits (FILE_READ_DATA etc.) */
9912                             uint32 share_access,        /* share constants (FILE_SHARE_READ etc) */
9913                             uint32 create_disposition,  /* FILE_OPEN_IF etc. */
9914                             uint32 create_options,      /* options such as delete on close. */
9915                             uint32 new_dos_attributes,  /* attributes used for new file. */
9916                             int oplock_request,         /* internal Samba oplock codes. */
9917                                                         /* Information (FILE_EXISTS etc.) */
9918                             int *pinfo,
9919                             files_struct **result);
9920 NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
9921                           SMB_STRUCT_STAT *psbuf, files_struct **result);
9922 NTSTATUS close_file_fchmod(files_struct *fsp);
9923 NTSTATUS open_directory(connection_struct *conn,
9924                         struct smb_request *req,
9925                         const char *fname,
9926                         SMB_STRUCT_STAT *psbuf,
9927                         uint32 access_mask,
9928                         uint32 share_access,
9929                         uint32 create_disposition,
9930                         uint32 create_options,
9931                         uint32 file_attributes,
9932                         int *pinfo,
9933                         files_struct **result);
9934 NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, const char *directory);
9935 void msg_file_was_renamed(struct messaging_context *msg,
9936                           void *private_data,
9937                           uint32_t msg_type,
9938                           struct server_id server_id,
9939                           DATA_BLOB *data);
9940 NTSTATUS create_file_unixpath(connection_struct *conn,
9941                               struct smb_request *req,
9942                               const char *fname,
9943                               uint32_t access_mask,
9944                               uint32_t share_access,
9945                               uint32_t create_disposition,
9946                               uint32_t create_options,
9947                               uint32_t file_attributes,
9948                               uint32_t oplock_request,
9949                               SMB_BIG_UINT allocation_size,
9950                               struct security_descriptor *sd,
9951                               struct ea_list *ea_list,
9952
9953                               files_struct **result,
9954                               int *pinfo,
9955                               SMB_STRUCT_STAT *psbuf);
9956 NTSTATUS create_file(connection_struct *conn,
9957                      struct smb_request *req,
9958                      uint16_t root_dir_fid,
9959                      const char *fname,
9960                      uint32_t access_mask,
9961                      uint32_t share_access,
9962                      uint32_t create_disposition,
9963                      uint32_t create_options,
9964                      uint32_t file_attributes,
9965                      uint32_t oplock_request,
9966                      SMB_BIG_UINT allocation_size,
9967                      struct security_descriptor *sd,
9968                      struct ea_list *ea_list,
9969
9970                      files_struct **result,
9971                      int *pinfo,
9972                      SMB_STRUCT_STAT *psbuf);
9973
9974 /* The following definitions come from smbd/oplock.c  */
9975
9976 int32 get_number_of_exclusive_open_oplocks(void);
9977 bool oplock_message_waiting(fd_set *fds);
9978 void process_kernel_oplocks(struct messaging_context *msg_ctx, fd_set *pfds);
9979 bool set_file_oplock(files_struct *fsp, int oplock_type);
9980 void release_file_oplock(files_struct *fsp);
9981 bool remove_oplock(files_struct *fsp);
9982 bool downgrade_oplock(files_struct *fsp);
9983 int oplock_notify_fd(void);
9984 void reply_to_oplock_break_requests(files_struct *fsp);
9985 void release_level_2_oplocks_on_change(files_struct *fsp);
9986 void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
9987 void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
9988 bool init_oplocks(struct messaging_context *msg_ctx);
9989
9990 /* The following definitions come from smbd/oplock_irix.c  */
9991
9992 struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
9993
9994 /* The following definitions come from smbd/oplock_linux.c  */
9995
9996 void linux_set_lease_capability(void);
9997 int linux_set_lease_sighandler(int fd);
9998 int linux_setlease(int fd, int leasetype);
9999 struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
10000
10001 /* The following definitions come from smbd/password.c  */
10002
10003 user_struct *get_valid_user_struct(uint16 vuid);
10004 bool is_partial_auth_vuid(uint16 vuid);
10005 user_struct *get_partial_auth_user_struct(uint16 vuid);
10006 void invalidate_vuid(uint16 vuid);
10007 void invalidate_all_vuids(void);
10008 int register_initial_vuid(void);
10009 int register_existing_vuid(uint16 vuid,
10010                         auth_serversupplied_info *server_info,
10011                         DATA_BLOB response_blob,
10012                         const char *smb_name);
10013 void add_session_user(const char *user);
10014 void add_session_workgroup(const char *workgroup);
10015 const char *get_session_workgroup(void);
10016 bool user_in_netgroup(const char *user, const char *ngname);
10017 bool user_in_list(const char *user,const char **list);
10018 bool authorise_login(int snum, fstring user, DATA_BLOB password,
10019                      bool *guest);
10020
10021 /* The following definitions come from smbd/pipes.c  */
10022
10023 void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req);
10024 void reply_pipe_write(struct smb_request *req);
10025 void reply_pipe_write_and_X(struct smb_request *req);
10026 void reply_pipe_read_and_X(struct smb_request *req);
10027 void reply_pipe_close(connection_struct *conn, struct smb_request *req);
10028
10029 /* The following definitions come from smbd/posix_acls.c  */
10030
10031 NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, SEC_DESC *psd);
10032 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
10033 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
10034                            SEC_DESC **ppdesc);
10035 NTSTATUS posix_get_nt_acl(struct connection_struct *conn, const char *name,
10036                           uint32_t security_info, SEC_DESC **ppdesc);
10037 int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid);
10038 NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd);
10039 int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode );
10040 int chmod_acl(connection_struct *conn, const char *name, mode_t mode);
10041 int inherit_access_posix_acl(connection_struct *conn, const char *inherit_from_dir,
10042                        const char *name, mode_t mode);
10043 int fchmod_acl(files_struct *fsp, mode_t mode);
10044 bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf,
10045                                 uint16 num_def_acls, const char *pdata);
10046 bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata);
10047 SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname);
10048
10049 /* The following definitions come from smbd/process.c  */
10050
10051 bool srv_send_smb(int fd, char *buffer, bool do_encrypt);
10052 int srv_set_message(char *buf,
10053                         int num_words,
10054                         int num_bytes,
10055                         bool zero);
10056 void init_smb_request(struct smb_request *req,
10057                         const uint8 *inbuf,
10058                         size_t unread_bytes,
10059                         bool encrypted);
10060 void remove_deferred_open_smb_message(uint16 mid);
10061 void schedule_deferred_open_smb_message(uint16 mid);
10062 bool open_was_deferred(uint16 mid);
10063 struct pending_message_list *get_open_deferred_message(uint16 mid);
10064 bool push_deferred_smb_message(struct smb_request *req,
10065                                struct timeval request_time,
10066                                struct timeval timeout,
10067                                char *private_data, size_t priv_len);
10068 struct idle_event *event_add_idle(struct event_context *event_ctx,
10069                                   TALLOC_CTX *mem_ctx,
10070                                   struct timeval interval,
10071                                   const char *name,
10072                                   bool (*handler)(const struct timeval *now,
10073                                                   void *private_data),
10074                                   void *private_data);
10075 NTSTATUS allow_new_trans(struct trans_state *list, int mid);
10076 void respond_to_all_remaining_local_messages(void);
10077 bool create_outbuf(TALLOC_CTX *mem_ctx, const char *inbuf, char **outbuf,
10078                    uint8_t num_words, uint32_t num_bytes);
10079 void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
10080 const char *smb_fn_name(int type);
10081 void add_to_common_flags2(uint32 v);
10082 void remove_from_common_flags2(uint32 v);
10083 void construct_reply_common(const char *inbuf, char *outbuf);
10084 void chain_reply(struct smb_request *req);
10085 void check_reload(time_t t);
10086 void smbd_process(void);
10087
10088 /* The following definitions come from smbd/quotas.c  */
10089
10090 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10091 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10092 bool disk_quotas(const char *path,
10093                 SMB_BIG_UINT *bsize,
10094                 SMB_BIG_UINT *dfree,
10095                 SMB_BIG_UINT *dsize);
10096 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10097 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10098 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10099 bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10100 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
10101 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
10102
10103 /* The following definitions come from smbd/reply.c  */
10104
10105 NTSTATUS check_path_syntax(char *path);
10106 NTSTATUS check_path_syntax_wcard(char *path, bool *p_contains_wcard);
10107 NTSTATUS check_path_syntax_posix(char *path);
10108 size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
10109                         const char *inbuf,
10110                         uint16 smb_flags2,
10111                         char **pp_dest,
10112                         const char *src,
10113                         size_t src_len,
10114                         int flags,
10115                         NTSTATUS *err,
10116                         bool *contains_wcard);
10117 size_t srvstr_get_path(TALLOC_CTX *ctx,
10118                         const char *inbuf,
10119                         uint16 smb_flags2,
10120                         char **pp_dest,
10121                         const char *src,
10122                         size_t src_len,
10123                         int flags,
10124                         NTSTATUS *err);
10125 bool check_fsp_open(connection_struct *conn, struct smb_request *req,
10126                     files_struct *fsp);
10127 bool check_fsp(connection_struct *conn, struct smb_request *req,
10128                files_struct *fsp);
10129 bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
10130                               files_struct *fsp);
10131 bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
10132                       files_struct *fsp);
10133 void reply_special(char *inbuf);
10134 void reply_tcon(struct smb_request *req);
10135 void reply_tcon_and_X(struct smb_request *req);
10136 void reply_unknown_new(struct smb_request *req, uint8 type);
10137 void reply_ioctl(struct smb_request *req);
10138 void reply_checkpath(struct smb_request *req);
10139 void reply_getatr(struct smb_request *req);
10140 void reply_setatr(struct smb_request *req);
10141 void reply_dskattr(struct smb_request *req);
10142 void reply_search(struct smb_request *req);
10143 void reply_fclose(struct smb_request *req);
10144 void reply_open(struct smb_request *req);
10145 void reply_open_and_X(struct smb_request *req);
10146 void reply_ulogoffX(struct smb_request *req);
10147 void reply_mknew(struct smb_request *req);
10148 void reply_ctemp(struct smb_request *req);
10149 NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
10150                           uint32 dirtype, const char *name_in, bool has_wild);
10151 void reply_unlink(struct smb_request *req);
10152 void send_file_readbraw(connection_struct *conn,
10153                         files_struct *fsp,
10154                         SMB_OFF_T startpos,
10155                         size_t nread,
10156                         ssize_t mincount);
10157 void reply_readbraw(struct smb_request *req);
10158 void reply_lockread(struct smb_request *req);
10159 void reply_read(struct smb_request *req);
10160 void reply_read_and_X(struct smb_request *req);
10161 void error_to_writebrawerr(struct smb_request *req);
10162 void reply_writebraw(struct smb_request *req);
10163 void reply_writeunlock(struct smb_request *req);
10164 void reply_write(struct smb_request *req);
10165 bool is_valid_writeX_buffer(const uint8_t *inbuf);
10166 void reply_write_and_X(struct smb_request *req);
10167 void reply_lseek(struct smb_request *req);
10168 void reply_flush(struct smb_request *req);
10169 void reply_exit(struct smb_request *req);
10170 void reply_close(struct smb_request *req);
10171 void reply_writeclose(struct smb_request *req);
10172 void reply_lock(struct smb_request *req);
10173 void reply_unlock(struct smb_request *req);
10174 void reply_tdis(struct smb_request *req);
10175 void reply_echo(struct smb_request *req);
10176 void reply_printopen(struct smb_request *req);
10177 void reply_printclose(struct smb_request *req);
10178 void reply_printqueue(struct smb_request *req);
10179 void reply_printwrite(struct smb_request *req);
10180 void reply_mkdir(struct smb_request *req);
10181 NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
10182                         connection_struct *conn,
10183                         const char *directory);
10184 void reply_rmdir(struct smb_request *req);
10185 NTSTATUS rename_internals_fsp(connection_struct *conn,
10186                         files_struct *fsp,
10187                         char *newname,
10188                         const char *newname_last_component,
10189                         uint32 attrs,
10190                         bool replace_if_exists);
10191 NTSTATUS rename_internals(TALLOC_CTX *ctx,
10192                         connection_struct *conn,
10193                         struct smb_request *req,
10194                         const char *name_in,
10195                         const char *newname_in,
10196                         uint32 attrs,
10197                         bool replace_if_exists,
10198                         bool src_has_wild,
10199                         bool dest_has_wild,
10200                         uint32_t access_mask);
10201 void reply_mv(struct smb_request *req);
10202 NTSTATUS copy_file(TALLOC_CTX *ctx,
10203                         connection_struct *conn,
10204                         const char *src,
10205                         const char *dest1,
10206                         int ofun,
10207                         int count,
10208                         bool target_is_directory);
10209 void reply_copy(struct smb_request *req);
10210 uint32 get_lock_pid( char *data, int data_offset, bool large_file_format);
10211 SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format);
10212 SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err);
10213 void reply_lockingX(struct smb_request *req);
10214 void reply_readbmpx(struct smb_request *req);
10215 void reply_readbs(struct smb_request *req);
10216 void reply_setattrE(struct smb_request *req);
10217 void reply_writebmpx(struct smb_request *req);
10218 void reply_writebs(struct smb_request *req);
10219 void reply_getattrE(struct smb_request *req);
10220
10221 /* The following definitions come from smbd/seal.c  */
10222
10223 uint16_t srv_enc_ctx(void);
10224 bool is_encrypted_packet(const uint8_t *inbuf);
10225 void srv_free_enc_buffer(char *buf);
10226 NTSTATUS srv_decrypt_buffer(char *buf);
10227 NTSTATUS srv_encrypt_buffer(char *buf, char **buf_out);
10228 NTSTATUS srv_request_encryption_setup(connection_struct *conn,
10229                                         unsigned char **ppdata,
10230                                         size_t *p_data_size,
10231                                         unsigned char **pparam,
10232                                         size_t *p_param_size);
10233 NTSTATUS srv_encryption_start(connection_struct *conn);
10234 void server_encryption_shutdown(void);
10235
10236 /* The following definitions come from smbd/sec_ctx.c  */
10237
10238 bool unix_token_equal(const UNIX_USER_TOKEN *t1, const UNIX_USER_TOKEN *t2);
10239 bool push_sec_ctx(void);
10240 void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN *token);
10241 void set_root_sec_ctx(void);
10242 bool pop_sec_ctx(void);
10243 void init_sec_ctx(void);
10244
10245 /* The following definitions come from smbd/server.c  */
10246
10247 int smbd_server_fd(void);
10248 int get_client_fd(void);
10249 int client_get_tcp_info(struct sockaddr_in *server, struct sockaddr_in *client);
10250 struct event_context *smbd_event_context(void);
10251 struct messaging_context *smbd_messaging_context(void);
10252 struct memcache *smbd_memcache(void);
10253 void reload_printers(void);
10254 bool reload_services(bool test);
10255 void exit_server(const char *const explanation);
10256 void exit_server_cleanly(const char *const explanation);
10257 void exit_server_fault(void);
10258
10259 /* The following definitions come from smbd/service.c  */
10260
10261 bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
10262 bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
10263 void load_registry_shares(void);
10264 int add_home_service(const char *service, const char *username, const char *homedir);
10265 int find_service(fstring service);
10266 connection_struct *make_connection_with_chdir(const char *service_in,
10267                                               DATA_BLOB password, 
10268                                               const char *dev, uint16 vuid,
10269                                               NTSTATUS *status);
10270 connection_struct *make_connection(const char *service_in, DATA_BLOB password, 
10271                                    const char *pdev, uint16 vuid,
10272                                    NTSTATUS *status);
10273 void close_cnum(connection_struct *conn, uint16 vuid);
10274
10275 /* The following definitions come from smbd/session.c  */
10276
10277 bool session_init(void);
10278 bool session_claim(user_struct *vuser);
10279 void session_yield(user_struct *vuser);
10280 int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
10281
10282 /* The following definitions come from smbd/sesssetup.c  */
10283
10284 NTSTATUS parse_spnego_mechanisms(DATA_BLOB blob_in,
10285                 DATA_BLOB *pblob_out,
10286                 char **kerb_mechOID);
10287 void reply_sesssetup_and_X(struct smb_request *req);
10288
10289 /* The following definitions come from smbd/share_access.c  */
10290
10291 bool token_contains_name_in_list(const char *username,
10292                                  const char *domain,
10293                                  const char *sharename,
10294                                  const struct nt_user_token *token,
10295                                  const char **list);
10296 bool user_ok_token(const char *username, const char *domain,
10297                    struct nt_user_token *token, int snum);
10298 bool is_share_read_only_for_token(const char *username,
10299                                   const char *domain,
10300                                   struct nt_user_token *token, int snum);
10301
10302 /* The following definitions come from smbd/srvstr.c  */
10303
10304 size_t srvstr_push_fn(const char *function, unsigned int line,
10305                       const char *base_ptr, uint16 smb_flags2, void *dest,
10306                       const char *src, int dest_len, int flags);
10307 ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);
10308
10309 /* The following definitions come from smbd/statcache.c  */
10310
10311 void stat_cache_add( const char *full_orig_name,
10312                 char *translated_path,
10313                 bool case_sensitive);
10314 bool stat_cache_lookup(connection_struct *conn,
10315                         char **pp_name,
10316                         char **pp_dirpath,
10317                         char **pp_start,
10318                         SMB_STRUCT_STAT *pst);
10319 void send_stat_cache_delete_message(const char *name);
10320 void stat_cache_delete(const char *name);
10321 unsigned int fast_string_hash(TDB_DATA *key);
10322 bool reset_stat_cache( void );
10323
10324 /* The following definitions come from smbd/statvfs.c  */
10325
10326 int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
10327
10328 /* The following definitions come from smbd/trans2.c  */
10329
10330 SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val);
10331 SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
10332 NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
10333                       files_struct *fsp, const char *fname,
10334                       const char *ea_name, struct ea_struct *pea);
10335 NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
10336                                 files_struct *fsp, const char *fname,
10337                                 char ***pnames, size_t *pnum_names);
10338 NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, struct ea_list *ea_list);
10339 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used);
10340 void send_trans2_replies(connection_struct *conn,
10341                         struct smb_request *req,
10342                          const char *params,
10343                          int paramsize,
10344                          const char *pdata,
10345                          int datasize,
10346                          int max_data_bytes);
10347 unsigned char *create_volume_objectid(connection_struct *conn, unsigned char objid[16]);
10348 NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
10349                 connection_struct *conn,
10350                 const char *oldname_in,
10351                 const char *newname_in);
10352 NTSTATUS smb_set_file_time(connection_struct *conn,
10353                            files_struct *fsp,
10354                            const char *fname,
10355                            const SMB_STRUCT_STAT *psbuf,
10356                            struct timespec ts[2],
10357                            bool setting_write_time);
10358 void reply_findclose(struct smb_request *req);
10359 void reply_findnclose(struct smb_request *req);
10360 void reply_trans2(struct smb_request *req);
10361 void reply_transs2(struct smb_request *req);
10362
10363 /* The following definitions come from smbd/uid.c  */
10364
10365 bool change_to_guest(void);
10366 void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
10367 bool change_to_user(connection_struct *conn, uint16 vuid);
10368 bool change_to_root_user(void);
10369 bool become_authenticated_pipe_user(pipes_struct *p);
10370 bool unbecome_authenticated_pipe_user(void);
10371 void become_root(void);
10372 void unbecome_root(void);
10373 bool become_user(connection_struct *conn, uint16 vuid);
10374 bool unbecome_user(void);
10375
10376 /* The following definitions come from smbd/utmp.c  */
10377
10378 void sys_utmp_claim(const char *username, const char *hostname,
10379                         const char *ip_addr_str,
10380                         const char *id_str, int id_num);
10381 void sys_utmp_yield(const char *username, const char *hostname,
10382                         const char *ip_addr_str,
10383                         const char *id_str, int id_num);
10384 void sys_utmp_yield(const char *username, const char *hostname,
10385                         const char *ip_addr_str,
10386                         const char *id_str, int id_num);
10387 void sys_utmp_claim(const char *username, const char *hostname,
10388                         const char *ip_addr_str,
10389                         const char *id_str, int id_num);
10390
10391 /* The following definitions come from smbd/vfs.c  */
10392
10393 NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs_op_tuples);
10394 bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
10395 void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, size_t ext_size);
10396 void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10397 void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10398 void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10399 bool smbd_vfs_init(connection_struct *conn);
10400 bool vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
10401 bool vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf);
10402 bool vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
10403 ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
10404 ssize_t vfs_pread_data(files_struct *fsp, char *buf,
10405                 size_t byte_count, SMB_OFF_T offset);
10406 ssize_t vfs_write_data(struct smb_request *req,
10407                         files_struct *fsp,
10408                         const char *buffer,
10409                         size_t N);
10410 ssize_t vfs_pwrite_data(struct smb_request *req,
10411                         files_struct *fsp,
10412                         const char *buffer,
10413                         size_t N,
10414                         SMB_OFF_T offset);
10415 int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
10416 int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
10417 int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len);
10418 SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
10419 char *vfs_readdirname(connection_struct *conn, void *p);
10420 int vfs_ChDir(connection_struct *conn, const char *path);
10421 char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn);
10422 NTSTATUS check_reduced_name(connection_struct *conn, const char *fname);
10423
10424 /* The following definitions come from torture/denytest.c  */
10425
10426 bool torture_denytest1(int dummy);
10427 bool torture_denytest2(int dummy);
10428
10429 /* The following definitions come from torture/mangle_test.c  */
10430
10431 bool torture_mangle(int dummy);
10432
10433 /* The following definitions come from torture/nbio.c  */
10434
10435 double nbio_total(void);
10436 void nb_alarm(int ignore);
10437 void nbio_shmem(int n);
10438 void nb_setup(struct cli_state *cli);
10439 void nb_unlink(const char *fname);
10440 void nb_createx(const char *fname, 
10441                 unsigned create_options, unsigned create_disposition, int handle);
10442 void nb_writex(int handle, int offset, int size, int ret_size);
10443 void nb_readx(int handle, int offset, int size, int ret_size);
10444 void nb_close(int handle);
10445 void nb_rmdir(const char *fname);
10446 void nb_rename(const char *oldname, const char *newname);
10447 void nb_qpathinfo(const char *fname);
10448 void nb_qfileinfo(int fnum);
10449 void nb_qfsinfo(int level);
10450 void nb_findfirst(const char *mask);
10451 void nb_flush(int fnum);
10452 void nb_deltree(const char *dname);
10453 void nb_cleanup(void);
10454
10455 /* The following definitions come from torture/scanner.c  */
10456
10457 bool torture_trans2_scan(int dummy);
10458 bool torture_nttrans_scan(int dummy);
10459
10460 /* The following definitions come from torture/torture.c  */
10461
10462 void start_timer(void);
10463 double end_timer(void);
10464 void *shm_setup(int size);
10465 bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
10466                       char **hostname, char **sharename);
10467 void torture_open_connection_free_unclist(char **unc_list);
10468 bool torture_open_connection(struct cli_state **c, int conn_index);
10469 bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid);
10470 bool torture_close_connection(struct cli_state *c);
10471 bool torture_ioctl_test(int dummy);
10472 bool torture_chkpath_test(int dummy);
10473
10474 /* The following definitions come from torture/utable.c  */
10475
10476 bool torture_utable(int dummy);
10477 bool torture_casetable(int dummy);
10478
10479 /* The following definitions come from utils/passwd_util.c  */
10480
10481 char *stdin_new_passwd( void);
10482 char *get_pass( const char *prompt, bool stdin_get);
10483
10484 /* The following definitions come from winbindd/idmap.c  */
10485
10486 bool idmap_is_offline(void);
10487 bool idmap_is_online(void);
10488 NTSTATUS smb_register_idmap(int version, const char *name,
10489                             struct idmap_methods *methods);
10490 NTSTATUS smb_register_idmap_alloc(int version, const char *name,
10491                                   struct idmap_alloc_methods *methods);
10492 void idmap_close(void);
10493 NTSTATUS idmap_init_cache(void);
10494 NTSTATUS idmap_allocate_uid(struct unixid *id);
10495 NTSTATUS idmap_allocate_gid(struct unixid *id);
10496 NTSTATUS idmap_set_uid_hwm(struct unixid *id);
10497 NTSTATUS idmap_set_gid_hwm(struct unixid *id);
10498 NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
10499                                       struct id_map *id);
10500 NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
10501                                       struct id_map *id);
10502 NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
10503                            struct unixid *pxid);
10504 NTSTATUS idmap_set_mapping(const struct id_map *map);
10505
10506 /* The following definitions come from winbindd/idmap_cache.c  */
10507
10508 bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid,
10509                               bool *expired);
10510 bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired);
10511 void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid);
10512 bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid,
10513                               bool *expired);
10514 bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired);
10515 void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid);
10516
10517
10518 /* The following definitions come from winbindd/idmap_nss.c  */
10519
10520 NTSTATUS idmap_nss_init(void);
10521
10522 /* The following definitions come from winbindd/idmap_passdb.c  */
10523
10524 NTSTATUS idmap_passdb_init(void);
10525
10526 /* The following definitions come from winbindd/idmap_tdb.c  */
10527
10528 bool idmap_tdb_tdb_close(TDB_CONTEXT *tdbctx);
10529 NTSTATUS idmap_alloc_tdb_init(void);
10530 NTSTATUS idmap_tdb_init(void);
10531
10532 /* The following definitions come from winbindd/idmap_util.c  */
10533
10534 NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid);
10535 NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid);
10536 NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID *sid, uid_t *uid);
10537 NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid);
10538
10539 /* The following definitions come from winbindd/nss_info.c  */
10540
10541
10542 /* The following definitions come from winbindd/nss_info_template.c  */
10543
10544 NTSTATUS nss_info_template_init( void );
10545
10546 #endif /*  _PROTO_H_  */