lib/access: make client_match() public.
[ira/wip.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 dynconfig.c  */
186
187 const char *get_dyn_CONFIGFILE(void);
188 const char *set_dyn_CONFIGFILE(const char *newpath);
189 const char *get_dyn_LOGFILEBASE(void);
190 const char *set_dyn_LOGFILEBASE(const char *newpath);
191 const char *get_dyn_LMHOSTSFILE(void);
192 const char *set_dyn_LMHOSTSFILE(const char *newpath);
193 const char *get_dyn_CODEPAGEDIR(void);
194 const char *set_dyn_CODEPAGEDIR(const char *newpath);
195 const char *get_dyn_LIBDIR(void);
196 const char *set_dyn_LIBDIR(const char *newpath);
197 const char *get_dyn_SHLIBEXT(void);
198 const char *set_dyn_SHLIBEXT(const char *newpath);
199 const char *get_dyn_LOCKDIR(void);
200 const char *set_dyn_LOCKDIR(const char *newpath);
201 const char *get_dyn_PIDDIR(void);
202 const char *set_dyn_PIDDIR(const char *newpath);
203 const char *get_dyn_SMB_PASSWD_FILE(void);
204 const char *set_dyn_SMB_PASSWD_FILE(const char *newpath);
205 const char *get_dyn_PRIVATE_DIR(void);
206 const char *set_dyn_PRIVATE_DIR(const char *newpath);
207 const char *get_dyn_STATEDIR(void);
208 const char *get_dyn_CACHEDIR(void);
209
210 /* The following definitions come from groupdb/mapping.c  */
211
212 NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
213 bool get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map);
214 int smb_create_group(const char *unix_group, gid_t *new_gid);
215 int smb_delete_group(const char *unix_group);
216 int smb_set_primary_group(const char *unix_group, const char* unix_user);
217 int smb_add_user_group(const char *unix_group, const char *unix_user);
218 int smb_delete_user_group(const char *unix_group, const char *unix_user);
219 NTSTATUS pdb_default_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
220                                  DOM_SID sid);
221 NTSTATUS pdb_default_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
222                                  gid_t gid);
223 NTSTATUS pdb_default_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
224                                  const char *name);
225 NTSTATUS pdb_default_add_group_mapping_entry(struct pdb_methods *methods,
226                                                 GROUP_MAP *map);
227 NTSTATUS pdb_default_update_group_mapping_entry(struct pdb_methods *methods,
228                                                    GROUP_MAP *map);
229 NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
230                                                    DOM_SID sid);
231 NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
232                                            const DOM_SID *sid, enum lsa_SidType sid_name_use,
233                                            GROUP_MAP **pp_rmap, size_t *p_num_entries,
234                                            bool unix_only);
235 NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
236                                   const char *name, uint32 *rid);
237 NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods,
238                                   const DOM_SID *sid);
239 NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
240                                    const DOM_SID *sid,
241                                    struct acct_info *info);
242 NTSTATUS pdb_default_set_aliasinfo(struct pdb_methods *methods,
243                                    const DOM_SID *sid,
244                                    struct acct_info *info);
245 NTSTATUS pdb_default_add_aliasmem(struct pdb_methods *methods,
246                                   const DOM_SID *alias, const DOM_SID *member);
247 NTSTATUS pdb_default_del_aliasmem(struct pdb_methods *methods,
248                                   const DOM_SID *alias, const DOM_SID *member);
249 NTSTATUS pdb_default_enum_aliasmem(struct pdb_methods *methods,
250                                    const DOM_SID *alias, DOM_SID **pp_members,
251                                    size_t *p_num_members);
252 NTSTATUS pdb_default_alias_memberships(struct pdb_methods *methods,
253                                        TALLOC_CTX *mem_ctx,
254                                        const DOM_SID *domain_sid,
255                                        const DOM_SID *members,
256                                        size_t num_members,
257                                        uint32 **pp_alias_rids,
258                                        size_t *p_num_alias_rids);
259 NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
260                                  DOM_SID sid);
261 NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
262                                  gid_t gid);
263 NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
264                                  const char *name);
265 NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
266                                                 GROUP_MAP *map);
267 NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
268                                                    GROUP_MAP *map);
269 NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
270                                                    DOM_SID sid);
271 NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
272                                            enum lsa_SidType sid_name_use,
273                                            GROUP_MAP **rmap, size_t *num_entries,
274                                            bool unix_only);
275 bool pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info);
276 bool pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info);
277 NTSTATUS pdb_create_builtin_alias(uint32 rid);
278
279 /* The following definitions come from groupdb/mapping_ldb.c  */
280
281 const struct mapping_backend *groupdb_ldb_init(void);
282
283 /* The following definitions come from groupdb/mapping_tdb.c  */
284
285 const struct mapping_backend *groupdb_tdb_init(void);
286
287 /* The following definitions come from intl/lang_tdb.c  */
288
289 bool lang_tdb_init(const char *lang);
290 const char *lang_msg(const char *msgid);
291 void lang_msg_free(const char *msgstr);
292 char *lang_tdb_current(void);
293
294 /* The following definitions come from lib/access.c  */
295
296 bool client_match(const char *tok, const void *item);
297 bool allow_access(const char **deny_list,
298                 const char **allow_list,
299                 const char *cname,
300                 const char *caddr);
301 bool check_access(int sock, const char **allow_list, const char **deny_list);
302
303 /* The following definitions come from lib/account_pol.c  */
304
305 void account_policy_names_list(const char ***names, int *num_names);
306 const char *decode_account_policy_name(int field);
307 const char *get_account_policy_attr(int field);
308 const char *account_policy_get_desc(int field);
309 int account_policy_name_to_fieldnum(const char *name);
310 bool account_policy_get_default(int account_policy, uint32 *val);
311 bool init_account_policy(void);
312 bool account_policy_get(int field, uint32 *value);
313 bool account_policy_set(int field, uint32 value);
314 bool cache_account_policy_set(int field, uint32 value);
315 bool cache_account_policy_get(int field, uint32 *value);
316 struct db_context *get_account_pol_db( void );
317
318 /* The following definitions come from lib/adt_tree.c  */
319
320
321 /* The following definitions come from lib/afs.c  */
322
323 char *afs_createtoken_str(const char *username, const char *cell);
324 bool afs_login(connection_struct *conn);
325 bool afs_login(connection_struct *conn);
326 char *afs_createtoken_str(const char *username, const char *cell);
327
328 /* The following definitions come from lib/afs_settoken.c  */
329
330 int afs_syscall( int subcall,
331           char * path,
332           int cmd,
333           char * cmarg,
334           int follow);
335 bool afs_settoken_str(const char *token_string);
336 bool afs_settoken_str(const char *token_string);
337
338 /* The following definitions come from lib/arc4.c  */
339
340 void smb_arc4_init(unsigned char arc4_state_out[258], const unsigned char *key, size_t keylen);
341 void smb_arc4_crypt(unsigned char arc4_state_inout[258], unsigned char *data, size_t len);
342
343 /* The following definitions come from lib/audit.c  */
344
345 const char *audit_category_str(uint32 category);
346 const char *audit_param_str(uint32 category);
347 const char *audit_description_str(uint32 category);
348 bool get_audit_category_from_param(const char *param, uint32 *audit_category);
349 const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
350
351 /* The following definitions come from lib/bitmap.c  */
352
353 struct bitmap *bitmap_allocate(int n);
354 void bitmap_free(struct bitmap *bm);
355 struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
356 int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
357 bool bitmap_set(struct bitmap *bm, unsigned i);
358 bool bitmap_clear(struct bitmap *bm, unsigned i);
359 bool bitmap_query(struct bitmap *bm, unsigned i);
360 int bitmap_find(struct bitmap *bm, unsigned ofs);
361
362 /* The following definitions come from lib/charcnv.c  */
363
364 char lp_failed_convert_char(void);
365 void lazy_initialize_conv(void);
366 void gfree_charcnv(void);
367 void init_iconv(void);
368 size_t convert_string(charset_t from, charset_t to,
369                       void const *src, size_t srclen, 
370                       void *dest, size_t destlen, bool allow_bad_conv);
371 bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
372                              void const *src, size_t srclen, void *dst,
373                              size_t *converted_size, bool allow_bad_conv);
374 bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to,
375                            void const *src, size_t srclen, void *dst,
376                            size_t *converted_size, bool allow_bad_conv);
377 size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
378 char *strdup_upper(const char *s);
379 char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s);
380 size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen);
381 char *strdup_lower(const char *s);
382 char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s);
383 size_t ucs2_align(const void *base_ptr, const void *p, int flags);
384 size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags);
385 size_t push_ascii_fstring(void *dest, const char *src);
386 size_t push_ascii_nstring(void *dest, const char *src);
387 bool push_ascii_allocate(char **dest, const char *src, size_t *converted_size);
388 size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
389 size_t pull_ascii_fstring(char *dest, const void *src);
390 size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src);
391 size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_len, int flags);
392 bool push_ucs2_allocate(smb_ucs2_t **dest, const char *src,
393                         size_t *converted_size);
394 size_t push_utf8_fstring(void *dest, const char *src);
395 bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
396                       size_t *converted_size);
397 bool push_utf8_allocate(char **dest, const char *src, size_t *converted_size);
398 size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
399 size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
400                         const void *base_ptr,
401                         char **ppdest,
402                         const void *src,
403                         size_t src_len,
404                         int flags);
405 size_t pull_ucs2_fstring(char *dest, const void *src);
406 bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
407                       size_t *converted_size);
408 bool pull_ucs2_allocate(char **dest, const smb_ucs2_t *src,
409                         size_t *converted_size);
410 bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
411                       size_t *converted_size);
412 bool pull_utf8_allocate(char **dest, const char *src, size_t *converted_size);
413 bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src,
414                       size_t *converted_size);
415 bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
416                        size_t *converted_size);
417 size_t push_string_fn(const char *function, unsigned int line,
418                       const void *base_ptr, uint16 flags2,
419                       void *dest, const char *src,
420                       size_t dest_len, int flags);
421 size_t pull_string_fn(const char *function,
422                         unsigned int line,
423                         const void *base_ptr,
424                         uint16 smb_flags2,
425                         char *dest,
426                         const void *src,
427                         size_t dest_len,
428                         size_t src_len,
429                         int flags);
430 size_t pull_string_talloc_fn(const char *function,
431                         unsigned int line,
432                         TALLOC_CTX *ctx,
433                         const void *base_ptr,
434                         uint16 smb_flags2,
435                         char **ppdest,
436                         const void *src,
437                         size_t src_len,
438                         int flags);
439 size_t align_string(const void *base_ptr, const char *p, int flags);
440 codepoint_t next_codepoint(const char *str, size_t *size);
441
442 /* The following definitions come from lib/clobber.c  */
443
444 void clobber_region(const char *fn, unsigned int line, char *dest, size_t len);
445
446 /* The following definitions come from lib/conn_tdb.c  */
447
448 struct db_record *connections_fetch_record(TALLOC_CTX *mem_ctx,
449                                            TDB_DATA key);
450 struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
451                                           connection_struct *conn,
452                                           const char *name);
453 int connections_traverse(int (*fn)(struct db_record *rec,
454                                    void *private_data),
455                          void *private_data);
456 int connections_forall(int (*fn)(struct db_record *rec,
457                                  const struct connections_key *key,
458                                  const struct connections_data *data,
459                                  void *private_data),
460                        void *private_data);
461 bool connections_init(bool rw);
462
463 /* The following definitions come from lib/crc32.c  */
464
465 uint32 crc32_calc_buffer(const char *buf, size_t size);
466
467 /* The following definitions come from lib/data_blob.c  */
468
469 DATA_BLOB data_blob(const void *p, size_t length);
470 DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
471 void data_blob_free(DATA_BLOB *d);
472 void data_blob_clear(DATA_BLOB *d);
473 void data_blob_clear_free(DATA_BLOB *d);
474 DATA_BLOB data_blob_string_const(const char *str);
475 DATA_BLOB data_blob_const(const void *p, size_t length);
476 DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length);
477 _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
478
479 /* The following definitions come from lib/dbwrap_util.c  */
480
481 int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
482 int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
483 bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
484                          uint32_t *val);
485 bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
486 uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
487                                      uint32_t *oldval, uint32_t change_val);
488 int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
489                                  int32 *oldval, int32 change_val);
490 NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
491                             int flag);
492 NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key);
493 NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr,
494                                   int32_t v);
495 NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr,
496                                    uint32_t v);
497 NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key,
498                                      TDB_DATA data, int flags);
499 NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key);
500
501 /* The following definitions come from lib/debug.c  */
502
503 void gfree_debugsyms(void);
504 const char *debug_classname_from_index(int ndx);
505 int debug_add_class(const char *classname);
506 int debug_lookup_classname(const char *classname);
507 bool debug_parse_levels(const char *params_str);
508 void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data);
509 void debug_init(void);
510 void debug_register_msgs(struct messaging_context *msg_ctx);
511 void setup_logging(const char *pname, bool interactive);
512 void debug_set_logfile(const char *name);
513 bool reopen_logs( void );
514 void force_check_log_size( void );
515 bool need_to_check_log_size( void );
516 void check_log_size( void );
517 void dbgflush( void );
518 bool dbghdr(int level, int cls, const char *file, const char *func, int line);
519 TALLOC_CTX *debug_ctx(void);
520
521 /* The following definitions come from lib/display_sec.c  */
522
523 char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type);
524 void display_sec_access(SEC_ACCESS *info);
525 void display_sec_ace_flags(uint8_t flags);
526 void display_sec_ace(SEC_ACE *ace);
527 void display_sec_acl(SEC_ACL *sec_acl);
528 void display_acl_type(uint16 type);
529 void display_sec_desc(SEC_DESC *sec);
530
531 /* The following definitions come from lib/dmallocmsg.c  */
532
533 void register_dmalloc_msgs(struct messaging_context *msg_ctx);
534
535 /* The following definitions come from lib/dprintf.c  */
536
537 void display_set_stderr(void);
538
539 /* The following definitions come from lib/errmap_unix.c  */
540
541 NTSTATUS map_nt_error_from_unix(int unix_error);
542
543 /* The following definitions come from lib/events.c  */
544
545 struct timed_event *event_add_timed(struct event_context *event_ctx,
546                                 TALLOC_CTX *mem_ctx,
547                                 struct timeval when,
548                                 const char *event_name,
549                                 void (*handler)(struct event_context *event_ctx,
550                                                 struct timed_event *te,
551                                                 const struct timeval *now,
552                                                 void *private_data),
553                                 void *private_data);
554 struct fd_event *event_add_fd(struct event_context *event_ctx,
555                               TALLOC_CTX *mem_ctx,
556                               int fd, uint16_t flags,
557                               void (*handler)(struct event_context *event_ctx,
558                                               struct fd_event *event,
559                                               uint16 flags,
560                                               void *private_data),
561                               void *private_data);
562 void event_fd_set_writeable(struct fd_event *fde);
563 void event_fd_set_not_writeable(struct fd_event *fde);
564 void event_fd_set_readable(struct fd_event *fde);
565 void event_fd_set_not_readable(struct fd_event *fde);
566 bool event_add_to_select_args(struct event_context *event_ctx,
567                               const struct timeval *now,
568                               fd_set *read_fds, fd_set *write_fds,
569                               struct timeval *timeout, int *maxfd);
570 bool events_pending(struct event_context *event_ctx);
571 bool run_events(struct event_context *event_ctx,
572                 int selrtn, fd_set *read_fds, fd_set *write_fds);
573 struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
574                                          struct timeval *to_ret);
575 int event_loop_once(struct event_context *ev);
576 struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
577 int set_event_dispatch_time(struct event_context *event_ctx,
578                             const char *event_name, struct timeval when);
579 int cancel_named_event(struct event_context *event_ctx,
580                        const char *event_name);
581 void dump_event_list(struct event_context *event_ctx);
582
583 /* The following definitions come from lib/fault.c  */
584
585 void fault_setup(void (*fn)(void *));
586 void dump_core_setup(const char *progname);
587
588 /* The following definitions come from lib/file_id.c  */
589
590 struct file_id file_id_create_dev(SMB_DEV_T dev, SMB_INO_T inode);
591 struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf);
592 bool file_id_equal(const struct file_id *id1, const struct file_id *id2);
593 const char *file_id_string_tos(const struct file_id *id);
594 void push_file_id_16(char *buf, const struct file_id *id);
595 void pull_file_id_16(char *buf, struct file_id *id);
596
597 /* The following definitions come from lib/fsusage.c  */
598
599 int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
600
601 /* The following definitions come from lib/gencache.c  */
602
603 bool gencache_init(void);
604 bool gencache_shutdown(void);
605 bool gencache_set(const char *keystr, const char *value, time_t timeout);
606 bool gencache_del(const char *keystr);
607 bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
608 bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired);
609 bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout);
610 void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
611                       void* data, const char* keystr_pattern);
612 int gencache_lock_entry( const char *key );
613 void gencache_unlock_entry( const char *key );
614
615 /* The following definitions come from lib/genrand.c  */
616
617 void set_rand_reseed_callback(void (*fn)(int *));
618 void set_need_random_reseed(void);
619 void generate_random_buffer( unsigned char *out, int len);
620 char *generate_random_str(size_t len);
621
622 /* The following definitions come from lib/hmacmd5.c  */
623
624 void hmac_md5_init_rfc2104(const unsigned char *key, int key_len, HMACMD5Context *ctx);
625 void hmac_md5_init_limK_to_64(const unsigned char* key, int key_len,
626                         HMACMD5Context *ctx);
627 void hmac_md5_update(const unsigned char *text, int text_len, HMACMD5Context *ctx);
628 void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx);
629 void hmac_md5( unsigned char key[16], const unsigned char *data, int data_len,
630                unsigned char *digest);
631
632 /* The following definitions come from lib/iconv.c  */
633
634 NTSTATUS smb_register_charset(struct charset_functions *funcs) ;
635 size_t smb_iconv(smb_iconv_t cd, 
636                  const char **inbuf, size_t *inbytesleft,
637                  char **outbuf, size_t *outbytesleft);
638 smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
639 int smb_iconv_close (smb_iconv_t cd);
640
641 /* The following definitions come from lib/interface.c  */
642
643 bool ismyaddr(const struct sockaddr_storage *ip);
644 bool ismyip_v4(struct in_addr ip);
645 bool is_local_net(const struct sockaddr_storage *from);
646 void setup_linklocal_scope_id(struct sockaddr_storage *pss);
647 bool is_local_net_v4(struct in_addr from);
648 int iface_count(void);
649 int iface_count_v4(void);
650 const struct in_addr *first_ipv4_iface(void);
651 struct interface *get_interface(int n);
652 const struct sockaddr_storage *iface_n_sockaddr_storage(int n);
653 const struct in_addr *iface_n_ip_v4(int n);
654 const struct in_addr *iface_n_bcast_v4(int n);
655 const struct sockaddr_storage *iface_n_bcast(int n);
656 const struct sockaddr_storage *iface_ip(const struct sockaddr_storage *ip);
657 bool iface_local(const struct sockaddr_storage *ip);
658 void load_interfaces(void);
659 void gfree_interfaces(void);
660 bool interfaces_changed(void);
661
662 /* The following definitions come from lib/ldap_debug_handler.c  */
663
664 void init_ldap_debugging(void);
665
666 /* The following definitions come from lib/ldap_escape.c  */
667
668 char *escape_ldap_string_alloc(const char *s);
669 char *escape_rdn_val_string_alloc(const char *s);
670
671 /* The following definitions come from lib/md4.c  */
672
673 void mdfour(unsigned char *out, const unsigned char *in, int n);
674
675 /* The following definitions come from lib/md5.c  */
676
677 void MD5Init(struct MD5Context *ctx);
678 void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
679 void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
680
681 /* The following definitions come from lib/module.c  */
682
683 NTSTATUS smb_load_module(const char *module_name);
684 int smb_load_modules(const char **modules);
685 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
686 NTSTATUS smb_load_module(const char *module_name);
687 int smb_load_modules(const char **modules);
688 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
689 void init_modules(void);
690
691 /* The following definitions come from lib/ms_fnmatch.c  */
692
693 int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
694                bool is_case_sensitive);
695 int gen_fnmatch(const char *pattern, const char *string);
696
697 /* The following definitions come from lib/pam_errors.c  */
698
699 NTSTATUS pam_to_nt_status(int pam_error);
700 int nt_status_to_pam(NTSTATUS nt_status);
701 NTSTATUS pam_to_nt_status(int pam_error);
702 int nt_status_to_pam(NTSTATUS nt_status);
703
704 /* The following definitions come from lib/pidfile.c  */
705
706 pid_t pidfile_pid(const char *name);
707 void pidfile_create(const char *program_name);
708
709 /* The following definitions come from lib/popt_common.c  */
710
711
712 /* The following definitions come from lib/privileges.c  */
713
714 bool get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount);
715 NTSTATUS privilege_enumerate_accounts(DOM_SID **sids, int *num_sids);
716 NTSTATUS privilege_enum_sids(const SE_PRIV *mask, TALLOC_CTX *mem_ctx,
717                              DOM_SID **sids, int *num_sids);
718 bool grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
719 bool grant_privilege_by_name(DOM_SID *sid, const char *name);
720 bool revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
721 bool revoke_all_privileges( DOM_SID *sid );
722 bool revoke_privilege_by_name(DOM_SID *sid, const char *name);
723 NTSTATUS privilege_create_account(const DOM_SID *sid );
724 NTSTATUS privilege_set_init(PRIVILEGE_SET *priv_set);
725 NTSTATUS privilege_set_init_by_ctx(TALLOC_CTX *mem_ctx, PRIVILEGE_SET *priv_set);
726 void privilege_set_free(PRIVILEGE_SET *priv_set);
727 NTSTATUS dup_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR *old_la, int count);
728 bool is_privileged_sid( const DOM_SID *sid );
729 bool grant_all_privileges( const DOM_SID *sid );
730
731 /* The following definitions come from lib/privileges_basic.c  */
732
733 bool se_priv_copy( SE_PRIV *dst, const SE_PRIV *src );
734 bool se_priv_put_all_privileges(SE_PRIV *mask);
735 void se_priv_add( SE_PRIV *mask, const SE_PRIV *addpriv );
736 void se_priv_remove( SE_PRIV *mask, const SE_PRIV *removepriv );
737 bool se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 );
738 bool se_priv_from_name( const char *name, SE_PRIV *mask );
739 void dump_se_priv( int dbg_cl, int dbg_lvl, const SE_PRIV *mask );
740 bool is_privilege_assigned(const SE_PRIV *privileges,
741                            const SE_PRIV *check);
742 const char* get_privilege_dispname( const char *name );
743 bool user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege);
744 bool user_has_any_privilege(NT_USER_TOKEN *token, const SE_PRIV *privilege);
745 int count_all_privileges( void );
746 LUID_ATTR get_privilege_luid( SE_PRIV *mask );
747 const char *luid_to_privilege_name(const LUID *set);
748 bool se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask );
749 bool privilege_set_to_se_priv( SE_PRIV *mask, struct lsa_PrivilegeSet *privset );
750
751 /* The following definitions come from lib/readline.c  */
752
753 char *smb_readline(const char *prompt, void (*callback)(void),
754                    char **(completion_fn)(const char *text, int start, int end));
755 const char *smb_readline_get_line_buffer(void);
756 void smb_readline_ca_char(char c);
757 int cmd_history(void);
758
759 /* The following definitions come from lib/recvfile.c  */
760
761 ssize_t sys_recvfile(int fromfd,
762                         int tofd,
763                         SMB_OFF_T offset,
764                         size_t count);
765 ssize_t sys_recvfile(int fromfd,
766                         int tofd,
767                         SMB_OFF_T offset,
768                         size_t count);
769 ssize_t drain_socket(int sockfd, size_t count);
770
771 /* The following definitions come from lib/secace.c  */
772
773 bool sec_ace_object(uint8 type);
774 void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src);
775 void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type,
776                   uint32 mask, uint8 flag);
777 NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask);
778 NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask);
779 NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 *num, DOM_SID *sid);
780 bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2);
781 int nt_ace_inherit_comp( SEC_ACE *a1, SEC_ACE *a2);
782 int nt_ace_canon_comp( SEC_ACE *a1, SEC_ACE *a2);
783 void dacl_sort_into_canonical_order(SEC_ACE *srclist, unsigned int num_aces);
784 bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace);
785
786 /* The following definitions come from lib/secacl.c  */
787
788 SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision,
789                       int num_aces, SEC_ACE *ace_list);
790 SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src);
791 bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2);
792
793 /* The following definitions come from lib/secdesc.c  */
794
795 bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2);
796 SEC_DESC_BUF *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
797 SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
798                         enum security_descriptor_revision revision,
799                         uint16 type,
800                         const DOM_SID *owner_sid, const DOM_SID *grp_sid,
801                         SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size);
802 SEC_DESC *dup_sec_desc(TALLOC_CTX *ctx, const SEC_DESC *src);
803 NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
804                            struct security_descriptor *secdesc,
805                            uint8 **data, size_t *len);
806 NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len,
807                              struct security_descriptor **psecdesc);
808 SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
809                                  SEC_ACL *dacl, size_t *sd_size);
810 SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
811 SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src);
812 NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size);
813 NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
814 NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t *sd_size);
815 SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, 
816                                       bool child_container);
817 void init_sec_access(uint32 *t, uint32 mask);
818
819 /* The following definitions come from lib/select.c  */
820
821 void sys_select_signal(char c);
822 int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
823 int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
824
825 /* The following definitions come from lib/sendfile.c  */
826
827 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
828 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
829 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
830 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
831 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
832 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
833 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
834
835 /* The following definitions come from lib/server_mutex.c  */
836
837 struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
838                                      int timeout);
839
840 /* The following definitions come from lib/sharesec.c  */
841
842 SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def_access);
843 SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
844                               size_t *psize);
845 bool set_share_security(const char *share_name, SEC_DESC *psd);
846 bool delete_share_security(const char *servicename);
847 bool share_access_check(const NT_USER_TOKEN *token, const char *sharename,
848                         uint32 desired_access);
849 bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd);
850
851 /* The following definitions come from lib/signal.c  */
852
853 void BlockSignals(bool block,int signum);
854 void (*CatchSignal(int signum,void (*handler)(int )))(int);
855 void CatchChild(void);
856 void CatchChildLeaveStatus(void);
857
858 /* The following definitions come from lib/smbldap.c  */
859
860 int smb_ldap_start_tls(LDAP *ldap_struct, int version);
861 int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri);
862 int smb_ldap_upgrade_conn(LDAP *ldap_struct, int *new_version) ;
863 int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri);
864 int smbldap_search(struct smbldap_state *ldap_state, 
865                    const char *base, int scope, const char *filter, 
866                    const char *attrs[], int attrsonly, 
867                    LDAPMessage **res);
868 int smbldap_search_paged(struct smbldap_state *ldap_state, 
869                          const char *base, int scope, const char *filter, 
870                          const char **attrs, int attrsonly, int pagesize,
871                          LDAPMessage **res, void **cookie);
872 int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
873 int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
874 int smbldap_delete(struct smbldap_state *ldap_state, const char *dn);
875 int smbldap_extended_operation(struct smbldap_state *ldap_state, 
876                                LDAP_CONST char *reqoid, struct berval *reqdata, 
877                                LDAPControl **serverctrls, LDAPControl **clientctrls, 
878                                char **retoidp, struct berval **retdatap);
879 int smbldap_search_suffix (struct smbldap_state *ldap_state,
880                            const char *filter, const char **search_attr,
881                            LDAPMessage ** result);
882 void smbldap_free_struct(struct smbldap_state **ldap_state) ;
883 NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
884                       const char *location,
885                       struct smbldap_state **smbldap_state);
886 char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry);
887 bool smbldap_has_control(LDAP *ld, const char *control);
888 bool smbldap_has_extension(LDAP *ld, const char *extension);
889 bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
890 bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
891
892 /* The following definitions come from lib/smbldap_util.c  */
893
894 NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
895                                     LDAPMessage ** result, const char *domain_name,
896                                     bool try_add);
897
898 /* The following definitions come from lib/smbrun.c  */
899
900 int smbrun_no_sanitize(const char *cmd, int *outfd);
901 int smbrun(const char *cmd, int *outfd);
902 int smbrunsecret(const char *cmd, const char *secret);
903
904 /* The following definitions come from lib/sock_exec.c  */
905
906 int sock_exec(const char *prog);
907
908 /* The following definitions come from lib/substitute.c  */
909
910 void free_local_machine_name(void);
911 bool set_local_machine_name(const char *local_name, bool perm);
912 const char *get_local_machine_name(void);
913 bool set_remote_machine_name(const char *remote_name, bool perm);
914 const char *get_remote_machine_name(void);
915 void sub_set_smb_name(const char *name);
916 void set_current_user_info(const char *smb_name, const char *unix_name,
917                            const char *full_name, const char *domain);
918 const char *get_current_username(void);
919 void standard_sub_basic(const char *smb_name, const char *domain_name,
920                         char *str, size_t len);
921 char *talloc_sub_basic(TALLOC_CTX *mem_ctx, const char *smb_name,
922                        const char *domain_name, const char *str);
923 char *alloc_sub_basic(const char *smb_name, const char *domain_name,
924                       const char *str);
925 char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
926                         const char *input_string,
927                         const char *username,
928                         const char *domain,
929                         uid_t uid,
930                         gid_t gid);
931 char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
932                           const char *servicename, const char *user,
933                           const char *connectpath, gid_t gid,
934                           const char *smb_name, const char *domain_name,
935                           const char *str);
936 void standard_sub_advanced(const char *servicename, const char *user,
937                            const char *connectpath, gid_t gid,
938                            const char *smb_name, const char *domain_name,
939                            char *str, size_t len);
940 char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str);
941
942 /* The following definitions come from lib/sysacls.c  */
943
944 int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
945 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
946 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
947 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
948 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
949 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
950 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
951 char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
952 SMB_ACL_T sys_acl_init(int count);
953 int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
954 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
955 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
956 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
957 int sys_acl_free_text(char *text);
958 int sys_acl_free_acl(SMB_ACL_T acl_d) ;
959 int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
960 int sys_acl_valid(SMB_ACL_T acl_d);
961 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, 
962                            const char *path_p, SMB_ACL_TYPE_T type);
963 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
964 int sys_acl_set_file(vfs_handle_struct *handle,
965                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
966 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
967                    SMB_ACL_T acl_d);
968 int sys_acl_delete_def_file(vfs_handle_struct *handle,
969                             const char *path);
970 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
971                            const char *path_p, SMB_ACL_TYPE_T type);
972 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
973 int sys_acl_set_file(vfs_handle_struct *handle,
974                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
975 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
976                    SMB_ACL_T acl_d);
977 int sys_acl_delete_def_file(vfs_handle_struct *handle,
978                             const char *path);
979 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
980                            const char *path_p, SMB_ACL_TYPE_T type);
981 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
982 int sys_acl_set_file(vfs_handle_struct *handle,
983                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
984 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
985                    SMB_ACL_T acl_d);
986 int sys_acl_delete_def_file(vfs_handle_struct *handle,
987                             const char *path);
988 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
989                            const char *path_p, SMB_ACL_TYPE_T type);
990 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
991 int sys_acl_set_file(vfs_handle_struct *handle,
992                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
993 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
994                    SMB_ACL_T acl_d);
995 int sys_acl_delete_def_file(vfs_handle_struct *handle,
996                             const char *path);
997 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
998                            const char *path_p, SMB_ACL_TYPE_T type);
999 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
1000 int sys_acl_set_file(vfs_handle_struct *handle,
1001                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
1002 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
1003                    SMB_ACL_T acl_d);
1004 int sys_acl_delete_def_file(vfs_handle_struct *handle,
1005                             const char *path);
1006 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
1007                            const char *path_p, SMB_ACL_TYPE_T type);
1008 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
1009 int sys_acl_set_file(vfs_handle_struct *handle,
1010                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
1011 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
1012                    SMB_ACL_T acl_d);
1013 int sys_acl_delete_def_file(vfs_handle_struct *handle,
1014                             const char *path);
1015 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
1016                            const char *path_p, SMB_ACL_TYPE_T type);
1017 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
1018 int sys_acl_set_file(vfs_handle_struct *handle,
1019                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
1020 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
1021                    SMB_ACL_T acl_d);
1022 int sys_acl_delete_def_file(vfs_handle_struct *handle,
1023                             const char *path);
1024 int no_acl_syscall_error(int err);
1025
1026 /* The following definitions come from lib/sysquotas.c  */
1027
1028 int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1029 int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1030
1031 /* The following definitions come from lib/sysquotas_4A.c  */
1032
1033 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1034 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1035
1036 /* The following definitions come from lib/sysquotas_linux.c  */
1037
1038 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1039 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1040
1041 /* The following definitions come from lib/sysquotas_xfs.c  */
1042
1043 int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1044 int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
1045
1046 /* The following definitions come from lib/system.c  */
1047
1048 void *sys_memalign( size_t align, size_t size );
1049 int sys_usleep(long usecs);
1050 ssize_t sys_read(int fd, void *buf, size_t count);
1051 ssize_t sys_write(int fd, const void *buf, size_t count);
1052 ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off);
1053 ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off);
1054 ssize_t sys_send(int s, const void *msg, size_t len, int flags);
1055 ssize_t sys_sendto(int s,  const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
1056 ssize_t sys_recv(int fd, void *buf, size_t count, int flags);
1057 ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
1058 int sys_fcntl_ptr(int fd, int cmd, void *arg);
1059 int sys_fcntl_long(int fd, int cmd, long arg);
1060 int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
1061 int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
1062 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
1063 int sys_ftruncate(int fd, SMB_OFF_T offset);
1064 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
1065 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
1066 SMB_OFF_T sys_ftell(FILE *fp);
1067 int sys_creat(const char *path, mode_t mode);
1068 int sys_open(const char *path, int oflag, mode_t mode);
1069 FILE *sys_fopen(const char *path, const char *type);
1070 void kernel_flock(int fd, uint32 share_mode);
1071 SMB_STRUCT_DIR *sys_opendir(const char *name);
1072 SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
1073 void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
1074 long sys_telldir(SMB_STRUCT_DIR *dirp);
1075 void sys_rewinddir(SMB_STRUCT_DIR *dirp);
1076 int sys_closedir(SMB_STRUCT_DIR *dirp);
1077 int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
1078 char *sys_realpath(const char *path, char *resolved_path);
1079 int sys_waitpid(pid_t pid,int *status,int options);
1080 char *sys_getwd(char *s);
1081 int sys_symlink(const char *oldpath, const char *newpath);
1082 int sys_readlink(const char *path, char *buf, size_t bufsiz);
1083 int sys_link(const char *oldpath, const char *newpath);
1084 int sys_chown(const char *fname,uid_t uid,gid_t gid);
1085 int sys_lchown(const char *fname,uid_t uid,gid_t gid);
1086 int sys_chroot(const char *dname);
1087 void set_effective_capability(enum smbd_capability capability);
1088 void drop_effective_capability(enum smbd_capability capability);
1089 long sys_random(void);
1090 void sys_srandom(unsigned int seed);
1091 int groups_max(void);
1092 int sys_getgroups(int setlen, gid_t *gidset);
1093 int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
1094 void sys_setpwent(void);
1095 struct passwd *sys_getpwent(void);
1096 void sys_endpwent(void);
1097 struct passwd *sys_getpwnam(const char *name);
1098 struct passwd *sys_getpwuid(uid_t uid);
1099 struct group *sys_getgrnam(const char *name);
1100 struct group *sys_getgrgid(gid_t gid);
1101 pid_t sys_fork(void);
1102 pid_t sys_getpid(void);
1103 int sys_popen(const char *command);
1104 int sys_pclose(int fd);
1105 void *sys_dlopen(const char *name, int flags);
1106 void *sys_dlsym(void *handle, const char *symbol);
1107 int sys_dlclose (void *handle);
1108 const char *sys_dlerror(void);
1109 int sys_dup2(int oldfd, int newfd) ;
1110 ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
1111 ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size);
1112 ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
1113 ssize_t sys_listxattr (const char *path, char *list, size_t size);
1114 ssize_t sys_llistxattr (const char *path, char *list, size_t size);
1115 ssize_t sys_flistxattr (int filedes, char *list, size_t size);
1116 int sys_removexattr (const char *path, const char *name);
1117 int sys_lremovexattr (const char *path, const char *name);
1118 int sys_fremovexattr (int filedes, const char *name);
1119 int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1120 int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1121 int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
1122 uint32 unix_dev_major(SMB_DEV_T dev);
1123 uint32 unix_dev_minor(SMB_DEV_T dev);
1124 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1125 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1126 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1127 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1128 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1129 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1130 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1131 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1132 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1133 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1134 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1135 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1136 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1137 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1138 int sys_getpeereid( int s, uid_t *uid);
1139 int sys_getnameinfo(const struct sockaddr *psa,
1140                         socklen_t salen,
1141                         char *host,
1142                         size_t hostlen,
1143                         char *service,
1144                         size_t servlen,
1145                         int flags);
1146 int sys_connect(int fd, const struct sockaddr * addr);
1147
1148 /* The following definitions come from lib/system_smbd.c  */
1149
1150 bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
1151                          gid_t primary_gid,
1152                          gid_t **ret_groups, size_t *p_ngroups);
1153
1154 /* The following definitions come from lib/tallocmsg.c  */
1155
1156 void register_msg_pool_usage(struct messaging_context *msg_ctx);
1157
1158 /* The following definitions come from lib/time.c  */
1159
1160 time_t get_time_t_max(void);
1161 void GetTimeOfDay(struct timeval *tval);
1162 time_t nt_time_to_unix(NTTIME nt);
1163 void unix_to_nt_time(NTTIME *nt, time_t t);
1164 bool null_time(time_t t);
1165 bool null_nttime(NTTIME t);
1166 bool null_timespec(struct timespec ts);
1167 void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset);
1168 void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1169 void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1170 time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
1171 time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
1172 time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
1173 char *http_timestring(time_t t);
1174 char *timestring(TALLOC_CTX *mem_ctx, time_t t);
1175 const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt);
1176 NTTIME nttime_from_string(const char *s);
1177 int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2);
1178 struct timeval timeval_zero(void);
1179 bool timeval_is_zero(const struct timeval *tv);
1180 struct timeval timeval_current(void);
1181 struct timeval timeval_set(uint32_t secs, uint32_t usecs);
1182 struct timeval timeval_add(const struct timeval *tv,
1183                            uint32_t secs, uint32_t usecs);
1184 struct timeval timeval_sum(const struct timeval *tv1,
1185                            const struct timeval *tv2);
1186 struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
1187 int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
1188 bool timeval_expired(const struct timeval *tv);
1189 double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2);
1190 double timeval_elapsed(const struct timeval *tv);
1191 struct timeval timeval_min(const struct timeval *tv1,
1192                            const struct timeval *tv2);
1193 struct timeval timeval_max(const struct timeval *tv1,
1194                            const struct timeval *tv2);
1195 struct timeval timeval_until(const struct timeval *tv1,
1196                              const struct timeval *tv2);
1197 NTTIME timeval_to_nttime(const struct timeval *tv);
1198 uint32 convert_time_t_to_uint32(time_t t);
1199 time_t convert_uint32_to_time_t(uint32 u);
1200 int get_time_zone(time_t t);
1201 bool nt_time_is_zero(const NTTIME *nt);
1202 time_t generalized_to_unix_time(const char *str);
1203 int get_server_zone_offset(void);
1204 int set_server_zone_offset(time_t t);
1205 char *current_timestring(TALLOC_CTX *ctx, bool hires);
1206 void srv_put_dos_date(char *buf,int offset,time_t unixdate);
1207 void srv_put_dos_date2(char *buf,int offset, time_t unixdate);
1208 void srv_put_dos_date3(char *buf,int offset,time_t unixdate);
1209 void put_long_date_timespec(char *p, struct timespec ts);
1210 void put_long_date(char *p, time_t t);
1211 time_t get_create_time(const SMB_STRUCT_STAT *st,bool fake_dirs);
1212 struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,bool fake_dirs);
1213 struct timespec get_atimespec(const SMB_STRUCT_STAT *pst);
1214 void set_atimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1215 struct timespec get_mtimespec(const SMB_STRUCT_STAT *pst);
1216 void set_mtimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1217 struct timespec get_ctimespec(const SMB_STRUCT_STAT *pst);
1218 void set_ctimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1219 void dos_filetime_timespec(struct timespec *tsp);
1220 time_t srv_make_unix_date(const void *date_ptr);
1221 time_t srv_make_unix_date2(const void *date_ptr);
1222 time_t srv_make_unix_date3(const void *date_ptr);
1223 time_t convert_timespec_to_time_t(struct timespec ts);
1224 struct timespec convert_time_t_to_timespec(time_t t);
1225 struct timespec convert_timeval_to_timespec(const struct timeval tv);
1226 struct timeval convert_timespec_to_timeval(const struct timespec ts);
1227 struct timespec timespec_current(void);
1228 struct timespec timespec_min(const struct timespec *ts1,
1229                            const struct timespec *ts2);
1230 int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
1231 struct timespec interpret_long_date(const char *p);
1232 void cli_put_dos_date(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1233 void cli_put_dos_date2(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1234 void cli_put_dos_date3(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1235 time_t cli_make_unix_date(struct cli_state *cli, const void *date_ptr);
1236 time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr);
1237 time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr);
1238 struct timespec nt_time_to_unix_timespec(NTTIME *nt);
1239 bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2);
1240 void TimeInit(void);
1241 void get_process_uptime(struct timeval *ret_time);
1242 time_t nt_time_to_unix_abs(const NTTIME *nt);
1243 time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
1244 void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
1245 void unix_to_nt_time_abs(NTTIME *nt, time_t t);
1246 bool null_mtime(time_t mtime);
1247 const char *time_to_asc(const time_t t);
1248 const char *display_time(NTTIME nttime);
1249 bool nt_time_is_set(const NTTIME *nt);
1250
1251 /* The following definitions come from lib/ufc.c  */
1252
1253 char *ufc_crypt(const char *key,const char *salt);
1254
1255 /* The following definitions come from lib/username.c  */
1256
1257 char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);
1258 struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
1259
1260 /* The following definitions come from lib/util.c  */
1261
1262 bool set_global_myname(const char *myname);
1263 const char *global_myname(void);
1264 bool set_global_myworkgroup(const char *myworkgroup);
1265 const char *lp_workgroup(void);
1266 bool set_global_scope(const char *scope);
1267 const char *global_scope(void);
1268 void gfree_names(void);
1269 void gfree_all( void );
1270 const char *my_netbios_names(int i);
1271 bool set_netbios_aliases(const char **str_array);
1272 bool init_names(void);
1273 const char *get_cmdline_auth_info_username(void);
1274 void set_cmdline_auth_info_username(const char *username);
1275 const char *get_cmdline_auth_info_password(void);
1276 void set_cmdline_auth_info_password(const char *password);
1277 bool set_cmdline_auth_info_signing_state(const char *arg);
1278 int get_cmdline_auth_info_signing_state(void);
1279 void set_cmdline_auth_info_use_kerberos(bool b);
1280 bool get_cmdline_auth_info_use_kerberos(void);
1281 void set_cmdline_auth_info_use_krb5_ticket(void);
1282 void set_cmdline_auth_info_smb_encrypt(void);
1283 void set_cmdline_auth_info_use_machine_account(void);
1284 bool get_cmdline_auth_info_got_pass(void);
1285 bool get_cmdline_auth_info_smb_encrypt(void);
1286 bool get_cmdline_auth_info_use_machine_account(void);
1287 bool get_cmdline_auth_info_copy(struct user_auth_info *info);
1288 bool set_cmdline_auth_info_machine_account_creds(void);
1289 const char *tmpdir(void);
1290 bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
1291                              gid_t **gids, size_t *num_gids);
1292 const char *get_numlist(const char *p, uint32 **num, int *count);
1293 bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf);
1294 bool socket_exist(const char *fname);
1295 time_t file_modtime(const char *fname);
1296 bool directory_exist(char *dname,SMB_STRUCT_STAT *st);
1297 SMB_OFF_T get_file_size(char *file_name);
1298 char *attrib_string(uint16 mode);
1299 void show_msg(char *buf);
1300 void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num);
1301 void smb_setlen(char *buf,int len);
1302 int set_message_bcc(char *buf,int num_bytes);
1303 ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
1304 char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
1305 char *clean_name(TALLOC_CTX *ctx, const char *s);
1306 void close_low_fds(bool stderr_too);
1307 ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos);
1308 int set_blocking(int fd, bool set);
1309 void smb_msleep(unsigned int t);
1310 void become_daemon(bool Fork, bool no_process_group);
1311 bool reinit_after_fork(struct messaging_context *msg_ctx,
1312                        bool parent_longlived);
1313 bool yesno(const char *p);
1314 void *malloc_(size_t size);
1315 void *malloc_array(size_t el_size, unsigned int count);
1316 void *memalign_array(size_t el_size, size_t align, unsigned int count);
1317 void *calloc_array(size_t size, size_t nmemb);
1318 void *Realloc(void *p, size_t size, bool free_old_on_error);
1319 void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error);
1320 void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
1321                         void *element, void *_array, uint32 *num_elements,
1322                         ssize_t *array_size);
1323 void safe_free(void *p);
1324 char *get_myname(TALLOC_CTX *ctx);
1325 char *get_mydnsdomname(TALLOC_CTX *ctx);
1326 int interpret_protocol(const char *str,int def);
1327 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1328 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1329 bool process_exists(const struct server_id pid);
1330 bool process_exists_by_pid(pid_t pid);
1331 const char *uidtoname(uid_t uid);
1332 char *gidtoname(gid_t gid);
1333 uid_t nametouid(const char *name);
1334 gid_t nametogid(const char *name);
1335 void smb_panic(const char *const why);
1336 void log_stack_trace(void);
1337 const char *readdirname(SMB_STRUCT_DIR *p);
1338 bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
1339 void set_namearray(name_compare_entry **ppname_array, const char *namelist);
1340 void free_namearray(name_compare_entry *name_array);
1341 bool fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
1342 bool fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
1343 bool is_myname(const char *s);
1344 bool is_myworkgroup(const char *s);
1345 void ra_lanman_string( const char *native_lanman );
1346 const char *get_remote_arch_str(void);
1347 void set_remote_arch(enum remote_arch_types type);
1348 enum remote_arch_types get_remote_arch(void);
1349 void print_asc(int level, const unsigned char *buf,int len);
1350 void dump_data(int level, const unsigned char *buf1,int len);
1351 void dump_data_pw(const char *msg, const uchar * data, size_t len);
1352 const char *tab_depth(int level, int depth);
1353 int str_checksum(const char *s);
1354 void zero_free(void *p, size_t size);
1355 int set_maxfiles(int requested_max);
1356 int smb_mkstemp(char *name_template);
1357 void *smb_xmalloc_array(size_t size, unsigned int count);
1358 void *smb_xmemdup(const void *p, size_t size);
1359 char *smb_xstrdup(const char *s);
1360 char *smb_xstrndup(const char *s, size_t n);
1361 void *memdup(const void *p, size_t size);
1362 char *myhostname(void);
1363 char *lock_path(const char *name);
1364 char *pid_path(const char *name);
1365 char *lib_path(const char *name);
1366 char *data_path(const char *name);
1367 char *state_path(const char *name);
1368 const char *shlib_ext(void);
1369 char *parent_dirname(const char *path);
1370 bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir,
1371                            char **parent, const char **name);
1372 bool ms_has_wild(const char *s);
1373 bool ms_has_wild_w(const smb_ucs2_t *s);
1374 bool mask_match(const char *string, const char *pattern, bool is_case_sensitive);
1375 bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive);
1376 bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
1377 bool unix_wild_match(const char *pattern, const char *string);
1378 bool name_to_fqdn(fstring fqdn, const char *name);
1379 void *talloc_check_name_abort(const void *ptr, const char *name);
1380 uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options);
1381 pid_t procid_to_pid(const struct server_id *proc);
1382 void set_my_vnn(uint32 vnn);
1383 uint32 get_my_vnn(void);
1384 struct server_id pid_to_procid(pid_t pid);
1385 struct server_id procid_self(void);
1386 struct server_id server_id_self(void);
1387 bool procid_equal(const struct server_id *p1, const struct server_id *p2);
1388 bool cluster_id_equal(const struct server_id *id1,
1389                       const struct server_id *id2);
1390 bool procid_is_me(const struct server_id *pid);
1391 struct server_id interpret_pid(const char *pid_string);
1392 char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid);
1393 char *procid_str_static(const struct server_id *pid);
1394 bool procid_valid(const struct server_id *pid);
1395 bool procid_is_local(const struct server_id *pid);
1396 int this_is_smp(void);
1397 bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1398 char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1399 char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1400 int get_safe_SVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1401 int get_safe_IVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1402 void split_domain_user(TALLOC_CTX *mem_ctx,
1403                        const char *full_name,
1404                        char **domain,
1405                        char **user);
1406 void *_talloc_zero_zeronull(const void *ctx, size_t size, const char *name);
1407 void *_talloc_memdup_zeronull(const void *t, const void *p, size_t size, const char *name);
1408 void *_talloc_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1409 void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1410 void *talloc_zeronull(const void *context, size_t size, const char *name);
1411 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
1412                                 char **pbase, char **pstream);
1413 bool is_valid_policy_hnd(const POLICY_HND *hnd);
1414 bool policy_hnd_equal(const struct policy_handle *hnd1,
1415                       const struct policy_handle *hnd2);
1416 const char *strip_hostname(const char *s);
1417
1418 /* The following definitions come from lib/util_file.c  */
1419
1420 char *fgets_slash(char *s2,int maxlen,XFILE *f);
1421 char *fd_load(int fd, size_t *psize, size_t maxsize);
1422 char *file_load(const char *fname, size_t *size, size_t maxsize);
1423 bool unmap_file(void* start, size_t size);
1424 void *map_file(char *fname, size_t size);
1425 char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
1426 char **fd_lines_load(int fd, int *numlines, size_t maxsize);
1427 char **file_lines_pload(char *syscmd, int *numlines);
1428 void file_lines_free(char **lines);
1429 void file_lines_slashcont(char **lines);
1430 bool file_save(const char *fname, void *packet, size_t length);
1431
1432 /* The following definitions come from lib/util_nscd.c  */
1433
1434 void smb_nscd_flush_user_cache(void);
1435 void smb_nscd_flush_group_cache(void);
1436
1437 /* The following definitions come from lib/util_nttoken.c  */
1438
1439 NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken);
1440 NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
1441                         const struct nt_user_token *token_1,
1442                         const struct nt_user_token *token_2,
1443                         struct nt_user_token **token_out);
1444
1445 /* The following definitions come from lib/util_pw.c  */
1446
1447 struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx, const struct passwd *from) ;
1448 void flush_pwnam_cache(void);
1449 struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name);
1450 struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
1451
1452 /* The following definitions come from lib/util_reg.c  */
1453
1454 const char *reg_type_lookup(enum winreg_Type type);
1455 WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len,
1456                          uint32 *num_values, char ***values);
1457
1458 /* The following definitions come from lib/util_reg_api.c  */
1459
1460 WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
1461                            struct registry_value **pvalue,
1462                            enum winreg_Type type, uint8 *data,
1463                            uint32 size, uint32 length);
1464 WERROR registry_push_value(TALLOC_CTX *mem_ctx,
1465                            const struct registry_value *value,
1466                            DATA_BLOB *presult);
1467
1468 /* The following definitions come from lib/util_seaccess.c  */
1469
1470 void se_map_generic(uint32 *access_mask, const struct generic_mapping *mapping);
1471 void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
1472 bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
1473                      uint32 acc_desired, uint32 *acc_granted, 
1474                      NTSTATUS *status);
1475 NTSTATUS samr_make_sam_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd_size);
1476
1477 /* The following definitions come from lib/util_sec.c  */
1478
1479 void sec_init(void);
1480 uid_t sec_initial_uid(void);
1481 gid_t sec_initial_gid(void);
1482 bool non_root_mode(void);
1483 void gain_root_privilege(void);
1484 void gain_root_group_privilege(void);
1485 void set_effective_uid(uid_t uid);
1486 void set_effective_gid(gid_t gid);
1487 void save_re_uid(void);
1488 void restore_re_uid_fromroot(void);
1489 void restore_re_uid(void);
1490 void save_re_gid(void);
1491 void restore_re_gid(void);
1492 int set_re_uid(void);
1493 void become_user_permanently(uid_t uid, gid_t gid);
1494 bool is_setuid_root(void) ;
1495
1496 /* The following definitions come from lib/util_sid.c  */
1497
1498 const char *sid_type_lookup(uint32 sid_type) ;
1499 NT_USER_TOKEN *get_system_token(void) ;
1500 const char *get_global_sam_name(void) ;
1501 char *sid_to_fstring(fstring sidstr_out, const DOM_SID *sid);
1502 char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid);
1503 char *sid_string_dbg(const DOM_SID *sid);
1504 char *sid_string_tos(const DOM_SID *sid);
1505 bool string_to_sid(DOM_SID *sidout, const char *sidstr);
1506 DOM_SID *string_sid_talloc(TALLOC_CTX *mem_ctx, const char *sidstr);
1507 bool sid_append_rid(DOM_SID *sid, uint32 rid);
1508 bool sid_compose(DOM_SID *dst, const DOM_SID *domain_sid, uint32 rid);
1509 bool sid_split_rid(DOM_SID *sid, uint32 *rid);
1510 bool sid_peek_rid(const DOM_SID *sid, uint32 *rid);
1511 bool sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid);
1512 void sid_copy(DOM_SID *dst, const DOM_SID *src);
1513 bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid);
1514 bool sid_parse(const char *inbuf, size_t len, DOM_SID *sid);
1515 int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
1516 int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2);
1517 bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
1518 bool non_mappable_sid(DOM_SID *sid);
1519 char *sid_binstring(const DOM_SID *sid);
1520 char *sid_binstring_hex(const DOM_SID *sid);
1521 DOM_SID *sid_dup_talloc(TALLOC_CTX *ctx, const DOM_SID *src);
1522 NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1523                           DOM_SID **sids, size_t *num);
1524 NTSTATUS add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1525                                  DOM_SID **sids, size_t *num_sids);
1526 void del_sid_from_array(const DOM_SID *sid, DOM_SID **sids, size_t *num);
1527 bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
1528                                     uint32 rid, uint32 **pp_rids, size_t *p_num);
1529 bool is_null_sid(const DOM_SID *sid);
1530 NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
1531                               const struct netr_SamInfo3 *info3,
1532                               DOM_SID **user_sids,
1533                               size_t *num_user_sids,
1534                               bool include_user_group_rid,
1535                               bool skip_ressource_groups);
1536
1537 /* The following definitions come from lib/util_sock.c  */
1538
1539 bool is_ipaddress_v4(const char *str);
1540 bool is_ipaddress(const char *str);
1541 bool is_broadcast_addr(const struct sockaddr_storage *pss);
1542 uint32 interpret_addr(const char *str);
1543 struct in_addr *interpret_addr2(struct in_addr *ip, const char *str);
1544 bool interpret_string_addr(struct sockaddr_storage *pss,
1545                 const char *str,
1546                 int flags);
1547 bool is_loopback_ip_v4(struct in_addr ip);
1548 bool is_loopback_addr(const struct sockaddr_storage *pss);
1549 bool is_zero_ip_v4(struct in_addr ip);
1550 bool is_zero_addr(const struct sockaddr_storage *pss);
1551 void zero_ip_v4(struct in_addr *ip);
1552 void zero_addr(struct sockaddr_storage *pss);
1553 bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
1554 void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
1555                 struct in_addr ip);
1556 bool same_net(const struct sockaddr_storage *ip1,
1557                 const struct sockaddr_storage *ip2,
1558                 const struct sockaddr_storage *mask);
1559 bool addr_equal(const struct sockaddr_storage *ip1,
1560                 const struct sockaddr_storage *ip2);
1561 bool is_address_any(const struct sockaddr_storage *psa);
1562 uint16_t get_sockaddr_port(const struct sockaddr_storage *pss);
1563 char *print_sockaddr(char *dest,
1564                         size_t destlen,
1565                         const struct sockaddr_storage *psa);
1566 char *print_canonical_sockaddr(TALLOC_CTX *ctx,
1567                         const struct sockaddr_storage *pss);
1568 void set_sockaddr_port(struct sockaddr_storage *psa, uint16 port);
1569 const char *client_name(int fd);
1570 const char *client_addr(int fd, char *addr, size_t addrlen);
1571 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
1572 int client_socket_port(int fd);
1573 void set_smb_read_error(enum smb_read_errors *pre,
1574                         enum smb_read_errors newerr);
1575 void cond_set_smb_read_error(enum smb_read_errors *pre,
1576                         enum smb_read_errors newerr);
1577 bool is_a_socket(int fd);
1578 void set_socket_options(int fd, const char *options);
1579 ssize_t read_udp_v4_socket(int fd,
1580                         char *buf,
1581                         size_t len,
1582                         struct sockaddr_storage *psa);
1583 NTSTATUS read_socket_with_timeout(int fd, char *buf,
1584                                   size_t mincnt, size_t maxcnt,
1585                                   unsigned int time_out,
1586                                   size_t *size_ret);
1587 NTSTATUS read_data(int fd, char *buffer, size_t N);
1588 ssize_t write_data(int fd, const char *buffer, size_t N);
1589 bool send_keepalive(int client);
1590 NTSTATUS read_smb_length_return_keepalive(int fd, char *inbuf,
1591                                           unsigned int timeout,
1592                                           size_t *len);
1593 NTSTATUS read_smb_length(int fd, char *inbuf, unsigned int timeout,
1594                          size_t *len);
1595 NTSTATUS receive_smb_raw(int fd,
1596                         char *buffer,
1597                         size_t buflen,
1598                         unsigned int timeout,
1599                         size_t maxlen,
1600                         size_t *p_len);
1601 int open_socket_in(int type,
1602                 uint16_t port,
1603                 int dlevel,
1604                 const struct sockaddr_storage *psock,
1605                 bool rebind);
1606 int open_socket_out(int type,
1607                 const struct sockaddr_storage *pss,
1608                 uint16_t port,
1609                 int timeout);
1610 bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
1611                          int timeout, int *fd_index, int *fd);
1612 int open_udp_socket(const char *host, int port);
1613 const char *get_peer_name(int fd, bool force_lookup);
1614 const char *get_peer_addr(int fd, char *addr, size_t addr_len);
1615 int create_pipe_sock(const char *socket_dir,
1616                      const char *socket_name,
1617                      mode_t dir_perms);
1618 const char *get_mydnsfullname(void);
1619 bool is_myname_or_ipaddr(const char *s);
1620
1621 /* The following definitions come from lib/util_str.c  */
1622
1623 bool next_token(const char **ptr, char *buff, const char *sep, size_t bufsize);
1624 bool next_token_talloc(TALLOC_CTX *ctx,
1625                         const char **ptr,
1626                         char **pp_buff,
1627                         const char *sep);
1628 bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
1629                         const char **ptr,
1630                         char **pp_buff,
1631                         const char *sep);
1632 int StrCaseCmp(const char *s, const char *t);
1633 int StrnCaseCmp(const char *s, const char *t, size_t len);
1634 bool strequal(const char *s1, const char *s2);
1635 bool strnequal(const char *s1,const char *s2,size_t n);
1636 bool strcsequal(const char *s1,const char *s2);
1637 int strwicmp(const char *psz1, const char *psz2);
1638 void strnorm(char *s, int case_default);
1639 bool strisnormal(const char *s, int case_default);
1640 void string_replace( char *s, char oldc, char newc );
1641 char *push_skip_string(char *buf);
1642 char *skip_string(const char *base, size_t len, char *buf);
1643 size_t str_charnum(const char *s);
1644 size_t str_ascii_charnum(const char *s);
1645 bool trim_char(char *s,char cfront,char cback);
1646 bool trim_string(char *s,const char *front,const char *back);
1647 bool strhasupper(const char *s);
1648 bool strhaslower(const char *s);
1649 size_t count_chars(const char *s,char c);
1650 char *safe_strcpy_fn(const char *fn,
1651                 int line,
1652                 char *dest,
1653                 const char *src,
1654                 size_t maxlength);
1655 char *safe_strcat_fn(const char *fn,
1656                 int line,
1657                 char *dest,
1658                 const char *src,
1659                 size_t maxlength);
1660 char *alpha_strcpy_fn(const char *fn,
1661                 int line,
1662                 char *dest,
1663                 const char *src,
1664                 const char *other_safe_chars,
1665                 size_t maxlength);
1666 char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
1667 size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len);
1668 DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex);
1669 char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
1670 bool in_list(const char *s, const char *list, bool casesensitive);
1671 void string_free(char **s);
1672 bool string_set(char **dest,const char *src);
1673 void string_sub2(char *s,const char *pattern, const char *insert, size_t len,
1674                  bool remove_unsafe_characters, bool replace_once,
1675                  bool allow_trailing_dollar);
1676 void string_sub_once(char *s, const char *pattern,
1677                 const char *insert, size_t len);
1678 void string_sub(char *s,const char *pattern, const char *insert, size_t len);
1679 void fstring_sub(char *s,const char *pattern,const char *insert);
1680 char *realloc_string_sub2(char *string,
1681                         const char *pattern,
1682                         const char *insert,
1683                         bool remove_unsafe_characters,
1684                         bool allow_trailing_dollar);
1685 char *realloc_string_sub(char *string,
1686                         const char *pattern,
1687                         const char *insert);
1688 char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
1689                         const char *pattern,
1690                         const char *insert,
1691                         bool remove_unsafe_characters,
1692                         bool replace_once,
1693                         bool allow_trailing_dollar);
1694 char *talloc_string_sub(TALLOC_CTX *mem_ctx,
1695                         const char *src,
1696                         const char *pattern,
1697                         const char *insert);
1698 void all_string_sub(char *s,const char *pattern,const char *insert, size_t len);
1699 char *talloc_all_string_sub(TALLOC_CTX *ctx,
1700                                 const char *src,
1701                                 const char *pattern,
1702                                 const char *insert);
1703 char *octal_string(int i);
1704 char *string_truncate(char *s, unsigned int length);
1705 char *strchr_m(const char *src, char c);
1706 char *strrchr_m(const char *s, char c);
1707 char *strnrchr_m(const char *s, char c, unsigned int n);
1708 char *strstr_m(const char *src, const char *findstr);
1709 void strlower_m(char *s);
1710 void strupper_m(char *s);
1711 size_t strlen_m(const char *s);
1712 size_t strlen_m_term(const char *s);
1713 size_t strlen_m_term_null(const char *s);
1714 char *binary_string_rfc2254(char *buf, int len);
1715 char *binary_string(char *buf, int len);
1716 int fstr_sprintf(fstring s, const char *fmt, ...);
1717 char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
1718 bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src);
1719 bool str_list_compare(char **list1, char **list2);
1720 int str_list_count( const char **list );
1721 bool str_list_sub_basic( char **list, const char *smb_name,
1722                          const char *domain_name );
1723 bool str_list_substitute(char **list, const char *pattern, const char *insert);
1724 char *ipstr_list_make(char **ipstr_list,
1725                         const struct ip_service *ip_list,
1726                         int ip_count);
1727 int ipstr_list_parse(const char *ipstr_list, struct ip_service **ip_list);
1728 void ipstr_list_free(char* ipstr_list);
1729 void rfc1738_unescape(char *buf);
1730 DATA_BLOB base64_decode_data_blob(const char *s);
1731 void base64_decode_inplace(char *s);
1732 char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
1733 SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
1734 SMB_OFF_T conv_str_size(const char * str);
1735 void string_append(char **left, const char *right);
1736 bool add_string_to_array(TALLOC_CTX *mem_ctx,
1737                          const char *str, const char ***strings,
1738                          int *num);
1739 void sprintf_append(TALLOC_CTX *mem_ctx, char **string, ssize_t *len,
1740                     size_t *bufsize, const char *fmt, ...);
1741 int asprintf_strupper_m(char **strp, const char *fmt, ...);
1742 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...);
1743 char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...);
1744 char *sstring_sub(const char *src, char front, char back);
1745 bool validate_net_name( const char *name,
1746                 const char *invalid_chars,
1747                 int max_len);
1748 size_t ascii_len_n(const char *src, size_t n);
1749 size_t utf16_len(const void *buf);
1750 size_t utf16_len_n(const void *src, size_t n);
1751 char *escape_shell_string(const char *src);
1752
1753 /* The following definitions come from lib/util_unistr.c  */
1754
1755 void gfree_case_tables(void);
1756 void load_case_tables(void);
1757 void init_valid_table(void);
1758 size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate);
1759 char *skip_unibuf(char *src, size_t len);
1760 int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags);
1761 int rpcstr_pull_talloc(TALLOC_CTX *ctx,
1762                         char **dest,
1763                         void *src,
1764                         int src_len,
1765                         int flags);
1766 int rpcstr_pull_unistr2_fstring(char *dest, UNISTR2 *src);
1767 char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const UNISTR2 *src);
1768 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
1769 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
1770 void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
1771 void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
1772 char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
1773 const char *unistr2_static(const UNISTR2 *str);
1774 smb_ucs2_t toupper_w(smb_ucs2_t val);
1775 smb_ucs2_t tolower_w( smb_ucs2_t val );
1776 bool islower_w(smb_ucs2_t c);
1777 bool isupper_w(smb_ucs2_t c);
1778 bool isvalid83_w(smb_ucs2_t c);
1779 size_t strlen_w(const smb_ucs2_t *src);
1780 size_t strnlen_w(const smb_ucs2_t *src, size_t max);
1781 smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1782 smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c);
1783 smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1784 smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
1785 smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
1786 bool strlower_w(smb_ucs2_t *s);
1787 bool strupper_w(smb_ucs2_t *s);
1788 void strnorm_w(smb_ucs2_t *s, int case_default);
1789 int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1790 int strncmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1791 int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1792 int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1793 bool strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
1794 bool strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n);
1795 smb_ucs2_t *strdup_w(const smb_ucs2_t *src);
1796 smb_ucs2_t *strndup_w(const smb_ucs2_t *src, size_t len);
1797 smb_ucs2_t *strncpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1798 smb_ucs2_t *strncat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1799 smb_ucs2_t *strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src);
1800 void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc);
1801 bool trim_string_w(smb_ucs2_t *s, const smb_ucs2_t *front,
1802                                   const smb_ucs2_t *back);
1803 int strcmp_wa(const smb_ucs2_t *a, const char *b);
1804 int strncmp_wa(const smb_ucs2_t *a, const char *b, size_t len);
1805 smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p);
1806 smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins);
1807 int unistrlen(uint16 *s);
1808 int unistrcpy(uint16 *dst, uint16 *src);
1809 UNISTR2* ucs2_to_unistr2(TALLOC_CTX *ctx, UNISTR2* dst, smb_ucs2_t* src);
1810 int toupper_ascii(int c);
1811 int tolower_ascii(int c);
1812 int isupper_ascii(int c);
1813 int islower_ascii(int c);
1814
1815 /* The following definitions come from lib/util_uuid.c  */
1816
1817 void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr);
1818 void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu);
1819 void smb_uuid_generate_random(struct GUID *uu);
1820 const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu);
1821 bool smb_string_to_uuid(const char *in, struct GUID* uu);
1822 char *guid_binstring(const struct GUID *guid);
1823
1824 /* The following definitions come from lib/version.c  */
1825
1826 const char *samba_version_string(void);
1827
1828 /* The following definitions come from lib/winbind_util.c  */
1829
1830 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1831                          enum lsa_SidType *name_type);
1832 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1833                         const char **domain, const char **name,
1834                         enum lsa_SidType *name_type);
1835 bool winbind_ping(void);
1836 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1837 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1838 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1839 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1840 wbcErr wb_is_trusted_domain(const char *domain);
1841 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1842                          const DOM_SID *domain_sid,
1843                          int num_rids, uint32 *rids,
1844                          const char **domain_name,
1845                          const char ***names, enum lsa_SidType **types);
1846 bool winbind_allocate_uid(uid_t *uid);
1847 bool winbind_allocate_gid(gid_t *gid);
1848 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1849                          enum lsa_SidType *name_type);
1850 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1851                         const char **domain, const char **name,
1852                         enum lsa_SidType *name_type);
1853 bool winbind_ping(void);
1854 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1855 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1856 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1857 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1858 wbcErr wb_is_trusted_domain(const char *domain);
1859 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1860                          const DOM_SID *domain_sid,
1861                          int num_rids, uint32 *rids,
1862                          const char **domain_name,
1863                          const char ***names, enum lsa_SidType **types);
1864 bool winbind_allocate_uid(uid_t *uid);
1865 bool winbind_allocate_gid(gid_t *gid);
1866
1867 /* The following definitions come from lib/wins_srv.c  */
1868
1869 bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip);
1870 void wins_srv_alive(struct in_addr wins_ip, struct in_addr src_ip);
1871 void wins_srv_died(struct in_addr wins_ip, struct in_addr src_ip);
1872 unsigned wins_srv_count(void);
1873 char **wins_srv_tags(void);
1874 void wins_srv_tags_free(char **list);
1875 struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip);
1876 unsigned wins_srv_count_tag(const char *tag);
1877
1878 /* The following definitions come from lib/xfile.c  */
1879
1880 int x_setvbuf(XFILE *f, char *buf, int mode, size_t size);
1881 XFILE *x_fopen(const char *fname, int flags, mode_t mode);
1882 XFILE *x_fdup(const XFILE *f);
1883 int x_fclose(XFILE *f);
1884 size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f);
1885 int x_fileno(const XFILE *f);
1886 int x_fflush(XFILE *f);
1887 void x_setbuffer(XFILE *f, char *buf, size_t size);
1888 void x_setbuf(XFILE *f, char *buf);
1889 void x_setlinebuf(XFILE *f);
1890 int x_feof(XFILE *f);
1891 int x_ferror(XFILE *f);
1892 int x_fgetc(XFILE *f);
1893 size_t x_fread(void *p, size_t size, size_t nmemb, XFILE *f);
1894 char *x_fgets(char *s, int size, XFILE *stream) ;
1895 off_t x_tseek(XFILE *f, off_t offset, int whence);
1896
1897 /* The following definitions come from libads/ads_status.c  */
1898
1899 ADS_STATUS ads_build_error(enum ads_error_type etype, 
1900                            int rc, int minor_status);
1901 ADS_STATUS ads_build_nt_error(enum ads_error_type etype, 
1902                            NTSTATUS nt_status);
1903 NTSTATUS ads_ntstatus(ADS_STATUS status);
1904 const char *ads_errstr(ADS_STATUS status);
1905 NTSTATUS gss_err_to_ntstatus(uint32 maj, uint32 min);
1906
1907 /* The following definitions come from libads/ads_struct.c  */
1908
1909 char *ads_build_path(const char *realm, const char *sep, const char *field, int reverse);
1910 char *ads_build_dn(const char *realm);
1911 char *ads_build_domain(const char *dn);
1912 ADS_STRUCT *ads_init(const char *realm, 
1913                      const char *workgroup,
1914                      const char *ldap_server);
1915 void ads_destroy(ADS_STRUCT **ads);
1916
1917 /* The following definitions come from libads/ads_utils.c  */
1918
1919 uint32 ads_acb2uf(uint32 acb);
1920 uint32 ads_uf2acb(uint32 uf);
1921 uint32 ads_uf2atype(uint32 uf);
1922 uint32 ads_gtype2atype(uint32 gtype);
1923 enum lsa_SidType ads_atype_map(uint32 atype);
1924
1925 /* The following definitions come from libads/authdata.c  */
1926
1927 struct PAC_LOGON_INFO *get_logon_info_from_pac(struct PAC_DATA *pac_data);
1928 NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
1929                              const char *name,
1930                              const char *pass,
1931                              time_t time_offset,
1932                              time_t *expire_time,
1933                              time_t *renew_till_time,
1934                              const char *cache_name,
1935                              bool request_pac,
1936                              bool add_netbios_addr,
1937                              time_t renewable_time,
1938                              struct PAC_DATA **pac_ret);
1939 NTSTATUS kerberos_return_info3_from_pac(TALLOC_CTX *mem_ctx,
1940                                         const char *name,
1941                                         const char *pass,
1942                                         time_t time_offset,
1943                                         time_t *expire_time,
1944                                         time_t *renew_till_time,
1945                                         const char *cache_name,
1946                                         bool request_pac,
1947                                         bool add_netbios_addr,
1948                                         time_t renewable_time,
1949                                         struct netr_SamInfo3 **info3);
1950
1951 /* The following definitions come from libads/cldap.c  */
1952
1953 bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
1954                         const char *server,
1955                         const char *realm,
1956                         uint32_t *nt_version,
1957                         union nbt_cldap_netlogon **reply);
1958 bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
1959                           const char *server,
1960                           const char *realm,
1961                           struct nbt_cldap_netlogon_5 *reply5);
1962 bool pull_mailslot_cldap_reply(TALLOC_CTX *mem_ctx,
1963                                const DATA_BLOB *blob,
1964                                union nbt_cldap_netlogon *r,
1965                                uint32_t *nt_version);
1966
1967 /* The following definitions come from libads/disp_sec.c  */
1968
1969 void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, SEC_DESC *sd);
1970
1971 /* The following definitions come from libads/dns.c  */
1972
1973 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
1974                                 const char *dnsdomain,
1975                                 struct dns_rr_ns **nslist,
1976                                 int *numns);
1977 bool sitename_store(const char *realm, const char *sitename);
1978 char *sitename_fetch(const char *realm);
1979 bool stored_sitename_changed(const char *realm, const char *sitename);
1980 NTSTATUS ads_dns_query_dcs(TALLOC_CTX *ctx,
1981                            const char *realm,
1982                            const char *sitename,
1983                            struct dns_rr_srv **dclist,
1984                            int *numdcs );
1985 NTSTATUS ads_dns_query_gcs(TALLOC_CTX *ctx,
1986                            const char *realm,
1987                            const char *sitename,
1988                            struct dns_rr_srv **dclist,
1989                            int *numdcs );
1990 NTSTATUS ads_dns_query_kdcs(TALLOC_CTX *ctx,
1991                             const char *dns_forest_name,
1992                             const char *sitename,
1993                             struct dns_rr_srv **dclist,
1994                             int *numdcs );
1995 NTSTATUS ads_dns_query_pdc(TALLOC_CTX *ctx,
1996                            const char *dns_domain_name,
1997                            struct dns_rr_srv **dclist,
1998                            int *numdcs );
1999 NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
2000                                 const char *dns_forest_name,
2001                                 const struct GUID *domain_guid,
2002                                 struct dns_rr_srv **dclist,
2003                                 int *numdcs );
2004
2005 /* The following definitions come from libads/kerberos.c  */
2006
2007 int kerberos_kinit_password_ext(const char *principal,
2008                                 const char *password,
2009                                 int time_offset,
2010                                 time_t *expire_time,
2011                                 time_t *renew_till_time,
2012                                 const char *cache_name,
2013                                 bool request_pac,
2014                                 bool add_netbios_addr,
2015                                 time_t renewable_time,
2016                                 NTSTATUS *ntstatus);
2017 int ads_kinit_password(ADS_STRUCT *ads);
2018 int ads_kdestroy(const char *cc_name);
2019 char* kerberos_standard_des_salt( void );
2020 bool kerberos_secrets_store_des_salt( const char* salt );
2021 char* kerberos_secrets_fetch_des_salt( void );
2022 char *kerberos_get_default_realm_from_ccache( void );
2023 bool kerberos_secrets_store_salting_principal(const char *service,
2024                                               int enctype,
2025                                               const char *principal);
2026 int kerberos_kinit_password(const char *principal,
2027                             const char *password,
2028                             int time_offset,
2029                             const char *cache_name);
2030 bool create_local_private_krb5_conf_for_domain(const char *realm,
2031                                                 const char *domain,
2032                                                 const char *sitename,
2033                                                 struct sockaddr_storage *pss);
2034
2035 /* The following definitions come from libads/kerberos_keytab.c  */
2036
2037 int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
2038 int ads_keytab_flush(ADS_STRUCT *ads);
2039 int ads_keytab_create_default(ADS_STRUCT *ads);
2040 int ads_keytab_list(const char *keytab_name);
2041
2042 /* The following definitions come from libads/kerberos_verify.c  */
2043
2044 NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
2045                            const char *realm,
2046                            time_t time_offset,
2047                            const DATA_BLOB *ticket,
2048                            char **principal,
2049                            struct PAC_DATA **pac_data,
2050                            DATA_BLOB *ap_rep,
2051                            DATA_BLOB *session_key,
2052                            bool use_replay_cache);
2053
2054 /* The following definitions come from libads/krb5_errs.c  */
2055
2056
2057 /* The following definitions come from libads/krb5_setpw.c  */
2058
2059 ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ, 
2060                                  const char *newpw, int time_offset);
2061 ADS_STATUS kerberos_set_password(const char *kpasswd_server, 
2062                                  const char *auth_principal, const char *auth_password,
2063                                  const char *target_principal, const char *new_password,
2064                                  int time_offset);
2065 ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
2066                                     const char *machine_account,
2067                                     const char *password);
2068
2069 /* The following definitions come from libads/ldap.c  */
2070
2071 bool ads_sitename_match(ADS_STRUCT *ads);
2072 bool ads_closest_dc(ADS_STRUCT *ads);
2073 ADS_STATUS ads_connect(ADS_STRUCT *ads);
2074 ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
2075 ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
2076 void ads_disconnect(ADS_STRUCT *ads);
2077 ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
2078                                 int scope, const char *expr, const char **attrs,
2079                                 bool (*fn)(ADS_STRUCT *, char *, void **, void *), 
2080                                 void *data_area);
2081 void ads_memfree(ADS_STRUCT *ads, void *mem);
2082 char *ads_parent_dn(const char *dn);
2083 ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
2084 ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods, 
2085                        const char *name, const char *val);
2086 ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2087                            const char *name, const char **vals);
2088 ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods);
2089 ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods);
2090 ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn);
2091 char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit);
2092 char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
2093 ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2094                                 const char *name, const char **vals);
2095 uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
2096 uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
2097 ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
2098 ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name, 
2099                                           const char *my_fqdn, const char *spn);
2100 ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2101                                    const char *org_unit);
2102 ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2103                                  const char *org_unit, bool *moved);
2104 int ads_count_replies(ADS_STRUCT *ads, void *res);
2105 ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn);
2106 ADS_STATUS ads_current_time(ADS_STRUCT *ads);
2107 ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32 *val);
2108 ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, DOM_SID *sid);
2109 ADS_STATUS ads_site_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char **site_name);
2110 ADS_STATUS ads_site_dn_for_machine(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site_dn);
2111 ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffixes, size_t *num_suffixes);
2112 ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
2113                                 TALLOC_CTX *mem_ctx,
2114                                 char ***ous,
2115                                 size_t *num_ous);
2116 bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx, 
2117                                   const char *extended_dn, 
2118                                   enum ads_extended_dn_flags flags, 
2119                                   DOM_SID *sid);
2120 char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2121 char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2122 char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2123 ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
2124                         uint32 account_type, const char *org_unit);
2125 ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname);
2126 ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
2127                                TALLOC_CTX *mem_ctx,
2128                                const char *samaccountname,
2129                                uint32 *uac_ret,
2130                                const char **dn_ret);
2131 ADS_STATUS ads_config_path(ADS_STRUCT *ads, 
2132                            TALLOC_CTX *mem_ctx, 
2133                            char **config_path);
2134 const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads, 
2135                                                 const char *config_path, 
2136                                                 TALLOC_CTX *mem_ctx, 
2137                                                 const struct GUID *rights_guid);
2138 ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
2139                            ADS_STRUCT *ads,
2140                            const char **account_ou);
2141
2142 /* The following definitions come from libads/ldap_printer.c  */
2143
2144 ADS_STATUS ads_mod_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2145                                  TALLOC_CTX *ctx, const ADS_MODLIST *mods);
2146 ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2147                                         TALLOC_CTX *ctx, ADS_MODLIST *mods);
2148 WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, 
2149                                           TALLOC_CTX *mem_ctx,
2150                                           ADS_MODLIST *mods,
2151                                           const char *printer);
2152 bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
2153                                        ADS_MODLIST *mods,
2154                                        NT_PRINTER_DATA *data);
2155
2156 /* The following definitions come from libads/ldap_schema.c  */
2157
2158 ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
2159                                      const char *schema_path,
2160                                      const char **OIDs, size_t num_OIDs, 
2161                                      char ***OIDs_out, char ***names, size_t *count);
2162 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
2163                                      const char *schema_path, 
2164                                      TALLOC_CTX *mem_ctx, 
2165                                      const struct GUID *schema_guid);
2166 const char *ads_get_attrname_by_oid(ADS_STRUCT *ads, const char *schema_path, TALLOC_CTX *mem_ctx, const char * OID);
2167 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
2168 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
2169                                           ADS_STRUCT *ads,
2170                                           enum wb_posix_mapping map_type,
2171                                           struct posix_schema **s ) ;
2172
2173 /* The following definitions come from libads/ldap_user.c  */
2174
2175 ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user, 
2176                              const char *container, const char *fullname);
2177 ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group, 
2178                               const char *container, const char *comment);
2179
2180 /* The following definitions come from libads/ldap_utils.c  */
2181
2182 ADS_STATUS ads_ranged_search(ADS_STRUCT *ads, 
2183                              TALLOC_CTX *mem_ctx,
2184                              int scope,
2185                              const char *base,
2186                              const char *filter,
2187                              void *args,
2188                              const char *range_attr,
2189                              char ***strings,
2190                              size_t *num_strings);
2191 ADS_STATUS ads_ranged_search_internal(ADS_STRUCT *ads, 
2192                                       TALLOC_CTX *mem_ctx,
2193                                       int scope,
2194                                       const char *base,
2195                                       const char *filter,
2196                                       const char **attrs,
2197                                       void *args,
2198                                       const char *range_attr,
2199                                       char ***strings,
2200                                       size_t *num_strings,
2201                                       uint32 *first_usn,
2202                                       int *num_retries,
2203                                       bool *more_values);
2204
2205 /* The following definitions come from libads/ndr.c  */
2206
2207 void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r);
2208 void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r);
2209
2210 /* The following definitions come from libads/sasl.c  */
2211
2212 ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads);
2213
2214 /* The following definitions come from libads/sasl_wrapping.c  */
2215
2216 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2217                                    const struct ads_saslwrap_ops *ops,
2218                                    void *private_data);
2219 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2220                                    const struct ads_saslwrap_ops *ops,
2221                                    void *private_data);
2222
2223 /* The following definitions come from libads/util.c  */
2224
2225 ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_principal);
2226 ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
2227                                        char **returned_principal);
2228
2229 /* The following definitions come from libcli/nbt/nbtname.c  */
2230
2231 _PUBLIC_ void ndr_print_nbt_string(struct ndr_print *ndr, const char *name, const char *s);
2232 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s);
2233 _PUBLIC_ enum ndr_err_code ndr_push_nbt_string(struct ndr_push *ndr, int ndr_flags, const char *s);
2234 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r);
2235 _PUBLIC_ enum ndr_err_code ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r);
2236 _PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
2237 _PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name);
2238 _PUBLIC_ NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
2239 _PUBLIC_ void nbt_choose_called_name(TALLOC_CTX *mem_ctx,
2240                             struct nbt_name *n, const char *name, int type);
2241 _PUBLIC_ char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name);
2242 _PUBLIC_ enum ndr_err_code ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, const struct nbt_name **_r);
2243 _PUBLIC_ enum ndr_err_code ndr_push_wrepl_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r);
2244 _PUBLIC_ void ndr_print_wrepl_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r);
2245
2246 /* The following definitions come from libgpo/gpext/gpext.c  */
2247
2248 struct gp_extension *get_gp_extension_list(void);
2249 NTSTATUS unregister_gp_extension(const char *name);
2250 NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
2251                                int version,
2252                                const char *name,
2253                                const char *guid,
2254                                struct gp_extension_methods *methods);
2255 NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
2256                                const char *module,
2257                                const char *ext_guid,
2258                                struct gp_extension_reg_table *table,
2259                                struct gp_extension_reg_info *info);
2260 NTSTATUS shutdown_gp_extensions(void);
2261 NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx);
2262 NTSTATUS free_gp_extensions(void);
2263 void debug_gpext_header(int lvl,
2264                         const char *name,
2265                         uint32_t flags,
2266                         struct GROUP_POLICY_OBJECT *gpo,
2267                         const char *extension_guid,
2268                         const char *snapin_guid);
2269 NTSTATUS process_gpo_list_with_extension(ADS_STRUCT *ads,
2270                            TALLOC_CTX *mem_ctx,
2271                            uint32_t flags,
2272                            const struct nt_user_token *token,
2273                            struct GROUP_POLICY_OBJECT *gpo_list,
2274                            const char *extension_guid,
2275                            const char *snapin_guid);
2276 NTSTATUS gpext_process_extension(ADS_STRUCT *ads,
2277                                  TALLOC_CTX *mem_ctx,
2278                                  uint32_t flags,
2279                                  const struct nt_user_token *token,
2280                                  struct registry_key *root_key,
2281                                  struct GROUP_POLICY_OBJECT *gpo,
2282                                  const char *extension_guid,
2283                                  const char *snapin_guid);
2284
2285 /* The following definitions come from libgpo/gpo_fetch.c  */
2286
2287 NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
2288                                  const char *file_sys_path,
2289                                  char **server,
2290                                  char **service,
2291                                  char **nt_path,
2292                                  char **unix_path);
2293 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
2294                          struct cli_state *cli,
2295                          struct GROUP_POLICY_OBJECT *gpo);
2296 NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx,
2297                                     const char *unix_path,
2298                                     uint32_t *sysvol_version,
2299                                     char **display_name);
2300
2301 /* The following definitions come from libgpo/gpo_filesync.c  */
2302
2303 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
2304                        struct cli_state *cli,
2305                        const char *nt_path,
2306                        const char *unix_path);
2307 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
2308                               struct cli_state *cli,
2309                               const char *nt_path,
2310                               const char *local_path);
2311
2312 /* The following definitions come from libgpo/gpo_ini.c  */
2313
2314 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
2315                        const char *filename,
2316                        uint32_t *version,
2317                        char **display_name);
2318
2319 /* The following definitions come from libgpo/gpo_ldap.c  */
2320
2321 bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
2322                       const char *extension_raw,
2323                       struct GP_EXT **gp_ext);
2324 ADS_STATUS ads_get_gpo_link(ADS_STRUCT *ads,
2325                             TALLOC_CTX *mem_ctx,
2326                             const char *link_dn,
2327                             struct GP_LINK *gp_link_struct);
2328 ADS_STATUS ads_add_gpo_link(ADS_STRUCT *ads,
2329                             TALLOC_CTX *mem_ctx,
2330                             const char *link_dn,
2331                             const char *gpo_dn,
2332                             uint32_t gpo_opt);
2333 ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads,
2334                                TALLOC_CTX *mem_ctx,
2335                                const char *link_dn,
2336                                const char *gpo_dn);
2337 ADS_STATUS ads_get_gpo(ADS_STRUCT *ads,
2338                        TALLOC_CTX *mem_ctx,
2339                        const char *gpo_dn,
2340                        const char *display_name,
2341                        const char *guid_name,
2342                        struct GROUP_POLICY_OBJECT *gpo);
2343 ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
2344                              TALLOC_CTX *mem_ctx,
2345                              const char *dn,
2346                              struct nt_user_token **token);
2347 ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
2348                             TALLOC_CTX *mem_ctx,
2349                             const char *dn,
2350                             uint32_t flags,
2351                             const struct nt_user_token *token,
2352                             struct GROUP_POLICY_OBJECT **gpo_list);
2353
2354 /* The following definitions come from libgpo/gpo_reg.c  */
2355
2356 struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
2357 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
2358                        const char *initial_path,
2359                        uint32_t desired_access,
2360                        const struct nt_user_token *token,
2361                        struct gp_registry_context **reg_ctx);
2362 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
2363 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
2364                            const char *subkeyname,
2365                            struct registry_key *curr_key,
2366                            struct registry_key **new_key);
2367 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
2368                           struct gp_registry_context *reg_ctx,
2369                           const char *subkeyname,
2370                           struct registry_key **key);
2371 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
2372                            struct registry_key *key,
2373                            const char *val_name,
2374                            const char *val);
2375 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
2376                           struct registry_key *key,
2377                           const char *val_name,
2378                           const char **val);
2379 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
2380                           uint32_t flags,
2381                           const char *dn,
2382                           const struct nt_user_token *token,
2383                           struct GROUP_POLICY_OBJECT *gpo_list);
2384 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
2385                          uint32_t flags,
2386                          const DOM_SID *sid,
2387                          struct GROUP_POLICY_OBJECT **gpo_list);
2388 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
2389                      uint32_t flags,
2390                      struct registry_key *key,
2391                      const DOM_SID *sid);
2392 void dump_reg_val(int lvl, const char *direction,
2393                   const char *key, const char *subkey,
2394                   struct registry_value *val);
2395 void dump_reg_entry(uint32_t flags,
2396                     const char *dir,
2397                     struct gp_registry_entry *entry);
2398 void dump_reg_entries(uint32_t flags,
2399                       const char *dir,
2400                       struct gp_registry_entry *entries,
2401                       size_t num_entries);
2402 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
2403                                     struct gp_registry_entry *entry,
2404                                     struct gp_registry_entry **entries,
2405                                     size_t *num);
2406 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
2407                                 struct registry_key *root_key,
2408                                 struct gp_registry_context *reg_ctx,
2409                                 struct gp_registry_entry *entry,
2410                                 const struct nt_user_token *token,
2411                                 uint32_t flags);
2412
2413 /* The following definitions come from libgpo/gpo_sec.c  */
2414
2415 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo,
2416                                       const struct nt_user_token *token);
2417
2418 /* The following definitions come from libgpo/gpo_util.c  */
2419
2420 const char *cse_gpo_guid_string_to_name(const char *guid);
2421 const char *cse_gpo_name_to_guid_string(const char *name);
2422 const char *cse_snapin_gpo_guid_string_to_name(const char *guid);
2423 void dump_gp_ext(struct GP_EXT *gp_ext, int debuglevel);
2424 void dump_gpo(ADS_STRUCT *ads,
2425               TALLOC_CTX *mem_ctx,
2426               struct GROUP_POLICY_OBJECT *gpo,
2427               int debuglevel);
2428 void dump_gpo_list(ADS_STRUCT *ads,
2429                    TALLOC_CTX *mem_ctx,
2430                    struct GROUP_POLICY_OBJECT *gpo_list,
2431                    int debuglevel);
2432 void dump_gplink(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct GP_LINK *gp_link);
2433 ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
2434                              TALLOC_CTX *mem_ctx,
2435                              const struct nt_user_token *token,
2436                              struct registry_key *root_key,
2437                              struct GROUP_POLICY_OBJECT *gpo,
2438                              const char *extension_guid_filter,
2439                              uint32_t flags);
2440 ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
2441                                 TALLOC_CTX *mem_ctx,
2442                                 const struct nt_user_token *token,
2443                                 struct GROUP_POLICY_OBJECT *gpo_list,
2444                                 const char *extensions_guid_filter,
2445                                 uint32_t flags);
2446 NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
2447                            TALLOC_CTX *mem_ctx,
2448                            uint32_t flags,
2449                            struct GROUP_POLICY_OBJECT *gpo,
2450                            struct cli_state **cli_out);
2451 NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
2452                                 TALLOC_CTX *mem_ctx,
2453                                 uint32_t flags,
2454                                 struct GROUP_POLICY_OBJECT *gpo_list);
2455 NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx,
2456                            struct GROUP_POLICY_OBJECT *gpo,
2457                            char **unix_path);
2458 char *gpo_flag_str(uint32_t flags);
2459 NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
2460                       uint32_t flags,
2461                       const char *filename,
2462                       const char *suffix,
2463                       const char **filename_out);
2464 ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
2465                                 TALLOC_CTX *mem_ctx,
2466                                 const char *dn,
2467                                 struct nt_user_token **token);
2468
2469 /* The following definitions come from librpc/gen_ndr/ndr_dfs.c  */
2470
2471 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r);
2472 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r);
2473 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r);
2474 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2475 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2476 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r);
2477 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r);
2478 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2479 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2480 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r);
2481 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r);
2482 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r);
2483 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r);
2484 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2485 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2486 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2487 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r);
2488 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r);
2489 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r);
2490 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r);
2491 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r);
2492 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r);
2493 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r);
2494 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r);
2495 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r);
2496 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r);
2497 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r);
2498 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r);
2499 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r);
2500 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r);
2501 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r);
2502 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r);
2503 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r);
2504 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r);
2505 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r);
2506 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r);
2507 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r);
2508 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r);
2509 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r);
2510 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r);
2511 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r);
2512 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r);
2513 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r);
2514 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r);
2515 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r);
2516 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r);
2517 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r);
2518 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r);
2519 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r);
2520 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r);
2521 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r);
2522 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r);
2523 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r);
2524 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r);
2525 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r);
2526 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r);
2527 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r);
2528 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r);
2529 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r);
2530 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r);
2531 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r);
2532 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r);
2533 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r);
2534 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r);
2535 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r);
2536 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r);
2537 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r);
2538 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r);
2539 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r);
2540 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r);
2541 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r);
2542
2543 /* The following definitions come from librpc/gen_ndr/ndr_dssetup.c  */
2544
2545 _PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r);
2546 _PUBLIC_ void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2547 _PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r);
2548 _PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r);
2549 _PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r);
2550 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r);
2551 _PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r);
2552 _PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r);
2553 _PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r);
2554 _PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r);
2555 _PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r);
2556 _PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r);
2557 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r);
2558 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r);
2559 _PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r);
2560 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r);
2561 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r);
2562 _PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r);
2563 _PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r);
2564 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r);
2565 _PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
2566
2567 /* The following definitions come from librpc/gen_ndr/ndr_echo.c  */
2568
2569 _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r);
2570 _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r);
2571 _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r);
2572 _PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r);
2573 _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r);
2574 _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r);
2575 _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r);
2576 _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const union echo_Info *r);
2577 _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum echo_Enum1 r);
2578 _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, enum echo_Enum1_32 r);
2579 _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, const struct echo_Enum2 *r);
2580 _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, const union echo_Enum3 *r);
2581 _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r);
2582 _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, const struct echo_AddOne *r);
2583 _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, const struct echo_EchoData *r);
2584 _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SinkData *r);
2585 _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SourceData *r);
2586 _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall *r);
2587 _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r);
2588 _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSleep *r);
2589 _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r);
2590 _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r);
2591 _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r);
2592
2593 /* The following definitions come from librpc/gen_ndr/ndr_eventlog.c  */
2594
2595 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r);
2596 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r);
2597 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r);
2598 _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, const struct eventlog_Record *r);
2599 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r);
2600 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r);
2601 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r);
2602 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r);
2603 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r);
2604 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r);
2605 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r);
2606 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r);
2607 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r);
2608 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r);
2609 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r);
2610 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r);
2611 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r);
2612 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r);
2613 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r);
2614 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r);
2615 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r);
2616 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r);
2617 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r);
2618 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r);
2619 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r);
2620 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r);
2621 _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
2622 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
2623
2624 /* The following definitions come from librpc/gen_ndr/ndr_initshutdown.c  */
2625
2626 _PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
2627 _PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
2628 _PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
2629 _PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
2630 _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
2631 _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
2632 _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
2633
2634 /* The following definitions come from librpc/gen_ndr/ndr_krb5pac.c  */
2635
2636 _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
2637 _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r);
2638 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
2639 _PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
2640 _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
2641 _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);
2642 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
2643 _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
2644 _PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r);
2645 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r);
2646 _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r);
2647 _PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r);
2648 _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
2649 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
2650 _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
2651 _PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
2652 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r);
2653 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r);
2654 _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r);
2655 _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r);
2656 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r);
2657 _PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r);
2658 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r);
2659 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r);
2660 _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r);
2661 _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r);
2662 _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r);
2663 _PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r);
2664 _PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r);
2665 _PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r);
2666 _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r);
2667
2668 /* The following definitions come from librpc/gen_ndr/ndr_lsa.c  */
2669
2670 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r);
2671 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r);
2672 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r);
2673 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r);
2674 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r);
2675 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r);
2676 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r);
2677 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r);
2678 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r);
2679 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r);
2680 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r);
2681 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r);
2682 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r);
2683 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r);
2684 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r);
2685 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r);
2686 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r);
2687 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r);
2688 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r);
2689 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r);
2690 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r);
2691 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r);
2692 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r);
2693 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2694 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2695 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
2696 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r);
2697 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r);
2698 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r);
2699 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r);
2700 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r);
2701 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r);
2702 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r);
2703 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r);
2704 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r);
2705 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r);
2706 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r);
2707 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r);
2708 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r);
2709 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r);
2710 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r);
2711 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r);
2712 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r);
2713 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r);
2714 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r);
2715 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r);
2716 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r);
2717 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r);
2718 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r);
2719 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r);
2720 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r);
2721 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r);
2722 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r);
2723 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r);
2724 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
2725 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
2726 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
2727 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
2728 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
2729 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
2730 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
2731 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r);
2732 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
2733 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
2734 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
2735 _PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
2736 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
2737 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
2738 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
2739 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
2740 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r);
2741 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r);
2742 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r);
2743 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r);
2744 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r);
2745 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r);
2746 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r);
2747 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r);
2748 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r);
2749 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r);
2750 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r);
2751 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r);
2752 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r);
2753 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r);
2754 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r);
2755 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r);
2756 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r);
2757 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r);
2758 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r);
2759 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r);
2760 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r);
2761 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r);
2762 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r);
2763 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r);
2764 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r);
2765 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r);
2766 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r);
2767 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r);
2768 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r);
2769 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r);
2770 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r);
2771 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r);
2772 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r);
2773 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r);
2774 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r);
2775 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r);
2776 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r);
2777 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r);
2778 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r);
2779 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r);
2780 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r);
2781 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r);
2782 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r);
2783 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r);
2784 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r);
2785 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r);
2786 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r);
2787 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r);
2788 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r);
2789 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r);
2790 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r);
2791 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r);
2792 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r);
2793 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r);
2794 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r);
2795 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r);
2796 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r);
2797 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r);
2798 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r);
2799 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r);
2800 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r);
2801 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r);
2802 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r);
2803 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r);
2804 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r);
2805 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r);
2806 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r);
2807 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r);
2808 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r);
2809 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r);
2810 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r);
2811 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r);
2812 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r);
2813 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r);
2814 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r);
2815 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r);
2816 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r);
2817 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r);
2818 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r);
2819 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r);
2820 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r);
2821 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r);
2822 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r);
2823 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r);
2824 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r);
2825 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r);
2826 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r);
2827 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r);
2828 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r);
2829 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r);
2830 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r);
2831 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r);
2832 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r);
2833 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r);
2834 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r);
2835 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r);
2836 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r);
2837 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r);
2838 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r);
2839 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r);
2840 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r);
2841 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r);
2842 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r);
2843 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r);
2844 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r);
2845 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r);
2846 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r);
2847 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r);
2848 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r);
2849 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r);
2850 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r);
2851 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
2852 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r);
2853 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r);
2854 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r);
2855 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r);
2856 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r);
2857 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r);
2858 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r);
2859 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r);
2860 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r);
2861 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r);
2862 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r);
2863 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r);
2864 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
2865 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r);
2866 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r);
2867 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r);
2868 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r);
2869 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r);
2870 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r);
2871 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
2872 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
2873 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r);
2874
2875 /* The following definitions come from librpc/gen_ndr/ndr_misc.c  */
2876
2877 _PUBLIC_ enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r);
2878 _PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r);
2879 _PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, int flags);
2880 _PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r);
2881 _PUBLIC_ enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r);
2882 _PUBLIC_ void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r);
2883 _PUBLIC_ enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
2884 _PUBLIC_ enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
2885 _PUBLIC_ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
2886 _PUBLIC_ enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r);
2887 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r);
2888 _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r);
2889 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r);
2890 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r);
2891 _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r);
2892 _PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r);
2893 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r);
2894 _PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r);
2895
2896 /* The following definitions come from librpc/gen_ndr/ndr_nbt.c  */
2897
2898 _PUBLIC_ void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r);
2899 _PUBLIC_ void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r);
2900 _PUBLIC_ void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r);
2901 _PUBLIC_ void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r);
2902 _PUBLIC_ void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r);
2903 _PUBLIC_ void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r);
2904 _PUBLIC_ void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r);
2905 _PUBLIC_ void ndr_print_nbt_rdata_address(struct ndr_print *ndr, const char *name, const struct nbt_rdata_address *r);
2906 _PUBLIC_ void ndr_print_nbt_rdata_netbios(struct ndr_print *ndr, const char *name, const struct nbt_rdata_netbios *r);
2907 _PUBLIC_ void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const struct nbt_statistics *r);
2908 _PUBLIC_ void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r);
2909 _PUBLIC_ void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r);
2910 _PUBLIC_ void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r);
2911 _PUBLIC_ void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r);
2912 _PUBLIC_ void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r);
2913 _PUBLIC_ enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r);
2914 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r);
2915 _PUBLIC_ void ndr_print_nbt_name_packet(struct ndr_print *ndr, const char *name, const struct nbt_name_packet *r);
2916 _PUBLIC_ void ndr_print_dgram_msg_type(struct ndr_print *ndr, const char *name, enum dgram_msg_type r);
2917 _PUBLIC_ void ndr_print_dgram_flags(struct ndr_print *ndr, const char *name, uint8_t r);
2918 _PUBLIC_ void ndr_print_smb_command(struct ndr_print *ndr, const char *name, enum smb_command r);
2919 _PUBLIC_ void ndr_print_smb_trans_body(struct ndr_print *ndr, const char *name, const struct smb_trans_body *r);
2920 _PUBLIC_ void ndr_print_smb_body(struct ndr_print *ndr, const char *name, const union smb_body *r);
2921 _PUBLIC_ enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int ndr_flags, const struct dgram_smb_packet *r);
2922 _PUBLIC_ enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int ndr_flags, struct dgram_smb_packet *r);
2923 _PUBLIC_ void ndr_print_dgram_smb_packet(struct ndr_print *ndr, const char *name, const struct dgram_smb_packet *r);
2924 _PUBLIC_ void ndr_print_dgram_message_body(struct ndr_print *ndr, const char *name, const union dgram_message_body *r);
2925 _PUBLIC_ void ndr_print_dgram_message(struct ndr_print *ndr, const char *name, const struct dgram_message *r);
2926 _PUBLIC_ void ndr_print_dgram_err_code(struct ndr_print *ndr, const char *name, enum dgram_err_code r);
2927 _PUBLIC_ void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union dgram_data *r);
2928 _PUBLIC_ enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r);
2929 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r);
2930 _PUBLIC_ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r);
2931 _PUBLIC_ void ndr_print_nbt_netlogon_command(struct ndr_print *ndr, const char *name, enum nbt_netlogon_command r);
2932 _PUBLIC_ void ndr_print_nbt_netlogon_version(struct ndr_print *ndr, const char *name, uint32_t r);
2933 _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r);
2934 _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc2 *r);
2935 _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r);
2936 _PUBLIC_ void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r);
2937 _PUBLIC_ void ndr_print_nbt_dc_sock_addr(struct ndr_print *ndr, const char *name, const struct nbt_dc_sock_addr *r);
2938 _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc2 *r);
2939 _PUBLIC_ void ndr_print_nbt_db_change(struct ndr_print *ndr, const char *name, const struct nbt_db_change *r);
2940 _PUBLIC_ void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_announce_uas *r);
2941 _PUBLIC_ void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r);
2942 _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r);
2943 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r);
2944 _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r);
2945 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_1(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_1 *r);
2946 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_3(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_3 *r);
2947 _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);
2948 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_5(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_5 *r);
2949 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_5(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_5 *r);
2950 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_13(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_13 *r);
2951 _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);
2952 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_15(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_15 *r);
2953 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_15(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_15 *r);
2954 _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);
2955 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_29(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_29 *r);
2956 _PUBLIC_ void ndr_print_nbt_cldap_netlogon_29(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_29 *r);
2957 _PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon(struct ndr_push *ndr, int ndr_flags, const union nbt_cldap_netlogon *r);
2958 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon(struct ndr_pull *ndr, int ndr_flags, union nbt_cldap_netlogon *r);
2959 _PUBLIC_ void ndr_print_nbt_cldap_netlogon(struct ndr_print *ndr, const char *name, const union nbt_cldap_netlogon *r);
2960 _PUBLIC_ void ndr_print_nbt_ntlogon_command(struct ndr_print *ndr, const char *name, enum nbt_ntlogon_command r);
2961 _PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon *r);
2962 _PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon_reply(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon_reply *r);
2963 _PUBLIC_ void ndr_print_nbt_ntlogon_request(struct ndr_print *ndr, const char *name, const union nbt_ntlogon_request *r);
2964 _PUBLIC_ enum ndr_err_code ndr_push_nbt_ntlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_packet *r);
2965 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_ntlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_packet *r);
2966 _PUBLIC_ void ndr_print_nbt_ntlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_packet *r);
2967 _PUBLIC_ void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r);
2968 _PUBLIC_ void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r);
2969 _PUBLIC_ void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r);
2970 _PUBLIC_ void ndr_print_nbt_browse_election_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_election_request *r);
2971 _PUBLIC_ void ndr_print_nbt_browse_backup_list_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_request *r);
2972 _PUBLIC_ void ndr_print_nbt_browse_backup_list_response(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_response *r);
2973 _PUBLIC_ void ndr_print_nbt_browse_become_backup(struct ndr_print *ndr, const char *name, const struct nbt_browse_become_backup *r);
2974 _PUBLIC_ void ndr_print_nbt_browse_domain_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_domain_announcement *r);
2975 _PUBLIC_ void ndr_print_nbt_browse_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_master_announcement *r);
2976 _PUBLIC_ void ndr_print_nbt_browse_reset_state(struct ndr_print *ndr, const char *name, const struct nbt_browse_reset_state *r);
2977 _PUBLIC_ void ndr_print_nbt_browse_local_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_local_master_announcement *r);
2978 _PUBLIC_ void ndr_print_nbt_browse_payload(struct ndr_print *ndr, const char *name, const union nbt_browse_payload *r);
2979 _PUBLIC_ enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_packet *r);
2980 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_packet *r);
2981 _PUBLIC_ void ndr_print_nbt_browse_packet(struct ndr_print *ndr, const char *name, const struct nbt_browse_packet *r);
2982
2983 /* The following definitions come from librpc/gen_ndr/ndr_netlogon.c  */
2984
2985 _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r);
2986 _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r);
2987 _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r);
2988 _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r);
2989 _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r);
2990 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2991 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2992 _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r);
2993 _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r);
2994 _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
2995 _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
2996 _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
2997 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r);
2998 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r);
2999 _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r);
3000 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
3001 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r);
3002 _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r);
3003 _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r);
3004 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r);
3005 _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r);
3006 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3007 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3008 _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3009 _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r);
3010 _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r);
3011 _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r);
3012 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r);
3013 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r);
3014 _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r);
3015 _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r);
3016 _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r);
3017 _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
3018 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r);
3019 _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r);
3020 _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r);
3021 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r);
3022 _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r);
3023 _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
3024 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r);
3025 _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r);
3026 _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r);
3027 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r);
3028 _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r);
3029 _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r);
3030 _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r);
3031 _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r);
3032 _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r);
3033 _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r);
3034 _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r);
3035 _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r);
3036 _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r);
3037 _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r);
3038 _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r);
3039 _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r);
3040 _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r);
3041 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r);
3042 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r);
3043 _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r);
3044 _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r);
3045 _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r);
3046 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_TRUST *r);
3047 _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r);
3048 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_ACCOUNT *r);
3049 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_SECRET *r);
3050 _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r);
3051 _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r);
3052 _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r);
3053 _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r);
3054 _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r);
3055 _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r);
3056 _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r);
3057 _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r);
3058 _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r);
3059 _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3060 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r);
3061 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r);
3062 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r);
3063 _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r);
3064 _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r);
3065 _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r);
3066 _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3067 _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
3068 _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r);
3069 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r);
3070 _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3071 _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
3072 _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
3073 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
3074 _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r);
3075 _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
3076 _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
3077 _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r);
3078 _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r);
3079 _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r);
3080 _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r);
3081 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r);
3082 _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r);
3083 _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3084 _PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
3085 _PUBLIC_ void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
3086 _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
3087 _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r);
3088 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r);
3089 _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r);
3090 _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r);
3091 _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r);
3092 _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r);
3093 _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r);
3094 _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r);
3095 _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r);
3096 _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r);
3097 _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r);
3098 _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r);
3099 _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r);
3100 _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r);
3101 _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r);
3102 _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r);
3103 _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r);
3104 _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r);
3105 _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r);
3106 _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r);
3107 _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r);
3108 _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r);
3109 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r);
3110 _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r);
3111 _PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r);
3112 _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
3113 _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r);
3114 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
3115 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
3116 _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r);
3117 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r);
3118 _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r);
3119 _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r);
3120 _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r);
3121 _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r);
3122 _PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r);
3123 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r);
3124 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r);
3125 _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
3126 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r);
3127 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r);
3128 _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r);
3129 _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r);
3130 _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r);
3131 _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r);
3132 _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r);
3133 _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r);
3134 _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r);
3135 _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r);
3136 _PUBLIC_ void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r);
3137
3138 /* The following definitions come from librpc/gen_ndr/ndr_notify.c  */
3139
3140 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r);
3141 _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r);
3142 _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r);
3143 _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r);
3144 _PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r);
3145 _PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r);
3146 _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r);
3147 _PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r);
3148 _PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r);
3149 _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r);
3150
3151 /* The following definitions come from librpc/gen_ndr/ndr_ntsvcs.c  */
3152
3153 _PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r);
3154 _PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r);
3155 _PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r);
3156 _PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r);
3157 _PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r);
3158 _PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r);
3159 _PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r);
3160 _PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r);
3161 _PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r);
3162 _PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r);
3163 _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r);
3164 _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r);
3165 _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r);
3166 _PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r);
3167 _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r);
3168 _PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r);
3169 _PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r);
3170 _PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r);
3171 _PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r);
3172 _PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r);
3173 _PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r);
3174 _PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r);
3175 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r);
3176 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r);
3177 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r);
3178 _PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r);
3179 _PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r);
3180 _PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r);
3181 _PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r);
3182 _PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r);
3183 _PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r);
3184 _PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r);
3185 _PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r);
3186 _PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r);
3187 _PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r);
3188 _PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r);
3189 _PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r);
3190 _PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r);
3191 _PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r);
3192 _PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r);
3193 _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r);
3194 _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r);
3195 _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r);
3196 _PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r);
3197 _PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r);
3198 _PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r);
3199 _PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r);
3200 _PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r);
3201 _PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r);
3202 _PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r);
3203 _PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r);
3204 _PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r);
3205 _PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r);
3206 _PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r);
3207 _PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r);
3208 _PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r);
3209 _PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r);
3210 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r);
3211 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r);
3212 _PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r);
3213 _PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r);
3214 _PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r);
3215 _PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r);
3216 _PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r);
3217 _PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r);
3218 _PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r);
3219
3220 /* The following definitions come from librpc/gen_ndr/ndr_samr.c  */
3221
3222 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3223 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3224 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3225 _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3226 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3227 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3228 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3229 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3230 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r);
3231 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r);
3232 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r);
3233 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3234 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3235 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
3236 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
3237 _PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r);
3238 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
3239 _PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r);
3240 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
3241 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
3242 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
3243 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
3244 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
3245 _PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r);
3246 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
3247 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
3248 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
3249 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r);
3250 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3251 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3252 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r);
3253 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r);
3254 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r);
3255 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r);
3256 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r);
3257 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r);
3258 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r);
3259 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r);
3260 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r);
3261 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r);
3262 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r);
3263 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r);
3264 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r);
3265 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r);
3266 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r);
3267 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r);
3268 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r);
3269 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r);
3270 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r);
3271 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r);
3272 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r);
3273 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r);
3274 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r);
3275 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r);
3276 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r);
3277 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r);
3278 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r);
3279 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r);
3280 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
3281 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
3282 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
3283 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r);
3284 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r);
3285 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3286 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r);
3287 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r);
3288 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r);
3289 _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r);
3290 _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r);
3291 _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r);
3292 _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r);
3293 _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r);
3294 _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r);
3295 _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r);
3296 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r);
3297 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r);
3298 _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r);
3299 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r);
3300 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r);
3301 _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r);
3302 _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r);
3303 _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r);
3304 _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r);
3305 _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r);
3306 _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r);
3307 _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r);
3308 _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r);
3309 _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r);
3310 _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r);
3311 _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r);
3312 _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r);
3313 _PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r);
3314 _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r);
3315 _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r);
3316 _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3317 _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r);
3318 _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r);
3319 _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r);
3320 _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r);
3321 _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r);
3322 _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r);
3323 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r);
3324 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r);
3325 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r);
3326 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r);
3327 _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r);
3328 _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r);
3329 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r);
3330 _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r);
3331 _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r);
3332 _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r);
3333 _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r);
3334 _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r);
3335 _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r);
3336 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r);
3337 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r);
3338 _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r);
3339 _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r);
3340 _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r);
3341 _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r);
3342 _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r);
3343 _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r);
3344 _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r);
3345 _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r);
3346 _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r);
3347 _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r);
3348 _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r);
3349 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r);
3350 _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r);
3351 _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r);
3352 _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r);
3353 _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r);
3354 _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r);
3355 _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r);
3356 _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r);
3357 _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r);
3358 _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r);
3359 _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r);
3360 _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r);
3361 _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r);
3362 _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r);
3363 _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r);
3364 _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r);
3365 _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r);
3366 _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r);
3367 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r);
3368 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r);
3369 _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r);
3370 _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r);
3371 _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r);
3372 _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r);
3373 _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r);
3374 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r);
3375 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r);
3376 _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r);
3377 _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r);
3378 _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r);
3379 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r);
3380 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r);
3381 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r);
3382 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r);
3383 _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r);
3384 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r);
3385 _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r);
3386 _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r);
3387 _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r);
3388 _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r);
3389 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r);
3390 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r);
3391 _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r);
3392 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r);
3393 _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r);
3394 _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r);
3395 _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r);
3396 _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r);
3397 _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r);
3398 _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r);
3399 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r);
3400 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r);
3401 _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r);
3402 _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r);
3403 _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r);
3404 _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r);
3405 _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r);
3406 _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r);
3407 _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r);
3408 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r);
3409 _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r);
3410 _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r);
3411 _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r);
3412 _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r);
3413
3414 /* The following definitions come from librpc/gen_ndr/ndr_security.c  */
3415
3416 _PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r);
3417 _PUBLIC_ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r);
3418 _PUBLIC_ void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r);
3419 _PUBLIC_ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r);
3420 _PUBLIC_ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r);
3421 _PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r);
3422 _PUBLIC_ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r);
3423 _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r);
3424 _PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r);
3425 _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r);
3426 _PUBLIC_ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r);
3427 _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r);
3428 _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r);
3429 _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r);
3430 _PUBLIC_ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r);
3431 _PUBLIC_ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r);
3432 _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r);
3433 _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r);
3434 _PUBLIC_ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r);
3435 _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r);
3436 _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r);
3437 _PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r);
3438 _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr_flags, const struct security_token *r);
3439 _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r);
3440 _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r);
3441 _PUBLIC_ enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3442 _PUBLIC_ enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3443 _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r);
3444
3445 /* The following definitions come from librpc/gen_ndr/ndr_srvsvc.c  */
3446
3447 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r);
3448 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r);
3449 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r);
3450 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r);
3451 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r);
3452 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r);
3453 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r);
3454 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r);
3455 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r);
3456 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r);
3457 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r);
3458 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r);
3459 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r);
3460 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r);
3461 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r);
3462 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r);
3463 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r);
3464 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r);
3465 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r);
3466 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r);
3467 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r);
3468 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r);
3469 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r);
3470 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r);
3471 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r);
3472 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r);
3473 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r);
3474 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r);
3475 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r);
3476 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r);
3477 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r);
3478 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r);
3479 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r);
3480 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r);
3481 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r);
3482 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r);
3483 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r);
3484 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r);
3485 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r);
3486 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r);
3487 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r);
3488 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r);
3489 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r);
3490 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r);
3491 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r);
3492 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r);
3493 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r);
3494 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r);
3495 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r);
3496 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r);
3497 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r);
3498 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r);
3499 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r);
3500 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r);
3501 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r);
3502 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r);
3503 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r);
3504 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r);
3505 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r);
3506 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r);
3507 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r);
3508 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r);
3509 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r);
3510 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r);
3511 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r);
3512 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r);
3513 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r);
3514 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r);
3515 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r);
3516 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r);
3517 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r);
3518 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r);
3519 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r);
3520 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r);
3521 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r);
3522 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r);
3523 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r);
3524 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r);
3525 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r);
3526 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r);
3527 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r);
3528 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r);
3529 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r);
3530 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r);
3531 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r);
3532 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r);
3533 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r);
3534 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r);
3535 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r);
3536 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r);
3537 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r);
3538 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r);
3539 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r);
3540 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r);
3541 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r);
3542 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r);
3543 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r);
3544 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r);
3545 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r);
3546 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r);
3547 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r);
3548 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r);
3549 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r);
3550 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r);
3551 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r);
3552 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r);
3553 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r);
3554 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r);
3555 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r);
3556 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r);
3557 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r);
3558 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r);
3559 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r);
3560 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r);
3561 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r);
3562 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r);
3563 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r);
3564 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r);
3565 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r);
3566 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r);
3567 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r);
3568 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r);
3569 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r);
3570 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r);
3571 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r);
3572 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r);
3573 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r);
3574 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r);
3575 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r);
3576 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r);
3577 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r);
3578 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r);
3579 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r);
3580 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r);
3581 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r);
3582 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r);
3583 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r);
3584 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r);
3585 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r);
3586 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r);
3587 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r);
3588 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r);
3589 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r);
3590 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r);
3591 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r);
3592 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r);
3593 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r);
3594 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r);
3595 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r);
3596 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r);
3597 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r);
3598 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r);
3599 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r);
3600 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r);
3601 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r);
3602 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r);
3603 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r);
3604 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r);
3605 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r);
3606 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r);
3607 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r);
3608 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r);
3609 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r);
3610 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r);
3611 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r);
3612 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r);
3613 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r);
3614 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r);
3615 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r);
3616 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r);
3617 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r);
3618 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r);
3619 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r);
3620 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r);
3621 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r);
3622 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r);
3623 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r);
3624 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r);
3625 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r);
3626 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r);
3627 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r);
3628 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r);
3629 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
3630 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
3631 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
3632 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r);
3633 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r);
3634 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r);
3635 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r);
3636 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
3637 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
3638 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
3639
3640 /* The following definitions come from librpc/gen_ndr/ndr_svcctl.c  */
3641
3642 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r);
3643 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r);
3644 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r);
3645 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3646 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3647 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
3648 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3649 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3650 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
3651 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
3652 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
3653 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r);
3654 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r);
3655 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r);
3656 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r);
3657 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r);
3658 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r);
3659 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r);
3660 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r);
3661 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r);
3662 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r);
3663 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r);
3664 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r);
3665 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r);
3666 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r);
3667 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r);
3668 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r);
3669 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r);
3670 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r);
3671 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r);
3672 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r);
3673 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r);
3674 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r);
3675 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r);
3676 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r);
3677 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r);
3678 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r);
3679 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r);
3680 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r);
3681 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r);
3682 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r);
3683 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r);
3684 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r);
3685 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r);
3686 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r);
3687 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r);
3688 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r);
3689 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r);
3690 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r);
3691 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r);
3692 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r);
3693 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r);
3694
3695 /* The following definitions come from librpc/gen_ndr/ndr_winreg.c  */
3696
3697 _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3698 _PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
3699 _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r);
3700 _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r);
3701 _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r);
3702 _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r);
3703 _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
3704 _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
3705 _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
3706 _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
3707 _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
3708 _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
3709 _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
3710 _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r);
3711 _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r);
3712 _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r);
3713 _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r);
3714 _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r);
3715 _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r);
3716 _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r);
3717 _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r);
3718 _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r);
3719 _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r);
3720 _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r);
3721 _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r);
3722 _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r);
3723 _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r);
3724 _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r);
3725 _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r);
3726 _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r);
3727 _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r);
3728 _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r);
3729 _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKey *r);
3730 _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetKeySecurity *r);
3731 _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetValue *r);
3732 _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r);
3733 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r);
3734 _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r);
3735 _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r);
3736 _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r);
3737 _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r);
3738 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r);
3739 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r);
3740 _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r);
3741 _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPT *r);
3742 _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPN *r);
3743 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r);
3744
3745 /* The following definitions come from librpc/gen_ndr/ndr_wkssvc.c  */
3746
3747 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo100 *r);
3748 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo101 *r);
3749 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo102 *r);
3750 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo502 *r);
3751 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1010 *r);
3752 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1011 *r);
3753 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1012 *r);
3754 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1013 *r);
3755 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1018 *r);
3756 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1023 *r);
3757 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1027 *r);
3758 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1028(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1028 *r);
3759 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1032(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1032 *r);
3760 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1033 *r);
3761 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1041(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1041 *r);
3762 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1042(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1042 *r);
3763 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1043(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1043 *r);
3764 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1044(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1044 *r);
3765 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1045(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1045 *r);
3766 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1046(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1046 *r);
3767 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1047(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1047 *r);
3768 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1048(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1048 *r);
3769 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1049(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1049 *r);
3770 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1050(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1050 *r);
3771 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1051(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1051 *r);
3772 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1052(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1052 *r);
3773 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1053(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1053 *r);
3774 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1054(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1054 *r);
3775 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1055(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1055 *r);
3776 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1056(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1056 *r);
3777 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1057(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1057 *r);
3778 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1058(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1058 *r);
3779 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1059(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1059 *r);
3780 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1060(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1060 *r);
3781 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1061(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1061 *r);
3782 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1062(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1062 *r);
3783 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaInfo *r);
3784 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo0 *r);
3785 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr0 *r);
3786 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1 *r);
3787 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr1 *r);
3788 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaEnumUsersCtr *r);
3789 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersInfo *r);
3790 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1101 *r);
3791 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetrWkstaUserInfo *r);
3792 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo0 *r);
3793 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportCtr0 *r);
3794 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaTransportCtr *r);
3795 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo *r);
3796 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo3(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo3 *r);
3797 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo2 *r);
3798 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo1 *r);
3799 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo0 *r);
3800 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfoCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseGetInfoCtr *r);
3801 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr2 *r);
3802 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr1 *r);
3803 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr0 *r);
3804 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseEnumCtr *r);
3805 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumInfo *r);
3806 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatistics(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWorkstationStatistics *r);
3807 _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *name, uint32_t r);
3808 _PUBLIC_ void ndr_print_wkssvc_NetValidateNameType(struct ndr_print *ndr, const char *name, enum wkssvc_NetValidateNameType r);
3809 _PUBLIC_ void ndr_print_wkssvc_NetJoinStatus(struct ndr_print *ndr, const char *name, enum wkssvc_NetJoinStatus r);
3810 _PUBLIC_ void ndr_print_wkssvc_PasswordBuffer(struct ndr_print *ndr, const char *name, const struct wkssvc_PasswordBuffer *r);
3811 _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name, uint32_t r);
3812 _PUBLIC_ void ndr_print_wkssvc_ComputerNameType(struct ndr_print *ndr, const char *name, enum wkssvc_ComputerNameType r);
3813 _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const char *name, const struct wkssvc_ComputerNamesCtr *r);
3814 _PUBLIC_ void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaGetInfo *r);
3815 _PUBLIC_ void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaSetInfo *r);
3816 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaEnumUsers *r);
3817 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserGetInfo *r);
3818 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserSetInfo *r);
3819 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaTransportEnum *r);
3820 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportAdd *r);
3821 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportDel *r);
3822 _PUBLIC_ void ndr_print_wkssvc_NetrUseAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseAdd *r);
3823 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseGetInfo *r);
3824 _PUBLIC_ void ndr_print_wkssvc_NetrUseDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseDel *r);
3825 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseEnum *r);
3826 _PUBLIC_ void ndr_print_wkssvc_NetrMessageBufferSend(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrMessageBufferSend *r);
3827 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWorkstationStatisticsGet *r);
3828 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameAdd *r);
3829 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameDel *r);
3830 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain *r);
3831 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain *r);
3832 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain *r);
3833 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName *r);
3834 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinInformation *r);
3835 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus *r);
3836 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain2 *r);
3837 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain2 *r);
3838 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain2 *r);
3839 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName2 *r);
3840 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus2 *r);
3841 _PUBLIC_ void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrAddAlternateComputerName *r);
3842 _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRemoveAlternateComputerName *r);
3843 _PUBLIC_ void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrSetPrimaryComputername *r);
3844 _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrEnumerateComputerNames *r);
3845
3846 /* The following definitions come from librpc/gen_ndr/ndr_xattr.c  */
3847
3848 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r);
3849 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r);
3850 _PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r);
3851 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r);
3852 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r);
3853 _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r);
3854
3855 /* The following definitions come from librpc/gen_ndr/srv_dfs.c  */
3856
3857 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3858 NTSTATUS rpc_netdfs_init(void);
3859
3860 /* The following definitions come from librpc/gen_ndr/srv_dssetup.c  */
3861
3862 void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns);
3863 NTSTATUS rpc_dssetup_init(void);
3864
3865 /* The following definitions come from librpc/gen_ndr/srv_echo.c  */
3866
3867 void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns);
3868 NTSTATUS rpc_rpcecho_init(void);
3869
3870 /* The following definitions come from librpc/gen_ndr/srv_eventlog.c  */
3871
3872 void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns);
3873 NTSTATUS rpc_eventlog_init(void);
3874
3875 /* The following definitions come from librpc/gen_ndr/srv_initshutdown.c  */
3876
3877 void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns);
3878 NTSTATUS rpc_initshutdown_init(void);
3879
3880 /* The following definitions come from librpc/gen_ndr/srv_lsa.c  */
3881
3882 void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3883 NTSTATUS rpc_lsarpc_init(void);
3884
3885 /* The following definitions come from librpc/gen_ndr/srv_netlogon.c  */
3886
3887 void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns);
3888 NTSTATUS rpc_netlogon_init(void);
3889
3890 /* The following definitions come from librpc/gen_ndr/srv_ntsvcs.c  */
3891
3892 void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3893 NTSTATUS rpc_ntsvcs_init(void);
3894
3895 /* The following definitions come from librpc/gen_ndr/srv_samr.c  */
3896
3897 void samr_get_pipe_fns(struct api_struct **fns, int *n_fns);
3898 NTSTATUS rpc_samr_init(void);
3899
3900 /* The following definitions come from librpc/gen_ndr/srv_srvsvc.c  */
3901
3902 void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3903 NTSTATUS rpc_srvsvc_init(void);
3904
3905 /* The following definitions come from librpc/gen_ndr/srv_svcctl.c  */
3906
3907 void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns);
3908 NTSTATUS rpc_svcctl_init(void);
3909
3910 /* The following definitions come from librpc/gen_ndr/srv_winreg.c  */
3911
3912 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns);
3913 NTSTATUS rpc_winreg_init(void);
3914
3915 /* The following definitions come from librpc/gen_ndr/srv_wkssvc.c  */
3916
3917 void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3918 NTSTATUS rpc_wkssvc_init(void);
3919
3920 /* The following definitions come from librpc/ndr/ndr.c  */
3921
3922 _PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n);
3923 _PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
3924 _PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
3925 _PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save);
3926 _PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save);
3927 _PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
3928 _PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
3929 _PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
3930 _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3931 _PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3932 _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
3933 _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3934 _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
3935 _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);
3936 _PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3937 _PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
3938                                 ndr_print_function_t fn, const char *name, 
3939                                 int flags, void *ptr);
3940 _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags);
3941 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
3942 const char *ndr_errstr(enum ndr_err_code err);
3943 _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
3944                                  enum ndr_err_code ndr_err,
3945                                  const char *format, ...) _PRINTF_ATTRIBUTE(3,4);
3946 _PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
3947                                  enum ndr_err_code ndr_err,
3948                                  const char *format, ...)  _PRINTF_ATTRIBUTE(3,4);
3949 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
3950                                    struct ndr_pull **_subndr,
3951                                    size_t header_size,
3952                                    ssize_t size_is);
3953 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr,
3954                                  struct ndr_pull *subndr,
3955                                  size_t header_size,
3956                                  ssize_t size_is);
3957 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
3958                                    struct ndr_push **_subndr,
3959                                    size_t header_size,
3960                                    ssize_t size_is);
3961 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr,
3962                                  struct ndr_push *subndr,
3963                                  size_t header_size,
3964                                  ssize_t size_is);
3965 _PUBLIC_ enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx,
3966                          struct ndr_token_list **list, 
3967                          const void *key, 
3968                          uint32_t value);
3969 _PUBLIC_ enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
3970                                    comparison_fn_t _cmp_fn, bool _remove_tok);
3971 _PUBLIC_ enum ndr_err_code ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v);
3972 _PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key);
3973 _PUBLIC_ enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p);
3974 _PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p);
3975 _PUBLIC_ enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size);
3976 _PUBLIC_ enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p);
3977 _PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p);
3978 _PUBLIC_ enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length);
3979 _PUBLIC_ enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val);
3980 _PUBLIC_ enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val);
3981 _PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val);
3982 _PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p);
3983 _PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
3984 _PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p);
3985 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3986                               ndr_pull_flags_fn_t fn);
3987 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3988                                   ndr_pull_flags_fn_t fn);
3989 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3990                              uint32_t level, ndr_pull_flags_fn_t fn);
3991 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3992                              uint32_t level, ndr_pull_flags_fn_t fn);
3993 _PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p,
3994                               ndr_push_flags_fn_t fn);
3995 _PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3996                              uint32_t level, ndr_push_flags_fn_t fn);
3997 _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
3998 _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
3999 _PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
4000 _PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset);
4001 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset);
4002 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p);
4003 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
4004 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p);
4005 _PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
4006 _PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
4007 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset);
4008 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p);
4009 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset);
4010 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p);
4011
4012 /* The following definitions come from librpc/ndr/ndr_basic.c  */
4013
4014 _PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n);
4015 _PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v);
4016 _PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v);
4017 _PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v);
4018 _PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v);
4019 _PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v);
4020 _PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v);
4021 _PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v);
4022 _PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v);
4023 _PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
4024 _PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
4025 _PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v);
4026 _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
4027 _PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v);
4028 _PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status);
4029 _PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status);
4030 _PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r);
4031 _PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status);
4032 _PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status);
4033 _PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r);
4034 _PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n);
4035 _PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n);
4036 _PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v);
4037 _PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v);
4038 _PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v);
4039 _PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v);
4040 _PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v);
4041 _PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v);
4042 _PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4043 _PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4044 _PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v);
4045 _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v);
4046 _PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v);
4047 _PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size);
4048 _PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
4049 _PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n);
4050 _PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
4051 _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n);
4052 _PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save);
4053 _PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save);
4054 _PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p);
4055 _PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p);
4056 _PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr);
4057 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4058 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4059 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4060 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4061 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
4062 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t);
4063 _PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t);
4064 _PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t);
4065 _PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address);
4066 _PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address);
4067 _PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, 
4068                            const char *address);
4069 _PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type);
4070 _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 
4071                     const char *val, uint32_t value);
4072 _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
4073 _PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v);
4074 _PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v);
4075 _PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v);
4076 _PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v);
4077 _PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v);
4078 _PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v);
4079 _PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v);
4080 _PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v);
4081 _PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v);
4082 _PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v);
4083 _PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v);
4084 _PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p);
4085 _PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t);
4086 _PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t);
4087 _PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t);
4088 _PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t);
4089 _PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type);
4090 _PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level);
4091 _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 
4092                            const uint8_t *data, uint32_t count);
4093 _PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r);
4094 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob);
4095 _PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob);
4096 _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags);
4097 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
4098 _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
4099
4100 /* The following definitions come from librpc/ndr/ndr_krb5pac.c  */
4101
4102 enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
4103 enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
4104 void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
4105
4106 /* The following definitions come from librpc/ndr/ndr_misc.c  */
4107
4108 bool all_zero(const uint8_t *ptr, size_t size);
4109 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
4110 bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,
4111                          const struct ndr_syntax_id *i2);
4112 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
4113 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
4114 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
4115
4116 /* The following definitions come from librpc/ndr/ndr_sec_helper.c  */
4117
4118 size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags);
4119 size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
4120 size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
4121 size_t ndr_size_security_ace(const struct security_ace *ace, int flags);
4122 size_t ndr_size_security_acl(const struct security_acl *acl, int flags);
4123 size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags);
4124 void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4125 void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4126 void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4127 void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
4128
4129 /* The following definitions come from librpc/ndr/ndr_string.c  */
4130
4131 _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s);
4132 _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, const char *s);
4133 _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s);
4134 _PUBLIC_ void ndr_print_string(struct ndr_print *ndr, const char *name, const char *s);
4135 _PUBLIC_ uint32_t ndr_size_string(int ret, const char * const* string, int flags) ;
4136 _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_flags, const char ***_a);
4137 _PUBLIC_ enum ndr_err_code ndr_push_string_array(struct ndr_push *ndr, int ndr_flags, const char **a);
4138 _PUBLIC_ void ndr_print_string_array(struct ndr_print *ndr, const char *name, const char **a);
4139 _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size);
4140 _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size);
4141 _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);
4142 _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);
4143 _PUBLIC_ uint32_t ndr_charset_length(const void *var, charset_t chset);
4144
4145 /* The following definitions come from librpc/ndr/sid.c  */
4146
4147 enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r);
4148 enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r);
4149 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
4150 enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4151 enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4152 enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4153 enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4154 enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4155 enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4156
4157 /* The following definitions come from librpc/ndr/uuid.c  */
4158
4159 _PUBLIC_ NTSTATUS GUID_from_string(const char *s, struct GUID *guid);
4160 _PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);
4161 struct GUID GUID_random(void);
4162 _PUBLIC_ struct GUID GUID_zero(void);
4163 _PUBLIC_ bool GUID_all_zero(const struct GUID *u);
4164 _PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2);
4165 _PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2);
4166 _PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4167 _PUBLIC_ char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4168 _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4169 _PUBLIC_ bool policy_handle_empty(struct policy_handle *h) ;
4170
4171 /* The following definitions come from librpc/rpc/binding.c  */
4172
4173 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4174 _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
4175 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
4176 _PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax);
4177 const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4178 enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
4179 _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower);
4180 _PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 
4181                                    struct epm_tower *tower, 
4182                                    struct dcerpc_binding **b_out);
4183 _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower);
4184
4185 /* The following definitions come from librpc/rpc/dcerpc.c  */
4186
4187 struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct GUID *object, 
4188                                             const struct ndr_interface_table *table, uint32_t opnum, 
4189                                             TALLOC_CTX *mem_ctx, void *r);
4190 NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req);
4191 _PUBLIC_ NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, 
4192                                       const char *binding_string, const struct ndr_interface_table *table, 
4193                                       struct cli_credentials *credentials, struct event_context *ev, 
4194                                       struct loadparm_context *lp_ctx);
4195
4196 /* The following definitions come from libsmb/asn1.c  */
4197
4198 void asn1_free(ASN1_DATA *data);
4199 bool asn1_write(ASN1_DATA *data, const void *p, int len);
4200 bool asn1_write_uint8(ASN1_DATA *data, uint8 v);
4201 bool asn1_push_tag(ASN1_DATA *data, uint8 tag);
4202 bool asn1_pop_tag(ASN1_DATA *data);
4203 bool asn1_write_Integer(ASN1_DATA *data, int i);
4204 bool asn1_write_OID(ASN1_DATA *data, const char *OID);
4205 bool asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length);
4206 bool asn1_write_GeneralString(ASN1_DATA *data, const char *s);
4207 bool asn1_write_BOOLEAN(ASN1_DATA *data, bool v);
4208 bool asn1_write_BOOLEAN2(ASN1_DATA *data, bool v);
4209 bool asn1_check_BOOLEAN(ASN1_DATA *data, bool v);
4210 bool asn1_load(ASN1_DATA *data, DATA_BLOB blob);
4211 bool asn1_read(ASN1_DATA *data, void *p, int len);
4212 bool asn1_read_uint8(ASN1_DATA *data, uint8 *v);
4213 bool asn1_check_tag(ASN1_DATA *data, uint8 tag);
4214 bool asn1_start_tag(ASN1_DATA *data, uint8 tag);
4215 bool asn1_end_tag(ASN1_DATA *data);
4216 int asn1_tag_remaining(ASN1_DATA *data);
4217 bool asn1_read_OID(ASN1_DATA *data, char **OID);
4218 bool asn1_check_OID(ASN1_DATA *data, const char *OID);
4219 bool asn1_read_GeneralString(ASN1_DATA *data, char **s);
4220 bool asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob);
4221 bool asn1_read_Integer(ASN1_DATA *data, int *i);
4222 bool asn1_check_enumerated(ASN1_DATA *data, int v);
4223 bool asn1_write_enumerated(ASN1_DATA *data, uint8 v);
4224 bool ber_write_OID_String(DATA_BLOB *blob, const char *OID);
4225 bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID);
4226
4227 /* The following definitions come from libsmb/async_smb.c  */
4228
4229 NTSTATUS cli_pull_error(char *buf);
4230 void cli_set_error(struct cli_state *cli, NTSTATUS status);
4231 struct async_req *cli_request_new(TALLOC_CTX *mem_ctx,
4232                                   struct event_context *ev,
4233                                   struct cli_state *cli,
4234                                   uint8_t num_words, size_t num_bytes,
4235                                   struct cli_request **preq);
4236 struct cli_request *cli_request_get(struct async_req *req);
4237 struct cli_tmp_event *cli_tmp_event_ctx(TALLOC_CTX *mem_ctx,
4238                                         struct cli_state *cli);
4239 NTSTATUS cli_add_event_ctx(struct cli_state *cli,
4240                            struct event_context *event_ctx);
4241
4242 /* The following definitions come from libsmb/cliconnect.c  */
4243
4244 ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, 
4245                               const char *pass, const char *user_domain,
4246                                     const char * dest_realm);
4247
4248 NTSTATUS cli_session_setup(struct cli_state *cli,
4249                            const char *user,
4250                            const char *pass, int passlen,
4251                            const char *ntpass, int ntpasslen,
4252                            const char *workgroup);
4253 bool cli_ulogoff(struct cli_state *cli);
4254 bool cli_send_tconX(struct cli_state *cli, 
4255                     const char *share, const char *dev, const char *pass, int passlen);
4256 bool cli_tdis(struct cli_state *cli);
4257 void cli_negprot_send(struct cli_state *cli);
4258 bool cli_negprot(struct cli_state *cli);
4259 bool cli_session_request(struct cli_state *cli,
4260                          struct nmb_name *calling, struct nmb_name *called);
4261 NTSTATUS cli_connect(struct cli_state *cli,
4262                 const char *host,
4263                 struct sockaddr_storage *dest_ss);
4264 NTSTATUS cli_start_connection(struct cli_state **output_cli, 
4265                               const char *my_name, 
4266                               const char *dest_host, 
4267                               struct sockaddr_storage *dest_ss, int port,
4268                               int signing_state, int flags,
4269                               bool *retry) ;
4270 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
4271                              const char *my_name, 
4272                              const char *dest_host, 
4273                              struct sockaddr_storage *dest_ss, int port,
4274                              const char *service, const char *service_type,
4275                              const char *user, const char *domain, 
4276                              const char *password, int flags,
4277                              int signing_state,
4278                              bool *retry) ;
4279 bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
4280                                      struct sockaddr_storage *pdest_ss);
4281 NTSTATUS cli_raw_tcon(struct cli_state *cli, 
4282                       const char *service, const char *pass, const char *dev,
4283                       uint16 *max_xmit, uint16 *tid);
4284 struct cli_state *get_ipc_connect(char *server,
4285                                 struct sockaddr_storage *server_ss,
4286                                 const struct user_auth_info *user_info);
4287 struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
4288                                 struct ip_service *mb_ip,
4289                                 const struct user_auth_info *user_info,
4290                                 char **pp_workgroup_out);
4291 struct cli_state *get_ipc_connect_master_ip_bcast(TALLOC_CTX *ctx,
4292                                         const struct user_auth_info *user_info,
4293                                         char **pp_workgroup_out);
4294
4295 /* The following definitions come from libsmb/clidfs.c  */
4296
4297 NTSTATUS cli_cm_force_encryption(struct cli_state *c,
4298                         const char *username,
4299                         const char *password,
4300                         const char *domain,
4301                         const char *sharename);
4302 const char *cli_cm_get_mntpoint(struct cli_state *c);
4303 struct cli_state *cli_cm_open(TALLOC_CTX *ctx,
4304                                 struct cli_state *referring_cli,
4305                                 const char *server,
4306                                 const char *share,
4307                                 bool show_hdr,
4308                                 bool force_encrypt);
4309 void cli_cm_shutdown(void);
4310 void cli_cm_display(void);
4311 void cli_cm_set_credentials(void);
4312 void cli_cm_set_port(int port_number);
4313 void cli_cm_set_dest_name_type(int type);
4314 void cli_cm_set_signing_state(int state);
4315 void cli_cm_set_username(const char *username);
4316 void cli_cm_set_password(const char *newpass);
4317 void cli_cm_set_use_kerberos(void);
4318 void cli_cm_set_fallback_after_kerberos(void);
4319 void cli_cm_set_dest_ss(struct sockaddr_storage *pss);
4320 bool cli_dfs_get_referral(TALLOC_CTX *ctx,
4321                         struct cli_state *cli,
4322                         const char *path,
4323                         CLIENT_DFS_REFERRAL**refs,
4324                         size_t *num_refs,
4325                         uint16 *consumed);
4326 bool cli_resolve_path(TALLOC_CTX *ctx,
4327                         const char *mountpt,
4328                         struct cli_state *rootcli,
4329                         const char *path,
4330                         struct cli_state **targetcli,
4331                         char **pp_targetpath);
4332
4333 /* The following definitions come from libsmb/clidgram.c  */
4334
4335 bool cli_send_mailslot(struct messaging_context *msg_ctx,
4336                        bool unique, const char *mailslot,
4337                        uint16 priority,
4338                        char *buf, int len,
4339                        const char *srcname, int src_type,
4340                        const char *dstname, int dest_type,
4341                        const struct sockaddr_storage *dest_ss);
4342 bool send_getdc_request(TALLOC_CTX *mem_ctx,
4343                         struct messaging_context *msg_ctx,
4344                         struct sockaddr_storage *dc_ss,
4345                         const char *domain_name,
4346                         const DOM_SID *sid,
4347                         uint32_t nt_version);
4348 bool receive_getdc_response(TALLOC_CTX *mem_ctx,
4349                             struct sockaddr_storage *dc_ss,
4350                             const char *domain_name,
4351                             uint32_t *nt_version,
4352                             const char **dc_name,
4353                             union nbt_cldap_netlogon **reply);
4354
4355 /* The following definitions come from libsmb/clientgen.c  */
4356
4357 int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
4358 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
4359 int cli_set_port(struct cli_state *cli, int port);
4360 bool cli_receive_smb(struct cli_state *cli);
4361 ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len);
4362 bool cli_receive_smb_readX_header(struct cli_state *cli);
4363 bool cli_send_smb(struct cli_state *cli);
4364 bool cli_send_smb_direct_writeX(struct cli_state *cli,
4365                                 const char *p,
4366                                 size_t extradata);
4367 void cli_setup_packet_buf(struct cli_state *cli, char *buf);
4368 void cli_setup_packet(struct cli_state *cli);
4369 void cli_setup_bcc(struct cli_state *cli, void *p);
4370 void cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password);
4371 void cli_setup_signing_state(struct cli_state *cli, int signing_state);
4372 struct cli_state *cli_initialise(void);
4373 void cli_nt_pipes_close(struct cli_state *cli);
4374 void cli_shutdown(struct cli_state *cli);
4375 void cli_sockopt(struct cli_state *cli, const char *options);
4376 uint16 cli_setpid(struct cli_state *cli, uint16 pid);
4377 bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
4378 bool cli_send_keepalive(struct cli_state *cli);
4379 bool cli_echo(struct cli_state *cli, uint16 num_echos,
4380               unsigned char *data, size_t length);
4381
4382 /* The following definitions come from libsmb/clierror.c  */
4383
4384 const char *cli_errstr(struct cli_state *cli);
4385 NTSTATUS cli_nt_error(struct cli_state *cli);
4386 void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode);
4387 int cli_errno(struct cli_state *cli);
4388 bool cli_is_error(struct cli_state *cli);
4389 bool cli_is_nt_error(struct cli_state *cli);
4390 bool cli_is_dos_error(struct cli_state *cli);
4391 NTSTATUS cli_get_nt_error(struct cli_state *cli);
4392 void cli_set_nt_error(struct cli_state *cli, NTSTATUS status);
4393 void cli_reset_error(struct cli_state *cli);
4394
4395 /* The following definitions come from libsmb/clifile.c  */
4396
4397 uint32 unix_perms_to_wire(mode_t perms);
4398 mode_t wire_perms_to_unix(uint32 perms);
4399 bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf);
4400 bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf);
4401 bool cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname);
4402 bool cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname);
4403 bool cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode);
4404 bool cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid);
4405 bool cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4406 bool cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4407 bool cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4408 bool cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs);
4409 bool cli_unlink(struct cli_state *cli, const char *fname);
4410 bool cli_mkdir(struct cli_state *cli, const char *dname);
4411 bool cli_rmdir(struct cli_state *cli, const char *dname);
4412 int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag);
4413 int cli_nt_create_full(struct cli_state *cli, const char *fname,
4414                  uint32 CreatFlags, uint32 DesiredAccess,
4415                  uint32 FileAttributes, uint32 ShareAccess,
4416                  uint32 CreateDisposition, uint32 CreateOptions,
4417                  uint8 SecuityFlags);
4418 int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess);
4419 int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4420 bool cli_close(struct cli_state *cli, int fnum);
4421 bool cli_ftruncate(struct cli_state *cli, int fnum, uint64_t size);
4422 NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
4423                       uint32 offset, uint32 len,
4424                       int timeout, unsigned char locktype);
4425 bool cli_lock(struct cli_state *cli, int fnum,
4426               uint32 offset, uint32 len, int timeout, enum brl_type lock_type);
4427 bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len);
4428 bool cli_lock64(struct cli_state *cli, int fnum,
4429                 SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type);
4430 bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4431 bool cli_posix_lock(struct cli_state *cli, int fnum,
4432                         SMB_BIG_UINT offset, SMB_BIG_UINT len,
4433                         bool wait_lock, enum brl_type lock_type);
4434 bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4435 bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen);
4436 bool cli_getattrE(struct cli_state *cli, int fd,
4437                   uint16 *attr, SMB_OFF_T *size,
4438                   time_t *change_time,
4439                   time_t *access_time,
4440                   time_t *write_time);
4441 bool cli_getatr(struct cli_state *cli, const char *fname,
4442                 uint16 *attr, SMB_OFF_T *size, time_t *write_time);
4443 bool cli_setattrE(struct cli_state *cli, int fd,
4444                   time_t change_time,
4445                   time_t access_time,
4446                   time_t write_time);
4447 bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t);
4448 bool cli_chkpath(struct cli_state *cli, const char *path);
4449 bool cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
4450 int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path);
4451 NTSTATUS cli_raw_ioctl(struct cli_state *cli, int fnum, uint32 code, DATA_BLOB *blob);
4452 bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len);
4453 bool cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len);
4454 bool cli_get_ea_list_path(struct cli_state *cli, const char *path,
4455                 TALLOC_CTX *ctx,
4456                 size_t *pnum_eas,
4457                 struct ea_struct **pea_list);
4458 bool cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
4459                 TALLOC_CTX *ctx,
4460                 size_t *pnum_eas,
4461                 struct ea_struct **pea_list);
4462 int cli_posix_open(struct cli_state *cli, const char *fname, int flags, mode_t mode);
4463 int cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode);
4464 bool cli_posix_unlink(struct cli_state *cli, const char *fname);
4465 int cli_posix_rmdir(struct cli_state *cli, const char *fname);
4466
4467 /* The following definitions come from libsmb/clifsinfo.c  */
4468
4469 bool cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
4470                                         uint32 *pcaplow, uint32 *pcaphigh);
4471 bool cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
4472                                         uint32 caplow, uint32 caphigh);
4473 bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr);
4474 bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number);
4475 bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate);
4476 NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli, 
4477                                 const char *user,
4478                                 const char *pass,
4479                                 const char *domain);
4480 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4481 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4482 NTSTATUS cli_force_encryption(struct cli_state *c,
4483                         const char *username,
4484                         const char *password,
4485                         const char *domain);
4486
4487 /* The following definitions come from libsmb/clikrb5.c  */
4488
4489 bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx, 
4490                            DATA_BLOB *edata, 
4491                            DATA_BLOB *edata_out);
4492 bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data);
4493 int cli_krb5_get_ticket(const char *principal, time_t time_offset, 
4494                         DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, 
4495                         uint32 extra_ap_opts, const char *ccname, 
4496                         time_t *tgs_expire);
4497
4498 /* The following definitions come from libsmb/clilist.c  */
4499
4500 int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
4501                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4502 int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
4503                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4504 int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
4505              void (*fn)(const char *, file_info *, const char *, void *), void *state);
4506
4507 /* The following definitions come from libsmb/climessage.c  */
4508
4509 int cli_message_start_build(struct cli_state *cli, const char *host, const char *username);
4510 bool cli_message_start(struct cli_state *cli, const char *host, const char *username,
4511                               int *grp);
4512 int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int grp);
4513 bool cli_message_text(struct cli_state *cli, const char *msg, int len, int grp);
4514 int cli_message_end_build(struct cli_state *cli, int grp);
4515 bool cli_message_end(struct cli_state *cli, int grp);
4516
4517 /* The following definitions come from libsmb/clioplock.c  */
4518
4519 bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level);
4520 void cli_oplock_handler(struct cli_state *cli, 
4521                         bool (*handler)(struct cli_state *, int, unsigned char));
4522
4523 /* The following definitions come from libsmb/cliprint.c  */
4524
4525 int cli_print_queue(struct cli_state *cli,
4526                     void (*fn)(struct print_job_info *));
4527 int cli_printjob_del(struct cli_state *cli, int job);
4528 int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4529 bool cli_spl_close(struct cli_state *cli, int fnum);
4530
4531 /* The following definitions come from libsmb/cliquota.c  */
4532
4533 bool cli_get_quota_handle(struct cli_state *cli, int *quota_fnum);
4534 void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list);
4535 bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4536 bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4537 bool cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list);
4538 bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4539 bool cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4540 void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4541 void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4542
4543 /* The following definitions come from libsmb/clirap.c  */
4544
4545 bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
4546                   uint16 *setup, uint32 setup_count, uint32 max_setup_count,
4547                   char *params, uint32 param_count, uint32 max_param_count,
4548                   char *data, uint32 data_count, uint32 max_data_count,
4549                   char **rparam, uint32 *rparam_count,
4550                   char **rdata, uint32 *rdata_count);
4551 bool cli_api(struct cli_state *cli,
4552              char *param, int prcnt, int mprcnt,
4553              char *data, int drcnt, int mdrcnt,
4554              char **rparam, unsigned int *rprcnt,
4555              char **rdata, unsigned int *rdrcnt);
4556 bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
4557 int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
4558 bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
4559                        void (*fn)(const char *, uint32, const char *, void *),
4560                        void *state);
4561 bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
4562                              const char *old_password);
4563 bool cli_qpathinfo(struct cli_state *cli,
4564                         const char *fname,
4565                         time_t *change_time,
4566                         time_t *access_time,
4567                         time_t *write_time,
4568                         SMB_OFF_T *size,
4569                         uint16 *mode);
4570 bool cli_setpathinfo(struct cli_state *cli, const char *fname,
4571                      time_t create_time,
4572                      time_t access_time,
4573                      time_t write_time,
4574                      time_t change_time,
4575                      uint16 mode);
4576 bool cli_qpathinfo2(struct cli_state *cli, const char *fname,
4577                     struct timespec *create_time,
4578                     struct timespec *access_time,
4579                     struct timespec *write_time,
4580                     struct timespec *change_time,
4581                     SMB_OFF_T *size, uint16 *mode,
4582                     SMB_INO_T *ino);
4583 bool cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
4584                            TALLOC_CTX *mem_ctx,
4585                            unsigned int *pnum_streams,
4586                            struct stream_struct **pstreams);
4587 bool cli_qfilename(struct cli_state *cli, int fnum, char *name, size_t namelen);
4588 bool cli_qfileinfo(struct cli_state *cli, int fnum,
4589                    uint16 *mode, SMB_OFF_T *size,
4590                    struct timespec *create_time,
4591                    struct timespec *access_time,
4592                    struct timespec *write_time,
4593                    struct timespec *change_time,
4594                    SMB_INO_T *ino);
4595 bool cli_qpathinfo_basic( struct cli_state *cli, const char *name,
4596                           SMB_STRUCT_STAT *sbuf, uint32 *attributes );
4597 bool cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen);
4598 NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
4599
4600 /* The following definitions come from libsmb/clirap2.c  */
4601
4602 int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
4603 int cli_NetGroupAdd(struct cli_state *cli, RAP_GROUP_INFO_1 *grinfo);
4604 int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4605 int cli_RNetGroupEnum0(struct cli_state *cli,
4606                        void (*fn)(const char *, void *),
4607                        void *state);
4608 int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
4609 int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
4610 int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
4611 int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
4612 int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
4613 int cli_NetUserAdd(struct cli_state *cli, RAP_USER_INFO_1 * userinfo );
4614 int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
4615 int cli_RNetUserEnum0(struct cli_state *cli,
4616                       void (*fn)(const char *, void *),
4617                       void *state);
4618 int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
4619 int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
4620 int cli_NetFileEnum(struct cli_state *cli, const char * user,
4621                     const char * base_path,
4622                     void (*fn)(const char *, const char *, uint16, uint16,
4623                                uint32));
4624 int cli_NetShareAdd(struct cli_state *cli, RAP_SHARE_INFO_2 * sinfo );
4625 int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
4626 bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
4627 bool cli_get_server_domain(struct cli_state *cli);
4628 bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
4629 bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4630                          char **servername);
4631 bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
4632 bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
4633 int cli_NetPrintQEnum(struct cli_state *cli,
4634                 void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4635                 void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4636 int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
4637         void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4638         void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4639 int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4640 int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, uint, uint, uint, char *));
4641 int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
4642                 void (*fn)(const char *, const char *, uint16, uint16, uint16, uint, uint, uint, const char *));
4643 int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
4644 int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
4645                         void (*fn)(uint16_t conid, uint16_t contype,
4646                                 uint16_t numopens, uint16_t numusers,
4647                                 uint32_t contime, const char *username,
4648                                 const char *netname));
4649
4650 /* The following definitions come from libsmb/clireadwrite.c  */
4651
4652 struct async_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
4653                                      struct cli_state *cli, int fnum,
4654                                      off_t offset, size_t size);
4655 NTSTATUS cli_read_andx_recv(struct async_req *req, ssize_t *received,
4656                             uint8_t **rcvbuf);
4657 struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4658                                 uint16_t fnum, off_t start_offset,
4659                                 SMB_OFF_T size, size_t window_size,
4660                                 NTSTATUS (*sink)(char *buf, size_t n,
4661                                                  void *priv),
4662                                 void *priv);
4663 NTSTATUS cli_pull_recv(struct async_req *req, SMB_OFF_T *received);
4664 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
4665                   off_t start_offset, SMB_OFF_T size, size_t window_size,
4666                   NTSTATUS (*sink)(char *buf, size_t n, void *priv),
4667                   void *priv, SMB_OFF_T *received);
4668 ssize_t cli_read(struct cli_state *cli, int fnum, char *buf,
4669                  off_t offset, size_t size);
4670 ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
4671 ssize_t cli_write(struct cli_state *cli,
4672                  int fnum, uint16 write_mode,
4673                  const char *buf, off_t offset, size_t size);
4674 ssize_t cli_smbwrite(struct cli_state *cli,
4675                      int fnum, char *buf, off_t offset, size_t size1);
4676
4677 /* The following definitions come from libsmb/clisecdesc.c  */
4678
4679 SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, 
4680                             TALLOC_CTX *mem_ctx);
4681 bool cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd);
4682
4683 /* The following definitions come from libsmb/clispnego.c  */
4684
4685 DATA_BLOB spnego_gen_negTokenInit(char guid[16], 
4686                                   const char *OIDs[], 
4687                                   const char *principal);
4688 DATA_BLOB gen_negTokenInit(const char *OID, DATA_BLOB blob);
4689 bool spnego_parse_negTokenInit(DATA_BLOB blob,
4690                                char *OIDs[ASN1_MAX_OIDS], 
4691                                char **principal);
4692 DATA_BLOB gen_negTokenTarg(const char *OIDs[], DATA_BLOB blob);
4693 bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob);
4694 DATA_BLOB spnego_gen_krb5_wrap(const DATA_BLOB ticket, const uint8 tok_id[2]);
4695 bool spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2]);
4696 int spnego_gen_negTokenTarg(const char *principal, int time_offset, 
4697                             DATA_BLOB *targ, 
4698                             DATA_BLOB *session_key_krb5, uint32 extra_ap_opts,
4699                             time_t *expire_time);
4700 bool spnego_parse_challenge(const DATA_BLOB blob,
4701                             DATA_BLOB *chal1, DATA_BLOB *chal2);
4702 DATA_BLOB spnego_gen_auth(DATA_BLOB blob);
4703 bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth);
4704 DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status,
4705                                    const char *mechOID);
4706 bool spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
4707                                 const char *mechOID,
4708                                 DATA_BLOB *auth);
4709
4710 /* The following definitions come from libsmb/clistr.c  */
4711
4712 size_t clistr_push_fn(const char *function,
4713                         unsigned int line,
4714                         struct cli_state *cli,
4715                         void *dest,
4716                         const char *src,
4717                         int dest_len,
4718                         int flags);
4719 size_t clistr_pull_fn(const char *function,
4720                         unsigned int line,
4721                         struct cli_state *cli,
4722                         char *dest,
4723                         const void *src,
4724                         int dest_len,
4725                         int src_len,
4726                         int flags);
4727 size_t clistr_pull_talloc_fn(const char *function,
4728                                 unsigned int line,
4729                                 TALLOC_CTX *ctx,
4730                                 struct cli_state *cli,
4731                                 char **pp_dest,
4732                                 const void *src,
4733                                 int src_len,
4734                                 int flags);
4735 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
4736 size_t clistr_align_in(struct cli_state *cli, const void *p, int flags);
4737
4738 /* The following definitions come from libsmb/clitrans.c  */
4739
4740 bool cli_send_trans(struct cli_state *cli, int trans,
4741                     const char *pipe_name,
4742                     int fid, int flags,
4743                     uint16 *setup, unsigned int lsetup, unsigned int msetup,
4744                     const char *param, unsigned int lparam, unsigned int mparam,
4745                     const char *data, unsigned int ldata, unsigned int mdata);
4746 bool cli_receive_trans(struct cli_state *cli,int trans,
4747                               char **param, unsigned int *param_len,
4748                               char **data, unsigned int *data_len);
4749 bool cli_send_nt_trans(struct cli_state *cli,
4750                        int function,
4751                        int flags,
4752                        uint16 *setup, unsigned int lsetup, unsigned int msetup,
4753                        char *param, unsigned int lparam, unsigned int mparam,
4754                        char *data, unsigned int ldata, unsigned int mdata);
4755 bool cli_receive_nt_trans(struct cli_state *cli,
4756                           char **param, unsigned int *param_len,
4757                           char **data, unsigned int *data_len);
4758
4759 /* The following definitions come from libsmb/conncache.c  */
4760
4761 NTSTATUS check_negative_conn_cache_timeout( const char *domain, const char *server, unsigned int failed_cache_timeout );
4762 NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
4763 void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
4764 void delete_negative_conn_cache(const char *domain, const char *server);
4765 void flush_negative_conn_cache( void );
4766 void flush_negative_conn_cache_for_domain(const char *domain);
4767
4768 /* The following definitions come from libsmb/credentials.c  */
4769
4770 char *credstr(const unsigned char *cred);
4771 void creds_server_init(uint32 neg_flags,
4772                         struct dcinfo *dc,
4773                         struct netr_Credential *clnt_chal,
4774                         struct netr_Credential *srv_chal,
4775                         const unsigned char mach_pw[16],
4776                         struct netr_Credential *init_chal_out);
4777 bool netlogon_creds_server_check(const struct dcinfo *dc,
4778                                  const struct netr_Credential *rcv_cli_chal_in);
4779 bool netlogon_creds_server_step(struct dcinfo *dc,
4780                                 const struct netr_Authenticator *received_cred,
4781                                 struct netr_Authenticator *cred_out);
4782 void creds_client_init(uint32 neg_flags,
4783                         struct dcinfo *dc,
4784                         struct netr_Credential *clnt_chal,
4785                         struct netr_Credential *srv_chal,
4786                         const unsigned char mach_pw[16],
4787                         struct netr_Credential *init_chal_out);
4788 bool netlogon_creds_client_check(const struct dcinfo *dc,
4789                                  const struct netr_Credential *rcv_srv_chal_in);
4790 void netlogon_creds_client_step(struct dcinfo *dc,
4791                                 struct netr_Authenticator *next_cred_out);
4792
4793 /* The following definitions come from libsmb/dcerpc_err.c  */
4794
4795 const char *dcerpc_errstr(uint32 fault_code);
4796
4797 /* The following definitions come from libsmb/doserr.c  */
4798
4799 const char *dos_errstr(WERROR werror);
4800 const char *get_friendly_werror_msg(WERROR werror);
4801 const char *win_errstr(WERROR werror);
4802
4803 /* The following definitions come from libsmb/dsgetdcname.c  */
4804
4805 void debug_dsdcinfo_flags(int lvl, uint32_t flags);
4806 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
4807                      struct messaging_context *msg_ctx,
4808                      const char *domain_name,
4809                      struct GUID *domain_guid,
4810                      const char *site_name,
4811                      uint32_t flags,
4812                      struct netr_DsRGetDCNameInfo **info);
4813
4814 /* The following definitions come from libsmb/errormap.c  */
4815
4816 NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode);
4817 void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode);
4818 NTSTATUS werror_to_ntstatus(WERROR error);
4819 WERROR ntstatus_to_werror(NTSTATUS error);
4820 NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor);
4821
4822 /* The following definitions come from libsmb/namecache.c  */
4823
4824 bool namecache_enable(void);
4825 bool namecache_shutdown(void);
4826 bool namecache_store(const char *name,
4827                         int name_type,
4828                         int num_names,
4829                         struct ip_service *ip_list);
4830 bool namecache_fetch(const char *name,
4831                         int name_type,
4832                         struct ip_service **ip_list,
4833                         int *num_names);
4834 bool namecache_delete(const char *name, int name_type);
4835 void namecache_flush(void);
4836 bool namecache_status_store(const char *keyname, int keyname_type,
4837                 int name_type, const struct sockaddr_storage *keyip,
4838                 const char *srvname);
4839 bool namecache_status_fetch(const char *keyname,
4840                                 int keyname_type,
4841                                 int name_type,
4842                                 const struct sockaddr_storage *keyip,
4843                                 char *srvname_out);
4844
4845 /* The following definitions come from libsmb/namequery.c  */
4846
4847 bool saf_store( const char *domain, const char *servername );
4848 bool saf_delete( const char *domain );
4849 char *saf_fetch( const char *domain );
4850 NODE_STATUS_STRUCT *node_status_query(int fd,
4851                                         struct nmb_name *name,
4852                                         const struct sockaddr_storage *to_ss,
4853                                         int *num_names,
4854                                         struct node_status_extra *extra);
4855 bool name_status_find(const char *q_name,
4856                         int q_type,
4857                         int type,
4858                         const struct sockaddr_storage *to_ss,
4859                         fstring name);
4860 int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2);
4861 struct sockaddr_storage *name_query(int fd,
4862                         const char *name,
4863                         int name_type,
4864                         bool bcast,
4865                         bool recurse,
4866                         const struct sockaddr_storage *to_ss,
4867                         int *count,
4868                         int *flags,
4869                         bool *timed_out);
4870 XFILE *startlmhosts(const char *fname);
4871 bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
4872                 struct sockaddr_storage *pss);
4873 void endlmhosts(XFILE *fp);
4874 NTSTATUS name_resolve_bcast(const char *name,
4875                         int name_type,
4876                         struct ip_service **return_iplist,
4877                         int *return_count);
4878 NTSTATUS resolve_wins(const char *name,
4879                 int name_type,
4880                 struct ip_service **return_iplist,
4881                 int *return_count);
4882 NTSTATUS internal_resolve_name(const char *name,
4883                                 int name_type,
4884                                 const char *sitename,
4885                                 struct ip_service **return_iplist,
4886                                 int *return_count,
4887                                 const char *resolve_order);
4888 bool resolve_name(const char *name,
4889                 struct sockaddr_storage *return_ss,
4890                 int name_type);
4891 NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
4892                 const char *name,
4893                 int name_type,
4894                 struct sockaddr_storage **return_ss_arr,
4895                 unsigned int *p_num_entries);
4896 bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
4897 bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
4898 NTSTATUS get_sorted_dc_list( const char *domain,
4899                         const char *sitename,
4900                         struct ip_service **ip_list,
4901                         int *count,
4902                         bool ads_only );
4903 NTSTATUS get_kdc_list( const char *realm,
4904                         const char *sitename,
4905                         struct ip_service **ip_list,
4906                         int *count);
4907
4908 /* The following definitions come from libsmb/namequery_dc.c  */
4909
4910 bool get_dc_name(const char *domain,
4911                 const char *realm,
4912                 fstring srv_name,
4913                 struct sockaddr_storage *ss_out);
4914
4915 /* The following definitions come from libsmb/nmblib.c  */
4916
4917 void debug_nmb_packet(struct packet_struct *p);
4918 void put_name(char *dest, const char *name, int pad, unsigned int name_type);
4919 char *nmb_namestr(const struct nmb_name *n);
4920 struct packet_struct *copy_packet(struct packet_struct *packet);
4921 void free_packet(struct packet_struct *packet);
4922 struct packet_struct *parse_packet(char *buf,int length,
4923                                    enum packet_type packet_type,
4924                                    struct in_addr ip,
4925                                    int port);
4926 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
4927 void make_nmb_name( struct nmb_name *n, const char *name, int type);
4928 bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
4929 int build_packet(char *buf, size_t buflen, struct packet_struct *p);
4930 bool send_packet(struct packet_struct *p);
4931 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
4932 struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id);
4933 struct packet_struct *receive_dgram_packet(int fd, int t,
4934                 const char *mailslot_name);
4935 bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
4936 int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
4937 void sort_query_replies(char *data, int n, struct in_addr ip);
4938 int name_mangle( char *In, char *Out, char name_type );
4939 int name_extract(char *buf,int ofs, fstring name);
4940 int name_len(char *s1);
4941
4942 /* The following definitions come from libsmb/nterr.c  */
4943
4944 const char *nt_errstr(NTSTATUS nt_code);
4945 const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
4946 const char *get_nt_error_c_code(NTSTATUS nt_code);
4947 NTSTATUS nt_status_string_to_code(char *nt_status_str);
4948 NTSTATUS nt_status_squash(NTSTATUS nt_status);
4949
4950 /* The following definitions come from libsmb/ntlm_check.c  */
4951
4952 NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
4953                              const DATA_BLOB *challenge,
4954                              const DATA_BLOB *lm_response,
4955                              const DATA_BLOB *nt_response,
4956                              const DATA_BLOB *lm_interactive_pwd,
4957                              const DATA_BLOB *nt_interactive_pwd,
4958                              const char *username, 
4959                              const char *client_username, 
4960                              const char *client_domain,
4961                              const uint8 *lm_pw, const uint8 *nt_pw, 
4962                              DATA_BLOB *user_sess_key, 
4963                              DATA_BLOB *lm_sess_key);
4964
4965 /* The following definitions come from libsmb/ntlmssp.c  */
4966
4967 void debug_ntlmssp_flags(uint32 neg_flags);
4968 NTSTATUS ntlmssp_set_username(NTLMSSP_STATE *ntlmssp_state, const char *user) ;
4969 NTSTATUS ntlmssp_set_hashes(NTLMSSP_STATE *ntlmssp_state,
4970                 const unsigned char lm_hash[16],
4971                 const unsigned char nt_hash[16]) ;
4972 NTSTATUS ntlmssp_set_password(NTLMSSP_STATE *ntlmssp_state, const char *password) ;
4973 NTSTATUS ntlmssp_set_domain(NTLMSSP_STATE *ntlmssp_state, const char *domain) ;
4974 NTSTATUS ntlmssp_set_workstation(NTLMSSP_STATE *ntlmssp_state, const char *workstation) ;
4975 NTSTATUS ntlmssp_store_response(NTLMSSP_STATE *ntlmssp_state,
4976                                 DATA_BLOB response) ;
4977 void ntlmssp_want_feature_list(NTLMSSP_STATE *ntlmssp_state, char *feature_list);
4978 void ntlmssp_want_feature(NTLMSSP_STATE *ntlmssp_state, uint32 feature);
4979 NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state, 
4980                         const DATA_BLOB in, DATA_BLOB *out) ;
4981 void ntlmssp_end(NTLMSSP_STATE **ntlmssp_state);
4982 DATA_BLOB ntlmssp_weaken_keys(NTLMSSP_STATE *ntlmssp_state, TALLOC_CTX *mem_ctx);
4983 NTSTATUS ntlmssp_server_start(NTLMSSP_STATE **ntlmssp_state);
4984 NTSTATUS ntlmssp_client_start(NTLMSSP_STATE **ntlmssp_state);
4985
4986 /* The following definitions come from libsmb/ntlmssp_parse.c  */
4987
4988 bool msrpc_gen(DATA_BLOB *blob,
4989                const char *format, ...);
4990 bool msrpc_parse(const DATA_BLOB *blob,
4991                  const char *format, ...);
4992
4993 /* The following definitions come from libsmb/ntlmssp_sign.c  */
4994
4995 NTSTATUS ntlmssp_sign_packet(NTLMSSP_STATE *ntlmssp_state,
4996                                     const uchar *data, size_t length, 
4997                                     const uchar *whole_pdu, size_t pdu_length, 
4998                                     DATA_BLOB *sig) ;
4999 NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
5000                                 const uchar *data, size_t length, 
5001                                 const uchar *whole_pdu, size_t pdu_length, 
5002                                 const DATA_BLOB *sig) ;
5003 NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
5004                              uchar *data, size_t length,
5005                              uchar *whole_pdu, size_t pdu_length,
5006                              DATA_BLOB *sig);
5007 NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
5008                                 uchar *data, size_t length,
5009                                 uchar *whole_pdu, size_t pdu_length,
5010                                 DATA_BLOB *sig);
5011 NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state);
5012
5013 /* The following definitions come from libsmb/passchange.c  */
5014
5015 NTSTATUS remote_password_change(const char *remote_machine, const char *user_name, 
5016                                 const char *old_passwd, const char *new_passwd,
5017                                 char **err_str);
5018
5019 /* The following definitions come from libsmb/pwd_cache.c  */
5020
5021 void pwd_set_cleartext(struct pwd_info *pwd, const char *clr);
5022 void pwd_get_cleartext(struct pwd_info *pwd, fstring clr);
5023
5024 /* The following definitions come from libsmb/samlogon_cache.c  */
5025
5026 bool netsamlogon_cache_init(void);
5027 bool netsamlogon_cache_shutdown(void);
5028 void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, struct netr_SamInfo3 *info3);
5029 bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
5030 struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid);
5031 bool netsamlogon_cache_have(const DOM_SID *user_sid);
5032
5033 /* The following definitions come from libsmb/smb_seal.c  */
5034
5035 NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16 *p_enc_ctx_num);
5036 bool common_encryption_on(struct smb_trans_enc_state *es);
5037 NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf);
5038 NTSTATUS common_ntlm_encrypt_buffer(NTLMSSP_STATE *ntlmssp_state,
5039                                 uint16 enc_ctx_num,
5040                                 char *buf,
5041                                 char **ppbuf_out);
5042 NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, char **buf_out);
5043 NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf);
5044 void common_free_encryption_state(struct smb_trans_enc_state **pp_es);
5045 void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
5046 bool cli_encryption_on(struct cli_state *cli);
5047 void cli_free_encryption_context(struct cli_state *cli);
5048 void cli_free_enc_buffer(struct cli_state *cli, char *buf);
5049 NTSTATUS cli_decrypt_message(struct cli_state *cli);
5050 NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
5051
5052 /* The following definitions come from libsmb/smb_signing.c  */
5053
5054 bool cli_simple_set_signing(struct cli_state *cli,
5055                             const DATA_BLOB user_session_key,
5056                             const DATA_BLOB response);
5057 bool cli_null_set_signing(struct cli_state *cli);
5058 bool cli_temp_set_signing(struct cli_state *cli);
5059 void cli_free_signing_context(struct cli_state *cli);
5060 void cli_calculate_sign_mac(struct cli_state *cli, char *buf);
5061 bool cli_check_sign_mac(struct cli_state *cli, char *buf);
5062 bool client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid);
5063 bool client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid);
5064 bool client_is_signing_on(struct cli_state *cli);
5065 bool srv_oplock_set_signing(bool onoff);
5066 bool srv_check_sign_mac(const char *inbuf, bool must_be_ok);
5067 void srv_calculate_sign_mac(char *outbuf);
5068 void srv_defer_sign_response(uint16 mid);
5069 void srv_cancel_sign_response(uint16 mid);
5070 void srv_set_signing_negotiated(void);
5071 bool srv_is_signing_active(void);
5072 bool srv_is_signing_negotiated(void);
5073 bool srv_signing_started(void);
5074 void srv_set_signing(const DATA_BLOB user_session_key, const DATA_BLOB response);
5075
5076 /* The following definitions come from libsmb/smbdes.c  */
5077
5078 void des_crypt56(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
5079 void E_P16(const unsigned char *p14,unsigned char *p16);
5080 void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24);
5081 void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out);
5082 void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out);
5083 void des_crypt128(unsigned char out[8], const unsigned char in[8], const unsigned char key[16]);
5084 void des_crypt64(unsigned char out[8], const unsigned char in[8], const unsigned char key[8]);
5085 void des_crypt112(unsigned char out[8], const unsigned char in[8], const unsigned char key[14], int forw);
5086 void cred_hash3(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
5087 void des_crypt112_16(unsigned char out[16], unsigned char in[16], const unsigned char key[14], int forw);
5088 void SamOEMhash( unsigned char *data, const unsigned char key[16], size_t len);
5089 void SamOEMhashBlob( unsigned char *data, size_t len, DATA_BLOB *key);
5090 void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw);
5091
5092 /* The following definitions come from libsmb/smbencrypt.c  */
5093
5094 void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24]);
5095 bool SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24]);
5096 void E_md4hash(const char *passwd, uchar p16[16]);
5097 void E_md5hash(const uchar salt[16], const uchar nthash[16], uchar hash_out[16]);
5098 bool E_deshash(const char *passwd, uchar p16[16]);
5099 void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar p16[16]);
5100 bool ntv2_owf_gen(const uchar owf[16],
5101                   const char *user_in, const char *domain_in,
5102                   bool upper_case_domain, /* Transform the domain into UPPER case */
5103                   uchar kr_buf[16]);
5104 void SMBOWFencrypt(const uchar passwd[16], const uchar *c8, uchar p24[24]);
5105 void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p24[24]);
5106 void SMBNTencrypt_hash(const uchar nt_hash[16], uchar *c8, uchar *p24);
5107 void SMBNTencrypt(const char *passwd, uchar *c8, uchar *p24);
5108 void SMBOWFencrypt_ntv2(const uchar kr[16],
5109                         const DATA_BLOB *srv_chal,
5110                         const DATA_BLOB *cli_chal,
5111                         uchar resp_buf[16]);
5112 void SMBsesskeygen_ntv2(const uchar kr[16],
5113                         const uchar * nt_resp, uint8 sess_key[16]);
5114 void SMBsesskeygen_ntv1(const uchar kr[16],
5115                         const uchar * nt_resp, uint8 sess_key[16]);
5116 void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16],
5117                         const uchar lm_resp[24], /* only uses 8 */ 
5118                         uint8 sess_key[16]);
5119 DATA_BLOB NTLMv2_generate_names_blob(const char *hostname, 
5120                                      const char *domain);
5121 bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16], 
5122                       const DATA_BLOB *server_chal, 
5123                       const DATA_BLOB *names_blob,
5124                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5125                       DATA_BLOB *user_session_key) ;
5126 bool SMBNTLMv2encrypt(const char *user, const char *domain, const char *password, 
5127                       const DATA_BLOB *server_chal, 
5128                       const DATA_BLOB *names_blob,
5129                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5130                       DATA_BLOB *user_session_key) ;
5131 bool encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags);
5132 bool decode_pw_buffer(TALLOC_CTX *ctx,
5133                         uint8 in_buffer[516],
5134                         char **pp_new_pwrd,
5135                         uint32 *new_pw_len,
5136                         int string_flags);
5137 void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key);
5138 void sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *session_key, int forward);
5139 char *decrypt_trustdom_secret(uint8_t nt_hash[16], DATA_BLOB *data_in);
5140 void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5141                                         const char *pwd,
5142                                         DATA_BLOB *session_key,
5143                                         struct wkssvc_PasswordBuffer **pwd_buf);
5144 WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5145                                           struct wkssvc_PasswordBuffer *pwd_buf,
5146                                           DATA_BLOB *session_key,
5147                                           char **pwd);
5148 DATA_BLOB decrypt_drsuapi_blob(TALLOC_CTX *mem_ctx,
5149                                const DATA_BLOB *session_key,
5150                                bool rcrypt,
5151                                uint32_t rid,
5152                                const DATA_BLOB *buffer);
5153
5154 /* The following definitions come from libsmb/smberr.c  */
5155
5156 const char *smb_dos_err_name(uint8 e_class, uint16 num);
5157 const char *get_dos_error_msg(WERROR result);
5158 const char *smb_dos_err_class(uint8 e_class);
5159 char *smb_dos_errstr(char *inbuf);
5160 WERROR map_werror_from_unix(int error);
5161
5162 /* The following definitions come from libsmb/spnego.c  */
5163
5164 ssize_t read_spnego_data(DATA_BLOB data, SPNEGO_DATA *token);
5165 ssize_t write_spnego_data(DATA_BLOB *blob, SPNEGO_DATA *spnego);
5166 bool free_spnego_data(SPNEGO_DATA *spnego);
5167
5168 /* The following definitions come from libsmb/trustdom_cache.c  */
5169
5170 bool trustdom_cache_enable(void);
5171 bool trustdom_cache_shutdown(void);
5172 bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
5173                           time_t timeout);
5174 bool trustdom_cache_fetch(const char* name, DOM_SID* sid);
5175 uint32 trustdom_cache_fetch_timestamp( void );
5176 bool trustdom_cache_store_timestamp( uint32 t, time_t timeout );
5177 void trustdom_cache_flush(void);
5178 void update_trustdom_cache( void );
5179
5180 /* The following definitions come from libsmb/trusts_util.c  */
5181
5182 NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
5183                                       const char *domain,
5184                                       unsigned char orig_trust_passwd_hash[16],
5185                                       uint32 sec_channel_type);
5186 NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
5187                                            TALLOC_CTX *mem_ctx, 
5188                                            const char *domain) ;
5189 bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
5190                                      char ***domain_names, uint32 *num_domains,
5191                                      DOM_SID **sids );
5192
5193 /* The following definitions come from libsmb/unexpected.c  */
5194
5195 void unexpected_packet(struct packet_struct *p);
5196 void clear_unexpected(time_t t);
5197 struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
5198                                          const char *mailslot_name);
5199
5200 /* The following definitions come from locking/brlock.c  */
5201
5202 bool brl_same_context(const struct lock_context *ctx1, 
5203                              const struct lock_context *ctx2);
5204 void brl_init(bool read_only);
5205 void brl_shutdown(void);
5206 NTSTATUS brl_lock(struct messaging_context *msg_ctx,
5207                 struct byte_range_lock *br_lck,
5208                 uint32 smbpid,
5209                 struct server_id pid,
5210                 br_off start,
5211                 br_off size, 
5212                 enum brl_type lock_type,
5213                 enum brl_flavour lock_flav,
5214                 bool blocking_lock,
5215                 uint32 *psmbpid);
5216 bool brl_unlock(struct messaging_context *msg_ctx,
5217                 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 bool brl_locktest(struct byte_range_lock *br_lck,
5224                 uint32 smbpid,
5225                 struct server_id pid,
5226                 br_off start,
5227                 br_off size, 
5228                 enum brl_type lock_type,
5229                 enum brl_flavour lock_flav);
5230 NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
5231                 uint32 *psmbpid,
5232                 struct server_id pid,
5233                 br_off *pstart,
5234                 br_off *psize, 
5235                 enum brl_type *plock_type,
5236                 enum brl_flavour lock_flav);
5237 bool brl_lock_cancel(struct byte_range_lock *br_lck,
5238                 uint32 smbpid,
5239                 struct server_id pid,
5240                 br_off start,
5241                 br_off size,
5242                 enum brl_flavour lock_flav);
5243 void brl_close_fnum(struct messaging_context *msg_ctx,
5244                     struct byte_range_lock *br_lck);
5245 int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
5246                           enum brl_type lock_type,
5247                           enum brl_flavour lock_flav,
5248                           br_off start, br_off size,
5249                           void *private_data),
5250                void *private_data);
5251 struct byte_range_lock *brl_get_locks(TALLOC_CTX *mem_ctx,
5252                                         files_struct *fsp);
5253 struct byte_range_lock *brl_get_locks_readonly(TALLOC_CTX *mem_ctx,
5254                                         files_struct *fsp);
5255 void brl_register_msgs(struct messaging_context *msg_ctx);
5256
5257 /* The following definitions come from locking/locking.c  */
5258
5259 const char *lock_type_name(enum brl_type lock_type);
5260 const char *lock_flav_name(enum brl_flavour lock_flav);
5261 bool is_locked(files_struct *fsp,
5262                 uint32 smbpid,
5263                 SMB_BIG_UINT count,
5264                 SMB_BIG_UINT offset, 
5265                 enum brl_type lock_type);
5266 NTSTATUS query_lock(files_struct *fsp,
5267                         uint32 *psmbpid,
5268                         SMB_BIG_UINT *pcount,
5269                         SMB_BIG_UINT *poffset,
5270                         enum brl_type *plock_type,
5271                         enum brl_flavour lock_flav);
5272 struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
5273                         files_struct *fsp,
5274                         uint32 lock_pid,
5275                         SMB_BIG_UINT count,
5276                         SMB_BIG_UINT offset,
5277                         enum brl_type lock_type,
5278                         enum brl_flavour lock_flav,
5279                         bool blocking_lock,
5280                         NTSTATUS *perr,
5281                         uint32 *plock_pid);
5282 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
5283                         files_struct *fsp,
5284                         uint32 lock_pid,
5285                         SMB_BIG_UINT count,
5286                         SMB_BIG_UINT offset,
5287                         enum brl_flavour lock_flav);
5288 NTSTATUS do_lock_cancel(files_struct *fsp,
5289                         uint32 lock_pid,
5290                         SMB_BIG_UINT count,
5291                         SMB_BIG_UINT offset,
5292                         enum brl_flavour lock_flav);
5293 void locking_close_file(struct messaging_context *msg_ctx,
5294                         files_struct *fsp);
5295 bool locking_init(void);
5296 bool locking_init_readonly(void);
5297 bool locking_end(void);
5298 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
5299 struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
5300                                             const struct file_id id,
5301                                             const char *servicepath,
5302                                             const char *fname,
5303                                             const struct timespec *old_write_time);
5304 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
5305                                                   const struct file_id id,
5306                                                   const char *servicepath,
5307                                                   const char *fname);
5308 bool rename_share_filename(struct messaging_context *msg_ctx,
5309                         struct share_mode_lock *lck,
5310                         const char *servicepath,
5311                         const char *newname);
5312 void get_file_infos(struct file_id id,
5313                     bool *delete_on_close,
5314                     struct timespec *write_time);
5315 bool is_valid_share_mode_entry(const struct share_mode_entry *e);
5316 bool is_deferred_open_entry(const struct share_mode_entry *e);
5317 bool is_unused_share_mode_entry(const struct share_mode_entry *e);
5318 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
5319                         uid_t uid, uint16 mid, uint16 op_type, bool initial_delete_on_close_allowed);
5320 void add_deferred_open(struct share_mode_lock *lck, uint16 mid,
5321                        struct timeval request_time,
5322                        struct file_id id);
5323 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
5324 void del_deferred_open_entry(struct share_mode_lock *lck, uint16 mid);
5325 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5326 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5327 NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
5328                                  uint32 dosmode);
5329 bool can_set_initial_delete_on_close(const struct share_mode_lock *lck);
5330 void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok);
5331 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok);
5332 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok);
5333 bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close);
5334 bool set_write_time(struct file_id fileid, struct timespec write_time,
5335                     bool overwrite);
5336 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
5337                                  const char *, void *),
5338                       void *private_data);
5339
5340 /* The following definitions come from locking/posix.c  */
5341
5342 bool is_posix_locked(files_struct *fsp,
5343                         SMB_BIG_UINT *pu_offset,
5344                         SMB_BIG_UINT *pu_count,
5345                         enum brl_type *plock_type,
5346                         enum brl_flavour lock_flav);
5347 bool posix_locking_init(bool read_only);
5348 bool posix_locking_end(void);
5349 void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);
5350 int fd_close_posix(struct files_struct *fsp);
5351 bool set_posix_lock_windows_flavour(files_struct *fsp,
5352                         SMB_BIG_UINT u_offset,
5353                         SMB_BIG_UINT u_count,
5354                         enum brl_type lock_type,
5355                         const struct lock_context *lock_ctx,
5356                         const struct lock_struct *plocks,
5357                         int num_locks,
5358                         int *errno_ret);
5359 bool release_posix_lock_windows_flavour(files_struct *fsp,
5360                                 SMB_BIG_UINT u_offset,
5361                                 SMB_BIG_UINT u_count,
5362                                 enum brl_type deleted_lock_type,
5363                                 const struct lock_context *lock_ctx,
5364                                 const struct lock_struct *plocks,
5365                                 int num_locks);
5366 bool set_posix_lock_posix_flavour(files_struct *fsp,
5367                         SMB_BIG_UINT u_offset,
5368                         SMB_BIG_UINT u_count,
5369                         enum brl_type lock_type,
5370                         int *errno_ret);
5371 bool release_posix_lock_posix_flavour(files_struct *fsp,
5372                                 SMB_BIG_UINT u_offset,
5373                                 SMB_BIG_UINT u_count,
5374                                 const struct lock_context *lock_ctx,
5375                                 const struct lock_struct *plocks,
5376                                 int num_locks);
5377
5378 /* The following definitions come from modules/vfs_default.c  */
5379
5380 int vfswrap_lstat(vfs_handle_struct *handle,  const char *path, SMB_STRUCT_STAT *sbuf);
5381 ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
5382 ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
5383 NTSTATUS vfs_default_init(void);
5384
5385 /* The following definitions come from modules/vfs_posixacl.c  */
5386
5387 SMB_ACL_T posixacl_sys_acl_get_file(vfs_handle_struct *handle,
5388                                     const char *path_p,
5389                                     SMB_ACL_TYPE_T type);
5390 SMB_ACL_T posixacl_sys_acl_get_fd(vfs_handle_struct *handle,
5391                                   files_struct *fsp);
5392 int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
5393                               const char *name,
5394                               SMB_ACL_TYPE_T type,
5395                               SMB_ACL_T theacl);
5396 int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
5397                             files_struct *fsp,
5398                             SMB_ACL_T theacl);
5399 int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
5400                                      const char *path);
5401 NTSTATUS vfs_posixacl_init(void);
5402
5403 /* The following definitions come from nmbd/asyncdns.c  */
5404
5405 int asyncdns_fd(void);
5406 void kill_async_dns_child(void);
5407 void start_async_dns(void);
5408 void run_dns_queue(void);
5409 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5410 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5411 void kill_async_dns_child(void);
5412
5413 /* The following definitions come from nmbd/nmbd.c  */
5414
5415 struct event_context *nmbd_event_context(void);
5416 struct messaging_context *nmbd_messaging_context(void);
5417
5418 /* The following definitions come from nmbd/nmbd_become_dmb.c  */
5419
5420 void add_domain_names(time_t t);
5421
5422 /* The following definitions come from nmbd/nmbd_become_lmb.c  */
5423
5424 void insert_permanent_name_into_unicast( struct subnet_record *subrec, 
5425                                                 struct nmb_name *nmbname, uint16 nb_type );
5426 void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work,
5427                                    bool force_new_election);
5428 void become_local_master_browser(struct subnet_record *subrec, struct work_record *work);
5429 void set_workgroup_local_master_browser_name( struct work_record *work, const char *newname);
5430
5431 /* The following definitions come from nmbd/nmbd_browserdb.c  */
5432
5433 void update_browser_death_time( struct browse_cache_record *browc );
5434 struct browse_cache_record *create_browser_in_lmb_cache( const char *work_name, 
5435                                                          const char *browser_name, 
5436                                                          struct in_addr ip );
5437 struct browse_cache_record *find_browser_in_lmb_cache( const char *browser_name );
5438 void expire_lmb_browsers( time_t t );
5439
5440 /* The following definitions come from nmbd/nmbd_browsesync.c  */
5441
5442 void dmb_expire_and_sync_browser_lists(time_t t);
5443 void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec,
5444                                                    struct work_record *work);
5445 void collect_all_workgroup_names_from_wins_server(time_t t);
5446 void sync_all_dmbs(time_t t);
5447
5448 /* The following definitions come from nmbd/nmbd_elections.c  */
5449
5450 void check_master_browser_exists(time_t t);
5451 void run_elections(time_t t);
5452 void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5453 bool check_elections(void);
5454 void nmbd_message_election(struct messaging_context *msg,
5455                            void *private_data,
5456                            uint32_t msg_type,
5457                            struct server_id server_id,
5458                            DATA_BLOB *data);
5459
5460 /* The following definitions come from nmbd/nmbd_incomingdgrams.c  */
5461
5462 void tell_become_backup(void);
5463 void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5464 void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5465 void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5466 void process_master_browser_announce(struct subnet_record *subrec, 
5467                                      struct packet_struct *p,char *buf);
5468 void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5469 void process_get_backup_list_request(struct subnet_record *subrec,
5470                                      struct packet_struct *p,char *buf);
5471 void process_reset_browser(struct subnet_record *subrec,
5472                                   struct packet_struct *p,char *buf);
5473 void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5474 void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5475
5476 /* The following definitions come from nmbd/nmbd_incomingrequests.c  */
5477
5478 void process_name_release_request(struct subnet_record *subrec, 
5479                                   struct packet_struct *p);
5480 void process_name_refresh_request(struct subnet_record *subrec,
5481                                   struct packet_struct *p);
5482 void process_name_registration_request(struct subnet_record *subrec, 
5483                                        struct packet_struct *p);
5484 void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p);
5485 void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p);
5486
5487 /* The following definitions come from nmbd/nmbd_lmhosts.c  */
5488
5489 void load_lmhosts_file(const char *fname);
5490 bool find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp);
5491
5492 /* The following definitions come from nmbd/nmbd_logonnames.c  */
5493
5494 void add_logon_names(void);
5495
5496 /* The following definitions come from nmbd/nmbd_mynames.c  */
5497
5498 void register_my_workgroup_one_subnet(struct subnet_record *subrec);
5499 bool register_my_workgroup_and_names(void);
5500 void release_wins_names(void);
5501 void refresh_my_names(time_t t);
5502
5503 /* The following definitions come from nmbd/nmbd_namelistdb.c  */
5504
5505 void set_samba_nb_type(void);
5506 void remove_name_from_namelist(struct subnet_record *subrec, 
5507                                 struct name_record *namerec );
5508 struct name_record *find_name_on_subnet(struct subnet_record *subrec,
5509                                 const struct nmb_name *nmbname,
5510                                 bool self_only);
5511 struct name_record *find_name_for_remote_broadcast_subnet(struct nmb_name *nmbname,
5512                                                 bool self_only);
5513 void update_name_ttl( struct name_record *namerec, int ttl );
5514 bool add_name_to_subnet( struct subnet_record *subrec,
5515                         const char *name,
5516                         int type,
5517                         uint16 nb_flags,
5518                         int ttl,
5519                         enum name_source source,
5520                         int num_ips,
5521                         struct in_addr *iplist);
5522 void standard_success_register(struct subnet_record *subrec, 
5523                              struct userdata_struct *userdata,
5524                              struct nmb_name *nmbname, uint16 nb_flags, int ttl,
5525                              struct in_addr registered_ip);
5526 void standard_fail_register( struct subnet_record   *subrec,
5527                              struct nmb_name        *nmbname );
5528 bool find_ip_in_name_record( struct name_record *namerec, struct in_addr ip );
5529 void add_ip_to_name_record( struct name_record *namerec, struct in_addr new_ip );
5530 void remove_ip_from_name_record( struct name_record *namerec,
5531                                  struct in_addr      remove_ip );
5532 void standard_success_release( struct subnet_record   *subrec,
5533                                struct userdata_struct *userdata,
5534                                struct nmb_name        *nmbname,
5535                                struct in_addr          released_ip );
5536 void expire_names(time_t t);
5537 void add_samba_names_to_subnet( struct subnet_record *subrec );
5538 void dump_name_record( struct name_record *namerec, XFILE *fp);
5539 void dump_all_namelists(void);
5540
5541 /* The following definitions come from nmbd/nmbd_namequery.c  */
5542
5543 bool query_name(struct subnet_record *subrec, const char *name, int type,
5544                    query_name_success_function success_fn,
5545                    query_name_fail_function fail_fn, 
5546                    struct userdata_struct *userdata);
5547 bool query_name_from_wins_server(struct in_addr ip_to, 
5548                    const char *name, int type,
5549                    query_name_success_function success_fn,
5550                    query_name_fail_function fail_fn, 
5551                    struct userdata_struct *userdata);
5552
5553 /* The following definitions come from nmbd/nmbd_nameregister.c  */
5554
5555 void register_name(struct subnet_record *subrec,
5556                    const char *name, int type, uint16 nb_flags,
5557                    register_name_success_function success_fn,
5558                    register_name_fail_function fail_fn,
5559                    struct userdata_struct *userdata);
5560 void wins_refresh_name(struct name_record *namerec);
5561
5562 /* The following definitions come from nmbd/nmbd_namerelease.c  */
5563
5564 void release_name(struct subnet_record *subrec, struct name_record *namerec,
5565                   release_name_success_function success_fn,
5566                   release_name_fail_function fail_fn,
5567                   struct userdata_struct *userdata);
5568
5569 /* The following definitions come from nmbd/nmbd_nodestatus.c  */
5570
5571 bool node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
5572                  struct in_addr send_ip, node_status_success_function success_fn, 
5573                  node_status_fail_function fail_fn, struct userdata_struct *userdata);
5574
5575 /* The following definitions come from nmbd/nmbd_packets.c  */
5576
5577 uint16 get_nb_flags(char *buf);
5578 void set_nb_flags(char *buf, uint16 nb_flags);
5579 struct response_record *queue_register_name( struct subnet_record *subrec,
5580                           response_function resp_fn,
5581                           timeout_response_function timeout_fn,
5582                           register_name_success_function success_fn,
5583                           register_name_fail_function fail_fn,
5584                           struct userdata_struct *userdata,
5585                           struct nmb_name *nmbname,
5586                           uint16 nb_flags);
5587 void queue_wins_refresh(struct nmb_name *nmbname,
5588                         response_function resp_fn,
5589                         timeout_response_function timeout_fn,
5590                         uint16 nb_flags,
5591                         struct in_addr refresh_ip,
5592                         const char *tag);
5593 struct response_record *queue_register_multihomed_name( struct subnet_record *subrec,
5594                                                         response_function resp_fn,
5595                                                         timeout_response_function timeout_fn,
5596                                                         register_name_success_function success_fn,
5597                                                         register_name_fail_function fail_fn,
5598                                                         struct userdata_struct *userdata,
5599                                                         struct nmb_name *nmbname,
5600                                                         uint16 nb_flags,
5601                                                         struct in_addr register_ip,
5602                                                         struct in_addr wins_ip);
5603 struct response_record *queue_release_name( struct subnet_record *subrec,
5604                                             response_function resp_fn,
5605                                             timeout_response_function timeout_fn,
5606                                             release_name_success_function success_fn,
5607                                             release_name_fail_function fail_fn,
5608                                             struct userdata_struct *userdata,
5609                                             struct nmb_name *nmbname,
5610                                             uint16 nb_flags,
5611                                             struct in_addr release_ip,
5612                                             struct in_addr dest_ip);
5613 struct response_record *queue_query_name( struct subnet_record *subrec,
5614                           response_function resp_fn,
5615                           timeout_response_function timeout_fn,
5616                           query_name_success_function success_fn,
5617                           query_name_fail_function fail_fn,
5618                           struct userdata_struct *userdata,
5619                           struct nmb_name *nmbname);
5620 struct response_record *queue_query_name_from_wins_server( struct in_addr to_ip,
5621                           response_function resp_fn,
5622                           timeout_response_function timeout_fn,
5623                           query_name_success_function success_fn,
5624                           query_name_fail_function fail_fn,
5625                           struct userdata_struct *userdata,
5626                           struct nmb_name *nmbname);
5627 struct response_record *queue_node_status( struct subnet_record *subrec,
5628                           response_function resp_fn,
5629                           timeout_response_function timeout_fn,
5630                           node_status_success_function success_fn,
5631                           node_status_fail_function fail_fn,
5632                           struct userdata_struct *userdata,
5633                           struct nmb_name *nmbname,
5634                           struct in_addr send_ip);
5635 void reply_netbios_packet(struct packet_struct *orig_packet,
5636                           int rcode, enum netbios_reply_type_code rcv_code, int opcode,
5637                           int ttl, char *data,int len);
5638 void run_packet_queue(void);
5639 void retransmit_or_expire_response_records(time_t t);
5640 bool listen_for_packets(bool run_election);
5641 bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len,
5642                    const char *srcname, int src_type,
5643                    const char *dstname, int dest_type,
5644                    struct in_addr dest_ip,struct in_addr src_ip,
5645                    int dest_port);
5646
5647 /* The following definitions come from nmbd/nmbd_processlogon.c  */
5648
5649 void process_logon_packet(struct packet_struct *p, char *buf,int len, 
5650                           const char *mailslot);
5651
5652 /* The following definitions come from nmbd/nmbd_responserecordsdb.c  */
5653
5654 void remove_response_record(struct subnet_record *subrec,
5655                                 struct response_record *rrec);
5656 struct response_record *make_response_record( struct subnet_record *subrec,
5657                                               struct packet_struct *p,
5658                                               response_function resp_fn,
5659                                               timeout_response_function timeout_fn,
5660                                               success_function success_fn,
5661                                               fail_function fail_fn,
5662                                               struct userdata_struct *userdata);
5663 struct response_record *find_response_record(struct subnet_record **ppsubrec,
5664                                 uint16 id);
5665 bool is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec);
5666
5667 /* The following definitions come from nmbd/nmbd_sendannounce.c  */
5668
5669 void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip);
5670 void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work);
5671 void announce_my_server_names(time_t t);
5672 void announce_my_lm_server_names(time_t t);
5673 void reset_announce_timer(void);
5674 void announce_myself_to_domain_master_browser(time_t t);
5675 void announce_my_servers_removed(void);
5676 void announce_remote(time_t t);
5677 void browse_sync_remote(time_t t);
5678
5679 /* The following definitions come from nmbd/nmbd_serverlistdb.c  */
5680
5681 void remove_all_servers(struct work_record *work);
5682 struct server_record *find_server_in_workgroup(struct work_record *work, const char *name);
5683 void remove_server_from_workgroup(struct work_record *work, struct server_record *servrec);
5684 struct server_record *create_server_on_workgroup(struct work_record *work,
5685                                                  const char *name,int servertype, 
5686                                                  int ttl, const char *comment);
5687 void update_server_ttl(struct server_record *servrec, int ttl);
5688 void expire_servers(struct work_record *work, time_t t);
5689 void write_browse_list_entry(XFILE *fp, const char *name, uint32 rec_type,
5690                 const char *local_master_browser_name, const char *description);
5691 void write_browse_list(time_t t, bool force_write);
5692
5693 /* The following definitions come from nmbd/nmbd_subnetdb.c  */
5694
5695 void close_subnet(struct subnet_record *subrec);
5696 struct subnet_record *make_normal_subnet(const struct interface *iface);
5697 bool create_subnets(void);
5698 bool we_are_a_wins_client(void);
5699 struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec);
5700 struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec);
5701
5702 /* The following definitions come from nmbd/nmbd_synclists.c  */
5703
5704 void sync_browse_lists(struct work_record *work,
5705                        char *name, int nm_type, 
5706                        struct in_addr ip, bool local, bool servers);
5707 void sync_check_completion(void);
5708
5709 /* The following definitions come from nmbd/nmbd_winsproxy.c  */
5710
5711 void make_wins_proxy_name_query_request( struct subnet_record *subrec, 
5712                                          struct packet_struct *incoming_packet,
5713                                          struct nmb_name *question_name);
5714
5715 /* The following definitions come from nmbd/nmbd_winsserver.c  */
5716
5717 struct name_record *find_name_on_wins_subnet(const struct nmb_name *nmbname, bool self_only);
5718 bool wins_store_changed_namerec(const struct name_record *namerec);
5719 bool add_name_to_wins_subnet(const struct name_record *namerec);
5720 bool remove_name_from_wins_namelist(struct name_record *namerec);
5721 void dump_wins_subnet_namelist(XFILE *fp);
5722 bool packet_is_for_wins_server(struct packet_struct *packet);
5723 bool initialise_wins(void);
5724 void wins_process_name_refresh_request( struct subnet_record *subrec,
5725                                         struct packet_struct *p );
5726 void wins_process_name_registration_request(struct subnet_record *subrec,
5727                                             struct packet_struct *p);
5728 void wins_process_multihomed_name_registration_request( struct subnet_record *subrec,
5729                                                         struct packet_struct *p);
5730 void fetch_all_active_wins_1b_names(void);
5731 void send_wins_name_query_response(int rcode, struct packet_struct *p, 
5732                                           struct name_record *namerec);
5733 void wins_process_name_query_request(struct subnet_record *subrec, 
5734                                      struct packet_struct *p);
5735 void wins_process_name_release_request(struct subnet_record *subrec,
5736                                        struct packet_struct *p);
5737 void initiate_wins_processing(time_t t);
5738 void wins_write_name_record(struct name_record *namerec, XFILE *fp);
5739 void wins_write_database(time_t t, bool background);
5740 void nmbd_wins_new_entry(struct messaging_context *msg,
5741                                        void *private_data,
5742                                        uint32_t msg_type,
5743                                        struct server_id server_id,
5744                                        DATA_BLOB *data);
5745
5746 /* The following definitions come from nmbd/nmbd_workgroupdb.c  */
5747
5748 struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec, 
5749                                              const char *name);
5750 struct work_record *create_workgroup_on_subnet(struct subnet_record *subrec,
5751                                                const char *name, int ttl);
5752 void update_workgroup_ttl(struct work_record *work, int ttl);
5753 void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_record *work);
5754 void dump_workgroups(bool force_write);
5755 void expire_workgroups_and_servers(time_t t);
5756
5757 /* The following definitions come from param/loadparm.c  */
5758
5759 char *lp_smb_ports(void);
5760 char *lp_dos_charset(void);
5761 char *lp_unix_charset(void);
5762 char *lp_display_charset(void);
5763 char *lp_logfile(void);
5764 char *lp_configfile(void);
5765 char *lp_smb_passwd_file(void);
5766 char *lp_private_dir(void);
5767 char *lp_serverstring(void);
5768 int lp_printcap_cache_time(void);
5769 char *lp_addport_cmd(void);
5770 char *lp_enumports_cmd(void);
5771 char *lp_addprinter_cmd(void);
5772 char *lp_deleteprinter_cmd(void);
5773 char *lp_os2_driver_map(void);
5774 char *lp_lockdir(void);
5775 char *lp_piddir(void);
5776 char *lp_mangling_method(void);
5777 int lp_mangle_prefix(void);
5778 char *lp_utmpdir(void);
5779 char *lp_wtmpdir(void);
5780 bool lp_utmp(void);
5781 char *lp_rootdir(void);
5782 char *lp_defaultservice(void);
5783 char *lp_msg_command(void);
5784 char *lp_get_quota_command(void);
5785 char *lp_set_quota_command(void);
5786 char *lp_auto_services(void);
5787 char *lp_passwd_program(void);
5788 char *lp_passwd_chat(void);
5789 char *lp_passwordserver(void);
5790 char *lp_name_resolve_order(void);
5791 char *lp_realm(void);
5792 const char *lp_afs_username_map(void);
5793 int lp_afs_token_lifetime(void);
5794 char *lp_log_nt_token_command(void);
5795 char *lp_username_map(void);
5796 const char *lp_logon_script(void);
5797 const char *lp_logon_path(void);
5798 const char *lp_logon_drive(void);
5799 const char *lp_logon_home(void);
5800 char *lp_remote_announce(void);
5801 char *lp_remote_browse_sync(void);
5802 const char **lp_wins_server_list(void);
5803 const char **lp_interfaces(void);
5804 char *lp_socket_address(void);
5805 char *lp_nis_home_map_name(void);
5806 const char **lp_netbios_aliases(void);
5807 const char *lp_passdb_backend(void);
5808 const char **lp_preload_modules(void);
5809 char *lp_panic_action(void);
5810 char *lp_adduser_script(void);
5811 char *lp_renameuser_script(void);
5812 char *lp_deluser_script(void);
5813 const char *lp_guestaccount(void);
5814 char *lp_addgroup_script(void);
5815 char *lp_delgroup_script(void);
5816 char *lp_addusertogroup_script(void);
5817 char *lp_deluserfromgroup_script(void);
5818 char *lp_setprimarygroup_script(void);
5819 char *lp_addmachine_script(void);
5820 char *lp_shutdown_script(void);
5821 char *lp_abort_shutdown_script(void);
5822 char *lp_username_map_script(void);
5823 char *lp_check_password_script(void);
5824 char *lp_wins_hook(void);
5825 const char *lp_template_homedir(void);
5826 const char *lp_template_shell(void);
5827 const char *lp_winbind_separator(void);
5828 int lp_acl_compatibility(void);
5829 bool lp_winbind_enum_users(void);
5830 bool lp_winbind_enum_groups(void);
5831 bool lp_winbind_use_default_domain(void);
5832 bool lp_winbind_trusted_domains_only(void);
5833 bool lp_winbind_nested_groups(void);
5834 int lp_winbind_expand_groups(void);
5835 bool lp_winbind_refresh_tickets(void);
5836 bool lp_winbind_offline_logon(void);
5837 bool lp_winbind_normalize_names(void);
5838 bool lp_winbind_rpc_only(void);
5839 const char **lp_idmap_domains(void);
5840 const char **lp_idmap_backend(void);
5841 char *lp_idmap_alloc_backend(void);
5842 int lp_idmap_cache_time(void);
5843 int lp_idmap_negative_cache_time(void);
5844 int lp_keepalive(void);
5845 bool lp_passdb_expand_explicit(void);
5846 char *lp_ldap_suffix(void);
5847 char *lp_ldap_admin_dn(void);
5848 int lp_ldap_ssl(void);
5849 int lp_ldap_passwd_sync(void);
5850 bool lp_ldap_delete_dn(void);
5851 int lp_ldap_replication_sleep(void);
5852 int lp_ldap_timeout(void);
5853 int lp_ldap_connection_timeout(void);
5854 int lp_ldap_page_size(void);
5855 int lp_ldap_debug_level(void);
5856 int lp_ldap_debug_threshold(void);
5857 char *lp_add_share_cmd(void);
5858 char *lp_change_share_cmd(void);
5859 char *lp_delete_share_cmd(void);
5860 char *lp_usershare_path(void);
5861 const char **lp_usershare_prefix_allow_list(void);
5862 const char **lp_usershare_prefix_deny_list(void);
5863 const char **lp_eventlog_list(void);
5864 bool lp_registry_shares(void);
5865 bool lp_usershare_allow_guests(void);
5866 bool lp_usershare_owner_only(void);
5867 bool lp_disable_netbios(void);
5868 bool lp_reset_on_zero_vc(void);
5869 bool lp_ms_add_printer_wizard(void);
5870 bool lp_dns_proxy(void);
5871 bool lp_wins_support(void);
5872 bool lp_we_are_a_wins_server(void);
5873 bool lp_wins_proxy(void);
5874 bool lp_local_master(void);
5875 bool lp_domain_logons(void);
5876 bool lp_load_printers(void);
5877 bool lp_readraw(void);
5878 bool lp_large_readwrite(void);
5879 bool lp_writeraw(void);
5880 bool lp_null_passwords(void);
5881 bool lp_obey_pam_restrictions(void);
5882 bool lp_encrypted_passwords(void);
5883 bool lp_update_encrypted(void);
5884 int lp_client_schannel(void);
5885 int lp_server_schannel(void);
5886 bool lp_syslog_only(void);
5887 bool lp_timestamp_logs(void);
5888 bool lp_debug_prefix_timestamp(void);
5889 bool lp_debug_hires_timestamp(void);
5890 bool lp_debug_pid(void);
5891 bool lp_debug_uid(void);
5892 bool lp_debug_class(void);
5893 bool lp_enable_core_files(void);
5894 bool lp_browse_list(void);
5895 bool lp_nis_home_map(void);
5896 bool lp_bind_interfaces_only(void);
5897 bool lp_pam_password_change(void);
5898 bool lp_unix_password_sync(void);
5899 bool lp_passwd_chat_debug(void);
5900 int lp_passwd_chat_timeout(void);
5901 bool lp_nt_pipe_support(void);
5902 bool lp_nt_status_support(void);
5903 bool lp_stat_cache(void);
5904 int lp_max_stat_cache_size(void);
5905 bool lp_allow_trusted_domains(void);
5906 int lp_restrict_anonymous(void);
5907 bool lp_lanman_auth(void);
5908 bool lp_ntlm_auth(void);
5909 bool lp_client_plaintext_auth(void);
5910 bool lp_client_lanman_auth(void);
5911 bool lp_client_ntlmv2_auth(void);
5912 bool lp_host_msdfs(void);
5913 bool lp_kernel_oplocks(void);
5914 bool lp_enhanced_browsing(void);
5915 bool lp_use_mmap(void);
5916 bool lp_unix_extensions(void);
5917 bool lp_use_spnego(void);
5918 bool lp_client_use_spnego(void);
5919 bool lp_hostname_lookups(void);
5920 bool lp_change_notify(const struct share_params *p );
5921 bool lp_kernel_change_notify(const struct share_params *p );
5922 bool lp_use_kerberos_keytab(void);
5923 bool lp_defer_sharing_violations(void);
5924 bool lp_enable_privileges(void);
5925 bool lp_enable_asu_support(void);
5926 int lp_os_level(void);
5927 int lp_max_ttl(void);
5928 int lp_max_wins_ttl(void);
5929 int lp_min_wins_ttl(void);
5930 int lp_max_log_size(void);
5931 int lp_max_open_files(void);
5932 int lp_open_files_db_hash_size(void);
5933 int lp_maxxmit(void);
5934 int lp_maxmux(void);
5935 int lp_passwordlevel(void);
5936 int lp_usernamelevel(void);
5937 int lp_deadtime(void);
5938 bool lp_getwd_cache(void);
5939 int lp_maxprotocol(void);
5940 int lp_minprotocol(void);
5941 int lp_security(void);
5942 const char **lp_auth_methods(void);
5943 bool lp_paranoid_server_security(void);
5944 int lp_maxdisksize(void);
5945 int lp_lpqcachetime(void);
5946 int lp_max_smbd_processes(void);
5947 bool _lp_disable_spoolss(void);
5948 int lp_syslog(void);
5949 int lp_lm_announce(void);
5950 int lp_lm_interval(void);
5951 int lp_machine_password_timeout(void);
5952 int lp_map_to_guest(void);
5953 int lp_oplock_break_wait_time(void);
5954 int lp_lock_spin_time(void);
5955 int lp_usershare_max_shares(void);
5956 const char *lp_socket_options(void);
5957 int lp_config_backend(void);
5958 char *lp_preexec(int );
5959 char *lp_postexec(int );
5960 char *lp_rootpreexec(int );
5961 char *lp_rootpostexec(int );
5962 char *lp_servicename(int );
5963 const char *lp_const_servicename(int );
5964 char *lp_pathname(int );
5965 char *lp_dontdescend(int );
5966 char *lp_username(int );
5967 const char **lp_invalid_users(int );
5968 const char **lp_valid_users(int );
5969 const char **lp_admin_users(int );
5970 const char **lp_svcctl_list(void);
5971 char *lp_cups_options(int );
5972 char *lp_cups_server(void);
5973 char *lp_iprint_server(void);
5974 const char *lp_ctdbd_socket(void);
5975 const char **lp_cluster_addresses(void);
5976 bool lp_clustering(void);
5977 char *lp_printcommand(int );
5978 char *lp_lpqcommand(int );
5979 char *lp_lprmcommand(int );
5980 char *lp_lppausecommand(int );
5981 char *lp_lpresumecommand(int );
5982 char *lp_queuepausecommand(int );
5983 char *lp_queueresumecommand(int );
5984 const char *lp_printjob_username(int );
5985 const char **lp_hostsallow(int );
5986 const char **lp_hostsdeny(int );
5987 char *lp_magicscript(int );
5988 char *lp_magicoutput(int );
5989 char *lp_comment(int );
5990 char *lp_force_user(int );
5991 char *lp_force_group(int );
5992 const char **lp_readlist(int );
5993 const char **lp_writelist(int );
5994 const char **lp_printer_admin(int );
5995 char *lp_fstype(int );
5996 const char **lp_vfs_objects(int );
5997 char *lp_msdfs_proxy(int );
5998 char *lp_veto_files(int );
5999 char *lp_hide_files(int );
6000 char *lp_veto_oplocks(int );
6001 bool lp_msdfs_root(int );
6002 char *lp_aio_write_behind(int );
6003 char *lp_dfree_command(int );
6004 bool lp_autoloaded(int );
6005 bool lp_preexec_close(int );
6006 bool lp_rootpreexec_close(int );
6007 int lp_casesensitive(int );
6008 bool lp_preservecase(int );
6009 bool lp_shortpreservecase(int );
6010 bool lp_hide_dot_files(int );
6011 bool lp_hide_special_files(int );
6012 bool lp_hideunreadable(int );
6013 bool lp_hideunwriteable_files(int );
6014 bool lp_browseable(int );
6015 bool lp_readonly(int );
6016 bool lp_no_set_dir(int );
6017 bool lp_guest_ok(int );
6018 bool lp_guest_only(int );
6019 bool lp_administrative_share(int );
6020 bool lp_print_ok(int );
6021 bool lp_map_hidden(int );
6022 bool lp_map_archive(int );
6023 bool lp_store_dos_attributes(int );
6024 bool lp_dmapi_support(int );
6025 bool lp_locking(const struct share_params *p );
6026 int lp_strict_locking(const struct share_params *p );
6027 bool lp_posix_locking(const struct share_params *p );
6028 bool lp_share_modes(int );
6029 bool lp_oplocks(int );
6030 bool lp_level2_oplocks(int );
6031 bool lp_onlyuser(int );
6032 bool lp_manglednames(const struct share_params *p );
6033 bool lp_widelinks(int );
6034 bool lp_symlinks(int );
6035 bool lp_syncalways(int );
6036 bool lp_strict_allocate(int );
6037 bool lp_strict_sync(int );
6038 bool lp_map_system(int );
6039 bool lp_delete_readonly(int );
6040 bool lp_fake_oplocks(int );
6041 bool lp_recursive_veto_delete(int );
6042 bool lp_dos_filemode(int );
6043 bool lp_dos_filetimes(int );
6044 bool lp_dos_filetime_resolution(int );
6045 bool lp_fake_dir_create_times(int );
6046 bool lp_blocking_locks(int );
6047 bool lp_inherit_perms(int );
6048 bool lp_inherit_acls(int );
6049 bool lp_inherit_owner(int );
6050 bool lp_use_client_driver(int );
6051 bool lp_default_devmode(int );
6052 bool lp_force_printername(int );
6053 bool lp_nt_acl_support(int );
6054 bool lp_force_unknown_acl_user(int );
6055 bool lp_ea_support(int );
6056 bool _lp_use_sendfile(int );
6057 bool lp_profile_acls(int );
6058 bool lp_map_acl_inherit(int );
6059 bool lp_afs_share(int );
6060 bool lp_acl_check_permissions(int );
6061 bool lp_acl_group_control(int );
6062 bool lp_acl_map_full_control(int );
6063 int lp_create_mask(int );
6064 int lp_force_create_mode(int );
6065 int lp_security_mask(int );
6066 int lp_force_security_mode(int );
6067 int lp_dir_mask(int );
6068 int lp_force_dir_mode(int );
6069 int lp_dir_security_mask(int );
6070 int lp_force_dir_security_mode(int );
6071 int lp_max_connections(int );
6072 int lp_defaultcase(int );
6073 int lp_minprintspace(int );
6074 int lp_printing(int );
6075 int lp_max_reported_jobs(int );
6076 int lp_oplock_contention_limit(int );
6077 int lp_csc_policy(int );
6078 int lp_write_cache_size(int );
6079 int lp_block_size(int );
6080 int lp_dfree_cache_time(int );
6081 int lp_allocation_roundup_size(int );
6082 int lp_aio_read_size(int );
6083 int lp_aio_write_size(int );
6084 int lp_map_readonly(int );
6085 int lp_directory_name_cache_size(int );
6086 int lp_smb_encrypt(int );
6087 char lp_magicchar(const struct share_params *p );
6088 int lp_winbind_cache_time(void);
6089 const char **lp_winbind_nss_info(void);
6090 int lp_algorithmic_rid_base(void);
6091 int lp_name_cache_timeout(void);
6092 int lp_client_signing(void);
6093 int lp_server_signing(void);
6094 int lp_client_ldap_sasl_wrapping(void);
6095 char *lp_parm_talloc_string(int snum, const char *type, const char *option, const char *def);
6096 const char *lp_parm_const_string(int snum, const char *type, const char *option, const char *def);
6097 const char **lp_parm_string_list(int snum, const char *type, const char *option, const char **def);
6098 int lp_parm_int(int snum, const char *type, const char *option, int def);
6099 unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsigned long def);
6100 bool lp_parm_bool(int snum, const char *type, const char *option, bool def);
6101 int lp_parm_enum(int snum, const char *type, const char *option,
6102                  const struct enum_list *_enum, int def);
6103 bool lp_add_home(const char *pszHomename, int iDefaultService,
6104                  const char *user, const char *pszHomedir);
6105 int lp_add_service(const char *pszService, int iDefaultService);
6106 bool lp_add_printer(const char *pszPrintername, int iDefaultService);
6107 bool lp_parameter_is_valid(const char *pszParmName);
6108 bool lp_parameter_is_global(const char *pszParmName);
6109 bool lp_parameter_is_canonical(const char *parm_name);
6110 bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
6111                                bool *inverse);
6112 bool lp_canonicalize_parameter_with_value(const char *parm_name,
6113                                           const char *val,
6114                                           const char **canon_parm,
6115                                           const char **canon_val);
6116 void show_parameter_list(void);
6117 bool lp_string_is_valid_boolean(const char *parm_value);
6118 bool lp_invert_boolean(const char *str, const char **inverse_str);
6119 bool lp_canonicalize_boolean(const char *str, const char**canon_str);
6120 bool service_ok(int iService);
6121 bool lp_config_backend_is_registry(void);
6122 bool lp_config_backend_is_file(void);
6123 bool lp_file_list_changed(void);
6124 bool lp_idmap_uid(uid_t *low, uid_t *high);
6125 bool lp_idmap_gid(gid_t *low, gid_t *high);
6126 const char *lp_ldap_machine_suffix(void);
6127 const char *lp_ldap_user_suffix(void);
6128 const char *lp_ldap_group_suffix(void);
6129 const char *lp_ldap_idmap_suffix(void);
6130 void *lp_local_ptr(int snum, void *ptr);
6131 bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue);
6132 void init_locals(void);
6133 bool lp_is_default(int snum, struct parm_struct *parm);
6134 bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
6135 struct parm_struct *lp_get_parameter(const char *param_name);
6136 struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
6137 bool lp_snum_ok(int iService);
6138 void lp_add_one_printer(char *name, char *comment);
6139 bool lp_loaded(void);
6140 void lp_killunused(bool (*snumused) (int));
6141 void lp_kill_all_services(void);
6142 void lp_killservice(int iServiceIn);
6143 const char* server_role_str(uint32 role);
6144 enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
6145                         SMB_STRUCT_STAT *psbuf,
6146                         const char *servicename,
6147                         int snum,
6148                         char **lines,
6149                         int numlines,
6150                         char **pp_sharepath,
6151                         char **pp_comment,
6152                         SEC_DESC **ppsd,
6153                         bool *pallow_guest);
6154 int load_usershare_service(const char *servicename);
6155 int load_usershare_shares(void);
6156 void gfree_loadparm(void);
6157 void lp_set_in_client(bool b);
6158 bool lp_is_in_client(void);
6159 bool lp_load_ex(const char *pszFname,
6160                 bool global_only,
6161                 bool save_defaults,
6162                 bool add_ipc,
6163                 bool initialize_globals,
6164                 bool allow_include_registry,
6165                 bool allow_registry_shares);
6166 bool lp_load(const char *pszFname,
6167              bool global_only,
6168              bool save_defaults,
6169              bool add_ipc,
6170              bool initialize_globals);
6171 bool lp_load_initial_only(const char *pszFname);
6172 bool lp_load_with_registry_shares(const char *pszFname,
6173                                   bool global_only,
6174                                   bool save_defaults,
6175                                   bool add_ipc,
6176                                   bool initialize_globals);
6177 int lp_numservices(void);
6178 void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
6179 void lp_dump_one(FILE * f, bool show_defaults, int snum);
6180 int lp_servicenumber(const char *pszServiceName);
6181 bool share_defined(const char *service_name);
6182 struct share_params *get_share_params(TALLOC_CTX *mem_ctx,
6183                                       const char *sharename);
6184 struct share_iterator *share_list_all(TALLOC_CTX *mem_ctx);
6185 struct share_params *next_share(struct share_iterator *list);
6186 struct share_params *next_printer(struct share_iterator *list);
6187 struct share_params *snum2params_static(int snum);
6188 const char *volume_label(int snum);
6189 int lp_server_role(void);
6190 bool lp_domain_master(void);
6191 bool lp_preferred_master(void);
6192 void lp_remove_service(int snum);
6193 void lp_copy_service(int snum, const char *new_name);
6194 int lp_default_server_announce(void);
6195 int lp_major_announce_version(void);
6196 int lp_minor_announce_version(void);
6197 void lp_set_name_resolve_order(const char *new_order);
6198 const char *lp_printername(int snum);
6199 void lp_set_logfile(const char *name);
6200 int lp_maxprintjobs(int snum);
6201 const char *lp_printcapname(void);
6202 bool lp_disable_spoolss( void );
6203 void lp_set_spoolss_state( uint32 state );
6204 uint32 lp_get_spoolss_state( void );
6205 bool lp_use_sendfile(int snum);
6206 void set_use_sendfile(int snum, bool val);
6207 void set_store_dos_attributes(int snum, bool val);
6208 void lp_set_mangling_method(const char *new_method);
6209 bool lp_posix_pathnames(void);
6210 void lp_set_posix_pathnames(void);
6211 enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp);
6212 void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
6213 int lp_min_receive_file_size(void);
6214
6215 /* The following definitions come from param/params.c  */
6216
6217 bool pm_process( const char *FileName,
6218                 bool (*sfunc)(const char *, void *),
6219                 bool (*pfunc)(const char *, const char *, void *),
6220                 void *userdata);
6221
6222 /* The following definitions come from param/util.c  */
6223
6224 uint32 get_int_param( const char* param );
6225 char* get_string_param( const char* param );
6226
6227 /* The following definitions come from passdb/login_cache.c  */
6228
6229 bool login_cache_init(void);
6230 bool login_cache_shutdown(void);
6231 LOGIN_CACHE * login_cache_read(struct samu *sampass);
6232 bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry);
6233 bool login_cache_delentry(const struct samu *sampass);
6234
6235 /* The following definitions come from passdb/lookup_sid.c  */
6236
6237 bool lookup_name(TALLOC_CTX *mem_ctx,
6238                  const char *full_name, int flags,
6239                  const char **ret_domain, const char **ret_name,
6240                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6241 bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
6242                  const char *full_name, int flags,
6243                  const char **ret_domain, const char **ret_name,
6244                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6245 NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
6246                      const DOM_SID **sids, int level,
6247                      struct lsa_dom_info **ret_domains,
6248                      struct lsa_name_info **ret_names);
6249 bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6250                 const char **ret_domain, const char **ret_name,
6251                 enum lsa_SidType *ret_type);
6252 void store_uid_sid_cache(const DOM_SID *psid, uid_t uid);
6253 void store_gid_sid_cache(const DOM_SID *psid, gid_t gid);
6254 void uid_to_sid(DOM_SID *psid, uid_t uid);
6255 void gid_to_sid(DOM_SID *psid, gid_t gid);
6256 bool sid_to_uid(const DOM_SID *psid, uid_t *puid);
6257 bool sid_to_gid(const DOM_SID *psid, gid_t *pgid);
6258
6259 /* The following definitions come from passdb/machine_sid.c  */
6260
6261 DOM_SID *get_global_sam_sid(void);
6262 void reset_global_sam_sid(void) ;
6263 bool sid_check_is_domain(const DOM_SID *sid);
6264 bool sid_check_is_in_our_domain(const DOM_SID *sid);
6265
6266 /* The following definitions come from passdb/passdb.c  */
6267
6268 const char *my_sam_name(void);
6269 struct samu *samu_new( TALLOC_CTX *ctx );
6270 NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
6271 NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd);
6272 char *pdb_encode_acct_ctrl(uint32 acct_ctrl, size_t length);
6273 uint32 pdb_decode_acct_ctrl(const char *p);
6274 void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32 acct_ctrl);
6275 bool pdb_gethexpwd(const char *p, unsigned char *pwd);
6276 void pdb_sethexhours(char *p, const unsigned char *hours);
6277 bool pdb_gethexhours(const char *p, unsigned char *hours);
6278 int algorithmic_rid_base(void);
6279 uid_t algorithmic_pdb_user_rid_to_uid(uint32 user_rid);
6280 uid_t max_algorithmic_uid(void);
6281 uint32 algorithmic_pdb_uid_to_user_rid(uid_t uid);
6282 gid_t pdb_group_rid_to_gid(uint32 group_rid);
6283 gid_t max_algorithmic_gid(void);
6284 uint32 algorithmic_pdb_gid_to_group_rid(gid_t gid);
6285 bool algorithmic_pdb_rid_is_user(uint32 rid);
6286 bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
6287                             enum lsa_SidType *type);
6288 NTSTATUS local_password_change(const char *user_name,
6289                                 int local_flags,
6290                                 const char *new_passwd, 
6291                                 char **pp_err_str,
6292                                 char **pp_msg_str);
6293 bool init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen);
6294 uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, bool size_only);
6295 bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
6296 bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
6297 bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
6298 bool pdb_increment_bad_password_count(struct samu *sampass);
6299 bool is_dc_trusted_domain_situation(const char *domain_name);
6300 bool get_trust_pw_clear(const char *domain, char **ret_pwd,
6301                         const char **account_name, uint32 *channel);
6302 bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
6303                        const char **account_name, uint32 *channel);
6304 struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx,
6305                                                 struct samu *pw);
6306
6307 /* The following definitions come from passdb/pdb_compat.c  */
6308
6309 uint32 pdb_get_user_rid (const struct samu *sampass);
6310 uint32 pdb_get_group_rid (struct samu *sampass);
6311 bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag);
6312 bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag);
6313
6314 /* The following definitions come from passdb/pdb_get_set.c  */
6315
6316 uint32 pdb_get_acct_ctrl(const struct samu *sampass);
6317 time_t pdb_get_logon_time(const struct samu *sampass);
6318 time_t pdb_get_logoff_time(const struct samu *sampass);
6319 time_t pdb_get_kickoff_time(const struct samu *sampass);
6320 time_t pdb_get_bad_password_time(const struct samu *sampass);
6321 time_t pdb_get_pass_last_set_time(const struct samu *sampass);
6322 time_t pdb_get_pass_can_change_time(const struct samu *sampass);
6323 time_t pdb_get_pass_can_change_time_noncalc(const struct samu *sampass);
6324 time_t pdb_get_pass_must_change_time(const struct samu *sampass);
6325 bool pdb_get_pass_can_change(const struct samu *sampass);
6326 uint16 pdb_get_logon_divs(const struct samu *sampass);
6327 uint32 pdb_get_hours_len(const struct samu *sampass);
6328 const uint8 *pdb_get_hours(const struct samu *sampass);
6329 const uint8 *pdb_get_nt_passwd(const struct samu *sampass);
6330 const uint8 *pdb_get_lanman_passwd(const struct samu *sampass);
6331 const uint8 *pdb_get_pw_history(const struct samu *sampass, uint32 *current_hist_len);
6332 const char *pdb_get_plaintext_passwd(const struct samu *sampass);
6333 const DOM_SID *pdb_get_user_sid(const struct samu *sampass);
6334 const DOM_SID *pdb_get_group_sid(struct samu *sampass);
6335 enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element);
6336 const char *pdb_get_username(const struct samu *sampass);
6337 const char *pdb_get_domain(const struct samu *sampass);
6338 const char *pdb_get_nt_username(const struct samu *sampass);
6339 const char *pdb_get_fullname(const struct samu *sampass);
6340 const char *pdb_get_homedir(const struct samu *sampass);
6341 const char *pdb_get_dir_drive(const struct samu *sampass);
6342 const char *pdb_get_logon_script(const struct samu *sampass);
6343 const char *pdb_get_profile_path(const struct samu *sampass);
6344 const char *pdb_get_acct_desc(const struct samu *sampass);
6345 const char *pdb_get_workstations(const struct samu *sampass);
6346 const char *pdb_get_comment(const struct samu *sampass);
6347 const char *pdb_get_munged_dial(const struct samu *sampass);
6348 uint16 pdb_get_bad_password_count(const struct samu *sampass);
6349 uint16 pdb_get_logon_count(const struct samu *sampass);
6350 uint32 pdb_get_unknown_6(const struct samu *sampass);
6351 void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods);
6352 bool pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum pdb_value_state flag);
6353 bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6354 bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6355 bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6356 bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6357 bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6358 bool pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6359 bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6360 bool pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state flag);
6361 bool pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state flag);
6362 bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag);
6363 bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag);
6364 bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag);
6365 bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag);
6366 bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag);
6367 bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag);
6368 bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag);
6369 bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag);
6370 bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag);
6371 bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag);
6372 bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag);
6373 bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag);
6374 bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag);
6375 bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag);
6376 bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag);
6377 bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag);
6378 bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag);
6379 bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag);
6380 bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag);
6381 bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag);
6382 bool pdb_set_bad_password_count(struct samu *sampass, uint16 bad_password_count, enum pdb_value_state flag);
6383 bool pdb_set_logon_count(struct samu *sampass, uint16 logon_count, enum pdb_value_state flag);
6384 bool pdb_set_unknown_6(struct samu *sampass, uint32 unkn, enum pdb_value_state flag);
6385 bool pdb_set_hours(struct samu *sampass, const uint8 *hours, enum pdb_value_state flag);
6386 bool pdb_set_backend_private_data(struct samu *sampass, void *private_data, 
6387                                    void (*free_fn)(void **), 
6388                                    const struct pdb_methods *my_methods, 
6389                                    enum pdb_value_state flag);
6390 bool pdb_set_pass_can_change(struct samu *sampass, bool canchange);
6391 bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext);
6392 uint32 pdb_build_fields_present(struct samu *sampass);
6393
6394 /* The following definitions come from passdb/pdb_interface.c  */
6395
6396 NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
6397 struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
6398 struct event_context *pdb_get_event_context(void);
6399 NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
6400 bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
6401 bool guest_user_info( struct samu *user );
6402 bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid) ;
6403 NTSTATUS pdb_create_user(TALLOC_CTX *mem_ctx, const char *name, uint32 flags,
6404                          uint32 *rid);
6405 NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct);
6406 NTSTATUS pdb_add_sam_account(struct samu *sam_acct) ;
6407 NTSTATUS pdb_update_sam_account(struct samu *sam_acct) ;
6408 NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) ;
6409 NTSTATUS pdb_rename_sam_account(struct samu *oldname, const char *newname);
6410 NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success);
6411 bool pdb_getgrsid(GROUP_MAP *map, DOM_SID sid);
6412 bool pdb_getgrgid(GROUP_MAP *map, gid_t gid);
6413 bool pdb_getgrnam(GROUP_MAP *map, const char *name);
6414 NTSTATUS pdb_create_dom_group(TALLOC_CTX *mem_ctx, const char *name,
6415                               uint32 *rid);
6416 NTSTATUS pdb_delete_dom_group(TALLOC_CTX *mem_ctx, uint32 rid);
6417 NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map);
6418 NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map);
6419 NTSTATUS pdb_delete_group_mapping_entry(DOM_SID sid);
6420 bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
6421                             size_t *p_num_entries, bool unix_only);
6422 NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
6423                                 const DOM_SID *sid,
6424                                 uint32 **pp_member_rids,
6425                                 size_t *p_num_members);
6426 NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
6427                                     DOM_SID **pp_sids, gid_t **pp_gids,
6428                                     size_t *p_num_groups);
6429 NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
6430 NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6431                           uint32 member_rid);
6432 NTSTATUS pdb_del_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6433                           uint32 member_rid);
6434 NTSTATUS pdb_create_alias(const char *name, uint32 *rid);
6435 NTSTATUS pdb_delete_alias(const DOM_SID *sid);
6436 NTSTATUS pdb_get_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6437 NTSTATUS pdb_set_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6438 NTSTATUS pdb_add_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6439 NTSTATUS pdb_del_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6440 NTSTATUS pdb_enum_aliasmem(const DOM_SID *alias,
6441                            DOM_SID **pp_members, size_t *p_num_members);
6442 NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
6443                                     const DOM_SID *domain_sid,
6444                                     const DOM_SID *members, size_t num_members,
6445                                     uint32 **pp_alias_rids,
6446                                     size_t *p_num_alias_rids);
6447 NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
6448                          int num_rids,
6449                          uint32 *rids,
6450                          const char **names,
6451                          enum lsa_SidType *attrs);
6452 NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
6453                           int num_names,
6454                           const char **names,
6455                           uint32 *rids,
6456                           enum lsa_SidType *attrs);
6457 bool pdb_get_account_policy(int policy_index, uint32 *value);
6458 bool pdb_set_account_policy(int policy_index, uint32 value);
6459 bool pdb_get_seq_num(time_t *seq_num);
6460 bool pdb_uid_to_rid(uid_t uid, uint32 *rid);
6461 bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid);
6462 bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid);
6463 bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
6464                    enum lsa_SidType *type);
6465 bool pdb_rid_algorithm(void);
6466 bool pdb_new_rid(uint32 *rid);
6467 bool initialize_password_db(bool reload, struct event_context *event_ctx);
6468 struct pdb_search *pdb_search_init(enum pdb_search_type type);
6469 struct pdb_search *pdb_search_users(uint32 acct_flags);
6470 struct pdb_search *pdb_search_groups(void);
6471 struct pdb_search *pdb_search_aliases(const DOM_SID *sid);
6472 uint32 pdb_search_entries(struct pdb_search *search,
6473                           uint32 start_idx, uint32 max_entries,
6474                           struct samr_displayentry **result);
6475 void pdb_search_destroy(struct pdb_search *search);
6476 bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid, 
6477                            time_t *pass_last_set_time);
6478 bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
6479                            const DOM_SID *sid);
6480 bool pdb_del_trusteddom_pw(const char *domain);
6481 NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6482                               struct trustdom_info ***domains);
6483 NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
6484
6485 /* The following definitions come from passdb/pdb_ldap.c  */
6486
6487 const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
6488 int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
6489                                           const char *user,
6490                                           LDAPMessage ** result,
6491                                           const char **attr);
6492 const char **talloc_attrs(TALLOC_CTX *mem_ctx, ...);
6493 NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
6494 NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
6495 NTSTATUS pdb_ldap_init(void);
6496
6497 /* The following definitions come from passdb/pdb_nds.c  */
6498
6499 int pdb_nds_get_password(
6500         struct smbldap_state *ldap_state,
6501         char *object_dn,
6502         size_t *pwd_len,
6503         char *pwd );
6504 int pdb_nds_set_password(
6505         struct smbldap_state *ldap_state,
6506         char *object_dn,
6507         const char *pwd );
6508 NTSTATUS pdb_nds_init(void);
6509
6510 /* The following definitions come from passdb/pdb_smbpasswd.c  */
6511
6512 NTSTATUS pdb_smbpasswd_init(void) ;
6513
6514 /* The following definitions come from passdb/pdb_tdb.c  */
6515
6516 bool init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen);
6517 NTSTATUS pdb_tdbsam_init(void);
6518
6519 /* The following definitions come from passdb/secrets.c  */
6520
6521 bool secrets_init(void);
6522 struct db_context *secrets_db_ctx(void);
6523 void secrets_shutdown(void);
6524 void *secrets_fetch(const char *key, size_t *size);
6525 bool secrets_store(const char *key, const void *data, size_t size);
6526 bool secrets_delete(const char *key);
6527 bool secrets_store_domain_sid(const char *domain, const DOM_SID *sid);
6528 bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid);
6529 bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
6530 bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
6531 void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
6532 uint32 get_default_sec_channel(void);
6533 bool secrets_fetch_trust_account_password_legacy(const char *domain,
6534                                                  uint8 ret_pwd[16],
6535                                                  time_t *pass_last_set_time,
6536                                                  uint32 *channel);
6537 bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
6538                                           time_t *pass_last_set_time,
6539                                           uint32 *channel);
6540 bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
6541                                            DOM_SID *sid, time_t *pass_last_set_time);
6542 bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
6543                                            const DOM_SID *sid);
6544 bool secrets_delete_machine_password(const char *domain);
6545 bool secrets_delete_machine_password_ex(const char *domain);
6546 bool secrets_delete_domain_sid(const char *domain);
6547 bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel);
6548 char *secrets_fetch_machine_password(const char *domain,
6549                                      time_t *pass_last_set_time,
6550                                      uint32 *channel);
6551 bool trusted_domain_password_delete(const char *domain);
6552 bool secrets_store_ldap_pw(const char* dn, char* pw);
6553 bool fetch_ldap_pw(char **dn, char** pw);
6554 NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6555                                  struct trustdom_info ***domains);
6556 bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile);
6557 bool secrets_fetch_afs_key(const char *cell, struct afs_key *result);
6558 void secrets_fetch_ipc_userpass(char **username, char **domain, char **password);
6559 bool secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
6560                                 const char *remote_machine,
6561                                 const struct dcinfo *pdc);
6562 bool secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
6563                                 const char *remote_machine,
6564                                 struct dcinfo **ppdc);
6565 bool secrets_store_generic(const char *owner, const char *key, const char *secret);
6566 char *secrets_fetch_generic(const char *owner, const char *key);
6567
6568 /* The following definitions come from passdb/util_builtin.c  */
6569
6570 bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name);
6571 bool lookup_builtin_name(const char *name, uint32 *rid);
6572 const char *builtin_domain_name(void);
6573 bool sid_check_is_builtin(const DOM_SID *sid);
6574 bool sid_check_is_in_builtin(const DOM_SID *sid);
6575
6576 /* The following definitions come from passdb/util_unixsids.c  */
6577
6578 bool sid_check_is_unix_users(const DOM_SID *sid);
6579 bool sid_check_is_in_unix_users(const DOM_SID *sid);
6580 bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid);
6581 bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid);
6582 const char *unix_users_domain_name(void);
6583 bool lookup_unix_user_name(const char *name, DOM_SID *sid);
6584 bool sid_check_is_unix_groups(const DOM_SID *sid);
6585 bool sid_check_is_in_unix_groups(const DOM_SID *sid);
6586 const char *unix_groups_domain_name(void);
6587 bool lookup_unix_group_name(const char *name, DOM_SID *sid);
6588
6589 /* The following definitions come from passdb/util_wellknown.c  */
6590
6591 bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name);
6592 bool sid_check_is_in_wellknown_domain(const DOM_SID *sid);
6593 bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6594                           const char **domain, const char **name);
6595 bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
6596                            DOM_SID *sid, const char **domain);
6597
6598 /* The following definitions come from printing/load.c  */
6599
6600 void load_printers(void);
6601
6602 /* The following definitions come from printing/lpq_parse.c  */
6603
6604 bool parse_lpq_entry(enum printing_types printing_type,char *line,
6605                      print_queue_struct *buf,
6606                      print_status_struct *status,bool first);
6607
6608 /* The following definitions come from printing/notify.c  */
6609
6610 int print_queue_snum(const char *qname);
6611 bool print_notify_messages_pending(void);
6612 void print_notify_send_messages(struct messaging_context *msg_ctx,
6613                                 unsigned int timeout);
6614 void notify_printer_status_byname(const char *sharename, uint32 status);
6615 void notify_printer_status(int snum, uint32 status);
6616 void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
6617                               uint32 flags);
6618 void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
6619 void notify_job_total_bytes(const char *sharename, uint32 jobid,
6620                             uint32 size);
6621 void notify_job_total_pages(const char *sharename, uint32 jobid,
6622                             uint32 pages);
6623 void notify_job_username(const char *sharename, uint32 jobid, char *name);
6624 void notify_job_name(const char *sharename, uint32 jobid, char *name);
6625 void notify_job_submitted(const char *sharename, uint32 jobid,
6626                           time_t submitted);
6627 void notify_printer_driver(int snum, char *driver_name);
6628 void notify_printer_comment(int snum, char *comment);
6629 void notify_printer_sharename(int snum, char *share_name);
6630 void notify_printer_printername(int snum, char *printername);
6631 void notify_printer_port(int snum, char *port_name);
6632 void notify_printer_location(int snum, char *location);
6633 void notify_printer_byname( const char *printername, uint32 change, const char *value );
6634 bool print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list);
6635
6636 /* The following definitions come from printing/nt_printing.c  */
6637
6638 bool nt_printing_init(struct messaging_context *msg_ctx);
6639 uint32 update_c_setprinter(bool initialize);
6640 uint32 get_c_setprinter(void);
6641 int get_builtin_ntforms(nt_forms_struct **list);
6642 bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form);
6643 int get_ntforms(nt_forms_struct **list);
6644 int write_ntforms(nt_forms_struct **list, int number);
6645 bool add_a_form(nt_forms_struct **list, const FORM *form, int *count);
6646 bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret);
6647 void update_a_form(nt_forms_struct **list, const FORM *form, int count);
6648 int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
6649 const char *get_short_archi(const char *long_archi);
6650 WERROR clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
6651                                                           uint32 level, struct current_user *user);
6652 WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, 
6653                                   struct current_user *user, WERROR *perr);
6654 int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
6655 uint32 del_a_printer(const char *sharename);
6656 NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
6657 NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode);
6658 void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
6659 int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen);
6660 int add_new_printer_key( NT_PRINTER_DATA *data, const char *name );
6661 int delete_printer_key( NT_PRINTER_DATA *data, const char *name );
6662 int lookup_printerkey( NT_PRINTER_DATA *data, const char *name );
6663 int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys );
6664 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6665 WERROR check_published_printers(void);
6666 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6667                           struct GUID *guid);
6668 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6669 WERROR check_published_printers(void);
6670 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6671                           struct GUID *guid);
6672 WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key );
6673 WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6674 WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value, 
6675                            uint32 type, uint8 *data, int real_len );
6676 REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6677 WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6678 bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6679 bool del_driver_init(char *drivername);
6680 WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *data, uint32 data_len);
6681 WERROR get_a_printer( Printer_entry *print_hnd,
6682                         NT_PRINTER_INFO_LEVEL **pp_printer,
6683                         uint32 level,
6684                         const char *sharename);
6685 WERROR get_a_printer_search( Printer_entry *print_hnd,
6686                         NT_PRINTER_INFO_LEVEL **pp_printer,
6687                         uint32 level,
6688                         const char *sharename);
6689 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
6690 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6691 WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
6692                             fstring drivername, const char *architecture, uint32 version);
6693 uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6694 bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
6695 bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
6696 WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
6697                               uint32 version, bool delete_files );
6698 WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr);
6699 bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
6700 void map_printer_permissions(SEC_DESC *sd);
6701 void map_job_permissions(SEC_DESC *sd);
6702 bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
6703                         int access_type);
6704 bool print_time_access_check(const char *servicename);
6705 char* get_server_name( Printer_entry *printer );
6706
6707 /* The following definitions come from printing/pcap.c  */
6708
6709 bool pcap_cache_add(const char *name, const char *comment);
6710 bool pcap_cache_loaded(void);
6711 void pcap_cache_reload(void);
6712 bool pcap_printername_ok(const char *printername);
6713 void pcap_printer_fn(void (*fn)(char *, char *));
6714
6715 /* The following definitions come from printing/print_aix.c  */
6716
6717 bool aix_cache_reload(void);
6718
6719 /* The following definitions come from printing/print_cups.c  */
6720
6721 bool cups_cache_reload(void);
6722 bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer);
6723
6724 /* The following definitions come from printing/print_generic.c  */
6725
6726
6727 /* The following definitions come from printing/print_iprint.c  */
6728
6729 bool iprint_cache_reload(void);
6730
6731 /* The following definitions come from printing/print_svid.c  */
6732
6733 bool sysv_cache_reload(void);
6734
6735 /* The following definitions come from printing/printfsp.c  */
6736
6737 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
6738                         uint16_t current_vuid, files_struct **result);
6739 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
6740
6741 /* The following definitions come from printing/printing.c  */
6742
6743 uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
6744 bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
6745 bool print_backend_init(struct messaging_context *msg_ctx);
6746 void printing_end(void);
6747 int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob );
6748 uint32 sysjob_to_jobid(int unix_jobid);
6749 void pjob_delete(const char* sharename, uint32 jobid);
6750 void start_background_queue(void);
6751 bool print_notify_register_pid(int snum);
6752 bool print_notify_deregister_pid(int snum);
6753 bool print_job_exists(const char* sharename, uint32 jobid);
6754 int print_job_fd(const char* sharename, uint32 jobid);
6755 char *print_job_fname(const char* sharename, uint32 jobid);
6756 NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
6757 bool print_job_set_place(const char *sharename, uint32 jobid, int place);
6758 bool print_job_set_name(const char *sharename, uint32 jobid, char *name);
6759 bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
6760                       uint32 jobid, WERROR *errcode);
6761 bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
6762                      uint32 jobid, WERROR *errcode);
6763 bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
6764                       uint32 jobid, WERROR *errcode);
6765 ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
6766 int print_queue_length(int snum, print_status_struct *pstatus);
6767 uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
6768                        char *jobname, NT_DEVICEMODE *nt_devmode );
6769 void print_job_endpage(int snum, uint32 jobid);
6770 bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
6771 int print_queue_status(int snum, 
6772                        print_queue_struct **ppqueue,
6773                        print_status_struct *status);
6774 bool print_queue_pause(struct auth_serversupplied_info *server_info, int snum,
6775                        WERROR *errcode);
6776 bool print_queue_resume(struct auth_serversupplied_info *server_info, int snum,
6777                         WERROR *errcode);
6778 bool print_queue_purge(struct auth_serversupplied_info *server_info, int snum,
6779                        WERROR *errcode);
6780
6781 /* The following definitions come from printing/printing_db.c  */
6782
6783 struct tdb_print_db *get_print_db_byname(const char *printername);
6784 void release_print_db( struct tdb_print_db *pdb);
6785 void close_all_print_db(void);
6786 TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
6787
6788 /* The following definitions come from profile/profile.c  */
6789
6790 void set_profile_level(int level, struct server_id src);
6791 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
6792
6793 /* The following definitions come from registry/reg_api.c  */
6794
6795 WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
6796                     uint32 desired_access,
6797                     const struct nt_user_token *token,
6798                     struct registry_key **pkey);
6799 WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
6800                    const char *name, uint32 desired_access,
6801                    struct registry_key **pkey);
6802 WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
6803                    uint32 idx, char **name, NTTIME *last_write_time);
6804 WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6805                      uint32 idx, char **pname, struct registry_value **pval);
6806 WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6807                       const char *name, struct registry_value **pval);
6808 WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
6809                         uint32_t *max_subkeylen, uint32_t *max_subkeysize, 
6810                         uint32_t *num_values, uint32_t *max_valnamelen, 
6811                         uint32_t *max_valbufsize, uint32_t *secdescsize,
6812                         NTTIME *last_changed_time);
6813 WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
6814                      const char *subkeypath, uint32 desired_access,
6815                      struct registry_key **pkey,
6816                      enum winreg_CreateAction *paction);
6817 WERROR reg_deletekey(struct registry_key *parent, const char *path);
6818 WERROR reg_setvalue(struct registry_key *key, const char *name,
6819                     const struct registry_value *val);
6820 WERROR reg_deletevalue(struct registry_key *key, const char *name);
6821 WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
6822                           struct security_descriptor **psecdesc);
6823 WERROR reg_setkeysecurity(struct registry_key *key,
6824                           struct security_descriptor *psecdesc);
6825 WERROR reg_getversion(uint32_t *version);
6826 WERROR reg_restorekey(struct registry_key *key, const char *fname);
6827 WERROR reg_savekey(struct registry_key *key, const char *fname);
6828 WERROR reg_deleteallvalues(struct registry_key *key);
6829 WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6830                      uint32 desired_access, const struct nt_user_token *token,
6831                      struct registry_key **pkey);
6832 WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
6833                                struct registry_key *parent,
6834                                const char *path);
6835 WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
6836                                    struct registry_key *parent,
6837                                    const char *path);
6838 WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6839                        uint32 desired_access,
6840                        const struct nt_user_token *token,
6841                        enum winreg_CreateAction *paction,
6842                        struct registry_key **pkey);
6843 WERROR reg_delete_path(const struct nt_user_token *token,
6844                        const char *orig_path);
6845
6846 /* The following definitions come from registry/reg_backend_current_version.c  */
6847
6848
6849 /* The following definitions come from registry/reg_backend_db.c  */
6850
6851 WERROR init_registry_key(const char *add_path);
6852 WERROR init_registry_data(void);
6853 WERROR regdb_init(void);
6854 WERROR regdb_open( void );
6855 int regdb_close( void );
6856 int regdb_get_seqnum(void);
6857 bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr);
6858 int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr);
6859 int regdb_fetch_values( const char* key, REGVAL_CTR *values );
6860 bool regdb_store_values( const char *key, REGVAL_CTR *values );
6861 bool regdb_subkeys_need_update(REGSUBKEY_CTR *subkeys);
6862 bool regdb_values_need_update(REGVAL_CTR *values);
6863
6864 /* The following definitions come from registry/reg_backend_hkpt_params.c  */
6865
6866
6867 /* The following definitions come from registry/reg_backend_netlogon_params.c  */
6868
6869
6870 /* The following definitions come from registry/reg_backend_perflib.c  */
6871
6872
6873 /* The following definitions come from registry/reg_backend_printing.c  */
6874
6875
6876 /* The following definitions come from registry/reg_backend_prod_options.c  */
6877
6878
6879 /* The following definitions come from registry/reg_backend_shares.c  */
6880
6881
6882 /* The following definitions come from registry/reg_backend_smbconf.c  */
6883
6884
6885 /* The following definitions come from registry/reg_backend_tcpip_params.c  */
6886
6887
6888 /* The following definitions come from registry/reg_cachehook.c  */
6889
6890 WERROR reghook_cache_init(void);
6891 WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops);
6892 REGISTRY_OPS *reghook_cache_find(const char *keyname);
6893 void reghook_dump_cache( int debuglevel );
6894
6895 /* The following definitions come from registry/reg_dispatcher.c  */
6896
6897 bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys );
6898 bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6899 int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr );
6900 int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6901 bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
6902                           const struct nt_user_token *token );
6903 WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key,
6904                           struct security_descriptor **psecdesc);
6905 WERROR regkey_set_secdesc(REGISTRY_KEY *key,
6906                           struct security_descriptor *psecdesc);
6907 bool reg_subkeys_need_update(REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys);
6908 bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values);
6909
6910 /* The following definitions come from registry/reg_eventlog.c  */
6911
6912 bool eventlog_init_keys(void);
6913 bool eventlog_add_source( const char *eventlog, const char *sourcename,
6914                           const char *messagefile );
6915
6916 /* The following definitions come from registry/reg_init_basic.c  */
6917
6918 WERROR registry_init_common(void);
6919 WERROR registry_init_basic(void);
6920
6921 /* The following definitions come from registry/reg_init_full.c  */
6922
6923 WERROR registry_init_full(void);
6924
6925 /* The following definitions come from registry/reg_init_smbconf.c  */
6926
6927 NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
6928                                      NT_USER_TOKEN **ptoken);
6929 WERROR registry_init_smbconf(const char *keyname);
6930
6931 /* The following definitions come from registry/reg_objects.c  */
6932
6933 WERROR regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname );
6934 int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname );
6935 bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname );
6936 int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr );
6937 char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index );
6938 int regval_ctr_numvals( REGVAL_CTR *ctr );
6939 REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val );
6940 void free_registry_value( REGISTRY_VALUE *val );
6941 uint8* regval_data_p( REGISTRY_VALUE *val );
6942 uint32 regval_size( REGISTRY_VALUE *val );
6943 char* regval_name( REGISTRY_VALUE *val );
6944 uint32 regval_type( REGISTRY_VALUE *val );
6945 REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx );
6946 bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value );
6947 REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type,
6948                                const char *data_p, size_t size);
6949 int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
6950                          const char *data_p, size_t size );
6951 int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val );
6952 int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name );
6953 REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name );
6954 uint32 regval_dword( REGISTRY_VALUE *val );
6955 char *regval_sz(REGISTRY_VALUE *val);
6956
6957 /* The following definitions come from registry/reg_perfcount.c  */
6958
6959 void perfcount_init_keys( void );
6960 uint32 reg_perfcount_get_base_index(void);
6961 uint32 reg_perfcount_get_last_counter(uint32 base_index);
6962 uint32 reg_perfcount_get_last_help(uint32 last_counter);
6963 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
6964 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
6965 bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data);
6966 bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
6967                                       prs_struct *ps,
6968                                       int instId,
6969                                       PERF_OBJECT_TYPE *obj,
6970                                       TDB_CONTEXT *names);
6971 bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
6972                                  prs_struct *ps,
6973                                  int instInd,
6974                                  TDB_CONTEXT *names);
6975 uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 
6976                                          prs_struct *ps, 
6977                                          PERF_DATA_BLOCK *block,
6978                                          const char *object_ids);
6979 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
6980
6981 /* The following definitions come from registry/reg_util.c  */
6982
6983 bool reg_split_path(char *path, char **base, char **new_path);
6984 bool reg_split_key(char *path, char **base, char **key);
6985 char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
6986 void normalize_dbkey(char *key);
6987 char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
6988 int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values );
6989 size_t regval_build_multi_sz( char **values, uint16 **buffer );
6990
6991 /* The following definitions come from registry/reg_util_legacy.c  */
6992
6993 WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey,
6994                              const char *path,
6995                              const struct nt_user_token *token,
6996                              uint32 access_desired );
6997
6998 /* The following definitions come from registry/regfio.c  */
6999
7000
7001 /* The following definitions come from rpc_client/cli_lsarpc.c  */
7002
7003 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
7004                                 TALLOC_CTX *mem_ctx,
7005                                 bool sec_qos, uint32 des_access,
7006                                 POLICY_HND *pol);
7007 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
7008                                  TALLOC_CTX *mem_ctx, bool sec_qos,
7009                                  uint32 des_access, POLICY_HND *pol);
7010 NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
7011                                 TALLOC_CTX *mem_ctx,
7012                                 POLICY_HND *pol,
7013                                 int num_sids,
7014                                 const DOM_SID *sids,
7015                                 char ***pdomains,
7016                                 char ***pnames,
7017                                 enum lsa_SidType **ptypes);
7018 NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
7019                                  TALLOC_CTX *mem_ctx,
7020                                  POLICY_HND *pol, int num_names,
7021                                  const char **names,
7022                                  const char ***dom_names,
7023                                  int level,
7024                                  DOM_SID **sids,
7025                                  enum lsa_SidType **types);
7026 bool fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid);
7027
7028 /* The following definitions come from rpc_client/cli_netlogon.c  */
7029
7030 NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
7031                                      const char *server_name,
7032                                      const char *domain,
7033                                      const char *clnt_name,
7034                                      const char *machine_account,
7035                                      const unsigned char machine_pwd[16],
7036                                      enum netr_SchannelType sec_chan_type,
7037                                      uint32_t *neg_flags_inout);
7038 NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
7039                                    TALLOC_CTX *mem_ctx,
7040                                    uint32 logon_parameters,
7041                                    const char *domain,
7042                                    const char *username,
7043                                    const char *password,
7044                                    const char *workstation,
7045                                    int logon_type);
7046 NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
7047                                            TALLOC_CTX *mem_ctx,
7048                                            uint32 logon_parameters,
7049                                            const char *server,
7050                                            const char *username,
7051                                            const char *domain,
7052                                            const char *workstation,
7053                                            const uint8 chal[8],
7054                                            DATA_BLOB lm_response,
7055                                            DATA_BLOB nt_response,
7056                                            struct netr_SamInfo3 **info3);
7057 NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
7058                                               TALLOC_CTX *mem_ctx,
7059                                               uint32 logon_parameters,
7060                                               const char *server,
7061                                               const char *username,
7062                                               const char *domain,
7063                                               const char *workstation,
7064                                               const uint8 chal[8],
7065                                               DATA_BLOB lm_response,
7066                                               DATA_BLOB nt_response,
7067                                               struct netr_SamInfo3 **info3);
7068
7069 /* The following definitions come from rpc_client/cli_pipe.c  */
7070
7071 NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
7072                         uint8 op_num,
7073                         prs_struct *in_data,
7074                         prs_struct *out_data);
7075 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
7076                        struct cli_pipe_auth_data *auth);
7077 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
7078                                 unsigned int timeout);
7079 bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
7080 struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
7081 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
7082                                struct cli_pipe_auth_data **presult);
7083 NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
7084                                   enum pipe_auth_type auth_type,
7085                                   enum pipe_auth_level auth_level,
7086                                   const char *domain,
7087                                   const char *username,
7088                                   const char *password,
7089                                   struct cli_pipe_auth_data **presult);
7090 NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
7091                                    enum pipe_auth_level auth_level,
7092                                    const uint8_t sess_key[16],
7093                                    struct cli_pipe_auth_data **presult);
7094 NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
7095                                    enum pipe_auth_level auth_level,
7096                                    const char *service_princ,
7097                                    const char *username,
7098                                    const char *password,
7099                                    struct cli_pipe_auth_data **presult);
7100 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
7101                            const struct ndr_syntax_id *abstract_syntax,
7102                            struct rpc_pipe_client **presult);
7103 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
7104                                const struct ndr_syntax_id *abstract_syntax,
7105                                struct rpc_pipe_client **presult);
7106 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
7107                                   const struct ndr_syntax_id *interface,
7108                                   struct rpc_pipe_client **presult);
7109 NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
7110                                    const struct ndr_syntax_id *interface,
7111                                    enum pipe_auth_level auth_level,
7112                                    const char *domain,
7113                                    const char *username,
7114                                    const char *password,
7115                                    struct rpc_pipe_client **presult);
7116 NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
7117                                           const struct ndr_syntax_id *interface,
7118                                           enum pipe_auth_level auth_level,
7119                                           const char *domain,
7120                                           const char *username,
7121                                           const char *password,
7122                                           struct rpc_pipe_client **presult);
7123 NTSTATUS get_schannel_session_key(struct cli_state *cli,
7124                                   const char *domain,
7125                                   uint32 *pneg_flags,
7126                                   struct rpc_pipe_client **presult);
7127 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
7128                                              const struct ndr_syntax_id *interface,
7129                                              enum pipe_auth_level auth_level,
7130                                              const char *domain,
7131                                              const struct dcinfo *pdc,
7132                                              struct rpc_pipe_client **presult);
7133 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
7134                                                  const struct ndr_syntax_id *interface,
7135                                                  enum pipe_auth_level auth_level,
7136                                                  const char *domain,
7137                                                  const char *username,
7138                                                  const char *password,
7139                                                  struct rpc_pipe_client **presult);
7140 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
7141                                     const struct ndr_syntax_id *interface,
7142                                     enum pipe_auth_level auth_level,
7143                                     const char *domain,
7144                                     struct rpc_pipe_client **presult);
7145 NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
7146                                 const struct ndr_syntax_id *interface,
7147                                 enum pipe_auth_level auth_level,
7148                                 const char *service_princ,
7149                                 const char *username,
7150                                 const char *password,
7151                                 struct rpc_pipe_client **presult);
7152 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
7153                              struct rpc_pipe_client *cli,
7154                              DATA_BLOB *session_key);
7155
7156
7157 /* The following definitions come from rpc_client/cli_reg.c  */
7158
7159 NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7160                          uint32 reg_type, uint32 access_mask,
7161                          POLICY_HND *reg_hnd);
7162 uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
7163
7164 /* The following definitions come from rpc_client/cli_samr.c  */
7165
7166 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
7167                                     TALLOC_CTX *mem_ctx,
7168                                     struct policy_handle *user_handle,
7169                                     const char *newpassword,
7170                                     const char *oldpassword);
7171 NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
7172                                      TALLOC_CTX *mem_ctx,
7173                                      const char *username,
7174                                      const char *newpassword,
7175                                      const char *oldpassword);
7176 NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
7177                                          TALLOC_CTX *mem_ctx,
7178                                          const char *username,
7179                                          DATA_BLOB new_nt_password_blob,
7180                                          DATA_BLOB old_nt_hash_enc_blob,
7181                                          DATA_BLOB new_lm_password_blob,
7182                                          DATA_BLOB old_lm_hash_enc_blob);
7183 NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
7184                                      TALLOC_CTX *mem_ctx,
7185                                      const char *username,
7186                                      const char *newpassword,
7187                                      const char *oldpassword,
7188                                      struct samr_DomInfo1 **dominfo1,
7189                                      struct samr_ChangeReject **reject);
7190 void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
7191                                uint32 *max_size);
7192 NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
7193                                   TALLOC_CTX *mem_ctx,
7194                                   uint32_t access_mask,
7195                                   POLICY_HND *connect_pol);
7196
7197 /* The following definitions come from rpc_client/cli_spoolss.c  */
7198
7199 WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7200                                 const char *printername, const char *datatype, uint32 access_required,
7201                                 const char *station, const char *username, POLICY_HND *pol);
7202 WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7203                                  POLICY_HND *pol);
7204 WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7205                                  char *name, uint32 flags, uint32 level,
7206                                  uint32 *num_printers, PRINTER_INFO_CTR *ctr);
7207 WERROR rpccli_spoolss_enum_ports(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7208                               uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr);
7209 WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7210                               POLICY_HND *pol, uint32 level, 
7211                               PRINTER_INFO_CTR *ctr);
7212 WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7213                               POLICY_HND *pol, uint32 level, 
7214                               PRINTER_INFO_CTR *ctr, uint32 command);
7215 WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, 
7216                                     TALLOC_CTX *mem_ctx, 
7217                                     POLICY_HND *pol, uint32 level, 
7218                                     const char *env, int version, PRINTER_DRIVER_CTR *ctr);
7219 WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, 
7220                                        TALLOC_CTX *mem_ctx,
7221                                        uint32 level, const char *env,
7222                                        uint32 *num_drivers,
7223                                        PRINTER_DRIVER_CTR *ctr);
7224 WERROR rpccli_spoolss_getprinterdriverdir (struct rpc_pipe_client *cli, 
7225                                         TALLOC_CTX *mem_ctx,
7226                                         uint32 level, char *env,
7227                                         DRIVER_DIRECTORY_CTR *ctr);
7228 WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, 
7229                                      TALLOC_CTX *mem_ctx, uint32 level,
7230                                      PRINTER_DRIVER_CTR *ctr);
7231 WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7232                                  uint32 level, PRINTER_INFO_CTR*ctr);
7233 WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli, 
7234                                          TALLOC_CTX *mem_ctx, const char *arch,
7235                                          const char *driver, int version);
7236 WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli, 
7237                                         TALLOC_CTX *mem_ctx, const char *arch,
7238                                         const char *driver);
7239 WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
7240                                               TALLOC_CTX *mem_ctx,
7241                                               char *name, char *environment,
7242                                               fstring procdir);
7243 WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7244                            POLICY_HND *handle, uint32 level, FORM *form);
7245 WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7246                            POLICY_HND *handle, uint32 level, 
7247                            const char *form_name, FORM *form);
7248 WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7249                            POLICY_HND *handle, const char *formname, 
7250                            uint32 level, FORM_1 *form);
7251 WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7252                               POLICY_HND *handle, const char *form_name);
7253 WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7254                              POLICY_HND *handle, int level, uint32 *num_forms,
7255                              FORM_1 **forms);
7256 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7257                             POLICY_HND *hnd, uint32 level, uint32 firstjob, 
7258                             uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr);
7259 WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7260                           POLICY_HND *hnd, uint32 jobid, uint32 level, 
7261                           uint32 command);
7262 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7263                           POLICY_HND *hnd, uint32 jobid, uint32 level,
7264                           JOB_INFO_CTR *ctr);
7265 WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7266                                     POLICY_HND *hnd);
7267 WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7268                                   POLICY_HND *hnd);
7269 WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7270                                    POLICY_HND *hnd, char *docname, 
7271                                    char *outputfile, char *datatype, 
7272                                    uint32 *jobid);
7273 WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7274                                   POLICY_HND *hnd);
7275 WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7276                                   POLICY_HND *hnd, const char *valuename, 
7277                                   REGISTRY_VALUE *value);
7278 WERROR rpccli_spoolss_getprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7279                                     POLICY_HND *hnd, const char *keyname, 
7280                                     const char *valuename, 
7281                                     REGISTRY_VALUE *value);
7282 WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7283                                   POLICY_HND *hnd, REGISTRY_VALUE *value);
7284 WERROR rpccli_spoolss_setprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7285                                     POLICY_HND *hnd, char *keyname, 
7286                                     REGISTRY_VALUE *value);
7287 WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7288                                    POLICY_HND *hnd, uint32 ndx,
7289                                    uint32 value_offered, uint32 data_offered,
7290                                    uint32 *value_needed, uint32 *data_needed,
7291                                    REGISTRY_VALUE *value);
7292 WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7293                                      POLICY_HND *hnd, const char *keyname, 
7294                                      REGVAL_CTR *ctr);
7295 WERROR rpccli_spoolss_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7296                                 POLICY_HND *hnd, uint32 data_size, char *data,
7297                                 uint32 *num_written);
7298 WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7299                                      POLICY_HND *hnd, char *valuename);
7300 WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7301                                        POLICY_HND *hnd, char *keyname, 
7302                                        char *valuename);
7303 WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7304                                   POLICY_HND *hnd, const char *keyname,
7305                                   uint16 **keylist, uint32 *len);
7306 WERROR rpccli_spoolss_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7307                                     POLICY_HND *hnd, char *keyname);
7308
7309 /* The following definitions come from rpc_client/cli_spoolss_notify.c  */
7310
7311 WERROR rpccli_spoolss_reply_open_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7312                                       const char *printer, uint32 printerlocal, uint32 type, 
7313                                       POLICY_HND *handle);
7314 WERROR rpccli_spoolss_reply_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7315                                        POLICY_HND *handle);
7316 WERROR rpccli_spoolss_routerreplyprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7317                                       POLICY_HND *pol, uint32 condition, uint32 change_id);
7318 WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7319                          POLICY_HND *pol, uint32 notify_data_len,
7320                          SPOOL_NOTIFY_INFO_DATA *notify_data,
7321                          uint32 change_low, uint32 change_high);
7322 WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7323                             POLICY_HND *pol, uint32 flags, uint32 options,
7324                             const char *localmachine, uint32 printerlocal,
7325                             SPOOL_NOTIFY_OPTION *option);
7326
7327 /* The following definitions come from rpc_client/cli_svcctl.c  */
7328
7329 WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7330                                       POLICY_HND *hSCM, uint32 type, uint32 state, 
7331                                       uint32 *returned, ENUM_SERVICES_STATUS **service_array  );
7332 WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7333                                 POLICY_HND *hService, SERVICE_CONFIG *config );
7334
7335 /* The following definitions come from rpc_client/init_lsa.c  */
7336
7337 void init_lsa_String(struct lsa_String *name, const char *s);
7338 void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s);
7339 void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s);
7340 void init_lsa_AsciiStringLarge(struct lsa_AsciiStringLarge *name, const char *s);
7341 void init_lsa_sec_qos(struct lsa_QosInfo *r,
7342                       uint32_t len,
7343                       uint16_t impersonation_level,
7344                       uint8_t context_mode,
7345                       uint8_t effective_only);
7346 void init_lsa_obj_attr(struct lsa_ObjectAttribute *r,
7347                        uint32_t len,
7348                        uint8_t *root_dir,
7349                        const char *object_name,
7350                        uint32_t attributes,
7351                        struct security_descriptor *sec_desc,
7352                        struct lsa_QosInfo *sec_qos);
7353 void init_lsa_translated_sid(struct lsa_TranslatedSid *r,
7354                              enum lsa_SidType sid_type,
7355                              uint32_t rid,
7356                              uint32_t sid_index);
7357 void init_lsa_translated_name2(struct lsa_TranslatedName2 *r,
7358                                enum lsa_SidType sid_type,
7359                                const char *name,
7360                                uint32_t sid_index,
7361                                uint32_t unknown);
7362
7363 /* The following definitions come from rpc_client/init_netlogon.c  */
7364
7365 void init_netr_SamBaseInfo(struct netr_SamBaseInfo *r,
7366                            NTTIME last_logon,
7367                            NTTIME last_logoff,
7368                            NTTIME acct_expiry,
7369                            NTTIME last_password_change,
7370                            NTTIME allow_password_change,
7371                            NTTIME force_password_change,
7372                            const char *account_name,
7373                            const char *full_name,
7374                            const char *logon_script,
7375                            const char *profile_path,
7376                            const char *home_directory,
7377                            const char *home_drive,
7378                            uint16_t logon_count,
7379                            uint16_t bad_password_count,
7380                            uint32_t rid,
7381                            uint32_t primary_gid,
7382                            struct samr_RidWithAttributeArray groups,
7383                            uint32_t user_flags,
7384                            struct netr_UserSessionKey key,
7385                            const char *logon_server,
7386                            const char *domain,
7387                            struct dom_sid2 *domain_sid,
7388                            struct netr_LMSessionKey LMSessKey,
7389                            uint32_t acct_flags);
7390 void init_netr_SamInfo3(struct netr_SamInfo3 *r,
7391                         NTTIME last_logon,
7392                         NTTIME last_logoff,
7393                         NTTIME acct_expiry,
7394                         NTTIME last_password_change,
7395                         NTTIME allow_password_change,
7396                         NTTIME force_password_change,
7397                         const char *account_name,
7398                         const char *full_name,
7399                         const char *logon_script,
7400                         const char *profile_path,
7401                         const char *home_directory,
7402                         const char *home_drive,
7403                         uint16_t logon_count,
7404                         uint16_t bad_password_count,
7405                         uint32_t rid,
7406                         uint32_t primary_gid,
7407                         struct samr_RidWithAttributeArray groups,
7408                         uint32_t user_flags,
7409                         struct netr_UserSessionKey key,
7410                         const char *logon_server,
7411                         const char *domain,
7412                         struct dom_sid2 *domain_sid,
7413                         struct netr_LMSessionKey LMSessKey,
7414                         uint32_t acct_flags,
7415                         uint32_t sidcount,
7416                         struct netr_SidAttr *sids);
7417 NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
7418                                 uint8_t pipe_session_key[16],
7419                                 struct netr_SamInfo3 *sam3);
7420 void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
7421                             const char *domain_name,
7422                             uint32_t parameter_control,
7423                             uint32_t logon_id_low,
7424                             uint32_t logon_id_high,
7425                             const char *account_name,
7426                             const char *workstation);
7427 void init_netr_NetworkInfo(struct netr_NetworkInfo *r,
7428                            const char *domain_name,
7429                            uint32_t parameter_control,
7430                            uint32_t logon_id_low,
7431                            uint32_t logon_id_high,
7432                            const char *account_name,
7433                            const char *workstation,
7434                            uint8_t challenge[8],
7435                            struct netr_ChallengeResponse nt,
7436                            struct netr_ChallengeResponse lm);
7437 void init_netr_PasswordInfo(struct netr_PasswordInfo *r,
7438                             const char *domain_name,
7439                             uint32_t parameter_control,
7440                             uint32_t logon_id_low,
7441                             uint32_t logon_id_high,
7442                             const char *account_name,
7443                             const char *workstation,
7444                             struct samr_Password lmpassword,
7445                             struct samr_Password ntpassword);
7446
7447 /* The following definitions come from rpc_client/init_samr.c  */
7448
7449 void init_samr_DomInfo1(struct samr_DomInfo1 *r,
7450                         uint16_t min_password_length,
7451                         uint16_t password_history_length,
7452                         uint32_t password_properties,
7453                         int64_t max_password_age,
7454                         int64_t min_password_age);
7455 void init_samr_DomInfo2(struct samr_DomInfo2 *r,
7456                         NTTIME force_logoff_time,
7457                         const char *comment,
7458                         const char *domain_name,
7459                         const char *primary,
7460                         uint64_t sequence_num,
7461                         uint32_t unknown2,
7462                         enum samr_Role role,
7463                         uint32_t unknown3,
7464                         uint32_t num_users,
7465                         uint32_t num_groups,
7466                         uint32_t num_aliases);
7467 void init_samr_DomInfo3(struct samr_DomInfo3 *r,
7468                         NTTIME force_logoff_time);
7469 void init_samr_DomInfo4(struct samr_DomInfo4 *r,
7470                         const char *comment);
7471 void init_samr_DomInfo5(struct samr_DomInfo5 *r,
7472                         const char *domain_name);
7473 void init_samr_DomInfo6(struct samr_DomInfo6 *r,
7474                         const char *primary);
7475 void init_samr_DomInfo7(struct samr_DomInfo7 *r,
7476                         enum samr_Role role);
7477 void init_samr_DomInfo8(struct samr_DomInfo8 *r,
7478                         uint64_t sequence_num,
7479                         NTTIME domain_create_time);
7480 void init_samr_DomInfo9(struct samr_DomInfo9 *r,
7481                         uint32_t unknown);
7482 void init_samr_DomInfo12(struct samr_DomInfo12 *r,
7483                          uint64_t lockout_duration,
7484                          uint64_t lockout_window,
7485                          uint16_t lockout_threshold);
7486 void init_samr_group_info1(struct samr_GroupInfoAll *r,
7487                            const char *name,
7488                            uint32_t attributes,
7489                            uint32_t num_members,
7490                            const char *description);
7491 void init_samr_group_info2(struct lsa_String *r, const char *group_name);
7492 void init_samr_group_info3(struct samr_GroupInfoAttributes *r,
7493                            uint32_t attributes);
7494 void init_samr_group_info4(struct lsa_String *r, const char *description);
7495 void init_samr_group_info5(struct samr_GroupInfoAll *r,
7496                            const char *name,
7497                            uint32_t attributes,
7498                            uint32_t num_members,
7499                            const char *description);
7500 void init_samr_alias_info1(struct samr_AliasInfoAll *r,
7501                            const char *name,
7502                            uint32_t num_members,
7503                            const char *description);
7504 void init_samr_alias_info3(struct lsa_String *r,
7505                            const char *description);
7506 void init_samr_user_info7(struct samr_UserInfo7 *r,
7507                           const char *account_name);
7508 void init_samr_user_info9(struct samr_UserInfo9 *r,
7509                           uint32_t primary_gid);
7510 void init_samr_user_info16(struct samr_UserInfo16 *r,
7511                            uint32_t acct_flags);
7512 void init_samr_user_info18(struct samr_UserInfo18 *r,
7513                            const uint8 lm_pwd[16],
7514                            const uint8 nt_pwd[16]);
7515 void init_samr_user_info20(struct samr_UserInfo20 *r,
7516                            struct lsa_BinaryString *parameters);
7517 void init_samr_user_info21(struct samr_UserInfo21 *r,
7518                            NTTIME last_logon,
7519                            NTTIME last_logoff,
7520                            NTTIME last_password_change,
7521                            NTTIME acct_expiry,
7522                            NTTIME allow_password_change,
7523                            NTTIME force_password_change,
7524                            const char *account_name,
7525                            const char *full_name,
7526                            const char *home_directory,
7527                            const char *home_drive,
7528                            const char *logon_script,
7529                            const char *profile_path,
7530                            const char *description,
7531                            const char *workstations,
7532                            const char *comment,
7533                            struct lsa_BinaryString *parameters,
7534                            uint32_t rid,
7535                            uint32_t primary_gid,
7536                            uint32_t acct_flags,
7537                            uint32_t fields_present,
7538                            struct samr_LogonHours logon_hours,
7539                            uint16_t bad_password_count,
7540                            uint16_t logon_count,
7541                            uint16_t country_code,
7542                            uint16_t code_page,
7543                            uint8_t nt_password_set,
7544                            uint8_t lm_password_set,
7545                            uint8_t password_expired);
7546 void init_samr_user_info23(struct samr_UserInfo23 *r,
7547                            NTTIME last_logon,
7548                            NTTIME last_logoff,
7549                            NTTIME last_password_change,
7550                            NTTIME acct_expiry,
7551                            NTTIME allow_password_change,
7552                            NTTIME force_password_change,
7553                            const char *account_name,
7554                            const char *full_name,
7555                            const char *home_directory,
7556                            const char *home_drive,
7557                            const char *logon_script,
7558                            const char *profile_path,
7559                            const char *description,
7560                            const char *workstations,
7561                            const char *comment,
7562                            struct lsa_BinaryString *parameters,
7563                            uint32_t rid,
7564                            uint32_t primary_gid,
7565                            uint32_t acct_flags,
7566                            uint32_t fields_present,
7567                            struct samr_LogonHours logon_hours,
7568                            uint16_t bad_password_count,
7569                            uint16_t logon_count,
7570                            uint16_t country_code,
7571                            uint16_t code_page,
7572                            uint8_t nt_password_set,
7573                            uint8_t lm_password_set,
7574                            uint8_t password_expired,
7575                            uint8_t data[516],
7576                            uint8_t pw_len);
7577 void init_samr_user_info24(struct samr_UserInfo24 *r,
7578                            uint8_t data[516],
7579                            uint8_t pw_len);
7580 void init_samr_CryptPasswordEx(const char *pwd,
7581                                DATA_BLOB *session_key,
7582                                struct samr_CryptPasswordEx *pwd_buf);
7583 void init_samr_CryptPassword(const char *pwd,
7584                              DATA_BLOB *session_key,
7585                              struct samr_CryptPassword *pwd_buf);
7586
7587 /* The following definitions come from rpc_client/init_srvsvc.c  */
7588
7589 void init_srvsvc_NetSrvInfo102(struct srvsvc_NetSrvInfo102 *r,
7590                                enum srvsvc_PlatformId platform_id,
7591                                const char *server_name,
7592                                uint32_t version_major,
7593                                uint32_t version_minor,
7594                                uint32_t server_type,
7595                                const char *comment,
7596                                uint32_t users,
7597                                uint32_t disc,
7598                                uint32_t hidden,
7599                                uint32_t announce,
7600                                uint32_t anndelta,
7601                                uint32_t licenses,
7602                                const char *userpath);
7603 void init_srvsvc_NetSrvInfo101(struct srvsvc_NetSrvInfo101 *r,
7604                                enum srvsvc_PlatformId platform_id,
7605                                const char *server_name,
7606                                uint32_t version_major,
7607                                uint32_t version_minor,
7608                                uint32_t server_type,
7609                                const char *comment);
7610 void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
7611                                enum srvsvc_PlatformId platform_id,
7612                                const char *server_name);
7613 void init_srvsvc_NetShareInfo0(struct srvsvc_NetShareInfo0 *r,
7614                                const char *name);
7615 void init_srvsvc_NetShareInfo1(struct srvsvc_NetShareInfo1 *r,
7616                                const char *name,
7617                                enum srvsvc_ShareType type,
7618                                const char *comment);
7619 void init_srvsvc_NetShareInfo2(struct srvsvc_NetShareInfo2 *r,
7620                                const char *name,
7621                                enum srvsvc_ShareType type,
7622                                const char *comment,
7623                                uint32_t permissions,
7624                                uint32_t max_users,
7625                                uint32_t current_users,
7626                                const char *path,
7627                                const char *password);
7628 void init_srvsvc_NetShareInfo501(struct srvsvc_NetShareInfo501 *r,
7629                                  const char *name,
7630                                  enum srvsvc_ShareType type,
7631                                  const char *comment,
7632                                  uint32_t csc_policy);
7633 void init_srvsvc_NetShareInfo502(struct srvsvc_NetShareInfo502 *r,
7634                                  const char *name,
7635                                  enum srvsvc_ShareType type,
7636                                  const char *comment,
7637                                  uint32_t permissions,
7638                                  uint32_t max_users,
7639                                  uint32_t current_users,
7640                                  const char *path,
7641                                  const char *password,
7642                                  struct sec_desc_buf *sd_buf);
7643 void init_srvsvc_NetShareInfo1004(struct srvsvc_NetShareInfo1004 *r,
7644                                   const char *comment);
7645 void init_srvsvc_NetShareInfo1005(struct srvsvc_NetShareInfo1005 *r,
7646                                   uint32_t dfs_flags);
7647 void init_srvsvc_NetShareInfo1006(struct srvsvc_NetShareInfo1006 *r,
7648                                   uint32_t max_users);
7649 void init_srvsvc_NetShareInfo1007(struct srvsvc_NetShareInfo1007 *r,
7650                                   uint32_t flags,
7651                                   const char *alternate_directory_name);
7652 void init_srvsvc_NetRemoteTODInfo(struct srvsvc_NetRemoteTODInfo *r,
7653                                   uint32_t elapsed,
7654                                   uint32_t msecs,
7655                                   uint32_t hours,
7656                                   uint32_t mins,
7657                                   uint32_t secs,
7658                                   uint32_t hunds,
7659                                   int32_t ttimezone,
7660                                   uint32_t tinterval,
7661                                   uint32_t day,
7662                                   uint32_t month,
7663                                   uint32_t year,
7664                                   uint32_t weekday);
7665 void init_srvsvc_NetSessInfo0(struct srvsvc_NetSessInfo0 *r,
7666                               const char *client);
7667 void init_srvsvc_NetSessInfo1(struct srvsvc_NetSessInfo1 *r,
7668                               const char *client,
7669                               const char *user,
7670                               uint32_t num_open,
7671                               uint32_t _time,
7672                               uint32_t idle_time,
7673                               uint32_t user_flags);
7674 void init_srvsvc_NetSessInfo2(struct srvsvc_NetSessInfo2 *r,
7675                               const char *client,
7676                               const char *user,
7677                               uint32_t num_open,
7678                               uint32_t _time,
7679                               uint32_t idle_time,
7680                               uint32_t user_flags,
7681                               const char *client_type);
7682 void init_srvsvc_NetSessInfo10(struct srvsvc_NetSessInfo10 *r,
7683                                const char *client,
7684                                const char *user,
7685                                uint32_t _time,
7686                                uint32_t idle_time);
7687 void init_srvsvc_NetSessInfo502(struct srvsvc_NetSessInfo502 *r,
7688                                const char *client,
7689                                const char *user,
7690                                uint32_t num_open,
7691                                uint32_t _time,
7692                                uint32_t idle_time,
7693                                uint32_t user_flags,
7694                                const char *client_type,
7695                                const char *transport);
7696 void init_srvsvc_NetFileInfo2(struct srvsvc_NetFileInfo2 *r,
7697                               uint32_t fid);
7698 void init_srvsvc_NetFileInfo3(struct srvsvc_NetFileInfo3 *r,
7699                               uint32_t fid,
7700                               uint32_t permissions,
7701                               uint32_t num_locks,
7702                               const char *path,
7703                               const char *user);
7704 void init_srvsvc_NetConnInfo0(struct srvsvc_NetConnInfo0 *r,
7705                               uint32_t conn_id);
7706 void init_srvsvc_NetConnInfo1(struct srvsvc_NetConnInfo1 *r,
7707                               uint32_t conn_id,
7708                               uint32_t conn_type,
7709                               uint32_t num_open,
7710                               uint32_t num_users,
7711                               uint32_t conn_time,
7712                               const char *user,
7713                               const char *share);
7714
7715 /* The following definitions come from rpc_client/ndr.c  */
7716
7717 NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
7718                         TALLOC_CTX *mem_ctx,
7719                         const struct ndr_interface_table *table,
7720                         uint32 opnum, void *r);
7721
7722 /* The following definitions come from rpc_parse/parse_buffer.c  */
7723
7724 void rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
7725 bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer);
7726 bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer);
7727 bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size);
7728 void rpcbuf_move(RPC_BUFFER *src, RPC_BUFFER **dest);
7729 uint32 rpcbuf_get_size(RPC_BUFFER *buffer);
7730 bool smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string);
7731 bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string);
7732 bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc);
7733 uint32 size_of_relative_string(UNISTR *string);
7734
7735 /* The following definitions come from rpc_parse/parse_eventlog.c  */
7736
7737 bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
7738                                  prs_struct *ps, int depth);
7739 bool eventlog_io_r_read_eventlog(const char *desc,
7740                                  EVENTLOG_Q_READ_EVENTLOG *q_u,
7741                                  EVENTLOG_R_READ_EVENTLOG *r_u,
7742                                  prs_struct *ps,
7743                                  int depth);
7744
7745 /* The following definitions come from rpc_parse/parse_misc.c  */
7746
7747 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
7748 bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime);
7749 uint32 get_enum_hnd(ENUM_HND *enh);
7750 void init_enum_hnd(ENUM_HND *enh, uint32 hnd);
7751 bool smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth);
7752 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
7753 void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid);
7754 bool smb_io_dom_sid2_p(const char *desc, prs_struct *ps, int depth, DOM_SID2 **sid2);
7755 bool smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth);
7756 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
7757                  prs_struct *ps, int depth);
7758 void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer);
7759 bool smb_io_strhdr(const char *desc,  STRHDR *hdr, prs_struct *ps, int depth);
7760 void init_uni_hdr(UNIHDR *hdr, UNISTR2 *str2);
7761 bool smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth);
7762 void init_buf_hdr(BUFHDR *hdr, int max_len, int len);
7763 bool smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset);
7764 bool smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, 
7765                                 uint32 ptr_hdrbuf, uint32 max_len, uint32 len);
7766 bool smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth);
7767 void init_unistr(UNISTR *str, const char *buf);
7768 bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
7769 void init_rpc_blob_uint32(RPC_DATA_BLOB *str, uint32 val);
7770 void init_rpc_blob_str(RPC_DATA_BLOB *str, const char *buf, int len);
7771 void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf);
7772 void init_rpc_blob_bytes(RPC_DATA_BLOB *str, uint8 *buf, size_t len);
7773 bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
7774 void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len);
7775 bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2);
7776 void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
7777 void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
7778 void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len);
7779 bool smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth);
7780 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
7781 void init_unistr4(UNISTR4 *uni4, const char *buf, enum unistr2_term_codes flags);
7782 void init_unistr4_w( TALLOC_CTX *ctx, UNISTR4 *uni4, const smb_ucs2_t *buf );
7783 void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
7784 void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR *from);
7785 void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
7786 bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2);
7787 bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 );
7788 bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
7789 bool prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7790 bool prs_unistr4_hdr(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7791 bool prs_unistr4_str(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7792 bool prs_unistr4_array(const char *desc, prs_struct *ps, int depth, UNISTR4_ARRAY *array );
7793 bool init_unistr4_array( UNISTR4_ARRAY *array, uint32 count, const char **strings );
7794 void init_dom_rid(DOM_RID *prid, uint32 rid, uint16 type, uint32 idx);
7795 bool smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth);
7796 bool smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth);
7797 void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type);
7798 bool smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth);
7799 void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid);
7800 void init_clnt_srv(DOM_CLNT_SRV *logcln, const char *logon_srv,
7801                    const char *comp_name);
7802 bool smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth);
7803 void init_log_info(DOM_LOG_INFO *loginfo, const char *logon_srv, const char *acct_name,
7804                 uint16 sec_chan, const char *comp_name);
7805 bool smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth);
7806 bool smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth);
7807 bool smb_io_cred(const char *desc,  DOM_CRED *cred, prs_struct *ps, int depth);
7808 void init_clnt_info2(DOM_CLNT_INFO2 *clnt,
7809                                 const char *logon_srv, const char *comp_name,
7810                                 const DOM_CRED *clnt_cred);
7811 bool smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth);
7812 void init_clnt_info(DOM_CLNT_INFO *clnt,
7813                 const char *logon_srv, const char *acct_name,
7814                 uint16 sec_chan, const char *comp_name,
7815                 const DOM_CRED *cred);
7816 bool smb_io_clnt_info(const char *desc,  DOM_CLNT_INFO *clnt, prs_struct *ps, int depth);
7817 void init_logon_id(DOM_LOGON_ID *logonid, uint32 log_id_low, uint32 log_id_high);
7818 bool smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth);
7819 void init_owf_info(OWF_INFO *hash, const uint8 data[16]);
7820 bool smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth);
7821 bool smb_io_gid(const char *desc,  DOM_GID *gid, prs_struct *ps, int depth);
7822 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
7823 void init_unistr3(UNISTR3 *str, const char *buf);
7824 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth);
7825 bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
7826 bool smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth);
7827 bool smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth);
7828 bool smb_io_rpc_blob(const char *desc, RPC_DATA_BLOB *blob, prs_struct *ps, int depth);
7829 bool make_uni_hdr(UNIHDR *hdr, int len);
7830 bool make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer);
7831 uint32 str_len_uni(UNISTR *source);
7832 bool policy_handle_is_valid(const POLICY_HND *hnd);
7833
7834 /* The following definitions come from rpc_parse/parse_ntsvcs.c  */
7835
7836 bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth);
7837 bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth);
7838 bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth);
7839 bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth);
7840
7841 /* The following definitions come from rpc_parse/parse_prs.c  */
7842
7843 void prs_dump(const char *name, int v, prs_struct *ps);
7844 void prs_dump_before(const char *name, int v, prs_struct *ps);
7845 void prs_dump_region(const char *name, int v, prs_struct *ps,
7846                      int from_off, int to_off);
7847 void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name);
7848 bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io);
7849 void prs_mem_free(prs_struct *ps);
7850 void prs_mem_clear(prs_struct *ps);
7851 char *prs_alloc_mem_(prs_struct *ps, size_t size, unsigned int count);
7852 char *prs_alloc_mem(prs_struct *ps, size_t size, unsigned int count);
7853 TALLOC_CTX *prs_get_mem_context(prs_struct *ps);
7854 void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic);
7855 char *prs_take_memory(prs_struct *ps, uint32 *psize);
7856 bool prs_set_buffer_size(prs_struct *ps, uint32 newsize);
7857 bool prs_grow(prs_struct *ps, uint32 extra_space);
7858 bool prs_force_grow(prs_struct *ps, uint32 extra_space);
7859 char *prs_data_p(prs_struct *ps);
7860 uint32 prs_data_size(prs_struct *ps);
7861 uint32 prs_offset(prs_struct *ps);
7862 bool prs_set_offset(prs_struct *ps, uint32 offset);
7863 bool prs_append_prs_data(prs_struct *dst, prs_struct *src);
7864 bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len);
7865 bool prs_copy_data_in(prs_struct *dst, const char *src, uint32 len);
7866 bool prs_copy_data_out(char *dst, prs_struct *src, uint32 len);
7867 bool prs_copy_all_data_out(char *dst, prs_struct *src);
7868 void prs_set_endian_data(prs_struct *ps, bool endian);
7869 bool prs_align(prs_struct *ps);
7870 bool prs_align_uint16(prs_struct *ps);
7871 bool prs_align_uint64(prs_struct *ps);
7872 bool prs_align_custom(prs_struct *ps, uint8 boundary);
7873 bool prs_align_needed(prs_struct *ps, uint32 needed);
7874 char *prs_mem_get(prs_struct *ps, uint32 extra_size);
7875 void prs_switch_type(prs_struct *ps, bool io);
7876 void prs_force_dynamic(prs_struct *ps);
7877 void prs_set_session_key(prs_struct *ps, const char sess_key[16]);
7878 bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8);
7879 bool prs_pointer( const char *name, prs_struct *ps, int depth, 
7880                  void *dta, size_t data_size,
7881                  bool (*prs_fn)(const char*, prs_struct*, int, void*) );
7882 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
7883 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
7884 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
7885 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7886 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7887 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
7888 bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len);
7889 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7890 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7891 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
7892 bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
7893 bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf);
7894 bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str);
7895 bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
7896 bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
7897 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
7898 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size);
7899 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str);
7900 bool prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset);
7901 bool prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
7902                                 uint32 ptr_uint16, uint32 start_offset);
7903 bool prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset);
7904 bool prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
7905                                 uint32 ptr_uint32, uint32 data_size);
7906 int tdb_prs_store(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps);
7907 int tdb_prs_fetch(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps, TALLOC_CTX *mem_ctx);
7908 bool prs_hash1(prs_struct *ps, uint32 offset, int len);
7909 void schannel_encode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7910                    enum schannel_direction direction,
7911                    RPC_AUTH_SCHANNEL_CHK * verf,
7912                    char *data, size_t data_len);
7913 bool schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7914                    enum schannel_direction direction, 
7915                    RPC_AUTH_SCHANNEL_CHK * verf, char *data, size_t data_len);
7916 bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7917 bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7918
7919 /* The following definitions come from rpc_parse/parse_rpc.c  */
7920
7921 const char *cli_get_pipe_name_from_iface(TALLOC_CTX *mem_ctx,
7922                                          struct cli_state *cli,
7923                                          const struct ndr_syntax_id *interface);
7924 void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
7925                                 uint32 call_id, int data_len, int auth_len);
7926 bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth);
7927 void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
7928                       const RPC_IFACE *abstract, const RPC_IFACE *transfer);
7929 void init_rpc_hdr_rb(RPC_HDR_RB *rpc, 
7930                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7931                                 RPC_CONTEXT *context);
7932 bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth);
7933 bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth);
7934 void init_rpc_hdr_ba(RPC_HDR_BA *rpc, 
7935                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7936                                 const char *pipe_addr,
7937                                 uint8 num_results, uint16 result, uint16 reason,
7938                                 RPC_IFACE *transfer);
7939 bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth);
7940 void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum);
7941 bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth);
7942 bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth);
7943 bool smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth);
7944 void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
7945                                 uint8 auth_type, uint8 auth_level,
7946                                 uint8 auth_pad_len,
7947                                 uint32 auth_context_id);
7948 bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth);
7949 bool rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
7950                                 const char *signature, uint32 msg_type);
7951 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
7952                                 const char *signature, uint32 msg_type);
7953 bool smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7954 bool smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7955 void init_rpc_auth_schannel_neg(RPC_AUTH_SCHANNEL_NEG *neg,
7956                               const char *domain, const char *myname);
7957 bool smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
7958                                 prs_struct *ps, int depth);
7959 bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len, 
7960                                 RPC_AUTH_SCHANNEL_CHK * chk,
7961                                 prs_struct *ps, int depth);
7962
7963 /* The following definitions come from rpc_parse/parse_sec.c  */
7964
7965 bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
7966 bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
7967
7968 /* The following definitions come from rpc_parse/parse_spoolss.c  */
7969
7970 bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
7971 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
7972 bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
7973                                      prs_struct *ps, int depth);
7974 bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u );
7975 bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode);
7976 bool make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u,
7977                 const fstring printername, 
7978                 const fstring datatype, 
7979                 uint32 access_required,
7980                 const fstring clientname,
7981                 const fstring user_name);
7982 bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u, 
7983         const char *srv_name, const char* clientname, const char* user_name,
7984         uint32 level, PRINTER_INFO_CTR *ctr);
7985 bool make_spoolss_printer_info_2(TALLOC_CTX *ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, 
7986                                 PRINTER_INFO_2 *info);
7987 bool make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3, 
7988                                 PRINTER_INFO_3 *info);
7989 bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7, 
7990                                 PRINTER_INFO_7 *info);
7991 bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth);
7992 bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth);
7993 bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
7994 bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
7995 bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
7996                                            SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, 
7997                                            const char *server,
7998                                            const char* arch, 
7999                                            const char* driver,
8000                                            int version);
8001 bool make_spoolss_q_deleteprinterdriver(
8002         TALLOC_CTX *mem_ctx,
8003         SPOOL_Q_DELETEPRINTERDRIVER *q_u, 
8004         const char *server,
8005         const char* arch, 
8006         const char* driver 
8007 );
8008 bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
8009                                    const POLICY_HND *handle,
8010                                    const char *valuename, uint32 size);
8011 bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
8012                                      const POLICY_HND *handle,
8013                                      const char *keyname, 
8014                                      const char *valuename, uint32 size);
8015 bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
8016 bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth);
8017 bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth);
8018 bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8019 bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8020 bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
8021 bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd);
8022 bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth);
8023 bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth);
8024 bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth);
8025 bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth);
8026 bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8027 bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth);
8028 bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8029 bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth);
8030 bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth);
8031 bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth);
8032 bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth);
8033 bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth);
8034 bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth);
8035 bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth);
8036 bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth);
8037 bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth);
8038 bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth);
8039 bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth);
8040 bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth);
8041 bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth);
8042 bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
8043 bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
8044 bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
8045 bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth);
8046 bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth);
8047 bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth);
8048 bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth);
8049 bool smb_io_printer_info_3(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_3 *info, int depth);
8050 bool smb_io_printer_info_4(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_4 *info, int depth);
8051 bool smb_io_printer_info_5(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_5 *info, int depth);
8052 bool smb_io_printer_info_6(const char *desc, RPC_BUFFER *buffer,
8053                            PRINTER_INFO_6 *info, int depth);
8054 bool smb_io_printer_info_7(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_7 *info, int depth);
8055 bool smb_io_port_info_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
8056 bool smb_io_port_info_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
8057 bool smb_io_printer_driver_info_1(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) ;
8058 bool smb_io_printer_driver_info_2(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) ;
8059 bool smb_io_printer_driver_info_3(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_3 *info, int depth);
8060 bool smb_io_printer_driver_info_6(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_6 *info, int depth);
8061 bool smb_io_job_info_1(const char *desc, RPC_BUFFER *buffer, JOB_INFO_1 *info, int depth);
8062 bool smb_io_job_info_2(const char *desc, RPC_BUFFER *buffer, JOB_INFO_2 *info, int depth);
8063 bool smb_io_form_1(const char *desc, RPC_BUFFER *buffer, FORM_1 *info, int depth);
8064 bool smb_io_driverdir_1(const char *desc, RPC_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth);
8065 bool smb_io_port_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
8066 bool smb_io_port_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
8067 bool smb_io_printprocessor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth);
8068 bool smb_io_printprocdatatype_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth);
8069 bool smb_io_printmonitor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_1 *info, int depth);
8070 bool smb_io_printmonitor_info_2(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_2 *info, int depth);
8071 uint32 spoolss_size_printer_info_0(PRINTER_INFO_0 *info);
8072 uint32 spoolss_size_printer_info_1(PRINTER_INFO_1 *info);
8073 uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info);
8074 uint32 spoolss_size_printer_info_4(PRINTER_INFO_4 *info);
8075 uint32 spoolss_size_printer_info_5(PRINTER_INFO_5 *info);
8076 uint32 spoolss_size_printer_info_6(PRINTER_INFO_6 *info);
8077 uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info);
8078 uint32 spoolss_size_printer_info_7(PRINTER_INFO_7 *info);
8079 uint32 spoolss_size_printer_driver_info_1(DRIVER_INFO_1 *info);
8080 uint32 spoolss_size_printer_driver_info_2(DRIVER_INFO_2 *info);
8081 uint32 spoolss_size_string_array(uint16 *string);
8082 uint32 spoolss_size_printer_driver_info_3(DRIVER_INFO_3 *info);
8083 uint32 spoolss_size_printer_driver_info_6(DRIVER_INFO_6 *info);
8084 uint32 spoolss_size_job_info_1(JOB_INFO_1 *info);
8085 uint32 spoolss_size_job_info_2(JOB_INFO_2 *info);
8086 uint32 spoolss_size_form_1(FORM_1 *info);
8087 uint32 spoolss_size_port_info_1(PORT_INFO_1 *info);
8088 uint32 spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1 *info);
8089 uint32 spoolss_size_printprocessordirectory_info_1(PRINTPROCESSOR_DIRECTORY_1 *info);
8090 uint32 spoolss_size_port_info_2(PORT_INFO_2 *info);
8091 uint32 spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1 *info);
8092 uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info);
8093 uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
8094 uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info);
8095 uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info);
8096 bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, 
8097                                const POLICY_HND *hnd,
8098                                const fstring architecture,
8099                                uint32 level, uint32 clientmajor, uint32 clientminor,
8100                                RPC_BUFFER *buffer, uint32 offered);
8101 bool spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth);
8102 bool spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth);
8103 bool make_spoolss_q_enumprinters(
8104         SPOOL_Q_ENUMPRINTERS *q_u, 
8105         uint32 flags, 
8106         char *servername, 
8107         uint32 level, 
8108         RPC_BUFFER *buffer, 
8109         uint32 offered
8110 );
8111 bool make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u, 
8112                                 fstring servername, uint32 level, 
8113                                 RPC_BUFFER *buffer, uint32 offered);
8114 bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth);
8115 bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth);
8116 bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth);
8117 bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth);
8118 bool make_spoolss_q_getprinter(
8119         TALLOC_CTX *mem_ctx,
8120         SPOOL_Q_GETPRINTER *q_u, 
8121         const POLICY_HND *hnd, 
8122         uint32 level, 
8123         RPC_BUFFER *buffer, 
8124         uint32 offered
8125 );
8126 bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, 
8127                                 const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, 
8128                                 uint32 command);
8129 bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth);
8130 bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth);
8131 bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth);
8132 bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth);
8133 bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth);
8134 bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth);
8135 bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth);
8136 bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
8137                                 uint32 firstjob,
8138                                 uint32 numofjobs,
8139                                 uint32 level,
8140                                 RPC_BUFFER *buffer,
8141                                 uint32 offered);
8142 bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth);
8143 bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth);
8144 bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth);
8145 bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth);
8146 bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth);
8147 bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth);
8148 bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
8149                                 const char *name,
8150                                 const char *environment,
8151                                 uint32 level,
8152                                 RPC_BUFFER *buffer, uint32 offered);
8153 bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth);
8154 bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth);
8155 bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth);
8156 bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth);
8157 bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth);
8158 bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth);
8159 bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth);
8160 bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth);
8161 bool spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth);
8162 bool spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth);
8163 bool spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth);
8164 bool spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth);
8165 bool spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth);
8166 bool spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, 
8167                                prs_struct *ps, int depth);
8168 bool spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, 
8169                                           prs_struct *ps, int depth);
8170 bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, 
8171                                           prs_struct *ps, int depth);
8172 bool smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth);
8173 bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth);
8174 bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
8175                                 SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, 
8176                                 uint32 level, PRINTER_DRIVER_CTR *info);
8177 bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
8178         SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
8179                                 DRIVER_INFO_3 *info3);
8180 bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
8181 bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8182 bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8183 bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8184 bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8185 bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
8186                                 NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc);
8187 bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
8188                                 NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc);
8189 bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
8190                               NT_PRINTER_INFO_LEVEL_2  *d);
8191 bool make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
8192                                 fstring servername, fstring env_name, uint32 level,
8193                                 RPC_BUFFER *buffer, uint32 offered);
8194 bool spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth);
8195 bool spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth);
8196 bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth);
8197 bool spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth);
8198 bool spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth);
8199 bool spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth);
8200 bool spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth);
8201 bool spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth);
8202 bool spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth);
8203 bool spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth);
8204 bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
8205 bool spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth);
8206 bool make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
8207                 const POLICY_HND *hnd,
8208                 uint32 idx, uint32 valuelen, uint32 datalen);
8209 bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
8210                                       const POLICY_HND *hnd, const char *key,
8211                                       uint32 size);
8212 bool make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
8213                                    char* value, uint32 data_type, char* data, uint32 data_size);
8214 bool make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY_HND *hnd,
8215                                      char *key, char* value, uint32 data_type, char* data, 
8216                                      uint32 data_size);
8217 bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
8218 bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
8219 bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth);
8220 bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth);
8221 bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth);
8222 bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth);
8223 bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth);
8224 bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth);
8225 bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth);
8226 bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth);
8227 bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth);
8228 bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth);
8229 void free_devmode(DEVICEMODE *devmode);
8230 void free_printer_info_1(PRINTER_INFO_1 *printer);
8231 void free_printer_info_2(PRINTER_INFO_2 *printer);
8232 void free_printer_info_3(PRINTER_INFO_3 *printer);
8233 void free_printer_info_4(PRINTER_INFO_4 *printer);
8234 void free_printer_info_5(PRINTER_INFO_5 *printer);
8235 void free_printer_info_6(PRINTER_INFO_6 *printer);
8236 void free_printer_info_7(PRINTER_INFO_7 *printer);
8237 void free_job_info_2(JOB_INFO_2 *job);
8238 bool make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, 
8239                                const fstring string, uint32 printer, uint32 type);
8240 bool spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth);
8241 bool spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth);
8242 bool make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, 
8243                                         uint32 condition, uint32 change_id);
8244 bool spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth);
8245 bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth);
8246 bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
8247 bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
8248 bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
8249 bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
8250                                 uint32 change_low, uint32 change_high,
8251                                 SPOOL_NOTIFY_INFO *info);
8252 bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
8253 bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
8254 bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8255 bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8256 bool spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8257 bool spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8258 bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, 
8259                                    POLICY_HND *hnd, const char *key, 
8260                                    uint32 size);
8261 bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth);
8262 bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
8263 bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u, 
8264                                      POLICY_HND *hnd, char *keyname);
8265 bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth);
8266 bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth);
8267 bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8268 bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8269 bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered);
8270 bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth);
8271 bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth);
8272 bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth);
8273 bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, 
8274                             int level, FORM *form);
8275 bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, 
8276                             int level, const char *form_name, FORM *form);
8277 bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, 
8278                                const char *form);
8279 bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, 
8280                             const char *formname, uint32 level, 
8281                             RPC_BUFFER *buffer, uint32 offered);
8282 bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
8283                               uint32 level, RPC_BUFFER *buffer,
8284                               uint32 offered);
8285 bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, 
8286                            uint32 jobid, uint32 level, uint32 command);
8287 bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, 
8288                            uint32 jobid, uint32 level, RPC_BUFFER *buffer,
8289                            uint32 offered);
8290 bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u, 
8291                                      POLICY_HND *handle);
8292 bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u, 
8293                                    POLICY_HND *handle);
8294 bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u, 
8295                                     POLICY_HND *handle, uint32 level,
8296                                     char *docname, char *outputfile,
8297                                     char *datatype);
8298 bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u, 
8299                                   POLICY_HND *handle);
8300 bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u, 
8301                                  POLICY_HND *handle, uint32 data_size,
8302                                  char *data);
8303 bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u, 
8304                                  POLICY_HND *handle, char *valuename);
8305 bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u, 
8306                                         POLICY_HND *handle, char *key,
8307                                         char *value);
8308 bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
8309                              uint32 flags, uint32 options, const char *localmachine,
8310                              uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
8311 bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth);
8312 bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth);
8313 bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname );
8314 bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ;
8315
8316 /* The following definitions come from rpc_parse/parse_svcctl.c  */
8317
8318 bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth );
8319 bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth );
8320 uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status );
8321 uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config );
8322 bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth);
8323 bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth);
8324 bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth);
8325 bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth);
8326 bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth);
8327 void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc );
8328 bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth );
8329 uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc );
8330 bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth );
8331 uint32 svcctl_sizeof_service_fa( SERVICE_FAILURE_ACTIONS *fa);
8332 bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth);
8333 bool svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth);
8334 bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth);
8335
8336 /* The following definitions come from rpc_server/srv_dfs_nt.c  */
8337
8338 void _dfs_GetManagerVersion(pipes_struct *p, struct dfs_GetManagerVersion *r);
8339 WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r);
8340 WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r);
8341 WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r);
8342 WERROR _dfs_GetInfo(pipes_struct *p, struct dfs_GetInfo *r);
8343 WERROR _dfs_SetInfo(pipes_struct *p, struct dfs_SetInfo *r);
8344 WERROR _dfs_Rename(pipes_struct *p, struct dfs_Rename *r);
8345 WERROR _dfs_Move(pipes_struct *p, struct dfs_Move *r);
8346 WERROR _dfs_ManagerGetConfigInfo(pipes_struct *p, struct dfs_ManagerGetConfigInfo *r);
8347 WERROR _dfs_ManagerSendSiteInfo(pipes_struct *p, struct dfs_ManagerSendSiteInfo *r);
8348 WERROR _dfs_AddFtRoot(pipes_struct *p, struct dfs_AddFtRoot *r);
8349 WERROR _dfs_RemoveFtRoot(pipes_struct *p, struct dfs_RemoveFtRoot *r);
8350 WERROR _dfs_AddStdRoot(pipes_struct *p, struct dfs_AddStdRoot *r);
8351 WERROR _dfs_RemoveStdRoot(pipes_struct *p, struct dfs_RemoveStdRoot *r);
8352 WERROR _dfs_ManagerInitialize(pipes_struct *p, struct dfs_ManagerInitialize *r);
8353 WERROR _dfs_AddStdRootForced(pipes_struct *p, struct dfs_AddStdRootForced *r);
8354 WERROR _dfs_GetDcAddress(pipes_struct *p, struct dfs_GetDcAddress *r);
8355 WERROR _dfs_SetDcAddress(pipes_struct *p, struct dfs_SetDcAddress *r);
8356 WERROR _dfs_FlushFtTable(pipes_struct *p, struct dfs_FlushFtTable *r);
8357 WERROR _dfs_Add2(pipes_struct *p, struct dfs_Add2 *r);
8358 WERROR _dfs_Remove2(pipes_struct *p, struct dfs_Remove2 *r);
8359 WERROR _dfs_EnumEx(pipes_struct *p, struct dfs_EnumEx *r);
8360 WERROR _dfs_SetInfo2(pipes_struct *p, struct dfs_SetInfo2 *r);
8361
8362 /* The following definitions come from rpc_server/srv_dssetup_nt.c  */
8363
8364 WERROR _dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p,
8365                                                   struct dssetup_DsRoleGetPrimaryDomainInformation *r);
8366 WERROR _dssetup_DsRoleDnsNameToFlatName(pipes_struct *p,
8367                                         struct dssetup_DsRoleDnsNameToFlatName *r);
8368 WERROR _dssetup_DsRoleDcAsDc(pipes_struct *p,
8369                              struct dssetup_DsRoleDcAsDc *r);
8370 WERROR _dssetup_DsRoleDcAsReplica(pipes_struct *p,
8371                                   struct dssetup_DsRoleDcAsReplica *r);
8372 WERROR _dssetup_DsRoleDemoteDc(pipes_struct *p,
8373                                struct dssetup_DsRoleDemoteDc *r);
8374 WERROR _dssetup_DsRoleGetDcOperationProgress(pipes_struct *p,
8375                                              struct dssetup_DsRoleGetDcOperationProgress *r);
8376 WERROR _dssetup_DsRoleGetDcOperationResults(pipes_struct *p,
8377                                             struct dssetup_DsRoleGetDcOperationResults *r);
8378 WERROR _dssetup_DsRoleCancel(pipes_struct *p,
8379                              struct dssetup_DsRoleCancel *r);
8380 WERROR _dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p,
8381                                                 struct dssetup_DsRoleServerSaveStateForUpgrade *r);
8382 WERROR _dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p,
8383                                              struct dssetup_DsRoleUpgradeDownlevelServer *r);
8384 WERROR _dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p,
8385                                                   struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
8386
8387 /* The following definitions come from rpc_server/srv_echo_nt.c  */
8388
8389 void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r );
8390 void _echo_EchoData(pipes_struct *p, struct echo_EchoData *r);
8391 void _echo_SinkData(pipes_struct *p, struct echo_SinkData *r);
8392 void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r);
8393 void _echo_TestCall(pipes_struct *p, struct echo_TestCall *r);
8394 NTSTATUS _echo_TestCall2(pipes_struct *p, struct echo_TestCall2 *r);
8395 uint32 _echo_TestSleep(pipes_struct *p, struct echo_TestSleep *r);
8396 void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r);
8397 void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r);
8398 uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r);
8399
8400 /* The following definitions come from rpc_server/srv_eventlog.c  */
8401
8402 NTSTATUS rpc_eventlog2_init(void);
8403 void eventlog2_get_pipe_fns(struct api_struct **fns, int *n_fns);
8404
8405 /* The following definitions come from rpc_server/srv_eventlog_lib.c  */
8406
8407 TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
8408 char *elog_tdbname(TALLOC_CTX *ctx, const char *name );
8409 int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention );
8410 bool prune_eventlog( TDB_CONTEXT * tdb );
8411 bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed );
8412 ELOG_TDB *elog_open_tdb( char *logname, bool force_clear );
8413 int elog_close_tdb( ELOG_TDB *etdb, bool force_close );
8414 int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee );
8415 void fixup_eventlog_entry( Eventlog_entry * ee );
8416 bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor );
8417
8418 /* The following definitions come from rpc_server/srv_eventlog_nt.c  */
8419
8420 NTSTATUS _eventlog_OpenEventLogW(pipes_struct *p,
8421                                  struct eventlog_OpenEventLogW *r);
8422 NTSTATUS _eventlog_ClearEventLogW(pipes_struct *p,
8423                                   struct eventlog_ClearEventLogW *r);
8424 NTSTATUS _eventlog_CloseEventLog( pipes_struct * p, struct eventlog_CloseEventLog *r );
8425 NTSTATUS _eventlog_read_eventlog( pipes_struct * p,
8426                                 EVENTLOG_Q_READ_EVENTLOG * q_u,
8427                                 EVENTLOG_R_READ_EVENTLOG * r_u );
8428 NTSTATUS _eventlog_GetOldestRecord(pipes_struct *p,
8429                                    struct eventlog_GetOldestRecord *r);
8430 NTSTATUS _eventlog_GetNumRecords(pipes_struct *p,
8431                                  struct eventlog_GetNumRecords *r);
8432 NTSTATUS _eventlog_BackupEventLogW(pipes_struct *p, struct eventlog_BackupEventLogW *r);
8433 NTSTATUS _eventlog_DeregisterEventSource(pipes_struct *p, struct eventlog_DeregisterEventSource *r);
8434 NTSTATUS _eventlog_ChangeNotify(pipes_struct *p, struct eventlog_ChangeNotify *r);
8435 NTSTATUS _eventlog_RegisterEventSourceW(pipes_struct *p, struct eventlog_RegisterEventSourceW *r);
8436 NTSTATUS _eventlog_OpenBackupEventLogW(pipes_struct *p, struct eventlog_OpenBackupEventLogW *r);
8437 NTSTATUS _eventlog_ReadEventLogW(pipes_struct *p, struct eventlog_ReadEventLogW *r);
8438 NTSTATUS _eventlog_ReportEventW(pipes_struct *p, struct eventlog_ReportEventW *r);
8439 NTSTATUS _eventlog_ClearEventLogA(pipes_struct *p, struct eventlog_ClearEventLogA *r);
8440 NTSTATUS _eventlog_BackupEventLogA(pipes_struct *p, struct eventlog_BackupEventLogA *r);
8441 NTSTATUS _eventlog_OpenEventLogA(pipes_struct *p, struct eventlog_OpenEventLogA *r);
8442 NTSTATUS _eventlog_RegisterEventSourceA(pipes_struct *p, struct eventlog_RegisterEventSourceA *r);
8443 NTSTATUS _eventlog_OpenBackupEventLogA(pipes_struct *p, struct eventlog_OpenBackupEventLogA *r);
8444 NTSTATUS _eventlog_ReadEventLogA(pipes_struct *p, struct eventlog_ReadEventLogA *r);
8445 NTSTATUS _eventlog_ReportEventA(pipes_struct *p, struct eventlog_ReportEventA *r);
8446 NTSTATUS _eventlog_RegisterClusterSvc(pipes_struct *p, struct eventlog_RegisterClusterSvc *r);
8447 NTSTATUS _eventlog_DeregisterClusterSvc(pipes_struct *p, struct eventlog_DeregisterClusterSvc *r);
8448 NTSTATUS _eventlog_WriteClusterEvents(pipes_struct *p, struct eventlog_WriteClusterEvents *r);
8449 NTSTATUS _eventlog_GetLogIntormation(pipes_struct *p, struct eventlog_GetLogIntormation *r);
8450 NTSTATUS _eventlog_FlushEventLog(pipes_struct *p, struct eventlog_FlushEventLog *r);
8451
8452 /* The following definitions come from rpc_server/srv_initshutdown_nt.c  */
8453
8454 WERROR _initshutdown_Init(pipes_struct *p, struct initshutdown_Init *r);
8455 WERROR _initshutdown_InitEx(pipes_struct *p, struct initshutdown_InitEx *r);
8456 WERROR _initshutdown_Abort(pipes_struct *p, struct initshutdown_Abort *r);
8457
8458 /* The following definitions come from rpc_server/srv_lsa_hnd.c  */
8459
8460 bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name);
8461 bool create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr);
8462 bool find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p);
8463 bool close_policy_hnd(pipes_struct *p, POLICY_HND *hnd);
8464 void close_policy_by_pipe(pipes_struct *p);
8465 bool pipe_access_check(pipes_struct *p);
8466
8467 /* The following definitions come from rpc_server/srv_lsa_nt.c  */
8468
8469 NTSTATUS _lsa_OpenPolicy2(pipes_struct *p,
8470                           struct lsa_OpenPolicy2 *r);
8471 NTSTATUS _lsa_OpenPolicy(pipes_struct *p,
8472                          struct lsa_OpenPolicy *r);
8473 NTSTATUS _lsa_EnumTrustDom(pipes_struct *p,
8474                            struct lsa_EnumTrustDom *r);
8475 NTSTATUS _lsa_QueryInfoPolicy(pipes_struct *p,
8476                               struct lsa_QueryInfoPolicy *r);
8477 NTSTATUS _lsa_LookupSids(pipes_struct *p,
8478                          struct lsa_LookupSids *r);
8479 NTSTATUS _lsa_LookupSids2(pipes_struct *p,
8480                           struct lsa_LookupSids2 *r);
8481 NTSTATUS _lsa_LookupSids3(pipes_struct *p,
8482                           struct lsa_LookupSids3 *r);
8483 NTSTATUS _lsa_LookupNames(pipes_struct *p,
8484                           struct lsa_LookupNames *r);
8485 NTSTATUS _lsa_LookupNames2(pipes_struct *p,
8486                            struct lsa_LookupNames2 *r);
8487 NTSTATUS _lsa_LookupNames3(pipes_struct *p,
8488                            struct lsa_LookupNames3 *r);
8489 NTSTATUS _lsa_LookupNames4(pipes_struct *p,
8490                            struct lsa_LookupNames4 *r);
8491 NTSTATUS _lsa_Close(pipes_struct *p, struct lsa_Close *r);
8492 NTSTATUS _lsa_OpenSecret(pipes_struct *p, struct lsa_OpenSecret *r);
8493 NTSTATUS _lsa_OpenTrustedDomain(pipes_struct *p, struct lsa_OpenTrustedDomain *r);
8494 NTSTATUS _lsa_CreateTrustedDomain(pipes_struct *p, struct lsa_CreateTrustedDomain *r);
8495 NTSTATUS _lsa_CreateSecret(pipes_struct *p, struct lsa_CreateSecret *r);
8496 NTSTATUS _lsa_SetSecret(pipes_struct *p, struct lsa_SetSecret *r);
8497 NTSTATUS _lsa_DeleteObject(pipes_struct *p,
8498                            struct lsa_DeleteObject *r);
8499 NTSTATUS _lsa_EnumPrivs(pipes_struct *p,
8500                         struct lsa_EnumPrivs *r);
8501 NTSTATUS _lsa_LookupPrivDisplayName(pipes_struct *p,
8502                                     struct lsa_LookupPrivDisplayName *r);
8503 NTSTATUS _lsa_EnumAccounts(pipes_struct *p,
8504                            struct lsa_EnumAccounts *r);
8505 NTSTATUS _lsa_GetUserName(pipes_struct *p,
8506                           struct lsa_GetUserName *r);
8507 NTSTATUS _lsa_CreateAccount(pipes_struct *p,
8508                             struct lsa_CreateAccount *r);
8509 NTSTATUS _lsa_OpenAccount(pipes_struct *p,
8510                           struct lsa_OpenAccount *r);
8511 NTSTATUS _lsa_EnumPrivsAccount(pipes_struct *p,
8512                                struct lsa_EnumPrivsAccount *r);
8513 NTSTATUS _lsa_GetSystemAccessAccount(pipes_struct *p,
8514                                      struct lsa_GetSystemAccessAccount *r);
8515 NTSTATUS _lsa_SetSystemAccessAccount(pipes_struct *p,
8516                                      struct lsa_SetSystemAccessAccount *r);
8517 NTSTATUS _lsa_AddPrivilegesToAccount(pipes_struct *p,
8518                                      struct lsa_AddPrivilegesToAccount *r);
8519 NTSTATUS _lsa_RemovePrivilegesFromAccount(pipes_struct *p,
8520                                           struct lsa_RemovePrivilegesFromAccount *r);
8521 NTSTATUS _lsa_QuerySecurity(pipes_struct *p,
8522                             struct lsa_QuerySecurity *r);
8523 NTSTATUS _lsa_AddAccountRights(pipes_struct *p,
8524                                struct lsa_AddAccountRights *r);
8525 NTSTATUS _lsa_RemoveAccountRights(pipes_struct *p,
8526                                   struct lsa_RemoveAccountRights *r);
8527 NTSTATUS _lsa_EnumAccountRights(pipes_struct *p,
8528                                 struct lsa_EnumAccountRights *r);
8529 NTSTATUS _lsa_LookupPrivValue(pipes_struct *p,
8530                               struct lsa_LookupPrivValue *r);
8531 NTSTATUS _lsa_Delete(pipes_struct *p, struct lsa_Delete *r);
8532 NTSTATUS _lsa_SetSecObj(pipes_struct *p, struct lsa_SetSecObj *r);
8533 NTSTATUS _lsa_ChangePassword(pipes_struct *p, struct lsa_ChangePassword *r);
8534 NTSTATUS _lsa_SetInfoPolicy(pipes_struct *p, struct lsa_SetInfoPolicy *r);
8535 NTSTATUS _lsa_ClearAuditLog(pipes_struct *p, struct lsa_ClearAuditLog *r);
8536 NTSTATUS _lsa_GetQuotasForAccount(pipes_struct *p, struct lsa_GetQuotasForAccount *r);
8537 NTSTATUS _lsa_SetQuotasForAccount(pipes_struct *p, struct lsa_SetQuotasForAccount *r);
8538 NTSTATUS _lsa_QueryTrustedDomainInfo(pipes_struct *p, struct lsa_QueryTrustedDomainInfo *r);
8539 NTSTATUS _lsa_SetInformationTrustedDomain(pipes_struct *p, struct lsa_SetInformationTrustedDomain *r);
8540 NTSTATUS _lsa_QuerySecret(pipes_struct *p, struct lsa_QuerySecret *r);
8541 NTSTATUS _lsa_LookupPrivName(pipes_struct *p, struct lsa_LookupPrivName *r);
8542 NTSTATUS _lsa_EnumAccountsWithUserRight(pipes_struct *p, struct lsa_EnumAccountsWithUserRight *r);
8543 NTSTATUS _lsa_QueryTrustedDomainInfoBySid(pipes_struct *p, struct lsa_QueryTrustedDomainInfoBySid *r);
8544 NTSTATUS _lsa_SetTrustedDomainInfo(pipes_struct *p, struct lsa_SetTrustedDomainInfo *r);
8545 NTSTATUS _lsa_DeleteTrustedDomain(pipes_struct *p, struct lsa_DeleteTrustedDomain *r);
8546 NTSTATUS _lsa_StorePrivateData(pipes_struct *p, struct lsa_StorePrivateData *r);
8547 NTSTATUS _lsa_RetrievePrivateData(pipes_struct *p, struct lsa_RetrievePrivateData *r);
8548 NTSTATUS _lsa_QueryInfoPolicy2(pipes_struct *p, struct lsa_QueryInfoPolicy2 *r);
8549 NTSTATUS _lsa_SetInfoPolicy2(pipes_struct *p, struct lsa_SetInfoPolicy2 *r);
8550 NTSTATUS _lsa_QueryTrustedDomainInfoByName(pipes_struct *p, struct lsa_QueryTrustedDomainInfoByName *r);
8551 NTSTATUS _lsa_SetTrustedDomainInfoByName(pipes_struct *p, struct lsa_SetTrustedDomainInfoByName *r);
8552 NTSTATUS _lsa_EnumTrustedDomainsEx(pipes_struct *p, struct lsa_EnumTrustedDomainsEx *r);
8553 NTSTATUS _lsa_CreateTrustedDomainEx(pipes_struct *p, struct lsa_CreateTrustedDomainEx *r);
8554 NTSTATUS _lsa_CloseTrustedDomainEx(pipes_struct *p, struct lsa_CloseTrustedDomainEx *r);
8555 NTSTATUS _lsa_QueryDomainInformationPolicy(pipes_struct *p, struct lsa_QueryDomainInformationPolicy *r);
8556 NTSTATUS _lsa_SetDomainInformationPolicy(pipes_struct *p, struct lsa_SetDomainInformationPolicy *r);
8557 NTSTATUS _lsa_OpenTrustedDomainByName(pipes_struct *p, struct lsa_OpenTrustedDomainByName *r);
8558 NTSTATUS _lsa_TestCall(pipes_struct *p, struct lsa_TestCall *r);
8559 NTSTATUS _lsa_CreateTrustedDomainEx2(pipes_struct *p, struct lsa_CreateTrustedDomainEx2 *r);
8560 NTSTATUS _lsa_CREDRWRITE(pipes_struct *p, struct lsa_CREDRWRITE *r);
8561 NTSTATUS _lsa_CREDRREAD(pipes_struct *p, struct lsa_CREDRREAD *r);
8562 NTSTATUS _lsa_CREDRENUMERATE(pipes_struct *p, struct lsa_CREDRENUMERATE *r);
8563 NTSTATUS _lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
8564 NTSTATUS _lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p, struct lsa_CREDRREADDOMAINCREDENTIALS *r);
8565 NTSTATUS _lsa_CREDRDELETE(pipes_struct *p, struct lsa_CREDRDELETE *r);
8566 NTSTATUS _lsa_CREDRGETTARGETINFO(pipes_struct *p, struct lsa_CREDRGETTARGETINFO *r);
8567 NTSTATUS _lsa_CREDRPROFILELOADED(pipes_struct *p, struct lsa_CREDRPROFILELOADED *r);
8568 NTSTATUS _lsa_CREDRGETSESSIONTYPES(pipes_struct *p, struct lsa_CREDRGETSESSIONTYPES *r);
8569 NTSTATUS _lsa_LSARREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARREGISTERAUDITEVENT *r);
8570 NTSTATUS _lsa_LSARGENAUDITEVENT(pipes_struct *p, struct lsa_LSARGENAUDITEVENT *r);
8571 NTSTATUS _lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARUNREGISTERAUDITEVENT *r);
8572 NTSTATUS _lsa_lsaRQueryForestTrustInformation(pipes_struct *p, struct lsa_lsaRQueryForestTrustInformation *r);
8573 NTSTATUS _lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p, struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
8574 NTSTATUS _lsa_CREDRRENAME(pipes_struct *p, struct lsa_CREDRRENAME *r);
8575 NTSTATUS _lsa_LSAROPENPOLICYSCE(pipes_struct *p, struct lsa_LSAROPENPOLICYSCE *r);
8576 NTSTATUS _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
8577 NTSTATUS _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
8578 NTSTATUS _lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p, struct lsa_LSARADTREPORTSECURITYEVENT *r);
8579
8580 /* The following definitions come from rpc_server/srv_netlog_nt.c  */
8581
8582 WERROR _netr_LogonControl(pipes_struct *p,
8583                           struct netr_LogonControl *r);
8584 WERROR _netr_LogonControl2(pipes_struct *p,
8585                            struct netr_LogonControl2 *r);
8586 WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
8587                                          struct netr_NetrEnumerateTrustedDomains *r);
8588 NTSTATUS _netr_ServerReqChallenge(pipes_struct *p,
8589                                   struct netr_ServerReqChallenge *r);
8590 NTSTATUS _netr_ServerAuthenticate(pipes_struct *p,
8591                                   struct netr_ServerAuthenticate *r);
8592 NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p,
8593                                    struct netr_ServerAuthenticate2 *r);
8594 NTSTATUS _netr_ServerPasswordSet(pipes_struct *p,
8595                                  struct netr_ServerPasswordSet *r);
8596 NTSTATUS _netr_LogonSamLogoff(pipes_struct *p,
8597                               struct netr_LogonSamLogoff *r);
8598 NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
8599                              struct netr_LogonSamLogon *r);
8600 NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p,
8601                                struct netr_LogonSamLogonEx *r);
8602 WERROR _netr_LogonUasLogon(pipes_struct *p,
8603                            struct netr_LogonUasLogon *r);
8604 WERROR _netr_LogonUasLogoff(pipes_struct *p,
8605                             struct netr_LogonUasLogoff *r);
8606 NTSTATUS _netr_DatabaseDeltas(pipes_struct *p,
8607                               struct netr_DatabaseDeltas *r);
8608 NTSTATUS _netr_DatabaseSync(pipes_struct *p,
8609                             struct netr_DatabaseSync *r);
8610 NTSTATUS _netr_AccountDeltas(pipes_struct *p,
8611                              struct netr_AccountDeltas *r);
8612 NTSTATUS _netr_AccountSync(pipes_struct *p,
8613                            struct netr_AccountSync *r);
8614 WERROR _netr_GetDcName(pipes_struct *p,
8615                        struct netr_GetDcName *r);
8616 WERROR _netr_GetAnyDCName(pipes_struct *p,
8617                           struct netr_GetAnyDCName *r);
8618 NTSTATUS _netr_DatabaseSync2(pipes_struct *p,
8619                              struct netr_DatabaseSync2 *r);
8620 NTSTATUS _netr_DatabaseRedo(pipes_struct *p,
8621                             struct netr_DatabaseRedo *r);
8622 WERROR _netr_LogonControl2Ex(pipes_struct *p,
8623                              struct netr_LogonControl2Ex *r);
8624 WERROR _netr_DsRGetDCName(pipes_struct *p,
8625                           struct netr_DsRGetDCName *r);
8626 WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p,
8627                                     struct netr_NETRLOGONDUMMYROUTINE1 *r);
8628 WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p,
8629                                      struct netr_NETRLOGONSETSERVICEBITS *r);
8630 WERROR _netr_LogonGetTrustRid(pipes_struct *p,
8631                               struct netr_LogonGetTrustRid *r);
8632 WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p,
8633                                           struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
8634 WERROR _netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p,
8635                                           struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
8636 NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
8637                                    struct netr_ServerAuthenticate3 *r);
8638 WERROR _netr_DsRGetDCNameEx(pipes_struct *p,
8639                             struct netr_DsRGetDCNameEx *r);
8640 WERROR _netr_DsRGetSiteName(pipes_struct *p,
8641                             struct netr_DsRGetSiteName *r);
8642 NTSTATUS _netr_LogonGetDomainInfo(pipes_struct *p,
8643                                   struct netr_LogonGetDomainInfo *r);
8644 NTSTATUS _netr_ServerPasswordSet2(pipes_struct *p,
8645                                   struct netr_ServerPasswordSet2 *r);
8646 WERROR _netr_ServerPasswordGet(pipes_struct *p,
8647                                struct netr_ServerPasswordGet *r);
8648 WERROR _netr_NETRLOGONSENDTOSAM(pipes_struct *p,
8649                                 struct netr_NETRLOGONSENDTOSAM *r);
8650 WERROR _netr_DsRAddressToSitenamesW(pipes_struct *p,
8651                                     struct netr_DsRAddressToSitenamesW *r);
8652 WERROR _netr_DsRGetDCNameEx2(pipes_struct *p,
8653                              struct netr_DsRGetDCNameEx2 *r);
8654 WERROR _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p,
8655                                                  struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
8656 WERROR _netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p,
8657                                            struct netr_NetrEnumerateTrustedDomainsEx *r);
8658 WERROR _netr_DsRAddressToSitenamesExW(pipes_struct *p,
8659                                       struct netr_DsRAddressToSitenamesExW *r);
8660 WERROR _netr_DsrGetDcSiteCoverageW(pipes_struct *p,
8661                                    struct netr_DsrGetDcSiteCoverageW *r);
8662 WERROR _netr_DsrEnumerateDomainTrusts(pipes_struct *p,
8663                                       struct netr_DsrEnumerateDomainTrusts *r);
8664 WERROR _netr_DsrDeregisterDNSHostRecords(pipes_struct *p,
8665                                          struct netr_DsrDeregisterDNSHostRecords *r);
8666 NTSTATUS _netr_ServerTrustPasswordsGet(pipes_struct *p,
8667                                        struct netr_ServerTrustPasswordsGet *r);
8668 WERROR _netr_DsRGetForestTrustInformation(pipes_struct *p,
8669                                           struct netr_DsRGetForestTrustInformation *r);
8670 WERROR _netr_GetForestTrustInformation(pipes_struct *p,
8671                                        struct netr_GetForestTrustInformation *r);
8672 NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p,
8673                                       struct netr_LogonSamLogonWithFlags *r);
8674 WERROR _netr_NETRSERVERGETTRUSTINFO(pipes_struct *p,
8675                                     struct netr_NETRSERVERGETTRUSTINFO *r);
8676
8677 /* The following definitions come from rpc_server/srv_ntsvcs.c  */
8678
8679 void ntsvcs2_get_pipe_fns( struct api_struct **fns, int *n_fns );
8680 NTSTATUS rpc_ntsvcs2_init(void);
8681
8682 /* The following definitions come from rpc_server/srv_ntsvcs_nt.c  */
8683
8684 WERROR _PNP_GetVersion(pipes_struct *p,
8685                        struct PNP_GetVersion *r);
8686 WERROR _PNP_GetDeviceListSize(pipes_struct *p,
8687                               struct PNP_GetDeviceListSize *r);
8688 WERROR _ntsvcs_get_device_list( pipes_struct *p, NTSVCS_Q_GET_DEVICE_LIST *q_u, NTSVCS_R_GET_DEVICE_LIST *r_u );
8689 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 );
8690 WERROR _PNP_ValidateDeviceInstance(pipes_struct *p,
8691                                    struct PNP_ValidateDeviceInstance *r);
8692 WERROR _PNP_GetHwProfInfo(pipes_struct *p,
8693                           struct PNP_GetHwProfInfo *r);
8694 WERROR _PNP_HwProfFlags(pipes_struct *p,
8695                         struct PNP_HwProfFlags *r);
8696 WERROR _PNP_Disconnect(pipes_struct *p,
8697                        struct PNP_Disconnect *r);
8698 WERROR _PNP_Connect(pipes_struct *p,
8699                     struct PNP_Connect *r);
8700 WERROR _PNP_GetGlobalState(pipes_struct *p,
8701                            struct PNP_GetGlobalState *r);
8702 WERROR _PNP_InitDetection(pipes_struct *p,
8703                           struct PNP_InitDetection *r);
8704 WERROR _PNP_ReportLogOn(pipes_struct *p,
8705                         struct PNP_ReportLogOn *r);
8706 WERROR _PNP_GetRootDeviceInstance(pipes_struct *p,
8707                                   struct PNP_GetRootDeviceInstance *r);
8708 WERROR _PNP_GetRelatedDeviceInstance(pipes_struct *p,
8709                                      struct PNP_GetRelatedDeviceInstance *r);
8710 WERROR _PNP_EnumerateSubKeys(pipes_struct *p,
8711                              struct PNP_EnumerateSubKeys *r);
8712 WERROR _PNP_GetDeviceList(pipes_struct *p,
8713                           struct PNP_GetDeviceList *r);
8714 WERROR _PNP_GetDepth(pipes_struct *p,
8715                      struct PNP_GetDepth *r);
8716 WERROR _PNP_GetDeviceRegProp(pipes_struct *p,
8717                              struct PNP_GetDeviceRegProp *r);
8718 WERROR _PNP_SetDeviceRegProp(pipes_struct *p,
8719                              struct PNP_SetDeviceRegProp *r);
8720 WERROR _PNP_GetClassInstance(pipes_struct *p,
8721                              struct PNP_GetClassInstance *r);
8722 WERROR _PNP_CreateKey(pipes_struct *p,
8723                       struct PNP_CreateKey *r);
8724 WERROR _PNP_DeleteRegistryKey(pipes_struct *p,
8725                               struct PNP_DeleteRegistryKey *r);
8726 WERROR _PNP_GetClassCount(pipes_struct *p,
8727                           struct PNP_GetClassCount *r);
8728 WERROR _PNP_GetClassName(pipes_struct *p,
8729                          struct PNP_GetClassName *r);
8730 WERROR _PNP_DeleteClassKey(pipes_struct *p,
8731                            struct PNP_DeleteClassKey *r);
8732 WERROR _PNP_GetInterfaceDeviceAlias(pipes_struct *p,
8733                                     struct PNP_GetInterfaceDeviceAlias *r);
8734 WERROR _PNP_GetInterfaceDeviceList(pipes_struct *p,
8735                                    struct PNP_GetInterfaceDeviceList *r);
8736 WERROR _PNP_GetInterfaceDeviceListSize(pipes_struct *p,
8737                                        struct PNP_GetInterfaceDeviceListSize *r);
8738 WERROR _PNP_RegisterDeviceClassAssociation(pipes_struct *p,
8739                                            struct PNP_RegisterDeviceClassAssociation *r);
8740 WERROR _PNP_UnregisterDeviceClassAssociation(pipes_struct *p,
8741                                              struct PNP_UnregisterDeviceClassAssociation *r);
8742 WERROR _PNP_GetClassRegProp(pipes_struct *p,
8743                             struct PNP_GetClassRegProp *r);
8744 WERROR _PNP_SetClassRegProp(pipes_struct *p,
8745                             struct PNP_SetClassRegProp *r);
8746 WERROR _PNP_CreateDevInst(pipes_struct *p,
8747                           struct PNP_CreateDevInst *r);
8748 WERROR _PNP_DeviceInstanceAction(pipes_struct *p,
8749                                  struct PNP_DeviceInstanceAction *r);
8750 WERROR _PNP_GetDeviceStatus(pipes_struct *p,
8751                             struct PNP_GetDeviceStatus *r);
8752 WERROR _PNP_SetDeviceProblem(pipes_struct *p,
8753                              struct PNP_SetDeviceProblem *r);
8754 WERROR _PNP_DisableDevInst(pipes_struct *p,
8755                            struct PNP_DisableDevInst *r);
8756 WERROR _PNP_UninstallDevInst(pipes_struct *p,
8757                              struct PNP_UninstallDevInst *r);
8758 WERROR _PNP_AddID(pipes_struct *p,
8759                   struct PNP_AddID *r);
8760 WERROR _PNP_RegisterDriver(pipes_struct *p,
8761                            struct PNP_RegisterDriver *r);
8762 WERROR _PNP_QueryRemove(pipes_struct *p,
8763                         struct PNP_QueryRemove *r);
8764 WERROR _PNP_RequestDeviceEject(pipes_struct *p,
8765                                struct PNP_RequestDeviceEject *r);
8766 WERROR _PNP_IsDockStationPresent(pipes_struct *p,
8767                                  struct PNP_IsDockStationPresent *r);
8768 WERROR _PNP_RequestEjectPC(pipes_struct *p,
8769                            struct PNP_RequestEjectPC *r);
8770 WERROR _PNP_AddEmptyLogConf(pipes_struct *p,
8771                             struct PNP_AddEmptyLogConf *r);
8772 WERROR _PNP_FreeLogConf(pipes_struct *p,
8773                         struct PNP_FreeLogConf *r);
8774 WERROR _PNP_GetFirstLogConf(pipes_struct *p,
8775                             struct PNP_GetFirstLogConf *r);
8776 WERROR _PNP_GetNextLogConf(pipes_struct *p,
8777                            struct PNP_GetNextLogConf *r);
8778 WERROR _PNP_GetLogConfPriority(pipes_struct *p,
8779                                struct PNP_GetLogConfPriority *r);
8780 WERROR _PNP_AddResDes(pipes_struct *p,
8781                       struct PNP_AddResDes *r);
8782 WERROR _PNP_FreeResDes(pipes_struct *p,
8783                        struct PNP_FreeResDes *r);
8784 WERROR _PNP_GetNextResDes(pipes_struct *p,
8785                           struct PNP_GetNextResDes *r);
8786 WERROR _PNP_GetResDesData(pipes_struct *p,
8787                           struct PNP_GetResDesData *r);
8788 WERROR _PNP_GetResDesDataSize(pipes_struct *p,
8789                               struct PNP_GetResDesDataSize *r);
8790 WERROR _PNP_ModifyResDes(pipes_struct *p,
8791                          struct PNP_ModifyResDes *r);
8792 WERROR _PNP_DetectResourceLimit(pipes_struct *p,
8793                                 struct PNP_DetectResourceLimit *r);
8794 WERROR _PNP_QueryResConfList(pipes_struct *p,
8795                              struct PNP_QueryResConfList *r);
8796 WERROR _PNP_SetHwProf(pipes_struct *p,
8797                       struct PNP_SetHwProf *r);
8798 WERROR _PNP_QueryArbitratorFreeData(pipes_struct *p,
8799                                     struct PNP_QueryArbitratorFreeData *r);
8800 WERROR _PNP_QueryArbitratorFreeSize(pipes_struct *p,
8801                                     struct PNP_QueryArbitratorFreeSize *r);
8802 WERROR _PNP_RunDetection(pipes_struct *p,
8803                          struct PNP_RunDetection *r);
8804 WERROR _PNP_RegisterNotification(pipes_struct *p,
8805                                  struct PNP_RegisterNotification *r);
8806 WERROR _PNP_UnregisterNotification(pipes_struct *p,
8807                                    struct PNP_UnregisterNotification *r);
8808 WERROR _PNP_GetCustomDevProp(pipes_struct *p,
8809                              struct PNP_GetCustomDevProp *r);
8810 WERROR _PNP_GetVersionInternal(pipes_struct *p,
8811                                struct PNP_GetVersionInternal *r);
8812 WERROR _PNP_GetBlockedDriverInfo(pipes_struct *p,
8813                                  struct PNP_GetBlockedDriverInfo *r);
8814 WERROR _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p,
8815                                             struct PNP_GetServerSideDeviceInstallFlags *r);
8816
8817 /* The following definitions come from rpc_server/srv_pipe.c  */
8818
8819 bool create_next_pdu(pipes_struct *p);
8820 bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p);
8821 bool setup_fault_pdu(pipes_struct *p, NTSTATUS status);
8822 bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p);
8823 bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
8824                     RPC_IFACE* transfer, uint32 context_id);
8825 NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
8826                                     const char *srv,
8827                                     const struct ndr_syntax_id *interface,
8828                                     const struct api_struct *cmds, int size);
8829 bool is_known_pipename(const char *cli_filename);
8830 bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
8831 bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
8832 bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
8833                                         uint32 *p_ss_padding_len, NTSTATUS *pstatus);
8834 bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len);
8835 struct current_user *get_current_user(struct current_user *user, pipes_struct *p);
8836 void free_pipe_rpc_context( PIPE_RPC_FNS *list );
8837 bool api_pipe_request(pipes_struct *p);
8838
8839 /* The following definitions come from rpc_server/srv_pipe_hnd.c  */
8840
8841 pipes_struct *get_first_internal_pipe(void);
8842 pipes_struct *get_next_internal_pipe(pipes_struct *p);
8843 void set_pipe_handle_offset(int max_open_files);
8844 void reset_chain_p(void);
8845 void init_rpc_pipe_hnd(void);
8846 smb_np_struct *open_rpc_pipe_p(const char *pipe_name, 
8847                               connection_struct *conn, uint16 vuid);
8848 ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n);
8849 ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
8850                 bool *is_data_outstanding);
8851 bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority);
8852 bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state);
8853 bool close_rpc_pipe_hnd(smb_np_struct *p);
8854 void pipe_close_conn(connection_struct *conn);
8855 smb_np_struct *get_rpc_pipe_p(uint16 pnum);
8856 smb_np_struct *get_rpc_pipe(int pnum);
8857 struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
8858                                               const char *client_address,
8859                                               struct auth_serversupplied_info *server_info,
8860                                               uint16_t vuid);
8861 ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
8862                                 bool *is_data_outstanding);
8863 ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n);
8864
8865 /* The following definitions come from rpc_server/srv_samr_nt.c  */
8866
8867 NTSTATUS _samr_Close(pipes_struct *p, struct samr_Close *r);
8868 NTSTATUS _samr_OpenDomain(pipes_struct *p,
8869                           struct samr_OpenDomain *r);
8870 NTSTATUS _samr_GetUserPwInfo(pipes_struct *p,
8871                              struct samr_GetUserPwInfo *r);
8872 NTSTATUS _samr_SetSecurity(pipes_struct *p,
8873                            struct samr_SetSecurity *r);
8874 NTSTATUS _samr_QuerySecurity(pipes_struct *p,
8875                              struct samr_QuerySecurity *r);
8876 NTSTATUS _samr_EnumDomainUsers(pipes_struct *p,
8877                                struct samr_EnumDomainUsers *r);
8878 NTSTATUS _samr_EnumDomainGroups(pipes_struct *p,
8879                                 struct samr_EnumDomainGroups *r);
8880 NTSTATUS _samr_EnumDomainAliases(pipes_struct *p,
8881                                  struct samr_EnumDomainAliases *r);
8882 NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
8883                                 struct samr_QueryDisplayInfo *r);
8884 NTSTATUS _samr_QueryDisplayInfo2(pipes_struct *p,
8885                                  struct samr_QueryDisplayInfo2 *r);
8886 NTSTATUS _samr_QueryDisplayInfo3(pipes_struct *p,
8887                                  struct samr_QueryDisplayInfo3 *r);
8888 NTSTATUS _samr_QueryAliasInfo(pipes_struct *p,
8889                               struct samr_QueryAliasInfo *r);
8890 NTSTATUS _samr_LookupNames(pipes_struct *p,
8891                            struct samr_LookupNames *r);
8892 NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p,
8893                                    struct samr_ChangePasswordUser2 *r);
8894 NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
8895                                    struct samr_ChangePasswordUser3 *r);
8896 NTSTATUS _samr_LookupRids(pipes_struct *p,
8897                           struct samr_LookupRids *r);
8898 NTSTATUS _samr_OpenUser(pipes_struct *p,
8899                         struct samr_OpenUser *r);
8900 NTSTATUS _samr_QueryUserInfo(pipes_struct *p,
8901                              struct samr_QueryUserInfo *r);
8902 NTSTATUS _samr_GetGroupsForUser(pipes_struct *p,
8903                                 struct samr_GetGroupsForUser *r);
8904 NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
8905                                struct samr_QueryDomainInfo *r);
8906 NTSTATUS _samr_CreateUser2(pipes_struct *p,
8907                            struct samr_CreateUser2 *r);
8908 NTSTATUS _samr_Connect(pipes_struct *p,
8909                        struct samr_Connect *r);
8910 NTSTATUS _samr_Connect2(pipes_struct *p,
8911                         struct samr_Connect2 *r);
8912 NTSTATUS _samr_Connect4(pipes_struct *p,
8913                         struct samr_Connect4 *r);
8914 NTSTATUS _samr_Connect5(pipes_struct *p,
8915                         struct samr_Connect5 *r);
8916 NTSTATUS _samr_LookupDomain(pipes_struct *p,
8917                             struct samr_LookupDomain *r);
8918 NTSTATUS _samr_EnumDomains(pipes_struct *p,
8919                            struct samr_EnumDomains *r);
8920 NTSTATUS _samr_OpenAlias(pipes_struct *p,
8921                          struct samr_OpenAlias *r);
8922 NTSTATUS _samr_SetUserInfo(pipes_struct *p,
8923                            struct samr_SetUserInfo *r);
8924 NTSTATUS _samr_SetUserInfo2(pipes_struct *p,
8925                             struct samr_SetUserInfo2 *r);
8926 NTSTATUS _samr_GetAliasMembership(pipes_struct *p,
8927                                   struct samr_GetAliasMembership *r);
8928 NTSTATUS _samr_GetMembersInAlias(pipes_struct *p,
8929                                  struct samr_GetMembersInAlias *r);
8930 NTSTATUS _samr_QueryGroupMember(pipes_struct *p,
8931                                 struct samr_QueryGroupMember *r);
8932 NTSTATUS _samr_AddAliasMember(pipes_struct *p,
8933                               struct samr_AddAliasMember *r);
8934 NTSTATUS _samr_DeleteAliasMember(pipes_struct *p,
8935                                  struct samr_DeleteAliasMember *r);
8936 NTSTATUS _samr_AddGroupMember(pipes_struct *p,
8937                               struct samr_AddGroupMember *r);
8938 NTSTATUS _samr_DeleteGroupMember(pipes_struct *p,
8939                                  struct samr_DeleteGroupMember *r);
8940 NTSTATUS _samr_DeleteUser(pipes_struct *p,
8941                           struct samr_DeleteUser *r);
8942 NTSTATUS _samr_DeleteDomainGroup(pipes_struct *p,
8943                                  struct samr_DeleteDomainGroup *r);
8944 NTSTATUS _samr_DeleteDomAlias(pipes_struct *p,
8945                               struct samr_DeleteDomAlias *r);
8946 NTSTATUS _samr_CreateDomainGroup(pipes_struct *p,
8947                                  struct samr_CreateDomainGroup *r);
8948 NTSTATUS _samr_CreateDomAlias(pipes_struct *p,
8949                               struct samr_CreateDomAlias *r);
8950 NTSTATUS _samr_QueryGroupInfo(pipes_struct *p,
8951                               struct samr_QueryGroupInfo *r);
8952 NTSTATUS _samr_SetGroupInfo(pipes_struct *p,
8953                             struct samr_SetGroupInfo *r);
8954 NTSTATUS _samr_SetAliasInfo(pipes_struct *p,
8955                             struct samr_SetAliasInfo *r);
8956 NTSTATUS _samr_GetDomPwInfo(pipes_struct *p,
8957                             struct samr_GetDomPwInfo *r);
8958 NTSTATUS _samr_OpenGroup(pipes_struct *p,
8959                          struct samr_OpenGroup *r);
8960 NTSTATUS _samr_RemoveMemberFromForeignDomain(pipes_struct *p,
8961                                              struct samr_RemoveMemberFromForeignDomain *r);
8962 NTSTATUS _samr_QueryDomainInfo2(pipes_struct *p,
8963                                 struct samr_QueryDomainInfo2 *r);
8964 NTSTATUS _samr_SetDomainInfo(pipes_struct *p,
8965                              struct samr_SetDomainInfo *r);
8966 NTSTATUS _samr_GetDisplayEnumerationIndex(pipes_struct *p,
8967                                           struct samr_GetDisplayEnumerationIndex *r);
8968 NTSTATUS _samr_GetDisplayEnumerationIndex2(pipes_struct *p,
8969                                            struct samr_GetDisplayEnumerationIndex2 *r);
8970 NTSTATUS _samr_Shutdown(pipes_struct *p,
8971                         struct samr_Shutdown *r);
8972 NTSTATUS _samr_CreateUser(pipes_struct *p,
8973                           struct samr_CreateUser *r);
8974 NTSTATUS _samr_SetMemberAttributesOfGroup(pipes_struct *p,
8975                                           struct samr_SetMemberAttributesOfGroup *r);
8976 NTSTATUS _samr_ChangePasswordUser(pipes_struct *p,
8977                                   struct samr_ChangePasswordUser *r);
8978 NTSTATUS _samr_TestPrivateFunctionsDomain(pipes_struct *p,
8979                                           struct samr_TestPrivateFunctionsDomain *r);
8980 NTSTATUS _samr_TestPrivateFunctionsUser(pipes_struct *p,
8981                                         struct samr_TestPrivateFunctionsUser *r);
8982 NTSTATUS _samr_QueryUserInfo2(pipes_struct *p,
8983                               struct samr_QueryUserInfo2 *r);
8984 NTSTATUS _samr_AddMultipleMembersToAlias(pipes_struct *p,
8985                                          struct samr_AddMultipleMembersToAlias *r);
8986 NTSTATUS _samr_RemoveMultipleMembersFromAlias(pipes_struct *p,
8987                                               struct samr_RemoveMultipleMembersFromAlias *r);
8988 NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
8989                                       struct samr_OemChangePasswordUser2 *r);
8990 NTSTATUS _samr_SetBootKeyInformation(pipes_struct *p,
8991                                      struct samr_SetBootKeyInformation *r);
8992 NTSTATUS _samr_GetBootKeyInformation(pipes_struct *p,
8993                                      struct samr_GetBootKeyInformation *r);
8994 NTSTATUS _samr_Connect3(pipes_struct *p,
8995                         struct samr_Connect3 *r);
8996 NTSTATUS _samr_RidToSid(pipes_struct *p,
8997                         struct samr_RidToSid *r);
8998 NTSTATUS _samr_SetDsrmPassword(pipes_struct *p,
8999                                struct samr_SetDsrmPassword *r);
9000 NTSTATUS _samr_ValidatePassword(pipes_struct *p,
9001                                 struct samr_ValidatePassword *r);
9002
9003 /* The following definitions come from rpc_server/srv_samr_util.c  */
9004
9005 void copy_id20_to_sam_passwd(struct samu *to,
9006                              struct samr_UserInfo20 *from);
9007 void copy_id21_to_sam_passwd(const char *log_prefix,
9008                              struct samu *to,
9009                              struct samr_UserInfo21 *from);
9010 void copy_id23_to_sam_passwd(struct samu *to,
9011                              struct samr_UserInfo23 *from);
9012 void copy_id25_to_sam_passwd(struct samu *to,
9013                              struct samr_UserInfo25 *from);
9014
9015 /* The following definitions come from rpc_server/srv_spoolss.c  */
9016
9017 void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns );
9018 NTSTATUS rpc_spoolss_init(void);
9019
9020 /* The following definitions come from rpc_server/srv_spoolss_nt.c  */
9021
9022 WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *sharename );
9023 void do_drv_upgrade_printer(struct messaging_context *msg,
9024                             void *private_data,
9025                             uint32_t msg_type,
9026                             struct server_id server_id,
9027                             DATA_BLOB *data);
9028 void update_monitored_printq_cache( void );
9029 void reset_all_printerdata(struct messaging_context *msg,
9030                            void *private_data,
9031                            uint32_t msg_type,
9032                            struct server_id server_id,
9033                            DATA_BLOB *data);
9034 WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u);
9035 WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u);
9036 bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
9037                                 NT_DEVICEMODE **pp_nt_devmode);
9038 WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u);
9039 WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u);
9040 WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u);
9041 WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u);
9042 WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
9043                                   uint32 type, uint8 *data, int real_len  );
9044 WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
9045 WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u);
9046 void spoolss_notify_server_name(int snum,
9047                                        SPOOL_NOTIFY_INFO_DATA *data,
9048                                        print_queue_struct *queue,
9049                                        NT_PRINTER_INFO_LEVEL *printer,
9050                                        TALLOC_CTX *mem_ctx);
9051 void spoolss_notify_printer_name(int snum,
9052                                         SPOOL_NOTIFY_INFO_DATA *data,
9053                                         print_queue_struct *queue,
9054                                         NT_PRINTER_INFO_LEVEL *printer,
9055                                         TALLOC_CTX *mem_ctx);
9056 void spoolss_notify_share_name(int snum,
9057                                       SPOOL_NOTIFY_INFO_DATA *data,
9058                                       print_queue_struct *queue,
9059                                       NT_PRINTER_INFO_LEVEL *printer,
9060                                       TALLOC_CTX *mem_ctx);
9061 void spoolss_notify_port_name(int snum,
9062                                      SPOOL_NOTIFY_INFO_DATA *data,
9063                                      print_queue_struct *queue,
9064                                      NT_PRINTER_INFO_LEVEL *printer,
9065                                      TALLOC_CTX *mem_ctx);
9066 void spoolss_notify_driver_name(int snum,
9067                                        SPOOL_NOTIFY_INFO_DATA *data,
9068                                        print_queue_struct *queue,
9069                                        NT_PRINTER_INFO_LEVEL *printer,
9070                                        TALLOC_CTX *mem_ctx);
9071 void spoolss_notify_comment(int snum,
9072                                    SPOOL_NOTIFY_INFO_DATA *data,
9073                                    print_queue_struct *queue,
9074                                    NT_PRINTER_INFO_LEVEL *printer,
9075                                    TALLOC_CTX *mem_ctx);
9076 void spoolss_notify_location(int snum,
9077                                     SPOOL_NOTIFY_INFO_DATA *data,
9078                                     print_queue_struct *queue,
9079                                     NT_PRINTER_INFO_LEVEL *printer,
9080                                     TALLOC_CTX *mem_ctx);
9081 void spoolss_notify_sepfile(int snum,
9082                                    SPOOL_NOTIFY_INFO_DATA *data,
9083                                    print_queue_struct *queue,
9084                                    NT_PRINTER_INFO_LEVEL *printer,
9085                                    TALLOC_CTX *mem_ctx);
9086 void spoolss_notify_print_processor(int snum,
9087                                            SPOOL_NOTIFY_INFO_DATA *data,
9088                                            print_queue_struct *queue,
9089                                            NT_PRINTER_INFO_LEVEL *printer,
9090                                            TALLOC_CTX *mem_ctx);
9091 void spoolss_notify_parameters(int snum,
9092                                       SPOOL_NOTIFY_INFO_DATA *data,
9093                                       print_queue_struct *queue,
9094                                       NT_PRINTER_INFO_LEVEL *printer,
9095                                       TALLOC_CTX *mem_ctx);
9096 void spoolss_notify_datatype(int snum,
9097                                     SPOOL_NOTIFY_INFO_DATA *data,
9098                                     print_queue_struct *queue,
9099                                     NT_PRINTER_INFO_LEVEL *printer,
9100                                     TALLOC_CTX *mem_ctx);
9101 void spoolss_notify_attributes(int snum,
9102                                       SPOOL_NOTIFY_INFO_DATA *data,
9103                                       print_queue_struct *queue,
9104                                       NT_PRINTER_INFO_LEVEL *printer,
9105                                       TALLOC_CTX *mem_ctx);
9106 void spoolss_notify_cjobs(int snum,
9107                                  SPOOL_NOTIFY_INFO_DATA *data,
9108                                  print_queue_struct *queue,
9109                                  NT_PRINTER_INFO_LEVEL *printer,
9110                                  TALLOC_CTX *mem_ctx);
9111 void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id);
9112 WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
9113 DEVICEMODE *construct_dev_mode(const char *servicename);
9114 WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
9115 WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
9116 WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u);
9117 WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u);
9118 WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u);
9119 WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u);
9120 WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u);
9121 WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u);
9122 WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u);
9123 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
9124 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
9125 WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
9126 WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u);
9127 WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u);
9128 WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u);
9129 WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u);
9130 WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u);
9131 WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
9132 WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u);
9133 WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u);
9134 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
9135 WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u);
9136 WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u);
9137 WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, SPOOL_R_ADDPRINTERDRIVER *r_u);
9138 WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, SPOOL_R_ADDPRINTERDRIVEREX *r_u);
9139 WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u);
9140 WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
9141 WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
9142 WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u);
9143 WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u);
9144 WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u);
9145 WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u);
9146 WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u);
9147 WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u);
9148 WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u);
9149 WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u);
9150 WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u);
9151 WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u);
9152 WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u);
9153 WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u);
9154 WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
9155 WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u);
9156 WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
9157 WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u);
9158 WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_XCVDATAPORT *r_u);
9159
9160 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
9161
9162 WERROR _srvsvc_NetFileEnum(pipes_struct *p,
9163                            struct srvsvc_NetFileEnum *r);
9164 WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p,
9165                              struct srvsvc_NetSrvGetInfo *r);
9166 WERROR _srvsvc_NetSrvSetInfo(pipes_struct *p,
9167                              struct srvsvc_NetSrvSetInfo *r);
9168 WERROR _srvsvc_NetConnEnum(pipes_struct *p,
9169                            struct srvsvc_NetConnEnum *r);
9170 WERROR _srvsvc_NetSessEnum(pipes_struct *p,
9171                            struct srvsvc_NetSessEnum *r);
9172 WERROR _srvsvc_NetSessDel(pipes_struct *p,
9173                           struct srvsvc_NetSessDel *r);
9174 WERROR _srvsvc_NetShareEnumAll(pipes_struct *p,
9175                                struct srvsvc_NetShareEnumAll *r);
9176 WERROR _srvsvc_NetShareEnum(pipes_struct *p,
9177                             struct srvsvc_NetShareEnum *r);
9178 WERROR _srvsvc_NetShareGetInfo(pipes_struct *p,
9179                                struct srvsvc_NetShareGetInfo *r);
9180 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
9181 WERROR _srvsvc_NetShareSetInfo(pipes_struct *p,
9182                                struct srvsvc_NetShareSetInfo *r);
9183 WERROR _srvsvc_NetShareAdd(pipes_struct *p,
9184                            struct srvsvc_NetShareAdd *r);
9185 WERROR _srvsvc_NetShareDel(pipes_struct *p,
9186                            struct srvsvc_NetShareDel *r);
9187 WERROR _srvsvc_NetShareDelSticky(pipes_struct *p,
9188                                  struct srvsvc_NetShareDelSticky *r);
9189 WERROR _srvsvc_NetRemoteTOD(pipes_struct *p,
9190                             struct srvsvc_NetRemoteTOD *r);
9191 WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
9192                                   struct srvsvc_NetGetFileSecurity *r);
9193 WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
9194                                   struct srvsvc_NetSetFileSecurity *r);
9195 WERROR _srvsvc_NetDiskEnum(pipes_struct *p,
9196                            struct srvsvc_NetDiskEnum *r);
9197 WERROR _srvsvc_NetNameValidate(pipes_struct *p,
9198                                struct srvsvc_NetNameValidate *r);
9199 WERROR _srvsvc_NetFileClose(pipes_struct *p, struct srvsvc_NetFileClose *r);
9200 WERROR _srvsvc_NetCharDevEnum(pipes_struct *p, struct srvsvc_NetCharDevEnum *r);
9201 WERROR _srvsvc_NetCharDevGetInfo(pipes_struct *p, struct srvsvc_NetCharDevGetInfo *r);
9202 WERROR _srvsvc_NetCharDevControl(pipes_struct *p, struct srvsvc_NetCharDevControl *r);
9203 WERROR _srvsvc_NetCharDevQEnum(pipes_struct *p, struct srvsvc_NetCharDevQEnum *r);
9204 WERROR _srvsvc_NetCharDevQGetInfo(pipes_struct *p, struct srvsvc_NetCharDevQGetInfo *r);
9205 WERROR _srvsvc_NetCharDevQSetInfo(pipes_struct *p, struct srvsvc_NetCharDevQSetInfo *r);
9206 WERROR _srvsvc_NetCharDevQPurge(pipes_struct *p, struct srvsvc_NetCharDevQPurge *r);
9207 WERROR _srvsvc_NetCharDevQPurgeSelf(pipes_struct *p, struct srvsvc_NetCharDevQPurgeSelf *r);
9208 WERROR _srvsvc_NetFileGetInfo(pipes_struct *p, struct srvsvc_NetFileGetInfo *r);
9209 WERROR _srvsvc_NetShareCheck(pipes_struct *p, struct srvsvc_NetShareCheck *r);
9210 WERROR _srvsvc_NetServerStatisticsGet(pipes_struct *p, struct srvsvc_NetServerStatisticsGet *r);
9211 WERROR _srvsvc_NetTransportAdd(pipes_struct *p, struct srvsvc_NetTransportAdd *r);
9212 WERROR _srvsvc_NetTransportEnum(pipes_struct *p, struct srvsvc_NetTransportEnum *r);
9213 WERROR _srvsvc_NetTransportDel(pipes_struct *p, struct srvsvc_NetTransportDel *r);
9214 WERROR _srvsvc_NetSetServiceBits(pipes_struct *p, struct srvsvc_NetSetServiceBits *r);
9215 WERROR _srvsvc_NetPathType(pipes_struct *p, struct srvsvc_NetPathType *r);
9216 WERROR _srvsvc_NetPathCanonicalize(pipes_struct *p, struct srvsvc_NetPathCanonicalize *r);
9217 WERROR _srvsvc_NetPathCompare(pipes_struct *p, struct srvsvc_NetPathCompare *r);
9218 WERROR _srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p, struct srvsvc_NETRPRNAMECANONICALIZE *r);
9219 WERROR _srvsvc_NetPRNameCompare(pipes_struct *p, struct srvsvc_NetPRNameCompare *r);
9220 WERROR _srvsvc_NetShareDelStart(pipes_struct *p, struct srvsvc_NetShareDelStart *r);
9221 WERROR _srvsvc_NetShareDelCommit(pipes_struct *p, struct srvsvc_NetShareDelCommit *r);
9222 WERROR _srvsvc_NetServerTransportAddEx(pipes_struct *p, struct srvsvc_NetServerTransportAddEx *r);
9223 WERROR _srvsvc_NetServerSetServiceBitsEx(pipes_struct *p, struct srvsvc_NetServerSetServiceBitsEx *r);
9224 WERROR _srvsvc_NETRDFSGETVERSION(pipes_struct *p, struct srvsvc_NETRDFSGETVERSION *r);
9225 WERROR _srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p, struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
9226 WERROR _srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p, struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
9227 WERROR _srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
9228 WERROR _srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p, struct srvsvc_NETRDFSSETSERVERINFO *r);
9229 WERROR _srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p, struct srvsvc_NETRDFSCREATEEXITPOINT *r);
9230 WERROR _srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p, struct srvsvc_NETRDFSDELETEEXITPOINT *r);
9231 WERROR _srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p, struct srvsvc_NETRDFSMODIFYPREFIX *r);
9232 WERROR _srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p, struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
9233 WERROR _srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
9234 WERROR _srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p, struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
9235
9236 /* The following definitions come from rpc_server/srv_svcctl.c  */
9237
9238 void svcctl2_get_pipe_fns( struct api_struct **fns, int *n_fns );
9239 NTSTATUS rpc_svcctl2_init(void);
9240
9241 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
9242
9243 bool init_service_op_table( void );
9244 WERROR _svcctl_OpenSCManagerW(pipes_struct *p,
9245                               struct svcctl_OpenSCManagerW *r);
9246 WERROR _svcctl_OpenServiceW(pipes_struct *p,
9247                             struct svcctl_OpenServiceW *r);
9248 WERROR _svcctl_CloseServiceHandle(pipes_struct *p, struct svcctl_CloseServiceHandle *r);
9249 WERROR _svcctl_GetServiceDisplayNameW(pipes_struct *p,
9250                                       struct svcctl_GetServiceDisplayNameW *r);
9251 WERROR _svcctl_QueryServiceStatus(pipes_struct *p,
9252                                   struct svcctl_QueryServiceStatus *r);
9253 WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, SVCCTL_R_ENUM_SERVICES_STATUS *r_u);
9254 WERROR _svcctl_StartServiceW(pipes_struct *p,
9255                              struct svcctl_StartServiceW *r);
9256 WERROR _svcctl_ControlService(pipes_struct *p,
9257                               struct svcctl_ControlService *r);
9258 WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
9259                                       struct svcctl_EnumDependentServicesW *r);
9260 WERROR _svcctl_query_service_status_ex( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u );
9261 WERROR _svcctl_query_service_config( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u );
9262 WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u );
9263 WERROR _svcctl_LockServiceDatabase(pipes_struct *p,
9264                                    struct svcctl_LockServiceDatabase *r);
9265 WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p,
9266                                      struct svcctl_UnlockServiceDatabase *r);
9267 WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
9268                                           struct svcctl_QueryServiceObjectSecurity *r);
9269 WERROR _svcctl_SetServiceObjectSecurity(pipes_struct *p,
9270                                         struct svcctl_SetServiceObjectSecurity *r);
9271 WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r);
9272 WERROR _svcctl_SetServiceStatus(pipes_struct *p, struct svcctl_SetServiceStatus *r);
9273 WERROR _svcctl_NotifyBootConfigStatus(pipes_struct *p, struct svcctl_NotifyBootConfigStatus *r);
9274 WERROR _svcctl_SCSetServiceBitsW(pipes_struct *p, struct svcctl_SCSetServiceBitsW *r);
9275 WERROR _svcctl_ChangeServiceConfigW(pipes_struct *p, struct svcctl_ChangeServiceConfigW *r);
9276 WERROR _svcctl_CreateServiceW(pipes_struct *p, struct svcctl_CreateServiceW *r);
9277 WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesStatusW *r);
9278 WERROR _svcctl_QueryServiceConfigW(pipes_struct *p, struct svcctl_QueryServiceConfigW *r);
9279 WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct svcctl_QueryServiceLockStatusW *r);
9280 WERROR _svcctl_GetServiceKeyNameW(pipes_struct *p, struct svcctl_GetServiceKeyNameW *r);
9281 WERROR _svcctl_SCSetServiceBitsA(pipes_struct *p, struct svcctl_SCSetServiceBitsA *r);
9282 WERROR _svcctl_ChangeServiceConfigA(pipes_struct *p, struct svcctl_ChangeServiceConfigA *r);
9283 WERROR _svcctl_CreateServiceA(pipes_struct *p, struct svcctl_CreateServiceA *r);
9284 WERROR _svcctl_EnumDependentServicesA(pipes_struct *p, struct svcctl_EnumDependentServicesA *r);
9285 WERROR _svcctl_EnumServicesStatusA(pipes_struct *p, struct svcctl_EnumServicesStatusA *r);
9286 WERROR _svcctl_OpenSCManagerA(pipes_struct *p, struct svcctl_OpenSCManagerA *r);
9287 WERROR _svcctl_OpenServiceA(pipes_struct *p, struct svcctl_OpenServiceA *r);
9288 WERROR _svcctl_QueryServiceConfigA(pipes_struct *p, struct svcctl_QueryServiceConfigA *r);
9289 WERROR _svcctl_QueryServiceLockStatusA(pipes_struct *p, struct svcctl_QueryServiceLockStatusA *r);
9290 WERROR _svcctl_StartServiceA(pipes_struct *p, struct svcctl_StartServiceA *r);
9291 WERROR _svcctl_GetServiceDisplayNameA(pipes_struct *p, struct svcctl_GetServiceDisplayNameA *r);
9292 WERROR _svcctl_GetServiceKeyNameA(pipes_struct *p, struct svcctl_GetServiceKeyNameA *r);
9293 WERROR _svcctl_GetCurrentGroupeStateW(pipes_struct *p, struct svcctl_GetCurrentGroupeStateW *r);
9294 WERROR _svcctl_EnumServiceGroupW(pipes_struct *p, struct svcctl_EnumServiceGroupW *r);
9295 WERROR _svcctl_ChangeServiceConfig2A(pipes_struct *p, struct svcctl_ChangeServiceConfig2A *r);
9296 WERROR _svcctl_ChangeServiceConfig2W(pipes_struct *p, struct svcctl_ChangeServiceConfig2W *r);
9297 WERROR _svcctl_QueryServiceConfig2A(pipes_struct *p, struct svcctl_QueryServiceConfig2A *r);
9298 WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p, struct svcctl_QueryServiceConfig2W *r);
9299 WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p, struct svcctl_QueryServiceStatusEx *r);
9300 WERROR _EnumServicesStatusExA(pipes_struct *p, struct EnumServicesStatusExA *r);
9301 WERROR _EnumServicesStatusExW(pipes_struct *p, struct EnumServicesStatusExW *r);
9302 WERROR _svcctl_SCSendTSMessage(pipes_struct *p, struct svcctl_SCSendTSMessage *r);
9303
9304 /* The following definitions come from rpc_server/srv_winreg_nt.c  */
9305
9306 WERROR _winreg_CloseKey(pipes_struct *p, struct winreg_CloseKey *r);
9307 WERROR _winreg_OpenHKLM(pipes_struct *p, struct winreg_OpenHKLM *r);
9308 WERROR _winreg_OpenHKPD(pipes_struct *p, struct winreg_OpenHKPD *r);
9309 WERROR _winreg_OpenHKPT(pipes_struct *p, struct winreg_OpenHKPT *r);
9310 WERROR _winreg_OpenHKCR(pipes_struct *p, struct winreg_OpenHKCR *r);
9311 WERROR _winreg_OpenHKU(pipes_struct *p, struct winreg_OpenHKU *r);
9312 WERROR _winreg_OpenHKCU(pipes_struct *p, struct winreg_OpenHKCU *r);
9313 WERROR _winreg_OpenHKCC(pipes_struct *p, struct winreg_OpenHKCC *r);
9314 WERROR _winreg_OpenHKDD(pipes_struct *p, struct winreg_OpenHKDD *r);
9315 WERROR _winreg_OpenHKPN(pipes_struct *p, struct winreg_OpenHKPN *r);
9316 WERROR _winreg_OpenKey(pipes_struct *p, struct winreg_OpenKey *r);
9317 WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r);
9318 WERROR _winreg_QueryInfoKey(pipes_struct *p, struct winreg_QueryInfoKey *r);
9319 WERROR _winreg_GetVersion(pipes_struct *p, struct winreg_GetVersion *r);
9320 WERROR _winreg_EnumKey(pipes_struct *p, struct winreg_EnumKey *r);
9321 WERROR _winreg_EnumValue(pipes_struct *p, struct winreg_EnumValue *r);
9322 WERROR _winreg_InitiateSystemShutdown(pipes_struct *p, struct winreg_InitiateSystemShutdown *r);
9323 WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, struct winreg_InitiateSystemShutdownEx *r);
9324 WERROR _winreg_AbortSystemShutdown(pipes_struct *p, struct winreg_AbortSystemShutdown *r);
9325 WERROR _winreg_RestoreKey(pipes_struct *p, struct winreg_RestoreKey *r);
9326 WERROR _winreg_SaveKey(pipes_struct *p, struct winreg_SaveKey *r);
9327 WERROR _winreg_SaveKeyEx(pipes_struct *p, struct winreg_SaveKeyEx *r);
9328 WERROR _winreg_CreateKey( pipes_struct *p, struct winreg_CreateKey *r);
9329 WERROR _winreg_SetValue(pipes_struct *p, struct winreg_SetValue *r);
9330 WERROR _winreg_DeleteKey(pipes_struct *p, struct winreg_DeleteKey *r);
9331 WERROR _winreg_DeleteValue(pipes_struct *p, struct winreg_DeleteValue *r);
9332 WERROR _winreg_GetKeySecurity(pipes_struct *p, struct winreg_GetKeySecurity *r);
9333 WERROR _winreg_SetKeySecurity(pipes_struct *p, struct winreg_SetKeySecurity *r);
9334 WERROR _winreg_FlushKey(pipes_struct *p, struct winreg_FlushKey *r);
9335 WERROR _winreg_UnLoadKey(pipes_struct *p, struct winreg_UnLoadKey *r);
9336 WERROR _winreg_ReplaceKey(pipes_struct *p, struct winreg_ReplaceKey *r);
9337 WERROR _winreg_LoadKey(pipes_struct *p, struct winreg_LoadKey *r);
9338 WERROR _winreg_NotifyChangeKeyValue(pipes_struct *p, struct winreg_NotifyChangeKeyValue *r);
9339 WERROR _winreg_QueryMultipleValues(pipes_struct *p, struct winreg_QueryMultipleValues *r);
9340 WERROR _winreg_QueryMultipleValues2(pipes_struct *p, struct winreg_QueryMultipleValues2 *r);
9341
9342 /* The following definitions come from rpc_server/srv_wkssvc_nt.c  */
9343
9344 WERROR _wkssvc_NetWkstaGetInfo(pipes_struct *p, struct wkssvc_NetWkstaGetInfo *r);
9345 WERROR _wkssvc_NetWkstaSetInfo(pipes_struct *p, struct wkssvc_NetWkstaSetInfo *r);
9346 WERROR _wkssvc_NetWkstaEnumUsers(pipes_struct *p, struct wkssvc_NetWkstaEnumUsers *r);
9347 WERROR _wkssvc_NetrWkstaUserGetInfo(pipes_struct *p, struct wkssvc_NetrWkstaUserGetInfo *r);
9348 WERROR _wkssvc_NetrWkstaUserSetInfo(pipes_struct *p, struct wkssvc_NetrWkstaUserSetInfo *r);
9349 WERROR _wkssvc_NetWkstaTransportEnum(pipes_struct *p, struct wkssvc_NetWkstaTransportEnum *r);
9350 WERROR _wkssvc_NetrWkstaTransportAdd(pipes_struct *p, struct wkssvc_NetrWkstaTransportAdd *r);
9351 WERROR _wkssvc_NetrWkstaTransportDel(pipes_struct *p, struct wkssvc_NetrWkstaTransportDel *r);
9352 WERROR _wkssvc_NetrUseAdd(pipes_struct *p, struct wkssvc_NetrUseAdd *r);
9353 WERROR _wkssvc_NetrUseGetInfo(pipes_struct *p, struct wkssvc_NetrUseGetInfo *r);
9354 WERROR _wkssvc_NetrUseDel(pipes_struct *p, struct wkssvc_NetrUseDel *r);
9355 WERROR _wkssvc_NetrUseEnum(pipes_struct *p, struct wkssvc_NetrUseEnum *r);
9356 WERROR _wkssvc_NetrMessageBufferSend(pipes_struct *p, struct wkssvc_NetrMessageBufferSend *r);
9357 WERROR _wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p, struct wkssvc_NetrWorkstationStatisticsGet *r) ;
9358 WERROR _wkssvc_NetrLogonDomainNameAdd(pipes_struct *p, struct wkssvc_NetrLogonDomainNameAdd *r);
9359 WERROR _wkssvc_NetrLogonDomainNameDel(pipes_struct *p, struct wkssvc_NetrLogonDomainNameDel *r);
9360 WERROR _wkssvc_NetrJoinDomain(pipes_struct *p, struct wkssvc_NetrJoinDomain *r);
9361 WERROR _wkssvc_NetrUnjoinDomain(pipes_struct *p, struct wkssvc_NetrUnjoinDomain *r);
9362 WERROR _wkssvc_NetrRenameMachineInDomain(pipes_struct *p, struct wkssvc_NetrRenameMachineInDomain *r);
9363 WERROR _wkssvc_NetrValidateName(pipes_struct *p, struct wkssvc_NetrValidateName *r);
9364 WERROR _wkssvc_NetrGetJoinInformation(pipes_struct *p, struct wkssvc_NetrGetJoinInformation *r);
9365 WERROR _wkssvc_NetrGetJoinableOus(pipes_struct *p, struct wkssvc_NetrGetJoinableOus *r);
9366 WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
9367                                struct wkssvc_NetrJoinDomain2 *r);
9368 WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
9369                                  struct wkssvc_NetrUnjoinDomain2 *r);
9370 WERROR _wkssvc_NetrRenameMachineInDomain2(pipes_struct *p, struct wkssvc_NetrRenameMachineInDomain2 *r);
9371 WERROR _wkssvc_NetrValidateName2(pipes_struct *p, struct wkssvc_NetrValidateName2 *r);
9372 WERROR _wkssvc_NetrGetJoinableOus2(pipes_struct *p, struct wkssvc_NetrGetJoinableOus2 *r);
9373 WERROR _wkssvc_NetrAddAlternateComputerName(pipes_struct *p, struct wkssvc_NetrAddAlternateComputerName *r);
9374 WERROR _wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p, struct wkssvc_NetrRemoveAlternateComputerName *r);
9375 WERROR _wkssvc_NetrSetPrimaryComputername(pipes_struct *p, struct wkssvc_NetrSetPrimaryComputername *r);
9376 WERROR _wkssvc_NetrEnumerateComputerNames(pipes_struct *p, struct wkssvc_NetrEnumerateComputerNames *r);
9377
9378 /* The following definitions come from rpcclient/cmd_dfs.c  */
9379
9380
9381 /* The following definitions come from rpcclient/cmd_dssetup.c  */
9382
9383
9384 /* The following definitions come from rpcclient/cmd_echo.c  */
9385
9386
9387 /* The following definitions come from rpcclient/cmd_lsarpc.c  */
9388
9389
9390 /* The following definitions come from rpcclient/cmd_netlogon.c  */
9391
9392
9393 /* The following definitions come from rpcclient/cmd_ntsvcs.c  */
9394
9395
9396 /* The following definitions come from rpcclient/cmd_samr.c  */
9397
9398
9399 /* The following definitions come from rpcclient/cmd_shutdown.c  */
9400
9401
9402 /* The following definitions come from rpcclient/cmd_spoolss.c  */
9403
9404 void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch);
9405
9406 /* The following definitions come from rpcclient/cmd_srvsvc.c  */
9407
9408
9409 /* The following definitions come from rpcclient/cmd_test.c  */
9410
9411
9412 /* The following definitions come from rpcclient/cmd_wkssvc.c  */
9413
9414
9415 /* The following definitions come from rpcclient/rpcclient.c  */
9416
9417
9418 /* The following definitions come from services/services_db.c  */
9419
9420 void svcctl_init_keys( void );
9421 SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9422 bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token );
9423 const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9424 const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
9425 REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token );
9426
9427 /* The following definitions come from services/svc_netlogon.c  */
9428
9429
9430 /* The following definitions come from services/svc_rcinit.c  */
9431
9432
9433 /* The following definitions come from services/svc_spoolss.c  */
9434
9435
9436 /* The following definitions come from services/svc_winreg.c  */
9437
9438
9439 /* The following definitions come from services/svc_wins.c  */
9440
9441
9442 /* The following definitions come from smbd/aio.c  */
9443
9444 void aio_request_done(uint16_t mid);
9445 bool aio_finished(void);
9446 void initialize_async_io_handler(void);
9447 bool schedule_aio_read_and_X(connection_struct *conn,
9448                              struct smb_request *req,
9449                              files_struct *fsp, SMB_OFF_T startpos,
9450                              size_t smb_maxcnt);
9451 bool schedule_aio_write_and_X(connection_struct *conn,
9452                               struct smb_request *req,
9453                               files_struct *fsp, char *data,
9454                               SMB_OFF_T startpos,
9455                               size_t numtowrite);
9456 int process_aio_queue(void);
9457 int wait_for_aio_completion(files_struct *fsp);
9458 void cancel_aio_by_fsp(files_struct *fsp);
9459 bool aio_finished(void);
9460 void initialize_async_io_handler(void);
9461 int process_aio_queue(void);
9462 bool schedule_aio_read_and_X(connection_struct *conn,
9463                              struct smb_request *req,
9464                              files_struct *fsp, SMB_OFF_T startpos,
9465                              size_t smb_maxcnt);
9466 bool schedule_aio_write_and_X(connection_struct *conn,
9467                               struct smb_request *req,
9468                               files_struct *fsp, char *data,
9469                               SMB_OFF_T startpos,
9470                               size_t numtowrite);
9471 void cancel_aio_by_fsp(files_struct *fsp);
9472 int wait_for_aio_completion(files_struct *fsp);
9473
9474 /* The following definitions come from smbd/blocking.c  */
9475
9476 bool push_blocking_lock_request( struct byte_range_lock *br_lck,
9477                 const struct smb_request *req,
9478                 files_struct *fsp,
9479                 int lock_timeout,
9480                 int lock_num,
9481                 uint32 lock_pid,
9482                 enum brl_type lock_type,
9483                 enum brl_flavour lock_flav,
9484                 SMB_BIG_UINT offset,
9485                 SMB_BIG_UINT count,
9486                 uint32 blocking_pid);
9487 void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck);
9488 void remove_pending_lock_requests_by_mid(int mid);
9489 bool blocking_lock_was_deferred(int mid);
9490 bool blocking_lock_cancel(files_struct *fsp,
9491                         uint32 lock_pid,
9492                         SMB_BIG_UINT offset,
9493                         SMB_BIG_UINT count,
9494                         enum brl_flavour lock_flav,
9495                         unsigned char locktype,
9496                         NTSTATUS err);
9497
9498 /* The following definitions come from smbd/change_trust_pw.c  */
9499
9500 NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
9501
9502 /* The following definitions come from smbd/chgpasswd.c  */
9503
9504 bool chgpasswd(const char *name, const struct passwd *pass,
9505                const char *oldpass, const char *newpass, bool as_root);
9506 bool chgpasswd(const char *name, const struct passwd *pass, 
9507                const char *oldpass, const char *newpass, bool as_root);
9508 bool check_lanman_password(char *user, uchar * pass1,
9509                            uchar * pass2, struct samu **hnd);
9510 bool change_lanman_password(struct samu *sampass, uchar *pass2);
9511 NTSTATUS pass_oem_change(char *user,
9512                          uchar password_encrypted_with_lm_hash[516],
9513                          const uchar old_lm_hash_encrypted[16],
9514                          uchar password_encrypted_with_nt_hash[516],
9515                          const uchar old_nt_hash_encrypted[16],
9516                          uint32 *reject_reason);
9517 NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason);
9518
9519 /* The following definitions come from smbd/close.c  */
9520
9521 void set_close_write_time(struct files_struct *fsp, struct timespec ts);
9522 NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type);
9523 void msg_close_file(struct messaging_context *msg_ctx,
9524                     void *private_data,
9525                     uint32_t msg_type,
9526                     struct server_id server_id,
9527                     DATA_BLOB *data);
9528
9529 /* The following definitions come from smbd/conn.c  */
9530
9531 void conn_init(void);
9532 int conn_num_open(void);
9533 bool conn_snum_used(int snum);
9534 connection_struct *conn_find(unsigned cnum);
9535 connection_struct *conn_new(void);
9536 void conn_close_all(void);
9537 bool conn_idle_all(time_t t);
9538 void conn_clear_vuid_caches(uint16 vuid);
9539 void conn_free_internal(connection_struct *conn);
9540 void conn_free(connection_struct *conn);
9541 void msg_force_tdis(struct messaging_context *msg,
9542                     void *private_data,
9543                     uint32_t msg_type,
9544                     struct server_id server_id,
9545                     DATA_BLOB *data);
9546
9547 /* The following definitions come from smbd/connection.c  */
9548
9549 bool yield_connection(connection_struct *conn, const char *name);
9550 int count_current_connections( const char *sharename, bool clear  );
9551 int count_all_current_connections(void);
9552 bool claim_connection(connection_struct *conn, const char *name,
9553                       uint32 msg_flags);
9554 bool register_message_flags(bool doreg, uint32 msg_flags);
9555 bool store_pipe_opendb( smb_np_struct *p );
9556 bool delete_pipe_opendb( smb_np_struct *p );
9557
9558 /* The following definitions come from smbd/dfree.c  */
9559
9560 SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
9561                               SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
9562 SMB_BIG_UINT get_dfree_info(connection_struct *conn,
9563                         const char *path,
9564                         bool small_query,
9565                         SMB_BIG_UINT *bsize,
9566                         SMB_BIG_UINT *dfree,
9567                         SMB_BIG_UINT *dsize);
9568
9569 /* The following definitions come from smbd/dir.c  */
9570
9571 bool make_dir_struct(TALLOC_CTX *ctx,
9572                         char *buf,
9573                         const char *mask,
9574                         const char *fname,
9575                         SMB_OFF_T size,
9576                         uint32 mode,
9577                         time_t date,
9578                         bool uc);
9579 void init_dptrs(void);
9580 char *dptr_path(int key);
9581 char *dptr_wcard(int key);
9582 uint16 dptr_attr(int key);
9583 void dptr_close(int *key);
9584 void dptr_closecnum(connection_struct *conn);
9585 void dptr_idlecnum(connection_struct *conn);
9586 void dptr_closepath(char *path,uint16 spid);
9587 NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, bool expect_close,uint16 spid,
9588                 const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret);
9589 int dptr_CloseDir(struct dptr_struct *dptr);
9590 void dptr_SeekDir(struct dptr_struct *dptr, long offset);
9591 long dptr_TellDir(struct dptr_struct *dptr);
9592 bool dptr_has_wild(struct dptr_struct *dptr);
9593 int dptr_dnum(struct dptr_struct *dptr);
9594 const char *dptr_ReadDirName(TALLOC_CTX *ctx,
9595                         struct dptr_struct *dptr,
9596                         long *poffset,
9597                         SMB_STRUCT_STAT *pst);
9598 bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst);
9599 void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset);
9600 bool dptr_fill(char *buf1,unsigned int key);
9601 struct dptr_struct *dptr_fetch(char *buf,int *num);
9602 struct dptr_struct *dptr_fetch_lanman2(int dptr_num);
9603 bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype);
9604 bool get_dir_entry(TALLOC_CTX *ctx,
9605                 connection_struct *conn,
9606                 const char *mask,
9607                 uint32 dirtype,
9608                 char **pp_fname_out,
9609                 SMB_OFF_T *size,
9610                 uint32 *mode,
9611                 time_t *date,
9612                 bool check_descend,
9613                 bool ask_sharemode);
9614 bool is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, bool use_veto);
9615 struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
9616                         const char *name, const char *mask, uint32 attr);
9617 const char *ReadDirName(struct smb_Dir *dirp, long *poffset);
9618 void RewindDir(struct smb_Dir *dirp, long *poffset);
9619 void SeekDir(struct smb_Dir *dirp, long offset);
9620 long TellDir(struct smb_Dir *dirp);
9621 void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
9622 bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset);
9623 NTSTATUS can_delete_directory(struct connection_struct *conn,
9624                                 const char *dirname);
9625
9626 /* The following definitions come from smbd/dmapi.c  */
9627
9628 const void *dmapi_get_current_session(void);
9629 bool dmapi_have_session(void);
9630 bool dmapi_new_session(void);
9631 bool dmapi_destroy_session(void);
9632 uint32 dmapi_file_flags(const char * const path);
9633
9634 /* The following definitions come from smbd/dnsregister.c  */
9635
9636 void dns_register_close(struct dns_reg_state **dns_state_ptr);
9637 void dns_register_smbd(struct dns_reg_state ** dns_state_ptr,
9638                 unsigned port,
9639                 int *maxfd,
9640                 fd_set *listen_set,
9641                 struct timeval *timeout);
9642 bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
9643                 fd_set *lfds, struct timeval *timeout);
9644
9645 /* The following definitions come from smbd/dosmode.c  */
9646
9647 mode_t unix_mode(connection_struct *conn, int dosmode, const char *fname,
9648                  const char *inherit_from_dir);
9649 uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
9650 uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
9651 int file_set_dosmode(connection_struct *conn, const char *fname,
9652                      uint32 dosmode, SMB_STRUCT_STAT *st,
9653                      const char *parent_dir,
9654                      bool newfile);
9655 int file_ntimes(connection_struct *conn, const char *fname, const struct timespec ts[2]);
9656 bool set_write_time_path(connection_struct *conn, const char *fname,
9657                          struct file_id fileid, const struct timespec mtime,
9658                          bool overwrite);
9659 bool set_write_time_fsp(struct files_struct *fsp, const struct timespec mtime,
9660                         bool overwrite);
9661
9662 /* The following definitions come from smbd/error.c  */
9663
9664 bool use_nt_status(void);
9665 void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
9666 int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
9667 void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
9668                     int line, const char *file);
9669 void reply_force_nt_error(struct smb_request *req, NTSTATUS ntstatus,
9670                           int line, const char *file);
9671 void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
9672                     int line, const char *file);
9673 void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
9674                       NTSTATUS status, int line, const char *file);
9675 void reply_openerror(struct smb_request *req, NTSTATUS status);
9676 void reply_unix_error(struct smb_request *req, uint8 defclass, uint32 defcode,
9677                         NTSTATUS defstatus, int line, const char *file);
9678
9679 /* The following definitions come from smbd/fake_file.c  */
9680
9681 enum FAKE_FILE_TYPE is_fake_file(const char *fname);
9682 NTSTATUS open_fake_file(connection_struct *conn,
9683                                 uint16_t current_vuid,
9684                                 enum FAKE_FILE_TYPE fake_file_type,
9685                                 const char *fname,
9686                                 uint32 access_mask,
9687                                 files_struct **result);
9688 void destroy_fake_file_handle(struct fake_file_handle **fh);
9689 NTSTATUS close_fake_file(files_struct *fsp);
9690
9691 /* The following definitions come from smbd/file_access.c  */
9692
9693 bool can_access_file_acl(struct connection_struct *conn,
9694                                 const char * fname,
9695                                 uint32_t access_mask);
9696 bool can_delete_file_in_directory(connection_struct *conn, const char *fname);
9697 bool can_access_file_data(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask);
9698 bool can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf);
9699 bool directory_has_default_acl(connection_struct *conn, const char *fname);
9700
9701 /* The following definitions come from smbd/fileio.c  */
9702
9703 ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
9704 void trigger_write_time_update(struct files_struct *fsp);
9705 ssize_t write_file(struct smb_request *req,
9706                         files_struct *fsp,
9707                         const char *data,
9708                         SMB_OFF_T pos,
9709                         size_t n);
9710 void delete_write_cache(files_struct *fsp);
9711 void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size);
9712 ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason);
9713 NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_through);
9714 int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst);
9715
9716 /* The following definitions come from smbd/filename.c  */
9717
9718 NTSTATUS unix_convert(TALLOC_CTX *ctx,
9719                         connection_struct *conn,
9720                         const char *orig_path,
9721                         bool allow_wcard_last_component,
9722                         char **pp_conv_path,
9723                         char **pp_saved_last_component,
9724                         SMB_STRUCT_STAT *pst);
9725 NTSTATUS check_name(connection_struct *conn, const char *name);
9726
9727 /* The following definitions come from smbd/files.c  */
9728
9729 NTSTATUS file_new(connection_struct *conn, files_struct **result);
9730 void file_close_conn(connection_struct *conn);
9731 void file_close_pid(uint16 smbpid, int vuid);
9732 void file_init(void);
9733 void file_close_user(int vuid);
9734 void file_dump_open_table(void);
9735 files_struct *file_find_fd(int fd);
9736 files_struct *file_find_dif(struct file_id id, unsigned long gen_id);
9737 files_struct *file_find_fsp(files_struct *orig_fsp);
9738 files_struct *file_find_di_first(struct file_id id);
9739 files_struct *file_find_di_next(files_struct *start_fsp);
9740 files_struct *file_find_print(void);
9741 void file_sync_all(connection_struct *conn);
9742 void file_free(files_struct *fsp);
9743 files_struct *file_fnum(uint16 fnum);
9744 files_struct *file_fsp(uint16 fid);
9745 void file_chain_reset(void);
9746 NTSTATUS dup_file_fsp(files_struct *fsp,
9747                                 uint32 access_mask,
9748                                 uint32 share_access,
9749                                 uint32 create_options,
9750                                 files_struct **result);
9751
9752 /* The following definitions come from smbd/ipc.c  */
9753
9754 void send_trans_reply(connection_struct *conn,
9755                       const uint8_t *inbuf,
9756                       char *rparam, int rparam_len,
9757                       char *rdata, int rdata_len,
9758                       bool buffer_too_large);
9759 void reply_trans(struct smb_request *req);
9760 void reply_transs(struct smb_request *req);
9761
9762 /* The following definitions come from smbd/lanman.c  */
9763
9764 void api_reply(connection_struct *conn, uint16 vuid,
9765                struct smb_request *req,
9766                char *data, char *params,
9767                int tdscnt, int tpscnt,
9768                int mdrcnt, int mprcnt);
9769
9770 /* The following definitions come from smbd/mangle.c  */
9771
9772 void mangle_reset_cache(void);
9773 void mangle_change_to_posix(void);
9774 bool mangle_is_mangled(const char *s, const struct share_params *p);
9775 bool mangle_is_8_3(const char *fname, bool check_case,
9776                    const struct share_params *p);
9777 bool mangle_is_8_3_wildcards(const char *fname, bool check_case,
9778                              const struct share_params *p);
9779 bool mangle_must_mangle(const char *fname,
9780                    const struct share_params *p);
9781 bool mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
9782                         const char *in,
9783                         char **out, /* talloced on the given context. */
9784                         const struct share_params *p);
9785 bool name_to_8_3(const char *in,
9786                 char out[13],
9787                 bool cache83,
9788                 const struct share_params *p);
9789
9790 /* The following definitions come from smbd/mangle_hash.c  */
9791
9792 struct mangle_fns *mangle_hash_init(void);
9793
9794 /* The following definitions come from smbd/mangle_hash2.c  */
9795
9796 struct mangle_fns *mangle_hash2_init(void);
9797 struct mangle_fns *posix_mangle_init(void);
9798
9799 /* The following definitions come from smbd/map_username.c  */
9800
9801 bool map_username(fstring user);
9802
9803 /* The following definitions come from smbd/message.c  */
9804
9805 void reply_sends(struct smb_request *req);
9806 void reply_sendstrt(struct smb_request *req);
9807 void reply_sendtxt(struct smb_request *req);
9808 void reply_sendend(struct smb_request *req);
9809
9810 /* The following definitions come from smbd/msdfs.c  */
9811
9812 bool is_msdfs_link(connection_struct *conn,
9813                 const char *path,
9814                 SMB_STRUCT_STAT *sbufp);
9815 NTSTATUS get_referred_path(TALLOC_CTX *ctx,
9816                         const char *dfs_path,
9817                         struct junction_map *jucn,
9818                         int *consumedcntp,
9819                         bool *self_referralp);
9820 int setup_dfs_referral(connection_struct *orig_conn,
9821                         const char *dfs_path,
9822                         int max_referral_level,
9823                         char **ppdata, NTSTATUS *pstatus);
9824 bool create_junction(TALLOC_CTX *ctx,
9825                 const char *dfs_path,
9826                 struct junction_map *jucn);
9827 bool create_msdfs_link(const struct junction_map *jucn);
9828 bool remove_msdfs_link(const struct junction_map *jucn);
9829 struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn);
9830 NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
9831                         connection_struct *conn,
9832                         bool dfs_pathnames,
9833                         const char *name_in,
9834                         char **pp_name_out);
9835 NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
9836                                 connection_struct *conn,
9837                                 bool dfs_pathnames,
9838                                 const char *name_in,
9839                                 char **pp_name_out,
9840                                 bool *ppath_contains_wcard);
9841 NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
9842                                 connection_struct **pconn,
9843                                 int snum,
9844                                 const char *path,
9845                             char **poldcwd);
9846
9847 /* The following definitions come from smbd/negprot.c  */
9848
9849 void reply_negprot(struct smb_request *req);
9850
9851 /* The following definitions come from smbd/notify.c  */
9852
9853 void change_notify_reply(connection_struct *conn,
9854                         const uint8 *request_buf, uint32 max_param,
9855                          struct notify_change_buf *notify_buf);
9856 NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
9857                               bool recursive);
9858 NTSTATUS change_notify_add_request(const struct smb_request *req,
9859                                 uint32 max_param,
9860                                 uint32 filter, bool recursive,
9861                                 struct files_struct *fsp);
9862 void remove_pending_change_notify_requests_by_mid(uint16 mid);
9863 void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
9864                                                   NTSTATUS status);
9865 void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
9866                   const char *path);
9867 char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter);
9868 struct sys_notify_context *sys_notify_context_create(connection_struct *conn,
9869                                                      TALLOC_CTX *mem_ctx, 
9870                                                      struct event_context *ev);
9871 NTSTATUS sys_notify_watch(struct sys_notify_context *ctx,
9872                           struct notify_entry *e,
9873                           void (*callback)(struct sys_notify_context *ctx, 
9874                                            void *private_data,
9875                                            struct notify_event *ev),
9876                           void *private_data, void *handle);
9877
9878 /* The following definitions come from smbd/notify_inotify.c  */
9879
9880 NTSTATUS inotify_watch(struct sys_notify_context *ctx,
9881                        struct notify_entry *e,
9882                        void (*callback)(struct sys_notify_context *ctx, 
9883                                         void *private_data,
9884                                         struct notify_event *ev),
9885                        void *private_data, 
9886                        void *handle_p);
9887
9888 /* The following definitions come from smbd/notify_internal.c  */
9889
9890 struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server, 
9891                                    struct messaging_context *messaging_ctx,
9892                                    struct event_context *ev,
9893                                    connection_struct *conn);
9894 NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0,
9895                     void (*callback)(void *, const struct notify_event *), 
9896                     void *private_data);
9897 NTSTATUS notify_remove(struct notify_context *notify, void *private_data);
9898 void notify_trigger(struct notify_context *notify,
9899                     uint32_t action, uint32_t filter, const char *path);
9900
9901 /* The following definitions come from smbd/ntquotas.c  */
9902
9903 int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9904 int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9905 int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list);
9906 void *init_quota_handle(TALLOC_CTX *mem_ctx);
9907
9908 /* The following definitions come from smbd/nttrans.c  */
9909
9910 void send_nt_replies(connection_struct *conn,
9911                         struct smb_request *req, NTSTATUS nt_error,
9912                      char *params, int paramsize,
9913                      char *pdata, int datasize);
9914 bool is_ntfs_stream_name(const char *fname);
9915 void reply_ntcreate_and_X(struct smb_request *req);
9916 void reply_ntcancel(struct smb_request *req);
9917 void reply_ntrename(struct smb_request *req);
9918 void reply_nttrans(struct smb_request *req);
9919 void reply_nttranss(struct smb_request *req);
9920
9921 /* The following definitions come from smbd/open.c  */
9922
9923 NTSTATUS fd_close(files_struct *fsp);
9924 bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func,
9925                                  uint32 *paccess_mask,
9926                                  uint32 *pshare_mode,
9927                                  uint32 *pcreate_disposition,
9928                                  uint32 *pcreate_options);
9929 NTSTATUS open_file_ntcreate(connection_struct *conn,
9930                             struct smb_request *req,
9931                             const char *fname,
9932                             SMB_STRUCT_STAT *psbuf,
9933                             uint32 access_mask,         /* access bits (FILE_READ_DATA etc.) */
9934                             uint32 share_access,        /* share constants (FILE_SHARE_READ etc) */
9935                             uint32 create_disposition,  /* FILE_OPEN_IF etc. */
9936                             uint32 create_options,      /* options such as delete on close. */
9937                             uint32 new_dos_attributes,  /* attributes used for new file. */
9938                             int oplock_request,         /* internal Samba oplock codes. */
9939                                                         /* Information (FILE_EXISTS etc.) */
9940                             int *pinfo,
9941                             files_struct **result);
9942 NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
9943                           SMB_STRUCT_STAT *psbuf, files_struct **result);
9944 NTSTATUS close_file_fchmod(files_struct *fsp);
9945 NTSTATUS open_directory(connection_struct *conn,
9946                         struct smb_request *req,
9947                         const char *fname,
9948                         SMB_STRUCT_STAT *psbuf,
9949                         uint32 access_mask,
9950                         uint32 share_access,
9951                         uint32 create_disposition,
9952                         uint32 create_options,
9953                         uint32 file_attributes,
9954                         int *pinfo,
9955                         files_struct **result);
9956 NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, const char *directory);
9957 void msg_file_was_renamed(struct messaging_context *msg,
9958                           void *private_data,
9959                           uint32_t msg_type,
9960                           struct server_id server_id,
9961                           DATA_BLOB *data);
9962 NTSTATUS create_file_unixpath(connection_struct *conn,
9963                               struct smb_request *req,
9964                               const char *fname,
9965                               uint32_t access_mask,
9966                               uint32_t share_access,
9967                               uint32_t create_disposition,
9968                               uint32_t create_options,
9969                               uint32_t file_attributes,
9970                               uint32_t oplock_request,
9971                               SMB_BIG_UINT allocation_size,
9972                               struct security_descriptor *sd,
9973                               struct ea_list *ea_list,
9974
9975                               files_struct **result,
9976                               int *pinfo,
9977                               SMB_STRUCT_STAT *psbuf);
9978 NTSTATUS create_file(connection_struct *conn,
9979                      struct smb_request *req,
9980                      uint16_t root_dir_fid,
9981                      const char *fname,
9982                      uint32_t access_mask,
9983                      uint32_t share_access,
9984                      uint32_t create_disposition,
9985                      uint32_t create_options,
9986                      uint32_t file_attributes,
9987                      uint32_t oplock_request,
9988                      SMB_BIG_UINT allocation_size,
9989                      struct security_descriptor *sd,
9990                      struct ea_list *ea_list,
9991
9992                      files_struct **result,
9993                      int *pinfo,
9994                      SMB_STRUCT_STAT *psbuf);
9995
9996 /* The following definitions come from smbd/oplock.c  */
9997
9998 int32 get_number_of_exclusive_open_oplocks(void);
9999 bool oplock_message_waiting(fd_set *fds);
10000 void process_kernel_oplocks(struct messaging_context *msg_ctx, fd_set *pfds);
10001 bool set_file_oplock(files_struct *fsp, int oplock_type);
10002 void release_file_oplock(files_struct *fsp);
10003 bool remove_oplock(files_struct *fsp);
10004 bool downgrade_oplock(files_struct *fsp);
10005 int oplock_notify_fd(void);
10006 void reply_to_oplock_break_requests(files_struct *fsp);
10007 void release_level_2_oplocks_on_change(files_struct *fsp);
10008 void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
10009 void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
10010 bool init_oplocks(struct messaging_context *msg_ctx);
10011
10012 /* The following definitions come from smbd/oplock_irix.c  */
10013
10014 struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
10015
10016 /* The following definitions come from smbd/oplock_linux.c  */
10017
10018 void linux_set_lease_capability(void);
10019 int linux_set_lease_sighandler(int fd);
10020 int linux_setlease(int fd, int leasetype);
10021 struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
10022
10023 /* The following definitions come from smbd/password.c  */
10024
10025 user_struct *get_valid_user_struct(uint16 vuid);
10026 bool is_partial_auth_vuid(uint16 vuid);
10027 user_struct *get_partial_auth_user_struct(uint16 vuid);
10028 void invalidate_vuid(uint16 vuid);
10029 void invalidate_all_vuids(void);
10030 int register_initial_vuid(void);
10031 int register_existing_vuid(uint16 vuid,
10032                         auth_serversupplied_info *server_info,
10033                         DATA_BLOB response_blob,
10034                         const char *smb_name);
10035 void add_session_user(const char *user);
10036 void add_session_workgroup(const char *workgroup);
10037 const char *get_session_workgroup(void);
10038 bool user_in_netgroup(const char *user, const char *ngname);
10039 bool user_in_list(const char *user,const char **list);
10040 bool authorise_login(int snum, fstring user, DATA_BLOB password,
10041                      bool *guest);
10042
10043 /* The following definitions come from smbd/pipes.c  */
10044
10045 void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req);
10046 void reply_pipe_write(struct smb_request *req);
10047 void reply_pipe_write_and_X(struct smb_request *req);
10048 void reply_pipe_read_and_X(struct smb_request *req);
10049 void reply_pipe_close(connection_struct *conn, struct smb_request *req);
10050
10051 /* The following definitions come from smbd/posix_acls.c  */
10052
10053 NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, SEC_DESC *psd);
10054 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
10055 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
10056                            SEC_DESC **ppdesc);
10057 NTSTATUS posix_get_nt_acl(struct connection_struct *conn, const char *name,
10058                           uint32_t security_info, SEC_DESC **ppdesc);
10059 int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid);
10060 NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd);
10061 int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode );
10062 int chmod_acl(connection_struct *conn, const char *name, mode_t mode);
10063 int inherit_access_posix_acl(connection_struct *conn, const char *inherit_from_dir,
10064                        const char *name, mode_t mode);
10065 int fchmod_acl(files_struct *fsp, mode_t mode);
10066 bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf,
10067                                 uint16 num_def_acls, const char *pdata);
10068 bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata);
10069 SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname);
10070
10071 /* The following definitions come from smbd/process.c  */
10072
10073 bool srv_send_smb(int fd, char *buffer, bool do_encrypt);
10074 int srv_set_message(char *buf,
10075                         int num_words,
10076                         int num_bytes,
10077                         bool zero);
10078 void init_smb_request(struct smb_request *req,
10079                         const uint8 *inbuf,
10080                         size_t unread_bytes,
10081                         bool encrypted);
10082 void remove_deferred_open_smb_message(uint16 mid);
10083 void schedule_deferred_open_smb_message(uint16 mid);
10084 bool open_was_deferred(uint16 mid);
10085 struct pending_message_list *get_open_deferred_message(uint16 mid);
10086 bool push_deferred_smb_message(struct smb_request *req,
10087                                struct timeval request_time,
10088                                struct timeval timeout,
10089                                char *private_data, size_t priv_len);
10090 struct idle_event *event_add_idle(struct event_context *event_ctx,
10091                                   TALLOC_CTX *mem_ctx,
10092                                   struct timeval interval,
10093                                   const char *name,
10094                                   bool (*handler)(const struct timeval *now,
10095                                                   void *private_data),
10096                                   void *private_data);
10097 NTSTATUS allow_new_trans(struct trans_state *list, int mid);
10098 void respond_to_all_remaining_local_messages(void);
10099 bool create_outbuf(TALLOC_CTX *mem_ctx, const char *inbuf, char **outbuf,
10100                    uint8_t num_words, uint32_t num_bytes);
10101 void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
10102 const char *smb_fn_name(int type);
10103 void add_to_common_flags2(uint32 v);
10104 void remove_from_common_flags2(uint32 v);
10105 void construct_reply_common(const char *inbuf, char *outbuf);
10106 void chain_reply(struct smb_request *req);
10107 void check_reload(time_t t);
10108 void smbd_process(void);
10109
10110 /* The following definitions come from smbd/quotas.c  */
10111
10112 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10113 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10114 bool disk_quotas(const char *path,
10115                 SMB_BIG_UINT *bsize,
10116                 SMB_BIG_UINT *dfree,
10117                 SMB_BIG_UINT *dsize);
10118 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10119 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10120 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10121 bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
10122 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
10123 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
10124
10125 /* The following definitions come from smbd/reply.c  */
10126
10127 NTSTATUS check_path_syntax(char *path);
10128 NTSTATUS check_path_syntax_wcard(char *path, bool *p_contains_wcard);
10129 NTSTATUS check_path_syntax_posix(char *path);
10130 size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
10131                         const char *inbuf,
10132                         uint16 smb_flags2,
10133                         char **pp_dest,
10134                         const char *src,
10135                         size_t src_len,
10136                         int flags,
10137                         NTSTATUS *err,
10138                         bool *contains_wcard);
10139 size_t srvstr_get_path(TALLOC_CTX *ctx,
10140                         const char *inbuf,
10141                         uint16 smb_flags2,
10142                         char **pp_dest,
10143                         const char *src,
10144                         size_t src_len,
10145                         int flags,
10146                         NTSTATUS *err);
10147 bool check_fsp_open(connection_struct *conn, struct smb_request *req,
10148                     files_struct *fsp);
10149 bool check_fsp(connection_struct *conn, struct smb_request *req,
10150                files_struct *fsp);
10151 bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
10152                               files_struct *fsp);
10153 bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
10154                       files_struct *fsp);
10155 void reply_special(char *inbuf);
10156 void reply_tcon(struct smb_request *req);
10157 void reply_tcon_and_X(struct smb_request *req);
10158 void reply_unknown_new(struct smb_request *req, uint8 type);
10159 void reply_ioctl(struct smb_request *req);
10160 void reply_checkpath(struct smb_request *req);
10161 void reply_getatr(struct smb_request *req);
10162 void reply_setatr(struct smb_request *req);
10163 void reply_dskattr(struct smb_request *req);
10164 void reply_search(struct smb_request *req);
10165 void reply_fclose(struct smb_request *req);
10166 void reply_open(struct smb_request *req);
10167 void reply_open_and_X(struct smb_request *req);
10168 void reply_ulogoffX(struct smb_request *req);
10169 void reply_mknew(struct smb_request *req);
10170 void reply_ctemp(struct smb_request *req);
10171 NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
10172                           uint32 dirtype, const char *name_in, bool has_wild);
10173 void reply_unlink(struct smb_request *req);
10174 void send_file_readbraw(connection_struct *conn,
10175                         files_struct *fsp,
10176                         SMB_OFF_T startpos,
10177                         size_t nread,
10178                         ssize_t mincount);
10179 void reply_readbraw(struct smb_request *req);
10180 void reply_lockread(struct smb_request *req);
10181 void reply_read(struct smb_request *req);
10182 void reply_read_and_X(struct smb_request *req);
10183 void error_to_writebrawerr(struct smb_request *req);
10184 void reply_writebraw(struct smb_request *req);
10185 void reply_writeunlock(struct smb_request *req);
10186 void reply_write(struct smb_request *req);
10187 bool is_valid_writeX_buffer(const uint8_t *inbuf);
10188 void reply_write_and_X(struct smb_request *req);
10189 void reply_lseek(struct smb_request *req);
10190 void reply_flush(struct smb_request *req);
10191 void reply_exit(struct smb_request *req);
10192 void reply_close(struct smb_request *req);
10193 void reply_writeclose(struct smb_request *req);
10194 void reply_lock(struct smb_request *req);
10195 void reply_unlock(struct smb_request *req);
10196 void reply_tdis(struct smb_request *req);
10197 void reply_echo(struct smb_request *req);
10198 void reply_printopen(struct smb_request *req);
10199 void reply_printclose(struct smb_request *req);
10200 void reply_printqueue(struct smb_request *req);
10201 void reply_printwrite(struct smb_request *req);
10202 void reply_mkdir(struct smb_request *req);
10203 NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
10204                         connection_struct *conn,
10205                         const char *directory);
10206 void reply_rmdir(struct smb_request *req);
10207 NTSTATUS rename_internals_fsp(connection_struct *conn,
10208                         files_struct *fsp,
10209                         char *newname,
10210                         const char *newname_last_component,
10211                         uint32 attrs,
10212                         bool replace_if_exists);
10213 NTSTATUS rename_internals(TALLOC_CTX *ctx,
10214                         connection_struct *conn,
10215                         struct smb_request *req,
10216                         const char *name_in,
10217                         const char *newname_in,
10218                         uint32 attrs,
10219                         bool replace_if_exists,
10220                         bool src_has_wild,
10221                         bool dest_has_wild,
10222                         uint32_t access_mask);
10223 void reply_mv(struct smb_request *req);
10224 NTSTATUS copy_file(TALLOC_CTX *ctx,
10225                         connection_struct *conn,
10226                         const char *src,
10227                         const char *dest1,
10228                         int ofun,
10229                         int count,
10230                         bool target_is_directory);
10231 void reply_copy(struct smb_request *req);
10232 uint32 get_lock_pid( char *data, int data_offset, bool large_file_format);
10233 SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format);
10234 SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err);
10235 void reply_lockingX(struct smb_request *req);
10236 void reply_readbmpx(struct smb_request *req);
10237 void reply_readbs(struct smb_request *req);
10238 void reply_setattrE(struct smb_request *req);
10239 void reply_writebmpx(struct smb_request *req);
10240 void reply_writebs(struct smb_request *req);
10241 void reply_getattrE(struct smb_request *req);
10242
10243 /* The following definitions come from smbd/seal.c  */
10244
10245 uint16_t srv_enc_ctx(void);
10246 bool is_encrypted_packet(const uint8_t *inbuf);
10247 void srv_free_enc_buffer(char *buf);
10248 NTSTATUS srv_decrypt_buffer(char *buf);
10249 NTSTATUS srv_encrypt_buffer(char *buf, char **buf_out);
10250 NTSTATUS srv_request_encryption_setup(connection_struct *conn,
10251                                         unsigned char **ppdata,
10252                                         size_t *p_data_size,
10253                                         unsigned char **pparam,
10254                                         size_t *p_param_size);
10255 NTSTATUS srv_encryption_start(connection_struct *conn);
10256 void server_encryption_shutdown(void);
10257
10258 /* The following definitions come from smbd/sec_ctx.c  */
10259
10260 bool unix_token_equal(const UNIX_USER_TOKEN *t1, const UNIX_USER_TOKEN *t2);
10261 bool push_sec_ctx(void);
10262 void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN *token);
10263 void set_root_sec_ctx(void);
10264 bool pop_sec_ctx(void);
10265 void init_sec_ctx(void);
10266
10267 /* The following definitions come from smbd/server.c  */
10268
10269 int smbd_server_fd(void);
10270 int get_client_fd(void);
10271 int client_get_tcp_info(struct sockaddr_in *server, struct sockaddr_in *client);
10272 struct event_context *smbd_event_context(void);
10273 struct messaging_context *smbd_messaging_context(void);
10274 struct memcache *smbd_memcache(void);
10275 void reload_printers(void);
10276 bool reload_services(bool test);
10277 void exit_server(const char *const explanation);
10278 void exit_server_cleanly(const char *const explanation);
10279 void exit_server_fault(void);
10280
10281 /* The following definitions come from smbd/service.c  */
10282
10283 bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
10284 bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
10285 void load_registry_shares(void);
10286 int add_home_service(const char *service, const char *username, const char *homedir);
10287 int find_service(fstring service);
10288 connection_struct *make_connection_with_chdir(const char *service_in,
10289                                               DATA_BLOB password, 
10290                                               const char *dev, uint16 vuid,
10291                                               NTSTATUS *status);
10292 connection_struct *make_connection(const char *service_in, DATA_BLOB password, 
10293                                    const char *pdev, uint16 vuid,
10294                                    NTSTATUS *status);
10295 void close_cnum(connection_struct *conn, uint16 vuid);
10296
10297 /* The following definitions come from smbd/session.c  */
10298
10299 bool session_init(void);
10300 bool session_claim(user_struct *vuser);
10301 void session_yield(user_struct *vuser);
10302 int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
10303
10304 /* The following definitions come from smbd/sesssetup.c  */
10305
10306 NTSTATUS parse_spnego_mechanisms(DATA_BLOB blob_in,
10307                 DATA_BLOB *pblob_out,
10308                 char **kerb_mechOID);
10309 void reply_sesssetup_and_X(struct smb_request *req);
10310
10311 /* The following definitions come from smbd/share_access.c  */
10312
10313 bool token_contains_name_in_list(const char *username,
10314                                  const char *domain,
10315                                  const char *sharename,
10316                                  const struct nt_user_token *token,
10317                                  const char **list);
10318 bool user_ok_token(const char *username, const char *domain,
10319                    struct nt_user_token *token, int snum);
10320 bool is_share_read_only_for_token(const char *username,
10321                                   const char *domain,
10322                                   struct nt_user_token *token, int snum);
10323
10324 /* The following definitions come from smbd/srvstr.c  */
10325
10326 size_t srvstr_push_fn(const char *function, unsigned int line,
10327                       const char *base_ptr, uint16 smb_flags2, void *dest,
10328                       const char *src, int dest_len, int flags);
10329 ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);
10330
10331 /* The following definitions come from smbd/statcache.c  */
10332
10333 void stat_cache_add( const char *full_orig_name,
10334                 char *translated_path,
10335                 bool case_sensitive);
10336 bool stat_cache_lookup(connection_struct *conn,
10337                         char **pp_name,
10338                         char **pp_dirpath,
10339                         char **pp_start,
10340                         SMB_STRUCT_STAT *pst);
10341 void send_stat_cache_delete_message(const char *name);
10342 void stat_cache_delete(const char *name);
10343 unsigned int fast_string_hash(TDB_DATA *key);
10344 bool reset_stat_cache( void );
10345
10346 /* The following definitions come from smbd/statvfs.c  */
10347
10348 int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
10349
10350 /* The following definitions come from smbd/trans2.c  */
10351
10352 SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val);
10353 SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
10354 NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
10355                       files_struct *fsp, const char *fname,
10356                       const char *ea_name, struct ea_struct *pea);
10357 NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
10358                                 files_struct *fsp, const char *fname,
10359                                 char ***pnames, size_t *pnum_names);
10360 NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, struct ea_list *ea_list);
10361 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used);
10362 void send_trans2_replies(connection_struct *conn,
10363                         struct smb_request *req,
10364                          const char *params,
10365                          int paramsize,
10366                          const char *pdata,
10367                          int datasize,
10368                          int max_data_bytes);
10369 unsigned char *create_volume_objectid(connection_struct *conn, unsigned char objid[16]);
10370 NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
10371                 connection_struct *conn,
10372                 const char *oldname_in,
10373                 const char *newname_in);
10374 NTSTATUS smb_set_file_time(connection_struct *conn,
10375                            files_struct *fsp,
10376                            const char *fname,
10377                            const SMB_STRUCT_STAT *psbuf,
10378                            struct timespec ts[2],
10379                            bool setting_write_time);
10380 void reply_findclose(struct smb_request *req);
10381 void reply_findnclose(struct smb_request *req);
10382 void reply_trans2(struct smb_request *req);
10383 void reply_transs2(struct smb_request *req);
10384
10385 /* The following definitions come from smbd/uid.c  */
10386
10387 bool change_to_guest(void);
10388 void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
10389 bool change_to_user(connection_struct *conn, uint16 vuid);
10390 bool change_to_root_user(void);
10391 bool become_authenticated_pipe_user(pipes_struct *p);
10392 bool unbecome_authenticated_pipe_user(void);
10393 void become_root(void);
10394 void unbecome_root(void);
10395 bool become_user(connection_struct *conn, uint16 vuid);
10396 bool unbecome_user(void);
10397
10398 /* The following definitions come from smbd/utmp.c  */
10399
10400 void sys_utmp_claim(const char *username, const char *hostname,
10401                         const char *ip_addr_str,
10402                         const char *id_str, int id_num);
10403 void sys_utmp_yield(const char *username, const char *hostname,
10404                         const char *ip_addr_str,
10405                         const char *id_str, int id_num);
10406 void sys_utmp_yield(const char *username, const char *hostname,
10407                         const char *ip_addr_str,
10408                         const char *id_str, int id_num);
10409 void sys_utmp_claim(const char *username, const char *hostname,
10410                         const char *ip_addr_str,
10411                         const char *id_str, int id_num);
10412
10413 /* The following definitions come from smbd/vfs.c  */
10414
10415 NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs_op_tuples);
10416 bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
10417 void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, size_t ext_size);
10418 void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10419 void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10420 void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
10421 bool smbd_vfs_init(connection_struct *conn);
10422 bool vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
10423 bool vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf);
10424 bool vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
10425 ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
10426 ssize_t vfs_pread_data(files_struct *fsp, char *buf,
10427                 size_t byte_count, SMB_OFF_T offset);
10428 ssize_t vfs_write_data(struct smb_request *req,
10429                         files_struct *fsp,
10430                         const char *buffer,
10431                         size_t N);
10432 ssize_t vfs_pwrite_data(struct smb_request *req,
10433                         files_struct *fsp,
10434                         const char *buffer,
10435                         size_t N,
10436                         SMB_OFF_T offset);
10437 int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
10438 int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
10439 int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len);
10440 SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
10441 char *vfs_readdirname(connection_struct *conn, void *p);
10442 int vfs_ChDir(connection_struct *conn, const char *path);
10443 char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn);
10444 NTSTATUS check_reduced_name(connection_struct *conn, const char *fname);
10445
10446 /* The following definitions come from torture/denytest.c  */
10447
10448 bool torture_denytest1(int dummy);
10449 bool torture_denytest2(int dummy);
10450
10451 /* The following definitions come from torture/mangle_test.c  */
10452
10453 bool torture_mangle(int dummy);
10454
10455 /* The following definitions come from torture/nbio.c  */
10456
10457 double nbio_total(void);
10458 void nb_alarm(int ignore);
10459 void nbio_shmem(int n);
10460 void nb_setup(struct cli_state *cli);
10461 void nb_unlink(const char *fname);
10462 void nb_createx(const char *fname, 
10463                 unsigned create_options, unsigned create_disposition, int handle);
10464 void nb_writex(int handle, int offset, int size, int ret_size);
10465 void nb_readx(int handle, int offset, int size, int ret_size);
10466 void nb_close(int handle);
10467 void nb_rmdir(const char *fname);
10468 void nb_rename(const char *oldname, const char *newname);
10469 void nb_qpathinfo(const char *fname);
10470 void nb_qfileinfo(int fnum);
10471 void nb_qfsinfo(int level);
10472 void nb_findfirst(const char *mask);
10473 void nb_flush(int fnum);
10474 void nb_deltree(const char *dname);
10475 void nb_cleanup(void);
10476
10477 /* The following definitions come from torture/scanner.c  */
10478
10479 bool torture_trans2_scan(int dummy);
10480 bool torture_nttrans_scan(int dummy);
10481
10482 /* The following definitions come from torture/torture.c  */
10483
10484 void start_timer(void);
10485 double end_timer(void);
10486 void *shm_setup(int size);
10487 bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
10488                       char **hostname, char **sharename);
10489 void torture_open_connection_free_unclist(char **unc_list);
10490 bool torture_open_connection(struct cli_state **c, int conn_index);
10491 bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid);
10492 bool torture_close_connection(struct cli_state *c);
10493 bool torture_ioctl_test(int dummy);
10494 bool torture_chkpath_test(int dummy);
10495
10496 /* The following definitions come from torture/utable.c  */
10497
10498 bool torture_utable(int dummy);
10499 bool torture_casetable(int dummy);
10500
10501 /* The following definitions come from utils/passwd_util.c  */
10502
10503 char *stdin_new_passwd( void);
10504 char *get_pass( const char *prompt, bool stdin_get);
10505
10506 /* The following definitions come from winbindd/idmap.c  */
10507
10508 bool idmap_is_offline(void);
10509 NTSTATUS smb_register_idmap(int version, const char *name,
10510                             struct idmap_methods *methods);
10511 NTSTATUS smb_register_idmap_alloc(int version, const char *name,
10512                                   struct idmap_alloc_methods *methods);
10513 NTSTATUS idmap_close(void);
10514 NTSTATUS idmap_init_cache(void);
10515 NTSTATUS idmap_allocate_uid(struct unixid *id);
10516 NTSTATUS idmap_allocate_gid(struct unixid *id);
10517 NTSTATUS idmap_set_uid_hwm(struct unixid *id);
10518 NTSTATUS idmap_set_gid_hwm(struct unixid *id);
10519 NTSTATUS idmap_unixids_to_sids(struct id_map **ids);
10520 NTSTATUS idmap_sids_to_unixids(struct id_map **ids);
10521 NTSTATUS idmap_set_mapping(const struct id_map *id);
10522 char *idmap_fetch_secret(const char *backend, bool alloc,
10523                                const char *domain, const char *identity);
10524
10525 /* The following definitions come from winbindd/idmap_cache.c  */
10526
10527 struct idmap_cache_ctx *idmap_cache_init(TALLOC_CTX *memctx);
10528 NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id);
10529 NTSTATUS idmap_cache_set_negative_sid(struct idmap_cache_ctx *cache, const struct id_map *id);
10530 NTSTATUS idmap_cache_set_negative_id(struct idmap_cache_ctx *cache, const struct id_map *id);
10531 NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id);
10532 NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id);
10533
10534 /* The following definitions come from winbindd/idmap_nss.c  */
10535
10536 NTSTATUS idmap_nss_init(void);
10537
10538 /* The following definitions come from winbindd/idmap_passdb.c  */
10539
10540 NTSTATUS idmap_passdb_init(void);
10541
10542 /* The following definitions come from winbindd/idmap_tdb.c  */
10543
10544 bool idmap_tdb_tdb_close(TDB_CONTEXT *tdbctx);
10545 NTSTATUS idmap_alloc_tdb_init(void);
10546 NTSTATUS idmap_tdb_init(void);
10547
10548 /* The following definitions come from winbindd/idmap_util.c  */
10549
10550 NTSTATUS idmap_uid_to_sid(DOM_SID *sid, uid_t uid);
10551 NTSTATUS idmap_gid_to_sid(DOM_SID *sid, gid_t gid);
10552 NTSTATUS idmap_sid_to_uid(DOM_SID *sid, uid_t *uid);
10553 NTSTATUS idmap_sid_to_gid(DOM_SID *sid, gid_t *gid);
10554
10555 /* The following definitions come from winbindd/nss_info.c  */
10556
10557
10558 /* The following definitions come from winbindd/nss_info_template.c  */
10559
10560 NTSTATUS nss_info_template_init( void );
10561
10562 #endif /*  _PROTO_H_  */