s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
[obnox/samba-ctdb.git] / source / 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 void attempt_machine_password_change(void);
47 NTSTATUS auth_domain_init(void);
48
49 /* The following definitions come from auth/auth_ntlmssp.c  */
50
51 NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state);
52 void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state);
53 NTSTATUS auth_ntlmssp_update(AUTH_NTLMSSP_STATE *auth_ntlmssp_state, 
54                              const DATA_BLOB request, DATA_BLOB *reply) ;
55
56 /* The following definitions come from auth/auth_sam.c  */
57
58 NTSTATUS auth_sam_init(void);
59
60 /* The following definitions come from auth/auth_server.c  */
61
62 NTSTATUS auth_server_init(void);
63
64 /* The following definitions come from auth/auth_unix.c  */
65
66 NTSTATUS auth_unix_init(void);
67
68 /* The following definitions come from auth/auth_util.c  */
69
70 NTSTATUS make_user_info_map(auth_usersupplied_info **user_info, 
71                             const char *smb_name, 
72                             const char *client_domain, 
73                             const char *wksta_name, 
74                             DATA_BLOB *lm_pwd, DATA_BLOB *nt_pwd,
75                             DATA_BLOB *lm_interactive_pwd, DATA_BLOB *nt_interactive_pwd,
76                             DATA_BLOB *plaintext, 
77                             bool encrypted);
78 bool make_user_info_netlogon_network(auth_usersupplied_info **user_info, 
79                                      const char *smb_name, 
80                                      const char *client_domain, 
81                                      const char *wksta_name, 
82                                      uint32 logon_parameters,
83                                      const uchar *lm_network_pwd,
84                                      int lm_pwd_len,
85                                      const uchar *nt_network_pwd,
86                                      int nt_pwd_len);
87 bool make_user_info_netlogon_interactive(auth_usersupplied_info **user_info, 
88                                          const char *smb_name, 
89                                          const char *client_domain, 
90                                          const char *wksta_name, 
91                                          uint32 logon_parameters,
92                                          const uchar chal[8], 
93                                          const uchar lm_interactive_pwd[16], 
94                                          const uchar nt_interactive_pwd[16], 
95                                          const uchar *dc_sess_key);
96 bool make_user_info_for_reply(auth_usersupplied_info **user_info, 
97                               const char *smb_name, 
98                               const char *client_domain,
99                               const uint8 chal[8],
100                               DATA_BLOB plaintext_password);
101 NTSTATUS make_user_info_for_reply_enc(auth_usersupplied_info **user_info, 
102                                       const char *smb_name,
103                                       const char *client_domain, 
104                                       DATA_BLOB lm_resp, DATA_BLOB nt_resp);
105 bool make_user_info_guest(auth_usersupplied_info **user_info) ;
106 NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, 
107                               struct samu *sampass);
108 NTSTATUS create_local_token(auth_serversupplied_info *server_info);
109 NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
110                                     bool is_guest,
111                                     uid_t *uid, gid_t *gid,
112                                     char **found_username,
113                                     struct nt_user_token **token);
114 bool user_in_group_sid(const char *username, const DOM_SID *group_sid);
115 bool user_in_group(const char *username, const char *groupname);
116 NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info, 
117                              char *unix_username,
118                              struct passwd *pwd);
119 NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
120                                        const char *username,
121                                        bool is_guest,
122                                        struct auth_serversupplied_info **presult);
123 struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
124                                                  const auth_serversupplied_info *src);
125 bool init_guest_info(void);
126 bool server_info_set_session_key(struct auth_serversupplied_info *info,
127                                  DATA_BLOB session_key);
128 NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
129                                 auth_serversupplied_info **server_info);
130 bool copy_current_user(struct current_user *dst, struct current_user *src);
131 struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
132                              fstring save_username, bool create );
133 NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, 
134                                 const char *sent_nt_username,
135                                 const char *domain,
136                                 auth_serversupplied_info **server_info, 
137                                 struct netr_SamInfo3 *info3);
138 NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
139                                           const char *sent_nt_username,
140                                           const char *domain,
141                                           const struct wbcAuthUserInfo *info,
142                                           auth_serversupplied_info **server_info);
143 void free_user_info(auth_usersupplied_info **user_info);
144 bool make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method) ;
145 bool is_trusted_domain(const char* dom_name);
146
147 /* The following definitions come from auth/auth_winbind.c  */
148
149 NTSTATUS auth_winbind_init(void);
150
151 /* The following definitions come from auth/pampass.c  */
152
153 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
154 bool smb_pam_close_session(char *user, char *tty, char *rhost);
155 NTSTATUS smb_pam_accountcheck(const char * user);
156 NTSTATUS smb_pam_passcheck(const char * user, const char * password);
157 bool smb_pam_passchange(const char * user, const char * oldpassword, const char * newpassword);
158 NTSTATUS smb_pam_accountcheck(const char * user);
159 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
160 bool smb_pam_close_session(char *in_user, char *tty, char *rhost);
161
162 /* The following definitions come from auth/pass_check.c  */
163
164 void dfs_unlogin(void);
165 NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *password, 
166                     int pwlen, bool (*fn) (const char *, const char *), bool run_cracker);
167
168 /* The following definitions come from auth/token_util.c  */
169
170 bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token );
171 bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid );
172 NT_USER_TOKEN *get_root_nt_token( void );
173 NTSTATUS add_aliases(const DOM_SID *domain_sid,
174                      struct nt_user_token *token);
175 NTSTATUS create_builtin_users(const DOM_SID *sid);
176 NTSTATUS create_builtin_administrators(const DOM_SID *sid);
177 struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
178                                             const DOM_SID *user_sid,
179                                             bool is_guest,
180                                             int num_groupsids,
181                                             const DOM_SID *groupsids);
182 void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
183 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
184                            int n_groups, gid_t *groups);
185
186 /* The following definitions come from groupdb/mapping.c  */
187
188 NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
189 bool get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map);
190 int smb_create_group(const char *unix_group, gid_t *new_gid);
191 int smb_delete_group(const char *unix_group);
192 int smb_set_primary_group(const char *unix_group, const char* unix_user);
193 int smb_add_user_group(const char *unix_group, const char *unix_user);
194 int smb_delete_user_group(const char *unix_group, const char *unix_user);
195 NTSTATUS pdb_default_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
196                                  DOM_SID sid);
197 NTSTATUS pdb_default_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
198                                  gid_t gid);
199 NTSTATUS pdb_default_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
200                                  const char *name);
201 NTSTATUS pdb_default_add_group_mapping_entry(struct pdb_methods *methods,
202                                                 GROUP_MAP *map);
203 NTSTATUS pdb_default_update_group_mapping_entry(struct pdb_methods *methods,
204                                                    GROUP_MAP *map);
205 NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
206                                                    DOM_SID sid);
207 NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
208                                            const DOM_SID *sid, enum lsa_SidType sid_name_use,
209                                            GROUP_MAP **pp_rmap, size_t *p_num_entries,
210                                            bool unix_only);
211 NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
212                                   const char *name, uint32 *rid);
213 NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods,
214                                   const DOM_SID *sid);
215 NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
216                                    const DOM_SID *sid,
217                                    struct acct_info *info);
218 NTSTATUS pdb_default_set_aliasinfo(struct pdb_methods *methods,
219                                    const DOM_SID *sid,
220                                    struct acct_info *info);
221 NTSTATUS pdb_default_add_aliasmem(struct pdb_methods *methods,
222                                   const DOM_SID *alias, const DOM_SID *member);
223 NTSTATUS pdb_default_del_aliasmem(struct pdb_methods *methods,
224                                   const DOM_SID *alias, const DOM_SID *member);
225 NTSTATUS pdb_default_enum_aliasmem(struct pdb_methods *methods,
226                                    const DOM_SID *alias, DOM_SID **pp_members,
227                                    size_t *p_num_members);
228 NTSTATUS pdb_default_alias_memberships(struct pdb_methods *methods,
229                                        TALLOC_CTX *mem_ctx,
230                                        const DOM_SID *domain_sid,
231                                        const DOM_SID *members,
232                                        size_t num_members,
233                                        uint32 **pp_alias_rids,
234                                        size_t *p_num_alias_rids);
235 NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
236                                  DOM_SID sid);
237 NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
238                                  gid_t gid);
239 NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
240                                  const char *name);
241 NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
242                                                 GROUP_MAP *map);
243 NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
244                                                    GROUP_MAP *map);
245 NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
246                                                    DOM_SID sid);
247 NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
248                                            enum lsa_SidType sid_name_use,
249                                            GROUP_MAP **rmap, size_t *num_entries,
250                                            bool unix_only);
251 bool pdb_get_dom_grp_info(const DOM_SID *sid, struct acct_info *info);
252 bool pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info);
253 NTSTATUS pdb_create_builtin_alias(uint32 rid);
254
255 /* The following definitions come from groupdb/mapping_ldb.c  */
256
257 const struct mapping_backend *groupdb_ldb_init(void);
258
259 /* The following definitions come from groupdb/mapping_tdb.c  */
260
261 const struct mapping_backend *groupdb_tdb_init(void);
262
263 /* The following definitions come from intl/lang_tdb.c  */
264
265 bool lang_tdb_init(const char *lang);
266 const char *lang_msg(const char *msgid);
267 void lang_msg_free(const char *msgstr);
268 char *lang_tdb_current(void);
269
270 /* The following definitions come from lib/access.c  */
271
272 bool client_match(const char *tok, const void *item);
273 bool list_match(const char **list,const void *item,
274                 bool (*match_fn)(const char *, const void *));
275 bool allow_access(const char **deny_list,
276                 const char **allow_list,
277                 const char *cname,
278                 const char *caddr);
279 bool check_access(int sock, const char **allow_list, const char **deny_list);
280
281 /* The following definitions come from lib/account_pol.c  */
282
283 void account_policy_names_list(const char ***names, int *num_names);
284 const char *decode_account_policy_name(int field);
285 const char *get_account_policy_attr(int field);
286 const char *account_policy_get_desc(int field);
287 int account_policy_name_to_fieldnum(const char *name);
288 bool account_policy_get_default(int account_policy, uint32 *val);
289 bool init_account_policy(void);
290 bool account_policy_get(int field, uint32 *value);
291 bool account_policy_set(int field, uint32 value);
292 bool cache_account_policy_set(int field, uint32 value);
293 bool cache_account_policy_get(int field, uint32 *value);
294 struct db_context *get_account_pol_db( void );
295
296 /* The following definitions come from lib/adt_tree.c  */
297
298
299 /* The following definitions come from lib/afs.c  */
300
301 char *afs_createtoken_str(const char *username, const char *cell);
302 bool afs_login(connection_struct *conn);
303 bool afs_login(connection_struct *conn);
304 char *afs_createtoken_str(const char *username, const char *cell);
305
306 /* The following definitions come from lib/afs_settoken.c  */
307
308 int afs_syscall( int subcall,
309           char * path,
310           int cmd,
311           char * cmarg,
312           int follow);
313 bool afs_settoken_str(const char *token_string);
314 bool afs_settoken_str(const char *token_string);
315
316 /* The following definitions come from lib/arc4.c  */
317
318 void smb_arc4_init(unsigned char arc4_state_out[258], const unsigned char *key, size_t keylen);
319 void smb_arc4_crypt(unsigned char arc4_state_inout[258], unsigned char *data, size_t len);
320
321 /* The following definitions come from lib/audit.c  */
322
323 const char *audit_category_str(uint32 category);
324 const char *audit_param_str(uint32 category);
325 const char *audit_description_str(uint32 category);
326 bool get_audit_category_from_param(const char *param, uint32 *audit_category);
327 const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
328
329 /* The following definitions come from lib/bitmap.c  */
330
331 struct bitmap *bitmap_allocate(int n);
332 void bitmap_free(struct bitmap *bm);
333 struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
334 int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
335 bool bitmap_set(struct bitmap *bm, unsigned i);
336 bool bitmap_clear(struct bitmap *bm, unsigned i);
337 bool bitmap_query(struct bitmap *bm, unsigned i);
338 int bitmap_find(struct bitmap *bm, unsigned ofs);
339
340 /* The following definitions come from lib/charcnv.c  */
341
342 char lp_failed_convert_char(void);
343 void lazy_initialize_conv(void);
344 void gfree_charcnv(void);
345 void init_iconv(void);
346 size_t convert_string(charset_t from, charset_t to,
347                       void const *src, size_t srclen, 
348                       void *dest, size_t destlen, bool allow_bad_conv);
349 bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
350                              void const *src, size_t srclen, void *dst,
351                              size_t *converted_size, bool allow_bad_conv);
352 bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to,
353                            void const *src, size_t srclen, void *dst,
354                            size_t *converted_size, bool allow_bad_conv);
355 size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
356 char *strdup_upper(const char *s);
357 char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s);
358 size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen);
359 char *strdup_lower(const char *s);
360 char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s);
361 size_t ucs2_align(const void *base_ptr, const void *p, int flags);
362 size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags);
363 size_t push_ascii_fstring(void *dest, const char *src);
364 size_t push_ascii_nstring(void *dest, const char *src);
365 bool push_ascii_allocate(char **dest, const char *src, size_t *converted_size);
366 size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
367 size_t pull_ascii_fstring(char *dest, const void *src);
368 size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src);
369 size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_len, int flags);
370 bool push_ucs2_allocate(smb_ucs2_t **dest, const char *src,
371                         size_t *converted_size);
372 size_t push_utf8_fstring(void *dest, const char *src);
373 bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
374                       size_t *converted_size);
375 bool push_utf8_allocate(char **dest, const char *src, size_t *converted_size);
376 size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
377 size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
378                         const void *base_ptr,
379                         char **ppdest,
380                         const void *src,
381                         size_t src_len,
382                         int flags);
383 size_t pull_ucs2_fstring(char *dest, const void *src);
384 bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
385                       size_t *converted_size);
386 bool pull_ucs2_allocate(char **dest, const smb_ucs2_t *src,
387                         size_t *converted_size);
388 bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
389                       size_t *converted_size);
390 bool pull_utf8_allocate(char **dest, const char *src, size_t *converted_size);
391 bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src,
392                       size_t *converted_size);
393 bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
394                        size_t *converted_size);
395 size_t push_string_fn(const char *function, unsigned int line,
396                       const void *base_ptr, uint16 flags2,
397                       void *dest, const char *src,
398                       size_t dest_len, int flags);
399 size_t pull_string_fn(const char *function,
400                         unsigned int line,
401                         const void *base_ptr,
402                         uint16 smb_flags2,
403                         char *dest,
404                         const void *src,
405                         size_t dest_len,
406                         size_t src_len,
407                         int flags);
408 size_t pull_string_talloc_fn(const char *function,
409                         unsigned int line,
410                         TALLOC_CTX *ctx,
411                         const void *base_ptr,
412                         uint16 smb_flags2,
413                         char **ppdest,
414                         const void *src,
415                         size_t src_len,
416                         int flags);
417 size_t align_string(const void *base_ptr, const char *p, int flags);
418 codepoint_t next_codepoint(const char *str, size_t *size);
419
420 /* The following definitions come from lib/clobber.c  */
421
422 void clobber_region(const char *fn, unsigned int line, char *dest, size_t len);
423
424 /* The following definitions come from lib/conn_tdb.c  */
425
426 struct db_record *connections_fetch_record(TALLOC_CTX *mem_ctx,
427                                            TDB_DATA key);
428 struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
429                                           connection_struct *conn,
430                                           const char *name);
431 int connections_traverse(int (*fn)(struct db_record *rec,
432                                    void *private_data),
433                          void *private_data);
434 int connections_forall(int (*fn)(struct db_record *rec,
435                                  const struct connections_key *key,
436                                  const struct connections_data *data,
437                                  void *private_data),
438                        void *private_data);
439 bool connections_init(bool rw);
440
441 /* The following definitions come from lib/crc32.c  */
442
443 uint32 crc32_calc_buffer(const char *buf, size_t size);
444
445 /* The following definitions come from lib/data_blob.c  */
446
447 DATA_BLOB data_blob(const void *p, size_t length);
448 DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
449 void data_blob_free(DATA_BLOB *d);
450 void data_blob_clear(DATA_BLOB *d);
451 void data_blob_clear_free(DATA_BLOB *d);
452 DATA_BLOB data_blob_string_const(const char *str);
453 DATA_BLOB data_blob_const(const void *p, size_t length);
454 DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length);
455 _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
456
457 /* The following definitions come from lib/dbwrap_util.c  */
458
459 int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
460 int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
461 bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
462                          uint32_t *val);
463 int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
464 uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
465                                      uint32_t *oldval, uint32_t change_val);
466 int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
467                                  int32 *oldval, int32 change_val);
468 NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
469                             int flag);
470 NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key);
471 NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr,
472                                   int32_t v);
473 NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr,
474                                    uint32_t v);
475 NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key,
476                                      TDB_DATA data, int flags);
477 NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key);
478
479 /* The following definitions come from lib/debug.c  */
480
481 void gfree_debugsyms(void);
482 const char *debug_classname_from_index(int ndx);
483 int debug_add_class(const char *classname);
484 int debug_lookup_classname(const char *classname);
485 bool debug_parse_levels(const char *params_str);
486 void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data);
487 void debug_init(void);
488 void debug_register_msgs(struct messaging_context *msg_ctx);
489 void setup_logging(const char *pname, bool interactive);
490 void debug_set_logfile(const char *name);
491 bool reopen_logs( void );
492 void force_check_log_size( void );
493 bool need_to_check_log_size( void );
494 void check_log_size( void );
495 void dbgflush( void );
496 bool dbghdr(int level, int cls, const char *file, const char *func, int line);
497 TALLOC_CTX *debug_ctx(void);
498
499 /* The following definitions come from lib/display_sec.c  */
500
501 char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type);
502 void display_sec_access(uint32_t *info);
503 void display_sec_ace_flags(uint8_t flags);
504 void display_sec_ace(SEC_ACE *ace);
505 void display_sec_acl(SEC_ACL *sec_acl);
506 void display_acl_type(uint16 type);
507 void display_sec_desc(SEC_DESC *sec);
508
509 /* The following definitions come from lib/dmallocmsg.c  */
510
511 void register_dmalloc_msgs(struct messaging_context *msg_ctx);
512
513 /* The following definitions come from lib/dprintf.c  */
514
515 void display_set_stderr(void);
516
517 /* The following definitions come from lib/errmap_unix.c  */
518
519 NTSTATUS map_nt_error_from_unix(int unix_error);
520 int map_errno_from_nt_status(NTSTATUS status);
521
522 /* The following definitions come from lib/fault.c  */
523
524 void fault_setup(void (*fn)(void *));
525 void dump_core_setup(const char *progname);
526
527 /* The following definitions come from lib/file_id.c  */
528
529 struct file_id file_id_create_dev(SMB_DEV_T dev, SMB_INO_T inode);
530 struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf);
531 bool file_id_equal(const struct file_id *id1, const struct file_id *id2);
532 const char *file_id_string_tos(const struct file_id *id);
533 void push_file_id_16(char *buf, const struct file_id *id);
534 void pull_file_id_16(char *buf, struct file_id *id);
535
536 /* The following definitions come from lib/fsusage.c  */
537
538 int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
539
540 /* The following definitions come from lib/gencache.c  */
541
542 bool gencache_init(void);
543 bool gencache_shutdown(void);
544 bool gencache_set(const char *keystr, const char *value, time_t timeout);
545 bool gencache_del(const char *keystr);
546 bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
547 bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired);
548 bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout);
549 void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
550                       void* data, const char* keystr_pattern);
551 int gencache_lock_entry( const char *key );
552 void gencache_unlock_entry( const char *key );
553
554 /* The following definitions come from lib/genrand.c  */
555
556 void set_rand_reseed_callback(void (*fn)(int *));
557 void set_need_random_reseed(void);
558 void generate_random_buffer( unsigned char *out, int len);
559 char *generate_random_str(size_t len);
560
561 /* The following definitions come from lib/hmacmd5.c  */
562
563 void hmac_md5_init_rfc2104(const unsigned char *key, int key_len, HMACMD5Context *ctx);
564 void hmac_md5_init_limK_to_64(const unsigned char* key, int key_len,
565                         HMACMD5Context *ctx);
566 void hmac_md5_update(const unsigned char *text, int text_len, HMACMD5Context *ctx);
567 void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx);
568 void hmac_md5( unsigned char key[16], const unsigned char *data, int data_len,
569                unsigned char *digest);
570
571 /* The following definitions come from lib/iconv.c  */
572
573 NTSTATUS smb_register_charset(struct charset_functions *funcs) ;
574 size_t smb_iconv(smb_iconv_t cd, 
575                  const char **inbuf, size_t *inbytesleft,
576                  char **outbuf, size_t *outbytesleft);
577 smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
578 int smb_iconv_close (smb_iconv_t cd);
579
580 /* The following definitions come from lib/interface.c  */
581
582 bool ismyaddr(const struct sockaddr_storage *ip);
583 bool ismyip_v4(struct in_addr ip);
584 bool is_local_net(const struct sockaddr_storage *from);
585 void setup_linklocal_scope_id(struct sockaddr_storage *pss);
586 bool is_local_net_v4(struct in_addr from);
587 int iface_count(void);
588 int iface_count_v4_nl(void);
589 const struct in_addr *first_ipv4_iface(void);
590 struct interface *get_interface(int n);
591 const struct sockaddr_storage *iface_n_sockaddr_storage(int n);
592 const struct in_addr *iface_n_ip_v4(int n);
593 const struct in_addr *iface_n_bcast_v4(int n);
594 const struct sockaddr_storage *iface_n_bcast(int n);
595 const struct sockaddr_storage *iface_ip(const struct sockaddr_storage *ip);
596 bool iface_local(const struct sockaddr_storage *ip);
597 void load_interfaces(void);
598 void gfree_interfaces(void);
599 bool interfaces_changed(void);
600
601 /* The following definitions come from lib/ldap_debug_handler.c  */
602
603 void init_ldap_debugging(void);
604
605 /* The following definitions come from lib/ldap_escape.c  */
606
607 char *escape_ldap_string_alloc(const char *s);
608 char *escape_rdn_val_string_alloc(const char *s);
609
610 /* The following definitions come from lib/md4.c  */
611
612 void mdfour(unsigned char *out, const unsigned char *in, int n);
613
614 /* The following definitions come from lib/md5.c  */
615
616 void MD5Init(struct MD5Context *ctx);
617 void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
618 void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
619
620 /* The following definitions come from lib/module.c  */
621
622 NTSTATUS smb_load_module(const char *module_name);
623 int smb_load_modules(const char **modules);
624 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
625 NTSTATUS smb_load_module(const char *module_name);
626 int smb_load_modules(const char **modules);
627 NTSTATUS smb_probe_module(const char *subsystem, const char *module);
628 void init_modules(void);
629
630 /* The following definitions come from lib/ms_fnmatch.c  */
631
632 int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
633                bool is_case_sensitive);
634 int gen_fnmatch(const char *pattern, const char *string);
635
636 /* The following definitions come from lib/pam_errors.c  */
637
638 NTSTATUS pam_to_nt_status(int pam_error);
639 int nt_status_to_pam(NTSTATUS nt_status);
640 NTSTATUS pam_to_nt_status(int pam_error);
641 int nt_status_to_pam(NTSTATUS nt_status);
642
643 /* The following definitions come from lib/pidfile.c  */
644
645 pid_t pidfile_pid(const char *name);
646 void pidfile_create(const char *program_name);
647
648 /* The following definitions come from lib/popt_common.c  */
649
650
651 /* The following definitions come from lib/privileges.c  */
652
653 bool get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount);
654 NTSTATUS privilege_enumerate_accounts(DOM_SID **sids, int *num_sids);
655 NTSTATUS privilege_enum_sids(const SE_PRIV *mask, TALLOC_CTX *mem_ctx,
656                              DOM_SID **sids, int *num_sids);
657 bool grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
658 bool grant_privilege_by_name(DOM_SID *sid, const char *name);
659 bool revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask);
660 bool revoke_all_privileges( DOM_SID *sid );
661 bool revoke_privilege_by_name(DOM_SID *sid, const char *name);
662 NTSTATUS privilege_create_account(const DOM_SID *sid );
663 NTSTATUS privilege_set_init(PRIVILEGE_SET *priv_set);
664 NTSTATUS privilege_set_init_by_ctx(TALLOC_CTX *mem_ctx, PRIVILEGE_SET *priv_set);
665 void privilege_set_free(PRIVILEGE_SET *priv_set);
666 NTSTATUS dup_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR *old_la, int count);
667 bool is_privileged_sid( const DOM_SID *sid );
668 bool grant_all_privileges( const DOM_SID *sid );
669
670 /* The following definitions come from lib/privileges_basic.c  */
671
672 bool se_priv_copy( SE_PRIV *dst, const SE_PRIV *src );
673 bool se_priv_put_all_privileges(SE_PRIV *mask);
674 void se_priv_add( SE_PRIV *mask, const SE_PRIV *addpriv );
675 void se_priv_remove( SE_PRIV *mask, const SE_PRIV *removepriv );
676 bool se_priv_equal( const SE_PRIV *mask1, const SE_PRIV *mask2 );
677 bool se_priv_from_name( const char *name, SE_PRIV *mask );
678 void dump_se_priv( int dbg_cl, int dbg_lvl, const SE_PRIV *mask );
679 bool is_privilege_assigned(const SE_PRIV *privileges,
680                            const SE_PRIV *check);
681 const char* get_privilege_dispname( const char *name );
682 bool user_has_privileges(const NT_USER_TOKEN *token, const SE_PRIV *privilege);
683 bool user_has_any_privilege(NT_USER_TOKEN *token, const SE_PRIV *privilege);
684 int count_all_privileges( void );
685 LUID_ATTR get_privilege_luid( SE_PRIV *mask );
686 const char *luid_to_privilege_name(const LUID *set);
687 bool se_priv_to_privilege_set( PRIVILEGE_SET *set, SE_PRIV *mask );
688 bool privilege_set_to_se_priv( SE_PRIV *mask, struct lsa_PrivilegeSet *privset );
689
690 /* The following definitions come from lib/readline.c  */
691
692 void smb_readline_done(void);
693 char *smb_readline(const char *prompt, void (*callback)(void),
694                    char **(completion_fn)(const char *text, int start, int end));
695 const char *smb_readline_get_line_buffer(void);
696 void smb_readline_ca_char(char c);
697 int cmd_history(void);
698
699 /* The following definitions come from lib/recvfile.c  */
700
701 ssize_t sys_recvfile(int fromfd,
702                         int tofd,
703                         SMB_OFF_T offset,
704                         size_t count);
705 ssize_t sys_recvfile(int fromfd,
706                         int tofd,
707                         SMB_OFF_T offset,
708                         size_t count);
709 ssize_t drain_socket(int sockfd, size_t count);
710
711 /* The following definitions come from lib/secace.c  */
712
713 bool sec_ace_object(uint8 type);
714 void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src);
715 void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type,
716                   uint32 mask, uint8 flag);
717 NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask);
718 NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask);
719 NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 *num, DOM_SID *sid);
720 bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2);
721 int nt_ace_inherit_comp( SEC_ACE *a1, SEC_ACE *a2);
722 int nt_ace_canon_comp( SEC_ACE *a1, SEC_ACE *a2);
723 void dacl_sort_into_canonical_order(SEC_ACE *srclist, unsigned int num_aces);
724 bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace);
725
726 /* The following definitions come from lib/secacl.c  */
727
728 SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision,
729                       int num_aces, SEC_ACE *ace_list);
730 SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src);
731 bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2);
732
733 /* The following definitions come from lib/secdesc.c  */
734
735 bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2);
736 SEC_DESC_BUF *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
737 SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
738                         enum security_descriptor_revision revision,
739                         uint16 type,
740                         const DOM_SID *owner_sid, const DOM_SID *grp_sid,
741                         SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size);
742 SEC_DESC *dup_sec_desc(TALLOC_CTX *ctx, const SEC_DESC *src);
743 NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
744                            struct security_descriptor *secdesc,
745                            uint8 **data, size_t *len);
746 NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len,
747                              struct security_descriptor **psecdesc);
748 SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
749                                  SEC_ACL *dacl, size_t *sd_size);
750 SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
751 SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src);
752 NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size);
753 NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
754 NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t *sd_size);
755 NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
756                                         SEC_DESC **ppsd,
757                                         size_t *psize,
758                                         const SEC_DESC *parent_ctr,
759                                         const DOM_SID *owner_sid,
760                                         const DOM_SID *group_sid,
761                                         bool container);
762 NTSTATUS se_create_child_secdesc_buf(TALLOC_CTX *ctx,
763                                         SEC_DESC_BUF **ppsdb,
764                                         const SEC_DESC *parent_ctr,
765                                         bool container);
766
767 /* The following definitions come from lib/select.c  */
768
769 void sys_select_signal(char c);
770 int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
771 int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
772
773 /* The following definitions come from lib/sendfile.c  */
774
775 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
776 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
777 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
778 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
779 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
780 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
781 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
782
783 /* The following definitions come from lib/server_mutex.c  */
784
785 struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
786                                      int timeout);
787
788 /* The following definitions come from lib/sharesec.c  */
789
790 SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def_access);
791 SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
792                               size_t *psize);
793 bool set_share_security(const char *share_name, SEC_DESC *psd);
794 bool delete_share_security(const char *servicename);
795 bool share_access_check(const NT_USER_TOKEN *token, const char *sharename,
796                         uint32 desired_access);
797 bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, SEC_DESC **ppsd);
798
799 /* The following definitions come from lib/signal.c  */
800
801 void BlockSignals(bool block,int signum);
802 void (*CatchSignal(int signum,void (*handler)(int )))(int);
803 void CatchChild(void);
804 void CatchChildLeaveStatus(void);
805
806 /* The following definitions come from lib/smbldap.c  */
807
808 int smb_ldap_start_tls(LDAP *ldap_struct, int version);
809 int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri);
810 int smb_ldap_upgrade_conn(LDAP *ldap_struct, int *new_version) ;
811 int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri);
812 int smbldap_search(struct smbldap_state *ldap_state, 
813                    const char *base, int scope, const char *filter, 
814                    const char *attrs[], int attrsonly, 
815                    LDAPMessage **res);
816 int smbldap_search_paged(struct smbldap_state *ldap_state, 
817                          const char *base, int scope, const char *filter, 
818                          const char **attrs, int attrsonly, int pagesize,
819                          LDAPMessage **res, void **cookie);
820 int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
821 int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
822 int smbldap_delete(struct smbldap_state *ldap_state, const char *dn);
823 int smbldap_extended_operation(struct smbldap_state *ldap_state, 
824                                LDAP_CONST char *reqoid, struct berval *reqdata, 
825                                LDAPControl **serverctrls, LDAPControl **clientctrls, 
826                                char **retoidp, struct berval **retdatap);
827 int smbldap_search_suffix (struct smbldap_state *ldap_state,
828                            const char *filter, const char **search_attr,
829                            LDAPMessage ** result);
830 void smbldap_free_struct(struct smbldap_state **ldap_state) ;
831 NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
832                       const char *location,
833                       struct smbldap_state **smbldap_state);
834 char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry);
835 bool smbldap_has_control(LDAP *ld, const char *control);
836 bool smbldap_has_extension(LDAP *ld, const char *extension);
837 bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
838 bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
839
840 /* The following definitions come from lib/smbldap_util.c  */
841
842 NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
843                                     LDAPMessage ** result, const char *domain_name,
844                                     bool try_add);
845
846 /* The following definitions come from lib/smbrun.c  */
847
848 int smbrun_no_sanitize(const char *cmd, int *outfd);
849 int smbrun(const char *cmd, int *outfd);
850 int smbrunsecret(const char *cmd, const char *secret);
851
852 /* The following definitions come from lib/sock_exec.c  */
853
854 int sock_exec(const char *prog);
855
856 /* The following definitions come from lib/substitute.c  */
857
858 void free_local_machine_name(void);
859 bool set_local_machine_name(const char *local_name, bool perm);
860 const char *get_local_machine_name(void);
861 bool set_remote_machine_name(const char *remote_name, bool perm);
862 const char *get_remote_machine_name(void);
863 void sub_set_smb_name(const char *name);
864 void set_current_user_info(const char *smb_name, const char *unix_name,
865                            const char *full_name, const char *domain);
866 const char *get_current_username(void);
867 void standard_sub_basic(const char *smb_name, const char *domain_name,
868                         char *str, size_t len);
869 char *talloc_sub_basic(TALLOC_CTX *mem_ctx, const char *smb_name,
870                        const char *domain_name, const char *str);
871 char *alloc_sub_basic(const char *smb_name, const char *domain_name,
872                       const char *str);
873 char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
874                         const char *input_string,
875                         const char *username,
876                         const char *domain,
877                         uid_t uid,
878                         gid_t gid);
879 char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
880                           const char *servicename, const char *user,
881                           const char *connectpath, gid_t gid,
882                           const char *smb_name, const char *domain_name,
883                           const char *str);
884 void standard_sub_advanced(const char *servicename, const char *user,
885                            const char *connectpath, gid_t gid,
886                            const char *smb_name, const char *domain_name,
887                            char *str, size_t len);
888 char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str);
889
890 /* The following definitions come from lib/sysacls.c  */
891
892 int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p);
893 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p);
894 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
895 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d);
896 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d);
897 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
898 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm);
899 char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p);
900 SMB_ACL_T sys_acl_init(int count);
901 int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p);
902 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type);
903 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p);
904 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d);
905 int sys_acl_free_text(char *text);
906 int sys_acl_free_acl(SMB_ACL_T acl_d) ;
907 int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
908 int sys_acl_valid(SMB_ACL_T acl_d);
909 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle, 
910                            const char *path_p, SMB_ACL_TYPE_T type);
911 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
912 int sys_acl_set_file(vfs_handle_struct *handle,
913                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
914 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
915                    SMB_ACL_T acl_d);
916 int sys_acl_delete_def_file(vfs_handle_struct *handle,
917                             const char *path);
918 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
919                            const char *path_p, SMB_ACL_TYPE_T type);
920 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
921 int sys_acl_set_file(vfs_handle_struct *handle,
922                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
923 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
924                    SMB_ACL_T acl_d);
925 int sys_acl_delete_def_file(vfs_handle_struct *handle,
926                             const char *path);
927 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
928                            const char *path_p, SMB_ACL_TYPE_T type);
929 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
930 int sys_acl_set_file(vfs_handle_struct *handle,
931                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
932 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
933                    SMB_ACL_T acl_d);
934 int sys_acl_delete_def_file(vfs_handle_struct *handle,
935                             const char *path);
936 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
937                            const char *path_p, SMB_ACL_TYPE_T type);
938 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
939 int sys_acl_set_file(vfs_handle_struct *handle,
940                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
941 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
942                    SMB_ACL_T acl_d);
943 int sys_acl_delete_def_file(vfs_handle_struct *handle,
944                             const char *path);
945 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
946                            const char *path_p, SMB_ACL_TYPE_T type);
947 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
948 int sys_acl_set_file(vfs_handle_struct *handle,
949                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
950 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
951                    SMB_ACL_T acl_d);
952 int sys_acl_delete_def_file(vfs_handle_struct *handle,
953                             const char *path);
954 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
955                            const char *path_p, SMB_ACL_TYPE_T type);
956 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
957 int sys_acl_set_file(vfs_handle_struct *handle,
958                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
959 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
960                    SMB_ACL_T acl_d);
961 int sys_acl_delete_def_file(vfs_handle_struct *handle,
962                             const char *path);
963 SMB_ACL_T sys_acl_get_file(vfs_handle_struct *handle,
964                            const char *path_p, SMB_ACL_TYPE_T type);
965 SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp);
966 int sys_acl_set_file(vfs_handle_struct *handle,
967                      const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d);
968 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
969                    SMB_ACL_T acl_d);
970 int sys_acl_delete_def_file(vfs_handle_struct *handle,
971                             const char *path);
972 int no_acl_syscall_error(int err);
973
974 /* The following definitions come from lib/sysquotas.c  */
975
976 int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
977 int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
978
979 /* The following definitions come from lib/sysquotas_4A.c  */
980
981 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
982 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
983
984 /* The following definitions come from lib/sysquotas_linux.c  */
985
986 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
987 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
988
989 /* The following definitions come from lib/sysquotas_xfs.c  */
990
991 int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
992 int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
993
994 /* The following definitions come from lib/system.c  */
995
996 void *sys_memalign( size_t align, size_t size );
997 int sys_usleep(long usecs);
998 ssize_t sys_read(int fd, void *buf, size_t count);
999 ssize_t sys_write(int fd, const void *buf, size_t count);
1000 ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt);
1001 ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off);
1002 ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off);
1003 ssize_t sys_send(int s, const void *msg, size_t len, int flags);
1004 ssize_t sys_sendto(int s,  const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
1005 ssize_t sys_recv(int fd, void *buf, size_t count, int flags);
1006 ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
1007 int sys_fcntl_ptr(int fd, int cmd, void *arg);
1008 int sys_fcntl_long(int fd, int cmd, long arg);
1009 int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
1010 int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
1011 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
1012 int sys_ftruncate(int fd, SMB_OFF_T offset);
1013 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
1014 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
1015 SMB_OFF_T sys_ftell(FILE *fp);
1016 int sys_creat(const char *path, mode_t mode);
1017 int sys_open(const char *path, int oflag, mode_t mode);
1018 FILE *sys_fopen(const char *path, const char *type);
1019 void kernel_flock(int fd, uint32 share_mode);
1020 SMB_STRUCT_DIR *sys_opendir(const char *name);
1021 SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
1022 void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
1023 long sys_telldir(SMB_STRUCT_DIR *dirp);
1024 void sys_rewinddir(SMB_STRUCT_DIR *dirp);
1025 int sys_closedir(SMB_STRUCT_DIR *dirp);
1026 int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
1027 char *sys_realpath(const char *path, char *resolved_path);
1028 int sys_waitpid(pid_t pid,int *status,int options);
1029 char *sys_getwd(char *s);
1030 int sys_symlink(const char *oldpath, const char *newpath);
1031 int sys_readlink(const char *path, char *buf, size_t bufsiz);
1032 int sys_link(const char *oldpath, const char *newpath);
1033 int sys_chown(const char *fname,uid_t uid,gid_t gid);
1034 int sys_lchown(const char *fname,uid_t uid,gid_t gid);
1035 int sys_chroot(const char *dname);
1036 void set_effective_capability(enum smbd_capability capability);
1037 void drop_effective_capability(enum smbd_capability capability);
1038 long sys_random(void);
1039 void sys_srandom(unsigned int seed);
1040 int groups_max(void);
1041 int sys_getgroups(int setlen, gid_t *gidset);
1042 int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
1043 void sys_setpwent(void);
1044 struct passwd *sys_getpwent(void);
1045 void sys_endpwent(void);
1046 struct passwd *sys_getpwnam(const char *name);
1047 struct passwd *sys_getpwuid(uid_t uid);
1048 struct group *sys_getgrnam(const char *name);
1049 struct group *sys_getgrgid(gid_t gid);
1050 pid_t sys_fork(void);
1051 pid_t sys_getpid(void);
1052 int sys_popen(const char *command);
1053 int sys_pclose(int fd);
1054 void *sys_dlopen(const char *name, int flags);
1055 void *sys_dlsym(void *handle, const char *symbol);
1056 int sys_dlclose (void *handle);
1057 const char *sys_dlerror(void);
1058 int sys_dup2(int oldfd, int newfd) ;
1059 ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
1060 ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size);
1061 ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
1062 ssize_t sys_listxattr (const char *path, char *list, size_t size);
1063 ssize_t sys_llistxattr (const char *path, char *list, size_t size);
1064 ssize_t sys_flistxattr (int filedes, char *list, size_t size);
1065 int sys_removexattr (const char *path, const char *name);
1066 int sys_lremovexattr (const char *path, const char *name);
1067 int sys_fremovexattr (int filedes, const char *name);
1068 int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1069 int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags);
1070 int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
1071 uint32 unix_dev_major(SMB_DEV_T dev);
1072 uint32 unix_dev_minor(SMB_DEV_T dev);
1073 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1074 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1075 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1076 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1077 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1078 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1079 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1080 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
1081 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
1082 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
1083 int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
1084 int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
1085 int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
1086 int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
1087 int sys_getpeereid( int s, uid_t *uid);
1088 int sys_getnameinfo(const struct sockaddr *psa,
1089                         socklen_t salen,
1090                         char *host,
1091                         size_t hostlen,
1092                         char *service,
1093                         size_t servlen,
1094                         int flags);
1095 int sys_connect(int fd, const struct sockaddr * addr);
1096
1097 /* The following definitions come from lib/system_smbd.c  */
1098
1099 bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
1100                          gid_t primary_gid,
1101                          gid_t **ret_groups, size_t *p_ngroups);
1102
1103 /* The following definitions come from lib/tallocmsg.c  */
1104
1105 void register_msg_pool_usage(struct messaging_context *msg_ctx);
1106
1107 /* The following definitions come from lib/time.c  */
1108
1109 time_t get_time_t_max(void);
1110 void GetTimeOfDay(struct timeval *tval);
1111 time_t nt_time_to_unix(NTTIME nt);
1112 void unix_to_nt_time(NTTIME *nt, time_t t);
1113 bool null_time(time_t t);
1114 bool null_nttime(NTTIME t);
1115 bool null_timespec(struct timespec ts);
1116 void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset);
1117 void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1118 void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
1119 time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
1120 time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
1121 time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
1122 char *http_timestring(time_t t);
1123 char *timestring(TALLOC_CTX *mem_ctx, time_t t);
1124 const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt);
1125 NTTIME nttime_from_string(const char *s);
1126 int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2);
1127 struct timeval timeval_zero(void);
1128 bool timeval_is_zero(const struct timeval *tv);
1129 struct timeval timeval_current(void);
1130 struct timeval timeval_set(uint32_t secs, uint32_t usecs);
1131 struct timeval timeval_add(const struct timeval *tv,
1132                            uint32_t secs, uint32_t usecs);
1133 struct timeval timeval_sum(const struct timeval *tv1,
1134                            const struct timeval *tv2);
1135 struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
1136 int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
1137 bool timeval_expired(const struct timeval *tv);
1138 double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2);
1139 double timeval_elapsed(const struct timeval *tv);
1140 struct timeval timeval_min(const struct timeval *tv1,
1141                            const struct timeval *tv2);
1142 struct timeval timeval_max(const struct timeval *tv1,
1143                            const struct timeval *tv2);
1144 struct timeval timeval_until(const struct timeval *tv1,
1145                              const struct timeval *tv2);
1146 NTTIME timeval_to_nttime(const struct timeval *tv);
1147 uint32 convert_time_t_to_uint32(time_t t);
1148 time_t convert_uint32_to_time_t(uint32 u);
1149 int get_time_zone(time_t t);
1150 bool nt_time_is_zero(const NTTIME *nt);
1151 time_t generalized_to_unix_time(const char *str);
1152 int get_server_zone_offset(void);
1153 int set_server_zone_offset(time_t t);
1154 char *current_timestring(TALLOC_CTX *ctx, bool hires);
1155 void srv_put_dos_date(char *buf,int offset,time_t unixdate);
1156 void srv_put_dos_date2(char *buf,int offset, time_t unixdate);
1157 void srv_put_dos_date3(char *buf,int offset,time_t unixdate);
1158 void put_long_date_timespec(char *p, struct timespec ts);
1159 void put_long_date(char *p, time_t t);
1160 struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,bool fake_dirs);
1161 struct timespec get_atimespec(const SMB_STRUCT_STAT *pst);
1162 void set_atimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1163 struct timespec get_mtimespec(const SMB_STRUCT_STAT *pst);
1164 void set_mtimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1165 struct timespec get_ctimespec(const SMB_STRUCT_STAT *pst);
1166 void set_ctimespec(SMB_STRUCT_STAT *pst, struct timespec ts);
1167 void dos_filetime_timespec(struct timespec *tsp);
1168 time_t srv_make_unix_date(const void *date_ptr);
1169 time_t srv_make_unix_date2(const void *date_ptr);
1170 time_t srv_make_unix_date3(const void *date_ptr);
1171 time_t convert_timespec_to_time_t(struct timespec ts);
1172 struct timespec convert_time_t_to_timespec(time_t t);
1173 struct timespec convert_timeval_to_timespec(const struct timeval tv);
1174 struct timeval convert_timespec_to_timeval(const struct timespec ts);
1175 struct timespec timespec_current(void);
1176 struct timespec timespec_min(const struct timespec *ts1,
1177                            const struct timespec *ts2);
1178 int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
1179 struct timespec interpret_long_date(const char *p);
1180 void cli_put_dos_date(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1181 void cli_put_dos_date2(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1182 void cli_put_dos_date3(struct cli_state *cli, char *buf, int offset, time_t unixdate);
1183 time_t cli_make_unix_date(struct cli_state *cli, const void *date_ptr);
1184 time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr);
1185 time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr);
1186 struct timespec nt_time_to_unix_timespec(NTTIME *nt);
1187 bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2);
1188 void TimeInit(void);
1189 void get_process_uptime(struct timeval *ret_time);
1190 time_t nt_time_to_unix_abs(const NTTIME *nt);
1191 time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
1192 void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
1193 void unix_to_nt_time_abs(NTTIME *nt, time_t t);
1194 bool null_mtime(time_t mtime);
1195 const char *time_to_asc(const time_t t);
1196 const char *display_time(NTTIME nttime);
1197 bool nt_time_is_set(const NTTIME *nt);
1198
1199 /* The following definitions come from lib/ufc.c  */
1200
1201 char *ufc_crypt(const char *key,const char *salt);
1202
1203 /* The following definitions come from lib/username.c  */
1204
1205 char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);
1206 struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
1207
1208 /* The following definitions come from lib/util.c  */
1209
1210 bool set_global_myname(const char *myname);
1211 const char *global_myname(void);
1212 bool set_global_myworkgroup(const char *myworkgroup);
1213 const char *lp_workgroup(void);
1214 bool set_global_scope(const char *scope);
1215 const char *global_scope(void);
1216 void gfree_names(void);
1217 void gfree_all( void );
1218 const char *my_netbios_names(int i);
1219 bool set_netbios_aliases(const char **str_array);
1220 bool init_names(void);
1221 const char *get_cmdline_auth_info_username(void);
1222 void set_cmdline_auth_info_username(const char *username);
1223 const char *get_cmdline_auth_info_password(void);
1224 void set_cmdline_auth_info_password(const char *password);
1225 bool set_cmdline_auth_info_signing_state(const char *arg);
1226 int get_cmdline_auth_info_signing_state(void);
1227 void set_cmdline_auth_info_use_kerberos(bool b);
1228 bool get_cmdline_auth_info_use_kerberos(void);
1229 void set_cmdline_auth_info_use_krb5_ticket(void);
1230 void set_cmdline_auth_info_smb_encrypt(void);
1231 void set_cmdline_auth_info_use_machine_account(void);
1232 bool get_cmdline_auth_info_got_pass(void);
1233 bool get_cmdline_auth_info_smb_encrypt(void);
1234 bool get_cmdline_auth_info_use_machine_account(void);
1235 bool get_cmdline_auth_info_copy(struct user_auth_info *info);
1236 bool set_cmdline_auth_info_machine_account_creds(void);
1237 const char *tmpdir(void);
1238 bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
1239                              gid_t **gids, size_t *num_gids);
1240 const char *get_numlist(const char *p, uint32 **num, int *count);
1241 bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf);
1242 bool socket_exist(const char *fname);
1243 time_t file_modtime(const char *fname);
1244 bool directory_exist(char *dname,SMB_STRUCT_STAT *st);
1245 SMB_OFF_T get_file_size(char *file_name);
1246 char *attrib_string(uint16 mode);
1247 void show_msg(char *buf);
1248 void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num);
1249 void smb_setlen(char *buf,int len);
1250 int set_message_bcc(char *buf,int num_bytes);
1251 ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
1252 char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
1253 char *clean_name(TALLOC_CTX *ctx, const char *s);
1254 void close_low_fds(bool stderr_too);
1255 ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos);
1256 int set_blocking(int fd, bool set);
1257 void smb_msleep(unsigned int t);
1258 void become_daemon(bool Fork, bool no_process_group);
1259 bool reinit_after_fork(struct messaging_context *msg_ctx,
1260                        struct event_context *ev_ctx,
1261                        bool parent_longlived);
1262 bool yesno(const char *p);
1263 void *malloc_(size_t size);
1264 void *malloc_array(size_t el_size, unsigned int count);
1265 void *memalign_array(size_t el_size, size_t align, unsigned int count);
1266 void *calloc_array(size_t size, size_t nmemb);
1267 void *Realloc(void *p, size_t size, bool free_old_on_error);
1268 void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error);
1269 void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
1270                         void *element, void *_array, uint32 *num_elements,
1271                         ssize_t *array_size);
1272 void safe_free(void *p);
1273 char *get_myname(TALLOC_CTX *ctx);
1274 char *get_mydnsdomname(TALLOC_CTX *ctx);
1275 int interpret_protocol(const char *str,int def);
1276 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1277 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
1278 bool process_exists(const struct server_id pid);
1279 bool process_exists_by_pid(pid_t pid);
1280 const char *uidtoname(uid_t uid);
1281 char *gidtoname(gid_t gid);
1282 uid_t nametouid(const char *name);
1283 gid_t nametogid(const char *name);
1284 void smb_panic(const char *const why);
1285 void log_stack_trace(void);
1286 const char *readdirname(SMB_STRUCT_DIR *p);
1287 bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
1288 void set_namearray(name_compare_entry **ppname_array, const char *namelist);
1289 void free_namearray(name_compare_entry *name_array);
1290 bool fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
1291 bool fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
1292 bool is_myname(const char *s);
1293 bool is_myworkgroup(const char *s);
1294 void ra_lanman_string( const char *native_lanman );
1295 const char *get_remote_arch_str(void);
1296 void set_remote_arch(enum remote_arch_types type);
1297 enum remote_arch_types get_remote_arch(void);
1298 void print_asc(int level, const unsigned char *buf,int len);
1299 void dump_data(int level, const unsigned char *buf1,int len);
1300 void dump_data_pw(const char *msg, const uchar * data, size_t len);
1301 const char *tab_depth(int level, int depth);
1302 int str_checksum(const char *s);
1303 void zero_free(void *p, size_t size);
1304 int set_maxfiles(int requested_max);
1305 int smb_mkstemp(char *name_template);
1306 void *smb_xmalloc_array(size_t size, unsigned int count);
1307 void *smb_xmemdup(const void *p, size_t size);
1308 char *smb_xstrdup(const char *s);
1309 char *smb_xstrndup(const char *s, size_t n);
1310 void *memdup(const void *p, size_t size);
1311 char *myhostname(void);
1312 char *lock_path(const char *name);
1313 char *pid_path(const char *name);
1314 char *lib_path(const char *name);
1315 char *modules_path(const char *name);
1316 char *data_path(const char *name);
1317 char *state_path(const char *name);
1318 const char *shlib_ext(void);
1319 char *parent_dirname(const char *path);
1320 bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir,
1321                            char **parent, const char **name);
1322 bool ms_has_wild(const char *s);
1323 bool ms_has_wild_w(const smb_ucs2_t *s);
1324 bool mask_match(const char *string, const char *pattern, bool is_case_sensitive);
1325 bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive);
1326 bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
1327 bool unix_wild_match(const char *pattern, const char *string);
1328 bool name_to_fqdn(fstring fqdn, const char *name);
1329 void *talloc_check_name_abort(const void *ptr, const char *name);
1330 uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options);
1331 pid_t procid_to_pid(const struct server_id *proc);
1332 void set_my_vnn(uint32 vnn);
1333 uint32 get_my_vnn(void);
1334 struct server_id pid_to_procid(pid_t pid);
1335 struct server_id procid_self(void);
1336 struct server_id server_id_self(void);
1337 bool procid_equal(const struct server_id *p1, const struct server_id *p2);
1338 bool cluster_id_equal(const struct server_id *id1,
1339                       const struct server_id *id2);
1340 bool procid_is_me(const struct server_id *pid);
1341 struct server_id interpret_pid(const char *pid_string);
1342 char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid);
1343 char *procid_str_static(const struct server_id *pid);
1344 bool procid_valid(const struct server_id *pid);
1345 bool procid_is_local(const struct server_id *pid);
1346 int this_is_smp(void);
1347 bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1348 char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1349 char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
1350 int get_safe_SVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1351 int get_safe_IVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval);
1352 void split_domain_user(TALLOC_CTX *mem_ctx,
1353                        const char *full_name,
1354                        char **domain,
1355                        char **user);
1356 void *_talloc_zero_zeronull(const void *ctx, size_t size, const char *name);
1357 void *_talloc_memdup_zeronull(const void *t, const void *p, size_t size, const char *name);
1358 void *_talloc_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1359 void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
1360 void *talloc_zeronull(const void *context, size_t size, const char *name);
1361 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
1362                                 char **pbase, char **pstream);
1363 bool is_valid_policy_hnd(const POLICY_HND *hnd);
1364 bool policy_hnd_equal(const struct policy_handle *hnd1,
1365                       const struct policy_handle *hnd2);
1366 const char *strip_hostname(const char *s);
1367
1368 /* The following definitions come from lib/util_file.c  */
1369
1370 char *fgets_slash(char *s2,int maxlen,XFILE *f);
1371 char *fd_load(int fd, size_t *psize, size_t maxsize);
1372 char *file_load(const char *fname, size_t *size, size_t maxsize);
1373 bool unmap_file(void* start, size_t size);
1374 void *map_file(char *fname, size_t size);
1375 char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
1376 char **fd_lines_load(int fd, int *numlines, size_t maxsize);
1377 char **file_lines_pload(const char *syscmd, int *numlines);
1378 void file_lines_free(char **lines);
1379 void file_lines_slashcont(char **lines);
1380 bool file_save(const char *fname, void *packet, size_t length);
1381
1382 /* The following definitions come from lib/util_nscd.c  */
1383
1384 void smb_nscd_flush_user_cache(void);
1385 void smb_nscd_flush_group_cache(void);
1386
1387 /* The following definitions come from lib/util_nttoken.c  */
1388
1389 NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken);
1390 NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
1391                         const struct nt_user_token *token_1,
1392                         const struct nt_user_token *token_2,
1393                         struct nt_user_token **token_out);
1394
1395 /* The following definitions come from lib/util_pw.c  */
1396
1397 struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx, const struct passwd *from) ;
1398 void flush_pwnam_cache(void);
1399 struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name);
1400 struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
1401
1402 /* The following definitions come from lib/util_reg.c  */
1403
1404 const char *reg_type_lookup(enum winreg_Type type);
1405 WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len,
1406                          uint32 *num_values, char ***values);
1407
1408 /* The following definitions come from lib/util_reg_api.c  */
1409
1410 WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
1411                            struct registry_value **pvalue,
1412                            enum winreg_Type type, uint8 *data,
1413                            uint32 size, uint32 length);
1414 WERROR registry_push_value(TALLOC_CTX *mem_ctx,
1415                            const struct registry_value *value,
1416                            DATA_BLOB *presult);
1417
1418 /* The following definitions come from lib/util_seaccess.c  */
1419
1420 void se_map_generic(uint32 *access_mask, const struct generic_mapping *mapping);
1421 void security_acl_map_generic(struct security_acl *sa, const struct generic_mapping *mapping);
1422 void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
1423 NTSTATUS se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
1424                      uint32 acc_desired, uint32 *acc_granted);
1425 NTSTATUS samr_make_sam_obj_sd(TALLOC_CTX *ctx, SEC_DESC **psd, size_t *sd_size);
1426
1427 /* The following definitions come from lib/util_sec.c  */
1428
1429 void sec_init(void);
1430 uid_t sec_initial_uid(void);
1431 gid_t sec_initial_gid(void);
1432 bool non_root_mode(void);
1433 void gain_root_privilege(void);
1434 void gain_root_group_privilege(void);
1435 void set_effective_uid(uid_t uid);
1436 void set_effective_gid(gid_t gid);
1437 void save_re_uid(void);
1438 void restore_re_uid_fromroot(void);
1439 void restore_re_uid(void);
1440 void save_re_gid(void);
1441 void restore_re_gid(void);
1442 int set_re_uid(void);
1443 void become_user_permanently(uid_t uid, gid_t gid);
1444 bool is_setuid_root(void) ;
1445
1446 /* The following definitions come from lib/util_sid.c  */
1447
1448 const char *sid_type_lookup(uint32 sid_type) ;
1449 NT_USER_TOKEN *get_system_token(void) ;
1450 const char *get_global_sam_name(void) ;
1451 char *sid_to_fstring(fstring sidstr_out, const DOM_SID *sid);
1452 char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid);
1453 char *sid_string_dbg(const DOM_SID *sid);
1454 char *sid_string_tos(const DOM_SID *sid);
1455 bool string_to_sid(DOM_SID *sidout, const char *sidstr);
1456 DOM_SID *string_sid_talloc(TALLOC_CTX *mem_ctx, const char *sidstr);
1457 bool sid_append_rid(DOM_SID *sid, uint32 rid);
1458 bool sid_compose(DOM_SID *dst, const DOM_SID *domain_sid, uint32 rid);
1459 bool sid_split_rid(DOM_SID *sid, uint32 *rid);
1460 bool sid_peek_rid(const DOM_SID *sid, uint32 *rid);
1461 bool sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid);
1462 void sid_copy(DOM_SID *dst, const DOM_SID *src);
1463 bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid);
1464 bool sid_parse(const char *inbuf, size_t len, DOM_SID *sid);
1465 int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
1466 int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2);
1467 bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
1468 bool non_mappable_sid(DOM_SID *sid);
1469 char *sid_binstring(const DOM_SID *sid);
1470 char *sid_binstring_hex(const DOM_SID *sid);
1471 DOM_SID *sid_dup_talloc(TALLOC_CTX *ctx, const DOM_SID *src);
1472 NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1473                           DOM_SID **sids, size_t *num);
1474 NTSTATUS add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
1475                                  DOM_SID **sids, size_t *num_sids);
1476 void del_sid_from_array(const DOM_SID *sid, DOM_SID **sids, size_t *num);
1477 bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
1478                                     uint32 rid, uint32 **pp_rids, size_t *p_num);
1479 bool is_null_sid(const DOM_SID *sid);
1480 bool is_sid_in_token(const NT_USER_TOKEN *token, const DOM_SID *sid);
1481 NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
1482                               const struct netr_SamInfo3 *info3,
1483                               DOM_SID **user_sids,
1484                               size_t *num_user_sids,
1485                               bool include_user_group_rid,
1486                               bool skip_ressource_groups);
1487
1488 /* The following definitions come from lib/util_sock.c  */
1489
1490 bool is_ipaddress_v4(const char *str);
1491 bool is_ipaddress(const char *str);
1492 bool is_broadcast_addr(const struct sockaddr_storage *pss);
1493 uint32 interpret_addr(const char *str);
1494 struct in_addr *interpret_addr2(struct in_addr *ip, const char *str);
1495 bool interpret_string_addr(struct sockaddr_storage *pss,
1496                 const char *str,
1497                 int flags);
1498 bool is_loopback_ip_v4(struct in_addr ip);
1499 bool is_loopback_addr(const struct sockaddr_storage *pss);
1500 bool is_zero_ip_v4(struct in_addr ip);
1501 bool is_zero_addr(const struct sockaddr_storage *pss);
1502 void zero_ip_v4(struct in_addr *ip);
1503 void zero_sockaddr(struct sockaddr_storage *pss);
1504 bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
1505 void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
1506                 struct in_addr ip);
1507 bool same_net(const struct sockaddr_storage *ip1,
1508                 const struct sockaddr_storage *ip2,
1509                 const struct sockaddr_storage *mask);
1510 bool sockaddr_equal(const struct sockaddr_storage *ip1,
1511                 const struct sockaddr_storage *ip2);
1512 bool is_address_any(const struct sockaddr_storage *psa);
1513 uint16_t get_sockaddr_port(const struct sockaddr_storage *pss);
1514 char *print_sockaddr(char *dest,
1515                         size_t destlen,
1516                         const struct sockaddr_storage *psa);
1517 char *print_canonical_sockaddr(TALLOC_CTX *ctx,
1518                         const struct sockaddr_storage *pss);
1519 void set_sockaddr_port(struct sockaddr_storage *psa, uint16 port);
1520 const char *client_name(int fd);
1521 const char *client_addr(int fd, char *addr, size_t addrlen);
1522 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
1523 int client_socket_port(int fd);
1524 void set_smb_read_error(enum smb_read_errors *pre,
1525                         enum smb_read_errors newerr);
1526 void cond_set_smb_read_error(enum smb_read_errors *pre,
1527                         enum smb_read_errors newerr);
1528 bool is_a_socket(int fd);
1529 void set_socket_options(int fd, const char *options);
1530 ssize_t read_udp_v4_socket(int fd,
1531                         char *buf,
1532                         size_t len,
1533                         struct sockaddr_storage *psa);
1534 NTSTATUS read_socket_with_timeout(int fd, char *buf,
1535                                   size_t mincnt, size_t maxcnt,
1536                                   unsigned int time_out,
1537                                   size_t *size_ret);
1538 NTSTATUS read_data(int fd, char *buffer, size_t N);
1539 ssize_t write_data(int fd, const char *buffer, size_t N);
1540 ssize_t write_data_iov(int fd, const struct iovec *orig_iov, int iovcnt);
1541 bool send_keepalive(int client);
1542 NTSTATUS read_smb_length_return_keepalive(int fd, char *inbuf,
1543                                           unsigned int timeout,
1544                                           size_t *len);
1545 NTSTATUS read_smb_length(int fd, char *inbuf, unsigned int timeout,
1546                          size_t *len);
1547 NTSTATUS receive_smb_raw(int fd,
1548                         char *buffer,
1549                         size_t buflen,
1550                         unsigned int timeout,
1551                         size_t maxlen,
1552                         size_t *p_len);
1553 int open_socket_in(int type,
1554                 uint16_t port,
1555                 int dlevel,
1556                 const struct sockaddr_storage *psock,
1557                 bool rebind);
1558 int open_socket_out(int type,
1559                 const struct sockaddr_storage *pss,
1560                 uint16_t port,
1561                 int timeout);
1562 bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
1563                          int timeout, int *fd_index, int *fd);
1564 int open_udp_socket(const char *host, int port);
1565 const char *get_peer_name(int fd, bool force_lookup);
1566 const char *get_peer_addr(int fd, char *addr, size_t addr_len);
1567 int create_pipe_sock(const char *socket_dir,
1568                      const char *socket_name,
1569                      mode_t dir_perms);
1570 const char *get_mydnsfullname(void);
1571 bool is_myname_or_ipaddr(const char *s);
1572
1573 /* The following definitions come from lib/util_str.c  */
1574
1575 bool next_token(const char **ptr, char *buff, const char *sep, size_t bufsize);
1576 bool next_token_talloc(TALLOC_CTX *ctx,
1577                         const char **ptr,
1578                         char **pp_buff,
1579                         const char *sep);
1580 bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
1581                         const char **ptr,
1582                         char **pp_buff,
1583                         const char *sep);
1584 int StrCaseCmp(const char *s, const char *t);
1585 int StrnCaseCmp(const char *s, const char *t, size_t len);
1586 bool strequal(const char *s1, const char *s2);
1587 bool strnequal(const char *s1,const char *s2,size_t n);
1588 bool strcsequal(const char *s1,const char *s2);
1589 int strwicmp(const char *psz1, const char *psz2);
1590 void strnorm(char *s, int case_default);
1591 bool strisnormal(const char *s, int case_default);
1592 void string_replace( char *s, char oldc, char newc );
1593 char *push_skip_string(char *buf);
1594 char *skip_string(const char *base, size_t len, char *buf);
1595 size_t str_charnum(const char *s);
1596 size_t str_ascii_charnum(const char *s);
1597 bool trim_char(char *s,char cfront,char cback);
1598 bool trim_string(char *s,const char *front,const char *back);
1599 bool strhasupper(const char *s);
1600 bool strhaslower(const char *s);
1601 size_t count_chars(const char *s,char c);
1602 char *safe_strcpy_fn(const char *fn,
1603                 int line,
1604                 char *dest,
1605                 const char *src,
1606                 size_t maxlength);
1607 char *safe_strcat_fn(const char *fn,
1608                 int line,
1609                 char *dest,
1610                 const char *src,
1611                 size_t maxlength);
1612 char *alpha_strcpy_fn(const char *fn,
1613                 int line,
1614                 char *dest,
1615                 const char *src,
1616                 const char *other_safe_chars,
1617                 size_t maxlength);
1618 char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
1619 size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len);
1620 DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex);
1621 char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
1622 bool in_list(const char *s, const char *list, bool casesensitive);
1623 void string_free(char **s);
1624 bool string_set(char **dest,const char *src);
1625 void string_sub2(char *s,const char *pattern, const char *insert, size_t len,
1626                  bool remove_unsafe_characters, bool replace_once,
1627                  bool allow_trailing_dollar);
1628 void string_sub_once(char *s, const char *pattern,
1629                 const char *insert, size_t len);
1630 void string_sub(char *s,const char *pattern, const char *insert, size_t len);
1631 void fstring_sub(char *s,const char *pattern,const char *insert);
1632 char *realloc_string_sub2(char *string,
1633                         const char *pattern,
1634                         const char *insert,
1635                         bool remove_unsafe_characters,
1636                         bool allow_trailing_dollar);
1637 char *realloc_string_sub(char *string,
1638                         const char *pattern,
1639                         const char *insert);
1640 char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
1641                         const char *pattern,
1642                         const char *insert,
1643                         bool remove_unsafe_characters,
1644                         bool replace_once,
1645                         bool allow_trailing_dollar);
1646 char *talloc_string_sub(TALLOC_CTX *mem_ctx,
1647                         const char *src,
1648                         const char *pattern,
1649                         const char *insert);
1650 void all_string_sub(char *s,const char *pattern,const char *insert, size_t len);
1651 char *talloc_all_string_sub(TALLOC_CTX *ctx,
1652                                 const char *src,
1653                                 const char *pattern,
1654                                 const char *insert);
1655 char *octal_string(int i);
1656 char *string_truncate(char *s, unsigned int length);
1657 char *strchr_m(const char *src, char c);
1658 char *strrchr_m(const char *s, char c);
1659 char *strnrchr_m(const char *s, char c, unsigned int n);
1660 char *strstr_m(const char *src, const char *findstr);
1661 void strlower_m(char *s);
1662 void strupper_m(char *s);
1663 size_t strlen_m(const char *s);
1664 size_t strlen_m_term(const char *s);
1665 size_t strlen_m_term_null(const char *s);
1666 char *binary_string_rfc2254(char *buf, int len);
1667 char *binary_string(char *buf, int len);
1668 int fstr_sprintf(fstring s, const char *fmt, ...);
1669 char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
1670 bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src);
1671 bool str_list_compare(char **list1, char **list2);
1672 int str_list_count( const char **list );
1673 bool str_list_sub_basic( char **list, const char *smb_name,
1674                          const char *domain_name );
1675 bool str_list_substitute(char **list, const char *pattern, const char *insert);
1676 char *ipstr_list_make(char **ipstr_list,
1677                         const struct ip_service *ip_list,
1678                         int ip_count);
1679 int ipstr_list_parse(const char *ipstr_list, struct ip_service **ip_list);
1680 void ipstr_list_free(char* ipstr_list);
1681 void rfc1738_unescape(char *buf);
1682 DATA_BLOB base64_decode_data_blob(const char *s);
1683 void base64_decode_inplace(char *s);
1684 char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
1685 SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
1686 SMB_OFF_T conv_str_size(const char * str);
1687 void string_append(char **left, const char *right);
1688 bool add_string_to_array(TALLOC_CTX *mem_ctx,
1689                          const char *str, const char ***strings,
1690                          int *num);
1691 void sprintf_append(TALLOC_CTX *mem_ctx, char **string, ssize_t *len,
1692                     size_t *bufsize, const char *fmt, ...);
1693 int asprintf_strupper_m(char **strp, const char *fmt, ...);
1694 char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...);
1695 char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...);
1696 char *sstring_sub(const char *src, char front, char back);
1697 bool validate_net_name( const char *name,
1698                 const char *invalid_chars,
1699                 int max_len);
1700 size_t ascii_len_n(const char *src, size_t n);
1701 size_t utf16_len(const void *buf);
1702 size_t utf16_len_n(const void *src, size_t n);
1703 char *escape_shell_string(const char *src);
1704
1705 /* The following definitions come from lib/util_unistr.c  */
1706
1707 void gfree_case_tables(void);
1708 void load_case_tables(void);
1709 void init_valid_table(void);
1710 size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate);
1711 char *skip_unibuf(char *src, size_t len);
1712 int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags);
1713 int rpcstr_pull_talloc(TALLOC_CTX *ctx,
1714                         char **dest,
1715                         void *src,
1716                         int src_len,
1717                         int flags);
1718 int rpcstr_pull_unistr2_fstring(char *dest, UNISTR2 *src);
1719 char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const UNISTR2 *src);
1720 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
1721 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
1722 void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
1723 void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
1724 char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
1725 const char *unistr2_static(const UNISTR2 *str);
1726 smb_ucs2_t toupper_w(smb_ucs2_t val);
1727 smb_ucs2_t tolower_w( smb_ucs2_t val );
1728 bool islower_w(smb_ucs2_t c);
1729 bool isupper_w(smb_ucs2_t c);
1730 bool isvalid83_w(smb_ucs2_t c);
1731 size_t strlen_w(const smb_ucs2_t *src);
1732 size_t strnlen_w(const smb_ucs2_t *src, size_t max);
1733 smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1734 smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c);
1735 smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
1736 smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
1737 smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
1738 bool strlower_w(smb_ucs2_t *s);
1739 bool strupper_w(smb_ucs2_t *s);
1740 void strnorm_w(smb_ucs2_t *s, int case_default);
1741 int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1742 int strncmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1743 int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
1744 int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
1745 bool strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
1746 bool strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n);
1747 smb_ucs2_t *strdup_w(const smb_ucs2_t *src);
1748 smb_ucs2_t *strndup_w(const smb_ucs2_t *src, size_t len);
1749 smb_ucs2_t *strncpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1750 smb_ucs2_t *strncat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const size_t max);
1751 smb_ucs2_t *strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src);
1752 void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc);
1753 bool trim_string_w(smb_ucs2_t *s, const smb_ucs2_t *front,
1754                                   const smb_ucs2_t *back);
1755 int strcmp_wa(const smb_ucs2_t *a, const char *b);
1756 int strncmp_wa(const smb_ucs2_t *a, const char *b, size_t len);
1757 smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p);
1758 smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins);
1759 int unistrlen(uint16 *s);
1760 int unistrcpy(uint16 *dst, uint16 *src);
1761 UNISTR2* ucs2_to_unistr2(TALLOC_CTX *ctx, UNISTR2* dst, smb_ucs2_t* src);
1762 int toupper_ascii(int c);
1763 int tolower_ascii(int c);
1764 int isupper_ascii(int c);
1765 int islower_ascii(int c);
1766
1767 /* The following definitions come from lib/util_uuid.c  */
1768
1769 void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr);
1770 void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu);
1771 void smb_uuid_generate_random(struct GUID *uu);
1772 const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu);
1773 bool smb_string_to_uuid(const char *in, struct GUID* uu);
1774 char *guid_binstring(const struct GUID *guid);
1775
1776 /* The following definitions come from lib/version.c  */
1777
1778 const char *samba_version_string(void);
1779
1780 /* The following definitions come from lib/winbind_util.c  */
1781
1782 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1783                          enum lsa_SidType *name_type);
1784 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1785                         const char **domain, const char **name,
1786                         enum lsa_SidType *name_type);
1787 bool winbind_ping(void);
1788 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1789 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1790 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1791 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1792 wbcErr wb_is_trusted_domain(const char *domain);
1793 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1794                          const DOM_SID *domain_sid,
1795                          int num_rids, uint32 *rids,
1796                          const char **domain_name,
1797                          const char ***names, enum lsa_SidType **types);
1798 bool winbind_allocate_uid(uid_t *uid);
1799 bool winbind_allocate_gid(gid_t *gid);
1800 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, 
1801                          enum lsa_SidType *name_type);
1802 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, 
1803                         const char **domain, const char **name,
1804                         enum lsa_SidType *name_type);
1805 bool winbind_ping(void);
1806 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid);
1807 bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
1808 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid);
1809 bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid);
1810 wbcErr wb_is_trusted_domain(const char *domain);
1811 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
1812                          const DOM_SID *domain_sid,
1813                          int num_rids, uint32 *rids,
1814                          const char **domain_name,
1815                          const char ***names, enum lsa_SidType **types);
1816 bool winbind_allocate_uid(uid_t *uid);
1817 bool winbind_allocate_gid(gid_t *gid);
1818
1819 /* The following definitions come from lib/wins_srv.c  */
1820
1821 bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip);
1822 void wins_srv_alive(struct in_addr wins_ip, struct in_addr src_ip);
1823 void wins_srv_died(struct in_addr wins_ip, struct in_addr src_ip);
1824 unsigned wins_srv_count(void);
1825 char **wins_srv_tags(void);
1826 void wins_srv_tags_free(char **list);
1827 struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip);
1828 unsigned wins_srv_count_tag(const char *tag);
1829
1830 /* The following definitions come from lib/xfile.c  */
1831
1832 int x_setvbuf(XFILE *f, char *buf, int mode, size_t size);
1833 XFILE *x_fopen(const char *fname, int flags, mode_t mode);
1834 XFILE *x_fdup(const XFILE *f);
1835 int x_fclose(XFILE *f);
1836 size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f);
1837 int x_fileno(const XFILE *f);
1838 int x_fflush(XFILE *f);
1839 void x_setbuffer(XFILE *f, char *buf, size_t size);
1840 void x_setbuf(XFILE *f, char *buf);
1841 void x_setlinebuf(XFILE *f);
1842 int x_feof(XFILE *f);
1843 int x_ferror(XFILE *f);
1844 int x_fgetc(XFILE *f);
1845 size_t x_fread(void *p, size_t size, size_t nmemb, XFILE *f);
1846 char *x_fgets(char *s, int size, XFILE *stream) ;
1847 off_t x_tseek(XFILE *f, off_t offset, int whence);
1848
1849 /* The following definitions come from libads/ads_status.c  */
1850
1851 ADS_STATUS ads_build_error(enum ads_error_type etype, 
1852                            int rc, int minor_status);
1853 ADS_STATUS ads_build_nt_error(enum ads_error_type etype, 
1854                            NTSTATUS nt_status);
1855 NTSTATUS ads_ntstatus(ADS_STATUS status);
1856 const char *ads_errstr(ADS_STATUS status);
1857 NTSTATUS gss_err_to_ntstatus(uint32 maj, uint32 min);
1858
1859 /* The following definitions come from libads/ads_struct.c  */
1860
1861 char *ads_build_path(const char *realm, const char *sep, const char *field, int reverse);
1862 char *ads_build_dn(const char *realm);
1863 char *ads_build_domain(const char *dn);
1864 ADS_STRUCT *ads_init(const char *realm, 
1865                      const char *workgroup,
1866                      const char *ldap_server);
1867 void ads_destroy(ADS_STRUCT **ads);
1868
1869 /* The following definitions come from libads/ads_utils.c  */
1870
1871 uint32 ads_acb2uf(uint32 acb);
1872 uint32 ads_uf2acb(uint32 uf);
1873 uint32 ads_uf2atype(uint32 uf);
1874 uint32 ads_gtype2atype(uint32 gtype);
1875 enum lsa_SidType ads_atype_map(uint32 atype);
1876
1877 /* The following definitions come from libads/authdata.c  */
1878
1879 struct PAC_LOGON_INFO *get_logon_info_from_pac(struct PAC_DATA *pac_data);
1880 NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
1881                              const char *name,
1882                              const char *pass,
1883                              time_t time_offset,
1884                              time_t *expire_time,
1885                              time_t *renew_till_time,
1886                              const char *cache_name,
1887                              bool request_pac,
1888                              bool add_netbios_addr,
1889                              time_t renewable_time,
1890                              struct PAC_DATA **pac_ret);
1891 NTSTATUS kerberos_return_info3_from_pac(TALLOC_CTX *mem_ctx,
1892                                         const char *name,
1893                                         const char *pass,
1894                                         time_t time_offset,
1895                                         time_t *expire_time,
1896                                         time_t *renew_till_time,
1897                                         const char *cache_name,
1898                                         bool request_pac,
1899                                         bool add_netbios_addr,
1900                                         time_t renewable_time,
1901                                         struct netr_SamInfo3 **info3);
1902
1903 /* The following definitions come from libads/cldap.c  */
1904 bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
1905                         const char *server,
1906                         const char *realm,
1907                         uint32_t nt_version,
1908                         struct netlogon_samlogon_response **reply);
1909 bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
1910                           const char *server,
1911                           const char *realm,
1912                           struct NETLOGON_SAM_LOGON_RESPONSE_EX *reply5);
1913
1914 /* The following definitions come from libads/disp_sec.c  */
1915
1916 void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, SEC_DESC *sd);
1917
1918 /* The following definitions come from libads/dns.c  */
1919
1920 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
1921                                 const char *dnsdomain,
1922                                 struct dns_rr_ns **nslist,
1923                                 int *numns);
1924 bool sitename_store(const char *realm, const char *sitename);
1925 char *sitename_fetch(const char *realm);
1926 bool stored_sitename_changed(const char *realm, const char *sitename);
1927 NTSTATUS ads_dns_query_dcs(TALLOC_CTX *ctx,
1928                            const char *realm,
1929                            const char *sitename,
1930                            struct dns_rr_srv **dclist,
1931                            int *numdcs );
1932 NTSTATUS ads_dns_query_gcs(TALLOC_CTX *ctx,
1933                            const char *realm,
1934                            const char *sitename,
1935                            struct dns_rr_srv **dclist,
1936                            int *numdcs );
1937 NTSTATUS ads_dns_query_kdcs(TALLOC_CTX *ctx,
1938                             const char *dns_forest_name,
1939                             const char *sitename,
1940                             struct dns_rr_srv **dclist,
1941                             int *numdcs );
1942 NTSTATUS ads_dns_query_pdc(TALLOC_CTX *ctx,
1943                            const char *dns_domain_name,
1944                            struct dns_rr_srv **dclist,
1945                            int *numdcs );
1946 NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
1947                                 const char *dns_forest_name,
1948                                 const struct GUID *domain_guid,
1949                                 struct dns_rr_srv **dclist,
1950                                 int *numdcs );
1951
1952 /* The following definitions come from libads/kerberos.c  */
1953
1954 int kerberos_kinit_password_ext(const char *principal,
1955                                 const char *password,
1956                                 int time_offset,
1957                                 time_t *expire_time,
1958                                 time_t *renew_till_time,
1959                                 const char *cache_name,
1960                                 bool request_pac,
1961                                 bool add_netbios_addr,
1962                                 time_t renewable_time,
1963                                 NTSTATUS *ntstatus);
1964 int ads_kinit_password(ADS_STRUCT *ads);
1965 int ads_kdestroy(const char *cc_name);
1966 char* kerberos_standard_des_salt( void );
1967 bool kerberos_secrets_store_des_salt( const char* salt );
1968 char* kerberos_secrets_fetch_des_salt( void );
1969 char *kerberos_get_default_realm_from_ccache( void );
1970 bool kerberos_secrets_store_salting_principal(const char *service,
1971                                               int enctype,
1972                                               const char *principal);
1973 int kerberos_kinit_password(const char *principal,
1974                             const char *password,
1975                             int time_offset,
1976                             const char *cache_name);
1977 bool create_local_private_krb5_conf_for_domain(const char *realm,
1978                                                 const char *domain,
1979                                                 const char *sitename,
1980                                                 struct sockaddr_storage *pss);
1981
1982 /* The following definitions come from libads/kerberos_keytab.c  */
1983
1984 int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
1985 int ads_keytab_flush(ADS_STRUCT *ads);
1986 int ads_keytab_create_default(ADS_STRUCT *ads);
1987 int ads_keytab_list(const char *keytab_name);
1988
1989 /* The following definitions come from libads/kerberos_verify.c  */
1990
1991 NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
1992                            const char *realm,
1993                            time_t time_offset,
1994                            const DATA_BLOB *ticket,
1995                            char **principal,
1996                            struct PAC_DATA **pac_data,
1997                            DATA_BLOB *ap_rep,
1998                            DATA_BLOB *session_key,
1999                            bool use_replay_cache);
2000
2001 /* The following definitions come from libads/krb5_errs.c  */
2002
2003
2004 /* The following definitions come from libads/krb5_setpw.c  */
2005
2006 ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ, 
2007                                  const char *newpw, int time_offset);
2008 ADS_STATUS kerberos_set_password(const char *kpasswd_server, 
2009                                  const char *auth_principal, const char *auth_password,
2010                                  const char *target_principal, const char *new_password,
2011                                  int time_offset);
2012 ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
2013                                     const char *machine_account,
2014                                     const char *password);
2015
2016 /* The following definitions come from libads/ldap.c  */
2017
2018 bool ads_sitename_match(ADS_STRUCT *ads);
2019 bool ads_closest_dc(ADS_STRUCT *ads);
2020 ADS_STATUS ads_connect(ADS_STRUCT *ads);
2021 ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
2022 ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
2023 void ads_disconnect(ADS_STRUCT *ads);
2024 ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
2025                                 int scope, const char *expr, const char **attrs,
2026                                 bool (*fn)(ADS_STRUCT *, char *, void **, void *), 
2027                                 void *data_area);
2028 void ads_memfree(ADS_STRUCT *ads, void *mem);
2029 char *ads_parent_dn(const char *dn);
2030 ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
2031 ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods, 
2032                        const char *name, const char *val);
2033 ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2034                            const char *name, const char **vals);
2035 ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods);
2036 ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods);
2037 ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn);
2038 char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit);
2039 char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
2040 ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
2041                                 const char *name, const char **vals);
2042 uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
2043 uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
2044 ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
2045 ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name, 
2046                                           const char *my_fqdn, const char *spn);
2047 ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2048                                    const char *org_unit);
2049 ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name, 
2050                                  const char *org_unit, bool *moved);
2051 int ads_count_replies(ADS_STRUCT *ads, void *res);
2052 ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn);
2053 ADS_STATUS ads_current_time(ADS_STRUCT *ads);
2054 ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32 *val);
2055 ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, DOM_SID *sid);
2056 ADS_STATUS ads_site_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char **site_name);
2057 ADS_STATUS ads_site_dn_for_machine(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site_dn);
2058 ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffixes, size_t *num_suffixes);
2059 ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
2060                                 TALLOC_CTX *mem_ctx,
2061                                 char ***ous,
2062                                 size_t *num_ous);
2063 ADS_STATUS ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
2064                                         const char *extended_dn,
2065                                         enum ads_extended_dn_flags flags,
2066                                         DOM_SID *sid);
2067 char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2068 char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2069 char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
2070 ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
2071                         uint32 account_type, const char *org_unit);
2072 ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname);
2073 ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
2074                                TALLOC_CTX *mem_ctx,
2075                                const char *samaccountname,
2076                                uint32 *uac_ret,
2077                                const char **dn_ret);
2078 ADS_STATUS ads_config_path(ADS_STRUCT *ads, 
2079                            TALLOC_CTX *mem_ctx, 
2080                            char **config_path);
2081 const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads, 
2082                                                 const char *config_path, 
2083                                                 TALLOC_CTX *mem_ctx, 
2084                                                 const struct GUID *rights_guid);
2085 ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
2086                            ADS_STRUCT *ads,
2087                            const char **account_ou);
2088
2089 /* The following definitions come from libads/ldap_printer.c  */
2090
2091 ADS_STATUS ads_mod_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2092                                  TALLOC_CTX *ctx, const ADS_MODLIST *mods);
2093 ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
2094                                         TALLOC_CTX *ctx, ADS_MODLIST *mods);
2095 WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, 
2096                                           TALLOC_CTX *mem_ctx,
2097                                           ADS_MODLIST *mods,
2098                                           const char *printer);
2099 bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
2100                                        ADS_MODLIST *mods,
2101                                        NT_PRINTER_DATA *data);
2102
2103 /* The following definitions come from libads/ldap_schema.c  */
2104
2105 ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
2106                                      const char *schema_path,
2107                                      const char **OIDs, size_t num_OIDs, 
2108                                      char ***OIDs_out, char ***names, size_t *count);
2109 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
2110                                      const char *schema_path, 
2111                                      TALLOC_CTX *mem_ctx, 
2112                                      const struct GUID *schema_guid);
2113 const char *ads_get_attrname_by_oid(ADS_STRUCT *ads, const char *schema_path, TALLOC_CTX *mem_ctx, const char * OID);
2114 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
2115 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
2116                                           ADS_STRUCT *ads,
2117                                           enum wb_posix_mapping map_type,
2118                                           struct posix_schema **s ) ;
2119
2120 /* The following definitions come from libads/ldap_user.c  */
2121
2122 ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user, 
2123                              const char *container, const char *fullname);
2124 ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group, 
2125                               const char *container, const char *comment);
2126
2127 /* The following definitions come from libads/ldap_utils.c  */
2128
2129 ADS_STATUS ads_ranged_search(ADS_STRUCT *ads, 
2130                              TALLOC_CTX *mem_ctx,
2131                              int scope,
2132                              const char *base,
2133                              const char *filter,
2134                              void *args,
2135                              const char *range_attr,
2136                              char ***strings,
2137                              size_t *num_strings);
2138 ADS_STATUS ads_ranged_search_internal(ADS_STRUCT *ads, 
2139                                       TALLOC_CTX *mem_ctx,
2140                                       int scope,
2141                                       const char *base,
2142                                       const char *filter,
2143                                       const char **attrs,
2144                                       void *args,
2145                                       const char *range_attr,
2146                                       char ***strings,
2147                                       size_t *num_strings,
2148                                       uint32 *first_usn,
2149                                       int *num_retries,
2150                                       bool *more_values);
2151
2152 /* The following definitions come from libads/ndr.c  */
2153
2154 void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r);
2155 void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r);
2156
2157 /* The following definitions come from libads/sasl.c  */
2158
2159 ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads);
2160
2161 /* The following definitions come from libads/sasl_wrapping.c  */
2162
2163 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2164                                    const struct ads_saslwrap_ops *ops,
2165                                    void *private_data);
2166 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
2167                                    const struct ads_saslwrap_ops *ops,
2168                                    void *private_data);
2169
2170 /* The following definitions come from libads/util.c  */
2171
2172 ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_principal);
2173 ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
2174                                        char **returned_principal);
2175
2176 /* The following definitions come from libcli/nbt/nbtname.c  */
2177
2178 _PUBLIC_ void ndr_print_nbt_string(struct ndr_print *ndr, const char *name, const char *s);
2179 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s);
2180 _PUBLIC_ enum ndr_err_code ndr_push_nbt_string(struct ndr_push *ndr, int ndr_flags, const char *s);
2181 _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r);
2182 _PUBLIC_ enum ndr_err_code ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r);
2183 _PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
2184 _PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name);
2185 _PUBLIC_ NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
2186 _PUBLIC_ void nbt_choose_called_name(TALLOC_CTX *mem_ctx,
2187                             struct nbt_name *n, const char *name, int type);
2188 _PUBLIC_ char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name);
2189 _PUBLIC_ enum ndr_err_code ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, const struct nbt_name **_r);
2190 _PUBLIC_ enum ndr_err_code ndr_push_wrepl_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r);
2191 _PUBLIC_ void ndr_print_wrepl_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r);
2192
2193 /* The following definitions come from libgpo/gpext/gpext.c  */
2194
2195 struct gp_extension *get_gp_extension_list(void);
2196 NTSTATUS unregister_gp_extension(const char *name);
2197 NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
2198                                int version,
2199                                const char *name,
2200                                const char *guid,
2201                                struct gp_extension_methods *methods);
2202 NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
2203                                const char *module,
2204                                const char *ext_guid,
2205                                struct gp_extension_reg_table *table,
2206                                struct gp_extension_reg_info *info);
2207 NTSTATUS shutdown_gp_extensions(void);
2208 NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx);
2209 NTSTATUS free_gp_extensions(void);
2210 void debug_gpext_header(int lvl,
2211                         const char *name,
2212                         uint32_t flags,
2213                         struct GROUP_POLICY_OBJECT *gpo,
2214                         const char *extension_guid,
2215                         const char *snapin_guid);
2216 NTSTATUS process_gpo_list_with_extension(ADS_STRUCT *ads,
2217                            TALLOC_CTX *mem_ctx,
2218                            uint32_t flags,
2219                            const struct nt_user_token *token,
2220                            struct GROUP_POLICY_OBJECT *gpo_list,
2221                            const char *extension_guid,
2222                            const char *snapin_guid);
2223 NTSTATUS gpext_process_extension(ADS_STRUCT *ads,
2224                                  TALLOC_CTX *mem_ctx,
2225                                  uint32_t flags,
2226                                  const struct nt_user_token *token,
2227                                  struct registry_key *root_key,
2228                                  struct GROUP_POLICY_OBJECT *gpo,
2229                                  const char *extension_guid,
2230                                  const char *snapin_guid);
2231
2232 /* The following definitions come from libgpo/gpo_fetch.c  */
2233
2234 NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
2235                                  const char *file_sys_path,
2236                                  char **server,
2237                                  char **service,
2238                                  char **nt_path,
2239                                  char **unix_path);
2240 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
2241                          struct cli_state *cli,
2242                          struct GROUP_POLICY_OBJECT *gpo);
2243 NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx,
2244                                     const char *unix_path,
2245                                     uint32_t *sysvol_version,
2246                                     char **display_name);
2247
2248 /* The following definitions come from libgpo/gpo_filesync.c  */
2249
2250 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
2251                        struct cli_state *cli,
2252                        const char *nt_path,
2253                        const char *unix_path);
2254 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
2255                               struct cli_state *cli,
2256                               const char *nt_path,
2257                               const char *local_path);
2258
2259 /* The following definitions come from libgpo/gpo_ini.c  */
2260
2261 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
2262                        const char *filename,
2263                        uint32_t *version,
2264                        char **display_name);
2265
2266 /* The following definitions come from libgpo/gpo_ldap.c  */
2267
2268 bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
2269                       const char *extension_raw,
2270                       struct GP_EXT **gp_ext);
2271 ADS_STATUS ads_get_gpo_link(ADS_STRUCT *ads,
2272                             TALLOC_CTX *mem_ctx,
2273                             const char *link_dn,
2274                             struct GP_LINK *gp_link_struct);
2275 ADS_STATUS ads_add_gpo_link(ADS_STRUCT *ads,
2276                             TALLOC_CTX *mem_ctx,
2277                             const char *link_dn,
2278                             const char *gpo_dn,
2279                             uint32_t gpo_opt);
2280 ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads,
2281                                TALLOC_CTX *mem_ctx,
2282                                const char *link_dn,
2283                                const char *gpo_dn);
2284 ADS_STATUS ads_get_gpo(ADS_STRUCT *ads,
2285                        TALLOC_CTX *mem_ctx,
2286                        const char *gpo_dn,
2287                        const char *display_name,
2288                        const char *guid_name,
2289                        struct GROUP_POLICY_OBJECT *gpo);
2290 ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
2291                              TALLOC_CTX *mem_ctx,
2292                              const char *dn,
2293                              struct nt_user_token **token);
2294 ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
2295                             TALLOC_CTX *mem_ctx,
2296                             const char *dn,
2297                             uint32_t flags,
2298                             const struct nt_user_token *token,
2299                             struct GROUP_POLICY_OBJECT **gpo_list);
2300
2301 /* The following definitions come from libgpo/gpo_reg.c  */
2302
2303 struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
2304 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
2305                        const char *initial_path,
2306                        uint32_t desired_access,
2307                        const struct nt_user_token *token,
2308                        struct gp_registry_context **reg_ctx);
2309 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
2310 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
2311                            const char *subkeyname,
2312                            struct registry_key *curr_key,
2313                            struct registry_key **new_key);
2314 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
2315                           struct gp_registry_context *reg_ctx,
2316                           const char *subkeyname,
2317                           struct registry_key **key);
2318 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
2319                            struct registry_key *key,
2320                            const char *val_name,
2321                            const char *val);
2322 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
2323                           struct registry_key *key,
2324                           const char *val_name,
2325                           const char **val);
2326 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
2327                           uint32_t flags,
2328                           const char *dn,
2329                           const struct nt_user_token *token,
2330                           struct GROUP_POLICY_OBJECT *gpo_list);
2331 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
2332                          uint32_t flags,
2333                          const DOM_SID *sid,
2334                          struct GROUP_POLICY_OBJECT **gpo_list);
2335 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
2336                      uint32_t flags,
2337                      struct registry_key *key,
2338                      const DOM_SID *sid);
2339 void dump_reg_val(int lvl, const char *direction,
2340                   const char *key, const char *subkey,
2341                   struct registry_value *val);
2342 void dump_reg_entry(uint32_t flags,
2343                     const char *dir,
2344                     struct gp_registry_entry *entry);
2345 void dump_reg_entries(uint32_t flags,
2346                       const char *dir,
2347                       struct gp_registry_entry *entries,
2348                       size_t num_entries);
2349 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
2350                                     struct gp_registry_entry *entry,
2351                                     struct gp_registry_entry **entries,
2352                                     size_t *num);
2353 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
2354                                 struct registry_key *root_key,
2355                                 struct gp_registry_context *reg_ctx,
2356                                 struct gp_registry_entry *entry,
2357                                 const struct nt_user_token *token,
2358                                 uint32_t flags);
2359
2360 /* The following definitions come from libgpo/gpo_sec.c  */
2361
2362 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo,
2363                                       const struct nt_user_token *token);
2364
2365 /* The following definitions come from libgpo/gpo_util.c  */
2366
2367 const char *cse_gpo_guid_string_to_name(const char *guid);
2368 const char *cse_gpo_name_to_guid_string(const char *name);
2369 const char *cse_snapin_gpo_guid_string_to_name(const char *guid);
2370 void dump_gp_ext(struct GP_EXT *gp_ext, int debuglevel);
2371 void dump_gpo(ADS_STRUCT *ads,
2372               TALLOC_CTX *mem_ctx,
2373               struct GROUP_POLICY_OBJECT *gpo,
2374               int debuglevel);
2375 void dump_gpo_list(ADS_STRUCT *ads,
2376                    TALLOC_CTX *mem_ctx,
2377                    struct GROUP_POLICY_OBJECT *gpo_list,
2378                    int debuglevel);
2379 void dump_gplink(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct GP_LINK *gp_link);
2380 ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
2381                              TALLOC_CTX *mem_ctx,
2382                              const struct nt_user_token *token,
2383                              struct registry_key *root_key,
2384                              struct GROUP_POLICY_OBJECT *gpo,
2385                              const char *extension_guid_filter,
2386                              uint32_t flags);
2387 ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
2388                                 TALLOC_CTX *mem_ctx,
2389                                 const struct nt_user_token *token,
2390                                 struct GROUP_POLICY_OBJECT *gpo_list,
2391                                 const char *extensions_guid_filter,
2392                                 uint32_t flags);
2393 NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
2394                            TALLOC_CTX *mem_ctx,
2395                            uint32_t flags,
2396                            struct GROUP_POLICY_OBJECT *gpo,
2397                            struct cli_state **cli_out);
2398 NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
2399                                 TALLOC_CTX *mem_ctx,
2400                                 uint32_t flags,
2401                                 struct GROUP_POLICY_OBJECT *gpo_list);
2402 NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx,
2403                            struct GROUP_POLICY_OBJECT *gpo,
2404                            char **unix_path);
2405 char *gpo_flag_str(uint32_t flags);
2406 NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
2407                       uint32_t flags,
2408                       const char *filename,
2409                       const char *suffix,
2410                       const char **filename_out);
2411 ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
2412                                 TALLOC_CTX *mem_ctx,
2413                                 const char *dn,
2414                                 struct nt_user_token **token);
2415
2416 /* The following definitions come from librpc/gen_ndr/ndr_dfs.c  */
2417
2418 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r);
2419 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r);
2420 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r);
2421 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2422 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2423 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r);
2424 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r);
2425 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2426 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2427 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r);
2428 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r);
2429 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r);
2430 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r);
2431 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2432 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2433 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2434 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r);
2435 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r);
2436 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r);
2437 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r);
2438 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r);
2439 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r);
2440 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r);
2441 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r);
2442 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r);
2443 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r);
2444 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r);
2445 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r);
2446 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r);
2447 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r);
2448 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r);
2449 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r);
2450 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r);
2451 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r);
2452 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r);
2453 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r);
2454 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r);
2455 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r);
2456 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r);
2457 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r);
2458 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r);
2459 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r);
2460 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r);
2461 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r);
2462 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r);
2463 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r);
2464 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r);
2465 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r);
2466 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r);
2467 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r);
2468 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r);
2469 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r);
2470 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r);
2471 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r);
2472 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r);
2473 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r);
2474 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r);
2475 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r);
2476 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r);
2477 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r);
2478 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r);
2479 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r);
2480 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r);
2481 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r);
2482 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r);
2483 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r);
2484 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r);
2485 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r);
2486 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r);
2487 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r);
2488 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r);
2489
2490 /* The following definitions come from librpc/gen_ndr/ndr_dssetup.c  */
2491
2492 _PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r);
2493 _PUBLIC_ void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2494 _PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r);
2495 _PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r);
2496 _PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r);
2497 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r);
2498 _PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r);
2499 _PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r);
2500 _PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r);
2501 _PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r);
2502 _PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r);
2503 _PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r);
2504 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r);
2505 _PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r);
2506 _PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r);
2507 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r);
2508 _PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r);
2509 _PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r);
2510 _PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r);
2511 _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r);
2512 _PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
2513
2514 /* The following definitions come from librpc/gen_ndr/ndr_echo.c  */
2515
2516 _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r);
2517 _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r);
2518 _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r);
2519 _PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r);
2520 _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r);
2521 _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r);
2522 _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r);
2523 _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const union echo_Info *r);
2524 _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum echo_Enum1 r);
2525 _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, enum echo_Enum1_32 r);
2526 _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, const struct echo_Enum2 *r);
2527 _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, const union echo_Enum3 *r);
2528 _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r);
2529 _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, const struct echo_AddOne *r);
2530 _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, const struct echo_EchoData *r);
2531 _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SinkData *r);
2532 _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, const struct echo_SourceData *r);
2533 _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall *r);
2534 _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r);
2535 _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSleep *r);
2536 _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r);
2537 _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r);
2538 _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r);
2539
2540 /* The following definitions come from librpc/gen_ndr/ndr_eventlog.c  */
2541
2542 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r);
2543 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r);
2544 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r);
2545 _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, const struct eventlog_Record *r);
2546 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r);
2547 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r);
2548 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r);
2549 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r);
2550 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r);
2551 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r);
2552 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r);
2553 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r);
2554 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r);
2555 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r);
2556 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r);
2557 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r);
2558 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r);
2559 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r);
2560 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r);
2561 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r);
2562 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r);
2563 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r);
2564 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r);
2565 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r);
2566 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r);
2567 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r);
2568 _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
2569 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
2570
2571 /* The following definitions come from librpc/gen_ndr/ndr_initshutdown.c  */
2572
2573 _PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
2574 _PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
2575 _PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
2576 _PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
2577 _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
2578 _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
2579 _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
2580
2581 /* The following definitions come from librpc/gen_ndr/ndr_krb5pac.c  */
2582
2583 _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
2584 _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r);
2585 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
2586 _PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
2587 _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
2588 _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);
2589 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
2590 _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
2591 _PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r);
2592 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r);
2593 _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r);
2594 _PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r);
2595 _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
2596 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
2597 _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
2598 _PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
2599 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r);
2600 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r);
2601 _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r);
2602 _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r);
2603 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r);
2604 _PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r);
2605 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r);
2606 _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r);
2607 _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r);
2608 _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r);
2609 _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r);
2610 _PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r);
2611 _PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r);
2612 _PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r);
2613 _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r);
2614
2615 /* The following definitions come from librpc/gen_ndr/ndr_lsa.c  */
2616
2617 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r);
2618 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r);
2619 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r);
2620 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r);
2621 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r);
2622 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r);
2623 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r);
2624 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r);
2625 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r);
2626 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r);
2627 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r);
2628 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r);
2629 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r);
2630 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r);
2631 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r);
2632 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r);
2633 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r);
2634 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r);
2635 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r);
2636 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r);
2637 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r);
2638 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r);
2639 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r);
2640 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2641 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2642 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
2643 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r);
2644 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r);
2645 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r);
2646 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r);
2647 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r);
2648 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r);
2649 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r);
2650 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r);
2651 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r);
2652 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r);
2653 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r);
2654 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r);
2655 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r);
2656 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r);
2657 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r);
2658 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r);
2659 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r);
2660 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r);
2661 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r);
2662 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r);
2663 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r);
2664 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r);
2665 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r);
2666 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r);
2667 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r);
2668 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r);
2669 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r);
2670 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r);
2671 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
2672 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
2673 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
2674 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
2675 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
2676 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
2677 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
2678 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r);
2679 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
2680 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
2681 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
2682 _PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
2683 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
2684 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
2685 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
2686 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
2687 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r);
2688 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r);
2689 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r);
2690 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r);
2691 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r);
2692 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r);
2693 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r);
2694 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r);
2695 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r);
2696 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r);
2697 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r);
2698 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r);
2699 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r);
2700 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r);
2701 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r);
2702 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r);
2703 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r);
2704 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r);
2705 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r);
2706 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r);
2707 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r);
2708 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r);
2709 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r);
2710 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r);
2711 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r);
2712 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r);
2713 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r);
2714 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r);
2715 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r);
2716 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r);
2717 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r);
2718 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r);
2719 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r);
2720 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r);
2721 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r);
2722 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r);
2723 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r);
2724 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r);
2725 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r);
2726 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r);
2727 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r);
2728 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r);
2729 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r);
2730 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r);
2731 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r);
2732 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r);
2733 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r);
2734 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r);
2735 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r);
2736 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r);
2737 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r);
2738 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r);
2739 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r);
2740 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r);
2741 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r);
2742 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r);
2743 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r);
2744 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r);
2745 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r);
2746 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r);
2747 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r);
2748 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r);
2749 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r);
2750 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r);
2751 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r);
2752 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r);
2753 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r);
2754 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r);
2755 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r);
2756 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r);
2757 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r);
2758 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r);
2759 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r);
2760 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r);
2761 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r);
2762 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r);
2763 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r);
2764 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r);
2765 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r);
2766 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r);
2767 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r);
2768 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r);
2769 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r);
2770 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r);
2771 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r);
2772 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r);
2773 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r);
2774 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r);
2775 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r);
2776 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r);
2777 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r);
2778 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r);
2779 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r);
2780 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r);
2781 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r);
2782 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r);
2783 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r);
2784 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r);
2785 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r);
2786 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r);
2787 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r);
2788 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r);
2789 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r);
2790 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r);
2791 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r);
2792 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r);
2793 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r);
2794 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r);
2795 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r);
2796 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r);
2797 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r);
2798 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
2799 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r);
2800 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r);
2801 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r);
2802 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r);
2803 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r);
2804 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r);
2805 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r);
2806 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r);
2807 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r);
2808 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r);
2809 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r);
2810 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r);
2811 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
2812 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r);
2813 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r);
2814 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r);
2815 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r);
2816 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r);
2817 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r);
2818 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
2819 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
2820 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r);
2821
2822 /* The following definitions come from librpc/gen_ndr/ndr_misc.c  */
2823
2824 _PUBLIC_ enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r);
2825 _PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r);
2826 _PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, int flags);
2827 _PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r);
2828 _PUBLIC_ enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r);
2829 _PUBLIC_ void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r);
2830 _PUBLIC_ enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
2831 _PUBLIC_ enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
2832 _PUBLIC_ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
2833 _PUBLIC_ enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r);
2834 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r);
2835 _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r);
2836 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r);
2837 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r);
2838 _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r);
2839 _PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r);
2840 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r);
2841 _PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r);
2842
2843 /* The following definitions come from librpc/gen_ndr/ndr_netlogon.c  */
2844
2845 _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r);
2846 _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r);
2847 _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r);
2848 _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r);
2849 _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r);
2850 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2851 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2852 _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r);
2853 _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r);
2854 _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
2855 _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
2856 _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
2857 _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r);
2858 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r);
2859 _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r);
2860 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
2861 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r);
2862 _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r);
2863 _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r);
2864 _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r);
2865 _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r);
2866 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
2867 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
2868 _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2869 _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r);
2870 _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r);
2871 _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r);
2872 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r);
2873 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r);
2874 _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r);
2875 _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r);
2876 _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r);
2877 _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
2878 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r);
2879 _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r);
2880 _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r);
2881 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r);
2882 _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r);
2883 _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
2884 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r);
2885 _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r);
2886 _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r);
2887 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r);
2888 _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r);
2889 _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r);
2890 _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r);
2891 _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r);
2892 _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r);
2893 _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r);
2894 _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r);
2895 _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r);
2896 _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r);
2897 _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r);
2898 _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r);
2899 _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r);
2900 _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r);
2901 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r);
2902 _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r);
2903 _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r);
2904 _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r);
2905 _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r);
2906 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_TRUST *r);
2907 _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r);
2908 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_ACCOUNT *r);
2909 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_SECRET *r);
2910 _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r);
2911 _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r);
2912 _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r);
2913 _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r);
2914 _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r);
2915 _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r);
2916 _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r);
2917 _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r);
2918 _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r);
2919 _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2920 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r);
2921 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r);
2922 _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r);
2923 _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r);
2924 _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r);
2925 _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r);
2926 _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2927 _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
2928 _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r);
2929 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r);
2930 _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2931 _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
2932 _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
2933 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
2934 _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r);
2935 _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
2936 _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
2937 _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r);
2938 _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r);
2939 _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r);
2940 _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r);
2941 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r);
2942 _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r);
2943 _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
2944 _PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
2945 _PUBLIC_ void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
2946 _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
2947 _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r);
2948 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r);
2949 _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r);
2950 _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r);
2951 _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r);
2952 _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r);
2953 _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r);
2954 _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r);
2955 _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r);
2956 _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r);
2957 _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r);
2958 _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r);
2959 _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r);
2960 _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r);
2961 _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r);
2962 _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r);
2963 _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r);
2964 _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r);
2965 _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r);
2966 _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r);
2967 _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r);
2968 _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r);
2969 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r);
2970 _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r);
2971 _PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r);
2972 _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
2973 _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r);
2974 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
2975 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
2976 _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r);
2977 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r);
2978 _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r);
2979 _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r);
2980 _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r);
2981 _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r);
2982 _PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r);
2983 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r);
2984 _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r);
2985 _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
2986 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r);
2987 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r);
2988 _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r);
2989 _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r);
2990 _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r);
2991 _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r);
2992 _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r);
2993 _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r);
2994 _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r);
2995 _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r);
2996 _PUBLIC_ void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r);
2997
2998 /* The following definitions come from librpc/gen_ndr/ndr_notify.c  */
2999
3000 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r);
3001 _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r);
3002 _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r);
3003 _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r);
3004 _PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r);
3005 _PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r);
3006 _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r);
3007 _PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r);
3008 _PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r);
3009 _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r);
3010
3011 /* The following definitions come from librpc/gen_ndr/ndr_ntsvcs.c  */
3012
3013 _PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r);
3014 _PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r);
3015 _PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r);
3016 _PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r);
3017 _PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r);
3018 _PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r);
3019 _PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r);
3020 _PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r);
3021 _PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r);
3022 _PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r);
3023 _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r);
3024 _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r);
3025 _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r);
3026 _PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r);
3027 _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r);
3028 _PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r);
3029 _PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r);
3030 _PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r);
3031 _PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r);
3032 _PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r);
3033 _PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r);
3034 _PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r);
3035 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r);
3036 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r);
3037 _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r);
3038 _PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r);
3039 _PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r);
3040 _PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r);
3041 _PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r);
3042 _PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r);
3043 _PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r);
3044 _PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r);
3045 _PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r);
3046 _PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r);
3047 _PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r);
3048 _PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r);
3049 _PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r);
3050 _PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r);
3051 _PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r);
3052 _PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r);
3053 _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r);
3054 _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r);
3055 _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r);
3056 _PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r);
3057 _PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r);
3058 _PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r);
3059 _PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r);
3060 _PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r);
3061 _PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r);
3062 _PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r);
3063 _PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r);
3064 _PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r);
3065 _PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r);
3066 _PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r);
3067 _PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r);
3068 _PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r);
3069 _PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r);
3070 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r);
3071 _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r);
3072 _PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r);
3073 _PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r);
3074 _PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r);
3075 _PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r);
3076 _PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r);
3077 _PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r);
3078 _PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r);
3079
3080 /* The following definitions come from librpc/gen_ndr/ndr_samr.c  */
3081
3082 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3083 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3084 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r);
3085 _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3086 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3087 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3088 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3089 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3090 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r);
3091 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r);
3092 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r);
3093 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3094 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3095 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
3096 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
3097 _PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r);
3098 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
3099 _PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r);
3100 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
3101 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
3102 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
3103 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
3104 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
3105 _PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r);
3106 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
3107 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
3108 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
3109 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r);
3110 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3111 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3112 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r);
3113 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r);
3114 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r);
3115 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r);
3116 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r);
3117 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r);
3118 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r);
3119 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r);
3120 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r);
3121 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r);
3122 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r);
3123 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r);
3124 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r);
3125 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r);
3126 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r);
3127 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r);
3128 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r);
3129 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r);
3130 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r);
3131 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r);
3132 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r);
3133 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r);
3134 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r);
3135 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r);
3136 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r);
3137 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r);
3138 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r);
3139 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r);
3140 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
3141 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
3142 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
3143 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r);
3144 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r);
3145 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3146 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r);
3147 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r);
3148 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r);
3149 _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r);
3150 _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r);
3151 _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r);
3152 _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r);
3153 _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r);
3154 _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r);
3155 _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r);
3156 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r);
3157 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r);
3158 _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r);
3159 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r);
3160 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r);
3161 _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r);
3162 _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r);
3163 _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r);
3164 _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r);
3165 _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r);
3166 _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r);
3167 _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r);
3168 _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r);
3169 _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r);
3170 _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r);
3171 _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r);
3172 _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r);
3173 _PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r);
3174 _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r);
3175 _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r);
3176 _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
3177 _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r);
3178 _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r);
3179 _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r);
3180 _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r);
3181 _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r);
3182 _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r);
3183 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r);
3184 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r);
3185 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r);
3186 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r);
3187 _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r);
3188 _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r);
3189 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r);
3190 _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r);
3191 _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r);
3192 _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r);
3193 _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r);
3194 _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r);
3195 _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r);
3196 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r);
3197 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r);
3198 _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r);
3199 _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r);
3200 _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r);
3201 _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r);
3202 _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r);
3203 _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r);
3204 _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r);
3205 _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r);
3206 _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r);
3207 _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r);
3208 _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r);
3209 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r);
3210 _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r);
3211 _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r);
3212 _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r);
3213 _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r);
3214 _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r);
3215 _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r);
3216 _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r);
3217 _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r);
3218 _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r);
3219 _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r);
3220 _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r);
3221 _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r);
3222 _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r);
3223 _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r);
3224 _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r);
3225 _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r);
3226 _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r);
3227 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r);
3228 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r);
3229 _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r);
3230 _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r);
3231 _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r);
3232 _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r);
3233 _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r);
3234 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r);
3235 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r);
3236 _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r);
3237 _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r);
3238 _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r);
3239 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r);
3240 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r);
3241 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r);
3242 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r);
3243 _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r);
3244 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r);
3245 _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r);
3246 _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r);
3247 _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r);
3248 _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r);
3249 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r);
3250 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r);
3251 _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r);
3252 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r);
3253 _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r);
3254 _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r);
3255 _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r);
3256 _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r);
3257 _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r);
3258 _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r);
3259 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r);
3260 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r);
3261 _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r);
3262 _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r);
3263 _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r);
3264 _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r);
3265 _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r);
3266 _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r);
3267 _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r);
3268 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r);
3269 _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r);
3270 _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r);
3271 _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r);
3272 _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r);
3273
3274 /* The following definitions come from librpc/gen_ndr/ndr_security.c  */
3275
3276 _PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r);
3277 _PUBLIC_ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r);
3278 _PUBLIC_ void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r);
3279 _PUBLIC_ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r);
3280 _PUBLIC_ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r);
3281 _PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r);
3282 _PUBLIC_ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r);
3283 _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r);
3284 _PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r);
3285 _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r);
3286 _PUBLIC_ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r);
3287 _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r);
3288 _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r);
3289 _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r);
3290 _PUBLIC_ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r);
3291 _PUBLIC_ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r);
3292 _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r);
3293 _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r);
3294 _PUBLIC_ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r);
3295 _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r);
3296 _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r);
3297 _PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r);
3298 _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr_flags, const struct security_token *r);
3299 _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r);
3300 _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r);
3301 _PUBLIC_ enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3302 _PUBLIC_ enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3303 _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r);
3304
3305 /* The following definitions come from librpc/gen_ndr/ndr_srvsvc.c  */
3306
3307 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r);
3308 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r);
3309 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r);
3310 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r);
3311 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r);
3312 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r);
3313 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r);
3314 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r);
3315 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r);
3316 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r);
3317 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r);
3318 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r);
3319 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r);
3320 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r);
3321 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r);
3322 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r);
3323 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r);
3324 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r);
3325 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r);
3326 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r);
3327 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r);
3328 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r);
3329 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r);
3330 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r);
3331 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r);
3332 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r);
3333 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r);
3334 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r);
3335 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r);
3336 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r);
3337 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r);
3338 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r);
3339 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r);
3340 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r);
3341 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r);
3342 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r);
3343 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r);
3344 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r);
3345 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r);
3346 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r);
3347 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r);
3348 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r);
3349 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r);
3350 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r);
3351 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r);
3352 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r);
3353 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r);
3354 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r);
3355 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r);
3356 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r);
3357 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r);
3358 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r);
3359 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r);
3360 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r);
3361 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r);
3362 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r);
3363 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r);
3364 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r);
3365 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r);
3366 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r);
3367 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r);
3368 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r);
3369 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r);
3370 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r);
3371 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r);
3372 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r);
3373 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r);
3374 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r);
3375 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r);
3376 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r);
3377 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r);
3378 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r);
3379 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r);
3380 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r);
3381 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r);
3382 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r);
3383 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r);
3384 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r);
3385 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r);
3386 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r);
3387 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r);
3388 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r);
3389 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r);
3390 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r);
3391 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r);
3392 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r);
3393 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r);
3394 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r);
3395 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r);
3396 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r);
3397 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r);
3398 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r);
3399 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r);
3400 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r);
3401 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r);
3402 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r);
3403 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r);
3404 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r);
3405 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r);
3406 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r);
3407 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r);
3408 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r);
3409 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r);
3410 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r);
3411 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r);
3412 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r);
3413 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r);
3414 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r);
3415 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r);
3416 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r);
3417 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r);
3418 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r);
3419 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r);
3420 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r);
3421 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r);
3422 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r);
3423 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r);
3424 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r);
3425 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r);
3426 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r);
3427 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r);
3428 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r);
3429 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r);
3430 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r);
3431 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r);
3432 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r);
3433 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r);
3434 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r);
3435 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r);
3436 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r);
3437 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r);
3438 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r);
3439 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r);
3440 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r);
3441 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r);
3442 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r);
3443 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r);
3444 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r);
3445 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r);
3446 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r);
3447 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r);
3448 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r);
3449 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r);
3450 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r);
3451 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r);
3452 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r);
3453 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r);
3454 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r);
3455 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r);
3456 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r);
3457 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r);
3458 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r);
3459 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r);
3460 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r);
3461 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r);
3462 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r);
3463 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r);
3464 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r);
3465 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r);
3466 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r);
3467 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r);
3468 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r);
3469 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r);
3470 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r);
3471 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r);
3472 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r);
3473 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r);
3474 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r);
3475 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r);
3476 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r);
3477 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r);
3478 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r);
3479 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r);
3480 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r);
3481 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r);
3482 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r);
3483 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r);
3484 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r);
3485 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r);
3486 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r);
3487 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r);
3488 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r);
3489 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
3490 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
3491 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
3492 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r);
3493 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r);
3494 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r);
3495 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r);
3496 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
3497 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
3498 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
3499
3500 /* The following definitions come from librpc/gen_ndr/ndr_svcctl.c  */
3501
3502 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r);
3503 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r);
3504 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r);
3505 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
3506 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
3507 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
3508 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3509 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3510 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
3511 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
3512 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
3513 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r);
3514 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r);
3515 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r);
3516 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r);
3517 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r);
3518 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r);
3519 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r);
3520 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r);
3521 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r);
3522 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r);
3523 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r);
3524 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r);
3525 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r);
3526 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r);
3527 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r);
3528 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r);
3529 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r);
3530 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r);
3531 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r);
3532 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r);
3533 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r);
3534 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r);
3535 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r);
3536 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r);
3537 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r);
3538 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r);
3539 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r);
3540 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r);
3541 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r);
3542 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r);
3543 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r);
3544 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r);
3545 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r);
3546 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r);
3547 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r);
3548 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r);
3549 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r);
3550 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r);
3551 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r);
3552 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r);
3553 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r);
3554
3555 /* The following definitions come from librpc/gen_ndr/ndr_winreg.c  */
3556
3557 _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
3558 _PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
3559 _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r);
3560 _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r);
3561 _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r);
3562 _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r);
3563 _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
3564 _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
3565 _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
3566 _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
3567 _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
3568 _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
3569 _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
3570 _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r);
3571 _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r);
3572 _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r);
3573 _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r);
3574 _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r);
3575 _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r);
3576 _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r);
3577 _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r);
3578 _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r);
3579 _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r);
3580 _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r);
3581 _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r);
3582 _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r);
3583 _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r);
3584 _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r);
3585 _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r);
3586 _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r);
3587 _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r);
3588 _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r);
3589 _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKey *r);
3590 _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetKeySecurity *r);
3591 _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetValue *r);
3592 _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r);
3593 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r);
3594 _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r);
3595 _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r);
3596 _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r);
3597 _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r);
3598 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r);
3599 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r);
3600 _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r);
3601 _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPT *r);
3602 _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPN *r);
3603 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r);
3604
3605 /* The following definitions come from librpc/gen_ndr/ndr_wkssvc.c  */
3606
3607 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo100 *r);
3608 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo101 *r);
3609 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo102 *r);
3610 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo502 *r);
3611 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1010 *r);
3612 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1011 *r);
3613 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1012 *r);
3614 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1013 *r);
3615 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1018 *r);
3616 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1023 *r);
3617 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1027 *r);
3618 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1028(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1028 *r);
3619 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1032(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1032 *r);
3620 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1033 *r);
3621 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1041(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1041 *r);
3622 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1042(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1042 *r);
3623 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1043(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1043 *r);
3624 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1044(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1044 *r);
3625 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1045(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1045 *r);
3626 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1046(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1046 *r);
3627 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1047(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1047 *r);
3628 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1048(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1048 *r);
3629 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1049(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1049 *r);
3630 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1050(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1050 *r);
3631 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1051(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1051 *r);
3632 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1052(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1052 *r);
3633 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1053(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1053 *r);
3634 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1054(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1054 *r);
3635 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1055(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1055 *r);
3636 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1056(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1056 *r);
3637 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1057(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1057 *r);
3638 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1058(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1058 *r);
3639 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1059(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1059 *r);
3640 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1060(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1060 *r);
3641 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1061(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1061 *r);
3642 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1062(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1062 *r);
3643 _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaInfo *r);
3644 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo0 *r);
3645 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr0 *r);
3646 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1 *r);
3647 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr1 *r);
3648 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaEnumUsersCtr *r);
3649 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersInfo *r);
3650 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1101 *r);
3651 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetrWkstaUserInfo *r);
3652 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo0 *r);
3653 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportCtr0 *r);
3654 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaTransportCtr *r);
3655 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo *r);
3656 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo3(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo3 *r);
3657 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo2 *r);
3658 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo1 *r);
3659 _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo0 *r);
3660 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfoCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseGetInfoCtr *r);
3661 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr2 *r);
3662 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr1 *r);
3663 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr0 *r);
3664 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseEnumCtr *r);
3665 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumInfo *r);
3666 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatistics(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWorkstationStatistics *r);
3667 _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *name, uint32_t r);
3668 _PUBLIC_ void ndr_print_wkssvc_NetValidateNameType(struct ndr_print *ndr, const char *name, enum wkssvc_NetValidateNameType r);
3669 _PUBLIC_ void ndr_print_wkssvc_NetJoinStatus(struct ndr_print *ndr, const char *name, enum wkssvc_NetJoinStatus r);
3670 _PUBLIC_ void ndr_print_wkssvc_PasswordBuffer(struct ndr_print *ndr, const char *name, const struct wkssvc_PasswordBuffer *r);
3671 _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name, uint32_t r);
3672 _PUBLIC_ void ndr_print_wkssvc_ComputerNameType(struct ndr_print *ndr, const char *name, enum wkssvc_ComputerNameType r);
3673 _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const char *name, const struct wkssvc_ComputerNamesCtr *r);
3674 _PUBLIC_ void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaGetInfo *r);
3675 _PUBLIC_ void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaSetInfo *r);
3676 _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaEnumUsers *r);
3677 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserGetInfo *r);
3678 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaUserSetInfo *r);
3679 _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetWkstaTransportEnum *r);
3680 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportAdd *r);
3681 _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWkstaTransportDel *r);
3682 _PUBLIC_ void ndr_print_wkssvc_NetrUseAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseAdd *r);
3683 _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseGetInfo *r);
3684 _PUBLIC_ void ndr_print_wkssvc_NetrUseDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseDel *r);
3685 _PUBLIC_ void ndr_print_wkssvc_NetrUseEnum(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUseEnum *r);
3686 _PUBLIC_ void ndr_print_wkssvc_NetrMessageBufferSend(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrMessageBufferSend *r);
3687 _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrWorkstationStatisticsGet *r);
3688 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameAdd(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameAdd *r);
3689 _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameDel(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrLogonDomainNameDel *r);
3690 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain *r);
3691 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain *r);
3692 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain *r);
3693 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName *r);
3694 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinInformation *r);
3695 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus *r);
3696 _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrJoinDomain2 *r);
3697 _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrUnjoinDomain2 *r);
3698 _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRenameMachineInDomain2 *r);
3699 _PUBLIC_ void ndr_print_wkssvc_NetrValidateName2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrValidateName2 *r);
3700 _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus2 *r);
3701 _PUBLIC_ void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrAddAlternateComputerName *r);
3702 _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrRemoveAlternateComputerName *r);
3703 _PUBLIC_ void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrSetPrimaryComputername *r);
3704 _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrEnumerateComputerNames *r);
3705
3706 /* The following definitions come from librpc/gen_ndr/ndr_xattr.c  */
3707
3708 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r);
3709 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r);
3710 _PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r);
3711 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r);
3712 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r);
3713 _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r);
3714
3715 /* The following definitions come from librpc/gen_ndr/srv_dfs.c  */
3716
3717 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3718 NTSTATUS rpc_netdfs_init(void);
3719
3720 /* The following definitions come from librpc/gen_ndr/srv_dssetup.c  */
3721
3722 void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns);
3723 NTSTATUS rpc_dssetup_init(void);
3724
3725 /* The following definitions come from librpc/gen_ndr/srv_echo.c  */
3726
3727 void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns);
3728 NTSTATUS rpc_rpcecho_init(void);
3729
3730 /* The following definitions come from librpc/gen_ndr/srv_eventlog.c  */
3731
3732 void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns);
3733 NTSTATUS rpc_eventlog_init(void);
3734
3735 /* The following definitions come from librpc/gen_ndr/srv_initshutdown.c  */
3736
3737 void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns);
3738 NTSTATUS rpc_initshutdown_init(void);
3739
3740 /* The following definitions come from librpc/gen_ndr/srv_lsa.c  */
3741
3742 void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3743 NTSTATUS rpc_lsarpc_init(void);
3744
3745 /* The following definitions come from librpc/gen_ndr/srv_netlogon.c  */
3746
3747 void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns);
3748 NTSTATUS rpc_netlogon_init(void);
3749
3750 /* The following definitions come from librpc/gen_ndr/srv_ntsvcs.c  */
3751
3752 void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns);
3753 NTSTATUS rpc_ntsvcs_init(void);
3754
3755 /* The following definitions come from librpc/gen_ndr/srv_samr.c  */
3756
3757 void samr_get_pipe_fns(struct api_struct **fns, int *n_fns);
3758 NTSTATUS rpc_samr_init(void);
3759
3760 /* The following definitions come from librpc/gen_ndr/srv_srvsvc.c  */
3761
3762 void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3763 NTSTATUS rpc_srvsvc_init(void);
3764
3765 /* The following definitions come from librpc/gen_ndr/srv_svcctl.c  */
3766
3767 void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns);
3768 NTSTATUS rpc_svcctl_init(void);
3769
3770 /* The following definitions come from librpc/gen_ndr/srv_winreg.c  */
3771
3772 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns);
3773 NTSTATUS rpc_winreg_init(void);
3774
3775 /* The following definitions come from librpc/gen_ndr/srv_wkssvc.c  */
3776
3777 void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
3778 NTSTATUS rpc_wkssvc_init(void);
3779
3780 /* The following definitions come from librpc/ndr/ndr.c  */
3781
3782 _PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n);
3783 _PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
3784 _PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
3785 _PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save);
3786 _PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save);
3787 _PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
3788 _PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
3789 _PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
3790 _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3791 _PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
3792 _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
3793 _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3794 _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
3795 _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);
3796 _PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
3797 _PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
3798                                 ndr_print_function_t fn, const char *name, 
3799                                 int flags, void *ptr);
3800 _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags);
3801 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
3802 const char *ndr_errstr(enum ndr_err_code err);
3803 _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
3804                                  enum ndr_err_code ndr_err,
3805                                  const char *format, ...) _PRINTF_ATTRIBUTE(3,4);
3806 _PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
3807                                  enum ndr_err_code ndr_err,
3808                                  const char *format, ...)  _PRINTF_ATTRIBUTE(3,4);
3809 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
3810                                    struct ndr_pull **_subndr,
3811                                    size_t header_size,
3812                                    ssize_t size_is);
3813 _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr,
3814                                  struct ndr_pull *subndr,
3815                                  size_t header_size,
3816                                  ssize_t size_is);
3817 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
3818                                    struct ndr_push **_subndr,
3819                                    size_t header_size,
3820                                    ssize_t size_is);
3821 _PUBLIC_ enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr,
3822                                  struct ndr_push *subndr,
3823                                  size_t header_size,
3824                                  ssize_t size_is);
3825 _PUBLIC_ enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx,
3826                          struct ndr_token_list **list, 
3827                          const void *key, 
3828                          uint32_t value);
3829 _PUBLIC_ enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
3830                                    comparison_fn_t _cmp_fn, bool _remove_tok);
3831 _PUBLIC_ enum ndr_err_code ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v);
3832 _PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key);
3833 _PUBLIC_ enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p);
3834 _PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p);
3835 _PUBLIC_ enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size);
3836 _PUBLIC_ enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p);
3837 _PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p);
3838 _PUBLIC_ enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length);
3839 _PUBLIC_ enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val);
3840 _PUBLIC_ enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val);
3841 _PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val);
3842 _PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p);
3843 _PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
3844 _PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p);
3845 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3846                               ndr_pull_flags_fn_t fn);
3847 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3848                                   ndr_pull_flags_fn_t fn);
3849 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3850                              uint32_t level, ndr_pull_flags_fn_t fn);
3851 _PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3852                              uint32_t level, ndr_pull_flags_fn_t fn);
3853 _PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p,
3854                               ndr_push_flags_fn_t fn);
3855 _PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
3856                              uint32_t level, ndr_push_flags_fn_t fn);
3857 _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
3858 _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
3859 _PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
3860 _PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset);
3861 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset);
3862 _PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p);
3863 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
3864 _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p);
3865 _PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
3866 _PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
3867 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset);
3868 _PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p);
3869 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset);
3870 _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p);
3871
3872 /* The following definitions come from librpc/ndr/ndr_basic.c  */
3873
3874 _PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n);
3875 _PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v);
3876 _PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v);
3877 _PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v);
3878 _PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v);
3879 _PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v);
3880 _PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v);
3881 _PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v);
3882 _PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v);
3883 _PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3884 _PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3885 _PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v);
3886 _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v);
3887 _PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v);
3888 _PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status);
3889 _PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status);
3890 _PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r);
3891 _PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status);
3892 _PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status);
3893 _PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r);
3894 _PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n);
3895 _PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n);
3896 _PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v);
3897 _PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v);
3898 _PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v);
3899 _PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v);
3900 _PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v);
3901 _PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v);
3902 _PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v);
3903 _PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v);
3904 _PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v);
3905 _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v);
3906 _PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v);
3907 _PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size);
3908 _PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
3909 _PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n);
3910 _PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
3911 _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n);
3912 _PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save);
3913 _PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save);
3914 _PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p);
3915 _PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p);
3916 _PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr);
3917 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t);
3918 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
3919 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t);
3920 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
3921 _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t);
3922 _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t);
3923 _PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t);
3924 _PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t);
3925 _PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address);
3926 _PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address);
3927 _PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, 
3928                            const char *address);
3929 _PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type);
3930 _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 
3931                     const char *val, uint32_t value);
3932 _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
3933 _PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v);
3934 _PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v);
3935 _PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v);
3936 _PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v);
3937 _PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v);
3938 _PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v);
3939 _PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v);
3940 _PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v);
3941 _PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v);
3942 _PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v);
3943 _PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v);
3944 _PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p);
3945 _PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t);
3946 _PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t);
3947 _PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t);
3948 _PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t);
3949 _PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type);
3950 _PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level);
3951 _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 
3952                            const uint8_t *data, uint32_t count);
3953 _PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r);
3954 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob);
3955 _PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob);
3956 _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags);
3957 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
3958 _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
3959
3960 /* The following definitions come from librpc/ndr/ndr_krb5pac.c  */
3961
3962 enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
3963 enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
3964 void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
3965
3966 /* The following definitions come from librpc/ndr/ndr_misc.c  */
3967
3968 bool all_zero(const uint8_t *ptr, size_t size);
3969 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
3970 bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,
3971                          const struct ndr_syntax_id *i2);
3972 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
3973 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
3974 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
3975
3976 /* The following definitions come from librpc/ndr/ndr_sec_helper.c  */
3977
3978 size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags);
3979 size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
3980 size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
3981 size_t ndr_size_security_ace(const struct security_ace *ace, int flags);
3982 size_t ndr_size_security_acl(const struct security_acl *theacl, int flags);
3983 size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags);
3984 void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
3985 void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
3986 void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
3987 void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
3988
3989 /* The following definitions come from librpc/ndr/ndr_string.c  */
3990
3991 _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s);
3992 _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, const char *s);
3993 _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s);
3994 _PUBLIC_ void ndr_print_string(struct ndr_print *ndr, const char *name, const char *s);
3995 _PUBLIC_ uint32_t ndr_size_string(int ret, const char * const* string, int flags) ;
3996 _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_flags, const char ***_a);
3997 _PUBLIC_ enum ndr_err_code ndr_push_string_array(struct ndr_push *ndr, int ndr_flags, const char **a);
3998 _PUBLIC_ void ndr_print_string_array(struct ndr_print *ndr, const char *name, const char **a);
3999 _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size);
4000 _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size);
4001 _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);
4002 _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);
4003 _PUBLIC_ uint32_t ndr_charset_length(const void *var, charset_t chset);
4004
4005 /* The following definitions come from librpc/ndr/sid.c  */
4006
4007 enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r);
4008 enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r);
4009 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
4010 enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4011 enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4012 enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4013 enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4014 enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
4015 enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
4016
4017 /* The following definitions come from librpc/ndr/uuid.c  */
4018
4019 _PUBLIC_ NTSTATUS GUID_from_string(const char *s, struct GUID *guid);
4020 _PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);
4021 struct GUID GUID_random(void);
4022 _PUBLIC_ struct GUID GUID_zero(void);
4023 _PUBLIC_ bool GUID_all_zero(const struct GUID *u);
4024 _PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2);
4025 _PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2);
4026 _PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4027 _PUBLIC_ char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4028 _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
4029 _PUBLIC_ bool policy_handle_empty(struct policy_handle *h) ;
4030
4031 /* The following definitions come from librpc/rpc/binding.c  */
4032
4033 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4034 _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
4035 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
4036 _PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax);
4037 const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
4038 enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
4039 _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower);
4040 _PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 
4041                                    struct epm_tower *tower, 
4042                                    struct dcerpc_binding **b_out);
4043 _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower);
4044
4045 /* The following definitions come from librpc/rpc/dcerpc.c  */
4046
4047 struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct GUID *object, 
4048                                             const struct ndr_interface_table *table, uint32_t opnum, 
4049                                             TALLOC_CTX *mem_ctx, void *r);
4050 NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req);
4051 _PUBLIC_ NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, 
4052                                       const char *binding_string, const struct ndr_interface_table *table, 
4053                                       struct cli_credentials *credentials, struct event_context *ev, 
4054                                       struct loadparm_context *lp_ctx);
4055
4056 /* The following definitions come from libsmb/asn1.c  */
4057
4058 void asn1_free(ASN1_DATA *data);
4059 bool asn1_write(ASN1_DATA *data, const void *p, int len);
4060 bool asn1_write_uint8(ASN1_DATA *data, uint8 v);
4061 bool asn1_push_tag(ASN1_DATA *data, uint8 tag);
4062 bool asn1_pop_tag(ASN1_DATA *data);
4063 bool asn1_write_Integer(ASN1_DATA *data, int i);
4064 bool asn1_write_OID(ASN1_DATA *data, const char *OID);
4065 bool asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length);
4066 bool asn1_write_GeneralString(ASN1_DATA *data, const char *s);
4067 bool asn1_write_BOOLEAN(ASN1_DATA *data, bool v);
4068 bool asn1_write_BOOLEAN2(ASN1_DATA *data, bool v);
4069 bool asn1_check_BOOLEAN(ASN1_DATA *data, bool v);
4070 bool asn1_load(ASN1_DATA *data, DATA_BLOB blob);
4071 bool asn1_read(ASN1_DATA *data, void *p, int len);
4072 bool asn1_read_uint8(ASN1_DATA *data, uint8 *v);
4073 bool asn1_check_tag(ASN1_DATA *data, uint8 tag);
4074 bool asn1_start_tag(ASN1_DATA *data, uint8 tag);
4075 bool asn1_end_tag(ASN1_DATA *data);
4076 int asn1_tag_remaining(ASN1_DATA *data);
4077 bool asn1_read_OID(ASN1_DATA *data, char **OID);
4078 bool asn1_check_OID(ASN1_DATA *data, const char *OID);
4079 bool asn1_read_GeneralString(ASN1_DATA *data, char **s);
4080 bool asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob);
4081 bool asn1_read_Integer(ASN1_DATA *data, int *i);
4082 bool asn1_check_enumerated(ASN1_DATA *data, int v);
4083 bool asn1_write_enumerated(ASN1_DATA *data, uint8 v);
4084 bool ber_write_OID_String(DATA_BLOB *blob, const char *OID);
4085 bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID);
4086
4087 /* The following definitions come from libsmb/async_smb.c  */
4088
4089 NTSTATUS cli_pull_error(char *buf);
4090 void cli_set_error(struct cli_state *cli, NTSTATUS status);
4091 struct async_req *cli_request_new(TALLOC_CTX *mem_ctx,
4092                                   struct event_context *ev,
4093                                   struct cli_state *cli,
4094                                   uint8_t num_words, size_t num_bytes,
4095                                   struct cli_request **preq);
4096 struct cli_request *cli_request_get(struct async_req *req);
4097 struct cli_tmp_event *cli_tmp_event_ctx(TALLOC_CTX *mem_ctx,
4098                                         struct cli_state *cli);
4099 NTSTATUS cli_add_event_ctx(struct cli_state *cli,
4100                            struct event_context *event_ctx);
4101
4102 /* The following definitions come from libsmb/cliconnect.c  */
4103
4104 ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, 
4105                               const char *pass, const char *user_domain,
4106                                     const char * dest_realm);
4107
4108 NTSTATUS cli_session_setup(struct cli_state *cli,
4109                            const char *user,
4110                            const char *pass, int passlen,
4111                            const char *ntpass, int ntpasslen,
4112                            const char *workgroup);
4113 bool cli_ulogoff(struct cli_state *cli);
4114 bool cli_send_tconX(struct cli_state *cli, 
4115                     const char *share, const char *dev, const char *pass, int passlen);
4116 bool cli_tdis(struct cli_state *cli);
4117 void cli_negprot_send(struct cli_state *cli);
4118 bool cli_negprot(struct cli_state *cli);
4119 bool cli_session_request(struct cli_state *cli,
4120                          struct nmb_name *calling, struct nmb_name *called);
4121 NTSTATUS cli_connect(struct cli_state *cli,
4122                 const char *host,
4123                 struct sockaddr_storage *dest_ss);
4124 NTSTATUS cli_start_connection(struct cli_state **output_cli, 
4125                               const char *my_name, 
4126                               const char *dest_host, 
4127                               struct sockaddr_storage *dest_ss, int port,
4128                               int signing_state, int flags,
4129                               bool *retry) ;
4130 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
4131                              const char *my_name, 
4132                              const char *dest_host, 
4133                              struct sockaddr_storage *dest_ss, int port,
4134                              const char *service, const char *service_type,
4135                              const char *user, const char *domain, 
4136                              const char *password, int flags,
4137                              int signing_state,
4138                              bool *retry) ;
4139 bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
4140                                      struct sockaddr_storage *pdest_ss);
4141 NTSTATUS cli_raw_tcon(struct cli_state *cli, 
4142                       const char *service, const char *pass, const char *dev,
4143                       uint16 *max_xmit, uint16 *tid);
4144 struct cli_state *get_ipc_connect(char *server,
4145                                 struct sockaddr_storage *server_ss,
4146                                 const struct user_auth_info *user_info);
4147 struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
4148                                 struct ip_service *mb_ip,
4149                                 const struct user_auth_info *user_info,
4150                                 char **pp_workgroup_out);
4151 struct cli_state *get_ipc_connect_master_ip_bcast(TALLOC_CTX *ctx,
4152                                         const struct user_auth_info *user_info,
4153                                         char **pp_workgroup_out);
4154
4155 /* The following definitions come from libsmb/clidfs.c  */
4156
4157 NTSTATUS cli_cm_force_encryption(struct cli_state *c,
4158                         const char *username,
4159                         const char *password,
4160                         const char *domain,
4161                         const char *sharename);
4162 const char *cli_cm_get_mntpoint(struct cli_state *c);
4163 struct cli_state *cli_cm_open(TALLOC_CTX *ctx,
4164                                 struct cli_state *referring_cli,
4165                                 const char *server,
4166                                 const char *share,
4167                                 bool show_hdr,
4168                                 bool force_encrypt);
4169 void cli_cm_shutdown(void);
4170 void cli_cm_display(void);
4171 void cli_cm_set_credentials(void);
4172 void cli_cm_set_port(int port_number);
4173 void cli_cm_set_dest_name_type(int type);
4174 void cli_cm_set_signing_state(int state);
4175 void cli_cm_set_username(const char *username);
4176 void cli_cm_set_password(const char *newpass);
4177 void cli_cm_set_use_kerberos(void);
4178 void cli_cm_set_fallback_after_kerberos(void);
4179 void cli_cm_set_dest_ss(struct sockaddr_storage *pss);
4180 bool cli_dfs_get_referral(TALLOC_CTX *ctx,
4181                         struct cli_state *cli,
4182                         const char *path,
4183                         CLIENT_DFS_REFERRAL**refs,
4184                         size_t *num_refs,
4185                         uint16 *consumed);
4186 bool cli_resolve_path(TALLOC_CTX *ctx,
4187                         const char *mountpt,
4188                         struct cli_state *rootcli,
4189                         const char *path,
4190                         struct cli_state **targetcli,
4191                         char **pp_targetpath);
4192
4193 /* The following definitions come from libsmb/clidgram.c  */
4194
4195 bool cli_send_mailslot(struct messaging_context *msg_ctx,
4196                        bool unique, const char *mailslot,
4197                        uint16 priority,
4198                        char *buf, int len,
4199                        const char *srcname, int src_type,
4200                        const char *dstname, int dest_type,
4201                        const struct sockaddr_storage *dest_ss);
4202 bool send_getdc_request(TALLOC_CTX *mem_ctx,
4203                         struct messaging_context *msg_ctx,
4204                         struct sockaddr_storage *dc_ss,
4205                         const char *domain_name,
4206                         const DOM_SID *sid,
4207                         uint32_t nt_version);
4208 bool receive_getdc_response(TALLOC_CTX *mem_ctx,
4209                             struct sockaddr_storage *dc_ss,
4210                             const char *domain_name,
4211                             uint32_t *nt_version,
4212                             const char **dc_name,
4213                             struct netlogon_samlogon_response **reply);
4214
4215 /* The following definitions come from libsmb/clientgen.c  */
4216
4217 int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
4218 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
4219 int cli_set_port(struct cli_state *cli, int port);
4220 bool cli_receive_smb(struct cli_state *cli);
4221 ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len);
4222 bool cli_receive_smb_readX_header(struct cli_state *cli);
4223 bool cli_send_smb(struct cli_state *cli);
4224 bool cli_send_smb_direct_writeX(struct cli_state *cli,
4225                                 const char *p,
4226                                 size_t extradata);
4227 void cli_setup_packet_buf(struct cli_state *cli, char *buf);
4228 void cli_setup_packet(struct cli_state *cli);
4229 void cli_setup_bcc(struct cli_state *cli, void *p);
4230 void cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password);
4231 void cli_setup_signing_state(struct cli_state *cli, int signing_state);
4232 struct cli_state *cli_initialise(void);
4233 void cli_nt_pipes_close(struct cli_state *cli);
4234 void cli_shutdown(struct cli_state *cli);
4235 void cli_sockopt(struct cli_state *cli, const char *options);
4236 uint16 cli_setpid(struct cli_state *cli, uint16 pid);
4237 bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
4238 bool cli_send_keepalive(struct cli_state *cli);
4239 bool cli_echo(struct cli_state *cli, uint16 num_echos,
4240               unsigned char *data, size_t length);
4241
4242 /* The following definitions come from libsmb/clierror.c  */
4243
4244 const char *cli_errstr(struct cli_state *cli);
4245 NTSTATUS cli_nt_error(struct cli_state *cli);
4246 void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode);
4247 int cli_errno(struct cli_state *cli);
4248 bool cli_is_error(struct cli_state *cli);
4249 bool cli_is_nt_error(struct cli_state *cli);
4250 bool cli_is_dos_error(struct cli_state *cli);
4251 NTSTATUS cli_get_nt_error(struct cli_state *cli);
4252 void cli_set_nt_error(struct cli_state *cli, NTSTATUS status);
4253 void cli_reset_error(struct cli_state *cli);
4254
4255 /* The following definitions come from libsmb/clifile.c  */
4256
4257 uint32 unix_perms_to_wire(mode_t perms);
4258 mode_t wire_perms_to_unix(uint32 perms);
4259 bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf);
4260 bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf);
4261 bool cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname);
4262 bool cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname);
4263 bool cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode);
4264 bool cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid);
4265 bool cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4266 bool cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4267 bool cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst);
4268 bool cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs);
4269 bool cli_unlink(struct cli_state *cli, const char *fname);
4270 bool cli_mkdir(struct cli_state *cli, const char *dname);
4271 bool cli_rmdir(struct cli_state *cli, const char *dname);
4272 int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag);
4273 int cli_nt_create_full(struct cli_state *cli, const char *fname,
4274                  uint32 CreatFlags, uint32 DesiredAccess,
4275                  uint32 FileAttributes, uint32 ShareAccess,
4276                  uint32 CreateDisposition, uint32 CreateOptions,
4277                  uint8 SecuityFlags);
4278 int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess);
4279 int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4280 bool cli_close(struct cli_state *cli, int fnum);
4281 bool cli_ftruncate(struct cli_state *cli, int fnum, uint64_t size);
4282 NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
4283                       uint32 offset, uint32 len,
4284                       int timeout, unsigned char locktype);
4285 bool cli_lock(struct cli_state *cli, int fnum,
4286               uint32 offset, uint32 len, int timeout, enum brl_type lock_type);
4287 bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len);
4288 bool cli_lock64(struct cli_state *cli, int fnum,
4289                 SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type);
4290 bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4291 bool cli_posix_lock(struct cli_state *cli, int fnum,
4292                         SMB_BIG_UINT offset, SMB_BIG_UINT len,
4293                         bool wait_lock, enum brl_type lock_type);
4294 bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
4295 bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen);
4296 bool cli_getattrE(struct cli_state *cli, int fd,
4297                   uint16 *attr, SMB_OFF_T *size,
4298                   time_t *change_time,
4299                   time_t *access_time,
4300                   time_t *write_time);
4301 bool cli_getatr(struct cli_state *cli, const char *fname,
4302                 uint16 *attr, SMB_OFF_T *size, time_t *write_time);
4303 bool cli_setattrE(struct cli_state *cli, int fd,
4304                   time_t change_time,
4305                   time_t access_time,
4306                   time_t write_time);
4307 bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t);
4308 bool cli_chkpath(struct cli_state *cli, const char *path);
4309 bool cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
4310 int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path);
4311 NTSTATUS cli_raw_ioctl(struct cli_state *cli, int fnum, uint32 code, DATA_BLOB *blob);
4312 bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len);
4313 bool cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len);
4314 bool cli_get_ea_list_path(struct cli_state *cli, const char *path,
4315                 TALLOC_CTX *ctx,
4316                 size_t *pnum_eas,
4317                 struct ea_struct **pea_list);
4318 bool cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
4319                 TALLOC_CTX *ctx,
4320                 size_t *pnum_eas,
4321                 struct ea_struct **pea_list);
4322 int cli_posix_open(struct cli_state *cli, const char *fname, int flags, mode_t mode);
4323 int cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode);
4324 bool cli_posix_unlink(struct cli_state *cli, const char *fname);
4325 int cli_posix_rmdir(struct cli_state *cli, const char *fname);
4326
4327 /* The following definitions come from libsmb/clifsinfo.c  */
4328
4329 bool cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
4330                                         uint32 *pcaplow, uint32 *pcaphigh);
4331 bool cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
4332                                         uint32 caplow, uint32 caphigh);
4333 bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr);
4334 bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number);
4335 bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate);
4336 bool cli_get_fs_full_size_info(struct cli_state *cli,
4337                                SMB_BIG_UINT *total_allocation_units,
4338                                SMB_BIG_UINT *caller_allocation_units,
4339                                SMB_BIG_UINT *actual_allocation_units,
4340                                SMB_BIG_UINT *sectors_per_allocation_unit,
4341                                SMB_BIG_UINT *bytes_per_sector);
4342 bool cli_get_posix_fs_info(struct cli_state *cli,
4343                            uint32 *optimal_transfer_size,
4344                            uint32 *block_size,
4345                            SMB_BIG_UINT *total_blocks,
4346                            SMB_BIG_UINT *blocks_available,
4347                            SMB_BIG_UINT *user_blocks_available,
4348                            SMB_BIG_UINT *total_file_nodes,
4349                            SMB_BIG_UINT *free_file_nodes,
4350                            SMB_BIG_UINT *fs_identifier);
4351 NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli, 
4352                                 const char *user,
4353                                 const char *pass,
4354                                 const char *domain);
4355 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4356 NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli);
4357 NTSTATUS cli_force_encryption(struct cli_state *c,
4358                         const char *username,
4359                         const char *password,
4360                         const char *domain);
4361
4362 /* The following definitions come from libsmb/clikrb5.c  */
4363
4364 bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx, 
4365                            DATA_BLOB *edata, 
4366                            DATA_BLOB *edata_out);
4367 bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data);
4368 int cli_krb5_get_ticket(const char *principal, time_t time_offset, 
4369                         DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, 
4370                         uint32 extra_ap_opts, const char *ccname, 
4371                         time_t *tgs_expire);
4372
4373 /* The following definitions come from libsmb/clilist.c  */
4374
4375 int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
4376                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4377 int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
4378                  void (*fn)(const char *, file_info *, const char *, void *), void *state);
4379 int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
4380              void (*fn)(const char *, file_info *, const char *, void *), void *state);
4381
4382 /* The following definitions come from libsmb/climessage.c  */
4383
4384 int cli_message_start_build(struct cli_state *cli, const char *host, const char *username);
4385 bool cli_message_start(struct cli_state *cli, const char *host, const char *username,
4386                               int *grp);
4387 int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int grp);
4388 bool cli_message_text(struct cli_state *cli, const char *msg, int len, int grp);
4389 int cli_message_end_build(struct cli_state *cli, int grp);
4390 bool cli_message_end(struct cli_state *cli, int grp);
4391
4392 /* The following definitions come from libsmb/clioplock.c  */
4393
4394 bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level);
4395 void cli_oplock_handler(struct cli_state *cli, 
4396                         bool (*handler)(struct cli_state *, int, unsigned char));
4397
4398 /* The following definitions come from libsmb/cliprint.c  */
4399
4400 int cli_print_queue(struct cli_state *cli,
4401                     void (*fn)(struct print_job_info *));
4402 int cli_printjob_del(struct cli_state *cli, int job);
4403 int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
4404 bool cli_spl_close(struct cli_state *cli, int fnum);
4405
4406 /* The following definitions come from libsmb/cliquota.c  */
4407
4408 bool cli_get_quota_handle(struct cli_state *cli, int *quota_fnum);
4409 void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list);
4410 bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4411 bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4412 bool cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list);
4413 bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4414 bool cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt);
4415 void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4416 void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric));
4417
4418 /* The following definitions come from libsmb/clirap.c  */
4419
4420 bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
4421                   uint16 *setup, uint32 setup_count, uint32 max_setup_count,
4422                   char *params, uint32 param_count, uint32 max_param_count,
4423                   char *data, uint32 data_count, uint32 max_data_count,
4424                   char **rparam, uint32 *rparam_count,
4425                   char **rdata, uint32 *rdata_count);
4426 bool cli_api(struct cli_state *cli,
4427              char *param, int prcnt, int mprcnt,
4428              char *data, int drcnt, int mdrcnt,
4429              char **rparam, unsigned int *rprcnt,
4430              char **rdata, unsigned int *rdrcnt);
4431 bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
4432 int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
4433 bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
4434                        void (*fn)(const char *, uint32, const char *, void *),
4435                        void *state);
4436 bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
4437                              const char *old_password);
4438 bool cli_qpathinfo(struct cli_state *cli,
4439                         const char *fname,
4440                         time_t *change_time,
4441                         time_t *access_time,
4442                         time_t *write_time,
4443                         SMB_OFF_T *size,
4444                         uint16 *mode);
4445 bool cli_setpathinfo(struct cli_state *cli, const char *fname,
4446                      time_t create_time,
4447                      time_t access_time,
4448                      time_t write_time,
4449                      time_t change_time,
4450                      uint16 mode);
4451 bool cli_qpathinfo2(struct cli_state *cli, const char *fname,
4452                     struct timespec *create_time,
4453                     struct timespec *access_time,
4454                     struct timespec *write_time,
4455                     struct timespec *change_time,
4456                     SMB_OFF_T *size, uint16 *mode,
4457                     SMB_INO_T *ino);
4458 bool cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
4459                            TALLOC_CTX *mem_ctx,
4460                            unsigned int *pnum_streams,
4461                            struct stream_struct **pstreams);
4462 bool cli_qfilename(struct cli_state *cli, int fnum, char *name, size_t namelen);
4463 bool cli_qfileinfo(struct cli_state *cli, int fnum,
4464                    uint16 *mode, SMB_OFF_T *size,
4465                    struct timespec *create_time,
4466                    struct timespec *access_time,
4467                    struct timespec *write_time,
4468                    struct timespec *change_time,
4469                    SMB_INO_T *ino);
4470 bool cli_qpathinfo_basic( struct cli_state *cli, const char *name,
4471                           SMB_STRUCT_STAT *sbuf, uint32 *attributes );
4472 bool cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen);
4473 NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
4474
4475 /* The following definitions come from libsmb/clirap2.c  */
4476
4477 int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
4478 int cli_NetGroupAdd(struct cli_state *cli, RAP_GROUP_INFO_1 *grinfo);
4479 int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4480 int cli_RNetGroupEnum0(struct cli_state *cli,
4481                        void (*fn)(const char *, void *),
4482                        void *state);
4483 int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
4484 int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
4485 int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
4486 int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
4487 int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
4488 int cli_NetUserAdd(struct cli_state *cli, RAP_USER_INFO_1 * userinfo );
4489 int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
4490 int cli_RNetUserEnum0(struct cli_state *cli,
4491                       void (*fn)(const char *, void *),
4492                       void *state);
4493 int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
4494 int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
4495 int cli_NetFileEnum(struct cli_state *cli, const char * user,
4496                     const char * base_path,
4497                     void (*fn)(const char *, const char *, uint16, uint16,
4498                                uint32));
4499 int cli_NetShareAdd(struct cli_state *cli, RAP_SHARE_INFO_2 * sinfo );
4500 int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
4501 bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
4502 bool cli_get_server_domain(struct cli_state *cli);
4503 bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
4504 bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4505                          char **servername);
4506 bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
4507 bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
4508 int cli_NetPrintQEnum(struct cli_state *cli,
4509                 void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4510                 void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4511 int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
4512         void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
4513         void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
4514 int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
4515 int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, uint, uint, uint, char *));
4516 int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
4517                 void (*fn)(const char *, const char *, uint16, uint16, uint16, uint, uint, uint, const char *));
4518 int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
4519 int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
4520                         void (*fn)(uint16_t conid, uint16_t contype,
4521                                 uint16_t numopens, uint16_t numusers,
4522                                 uint32_t contime, const char *username,
4523                                 const char *netname));
4524
4525 /* The following definitions come from libsmb/clireadwrite.c  */
4526
4527 struct async_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
4528                                      struct cli_state *cli, int fnum,
4529                                      off_t offset, size_t size);
4530 NTSTATUS cli_read_andx_recv(struct async_req *req, ssize_t *received,
4531                             uint8_t **rcvbuf);
4532 struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx, struct cli_state *cli,
4533                                 uint16_t fnum, off_t start_offset,
4534                                 SMB_OFF_T size, size_t window_size,
4535                                 NTSTATUS (*sink)(char *buf, size_t n,
4536                                                  void *priv),
4537                                 void *priv);
4538 NTSTATUS cli_pull_recv(struct async_req *req, SMB_OFF_T *received);
4539 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
4540                   off_t start_offset, SMB_OFF_T size, size_t window_size,
4541                   NTSTATUS (*sink)(char *buf, size_t n, void *priv),
4542                   void *priv, SMB_OFF_T *received);
4543 ssize_t cli_read(struct cli_state *cli, int fnum, char *buf,
4544                  off_t offset, size_t size);
4545 ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
4546 ssize_t cli_write(struct cli_state *cli,
4547                  int fnum, uint16 write_mode,
4548                  const char *buf, off_t offset, size_t size);
4549 ssize_t cli_smbwrite(struct cli_state *cli,
4550                      int fnum, char *buf, off_t offset, size_t size1);
4551
4552 /* The following definitions come from libsmb/clisecdesc.c  */
4553
4554 SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, 
4555                             TALLOC_CTX *mem_ctx);
4556 bool cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd);
4557
4558 /* The following definitions come from libsmb/clispnego.c  */
4559
4560 DATA_BLOB spnego_gen_negTokenInit(char guid[16], 
4561                                   const char *OIDs[], 
4562                                   const char *principal);
4563 DATA_BLOB gen_negTokenInit(const char *OID, DATA_BLOB blob);
4564 bool spnego_parse_negTokenInit(DATA_BLOB blob,
4565                                char *OIDs[ASN1_MAX_OIDS], 
4566                                char **principal);
4567 DATA_BLOB gen_negTokenTarg(const char *OIDs[], DATA_BLOB blob);
4568 bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob);
4569 DATA_BLOB spnego_gen_krb5_wrap(const DATA_BLOB ticket, const uint8 tok_id[2]);
4570 bool spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2]);
4571 int spnego_gen_negTokenTarg(const char *principal, int time_offset, 
4572                             DATA_BLOB *targ, 
4573                             DATA_BLOB *session_key_krb5, uint32 extra_ap_opts,
4574                             time_t *expire_time);
4575 bool spnego_parse_challenge(const DATA_BLOB blob,
4576                             DATA_BLOB *chal1, DATA_BLOB *chal2);
4577 DATA_BLOB spnego_gen_auth(DATA_BLOB blob);
4578 bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth);
4579 DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status,
4580                                    const char *mechOID);
4581 bool spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
4582                                 const char *mechOID,
4583                                 DATA_BLOB *auth);
4584
4585 /* The following definitions come from libsmb/clistr.c  */
4586
4587 size_t clistr_push_fn(const char *function,
4588                         unsigned int line,
4589                         struct cli_state *cli,
4590                         void *dest,
4591                         const char *src,
4592                         int dest_len,
4593                         int flags);
4594 size_t clistr_pull_fn(const char *function,
4595                         unsigned int line,
4596                         struct cli_state *cli,
4597                         char *dest,
4598                         const void *src,
4599                         int dest_len,
4600                         int src_len,
4601                         int flags);
4602 size_t clistr_pull_talloc_fn(const char *function,
4603                                 unsigned int line,
4604                                 TALLOC_CTX *ctx,
4605                                 struct cli_state *cli,
4606                                 char **pp_dest,
4607                                 const void *src,
4608                                 int src_len,
4609                                 int flags);
4610 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
4611 size_t clistr_align_in(struct cli_state *cli, const void *p, int flags);
4612
4613 /* The following definitions come from libsmb/clitrans.c  */
4614
4615 bool cli_send_trans(struct cli_state *cli, int trans,
4616                     const char *pipe_name,
4617                     int fid, int flags,
4618                     uint16 *setup, unsigned int lsetup, unsigned int msetup,
4619                     const char *param, unsigned int lparam, unsigned int mparam,
4620                     const char *data, unsigned int ldata, unsigned int mdata);
4621 bool cli_receive_trans(struct cli_state *cli,int trans,
4622                               char **param, unsigned int *param_len,
4623                               char **data, unsigned int *data_len);
4624 bool cli_send_nt_trans(struct cli_state *cli,
4625                        int function,
4626                        int flags,
4627                        uint16 *setup, unsigned int lsetup, unsigned int msetup,
4628                        char *param, unsigned int lparam, unsigned int mparam,
4629                        char *data, unsigned int ldata, unsigned int mdata);
4630 bool cli_receive_nt_trans(struct cli_state *cli,
4631                           char **param, unsigned int *param_len,
4632                           char **data, unsigned int *data_len);
4633
4634 /* The following definitions come from libsmb/conncache.c  */
4635
4636 NTSTATUS check_negative_conn_cache_timeout( const char *domain, const char *server, unsigned int failed_cache_timeout );
4637 NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
4638 void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
4639 void delete_negative_conn_cache(const char *domain, const char *server);
4640 void flush_negative_conn_cache( void );
4641 void flush_negative_conn_cache_for_domain(const char *domain);
4642
4643 /* The following definitions come from libsmb/credentials.c  */
4644
4645 char *credstr(const unsigned char *cred);
4646 void creds_server_init(uint32 neg_flags,
4647                         struct dcinfo *dc,
4648                         struct netr_Credential *clnt_chal,
4649                         struct netr_Credential *srv_chal,
4650                         const unsigned char mach_pw[16],
4651                         struct netr_Credential *init_chal_out);
4652 bool netlogon_creds_server_check(const struct dcinfo *dc,
4653                                  const struct netr_Credential *rcv_cli_chal_in);
4654 bool netlogon_creds_server_step(struct dcinfo *dc,
4655                                 const struct netr_Authenticator *received_cred,
4656                                 struct netr_Authenticator *cred_out);
4657 void creds_client_init(uint32 neg_flags,
4658                         struct dcinfo *dc,
4659                         struct netr_Credential *clnt_chal,
4660                         struct netr_Credential *srv_chal,
4661                         const unsigned char mach_pw[16],
4662                         struct netr_Credential *init_chal_out);
4663 bool netlogon_creds_client_check(const struct dcinfo *dc,
4664                                  const struct netr_Credential *rcv_srv_chal_in);
4665 void netlogon_creds_client_step(struct dcinfo *dc,
4666                                 struct netr_Authenticator *next_cred_out);
4667
4668 /* The following definitions come from libsmb/dcerpc_err.c  */
4669
4670 const char *dcerpc_errstr(uint32 fault_code);
4671
4672 /* The following definitions come from libsmb/doserr.c  */
4673
4674 const char *dos_errstr(WERROR werror);
4675 const char *get_friendly_werror_msg(WERROR werror);
4676 const char *win_errstr(WERROR werror);
4677
4678 /* The following definitions come from libsmb/dsgetdcname.c  */
4679
4680 void debug_dsdcinfo_flags(int lvl, uint32_t flags);
4681 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
4682                      struct messaging_context *msg_ctx,
4683                      const char *domain_name,
4684                      struct GUID *domain_guid,
4685                      const char *site_name,
4686                      uint32_t flags,
4687                      struct netr_DsRGetDCNameInfo **info);
4688
4689 /* The following definitions come from libsmb/errormap.c  */
4690
4691 NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode);
4692 void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode);
4693 NTSTATUS werror_to_ntstatus(WERROR error);
4694 WERROR ntstatus_to_werror(NTSTATUS error);
4695 NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor);
4696
4697 /* The following definitions come from libsmb/namecache.c  */
4698
4699 bool namecache_enable(void);
4700 bool namecache_shutdown(void);
4701 bool namecache_store(const char *name,
4702                         int name_type,
4703                         int num_names,
4704                         struct ip_service *ip_list);
4705 bool namecache_fetch(const char *name,
4706                         int name_type,
4707                         struct ip_service **ip_list,
4708                         int *num_names);
4709 bool namecache_delete(const char *name, int name_type);
4710 void namecache_flush(void);
4711 bool namecache_status_store(const char *keyname, int keyname_type,
4712                 int name_type, const struct sockaddr_storage *keyip,
4713                 const char *srvname);
4714 bool namecache_status_fetch(const char *keyname,
4715                                 int keyname_type,
4716                                 int name_type,
4717                                 const struct sockaddr_storage *keyip,
4718                                 char *srvname_out);
4719
4720 /* The following definitions come from libsmb/namequery.c  */
4721
4722 bool saf_store( const char *domain, const char *servername );
4723 bool saf_join_store( const char *domain, const char *servername );
4724 bool saf_delete( const char *domain );
4725 char *saf_fetch( const char *domain );
4726 NODE_STATUS_STRUCT *node_status_query(int fd,
4727                                         struct nmb_name *name,
4728                                         const struct sockaddr_storage *to_ss,
4729                                         int *num_names,
4730                                         struct node_status_extra *extra);
4731 bool name_status_find(const char *q_name,
4732                         int q_type,
4733                         int type,
4734                         const struct sockaddr_storage *to_ss,
4735                         fstring name);
4736 int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2);
4737 struct sockaddr_storage *name_query(int fd,
4738                         const char *name,
4739                         int name_type,
4740                         bool bcast,
4741                         bool recurse,
4742                         const struct sockaddr_storage *to_ss,
4743                         int *count,
4744                         int *flags,
4745                         bool *timed_out);
4746 XFILE *startlmhosts(const char *fname);
4747 bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
4748                 struct sockaddr_storage *pss);
4749 void endlmhosts(XFILE *fp);
4750 NTSTATUS name_resolve_bcast(const char *name,
4751                         int name_type,
4752                         struct ip_service **return_iplist,
4753                         int *return_count);
4754 NTSTATUS resolve_wins(const char *name,
4755                 int name_type,
4756                 struct ip_service **return_iplist,
4757                 int *return_count);
4758 NTSTATUS internal_resolve_name(const char *name,
4759                                 int name_type,
4760                                 const char *sitename,
4761                                 struct ip_service **return_iplist,
4762                                 int *return_count,
4763                                 const char *resolve_order);
4764 bool resolve_name(const char *name,
4765                 struct sockaddr_storage *return_ss,
4766                 int name_type);
4767 NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
4768                 const char *name,
4769                 int name_type,
4770                 struct sockaddr_storage **return_ss_arr,
4771                 unsigned int *p_num_entries);
4772 bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
4773 bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
4774 NTSTATUS get_sorted_dc_list( const char *domain,
4775                         const char *sitename,
4776                         struct ip_service **ip_list,
4777                         int *count,
4778                         bool ads_only );
4779 NTSTATUS get_kdc_list( const char *realm,
4780                         const char *sitename,
4781                         struct ip_service **ip_list,
4782                         int *count);
4783
4784 /* The following definitions come from libsmb/namequery_dc.c  */
4785
4786 bool get_dc_name(const char *domain,
4787                 const char *realm,
4788                 fstring srv_name,
4789                 struct sockaddr_storage *ss_out);
4790
4791 /* The following definitions come from libsmb/nmblib.c  */
4792
4793 void debug_nmb_packet(struct packet_struct *p);
4794 void put_name(char *dest, const char *name, int pad, unsigned int name_type);
4795 char *nmb_namestr(const struct nmb_name *n);
4796 struct packet_struct *copy_packet(struct packet_struct *packet);
4797 void free_packet(struct packet_struct *packet);
4798 struct packet_struct *parse_packet(char *buf,int length,
4799                                    enum packet_type packet_type,
4800                                    struct in_addr ip,
4801                                    int port);
4802 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
4803 void make_nmb_name( struct nmb_name *n, const char *name, int type);
4804 bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
4805 int build_packet(char *buf, size_t buflen, struct packet_struct *p);
4806 bool send_packet(struct packet_struct *p);
4807 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
4808 struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id);
4809 struct packet_struct *receive_dgram_packet(int fd, int t,
4810                 const char *mailslot_name);
4811 bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
4812 int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
4813 void sort_query_replies(char *data, int n, struct in_addr ip);
4814 int name_mangle( char *In, char *Out, char name_type );
4815 int name_extract(char *buf,int ofs, fstring name);
4816 int name_len(char *s1);
4817
4818 /* The following definitions come from libsmb/nterr.c  */
4819
4820 const char *nt_errstr(NTSTATUS nt_code);
4821 const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
4822 const char *get_nt_error_c_code(NTSTATUS nt_code);
4823 NTSTATUS nt_status_string_to_code(char *nt_status_str);
4824 NTSTATUS nt_status_squash(NTSTATUS nt_status);
4825
4826 /* The following definitions come from libsmb/ntlm_check.c  */
4827
4828 NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
4829                              const DATA_BLOB *challenge,
4830                              const DATA_BLOB *lm_response,
4831                              const DATA_BLOB *nt_response,
4832                              const DATA_BLOB *lm_interactive_pwd,
4833                              const DATA_BLOB *nt_interactive_pwd,
4834                              const char *username, 
4835                              const char *client_username, 
4836                              const char *client_domain,
4837                              const uint8 *lm_pw, const uint8 *nt_pw, 
4838                              DATA_BLOB *user_sess_key, 
4839                              DATA_BLOB *lm_sess_key);
4840
4841 /* The following definitions come from libsmb/ntlmssp.c  */
4842
4843 void debug_ntlmssp_flags(uint32 neg_flags);
4844 NTSTATUS ntlmssp_set_username(NTLMSSP_STATE *ntlmssp_state, const char *user) ;
4845 NTSTATUS ntlmssp_set_hashes(NTLMSSP_STATE *ntlmssp_state,
4846                 const unsigned char lm_hash[16],
4847                 const unsigned char nt_hash[16]) ;
4848 NTSTATUS ntlmssp_set_password(NTLMSSP_STATE *ntlmssp_state, const char *password) ;
4849 NTSTATUS ntlmssp_set_domain(NTLMSSP_STATE *ntlmssp_state, const char *domain) ;
4850 NTSTATUS ntlmssp_set_workstation(NTLMSSP_STATE *ntlmssp_state, const char *workstation) ;
4851 NTSTATUS ntlmssp_store_response(NTLMSSP_STATE *ntlmssp_state,
4852                                 DATA_BLOB response) ;
4853 void ntlmssp_want_feature_list(NTLMSSP_STATE *ntlmssp_state, char *feature_list);
4854 void ntlmssp_want_feature(NTLMSSP_STATE *ntlmssp_state, uint32 feature);
4855 NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state, 
4856                         const DATA_BLOB in, DATA_BLOB *out) ;
4857 void ntlmssp_end(NTLMSSP_STATE **ntlmssp_state);
4858 DATA_BLOB ntlmssp_weaken_keys(NTLMSSP_STATE *ntlmssp_state, TALLOC_CTX *mem_ctx);
4859 NTSTATUS ntlmssp_server_start(NTLMSSP_STATE **ntlmssp_state);
4860 NTSTATUS ntlmssp_client_start(NTLMSSP_STATE **ntlmssp_state);
4861
4862 /* The following definitions come from libsmb/ntlmssp_parse.c  */
4863
4864 bool msrpc_gen(DATA_BLOB *blob,
4865                const char *format, ...);
4866 bool msrpc_parse(const DATA_BLOB *blob,
4867                  const char *format, ...);
4868
4869 /* The following definitions come from libsmb/ntlmssp_sign.c  */
4870
4871 NTSTATUS ntlmssp_sign_packet(NTLMSSP_STATE *ntlmssp_state,
4872                                     const uchar *data, size_t length, 
4873                                     const uchar *whole_pdu, size_t pdu_length, 
4874                                     DATA_BLOB *sig) ;
4875 NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
4876                                 const uchar *data, size_t length, 
4877                                 const uchar *whole_pdu, size_t pdu_length, 
4878                                 const DATA_BLOB *sig) ;
4879 NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
4880                              uchar *data, size_t length,
4881                              uchar *whole_pdu, size_t pdu_length,
4882                              DATA_BLOB *sig);
4883 NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
4884                                 uchar *data, size_t length,
4885                                 uchar *whole_pdu, size_t pdu_length,
4886                                 DATA_BLOB *sig);
4887 NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state);
4888
4889 /* The following definitions come from libsmb/passchange.c  */
4890
4891 NTSTATUS remote_password_change(const char *remote_machine, const char *user_name, 
4892                                 const char *old_passwd, const char *new_passwd,
4893                                 char **err_str);
4894
4895 /* The following definitions come from libsmb/pwd_cache.c  */
4896
4897 void pwd_set_cleartext(struct pwd_info *pwd, const char *clr);
4898 void pwd_get_cleartext(struct pwd_info *pwd, fstring clr);
4899
4900 /* The following definitions come from libsmb/samlogon_cache.c  */
4901
4902 bool netsamlogon_cache_init(void);
4903 bool netsamlogon_cache_shutdown(void);
4904 void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3);
4905 bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
4906 struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid);
4907 bool netsamlogon_cache_have(const DOM_SID *user_sid);
4908
4909 /* The following definitions come from libsmb/smb_seal.c  */
4910
4911 NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16 *p_enc_ctx_num);
4912 bool common_encryption_on(struct smb_trans_enc_state *es);
4913 NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf);
4914 NTSTATUS common_ntlm_encrypt_buffer(NTLMSSP_STATE *ntlmssp_state,
4915                                 uint16 enc_ctx_num,
4916                                 char *buf,
4917                                 char **ppbuf_out);
4918 NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, char **buf_out);
4919 NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf);
4920 void common_free_encryption_state(struct smb_trans_enc_state **pp_es);
4921 void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
4922 bool cli_encryption_on(struct cli_state *cli);
4923 void cli_free_encryption_context(struct cli_state *cli);
4924 void cli_free_enc_buffer(struct cli_state *cli, char *buf);
4925 NTSTATUS cli_decrypt_message(struct cli_state *cli);
4926 NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
4927
4928 /* The following definitions come from libsmb/smb_signing.c  */
4929
4930 bool cli_simple_set_signing(struct cli_state *cli,
4931                             const DATA_BLOB user_session_key,
4932                             const DATA_BLOB response);
4933 bool cli_null_set_signing(struct cli_state *cli);
4934 bool cli_temp_set_signing(struct cli_state *cli);
4935 void cli_free_signing_context(struct cli_state *cli);
4936 void cli_calculate_sign_mac(struct cli_state *cli, char *buf);
4937 bool cli_check_sign_mac(struct cli_state *cli, char *buf);
4938 bool client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid);
4939 bool client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid);
4940 bool client_is_signing_on(struct cli_state *cli);
4941 bool srv_oplock_set_signing(bool onoff);
4942 bool srv_check_sign_mac(const char *inbuf, bool must_be_ok);
4943 void srv_calculate_sign_mac(char *outbuf);
4944 void srv_defer_sign_response(uint16 mid);
4945 void srv_cancel_sign_response(uint16 mid, bool cancel);
4946 void srv_set_signing_negotiated(void);
4947 bool srv_is_signing_active(void);
4948 bool srv_is_signing_negotiated(void);
4949 bool srv_signing_started(void);
4950 void srv_set_signing(const DATA_BLOB user_session_key, const DATA_BLOB response);
4951
4952 /* The following definitions come from libsmb/smbdes.c  */
4953
4954 void des_crypt56(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
4955 void E_P16(const unsigned char *p14,unsigned char *p16);
4956 void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24);
4957 void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out);
4958 void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out);
4959 void des_crypt128(unsigned char out[8], const unsigned char in[8], const unsigned char key[16]);
4960 void des_crypt64(unsigned char out[8], const unsigned char in[8], const unsigned char key[8]);
4961 void des_crypt112(unsigned char out[8], const unsigned char in[8], const unsigned char key[14], int forw);
4962 void cred_hash3(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
4963 void des_crypt112_16(unsigned char out[16], unsigned char in[16], const unsigned char key[14], int forw);
4964 void SamOEMhash( unsigned char *data, const unsigned char key[16], size_t len);
4965 void SamOEMhashBlob( unsigned char *data, size_t len, DATA_BLOB *key);
4966 void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw);
4967
4968 /* The following definitions come from libsmb/smbencrypt.c  */
4969
4970 void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24]);
4971 bool SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24]);
4972 void E_md4hash(const char *passwd, uchar p16[16]);
4973 void E_md5hash(const uchar salt[16], const uchar nthash[16], uchar hash_out[16]);
4974 bool E_deshash(const char *passwd, uchar p16[16]);
4975 void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar p16[16]);
4976 bool ntv2_owf_gen(const uchar owf[16],
4977                   const char *user_in, const char *domain_in,
4978                   bool upper_case_domain, /* Transform the domain into UPPER case */
4979                   uchar kr_buf[16]);
4980 void SMBOWFencrypt(const uchar passwd[16], const uchar *c8, uchar p24[24]);
4981 void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p24[24]);
4982 void SMBNTencrypt_hash(const uchar nt_hash[16], uchar *c8, uchar *p24);
4983 void SMBNTencrypt(const char *passwd, uchar *c8, uchar *p24);
4984 void SMBOWFencrypt_ntv2(const uchar kr[16],
4985                         const DATA_BLOB *srv_chal,
4986                         const DATA_BLOB *cli_chal,
4987                         uchar resp_buf[16]);
4988 void SMBsesskeygen_ntv2(const uchar kr[16],
4989                         const uchar * nt_resp, uint8 sess_key[16]);
4990 void SMBsesskeygen_ntv1(const uchar kr[16],
4991                         const uchar * nt_resp, uint8 sess_key[16]);
4992 void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16],
4993                         const uchar lm_resp[24], /* only uses 8 */ 
4994                         uint8 sess_key[16]);
4995 DATA_BLOB NTLMv2_generate_names_blob(const char *hostname, 
4996                                      const char *domain);
4997 bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16], 
4998                       const DATA_BLOB *server_chal, 
4999                       const DATA_BLOB *names_blob,
5000                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5001                       DATA_BLOB *user_session_key) ;
5002 bool SMBNTLMv2encrypt(const char *user, const char *domain, const char *password, 
5003                       const DATA_BLOB *server_chal, 
5004                       const DATA_BLOB *names_blob,
5005                       DATA_BLOB *lm_response, DATA_BLOB *nt_response, 
5006                       DATA_BLOB *user_session_key) ;
5007 bool encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags);
5008 bool decode_pw_buffer(TALLOC_CTX *ctx,
5009                         uint8 in_buffer[516],
5010                         char **pp_new_pwrd,
5011                         uint32 *new_pw_len,
5012                         int string_flags);
5013 void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key);
5014 void sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *session_key, int forward);
5015 char *decrypt_trustdom_secret(uint8_t nt_hash[16], DATA_BLOB *data_in);
5016 void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5017                                         const char *pwd,
5018                                         DATA_BLOB *session_key,
5019                                         struct wkssvc_PasswordBuffer **pwd_buf);
5020 WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
5021                                           struct wkssvc_PasswordBuffer *pwd_buf,
5022                                           DATA_BLOB *session_key,
5023                                           char **pwd);
5024 DATA_BLOB decrypt_drsuapi_blob(TALLOC_CTX *mem_ctx,
5025                                const DATA_BLOB *session_key,
5026                                bool rcrypt,
5027                                uint32_t rid,
5028                                const DATA_BLOB *buffer);
5029
5030 /* The following definitions come from libsmb/smberr.c  */
5031
5032 const char *smb_dos_err_name(uint8 e_class, uint16 num);
5033 const char *get_dos_error_msg(WERROR result);
5034 const char *smb_dos_err_class(uint8 e_class);
5035 char *smb_dos_errstr(char *inbuf);
5036 WERROR map_werror_from_unix(int error);
5037
5038 /* The following definitions come from libsmb/spnego.c  */
5039
5040 ssize_t read_spnego_data(DATA_BLOB data, SPNEGO_DATA *token);
5041 ssize_t write_spnego_data(DATA_BLOB *blob, SPNEGO_DATA *spnego);
5042 bool free_spnego_data(SPNEGO_DATA *spnego);
5043
5044 /* The following definitions come from libsmb/trustdom_cache.c  */
5045
5046 bool trustdom_cache_enable(void);
5047 bool trustdom_cache_shutdown(void);
5048 bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
5049                           time_t timeout);
5050 bool trustdom_cache_fetch(const char* name, DOM_SID* sid);
5051 uint32 trustdom_cache_fetch_timestamp( void );
5052 bool trustdom_cache_store_timestamp( uint32 t, time_t timeout );
5053 void trustdom_cache_flush(void);
5054 void update_trustdom_cache( void );
5055
5056 /* The following definitions come from libsmb/trusts_util.c  */
5057
5058 NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
5059                                       const char *domain,
5060                                       unsigned char orig_trust_passwd_hash[16],
5061                                       uint32 sec_channel_type);
5062 NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
5063                                            TALLOC_CTX *mem_ctx, 
5064                                            const char *domain) ;
5065 bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
5066                                      char ***domain_names, uint32 *num_domains,
5067                                      DOM_SID **sids );
5068
5069 /* The following definitions come from libsmb/unexpected.c  */
5070
5071 void unexpected_packet(struct packet_struct *p);
5072 void clear_unexpected(time_t t);
5073 struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
5074                                          const char *mailslot_name);
5075
5076 /* The following definitions come from locking/brlock.c  */
5077
5078 bool brl_same_context(const struct lock_context *ctx1, 
5079                              const struct lock_context *ctx2);
5080 void brl_init(bool read_only);
5081 void brl_shutdown(void);
5082 NTSTATUS brl_lock(struct messaging_context *msg_ctx,
5083                 struct byte_range_lock *br_lck,
5084                 uint32 smbpid,
5085                 struct server_id pid,
5086                 br_off start,
5087                 br_off size, 
5088                 enum brl_type lock_type,
5089                 enum brl_flavour lock_flav,
5090                 bool blocking_lock,
5091                 uint32 *psmbpid);
5092 bool brl_unlock(struct messaging_context *msg_ctx,
5093                 struct byte_range_lock *br_lck,
5094                 uint32 smbpid,
5095                 struct server_id pid,
5096                 br_off start,
5097                 br_off size,
5098                 enum brl_flavour lock_flav);
5099 bool brl_locktest(struct byte_range_lock *br_lck,
5100                 uint32 smbpid,
5101                 struct server_id pid,
5102                 br_off start,
5103                 br_off size, 
5104                 enum brl_type lock_type,
5105                 enum brl_flavour lock_flav);
5106 NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
5107                 uint32 *psmbpid,
5108                 struct server_id pid,
5109                 br_off *pstart,
5110                 br_off *psize, 
5111                 enum brl_type *plock_type,
5112                 enum brl_flavour lock_flav);
5113 bool brl_lock_cancel(struct byte_range_lock *br_lck,
5114                 uint32 smbpid,
5115                 struct server_id pid,
5116                 br_off start,
5117                 br_off size,
5118                 enum brl_flavour lock_flav);
5119 void brl_close_fnum(struct messaging_context *msg_ctx,
5120                     struct byte_range_lock *br_lck);
5121 int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
5122                           enum brl_type lock_type,
5123                           enum brl_flavour lock_flav,
5124                           br_off start, br_off size,
5125                           void *private_data),
5126                void *private_data);
5127 struct byte_range_lock *brl_get_locks(TALLOC_CTX *mem_ctx,
5128                                         files_struct *fsp);
5129 struct byte_range_lock *brl_get_locks_readonly(TALLOC_CTX *mem_ctx,
5130                                         files_struct *fsp);
5131 void brl_register_msgs(struct messaging_context *msg_ctx);
5132
5133 /* The following definitions come from locking/locking.c  */
5134
5135 const char *lock_type_name(enum brl_type lock_type);
5136 const char *lock_flav_name(enum brl_flavour lock_flav);
5137 bool is_locked(files_struct *fsp,
5138                 uint32 smbpid,
5139                 SMB_BIG_UINT count,
5140                 SMB_BIG_UINT offset, 
5141                 enum brl_type lock_type);
5142 NTSTATUS query_lock(files_struct *fsp,
5143                         uint32 *psmbpid,
5144                         SMB_BIG_UINT *pcount,
5145                         SMB_BIG_UINT *poffset,
5146                         enum brl_type *plock_type,
5147                         enum brl_flavour lock_flav);
5148 struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
5149                         files_struct *fsp,
5150                         uint32 lock_pid,
5151                         SMB_BIG_UINT count,
5152                         SMB_BIG_UINT offset,
5153                         enum brl_type lock_type,
5154                         enum brl_flavour lock_flav,
5155                         bool blocking_lock,
5156                         NTSTATUS *perr,
5157                         uint32 *plock_pid);
5158 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
5159                         files_struct *fsp,
5160                         uint32 lock_pid,
5161                         SMB_BIG_UINT count,
5162                         SMB_BIG_UINT offset,
5163                         enum brl_flavour lock_flav);
5164 NTSTATUS do_lock_cancel(files_struct *fsp,
5165                         uint32 lock_pid,
5166                         SMB_BIG_UINT count,
5167                         SMB_BIG_UINT offset,
5168                         enum brl_flavour lock_flav);
5169 void locking_close_file(struct messaging_context *msg_ctx,
5170                         files_struct *fsp);
5171 bool locking_init(void);
5172 bool locking_init_readonly(void);
5173 bool locking_end(void);
5174 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
5175 struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
5176                                             const struct file_id id,
5177                                             const char *servicepath,
5178                                             const char *fname,
5179                                             const struct timespec *old_write_time);
5180 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
5181                                                   const struct file_id id,
5182                                                   const char *servicepath,
5183                                                   const char *fname);
5184 bool rename_share_filename(struct messaging_context *msg_ctx,
5185                         struct share_mode_lock *lck,
5186                         const char *servicepath,
5187                         const char *newname);
5188 void get_file_infos(struct file_id id,
5189                     bool *delete_on_close,
5190                     struct timespec *write_time);
5191 bool is_valid_share_mode_entry(const struct share_mode_entry *e);
5192 bool is_deferred_open_entry(const struct share_mode_entry *e);
5193 bool is_unused_share_mode_entry(const struct share_mode_entry *e);
5194 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
5195                     uid_t uid, uint16 mid, uint16 op_type);
5196 void add_deferred_open(struct share_mode_lock *lck, uint16 mid,
5197                        struct timeval request_time,
5198                        struct file_id id);
5199 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
5200 void del_deferred_open_entry(struct share_mode_lock *lck, uint16 mid);
5201 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5202 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
5203 NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
5204                                  uint32 dosmode);
5205 void set_delete_on_close_token(struct share_mode_lock *lck, const UNIX_USER_TOKEN *tok);
5206 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, const UNIX_USER_TOKEN *tok);
5207 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USER_TOKEN *tok);
5208 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
5209 bool set_write_time(struct file_id fileid, struct timespec write_time);
5210 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
5211                                  const char *, void *),
5212                       void *private_data);
5213
5214 /* The following definitions come from locking/posix.c  */
5215
5216 bool is_posix_locked(files_struct *fsp,
5217                         SMB_BIG_UINT *pu_offset,
5218                         SMB_BIG_UINT *pu_count,
5219                         enum brl_type *plock_type,
5220                         enum brl_flavour lock_flav);
5221 bool posix_locking_init(bool read_only);
5222 bool posix_locking_end(void);
5223 void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);
5224 int fd_close_posix(struct files_struct *fsp);
5225 bool set_posix_lock_windows_flavour(files_struct *fsp,
5226                         SMB_BIG_UINT u_offset,
5227                         SMB_BIG_UINT u_count,
5228                         enum brl_type lock_type,
5229                         const struct lock_context *lock_ctx,
5230                         const struct lock_struct *plocks,
5231                         int num_locks,
5232                         int *errno_ret);
5233 bool release_posix_lock_windows_flavour(files_struct *fsp,
5234                                 SMB_BIG_UINT u_offset,
5235                                 SMB_BIG_UINT u_count,
5236                                 enum brl_type deleted_lock_type,
5237                                 const struct lock_context *lock_ctx,
5238                                 const struct lock_struct *plocks,
5239                                 int num_locks);
5240 bool set_posix_lock_posix_flavour(files_struct *fsp,
5241                         SMB_BIG_UINT u_offset,
5242                         SMB_BIG_UINT u_count,
5243                         enum brl_type lock_type,
5244                         int *errno_ret);
5245 bool release_posix_lock_posix_flavour(files_struct *fsp,
5246                                 SMB_BIG_UINT u_offset,
5247                                 SMB_BIG_UINT u_count,
5248                                 const struct lock_context *lock_ctx,
5249                                 const struct lock_struct *plocks,
5250                                 int num_locks);
5251
5252 /* The following definitions come from modules/vfs_default.c  */
5253
5254 int vfswrap_lstat(vfs_handle_struct *handle,  const char *path, SMB_STRUCT_STAT *sbuf);
5255 ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
5256 ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
5257 NTSTATUS vfs_default_init(void);
5258
5259 /* The following definitions come from nmbd/asyncdns.c  */
5260
5261 int asyncdns_fd(void);
5262 void kill_async_dns_child(void);
5263 void start_async_dns(void);
5264 void run_dns_queue(void);
5265 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5266 bool queue_dns_query(struct packet_struct *p,struct nmb_name *question);
5267 void kill_async_dns_child(void);
5268
5269 /* The following definitions come from nmbd/nmbd.c  */
5270
5271 struct event_context *nmbd_event_context(void);
5272 struct messaging_context *nmbd_messaging_context(void);
5273
5274 /* The following definitions come from nmbd/nmbd_become_dmb.c  */
5275
5276 void add_domain_names(time_t t);
5277
5278 /* The following definitions come from nmbd/nmbd_become_lmb.c  */
5279
5280 void insert_permanent_name_into_unicast( struct subnet_record *subrec, 
5281                                                 struct nmb_name *nmbname, uint16 nb_type );
5282 void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work,
5283                                    bool force_new_election);
5284 void become_local_master_browser(struct subnet_record *subrec, struct work_record *work);
5285 void set_workgroup_local_master_browser_name( struct work_record *work, const char *newname);
5286
5287 /* The following definitions come from nmbd/nmbd_browserdb.c  */
5288
5289 void update_browser_death_time( struct browse_cache_record *browc );
5290 struct browse_cache_record *create_browser_in_lmb_cache( const char *work_name, 
5291                                                          const char *browser_name, 
5292                                                          struct in_addr ip );
5293 struct browse_cache_record *find_browser_in_lmb_cache( const char *browser_name );
5294 void expire_lmb_browsers( time_t t );
5295
5296 /* The following definitions come from nmbd/nmbd_browsesync.c  */
5297
5298 void dmb_expire_and_sync_browser_lists(time_t t);
5299 void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec,
5300                                                    struct work_record *work);
5301 void collect_all_workgroup_names_from_wins_server(time_t t);
5302 void sync_all_dmbs(time_t t);
5303
5304 /* The following definitions come from nmbd/nmbd_elections.c  */
5305
5306 void check_master_browser_exists(time_t t);
5307 void run_elections(time_t t);
5308 void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5309 bool check_elections(void);
5310 void nmbd_message_election(struct messaging_context *msg,
5311                            void *private_data,
5312                            uint32_t msg_type,
5313                            struct server_id server_id,
5314                            DATA_BLOB *data);
5315
5316 /* The following definitions come from nmbd/nmbd_incomingdgrams.c  */
5317
5318 void tell_become_backup(void);
5319 void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5320 void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5321 void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5322 void process_master_browser_announce(struct subnet_record *subrec, 
5323                                      struct packet_struct *p,char *buf);
5324 void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5325 void process_get_backup_list_request(struct subnet_record *subrec,
5326                                      struct packet_struct *p,char *buf);
5327 void process_reset_browser(struct subnet_record *subrec,
5328                                   struct packet_struct *p,char *buf);
5329 void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf);
5330 void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len);
5331
5332 /* The following definitions come from nmbd/nmbd_incomingrequests.c  */
5333
5334 void process_name_release_request(struct subnet_record *subrec, 
5335                                   struct packet_struct *p);
5336 void process_name_refresh_request(struct subnet_record *subrec,
5337                                   struct packet_struct *p);
5338 void process_name_registration_request(struct subnet_record *subrec, 
5339                                        struct packet_struct *p);
5340 void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p);
5341 void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p);
5342
5343 /* The following definitions come from nmbd/nmbd_lmhosts.c  */
5344
5345 void load_lmhosts_file(const char *fname);
5346 bool find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp);
5347
5348 /* The following definitions come from nmbd/nmbd_logonnames.c  */
5349
5350 void add_logon_names(void);
5351
5352 /* The following definitions come from nmbd/nmbd_mynames.c  */
5353
5354 void register_my_workgroup_one_subnet(struct subnet_record *subrec);
5355 bool register_my_workgroup_and_names(void);
5356 void release_wins_names(void);
5357 void refresh_my_names(time_t t);
5358
5359 /* The following definitions come from nmbd/nmbd_namelistdb.c  */
5360
5361 void set_samba_nb_type(void);
5362 void remove_name_from_namelist(struct subnet_record *subrec, 
5363                                 struct name_record *namerec );
5364 struct name_record *find_name_on_subnet(struct subnet_record *subrec,
5365                                 const struct nmb_name *nmbname,
5366                                 bool self_only);
5367 struct name_record *find_name_for_remote_broadcast_subnet(struct nmb_name *nmbname,
5368                                                 bool self_only);
5369 void update_name_ttl( struct name_record *namerec, int ttl );
5370 bool add_name_to_subnet( struct subnet_record *subrec,
5371                         const char *name,
5372                         int type,
5373                         uint16 nb_flags,
5374                         int ttl,
5375                         enum name_source source,
5376                         int num_ips,
5377                         struct in_addr *iplist);
5378 void standard_success_register(struct subnet_record *subrec, 
5379                              struct userdata_struct *userdata,
5380                              struct nmb_name *nmbname, uint16 nb_flags, int ttl,
5381                              struct in_addr registered_ip);
5382 void standard_fail_register( struct subnet_record   *subrec,
5383                              struct nmb_name        *nmbname );
5384 bool find_ip_in_name_record( struct name_record *namerec, struct in_addr ip );
5385 void add_ip_to_name_record( struct name_record *namerec, struct in_addr new_ip );
5386 void remove_ip_from_name_record( struct name_record *namerec,
5387                                  struct in_addr      remove_ip );
5388 void standard_success_release( struct subnet_record   *subrec,
5389                                struct userdata_struct *userdata,
5390                                struct nmb_name        *nmbname,
5391                                struct in_addr          released_ip );
5392 void expire_names(time_t t);
5393 void add_samba_names_to_subnet( struct subnet_record *subrec );
5394 void dump_name_record( struct name_record *namerec, XFILE *fp);
5395 void dump_all_namelists(void);
5396
5397 /* The following definitions come from nmbd/nmbd_namequery.c  */
5398
5399 bool query_name(struct subnet_record *subrec, const char *name, int type,
5400                    query_name_success_function success_fn,
5401                    query_name_fail_function fail_fn, 
5402                    struct userdata_struct *userdata);
5403 bool query_name_from_wins_server(struct in_addr ip_to, 
5404                    const char *name, int type,
5405                    query_name_success_function success_fn,
5406                    query_name_fail_function fail_fn, 
5407                    struct userdata_struct *userdata);
5408
5409 /* The following definitions come from nmbd/nmbd_nameregister.c  */
5410
5411 void register_name(struct subnet_record *subrec,
5412                    const char *name, int type, uint16 nb_flags,
5413                    register_name_success_function success_fn,
5414                    register_name_fail_function fail_fn,
5415                    struct userdata_struct *userdata);
5416 void wins_refresh_name(struct name_record *namerec);
5417
5418 /* The following definitions come from nmbd/nmbd_namerelease.c  */
5419
5420 void release_name(struct subnet_record *subrec, struct name_record *namerec,
5421                   release_name_success_function success_fn,
5422                   release_name_fail_function fail_fn,
5423                   struct userdata_struct *userdata);
5424
5425 /* The following definitions come from nmbd/nmbd_nodestatus.c  */
5426
5427 bool node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
5428                  struct in_addr send_ip, node_status_success_function success_fn, 
5429                  node_status_fail_function fail_fn, struct userdata_struct *userdata);
5430
5431 /* The following definitions come from nmbd/nmbd_packets.c  */
5432
5433 uint16 get_nb_flags(char *buf);
5434 void set_nb_flags(char *buf, uint16 nb_flags);
5435 struct response_record *queue_register_name( struct subnet_record *subrec,
5436                           response_function resp_fn,
5437                           timeout_response_function timeout_fn,
5438                           register_name_success_function success_fn,
5439                           register_name_fail_function fail_fn,
5440                           struct userdata_struct *userdata,
5441                           struct nmb_name *nmbname,
5442                           uint16 nb_flags);
5443 void queue_wins_refresh(struct nmb_name *nmbname,
5444                         response_function resp_fn,
5445                         timeout_response_function timeout_fn,
5446                         uint16 nb_flags,
5447                         struct in_addr refresh_ip,
5448                         const char *tag);
5449 struct response_record *queue_register_multihomed_name( struct subnet_record *subrec,
5450                                                         response_function resp_fn,
5451                                                         timeout_response_function timeout_fn,
5452                                                         register_name_success_function success_fn,
5453                                                         register_name_fail_function fail_fn,
5454                                                         struct userdata_struct *userdata,
5455                                                         struct nmb_name *nmbname,
5456                                                         uint16 nb_flags,
5457                                                         struct in_addr register_ip,
5458                                                         struct in_addr wins_ip);
5459 struct response_record *queue_release_name( struct subnet_record *subrec,
5460                                             response_function resp_fn,
5461                                             timeout_response_function timeout_fn,
5462                                             release_name_success_function success_fn,
5463                                             release_name_fail_function fail_fn,
5464                                             struct userdata_struct *userdata,
5465                                             struct nmb_name *nmbname,
5466                                             uint16 nb_flags,
5467                                             struct in_addr release_ip,
5468                                             struct in_addr dest_ip);
5469 struct response_record *queue_query_name( struct subnet_record *subrec,
5470                           response_function resp_fn,
5471                           timeout_response_function timeout_fn,
5472                           query_name_success_function success_fn,
5473                           query_name_fail_function fail_fn,
5474                           struct userdata_struct *userdata,
5475                           struct nmb_name *nmbname);
5476 struct response_record *queue_query_name_from_wins_server( struct in_addr to_ip,
5477                           response_function resp_fn,
5478                           timeout_response_function timeout_fn,
5479                           query_name_success_function success_fn,
5480                           query_name_fail_function fail_fn,
5481                           struct userdata_struct *userdata,
5482                           struct nmb_name *nmbname);
5483 struct response_record *queue_node_status( struct subnet_record *subrec,
5484                           response_function resp_fn,
5485                           timeout_response_function timeout_fn,
5486                           node_status_success_function success_fn,
5487                           node_status_fail_function fail_fn,
5488                           struct userdata_struct *userdata,
5489                           struct nmb_name *nmbname,
5490                           struct in_addr send_ip);
5491 void reply_netbios_packet(struct packet_struct *orig_packet,
5492                           int rcode, enum netbios_reply_type_code rcv_code, int opcode,
5493                           int ttl, char *data,int len);
5494 void queue_packet(struct packet_struct *packet);
5495 void run_packet_queue(void);
5496 void retransmit_or_expire_response_records(time_t t);
5497 bool listen_for_packets(bool run_election);
5498 bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len,
5499                    const char *srcname, int src_type,
5500                    const char *dstname, int dest_type,
5501                    struct in_addr dest_ip,struct in_addr src_ip,
5502                    int dest_port);
5503
5504 /* The following definitions come from nmbd/nmbd_processlogon.c  */
5505
5506 void process_logon_packet(struct packet_struct *p, char *buf,int len, 
5507                           const char *mailslot);
5508
5509 /* The following definitions come from nmbd/nmbd_responserecordsdb.c  */
5510
5511 void remove_response_record(struct subnet_record *subrec,
5512                                 struct response_record *rrec);
5513 struct response_record *make_response_record( struct subnet_record *subrec,
5514                                               struct packet_struct *p,
5515                                               response_function resp_fn,
5516                                               timeout_response_function timeout_fn,
5517                                               success_function success_fn,
5518                                               fail_function fail_fn,
5519                                               struct userdata_struct *userdata);
5520 struct response_record *find_response_record(struct subnet_record **ppsubrec,
5521                                 uint16 id);
5522 bool is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec);
5523
5524 /* The following definitions come from nmbd/nmbd_sendannounce.c  */
5525
5526 void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip);
5527 void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work);
5528 void announce_my_server_names(time_t t);
5529 void announce_my_lm_server_names(time_t t);
5530 void reset_announce_timer(void);
5531 void announce_myself_to_domain_master_browser(time_t t);
5532 void announce_my_servers_removed(void);
5533 void announce_remote(time_t t);
5534 void browse_sync_remote(time_t t);
5535
5536 /* The following definitions come from nmbd/nmbd_serverlistdb.c  */
5537
5538 void remove_all_servers(struct work_record *work);
5539 struct server_record *find_server_in_workgroup(struct work_record *work, const char *name);
5540 void remove_server_from_workgroup(struct work_record *work, struct server_record *servrec);
5541 struct server_record *create_server_on_workgroup(struct work_record *work,
5542                                                  const char *name,int servertype, 
5543                                                  int ttl, const char *comment);
5544 void update_server_ttl(struct server_record *servrec, int ttl);
5545 void expire_servers(struct work_record *work, time_t t);
5546 void write_browse_list_entry(XFILE *fp, const char *name, uint32 rec_type,
5547                 const char *local_master_browser_name, const char *description);
5548 void write_browse_list(time_t t, bool force_write);
5549
5550 /* The following definitions come from nmbd/nmbd_subnetdb.c  */
5551
5552 void close_subnet(struct subnet_record *subrec);
5553 struct subnet_record *make_normal_subnet(const struct interface *iface);
5554 bool create_subnets(void);
5555 bool we_are_a_wins_client(void);
5556 struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec);
5557 struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec);
5558
5559 /* The following definitions come from nmbd/nmbd_synclists.c  */
5560
5561 void sync_browse_lists(struct work_record *work,
5562                        char *name, int nm_type, 
5563                        struct in_addr ip, bool local, bool servers);
5564 void sync_check_completion(void);
5565
5566 /* The following definitions come from nmbd/nmbd_winsproxy.c  */
5567
5568 void make_wins_proxy_name_query_request( struct subnet_record *subrec, 
5569                                          struct packet_struct *incoming_packet,
5570                                          struct nmb_name *question_name);
5571
5572 /* The following definitions come from nmbd/nmbd_winsserver.c  */
5573
5574 struct name_record *find_name_on_wins_subnet(const struct nmb_name *nmbname, bool self_only);
5575 bool wins_store_changed_namerec(const struct name_record *namerec);
5576 bool add_name_to_wins_subnet(const struct name_record *namerec);
5577 bool remove_name_from_wins_namelist(struct name_record *namerec);
5578 void dump_wins_subnet_namelist(XFILE *fp);
5579 bool packet_is_for_wins_server(struct packet_struct *packet);
5580 bool initialise_wins(void);
5581 void wins_process_name_refresh_request( struct subnet_record *subrec,
5582                                         struct packet_struct *p );
5583 void wins_process_name_registration_request(struct subnet_record *subrec,
5584                                             struct packet_struct *p);
5585 void wins_process_multihomed_name_registration_request( struct subnet_record *subrec,
5586                                                         struct packet_struct *p);
5587 void fetch_all_active_wins_1b_names(void);
5588 void send_wins_name_query_response(int rcode, struct packet_struct *p, 
5589                                           struct name_record *namerec);
5590 void wins_process_name_query_request(struct subnet_record *subrec, 
5591                                      struct packet_struct *p);
5592 void wins_process_name_release_request(struct subnet_record *subrec,
5593                                        struct packet_struct *p);
5594 void initiate_wins_processing(time_t t);
5595 void wins_write_name_record(struct name_record *namerec, XFILE *fp);
5596 void wins_write_database(time_t t, bool background);
5597 void nmbd_wins_new_entry(struct messaging_context *msg,
5598                                        void *private_data,
5599                                        uint32_t msg_type,
5600                                        struct server_id server_id,
5601                                        DATA_BLOB *data);
5602
5603 /* The following definitions come from nmbd/nmbd_workgroupdb.c  */
5604
5605 struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec, 
5606                                              const char *name);
5607 struct work_record *create_workgroup_on_subnet(struct subnet_record *subrec,
5608                                                const char *name, int ttl);
5609 void update_workgroup_ttl(struct work_record *work, int ttl);
5610 void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_record *work);
5611 void dump_workgroups(bool force_write);
5612 void expire_workgroups_and_servers(time_t t);
5613
5614 /* The following definitions come from param/loadparm.c  */
5615
5616 char *lp_smb_ports(void);
5617 char *lp_dos_charset(void);
5618 char *lp_unix_charset(void);
5619 char *lp_display_charset(void);
5620 char *lp_logfile(void);
5621 char *lp_configfile(void);
5622 char *lp_smb_passwd_file(void);
5623 char *lp_private_dir(void);
5624 char *lp_serverstring(void);
5625 int lp_printcap_cache_time(void);
5626 char *lp_addport_cmd(void);
5627 char *lp_enumports_cmd(void);
5628 char *lp_addprinter_cmd(void);
5629 char *lp_deleteprinter_cmd(void);
5630 char *lp_os2_driver_map(void);
5631 char *lp_lockdir(void);
5632 char *lp_piddir(void);
5633 char *lp_mangling_method(void);
5634 int lp_mangle_prefix(void);
5635 char *lp_utmpdir(void);
5636 char *lp_wtmpdir(void);
5637 bool lp_utmp(void);
5638 char *lp_rootdir(void);
5639 char *lp_defaultservice(void);
5640 char *lp_msg_command(void);
5641 char *lp_get_quota_command(void);
5642 char *lp_set_quota_command(void);
5643 char *lp_auto_services(void);
5644 char *lp_passwd_program(void);
5645 char *lp_passwd_chat(void);
5646 char *lp_passwordserver(void);
5647 char *lp_name_resolve_order(void);
5648 char *lp_realm(void);
5649 const char *lp_afs_username_map(void);
5650 int lp_afs_token_lifetime(void);
5651 char *lp_log_nt_token_command(void);
5652 char *lp_username_map(void);
5653 const char *lp_logon_script(void);
5654 const char *lp_logon_path(void);
5655 const char *lp_logon_drive(void);
5656 const char *lp_logon_home(void);
5657 char *lp_remote_announce(void);
5658 char *lp_remote_browse_sync(void);
5659 const char **lp_wins_server_list(void);
5660 const char **lp_interfaces(void);
5661 const char *lp_socket_address(void);
5662 char *lp_nis_home_map_name(void);
5663 const char **lp_netbios_aliases(void);
5664 const char *lp_passdb_backend(void);
5665 const char **lp_preload_modules(void);
5666 char *lp_panic_action(void);
5667 char *lp_adduser_script(void);
5668 char *lp_renameuser_script(void);
5669 char *lp_deluser_script(void);
5670 const char *lp_guestaccount(void);
5671 char *lp_addgroup_script(void);
5672 char *lp_delgroup_script(void);
5673 char *lp_addusertogroup_script(void);
5674 char *lp_deluserfromgroup_script(void);
5675 char *lp_setprimarygroup_script(void);
5676 char *lp_addmachine_script(void);
5677 char *lp_shutdown_script(void);
5678 char *lp_abort_shutdown_script(void);
5679 char *lp_username_map_script(void);
5680 char *lp_check_password_script(void);
5681 char *lp_wins_hook(void);
5682 const char *lp_template_homedir(void);
5683 const char *lp_template_shell(void);
5684 const char *lp_winbind_separator(void);
5685 int lp_acl_compatibility(void);
5686 bool lp_winbind_enum_users(void);
5687 bool lp_winbind_enum_groups(void);
5688 bool lp_winbind_use_default_domain(void);
5689 bool lp_winbind_trusted_domains_only(void);
5690 bool lp_winbind_nested_groups(void);
5691 int lp_winbind_expand_groups(void);
5692 bool lp_winbind_refresh_tickets(void);
5693 bool lp_winbind_offline_logon(void);
5694 bool lp_winbind_normalize_names(void);
5695 bool lp_winbind_rpc_only(void);
5696 const char **lp_idmap_domains(void);
5697 const char *lp_idmap_backend(void);
5698 char *lp_idmap_alloc_backend(void);
5699 int lp_idmap_cache_time(void);
5700 int lp_idmap_negative_cache_time(void);
5701 int lp_keepalive(void);
5702 bool lp_passdb_expand_explicit(void);
5703 char *lp_ldap_suffix(void);
5704 char *lp_ldap_admin_dn(void);
5705 int lp_ldap_ssl(void);
5706 bool lp_ldap_ssl_ads(void);
5707 int lp_ldap_passwd_sync(void);
5708 bool lp_ldap_delete_dn(void);
5709 int lp_ldap_replication_sleep(void);
5710 int lp_ldap_timeout(void);
5711 int lp_ldap_connection_timeout(void);
5712 int lp_ldap_page_size(void);
5713 int lp_ldap_debug_level(void);
5714 int lp_ldap_debug_threshold(void);
5715 char *lp_add_share_cmd(void);
5716 char *lp_change_share_cmd(void);
5717 char *lp_delete_share_cmd(void);
5718 char *lp_usershare_path(void);
5719 const char **lp_usershare_prefix_allow_list(void);
5720 const char **lp_usershare_prefix_deny_list(void);
5721 const char **lp_eventlog_list(void);
5722 bool lp_registry_shares(void);
5723 bool lp_usershare_allow_guests(void);
5724 bool lp_usershare_owner_only(void);
5725 bool lp_disable_netbios(void);
5726 bool lp_reset_on_zero_vc(void);
5727 bool lp_ms_add_printer_wizard(void);
5728 bool lp_dns_proxy(void);
5729 bool lp_wins_support(void);
5730 bool lp_we_are_a_wins_server(void);
5731 bool lp_wins_proxy(void);
5732 bool lp_local_master(void);
5733 bool lp_domain_logons(void);
5734 const char **lp_init_logon_delayed_hosts(void);
5735 int lp_init_logon_delay(void);
5736 bool lp_load_printers(void);
5737 bool lp_readraw(void);
5738 bool lp_large_readwrite(void);
5739 bool lp_writeraw(void);
5740 bool lp_null_passwords(void);
5741 bool lp_obey_pam_restrictions(void);
5742 bool lp_encrypted_passwords(void);
5743 bool lp_update_encrypted(void);
5744 int lp_client_schannel(void);
5745 int lp_server_schannel(void);
5746 bool lp_syslog_only(void);
5747 bool lp_timestamp_logs(void);
5748 bool lp_debug_prefix_timestamp(void);
5749 bool lp_debug_hires_timestamp(void);
5750 bool lp_debug_pid(void);
5751 bool lp_debug_uid(void);
5752 bool lp_debug_class(void);
5753 bool lp_enable_core_files(void);
5754 bool lp_browse_list(void);
5755 bool lp_nis_home_map(void);
5756 bool lp_bind_interfaces_only(void);
5757 bool lp_pam_password_change(void);
5758 bool lp_unix_password_sync(void);
5759 bool lp_passwd_chat_debug(void);
5760 int lp_passwd_chat_timeout(void);
5761 bool lp_nt_pipe_support(void);
5762 bool lp_nt_status_support(void);
5763 bool lp_stat_cache(void);
5764 int lp_max_stat_cache_size(void);
5765 bool lp_allow_trusted_domains(void);
5766 int lp_restrict_anonymous(void);
5767 bool lp_lanman_auth(void);
5768 bool lp_ntlm_auth(void);
5769 bool lp_client_plaintext_auth(void);
5770 bool lp_client_lanman_auth(void);
5771 bool lp_client_ntlmv2_auth(void);
5772 bool lp_host_msdfs(void);
5773 bool lp_kernel_oplocks(void);
5774 bool lp_enhanced_browsing(void);
5775 bool lp_use_mmap(void);
5776 bool lp_unix_extensions(void);
5777 bool lp_use_spnego(void);
5778 bool lp_client_use_spnego(void);
5779 bool lp_hostname_lookups(void);
5780 bool lp_change_notify(const struct share_params *p );
5781 bool lp_kernel_change_notify(const struct share_params *p );
5782 bool lp_use_kerberos_keytab(void);
5783 bool lp_defer_sharing_violations(void);
5784 bool lp_enable_privileges(void);
5785 bool lp_enable_asu_support(void);
5786 int lp_os_level(void);
5787 int lp_max_ttl(void);
5788 int lp_max_wins_ttl(void);
5789 int lp_min_wins_ttl(void);
5790 int lp_max_log_size(void);
5791 int lp_max_open_files(void);
5792 int lp_open_files_db_hash_size(void);
5793 int lp_maxxmit(void);
5794 int lp_maxmux(void);
5795 int lp_passwordlevel(void);
5796 int lp_usernamelevel(void);
5797 int lp_deadtime(void);
5798 bool lp_getwd_cache(void);
5799 int lp_maxprotocol(void);
5800 int lp_minprotocol(void);
5801 int lp_security(void);
5802 const char **lp_auth_methods(void);
5803 bool lp_paranoid_server_security(void);
5804 int lp_maxdisksize(void);
5805 int lp_lpqcachetime(void);
5806 int lp_max_smbd_processes(void);
5807 bool _lp_disable_spoolss(void);
5808 int lp_syslog(void);
5809 int lp_lm_announce(void);
5810 int lp_lm_interval(void);
5811 int lp_machine_password_timeout(void);
5812 int lp_map_to_guest(void);
5813 int lp_oplock_break_wait_time(void);
5814 int lp_lock_spin_time(void);
5815 int lp_usershare_max_shares(void);
5816 const char *lp_socket_options(void);
5817 int lp_config_backend(void);
5818 char *lp_preexec(int );
5819 char *lp_postexec(int );
5820 char *lp_rootpreexec(int );
5821 char *lp_rootpostexec(int );
5822 char *lp_servicename(int );
5823 const char *lp_const_servicename(int );
5824 char *lp_pathname(int );
5825 char *lp_dontdescend(int );
5826 char *lp_username(int );
5827 const char **lp_invalid_users(int );
5828 const char **lp_valid_users(int );
5829 const char **lp_admin_users(int );
5830 const char **lp_svcctl_list(void);
5831 char *lp_cups_options(int );
5832 char *lp_cups_server(void);
5833 char *lp_iprint_server(void);
5834 int lp_cups_connection_timeout(void);
5835 const char *lp_ctdbd_socket(void);
5836 const char **lp_cluster_addresses(void);
5837 bool lp_clustering(void);
5838 char *lp_printcommand(int );
5839 char *lp_lpqcommand(int );
5840 char *lp_lprmcommand(int );
5841 char *lp_lppausecommand(int );
5842 char *lp_lpresumecommand(int );
5843 char *lp_queuepausecommand(int );
5844 char *lp_queueresumecommand(int );
5845 const char *lp_printjob_username(int );
5846 const char **lp_hostsallow(int );
5847 const char **lp_hostsdeny(int );
5848 char *lp_magicscript(int );
5849 char *lp_magicoutput(int );
5850 char *lp_comment(int );
5851 char *lp_force_user(int );
5852 char *lp_force_group(int );
5853 const char **lp_readlist(int );
5854 const char **lp_writelist(int );
5855 const char **lp_printer_admin(int );
5856 char *lp_fstype(int );
5857 const char **lp_vfs_objects(int );
5858 char *lp_msdfs_proxy(int );
5859 char *lp_veto_files(int );
5860 char *lp_hide_files(int );
5861 char *lp_veto_oplocks(int );
5862 bool lp_msdfs_root(int );
5863 char *lp_aio_write_behind(int );
5864 char *lp_dfree_command(int );
5865 bool lp_autoloaded(int );
5866 bool lp_preexec_close(int );
5867 bool lp_rootpreexec_close(int );
5868 int lp_casesensitive(int );
5869 bool lp_preservecase(int );
5870 bool lp_shortpreservecase(int );
5871 bool lp_hide_dot_files(int );
5872 bool lp_hide_special_files(int );
5873 bool lp_hideunreadable(int );
5874 bool lp_hideunwriteable_files(int );
5875 bool lp_browseable(int );
5876 bool lp_readonly(int );
5877 bool lp_no_set_dir(int );
5878 bool lp_guest_ok(int );
5879 bool lp_guest_only(int );
5880 bool lp_administrative_share(int );
5881 bool lp_print_ok(int );
5882 bool lp_map_hidden(int );
5883 bool lp_map_archive(int );
5884 bool lp_store_dos_attributes(int );
5885 bool lp_dmapi_support(int );
5886 bool lp_locking(const struct share_params *p );
5887 int lp_strict_locking(const struct share_params *p );
5888 bool lp_posix_locking(const struct share_params *p );
5889 bool lp_share_modes(int );
5890 bool lp_oplocks(int );
5891 bool lp_level2_oplocks(int );
5892 bool lp_onlyuser(int );
5893 bool lp_manglednames(const struct share_params *p );
5894 bool lp_widelinks(int );
5895 bool lp_symlinks(int );
5896 bool lp_syncalways(int );
5897 bool lp_strict_allocate(int );
5898 bool lp_strict_sync(int );
5899 bool lp_map_system(int );
5900 bool lp_delete_readonly(int );
5901 bool lp_fake_oplocks(int );
5902 bool lp_recursive_veto_delete(int );
5903 bool lp_dos_filemode(int );
5904 bool lp_dos_filetimes(int );
5905 bool lp_dos_filetime_resolution(int );
5906 bool lp_fake_dir_create_times(int );
5907 bool lp_blocking_locks(int );
5908 bool lp_inherit_perms(int );
5909 bool lp_inherit_acls(int );
5910 bool lp_inherit_owner(int );
5911 bool lp_use_client_driver(int );
5912 bool lp_default_devmode(int );
5913 bool lp_force_printername(int );
5914 bool lp_nt_acl_support(int );
5915 bool lp_force_unknown_acl_user(int );
5916 bool lp_ea_support(int );
5917 bool _lp_use_sendfile(int );
5918 bool lp_profile_acls(int );
5919 bool lp_map_acl_inherit(int );
5920 bool lp_afs_share(int );
5921 bool lp_acl_check_permissions(int );
5922 bool lp_acl_group_control(int );
5923 bool lp_acl_map_full_control(int );
5924 int lp_create_mask(int );
5925 int lp_force_create_mode(int );
5926 int lp_security_mask(int );
5927 int lp_force_security_mode(int );
5928 int lp_dir_mask(int );
5929 int lp_force_dir_mode(int );
5930 int lp_dir_security_mask(int );
5931 int lp_force_dir_security_mode(int );
5932 int lp_max_connections(int );
5933 int lp_defaultcase(int );
5934 int lp_minprintspace(int );
5935 int lp_printing(int );
5936 int lp_max_reported_jobs(int );
5937 int lp_oplock_contention_limit(int );
5938 int lp_csc_policy(int );
5939 int lp_write_cache_size(int );
5940 int lp_block_size(int );
5941 int lp_dfree_cache_time(int );
5942 int lp_allocation_roundup_size(int );
5943 int lp_aio_read_size(int );
5944 int lp_aio_write_size(int );
5945 int lp_map_readonly(int );
5946 int lp_directory_name_cache_size(int );
5947 int lp_smb_encrypt(int );
5948 char lp_magicchar(const struct share_params *p );
5949 int lp_winbind_cache_time(void);
5950 int lp_winbind_reconnect_delay(void);
5951 const char **lp_winbind_nss_info(void);
5952 int lp_algorithmic_rid_base(void);
5953 int lp_name_cache_timeout(void);
5954 int lp_client_signing(void);
5955 int lp_server_signing(void);
5956 int lp_client_ldap_sasl_wrapping(void);
5957 char *lp_parm_talloc_string(int snum, const char *type, const char *option, const char *def);
5958 const char *lp_parm_const_string(int snum, const char *type, const char *option, const char *def);
5959 const char **lp_parm_string_list(int snum, const char *type, const char *option, const char **def);
5960 int lp_parm_int(int snum, const char *type, const char *option, int def);
5961 unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsigned long def);
5962 bool lp_parm_bool(int snum, const char *type, const char *option, bool def);
5963 int lp_parm_enum(int snum, const char *type, const char *option,
5964                  const struct enum_list *_enum, int def);
5965 bool lp_add_home(const char *pszHomename, int iDefaultService,
5966                  const char *user, const char *pszHomedir);
5967 int lp_add_service(const char *pszService, int iDefaultService);
5968 bool lp_add_printer(const char *pszPrintername, int iDefaultService);
5969 bool lp_parameter_is_valid(const char *pszParmName);
5970 bool lp_parameter_is_global(const char *pszParmName);
5971 bool lp_parameter_is_canonical(const char *parm_name);
5972 bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
5973                                bool *inverse);
5974 bool lp_canonicalize_parameter_with_value(const char *parm_name,
5975                                           const char *val,
5976                                           const char **canon_parm,
5977                                           const char **canon_val);
5978 void show_parameter_list(void);
5979 bool lp_string_is_valid_boolean(const char *parm_value);
5980 bool lp_invert_boolean(const char *str, const char **inverse_str);
5981 bool lp_canonicalize_boolean(const char *str, const char**canon_str);
5982 bool service_ok(int iService);
5983 bool lp_config_backend_is_registry(void);
5984 bool lp_config_backend_is_file(void);
5985 bool lp_file_list_changed(void);
5986 bool lp_idmap_uid(uid_t *low, uid_t *high);
5987 bool lp_idmap_gid(gid_t *low, gid_t *high);
5988 const char *lp_ldap_machine_suffix(void);
5989 const char *lp_ldap_user_suffix(void);
5990 const char *lp_ldap_group_suffix(void);
5991 const char *lp_ldap_idmap_suffix(void);
5992 void *lp_local_ptr(int snum, void *ptr);
5993 bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue);
5994 void init_locals(void);
5995 bool lp_is_default(int snum, struct parm_struct *parm);
5996 bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
5997 struct parm_struct *lp_get_parameter(const char *param_name);
5998 struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
5999 bool lp_snum_ok(int iService);
6000 void lp_add_one_printer(const char *name, const char *comment, void *pdata);
6001 bool lp_loaded(void);
6002 void lp_killunused(bool (*snumused) (int));
6003 void lp_kill_all_services(void);
6004 void lp_killservice(int iServiceIn);
6005 const char* server_role_str(uint32 role);
6006 enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
6007                         SMB_STRUCT_STAT *psbuf,
6008                         const char *servicename,
6009                         int snum,
6010                         char **lines,
6011                         int numlines,
6012                         char **pp_sharepath,
6013                         char **pp_comment,
6014                         SEC_DESC **ppsd,
6015                         bool *pallow_guest);
6016 int load_usershare_service(const char *servicename);
6017 int load_usershare_shares(void);
6018 void gfree_loadparm(void);
6019 void lp_set_in_client(bool b);
6020 bool lp_is_in_client(void);
6021 bool lp_load_ex(const char *pszFname,
6022                 bool global_only,
6023                 bool save_defaults,
6024                 bool add_ipc,
6025                 bool initialize_globals,
6026                 bool allow_include_registry,
6027                 bool allow_registry_shares);
6028 bool lp_load(const char *pszFname,
6029              bool global_only,
6030              bool save_defaults,
6031              bool add_ipc,
6032              bool initialize_globals);
6033 bool lp_load_initial_only(const char *pszFname);
6034 bool lp_load_with_registry_shares(const char *pszFname,
6035                                   bool global_only,
6036                                   bool save_defaults,
6037                                   bool add_ipc,
6038                                   bool initialize_globals);
6039 int lp_numservices(void);
6040 void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
6041 void lp_dump_one(FILE * f, bool show_defaults, int snum);
6042 int lp_servicenumber(const char *pszServiceName);
6043 bool share_defined(const char *service_name);
6044 struct share_params *get_share_params(TALLOC_CTX *mem_ctx,
6045                                       const char *sharename);
6046 struct share_iterator *share_list_all(TALLOC_CTX *mem_ctx);
6047 struct share_params *next_share(struct share_iterator *list);
6048 struct share_params *next_printer(struct share_iterator *list);
6049 struct share_params *snum2params_static(int snum);
6050 const char *volume_label(int snum);
6051 int lp_server_role(void);
6052 bool lp_domain_master(void);
6053 bool lp_preferred_master(void);
6054 void lp_remove_service(int snum);
6055 void lp_copy_service(int snum, const char *new_name);
6056 int lp_default_server_announce(void);
6057 int lp_major_announce_version(void);
6058 int lp_minor_announce_version(void);
6059 void lp_set_name_resolve_order(const char *new_order);
6060 const char *lp_printername(int snum);
6061 void lp_set_logfile(const char *name);
6062 int lp_maxprintjobs(int snum);
6063 const char *lp_printcapname(void);
6064 bool lp_disable_spoolss( void );
6065 void lp_set_spoolss_state( uint32 state );
6066 uint32 lp_get_spoolss_state( void );
6067 bool lp_use_sendfile(int snum);
6068 void set_use_sendfile(int snum, bool val);
6069 void set_store_dos_attributes(int snum, bool val);
6070 void lp_set_mangling_method(const char *new_method);
6071 bool lp_posix_pathnames(void);
6072 void lp_set_posix_pathnames(void);
6073 enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp);
6074 void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
6075 int lp_min_receive_file_size(void);
6076
6077 /* The following definitions come from param/params.c  */
6078
6079 bool pm_process( const char *FileName,
6080                 bool (*sfunc)(const char *, void *),
6081                 bool (*pfunc)(const char *, const char *, void *),
6082                 void *userdata);
6083
6084 /* The following definitions come from param/util.c  */
6085
6086 uint32 get_int_param( const char* param );
6087 char* get_string_param( const char* param );
6088
6089 /* The following definitions come from passdb/login_cache.c  */
6090
6091 bool login_cache_init(void);
6092 bool login_cache_shutdown(void);
6093 LOGIN_CACHE * login_cache_read(struct samu *sampass);
6094 bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry);
6095 bool login_cache_delentry(const struct samu *sampass);
6096
6097 /* The following definitions come from passdb/lookup_sid.c  */
6098
6099 bool lookup_name(TALLOC_CTX *mem_ctx,
6100                  const char *full_name, int flags,
6101                  const char **ret_domain, const char **ret_name,
6102                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6103 bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
6104                  const char *full_name, int flags,
6105                  const char **ret_domain, const char **ret_name,
6106                  DOM_SID *ret_sid, enum lsa_SidType *ret_type);
6107 NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
6108                      const DOM_SID **sids, int level,
6109                      struct lsa_dom_info **ret_domains,
6110                      struct lsa_name_info **ret_names);
6111 bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6112                 const char **ret_domain, const char **ret_name,
6113                 enum lsa_SidType *ret_type);
6114 void store_uid_sid_cache(const DOM_SID *psid, uid_t uid);
6115 void store_gid_sid_cache(const DOM_SID *psid, gid_t gid);
6116 void uid_to_sid(DOM_SID *psid, uid_t uid);
6117 void gid_to_sid(DOM_SID *psid, gid_t gid);
6118 bool sid_to_uid(const DOM_SID *psid, uid_t *puid);
6119 bool sid_to_gid(const DOM_SID *psid, gid_t *pgid);
6120
6121 /* The following definitions come from passdb/machine_sid.c  */
6122
6123 DOM_SID *get_global_sam_sid(void);
6124 void reset_global_sam_sid(void) ;
6125 bool sid_check_is_domain(const DOM_SID *sid);
6126 bool sid_check_is_in_our_domain(const DOM_SID *sid);
6127
6128 /* The following definitions come from passdb/passdb.c  */
6129
6130 const char *my_sam_name(void);
6131 struct samu *samu_new( TALLOC_CTX *ctx );
6132 NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
6133 NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd);
6134 char *pdb_encode_acct_ctrl(uint32 acct_ctrl, size_t length);
6135 uint32 pdb_decode_acct_ctrl(const char *p);
6136 void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32 acct_ctrl);
6137 bool pdb_gethexpwd(const char *p, unsigned char *pwd);
6138 void pdb_sethexhours(char *p, const unsigned char *hours);
6139 bool pdb_gethexhours(const char *p, unsigned char *hours);
6140 int algorithmic_rid_base(void);
6141 uid_t algorithmic_pdb_user_rid_to_uid(uint32 user_rid);
6142 uid_t max_algorithmic_uid(void);
6143 uint32 algorithmic_pdb_uid_to_user_rid(uid_t uid);
6144 gid_t pdb_group_rid_to_gid(uint32 group_rid);
6145 gid_t max_algorithmic_gid(void);
6146 uint32 algorithmic_pdb_gid_to_group_rid(gid_t gid);
6147 bool algorithmic_pdb_rid_is_user(uint32 rid);
6148 bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
6149                             enum lsa_SidType *type);
6150 NTSTATUS local_password_change(const char *user_name,
6151                                 int local_flags,
6152                                 const char *new_passwd, 
6153                                 char **pp_err_str,
6154                                 char **pp_msg_str);
6155 bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
6156                            uint8 *buf, uint32 buflen);
6157 uint32 init_buffer_from_samu (uint8 **buf, struct samu *sampass, bool size_only);
6158 bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
6159 bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
6160 bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
6161 bool pdb_increment_bad_password_count(struct samu *sampass);
6162 bool is_dc_trusted_domain_situation(const char *domain_name);
6163 bool get_trust_pw_clear(const char *domain, char **ret_pwd,
6164                         const char **account_name, uint32 *channel);
6165 bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
6166                        const char **account_name, uint32 *channel);
6167 struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx,
6168                                                 struct samu *pw);
6169
6170 /* The following definitions come from passdb/pdb_compat.c  */
6171
6172 uint32 pdb_get_user_rid (const struct samu *sampass);
6173 uint32 pdb_get_group_rid (struct samu *sampass);
6174 bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag);
6175 bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag);
6176
6177 /* The following definitions come from passdb/pdb_get_set.c  */
6178
6179 uint32 pdb_get_acct_ctrl(const struct samu *sampass);
6180 time_t pdb_get_logon_time(const struct samu *sampass);
6181 time_t pdb_get_logoff_time(const struct samu *sampass);
6182 time_t pdb_get_kickoff_time(const struct samu *sampass);
6183 time_t pdb_get_bad_password_time(const struct samu *sampass);
6184 time_t pdb_get_pass_last_set_time(const struct samu *sampass);
6185 time_t pdb_get_pass_can_change_time(const struct samu *sampass);
6186 time_t pdb_get_pass_can_change_time_noncalc(const struct samu *sampass);
6187 time_t pdb_get_pass_must_change_time(const struct samu *sampass);
6188 bool pdb_get_pass_can_change(const struct samu *sampass);
6189 uint16 pdb_get_logon_divs(const struct samu *sampass);
6190 uint32 pdb_get_hours_len(const struct samu *sampass);
6191 const uint8 *pdb_get_hours(const struct samu *sampass);
6192 const uint8 *pdb_get_nt_passwd(const struct samu *sampass);
6193 const uint8 *pdb_get_lanman_passwd(const struct samu *sampass);
6194 const uint8 *pdb_get_pw_history(const struct samu *sampass, uint32 *current_hist_len);
6195 const char *pdb_get_plaintext_passwd(const struct samu *sampass);
6196 const DOM_SID *pdb_get_user_sid(const struct samu *sampass);
6197 const DOM_SID *pdb_get_group_sid(struct samu *sampass);
6198 enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element);
6199 const char *pdb_get_username(const struct samu *sampass);
6200 const char *pdb_get_domain(const struct samu *sampass);
6201 const char *pdb_get_nt_username(const struct samu *sampass);
6202 const char *pdb_get_fullname(const struct samu *sampass);
6203 const char *pdb_get_homedir(const struct samu *sampass);
6204 const char *pdb_get_dir_drive(const struct samu *sampass);
6205 const char *pdb_get_logon_script(const struct samu *sampass);
6206 const char *pdb_get_profile_path(const struct samu *sampass);
6207 const char *pdb_get_acct_desc(const struct samu *sampass);
6208 const char *pdb_get_workstations(const struct samu *sampass);
6209 const char *pdb_get_comment(const struct samu *sampass);
6210 const char *pdb_get_munged_dial(const struct samu *sampass);
6211 uint16 pdb_get_bad_password_count(const struct samu *sampass);
6212 uint16 pdb_get_logon_count(const struct samu *sampass);
6213 uint32 pdb_get_unknown_6(const struct samu *sampass);
6214 void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods);
6215 bool pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum pdb_value_state flag);
6216 bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6217 bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6218 bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6219 bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6220 bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6221 bool pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6222 bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
6223 bool pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state flag);
6224 bool pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state flag);
6225 bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag);
6226 bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag);
6227 bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag);
6228 bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag);
6229 bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag);
6230 bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag);
6231 bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag);
6232 bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag);
6233 bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag);
6234 bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag);
6235 bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag);
6236 bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag);
6237 bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag);
6238 bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag);
6239 bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag);
6240 bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag);
6241 bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag);
6242 bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag);
6243 bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag);
6244 bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag);
6245 bool pdb_set_bad_password_count(struct samu *sampass, uint16 bad_password_count, enum pdb_value_state flag);
6246 bool pdb_set_logon_count(struct samu *sampass, uint16 logon_count, enum pdb_value_state flag);
6247 bool pdb_set_unknown_6(struct samu *sampass, uint32 unkn, enum pdb_value_state flag);
6248 bool pdb_set_hours(struct samu *sampass, const uint8 *hours, enum pdb_value_state flag);
6249 bool pdb_set_backend_private_data(struct samu *sampass, void *private_data, 
6250                                    void (*free_fn)(void **), 
6251                                    const struct pdb_methods *my_methods, 
6252                                    enum pdb_value_state flag);
6253 bool pdb_set_pass_can_change(struct samu *sampass, bool canchange);
6254 bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext);
6255 uint32 pdb_build_fields_present(struct samu *sampass);
6256
6257 /* The following definitions come from passdb/pdb_interface.c  */
6258
6259 NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
6260 struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
6261 struct event_context *pdb_get_event_context(void);
6262 NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
6263 bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
6264 bool guest_user_info( struct samu *user );
6265 bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid) ;
6266 NTSTATUS pdb_create_user(TALLOC_CTX *mem_ctx, const char *name, uint32 flags,
6267                          uint32 *rid);
6268 NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct);
6269 NTSTATUS pdb_add_sam_account(struct samu *sam_acct) ;
6270 NTSTATUS pdb_update_sam_account(struct samu *sam_acct) ;
6271 NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) ;
6272 NTSTATUS pdb_rename_sam_account(struct samu *oldname, const char *newname);
6273 NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success);
6274 bool pdb_getgrsid(GROUP_MAP *map, DOM_SID sid);
6275 bool pdb_getgrgid(GROUP_MAP *map, gid_t gid);
6276 bool pdb_getgrnam(GROUP_MAP *map, const char *name);
6277 NTSTATUS pdb_create_dom_group(TALLOC_CTX *mem_ctx, const char *name,
6278                               uint32 *rid);
6279 NTSTATUS pdb_delete_dom_group(TALLOC_CTX *mem_ctx, uint32 rid);
6280 NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map);
6281 NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map);
6282 NTSTATUS pdb_delete_group_mapping_entry(DOM_SID sid);
6283 bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
6284                             size_t *p_num_entries, bool unix_only);
6285 NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
6286                                 const DOM_SID *sid,
6287                                 uint32 **pp_member_rids,
6288                                 size_t *p_num_members);
6289 NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
6290                                     DOM_SID **pp_sids, gid_t **pp_gids,
6291                                     size_t *p_num_groups);
6292 NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
6293 NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6294                           uint32 member_rid);
6295 NTSTATUS pdb_del_groupmem(TALLOC_CTX *mem_ctx, uint32 group_rid,
6296                           uint32 member_rid);
6297 NTSTATUS pdb_create_alias(const char *name, uint32 *rid);
6298 NTSTATUS pdb_delete_alias(const DOM_SID *sid);
6299 NTSTATUS pdb_get_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6300 NTSTATUS pdb_set_aliasinfo(const DOM_SID *sid, struct acct_info *info);
6301 NTSTATUS pdb_add_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6302 NTSTATUS pdb_del_aliasmem(const DOM_SID *alias, const DOM_SID *member);
6303 NTSTATUS pdb_enum_aliasmem(const DOM_SID *alias,
6304                            DOM_SID **pp_members, size_t *p_num_members);
6305 NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
6306                                     const DOM_SID *domain_sid,
6307                                     const DOM_SID *members, size_t num_members,
6308                                     uint32 **pp_alias_rids,
6309                                     size_t *p_num_alias_rids);
6310 NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
6311                          int num_rids,
6312                          uint32 *rids,
6313                          const char **names,
6314                          enum lsa_SidType *attrs);
6315 NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
6316                           int num_names,
6317                           const char **names,
6318                           uint32 *rids,
6319                           enum lsa_SidType *attrs);
6320 bool pdb_get_account_policy(int policy_index, uint32 *value);
6321 bool pdb_set_account_policy(int policy_index, uint32 value);
6322 bool pdb_get_seq_num(time_t *seq_num);
6323 bool pdb_uid_to_rid(uid_t uid, uint32 *rid);
6324 bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid);
6325 bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid);
6326 bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
6327                    enum lsa_SidType *type);
6328 bool pdb_rid_algorithm(void);
6329 bool pdb_new_rid(uint32 *rid);
6330 bool initialize_password_db(bool reload, struct event_context *event_ctx);
6331 struct pdb_search *pdb_search_init(enum pdb_search_type type);
6332 struct pdb_search *pdb_search_users(uint32 acct_flags);
6333 struct pdb_search *pdb_search_groups(void);
6334 struct pdb_search *pdb_search_aliases(const DOM_SID *sid);
6335 uint32 pdb_search_entries(struct pdb_search *search,
6336                           uint32 start_idx, uint32 max_entries,
6337                           struct samr_displayentry **result);
6338 void pdb_search_destroy(struct pdb_search *search);
6339 bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid, 
6340                            time_t *pass_last_set_time);
6341 bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
6342                            const DOM_SID *sid);
6343 bool pdb_del_trusteddom_pw(const char *domain);
6344 NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6345                               struct trustdom_info ***domains);
6346 NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
6347
6348 /* The following definitions come from passdb/pdb_ldap.c  */
6349
6350 const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
6351 int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
6352                                           const char *user,
6353                                           LDAPMessage ** result,
6354                                           const char **attr);
6355 const char **talloc_attrs(TALLOC_CTX *mem_ctx, ...);
6356 NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
6357 NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
6358 NTSTATUS pdb_ldap_init(void);
6359
6360 /* The following definitions come from passdb/pdb_nds.c  */
6361
6362 int pdb_nds_get_password(
6363         struct smbldap_state *ldap_state,
6364         char *object_dn,
6365         size_t *pwd_len,
6366         char *pwd );
6367 int pdb_nds_set_password(
6368         struct smbldap_state *ldap_state,
6369         char *object_dn,
6370         const char *pwd );
6371 NTSTATUS pdb_nds_init(void);
6372
6373 /* The following definitions come from passdb/pdb_smbpasswd.c  */
6374
6375 NTSTATUS pdb_smbpasswd_init(void) ;
6376
6377 /* The following definitions come from passdb/pdb_tdb.c  */
6378
6379 bool init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen);
6380 NTSTATUS pdb_tdbsam_init(void);
6381
6382 /* The following definitions come from passdb/secrets.c  */
6383
6384 bool secrets_init(void);
6385 struct db_context *secrets_db_ctx(void);
6386 void secrets_shutdown(void);
6387 void *secrets_fetch(const char *key, size_t *size);
6388 bool secrets_store(const char *key, const void *data, size_t size);
6389 bool secrets_delete(const char *key);
6390 bool secrets_store_domain_sid(const char *domain, const DOM_SID *sid);
6391 bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid);
6392 bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
6393 bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
6394 void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
6395 uint32 get_default_sec_channel(void);
6396 bool secrets_fetch_trust_account_password_legacy(const char *domain,
6397                                                  uint8 ret_pwd[16],
6398                                                  time_t *pass_last_set_time,
6399                                                  uint32 *channel);
6400 bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
6401                                           time_t *pass_last_set_time,
6402                                           uint32 *channel);
6403 bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
6404                                            DOM_SID *sid, time_t *pass_last_set_time);
6405 bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
6406                                            const DOM_SID *sid);
6407 bool secrets_delete_machine_password(const char *domain);
6408 bool secrets_delete_machine_password_ex(const char *domain);
6409 bool secrets_delete_domain_sid(const char *domain);
6410 bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel);
6411 char *secrets_fetch_machine_password(const char *domain,
6412                                      time_t *pass_last_set_time,
6413                                      uint32 *channel);
6414 bool trusted_domain_password_delete(const char *domain);
6415 bool secrets_store_ldap_pw(const char* dn, char* pw);
6416 bool fetch_ldap_pw(char **dn, char** pw);
6417 NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
6418                                  struct trustdom_info ***domains);
6419 bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile);
6420 bool secrets_fetch_afs_key(const char *cell, struct afs_key *result);
6421 void secrets_fetch_ipc_userpass(char **username, char **domain, char **password);
6422 bool secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
6423                                 const char *remote_machine,
6424                                 const struct dcinfo *pdc);
6425 bool secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
6426                                 const char *remote_machine,
6427                                 struct dcinfo **ppdc);
6428 bool secrets_store_generic(const char *owner, const char *key, const char *secret);
6429 char *secrets_fetch_generic(const char *owner, const char *key);
6430
6431 /* The following definitions come from passdb/util_builtin.c  */
6432
6433 bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name);
6434 bool lookup_builtin_name(const char *name, uint32 *rid);
6435 const char *builtin_domain_name(void);
6436 bool sid_check_is_builtin(const DOM_SID *sid);
6437 bool sid_check_is_in_builtin(const DOM_SID *sid);
6438
6439 /* The following definitions come from passdb/util_unixsids.c  */
6440
6441 bool sid_check_is_unix_users(const DOM_SID *sid);
6442 bool sid_check_is_in_unix_users(const DOM_SID *sid);
6443 bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid);
6444 bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid);
6445 const char *unix_users_domain_name(void);
6446 bool lookup_unix_user_name(const char *name, DOM_SID *sid);
6447 bool sid_check_is_unix_groups(const DOM_SID *sid);
6448 bool sid_check_is_in_unix_groups(const DOM_SID *sid);
6449 const char *unix_groups_domain_name(void);
6450 bool lookup_unix_group_name(const char *name, DOM_SID *sid);
6451
6452 /* The following definitions come from passdb/util_wellknown.c  */
6453
6454 bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name);
6455 bool sid_check_is_in_wellknown_domain(const DOM_SID *sid);
6456 bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
6457                           const char **domain, const char **name);
6458 bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
6459                            DOM_SID *sid, const char **domain);
6460
6461 /* The following definitions come from printing/load.c  */
6462
6463 void load_printers(void);
6464
6465 /* The following definitions come from printing/lpq_parse.c  */
6466
6467 bool parse_lpq_entry(enum printing_types printing_type,char *line,
6468                      print_queue_struct *buf,
6469                      print_status_struct *status,bool first);
6470
6471 /* The following definitions come from printing/notify.c  */
6472
6473 int print_queue_snum(const char *qname);
6474 bool print_notify_messages_pending(void);
6475 void print_notify_send_messages(struct messaging_context *msg_ctx,
6476                                 unsigned int timeout);
6477 void notify_printer_status_byname(const char *sharename, uint32 status);
6478 void notify_printer_status(int snum, uint32 status);
6479 void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
6480                               uint32 flags);
6481 void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
6482 void notify_job_total_bytes(const char *sharename, uint32 jobid,
6483                             uint32 size);
6484 void notify_job_total_pages(const char *sharename, uint32 jobid,
6485                             uint32 pages);
6486 void notify_job_username(const char *sharename, uint32 jobid, char *name);
6487 void notify_job_name(const char *sharename, uint32 jobid, char *name);
6488 void notify_job_submitted(const char *sharename, uint32 jobid,
6489                           time_t submitted);
6490 void notify_printer_driver(int snum, char *driver_name);
6491 void notify_printer_comment(int snum, char *comment);
6492 void notify_printer_sharename(int snum, char *share_name);
6493 void notify_printer_printername(int snum, char *printername);
6494 void notify_printer_port(int snum, char *port_name);
6495 void notify_printer_location(int snum, char *location);
6496 void notify_printer_byname( const char *printername, uint32 change, const char *value );
6497 bool print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list);
6498
6499 /* The following definitions come from printing/nt_printing.c  */
6500
6501 bool nt_printing_init(struct messaging_context *msg_ctx);
6502 uint32 update_c_setprinter(bool initialize);
6503 uint32 get_c_setprinter(void);
6504 int get_builtin_ntforms(nt_forms_struct **list);
6505 bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form);
6506 int get_ntforms(nt_forms_struct **list);
6507 int write_ntforms(nt_forms_struct **list, int number);
6508 bool add_a_form(nt_forms_struct **list, const FORM *form, int *count);
6509 bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret);
6510 void update_a_form(nt_forms_struct **list, const FORM *form, int count);
6511 int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
6512 const char *get_short_archi(const char *long_archi);
6513 WERROR clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
6514                                                           uint32 level, struct current_user *user);
6515 WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, 
6516                                   struct current_user *user, WERROR *perr);
6517 int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
6518 uint32 del_a_printer(const char *sharename);
6519 NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
6520 NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode);
6521 void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
6522 int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen);
6523 int add_new_printer_key( NT_PRINTER_DATA *data, const char *name );
6524 int delete_printer_key( NT_PRINTER_DATA *data, const char *name );
6525 int lookup_printerkey( NT_PRINTER_DATA *data, const char *name );
6526 int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys );
6527 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6528 WERROR check_published_printers(void);
6529 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6530                           struct GUID *guid);
6531 WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
6532 WERROR check_published_printers(void);
6533 bool is_printer_published(Printer_entry *print_hnd, int snum, 
6534                           struct GUID *guid);
6535 WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key );
6536 WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6537 WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value, 
6538                            uint32 type, uint8 *data, int real_len );
6539 REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
6540 WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6541 bool set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
6542 bool del_driver_init(char *drivername);
6543 WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *data, uint32 data_len);
6544 WERROR get_a_printer( Printer_entry *print_hnd,
6545                         NT_PRINTER_INFO_LEVEL **pp_printer,
6546                         uint32 level,
6547                         const char *sharename);
6548 WERROR get_a_printer_search( Printer_entry *print_hnd,
6549                         NT_PRINTER_INFO_LEVEL **pp_printer,
6550                         uint32 level,
6551                         const char *sharename);
6552 uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
6553 uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6554 WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
6555                             fstring drivername, const char *architecture, uint32 version);
6556 uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
6557 bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
6558 bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
6559 WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
6560                               uint32 version, bool delete_files );
6561 WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr);
6562 bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
6563 void map_printer_permissions(SEC_DESC *sd);
6564 void map_job_permissions(SEC_DESC *sd);
6565 bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
6566                         int access_type);
6567 bool print_time_access_check(const char *servicename);
6568 char* get_server_name( Printer_entry *printer );
6569
6570 /* The following definitions come from printing/pcap.c  */
6571
6572 bool pcap_cache_add_specific(struct pcap_cache **ppcache, const char *name, const char *comment);
6573 void pcap_cache_destroy_specific(struct pcap_cache **ppcache);
6574 bool pcap_cache_add(const char *name, const char *comment);
6575 bool pcap_cache_loaded(void);
6576 void pcap_cache_replace(const struct pcap_cache *cache);
6577 void pcap_cache_reload(void);
6578 bool pcap_printername_ok(const char *printername);
6579 void pcap_printer_fn_specific(const struct pcap_cache *, void (*fn)(const char *, const char *, void *), void *);
6580 void pcap_printer_fn(void (*fn)(const char *, const char *, void *), void *);
6581
6582 /* The following definitions come from printing/print_aix.c  */
6583
6584 bool aix_cache_reload(void);
6585
6586 /* The following definitions come from printing/print_cups.c  */
6587
6588 bool cups_cache_reload(void);
6589 bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 *printer);
6590
6591 /* The following definitions come from printing/print_generic.c  */
6592
6593
6594 /* The following definitions come from printing/print_iprint.c  */
6595
6596 bool iprint_cache_reload(void);
6597
6598 /* The following definitions come from printing/print_svid.c  */
6599
6600 bool sysv_cache_reload(void);
6601
6602 /* The following definitions come from printing/printfsp.c  */
6603
6604 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
6605                         uint16_t current_vuid, files_struct *fsp,
6606                         SMB_STRUCT_STAT *psbuf);
6607 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
6608
6609 /* The following definitions come from printing/printing.c  */
6610
6611 uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
6612 bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
6613 bool print_backend_init(struct messaging_context *msg_ctx);
6614 void printing_end(void);
6615 int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob );
6616 uint32 sysjob_to_jobid(int unix_jobid);
6617 void pjob_delete(const char* sharename, uint32 jobid);
6618 void start_background_queue(void);
6619 bool print_notify_register_pid(int snum);
6620 bool print_notify_deregister_pid(int snum);
6621 bool print_job_exists(const char* sharename, uint32 jobid);
6622 int print_job_fd(const char* sharename, uint32 jobid);
6623 char *print_job_fname(const char* sharename, uint32 jobid);
6624 NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
6625 bool print_job_set_place(const char *sharename, uint32 jobid, int place);
6626 bool print_job_set_name(const char *sharename, uint32 jobid, char *name);
6627 bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
6628                       uint32 jobid, WERROR *errcode);
6629 bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
6630                      uint32 jobid, WERROR *errcode);
6631 bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
6632                       uint32 jobid, WERROR *errcode);
6633 ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
6634 int print_queue_length(int snum, print_status_struct *pstatus);
6635 uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
6636                        char *jobname, NT_DEVICEMODE *nt_devmode );
6637 void print_job_endpage(int snum, uint32 jobid);
6638 bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
6639 int print_queue_status(int snum, 
6640                        print_queue_struct **ppqueue,
6641                        print_status_struct *status);
6642 bool print_queue_pause(struct auth_serversupplied_info *server_info, int snum,
6643                        WERROR *errcode);
6644 bool print_queue_resume(struct auth_serversupplied_info *server_info, int snum,
6645                         WERROR *errcode);
6646 bool print_queue_purge(struct auth_serversupplied_info *server_info, int snum,
6647                        WERROR *errcode);
6648
6649 /* The following definitions come from printing/printing_db.c  */
6650
6651 struct tdb_print_db *get_print_db_byname(const char *printername);
6652 void release_print_db( struct tdb_print_db *pdb);
6653 void close_all_print_db(void);
6654 TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
6655
6656 /* The following definitions come from profile/profile.c  */
6657
6658 void set_profile_level(int level, struct server_id src);
6659 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
6660
6661 /* The following definitions come from registry/reg_api.c  */
6662
6663 WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
6664                     uint32 desired_access,
6665                     const struct nt_user_token *token,
6666                     struct registry_key **pkey);
6667 WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
6668                    const char *name, uint32 desired_access,
6669                    struct registry_key **pkey);
6670 WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
6671                    uint32 idx, char **name, NTTIME *last_write_time);
6672 WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6673                      uint32 idx, char **pname, struct registry_value **pval);
6674 WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
6675                       const char *name, struct registry_value **pval);
6676 WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
6677                         uint32_t *max_subkeylen, uint32_t *max_subkeysize, 
6678                         uint32_t *num_values, uint32_t *max_valnamelen, 
6679                         uint32_t *max_valbufsize, uint32_t *secdescsize,
6680                         NTTIME *last_changed_time);
6681 WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
6682                      const char *subkeypath, uint32 desired_access,
6683                      struct registry_key **pkey,
6684                      enum winreg_CreateAction *paction);
6685 WERROR reg_deletekey(struct registry_key *parent, const char *path);
6686 WERROR reg_setvalue(struct registry_key *key, const char *name,
6687                     const struct registry_value *val);
6688 WERROR reg_deletevalue(struct registry_key *key, const char *name);
6689 WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
6690                           struct security_descriptor **psecdesc);
6691 WERROR reg_setkeysecurity(struct registry_key *key,
6692                           struct security_descriptor *psecdesc);
6693 WERROR reg_getversion(uint32_t *version);
6694 WERROR reg_restorekey(struct registry_key *key, const char *fname);
6695 WERROR reg_savekey(struct registry_key *key, const char *fname);
6696 WERROR reg_deleteallvalues(struct registry_key *key);
6697 WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6698                      uint32 desired_access, const struct nt_user_token *token,
6699                      struct registry_key **pkey);
6700 WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
6701                                struct registry_key *parent,
6702                                const char *path);
6703 WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
6704                                    struct registry_key *parent,
6705                                    const char *path);
6706 WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
6707                        uint32 desired_access,
6708                        const struct nt_user_token *token,
6709                        enum winreg_CreateAction *paction,
6710                        struct registry_key **pkey);
6711 WERROR reg_delete_path(const struct nt_user_token *token,
6712                        const char *orig_path);
6713
6714 /* The following definitions come from registry/reg_backend_current_version.c  */
6715
6716
6717 /* The following definitions come from registry/reg_backend_db.c  */
6718
6719 WERROR init_registry_key(const char *add_path);
6720 WERROR init_registry_data(void);
6721 WERROR regdb_init(void);
6722 WERROR regdb_open( void );
6723 int regdb_close( void );
6724 WERROR regdb_transaction_start(void);
6725 WERROR regdb_transaction_commit(void);
6726 WERROR regdb_transaction_cancel(void);
6727 int regdb_get_seqnum(void);
6728 bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr);
6729 int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr);
6730 int regdb_fetch_values( const char* key, REGVAL_CTR *values );
6731 bool regdb_store_values( const char *key, REGVAL_CTR *values );
6732 bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys);
6733 bool regdb_values_need_update(REGVAL_CTR *values);
6734
6735 /* The following definitions come from registry/reg_backend_hkpt_params.c  */
6736
6737
6738 /* The following definitions come from registry/reg_backend_netlogon_params.c  */
6739
6740
6741 /* The following definitions come from registry/reg_backend_perflib.c  */
6742
6743
6744 /* The following definitions come from registry/reg_backend_printing.c  */
6745
6746
6747 /* The following definitions come from registry/reg_backend_prod_options.c  */
6748
6749
6750 /* The following definitions come from registry/reg_backend_shares.c  */
6751
6752
6753 /* The following definitions come from registry/reg_backend_smbconf.c  */
6754
6755
6756 /* The following definitions come from registry/reg_backend_tcpip_params.c  */
6757
6758
6759 /* The following definitions come from registry/reg_cachehook.c  */
6760
6761 WERROR reghook_cache_init(void);
6762 WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops);
6763 REGISTRY_OPS *reghook_cache_find(const char *keyname);
6764 void reghook_dump_cache( int debuglevel );
6765
6766 /* The following definitions come from registry/reg_dispatcher.c  */
6767
6768 bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys );
6769 bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6770 int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr );
6771 int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
6772 bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
6773                           const struct nt_user_token *token );
6774 WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key,
6775                           struct security_descriptor **psecdesc);
6776 WERROR regkey_set_secdesc(REGISTRY_KEY *key,
6777                           struct security_descriptor *psecdesc);
6778 bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys);
6779 bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values);
6780
6781 /* The following definitions come from registry/reg_eventlog.c  */
6782
6783 bool eventlog_init_keys(void);
6784 bool eventlog_add_source( const char *eventlog, const char *sourcename,
6785                           const char *messagefile );
6786
6787 /* The following definitions come from registry/reg_init_basic.c  */
6788
6789 WERROR registry_init_common(void);
6790 WERROR registry_init_basic(void);
6791
6792 /* The following definitions come from registry/reg_init_full.c  */
6793
6794 WERROR registry_init_full(void);
6795
6796 /* The following definitions come from registry/reg_init_smbconf.c  */
6797
6798 NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
6799                                      NT_USER_TOKEN **ptoken);
6800 WERROR registry_init_smbconf(const char *keyname);
6801
6802 /* The following definitions come from registry/reg_objects.c  */
6803
6804 WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
6805 WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
6806 int regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
6807 bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
6808 int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
6809 char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index );
6810 int regval_ctr_numvals( REGVAL_CTR *ctr );
6811 REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val );
6812 void free_registry_value( REGISTRY_VALUE *val );
6813 uint8* regval_data_p( REGISTRY_VALUE *val );
6814 uint32 regval_size( REGISTRY_VALUE *val );
6815 char* regval_name( REGISTRY_VALUE *val );
6816 uint32 regval_type( REGISTRY_VALUE *val );
6817 REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx );
6818 bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value );
6819 REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type,
6820                                const char *data_p, size_t size);
6821 int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
6822                          const char *data_p, size_t size );
6823 int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val );
6824 int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name );
6825 REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name );
6826 uint32 regval_dword( REGISTRY_VALUE *val );
6827 char *regval_sz(REGISTRY_VALUE *val);
6828
6829 /* The following definitions come from registry/reg_perfcount.c  */
6830
6831 void perfcount_init_keys( void );
6832 uint32 reg_perfcount_get_base_index(void);
6833 uint32 reg_perfcount_get_last_counter(uint32 base_index);
6834 uint32 reg_perfcount_get_last_help(uint32 last_counter);
6835 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
6836 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
6837 bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data);
6838 bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
6839                                       prs_struct *ps,
6840                                       int instId,
6841                                       PERF_OBJECT_TYPE *obj,
6842                                       TDB_CONTEXT *names);
6843 bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
6844                                  prs_struct *ps,
6845                                  int instInd,
6846                                  TDB_CONTEXT *names);
6847 uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 
6848                                          prs_struct *ps, 
6849                                          PERF_DATA_BLOCK *block,
6850                                          const char *object_ids);
6851 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
6852
6853 /* The following definitions come from registry/reg_util.c  */
6854
6855 bool reg_split_path(char *path, char **base, char **new_path);
6856 bool reg_split_key(char *path, char **base, char **key);
6857 char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
6858 void normalize_dbkey(char *key);
6859 char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
6860 int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values );
6861 size_t regval_build_multi_sz( char **values, uint16 **buffer );
6862
6863 /* The following definitions come from registry/reg_util_legacy.c  */
6864
6865 WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey,
6866                              const char *path,
6867                              const struct nt_user_token *token,
6868                              uint32 access_desired );
6869
6870 /* The following definitions come from registry/regfio.c  */
6871
6872
6873 /* The following definitions come from rpc_client/cli_lsarpc.c  */
6874
6875 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
6876                                 TALLOC_CTX *mem_ctx,
6877                                 bool sec_qos, uint32 des_access,
6878                                 POLICY_HND *pol);
6879 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
6880                                  TALLOC_CTX *mem_ctx, bool sec_qos,
6881                                  uint32 des_access, POLICY_HND *pol);
6882 NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
6883                                 TALLOC_CTX *mem_ctx,
6884                                 POLICY_HND *pol,
6885                                 int num_sids,
6886                                 const DOM_SID *sids,
6887                                 char ***pdomains,
6888                                 char ***pnames,
6889                                 enum lsa_SidType **ptypes);
6890 NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
6891                                  TALLOC_CTX *mem_ctx,
6892                                  POLICY_HND *pol, int num_names,
6893                                  const char **names,
6894                                  const char ***dom_names,
6895                                  int level,
6896                                  DOM_SID **sids,
6897                                  enum lsa_SidType **types);
6898 bool fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid);
6899
6900 /* The following definitions come from rpc_client/cli_netlogon.c  */
6901
6902 NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
6903                                      const char *server_name,
6904                                      const char *domain,
6905                                      const char *clnt_name,
6906                                      const char *machine_account,
6907                                      const unsigned char machine_pwd[16],
6908                                      enum netr_SchannelType sec_chan_type,
6909                                      uint32_t *neg_flags_inout);
6910 NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
6911                                    TALLOC_CTX *mem_ctx,
6912                                    uint32 logon_parameters,
6913                                    const char *domain,
6914                                    const char *username,
6915                                    const char *password,
6916                                    const char *workstation,
6917                                    int logon_type);
6918 NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
6919                                            TALLOC_CTX *mem_ctx,
6920                                            uint32 logon_parameters,
6921                                            const char *server,
6922                                            const char *username,
6923                                            const char *domain,
6924                                            const char *workstation,
6925                                            const uint8 chal[8],
6926                                            DATA_BLOB lm_response,
6927                                            DATA_BLOB nt_response,
6928                                            struct netr_SamInfo3 **info3);
6929 NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
6930                                               TALLOC_CTX *mem_ctx,
6931                                               uint32 logon_parameters,
6932                                               const char *server,
6933                                               const char *username,
6934                                               const char *domain,
6935                                               const char *workstation,
6936                                               const uint8 chal[8],
6937                                               DATA_BLOB lm_response,
6938                                               DATA_BLOB nt_response,
6939                                               struct netr_SamInfo3 **info3);
6940 NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
6941                                             TALLOC_CTX *mem_ctx,
6942                                             const unsigned char orig_trust_passwd_hash[16],
6943                                             const char *new_trust_pwd_cleartext,
6944                                             const unsigned char new_trust_passwd_hash[16],
6945                                             uint32_t sec_channel_type);
6946
6947 /* The following definitions come from rpc_client/cli_pipe.c  */
6948
6949 NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
6950                         uint8 op_num,
6951                         prs_struct *in_data,
6952                         prs_struct *out_data);
6953 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
6954                        struct cli_pipe_auth_data *auth);
6955 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
6956                                 unsigned int timeout);
6957 bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
6958 struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
6959 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
6960                                struct cli_pipe_auth_data **presult);
6961 NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
6962                                   enum pipe_auth_type auth_type,
6963                                   enum pipe_auth_level auth_level,
6964                                   const char *domain,
6965                                   const char *username,
6966                                   const char *password,
6967                                   struct cli_pipe_auth_data **presult);
6968 NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
6969                                    enum pipe_auth_level auth_level,
6970                                    const uint8_t sess_key[16],
6971                                    struct cli_pipe_auth_data **presult);
6972 NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
6973                                    enum pipe_auth_level auth_level,
6974                                    const char *service_princ,
6975                                    const char *username,
6976                                    const char *password,
6977                                    struct cli_pipe_auth_data **presult);
6978 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
6979                            const struct ndr_syntax_id *abstract_syntax,
6980                            struct rpc_pipe_client **presult);
6981 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
6982                                const struct ndr_syntax_id *abstract_syntax,
6983                                struct rpc_pipe_client **presult);
6984 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
6985                                   const struct ndr_syntax_id *interface,
6986                                   struct rpc_pipe_client **presult);
6987 NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
6988                                    const struct ndr_syntax_id *interface,
6989                                    enum pipe_auth_level auth_level,
6990                                    const char *domain,
6991                                    const char *username,
6992                                    const char *password,
6993                                    struct rpc_pipe_client **presult);
6994 NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
6995                                           const struct ndr_syntax_id *interface,
6996                                           enum pipe_auth_level auth_level,
6997                                           const char *domain,
6998                                           const char *username,
6999                                           const char *password,
7000                                           struct rpc_pipe_client **presult);
7001 NTSTATUS get_schannel_session_key(struct cli_state *cli,
7002                                   const char *domain,
7003                                   uint32 *pneg_flags,
7004                                   struct rpc_pipe_client **presult);
7005 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
7006                                              const struct ndr_syntax_id *interface,
7007                                              enum pipe_auth_level auth_level,
7008                                              const char *domain,
7009                                              const struct dcinfo *pdc,
7010                                              struct rpc_pipe_client **presult);
7011 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
7012                                                  const struct ndr_syntax_id *interface,
7013                                                  enum pipe_auth_level auth_level,
7014                                                  const char *domain,
7015                                                  const char *username,
7016                                                  const char *password,
7017                                                  struct rpc_pipe_client **presult);
7018 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
7019                                     const struct ndr_syntax_id *interface,
7020                                     enum pipe_auth_level auth_level,
7021                                     const char *domain,
7022                                     struct rpc_pipe_client **presult);
7023 NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
7024                                 const struct ndr_syntax_id *interface,
7025                                 enum pipe_auth_level auth_level,
7026                                 const char *service_princ,
7027                                 const char *username,
7028                                 const char *password,
7029                                 struct rpc_pipe_client **presult);
7030 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
7031                              struct rpc_pipe_client *cli,
7032                              DATA_BLOB *session_key);
7033
7034
7035 /* The following definitions come from rpc_client/cli_reg.c  */
7036
7037 NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7038                          uint32 reg_type, uint32 access_mask,
7039                          POLICY_HND *reg_hnd);
7040 uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
7041
7042 /* The following definitions come from rpc_client/cli_samr.c  */
7043
7044 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
7045                                     TALLOC_CTX *mem_ctx,
7046                                     struct policy_handle *user_handle,
7047                                     const char *newpassword,
7048                                     const char *oldpassword);
7049 NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
7050                                      TALLOC_CTX *mem_ctx,
7051                                      const char *username,
7052                                      const char *newpassword,
7053                                      const char *oldpassword);
7054 NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
7055                                          TALLOC_CTX *mem_ctx,
7056                                          const char *username,
7057                                          DATA_BLOB new_nt_password_blob,
7058                                          DATA_BLOB old_nt_hash_enc_blob,
7059                                          DATA_BLOB new_lm_password_blob,
7060                                          DATA_BLOB old_lm_hash_enc_blob);
7061 NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
7062                                      TALLOC_CTX *mem_ctx,
7063                                      const char *username,
7064                                      const char *newpassword,
7065                                      const char *oldpassword,
7066                                      struct samr_DomInfo1 **dominfo1,
7067                                      struct samr_ChangeReject **reject);
7068 void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
7069                                uint32 *max_size);
7070 NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
7071                                   TALLOC_CTX *mem_ctx,
7072                                   uint32_t access_mask,
7073                                   POLICY_HND *connect_pol);
7074
7075 /* The following definitions come from rpc_client/cli_spoolss.c  */
7076
7077 WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7078                                 const char *printername, const char *datatype, uint32 access_required,
7079                                 const char *station, const char *username, POLICY_HND *pol);
7080 WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7081                                  POLICY_HND *pol);
7082 WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7083                                  char *name, uint32 flags, uint32 level,
7084                                  uint32 *num_printers, PRINTER_INFO_CTR *ctr);
7085 WERROR rpccli_spoolss_enum_ports(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7086                               uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr);
7087 WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7088                               POLICY_HND *pol, uint32 level, 
7089                               PRINTER_INFO_CTR *ctr);
7090 WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7091                               POLICY_HND *pol, uint32 level, 
7092                               PRINTER_INFO_CTR *ctr, uint32 command);
7093 WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, 
7094                                     TALLOC_CTX *mem_ctx, 
7095                                     POLICY_HND *pol, uint32 level, 
7096                                     const char *env, int version, PRINTER_DRIVER_CTR *ctr);
7097 WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, 
7098                                        TALLOC_CTX *mem_ctx,
7099                                        uint32 level, const char *env,
7100                                        uint32 *num_drivers,
7101                                        PRINTER_DRIVER_CTR *ctr);
7102 WERROR rpccli_spoolss_getprinterdriverdir (struct rpc_pipe_client *cli, 
7103                                         TALLOC_CTX *mem_ctx,
7104                                         uint32 level, char *env,
7105                                         DRIVER_DIRECTORY_CTR *ctr);
7106 WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, 
7107                                      TALLOC_CTX *mem_ctx, uint32 level,
7108                                      PRINTER_DRIVER_CTR *ctr);
7109 WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7110                                  uint32 level, PRINTER_INFO_CTR*ctr);
7111 WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli, 
7112                                          TALLOC_CTX *mem_ctx, const char *arch,
7113                                          const char *driver, int version);
7114 WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli, 
7115                                         TALLOC_CTX *mem_ctx, const char *arch,
7116                                         const char *driver);
7117 WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
7118                                               TALLOC_CTX *mem_ctx,
7119                                               char *name, char *environment,
7120                                               fstring procdir);
7121 WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7122                            POLICY_HND *handle, uint32 level, FORM *form);
7123 WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7124                            POLICY_HND *handle, uint32 level, 
7125                            const char *form_name, FORM *form);
7126 WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7127                            POLICY_HND *handle, const char *formname, 
7128                            uint32 level, FORM_1 *form);
7129 WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7130                               POLICY_HND *handle, const char *form_name);
7131 WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7132                              POLICY_HND *handle, int level, uint32 *num_forms,
7133                              FORM_1 **forms);
7134 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7135                             POLICY_HND *hnd, uint32 level, uint32 firstjob, 
7136                             uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr);
7137 WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7138                           POLICY_HND *hnd, uint32 jobid, uint32 level, 
7139                           uint32 command);
7140 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7141                           POLICY_HND *hnd, uint32 jobid, uint32 level,
7142                           JOB_INFO_CTR *ctr);
7143 WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7144                                     POLICY_HND *hnd);
7145 WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7146                                   POLICY_HND *hnd);
7147 WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7148                                    POLICY_HND *hnd, char *docname, 
7149                                    char *outputfile, char *datatype, 
7150                                    uint32 *jobid);
7151 WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7152                                   POLICY_HND *hnd);
7153 WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7154                                   POLICY_HND *hnd, const char *valuename, 
7155                                   REGISTRY_VALUE *value);
7156 WERROR rpccli_spoolss_getprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7157                                     POLICY_HND *hnd, const char *keyname, 
7158                                     const char *valuename, 
7159                                     REGISTRY_VALUE *value);
7160 WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7161                                   POLICY_HND *hnd, REGISTRY_VALUE *value);
7162 WERROR rpccli_spoolss_setprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7163                                     POLICY_HND *hnd, char *keyname, 
7164                                     REGISTRY_VALUE *value);
7165 WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7166                                    POLICY_HND *hnd, uint32 ndx,
7167                                    uint32 value_offered, uint32 data_offered,
7168                                    uint32 *value_needed, uint32 *data_needed,
7169                                    REGISTRY_VALUE *value);
7170 WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7171                                      POLICY_HND *hnd, const char *keyname, 
7172                                      REGVAL_CTR *ctr);
7173 WERROR rpccli_spoolss_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7174                                 POLICY_HND *hnd, uint32 data_size, char *data,
7175                                 uint32 *num_written);
7176 WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7177                                      POLICY_HND *hnd, char *valuename);
7178 WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7179                                        POLICY_HND *hnd, char *keyname, 
7180                                        char *valuename);
7181 WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7182                                   POLICY_HND *hnd, const char *keyname,
7183                                   uint16 **keylist, uint32 *len);
7184 WERROR rpccli_spoolss_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7185                                     POLICY_HND *hnd, char *keyname);
7186
7187 /* The following definitions come from rpc_client/cli_spoolss_notify.c  */
7188
7189 WERROR rpccli_spoolss_reply_open_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7190                                       const char *printer, uint32 printerlocal, uint32 type, 
7191                                       POLICY_HND *handle);
7192 WERROR rpccli_spoolss_reply_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7193                                        POLICY_HND *handle);
7194 WERROR rpccli_spoolss_routerreplyprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7195                                       POLICY_HND *pol, uint32 condition, uint32 change_id);
7196 WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
7197                          POLICY_HND *pol, uint32 notify_data_len,
7198                          SPOOL_NOTIFY_INFO_DATA *notify_data,
7199                          uint32 change_low, uint32 change_high);
7200 WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7201                             POLICY_HND *pol, uint32 flags, uint32 options,
7202                             const char *localmachine, uint32 printerlocal,
7203                             SPOOL_NOTIFY_OPTION *option);
7204
7205 /* The following definitions come from rpc_client/cli_svcctl.c  */
7206
7207 WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
7208                                       POLICY_HND *hSCM, uint32 type, uint32 state, 
7209                                       uint32 *returned, ENUM_SERVICES_STATUS **service_array  );
7210
7211 /* The following definitions come from rpc_client/init_lsa.c  */
7212
7213 void init_lsa_String(struct lsa_String *name, const char *s);
7214 void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s);
7215 void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s);
7216 void init_lsa_AsciiStringLarge(struct lsa_AsciiStringLarge *name, const char *s);
7217 void init_lsa_sec_qos(struct lsa_QosInfo *r,
7218                       uint32_t len,
7219                       uint16_t impersonation_level,
7220                       uint8_t context_mode,
7221                       uint8_t effective_only);
7222 void init_lsa_obj_attr(struct lsa_ObjectAttribute *r,
7223                        uint32_t len,
7224                        uint8_t *root_dir,
7225                        const char *object_name,
7226                        uint32_t attributes,
7227                        struct security_descriptor *sec_desc,
7228                        struct lsa_QosInfo *sec_qos);
7229 void init_lsa_translated_sid(struct lsa_TranslatedSid *r,
7230                              enum lsa_SidType sid_type,
7231                              uint32_t rid,
7232                              uint32_t sid_index);
7233 void init_lsa_translated_name2(struct lsa_TranslatedName2 *r,
7234                                enum lsa_SidType sid_type,
7235                                const char *name,
7236                                uint32_t sid_index,
7237                                uint32_t unknown);
7238
7239 /* The following definitions come from rpc_client/init_netlogon.c  */
7240
7241 void init_netr_SamBaseInfo(struct netr_SamBaseInfo *r,
7242                            NTTIME last_logon,
7243                            NTTIME last_logoff,
7244                            NTTIME acct_expiry,
7245                            NTTIME last_password_change,
7246                            NTTIME allow_password_change,
7247                            NTTIME force_password_change,
7248                            const char *account_name,
7249                            const char *full_name,
7250                            const char *logon_script,
7251                            const char *profile_path,
7252                            const char *home_directory,
7253                            const char *home_drive,
7254                            uint16_t logon_count,
7255                            uint16_t bad_password_count,
7256                            uint32_t rid,
7257                            uint32_t primary_gid,
7258                            struct samr_RidWithAttributeArray groups,
7259                            uint32_t user_flags,
7260                            struct netr_UserSessionKey key,
7261                            const char *logon_server,
7262                            const char *domain,
7263                            struct dom_sid2 *domain_sid,
7264                            struct netr_LMSessionKey LMSessKey,
7265                            uint32_t acct_flags);
7266 void init_netr_SamInfo3(struct netr_SamInfo3 *r,
7267                         NTTIME last_logon,
7268                         NTTIME last_logoff,
7269                         NTTIME acct_expiry,
7270                         NTTIME last_password_change,
7271                         NTTIME allow_password_change,
7272                         NTTIME force_password_change,
7273                         const char *account_name,
7274                         const char *full_name,
7275                         const char *logon_script,
7276                         const char *profile_path,
7277                         const char *home_directory,
7278                         const char *home_drive,
7279                         uint16_t logon_count,
7280                         uint16_t bad_password_count,
7281                         uint32_t rid,
7282                         uint32_t primary_gid,
7283                         struct samr_RidWithAttributeArray groups,
7284                         uint32_t user_flags,
7285                         struct netr_UserSessionKey key,
7286                         const char *logon_server,
7287                         const char *domain,
7288                         struct dom_sid2 *domain_sid,
7289                         struct netr_LMSessionKey LMSessKey,
7290                         uint32_t acct_flags,
7291                         uint32_t sidcount,
7292                         struct netr_SidAttr *sids);
7293 NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
7294                                 uint8_t pipe_session_key[16],
7295                                 struct netr_SamInfo3 *sam3);
7296 void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
7297                             const char *domain_name,
7298                             uint32_t parameter_control,
7299                             uint32_t logon_id_low,
7300                             uint32_t logon_id_high,
7301                             const char *account_name,
7302                             const char *workstation);
7303 void init_netr_NetworkInfo(struct netr_NetworkInfo *r,
7304                            const char *domain_name,
7305                            uint32_t parameter_control,
7306                            uint32_t logon_id_low,
7307                            uint32_t logon_id_high,
7308                            const char *account_name,
7309                            const char *workstation,
7310                            uint8_t challenge[8],
7311                            struct netr_ChallengeResponse nt,
7312                            struct netr_ChallengeResponse lm);
7313 void init_netr_PasswordInfo(struct netr_PasswordInfo *r,
7314                             const char *domain_name,
7315                             uint32_t parameter_control,
7316                             uint32_t logon_id_low,
7317                             uint32_t logon_id_high,
7318                             const char *account_name,
7319                             const char *workstation,
7320                             struct samr_Password lmpassword,
7321                             struct samr_Password ntpassword);
7322 void init_netr_CryptPassword(const char *pwd,
7323                              unsigned char session_key[16],
7324                              struct netr_CryptPassword *pwd_buf);
7325
7326 /* The following definitions come from rpc_client/init_samr.c  */
7327
7328 void init_samr_DomInfo1(struct samr_DomInfo1 *r,
7329                         uint16_t min_password_length,
7330                         uint16_t password_history_length,
7331                         uint32_t password_properties,
7332                         int64_t max_password_age,
7333                         int64_t min_password_age);
7334 void init_samr_DomInfo2(struct samr_DomInfo2 *r,
7335                         NTTIME force_logoff_time,
7336                         const char *comment,
7337                         const char *domain_name,
7338                         const char *primary,
7339                         uint64_t sequence_num,
7340                         uint32_t unknown2,
7341                         enum samr_Role role,
7342                         uint32_t unknown3,
7343                         uint32_t num_users,
7344                         uint32_t num_groups,
7345                         uint32_t num_aliases);
7346 void init_samr_DomInfo3(struct samr_DomInfo3 *r,
7347                         NTTIME force_logoff_time);
7348 void init_samr_DomInfo4(struct samr_DomInfo4 *r,
7349                         const char *comment);
7350 void init_samr_DomInfo5(struct samr_DomInfo5 *r,
7351                         const char *domain_name);
7352 void init_samr_DomInfo6(struct samr_DomInfo6 *r,
7353                         const char *primary);
7354 void init_samr_DomInfo7(struct samr_DomInfo7 *r,
7355                         enum samr_Role role);
7356 void init_samr_DomInfo8(struct samr_DomInfo8 *r,
7357                         uint64_t sequence_num,
7358                         NTTIME domain_create_time);
7359 void init_samr_DomInfo9(struct samr_DomInfo9 *r,
7360                         uint32_t unknown);
7361 void init_samr_DomInfo12(struct samr_DomInfo12 *r,
7362                          uint64_t lockout_duration,
7363                          uint64_t lockout_window,
7364                          uint16_t lockout_threshold);
7365 void init_samr_group_info1(struct samr_GroupInfoAll *r,
7366                            const char *name,
7367                            uint32_t attributes,
7368                            uint32_t num_members,
7369                            const char *description);
7370 void init_samr_group_info2(struct lsa_String *r, const char *group_name);
7371 void init_samr_group_info3(struct samr_GroupInfoAttributes *r,
7372                            uint32_t attributes);
7373 void init_samr_group_info4(struct lsa_String *r, const char *description);
7374 void init_samr_group_info5(struct samr_GroupInfoAll *r,
7375                            const char *name,
7376                            uint32_t attributes,
7377                            uint32_t num_members,
7378                            const char *description);
7379 void init_samr_alias_info1(struct samr_AliasInfoAll *r,
7380                            const char *name,
7381                            uint32_t num_members,
7382                            const char *description);
7383 void init_samr_alias_info3(struct lsa_String *r,
7384                            const char *description);
7385 void init_samr_user_info5(struct samr_UserInfo5 *r,
7386                           const char *account_name,
7387                           const char *full_name,
7388                           uint32_t rid,
7389                           uint32_t primary_gid,
7390                           const char *home_directory,
7391                           const char *home_drive,
7392                           const char *logon_script,
7393                           const char *profile_path,
7394                           const char *description,
7395                           const char *workstations,
7396                           NTTIME last_logon,
7397                           NTTIME last_logoff,
7398                           struct samr_LogonHours logon_hours,
7399                           uint16_t bad_password_count,
7400                           uint16_t logon_count,
7401                           NTTIME last_password_change,
7402                           NTTIME acct_expiry,
7403                           uint32_t acct_flags);
7404 void init_samr_user_info7(struct samr_UserInfo7 *r,
7405                           const char *account_name);
7406 void init_samr_user_info9(struct samr_UserInfo9 *r,
7407                           uint32_t primary_gid);
7408 void init_samr_user_info16(struct samr_UserInfo16 *r,
7409                            uint32_t acct_flags);
7410 void init_samr_user_info18(struct samr_UserInfo18 *r,
7411                            const uint8 lm_pwd[16],
7412                            const uint8 nt_pwd[16],
7413                            uint8_t password_expired);
7414 void init_samr_user_info20(struct samr_UserInfo20 *r,
7415                            struct lsa_BinaryString *parameters);
7416 void init_samr_user_info21(struct samr_UserInfo21 *r,
7417                            NTTIME last_logon,
7418                            NTTIME last_logoff,
7419                            NTTIME last_password_change,
7420                            NTTIME acct_expiry,
7421                            NTTIME allow_password_change,
7422                            NTTIME force_password_change,
7423                            const char *account_name,
7424                            const char *full_name,
7425                            const char *home_directory,
7426                            const char *home_drive,
7427                            const char *logon_script,
7428                            const char *profile_path,
7429                            const char *description,
7430                            const char *workstations,
7431                            const char *comment,
7432                            struct lsa_BinaryString *parameters,
7433                            uint32_t rid,
7434                            uint32_t primary_gid,
7435                            uint32_t acct_flags,
7436                            uint32_t fields_present,
7437                            struct samr_LogonHours logon_hours,
7438                            uint16_t bad_password_count,
7439                            uint16_t logon_count,
7440                            uint16_t country_code,
7441                            uint16_t code_page,
7442                            uint8_t nt_password_set,
7443                            uint8_t lm_password_set,
7444                            uint8_t password_expired);
7445 void init_samr_user_info23(struct samr_UserInfo23 *r,
7446                            NTTIME last_logon,
7447                            NTTIME last_logoff,
7448                            NTTIME last_password_change,
7449                            NTTIME acct_expiry,
7450                            NTTIME allow_password_change,
7451                            NTTIME force_password_change,
7452                            const char *account_name,
7453                            const char *full_name,
7454                            const char *home_directory,
7455                            const char *home_drive,
7456                            const char *logon_script,
7457                            const char *profile_path,
7458                            const char *description,
7459                            const char *workstations,
7460                            const char *comment,
7461                            struct lsa_BinaryString *parameters,
7462                            uint32_t rid,
7463                            uint32_t primary_gid,
7464                            uint32_t acct_flags,
7465                            uint32_t fields_present,
7466                            struct samr_LogonHours logon_hours,
7467                            uint16_t bad_password_count,
7468                            uint16_t logon_count,
7469                            uint16_t country_code,
7470                            uint16_t code_page,
7471                            uint8_t nt_password_set,
7472                            uint8_t lm_password_set,
7473                            uint8_t password_expired,
7474                            struct samr_CryptPassword *pwd_buf);
7475 void init_samr_user_info24(struct samr_UserInfo24 *r,
7476                            struct samr_CryptPassword *pwd_buf,
7477                            uint8_t password_expired);
7478 void init_samr_user_info25(struct samr_UserInfo25 *r,
7479                            NTTIME last_logon,
7480                            NTTIME last_logoff,
7481                            NTTIME last_password_change,
7482                            NTTIME acct_expiry,
7483                            NTTIME allow_password_change,
7484                            NTTIME force_password_change,
7485                            const char *account_name,
7486                            const char *full_name,
7487                            const char *home_directory,
7488                            const char *home_drive,
7489                            const char *logon_script,
7490                            const char *profile_path,
7491                            const char *description,
7492                            const char *workstations,
7493                            const char *comment,
7494                            struct lsa_BinaryString *parameters,
7495                            uint32_t rid,
7496                            uint32_t primary_gid,
7497                            uint32_t acct_flags,
7498                            uint32_t fields_present,
7499                            struct samr_LogonHours logon_hours,
7500                            uint16_t bad_password_count,
7501                            uint16_t logon_count,
7502                            uint16_t country_code,
7503                            uint16_t code_page,
7504                            uint8_t nt_password_set,
7505                            uint8_t lm_password_set,
7506                            uint8_t password_expired,
7507                            struct samr_CryptPasswordEx *pwd_buf);
7508 void init_samr_user_info26(struct samr_UserInfo26 *r,
7509                            struct samr_CryptPasswordEx *pwd_buf,
7510                            uint8_t password_expired);
7511 void init_samr_CryptPasswordEx(const char *pwd,
7512                                DATA_BLOB *session_key,
7513                                struct samr_CryptPasswordEx *pwd_buf);
7514 void init_samr_CryptPassword(const char *pwd,
7515                              DATA_BLOB *session_key,
7516                              struct samr_CryptPassword *pwd_buf);
7517
7518 /* The following definitions come from rpc_client/init_srvsvc.c  */
7519
7520 void init_srvsvc_NetSrvInfo102(struct srvsvc_NetSrvInfo102 *r,
7521                                enum srvsvc_PlatformId platform_id,
7522                                const char *server_name,
7523                                uint32_t version_major,
7524                                uint32_t version_minor,
7525                                uint32_t server_type,
7526                                const char *comment,
7527                                uint32_t users,
7528                                uint32_t disc,
7529                                uint32_t hidden,
7530                                uint32_t announce,
7531                                uint32_t anndelta,
7532                                uint32_t licenses,
7533                                const char *userpath);
7534 void init_srvsvc_NetSrvInfo101(struct srvsvc_NetSrvInfo101 *r,
7535                                enum srvsvc_PlatformId platform_id,
7536                                const char *server_name,
7537                                uint32_t version_major,
7538                                uint32_t version_minor,
7539                                uint32_t server_type,
7540                                const char *comment);
7541 void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
7542                                enum srvsvc_PlatformId platform_id,
7543                                const char *server_name);
7544 void init_srvsvc_NetShareInfo0(struct srvsvc_NetShareInfo0 *r,
7545                                const char *name);
7546 void init_srvsvc_NetShareInfo1(struct srvsvc_NetShareInfo1 *r,
7547                                const char *name,
7548                                enum srvsvc_ShareType type,
7549                                const char *comment);
7550 void init_srvsvc_NetShareInfo2(struct srvsvc_NetShareInfo2 *r,
7551                                const char *name,
7552                                enum srvsvc_ShareType type,
7553                                const char *comment,
7554                                uint32_t permissions,
7555                                uint32_t max_users,
7556                                uint32_t current_users,
7557                                const char *path,
7558                                const char *password);
7559 void init_srvsvc_NetShareInfo501(struct srvsvc_NetShareInfo501 *r,
7560                                  const char *name,
7561                                  enum srvsvc_ShareType type,
7562                                  const char *comment,
7563                                  uint32_t csc_policy);
7564 void init_srvsvc_NetShareInfo502(struct srvsvc_NetShareInfo502 *r,
7565                                  const char *name,
7566                                  enum srvsvc_ShareType type,
7567                                  const char *comment,
7568                                  uint32_t permissions,
7569                                  uint32_t max_users,
7570                                  uint32_t current_users,
7571                                  const char *path,
7572                                  const char *password,
7573                                  struct sec_desc_buf *sd_buf);
7574 void init_srvsvc_NetShareInfo1004(struct srvsvc_NetShareInfo1004 *r,
7575                                   const char *comment);
7576 void init_srvsvc_NetShareInfo1005(struct srvsvc_NetShareInfo1005 *r,
7577                                   uint32_t dfs_flags);
7578 void init_srvsvc_NetShareInfo1006(struct srvsvc_NetShareInfo1006 *r,
7579                                   uint32_t max_users);
7580 void init_srvsvc_NetShareInfo1007(struct srvsvc_NetShareInfo1007 *r,
7581                                   uint32_t flags,
7582                                   const char *alternate_directory_name);
7583 void init_srvsvc_NetRemoteTODInfo(struct srvsvc_NetRemoteTODInfo *r,
7584                                   uint32_t elapsed,
7585                                   uint32_t msecs,
7586                                   uint32_t hours,
7587                                   uint32_t mins,
7588                                   uint32_t secs,
7589                                   uint32_t hunds,
7590                                   int32_t ttimezone,
7591                                   uint32_t tinterval,
7592                                   uint32_t day,
7593                                   uint32_t month,
7594                                   uint32_t year,
7595                                   uint32_t weekday);
7596 void init_srvsvc_NetSessInfo0(struct srvsvc_NetSessInfo0 *r,
7597                               const char *client);
7598 void init_srvsvc_NetSessInfo1(struct srvsvc_NetSessInfo1 *r,
7599                               const char *client,
7600                               const char *user,
7601                               uint32_t num_open,
7602                               uint32_t _time,
7603                               uint32_t idle_time,
7604                               uint32_t user_flags);
7605 void init_srvsvc_NetSessInfo2(struct srvsvc_NetSessInfo2 *r,
7606                               const char *client,
7607                               const char *user,
7608                               uint32_t num_open,
7609                               uint32_t _time,
7610                               uint32_t idle_time,
7611                               uint32_t user_flags,
7612                               const char *client_type);
7613 void init_srvsvc_NetSessInfo10(struct srvsvc_NetSessInfo10 *r,
7614                                const char *client,
7615                                const char *user,
7616                                uint32_t _time,
7617                                uint32_t idle_time);
7618 void init_srvsvc_NetSessInfo502(struct srvsvc_NetSessInfo502 *r,
7619                                const char *client,
7620                                const char *user,
7621                                uint32_t num_open,
7622                                uint32_t _time,
7623                                uint32_t idle_time,
7624                                uint32_t user_flags,
7625                                const char *client_type,
7626                                const char *transport);
7627 void init_srvsvc_NetFileInfo2(struct srvsvc_NetFileInfo2 *r,
7628                               uint32_t fid);
7629 void init_srvsvc_NetFileInfo3(struct srvsvc_NetFileInfo3 *r,
7630                               uint32_t fid,
7631                               uint32_t permissions,
7632                               uint32_t num_locks,
7633                               const char *path,
7634                               const char *user);
7635 void init_srvsvc_NetConnInfo0(struct srvsvc_NetConnInfo0 *r,
7636                               uint32_t conn_id);
7637 void init_srvsvc_NetConnInfo1(struct srvsvc_NetConnInfo1 *r,
7638                               uint32_t conn_id,
7639                               uint32_t conn_type,
7640                               uint32_t num_open,
7641                               uint32_t num_users,
7642                               uint32_t conn_time,
7643                               const char *user,
7644                               const char *share);
7645
7646 /* The following definitions come from rpc_client/ndr.c  */
7647
7648 NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
7649                         TALLOC_CTX *mem_ctx,
7650                         const struct ndr_interface_table *table,
7651                         uint32 opnum, void *r);
7652
7653 /* The following definitions come from rpc_parse/parse_buffer.c  */
7654
7655 bool rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
7656 bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer);
7657 bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer);
7658 bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size);
7659 void rpcbuf_move(RPC_BUFFER *src, RPC_BUFFER **dest);
7660 uint32 rpcbuf_get_size(RPC_BUFFER *buffer);
7661 bool smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string);
7662 bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string);
7663 bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc);
7664 uint32 size_of_relative_string(UNISTR *string);
7665
7666 /* The following definitions come from rpc_parse/parse_eventlog.c  */
7667
7668 bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
7669                                  prs_struct *ps, int depth);
7670 bool eventlog_io_r_read_eventlog(const char *desc,
7671                                  EVENTLOG_Q_READ_EVENTLOG *q_u,
7672                                  EVENTLOG_R_READ_EVENTLOG *r_u,
7673                                  prs_struct *ps,
7674                                  int depth);
7675
7676 /* The following definitions come from rpc_parse/parse_misc.c  */
7677
7678 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
7679 bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime);
7680 uint32 get_enum_hnd(ENUM_HND *enh);
7681 void init_enum_hnd(ENUM_HND *enh, uint32 hnd);
7682 bool smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth);
7683 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
7684 void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid);
7685 bool smb_io_dom_sid2_p(const char *desc, prs_struct *ps, int depth, DOM_SID2 **sid2);
7686 bool smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth);
7687 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
7688                  prs_struct *ps, int depth);
7689 void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer);
7690 bool smb_io_strhdr(const char *desc,  STRHDR *hdr, prs_struct *ps, int depth);
7691 void init_uni_hdr(UNIHDR *hdr, UNISTR2 *str2);
7692 bool smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth);
7693 void init_buf_hdr(BUFHDR *hdr, int max_len, int len);
7694 bool smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset);
7695 bool smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, 
7696                                 uint32 ptr_hdrbuf, uint32 max_len, uint32 len);
7697 bool smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth);
7698 void init_unistr(UNISTR *str, const char *buf);
7699 bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
7700 void init_rpc_blob_uint32(RPC_DATA_BLOB *str, uint32 val);
7701 void init_rpc_blob_str(RPC_DATA_BLOB *str, const char *buf, int len);
7702 void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf);
7703 void init_rpc_blob_bytes(RPC_DATA_BLOB *str, uint8 *buf, size_t len);
7704 bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
7705 void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len);
7706 bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2);
7707 void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
7708 void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
7709 void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len);
7710 bool smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth);
7711 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
7712 void init_unistr4(UNISTR4 *uni4, const char *buf, enum unistr2_term_codes flags);
7713 void init_unistr4_w( TALLOC_CTX *ctx, UNISTR4 *uni4, const smb_ucs2_t *buf );
7714 void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
7715 void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR *from);
7716 void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
7717 bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2);
7718 bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 );
7719 bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
7720 bool prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7721 bool prs_unistr4_hdr(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7722 bool prs_unistr4_str(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4);
7723 bool prs_unistr4_array(const char *desc, prs_struct *ps, int depth, UNISTR4_ARRAY *array );
7724 bool init_unistr4_array( UNISTR4_ARRAY *array, uint32 count, const char **strings );
7725 void init_dom_rid(DOM_RID *prid, uint32 rid, uint16 type, uint32 idx);
7726 bool smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth);
7727 bool smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth);
7728 void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type);
7729 bool smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth);
7730 void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid);
7731 void init_clnt_srv(DOM_CLNT_SRV *logcln, const char *logon_srv,
7732                    const char *comp_name);
7733 bool smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth);
7734 void init_log_info(DOM_LOG_INFO *loginfo, const char *logon_srv, const char *acct_name,
7735                 uint16 sec_chan, const char *comp_name);
7736 bool smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth);
7737 bool smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth);
7738 bool smb_io_cred(const char *desc,  DOM_CRED *cred, prs_struct *ps, int depth);
7739 void init_clnt_info2(DOM_CLNT_INFO2 *clnt,
7740                                 const char *logon_srv, const char *comp_name,
7741                                 const DOM_CRED *clnt_cred);
7742 bool smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth);
7743 void init_clnt_info(DOM_CLNT_INFO *clnt,
7744                 const char *logon_srv, const char *acct_name,
7745                 uint16 sec_chan, const char *comp_name,
7746                 const DOM_CRED *cred);
7747 bool smb_io_clnt_info(const char *desc,  DOM_CLNT_INFO *clnt, prs_struct *ps, int depth);
7748 void init_logon_id(DOM_LOGON_ID *logonid, uint32 log_id_low, uint32 log_id_high);
7749 bool smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth);
7750 void init_owf_info(OWF_INFO *hash, const uint8 data[16]);
7751 bool smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth);
7752 bool smb_io_gid(const char *desc,  DOM_GID *gid, prs_struct *ps, int depth);
7753 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
7754 void init_unistr3(UNISTR3 *str, const char *buf);
7755 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth);
7756 bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
7757 bool smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth);
7758 bool smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth);
7759 bool smb_io_rpc_blob(const char *desc, RPC_DATA_BLOB *blob, prs_struct *ps, int depth);
7760 bool make_uni_hdr(UNIHDR *hdr, int len);
7761 bool make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer);
7762 uint32 str_len_uni(UNISTR *source);
7763 bool policy_handle_is_valid(const POLICY_HND *hnd);
7764
7765 /* The following definitions come from rpc_parse/parse_ntsvcs.c  */
7766
7767 bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth);
7768 bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth);
7769 bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth);
7770 bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth);
7771
7772 /* The following definitions come from rpc_parse/parse_prs.c  */
7773
7774 void prs_dump(const char *name, int v, prs_struct *ps);
7775 void prs_dump_before(const char *name, int v, prs_struct *ps);
7776 void prs_dump_region(const char *name, int v, prs_struct *ps,
7777                      int from_off, int to_off);
7778 void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name);
7779 bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io);
7780 void prs_mem_free(prs_struct *ps);
7781 void prs_mem_clear(prs_struct *ps);
7782 char *prs_alloc_mem_(prs_struct *ps, size_t size, unsigned int count);
7783 char *prs_alloc_mem(prs_struct *ps, size_t size, unsigned int count);
7784 TALLOC_CTX *prs_get_mem_context(prs_struct *ps);
7785 void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic);
7786 char *prs_take_memory(prs_struct *ps, uint32 *psize);
7787 bool prs_set_buffer_size(prs_struct *ps, uint32 newsize);
7788 bool prs_grow(prs_struct *ps, uint32 extra_space);
7789 bool prs_force_grow(prs_struct *ps, uint32 extra_space);
7790 char *prs_data_p(prs_struct *ps);
7791 uint32 prs_data_size(prs_struct *ps);
7792 uint32 prs_offset(prs_struct *ps);
7793 bool prs_set_offset(prs_struct *ps, uint32 offset);
7794 bool prs_append_prs_data(prs_struct *dst, prs_struct *src);
7795 bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len);
7796 bool prs_copy_data_in(prs_struct *dst, const char *src, uint32 len);
7797 bool prs_copy_data_out(char *dst, prs_struct *src, uint32 len);
7798 bool prs_copy_all_data_out(char *dst, prs_struct *src);
7799 void prs_set_endian_data(prs_struct *ps, bool endian);
7800 bool prs_align(prs_struct *ps);
7801 bool prs_align_uint16(prs_struct *ps);
7802 bool prs_align_uint64(prs_struct *ps);
7803 bool prs_align_custom(prs_struct *ps, uint8 boundary);
7804 bool prs_align_needed(prs_struct *ps, uint32 needed);
7805 char *prs_mem_get(prs_struct *ps, uint32 extra_size);
7806 void prs_switch_type(prs_struct *ps, bool io);
7807 void prs_force_dynamic(prs_struct *ps);
7808 void prs_set_session_key(prs_struct *ps, const char sess_key[16]);
7809 bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8);
7810 bool prs_pointer( const char *name, prs_struct *ps, int depth, 
7811                  void *dta, size_t data_size,
7812                  bool (*prs_fn)(const char*, prs_struct*, int, void*) );
7813 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
7814 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
7815 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
7816 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7817 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
7818 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
7819 bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len);
7820 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7821 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
7822 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
7823 bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
7824 bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf);
7825 bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str);
7826 bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
7827 bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
7828 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
7829 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size);
7830 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str);
7831 bool prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset);
7832 bool prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
7833                                 uint32 ptr_uint16, uint32 start_offset);
7834 bool prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset);
7835 bool prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
7836                                 uint32 ptr_uint32, uint32 data_size);
7837 int tdb_prs_store(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps);
7838 int tdb_prs_fetch(TDB_CONTEXT *tdb, TDB_DATA kbuf, prs_struct *ps, TALLOC_CTX *mem_ctx);
7839 bool prs_hash1(prs_struct *ps, uint32 offset, int len);
7840 void schannel_encode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7841                    enum schannel_direction direction,
7842                    RPC_AUTH_SCHANNEL_CHK * verf,
7843                    char *data, size_t data_len);
7844 bool schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level,
7845                    enum schannel_direction direction, 
7846                    RPC_AUTH_SCHANNEL_CHK * verf, char *data, size_t data_len);
7847 bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7848 bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
7849
7850 /* The following definitions come from rpc_parse/parse_rpc.c  */
7851
7852 const char *cli_get_pipe_name_from_iface(TALLOC_CTX *mem_ctx,
7853                                          struct cli_state *cli,
7854                                          const struct ndr_syntax_id *interface);
7855 void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
7856                                 uint32 call_id, int data_len, int auth_len);
7857 bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth);
7858 void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
7859                       const RPC_IFACE *abstract, const RPC_IFACE *transfer);
7860 void init_rpc_hdr_rb(RPC_HDR_RB *rpc, 
7861                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7862                                 RPC_CONTEXT *context);
7863 bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth);
7864 bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth);
7865 void init_rpc_hdr_ba(RPC_HDR_BA *rpc, 
7866                                 uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
7867                                 const char *pipe_addr,
7868                                 uint8 num_results, uint16 result, uint16 reason,
7869                                 RPC_IFACE *transfer);
7870 bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth);
7871 void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum);
7872 bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth);
7873 bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth);
7874 bool smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth);
7875 void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
7876                                 uint8 auth_type, uint8 auth_level,
7877                                 uint8 auth_pad_len,
7878                                 uint32 auth_context_id);
7879 bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth);
7880 bool rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
7881                                 const char *signature, uint32 msg_type);
7882 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
7883                                 const char *signature, uint32 msg_type);
7884 bool smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7885 bool smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
7886 void init_rpc_auth_schannel_neg(RPC_AUTH_SCHANNEL_NEG *neg,
7887                               const char *domain, const char *myname);
7888 bool smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
7889                                 prs_struct *ps, int depth);
7890 bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len, 
7891                                 RPC_AUTH_SCHANNEL_CHK * chk,
7892                                 prs_struct *ps, int depth);
7893
7894 /* The following definitions come from rpc_parse/parse_sec.c  */
7895
7896 bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
7897 bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
7898
7899 /* The following definitions come from rpc_parse/parse_spoolss.c  */
7900
7901 bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
7902 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
7903 bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
7904                                      prs_struct *ps, int depth);
7905 bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u );
7906 bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode);
7907 bool make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u,
7908                 const fstring printername, 
7909                 const fstring datatype, 
7910                 uint32 access_required,
7911                 const fstring clientname,
7912                 const fstring user_name);
7913 bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u, 
7914         const char *srv_name, const char* clientname, const char* user_name,
7915         uint32 level, PRINTER_INFO_CTR *ctr);
7916 bool make_spoolss_printer_info_2(TALLOC_CTX *ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, 
7917                                 PRINTER_INFO_2 *info);
7918 bool make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3, 
7919                                 PRINTER_INFO_3 *info);
7920 bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7, 
7921                                 PRINTER_INFO_7 *info);
7922 bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth);
7923 bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth);
7924 bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
7925 bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
7926 bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
7927                                            SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, 
7928                                            const char *server,
7929                                            const char* arch, 
7930                                            const char* driver,
7931                                            int version);
7932 bool make_spoolss_q_deleteprinterdriver(
7933         TALLOC_CTX *mem_ctx,
7934         SPOOL_Q_DELETEPRINTERDRIVER *q_u, 
7935         const char *server,
7936         const char* arch, 
7937         const char* driver 
7938 );
7939 bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
7940                                    const POLICY_HND *handle,
7941                                    const char *valuename, uint32 size);
7942 bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
7943                                      const POLICY_HND *handle,
7944                                      const char *keyname, 
7945                                      const char *valuename, uint32 size);
7946 bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
7947 bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth);
7948 bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth);
7949 bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth);
7950 bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth);
7951 bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
7952 bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd);
7953 bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth);
7954 bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth);
7955 bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth);
7956 bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth);
7957 bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth);
7958 bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth);
7959 bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
7960 bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth);
7961 bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth);
7962 bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth);
7963 bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth);
7964 bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth);
7965 bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth);
7966 bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth);
7967 bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth);
7968 bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth);
7969 bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth);
7970 bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth);
7971 bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth);
7972 bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth);
7973 bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
7974 bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
7975 bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
7976 bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth);
7977 bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth);
7978 bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth);
7979 bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth);
7980 bool smb_io_printer_info_3(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_3 *info, int depth);
7981 bool smb_io_printer_info_4(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_4 *info, int depth);
7982 bool smb_io_printer_info_5(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_5 *info, int depth);
7983 bool smb_io_printer_info_6(const char *desc, RPC_BUFFER *buffer,
7984                            PRINTER_INFO_6 *info, int depth);
7985 bool smb_io_printer_info_7(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_7 *info, int depth);
7986 bool smb_io_port_info_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
7987 bool smb_io_port_info_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
7988 bool smb_io_printer_driver_info_1(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) ;
7989 bool smb_io_printer_driver_info_2(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) ;
7990 bool smb_io_printer_driver_info_3(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_3 *info, int depth);
7991 bool smb_io_printer_driver_info_6(const char *desc, RPC_BUFFER *buffer, DRIVER_INFO_6 *info, int depth);
7992 bool smb_io_job_info_1(const char *desc, RPC_BUFFER *buffer, JOB_INFO_1 *info, int depth);
7993 bool smb_io_job_info_2(const char *desc, RPC_BUFFER *buffer, JOB_INFO_2 *info, int depth);
7994 bool smb_io_form_1(const char *desc, RPC_BUFFER *buffer, FORM_1 *info, int depth);
7995 bool smb_io_driverdir_1(const char *desc, RPC_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth);
7996 bool smb_io_port_1(const char *desc, RPC_BUFFER *buffer, PORT_INFO_1 *info, int depth);
7997 bool smb_io_port_2(const char *desc, RPC_BUFFER *buffer, PORT_INFO_2 *info, int depth);
7998 bool smb_io_printprocessor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth);
7999 bool smb_io_printprocdatatype_info_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth);
8000 bool smb_io_printmonitor_info_1(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_1 *info, int depth);
8001 bool smb_io_printmonitor_info_2(const char *desc, RPC_BUFFER *buffer, PRINTMONITOR_2 *info, int depth);
8002 uint32 spoolss_size_printer_info_0(PRINTER_INFO_0 *info);
8003 uint32 spoolss_size_printer_info_1(PRINTER_INFO_1 *info);
8004 uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info);
8005 uint32 spoolss_size_printer_info_4(PRINTER_INFO_4 *info);
8006 uint32 spoolss_size_printer_info_5(PRINTER_INFO_5 *info);
8007 uint32 spoolss_size_printer_info_6(PRINTER_INFO_6 *info);
8008 uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info);
8009 uint32 spoolss_size_printer_info_7(PRINTER_INFO_7 *info);
8010 uint32 spoolss_size_printer_driver_info_1(DRIVER_INFO_1 *info);
8011 uint32 spoolss_size_printer_driver_info_2(DRIVER_INFO_2 *info);
8012 uint32 spoolss_size_string_array(uint16 *string);
8013 uint32 spoolss_size_printer_driver_info_3(DRIVER_INFO_3 *info);
8014 uint32 spoolss_size_printer_driver_info_6(DRIVER_INFO_6 *info);
8015 uint32 spoolss_size_job_info_1(JOB_INFO_1 *info);
8016 uint32 spoolss_size_job_info_2(JOB_INFO_2 *info);
8017 uint32 spoolss_size_form_1(FORM_1 *info);
8018 uint32 spoolss_size_port_info_1(PORT_INFO_1 *info);
8019 uint32 spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1 *info);
8020 uint32 spoolss_size_printprocessordirectory_info_1(PRINTPROCESSOR_DIRECTORY_1 *info);
8021 uint32 spoolss_size_port_info_2(PORT_INFO_2 *info);
8022 uint32 spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1 *info);
8023 uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info);
8024 uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
8025 uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info);
8026 uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info);
8027 bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, 
8028                                const POLICY_HND *hnd,
8029                                const fstring architecture,
8030                                uint32 level, uint32 clientmajor, uint32 clientminor,
8031                                RPC_BUFFER *buffer, uint32 offered);
8032 bool spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth);
8033 bool spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth);
8034 bool make_spoolss_q_enumprinters(
8035         SPOOL_Q_ENUMPRINTERS *q_u, 
8036         uint32 flags, 
8037         char *servername, 
8038         uint32 level, 
8039         RPC_BUFFER *buffer, 
8040         uint32 offered
8041 );
8042 bool make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u, 
8043                                 fstring servername, uint32 level, 
8044                                 RPC_BUFFER *buffer, uint32 offered);
8045 bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth);
8046 bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth);
8047 bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth);
8048 bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth);
8049 bool make_spoolss_q_getprinter(
8050         TALLOC_CTX *mem_ctx,
8051         SPOOL_Q_GETPRINTER *q_u, 
8052         const POLICY_HND *hnd, 
8053         uint32 level, 
8054         RPC_BUFFER *buffer, 
8055         uint32 offered
8056 );
8057 bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, 
8058                                 const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, 
8059                                 uint32 command);
8060 bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth);
8061 bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth);
8062 bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth);
8063 bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth);
8064 bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth);
8065 bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth);
8066 bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth);
8067 bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
8068                                 uint32 firstjob,
8069                                 uint32 numofjobs,
8070                                 uint32 level,
8071                                 RPC_BUFFER *buffer,
8072                                 uint32 offered);
8073 bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth);
8074 bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth);
8075 bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth);
8076 bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth);
8077 bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth);
8078 bool spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth);
8079 bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
8080                                 const char *name,
8081                                 const char *environment,
8082                                 uint32 level,
8083                                 RPC_BUFFER *buffer, uint32 offered);
8084 bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth);
8085 bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth);
8086 bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth);
8087 bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth);
8088 bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth);
8089 bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth);
8090 bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth);
8091 bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth);
8092 bool spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth);
8093 bool spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth);
8094 bool spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth);
8095 bool spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth);
8096 bool spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth);
8097 bool spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, 
8098                                prs_struct *ps, int depth);
8099 bool spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, 
8100                                           prs_struct *ps, int depth);
8101 bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, 
8102                                           prs_struct *ps, int depth);
8103 bool smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth);
8104 bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth);
8105 bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
8106                                 SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, 
8107                                 uint32 level, PRINTER_DRIVER_CTR *info);
8108 bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
8109         SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
8110                                 DRIVER_INFO_3 *info3);
8111 bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
8112 bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8113 bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
8114 bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8115 bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
8116 bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
8117                                 NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc);
8118 bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
8119                                 NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc);
8120 bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
8121                               NT_PRINTER_INFO_LEVEL_2  *d);
8122 bool make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
8123                                 fstring servername, fstring env_name, uint32 level,
8124                                 RPC_BUFFER *buffer, uint32 offered);
8125 bool spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth);
8126 bool spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth);
8127 bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth);
8128 bool spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth);
8129 bool spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth);
8130 bool spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth);
8131 bool spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth);
8132 bool spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth);
8133 bool spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth);
8134 bool spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth);
8135 bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
8136 bool spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth);
8137 bool make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
8138                 const POLICY_HND *hnd,
8139                 uint32 idx, uint32 valuelen, uint32 datalen);
8140 bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
8141                                       const POLICY_HND *hnd, const char *key,
8142                                       uint32 size);
8143 bool make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
8144                                    char* value, uint32 data_type, char* data, uint32 data_size);
8145 bool make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY_HND *hnd,
8146                                      char *key, char* value, uint32 data_type, char* data, 
8147                                      uint32 data_size);
8148 bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
8149 bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
8150 bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth);
8151 bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth);
8152 bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth);
8153 bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth);
8154 bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth);
8155 bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth);
8156 bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth);
8157 bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth);
8158 bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth);
8159 bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth);
8160 void free_devmode(DEVICEMODE *devmode);
8161 void free_printer_info_1(PRINTER_INFO_1 *printer);
8162 void free_printer_info_2(PRINTER_INFO_2 *printer);
8163 void free_printer_info_3(PRINTER_INFO_3 *printer);
8164 void free_printer_info_4(PRINTER_INFO_4 *printer);
8165 void free_printer_info_5(PRINTER_INFO_5 *printer);
8166 void free_printer_info_6(PRINTER_INFO_6 *printer);
8167 void free_printer_info_7(PRINTER_INFO_7 *printer);
8168 void free_job_info_2(JOB_INFO_2 *job);
8169 bool make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, 
8170                                const fstring string, uint32 printer, uint32 type);
8171 bool spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth);
8172 bool spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth);
8173 bool make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, 
8174                                         uint32 condition, uint32 change_id);
8175 bool spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth);
8176 bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth);
8177 bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
8178 bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
8179 bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
8180 bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
8181                                 uint32 change_low, uint32 change_high,
8182                                 SPOOL_NOTIFY_INFO *info);
8183 bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
8184 bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
8185 bool spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8186 bool spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8187 bool spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8188 bool spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8189 bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, 
8190                                    POLICY_HND *hnd, const char *key, 
8191                                    uint32 size);
8192 bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth);
8193 bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
8194 bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u, 
8195                                      POLICY_HND *hnd, char *keyname);
8196 bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth);
8197 bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth);
8198 bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
8199 bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
8200 bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered);
8201 bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth);
8202 bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth);
8203 bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth);
8204 bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, 
8205                             int level, FORM *form);
8206 bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, 
8207                             int level, const char *form_name, FORM *form);
8208 bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, 
8209                                const char *form);
8210 bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, 
8211                             const char *formname, uint32 level, 
8212                             RPC_BUFFER *buffer, uint32 offered);
8213 bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, 
8214                               uint32 level, RPC_BUFFER *buffer,
8215                               uint32 offered);
8216 bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, 
8217                            uint32 jobid, uint32 level, uint32 command);
8218 bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, 
8219                            uint32 jobid, uint32 level, RPC_BUFFER *buffer,
8220                            uint32 offered);
8221 bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u, 
8222                                      POLICY_HND *handle);
8223 bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u, 
8224                                    POLICY_HND *handle);
8225 bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u, 
8226                                     POLICY_HND *handle, uint32 level,
8227                                     char *docname, char *outputfile,
8228                                     char *datatype);
8229 bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u, 
8230                                   POLICY_HND *handle);
8231 bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u, 
8232                                  POLICY_HND *handle, uint32 data_size,
8233                                  char *data);
8234 bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u, 
8235                                  POLICY_HND *handle, char *valuename);
8236 bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u, 
8237                                         POLICY_HND *handle, char *key,
8238                                         char *value);
8239 bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
8240                              uint32 flags, uint32 options, const char *localmachine,
8241                              uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
8242 bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth);
8243 bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth);
8244 bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname );
8245 bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ;
8246
8247 /* The following definitions come from rpc_parse/parse_svcctl.c  */
8248
8249 bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth );
8250 bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth );
8251 uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status );
8252 bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth);
8253 bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth);
8254 bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth);
8255 void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc );
8256 bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth );
8257 uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc );
8258 bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth );
8259 uint32 svcctl_sizeof_service_fa( SERVICE_FAILURE_ACTIONS *fa);
8260 bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth);
8261 bool svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth);
8262 bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth);
8263
8264 /* The following definitions come from rpc_server/srv_dfs_nt.c  */
8265
8266
8267 /* The following definitions come from rpc_server/srv_dssetup_nt.c  */
8268
8269 /* The following definitions come from rpc_server/srv_echo_nt.c  */
8270
8271 /* The following definitions come from rpc_server/srv_eventlog.c  */
8272
8273 NTSTATUS rpc_eventlog2_init(void);
8274 void eventlog2_get_pipe_fns(struct api_struct **fns, int *n_fns);
8275
8276 /* The following definitions come from rpc_server/srv_eventlog_lib.c  */
8277
8278 TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
8279 char *elog_tdbname(TALLOC_CTX *ctx, const char *name );
8280 int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention );
8281 bool prune_eventlog( TDB_CONTEXT * tdb );
8282 bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed );
8283 ELOG_TDB *elog_open_tdb( char *logname, bool force_clear );
8284 int elog_close_tdb( ELOG_TDB *etdb, bool force_close );
8285 int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee );
8286 void fixup_eventlog_entry( Eventlog_entry * ee );
8287 bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor );
8288
8289 /* The following definitions come from rpc_server/srv_eventlog_nt.c  */
8290
8291 NTSTATUS _eventlog_read_eventlog( pipes_struct * p,
8292                                 EVENTLOG_Q_READ_EVENTLOG * q_u,
8293                                 EVENTLOG_R_READ_EVENTLOG * r_u );
8294
8295 /* The following definitions come from rpc_server/srv_initshutdown_nt.c  */
8296
8297 /* The following definitions come from rpc_server/srv_lsa_hnd.c  */
8298
8299 bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name);
8300 bool create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr);
8301 bool find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p);
8302 bool close_policy_hnd(pipes_struct *p, POLICY_HND *hnd);
8303 void close_policy_by_pipe(pipes_struct *p);
8304 bool pipe_access_check(pipes_struct *p);
8305
8306 /* The following definitions come from rpc_server/srv_lsa_nt.c  */
8307
8308 /* The following definitions come from rpc_server/srv_netlog_nt.c  */
8309
8310 /* The following definitions come from rpc_server/srv_ntsvcs.c  */
8311
8312 void ntsvcs2_get_pipe_fns( struct api_struct **fns, int *n_fns );
8313 NTSTATUS rpc_ntsvcs2_init(void);
8314
8315 /* The following definitions come from rpc_server/srv_ntsvcs_nt.c  */
8316
8317 WERROR _ntsvcs_get_device_list( pipes_struct *p, NTSVCS_Q_GET_DEVICE_LIST *q_u, NTSVCS_R_GET_DEVICE_LIST *r_u );
8318 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 );
8319
8320 /* The following definitions come from rpc_server/srv_pipe.c  */
8321
8322 bool create_next_pdu(pipes_struct *p);
8323 bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p);
8324 bool setup_fault_pdu(pipes_struct *p, NTSTATUS status);
8325 bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p);
8326 bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
8327                     RPC_IFACE* transfer, uint32 context_id);
8328 NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
8329                                     const char *srv,
8330                                     const struct ndr_syntax_id *interface,
8331                                     const struct api_struct *cmds, int size);
8332 bool is_known_pipename(const char *cli_filename);
8333 bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
8334 bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
8335 bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
8336                                         uint32 *p_ss_padding_len, NTSTATUS *pstatus);
8337 bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len);
8338 struct current_user *get_current_user(struct current_user *user, pipes_struct *p);
8339 void free_pipe_rpc_context( PIPE_RPC_FNS *list );
8340 bool api_pipe_request(pipes_struct *p);
8341
8342 /* The following definitions come from rpc_server/srv_pipe_hnd.c  */
8343
8344 pipes_struct *get_first_internal_pipe(void);
8345 pipes_struct *get_next_internal_pipe(pipes_struct *p);
8346 void set_pipe_handle_offset(int max_open_files);
8347 void reset_chain_p(void);
8348 void init_rpc_pipe_hnd(void);
8349 smb_np_struct *open_rpc_pipe_p(const char *pipe_name, 
8350                               connection_struct *conn, uint16 vuid);
8351 ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n);
8352 ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
8353                 bool *is_data_outstanding);
8354 bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority);
8355 bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state);
8356 bool close_rpc_pipe_hnd(smb_np_struct *p);
8357 void pipe_close_conn(connection_struct *conn);
8358 smb_np_struct *get_rpc_pipe_p(uint16 pnum);
8359 smb_np_struct *get_rpc_pipe(int pnum);
8360 struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
8361                                               const char *client_address,
8362                                               struct auth_serversupplied_info *server_info,
8363                                               uint16_t vuid);
8364 ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
8365                                 bool *is_data_outstanding);
8366 ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n);
8367
8368 /* The following definitions come from rpc_server/srv_samr_nt.c  */
8369
8370 /* The following definitions come from rpc_server/srv_samr_util.c  */
8371
8372 void copy_id20_to_sam_passwd(struct samu *to,
8373                              struct samr_UserInfo20 *from);
8374 void copy_id21_to_sam_passwd(const char *log_prefix,
8375                              struct samu *to,
8376                              struct samr_UserInfo21 *from);
8377 void copy_id23_to_sam_passwd(struct samu *to,
8378                              struct samr_UserInfo23 *from);
8379 void copy_id25_to_sam_passwd(struct samu *to,
8380                              struct samr_UserInfo25 *from);
8381
8382 /* The following definitions come from rpc_server/srv_spoolss.c  */
8383
8384 void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns );
8385 NTSTATUS rpc_spoolss_init(void);
8386
8387 /* The following definitions come from rpc_server/srv_spoolss_nt.c  */
8388
8389 WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *sharename );
8390 void do_drv_upgrade_printer(struct messaging_context *msg,
8391                             void *private_data,
8392                             uint32_t msg_type,
8393                             struct server_id server_id,
8394                             DATA_BLOB *data);
8395 void update_monitored_printq_cache( void );
8396 void reset_all_printerdata(struct messaging_context *msg,
8397                            void *private_data,
8398                            uint32_t msg_type,
8399                            struct server_id server_id,
8400                            DATA_BLOB *data);
8401 WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u);
8402 WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u);
8403 bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
8404                                 NT_DEVICEMODE **pp_nt_devmode);
8405 WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u);
8406 WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u);
8407 WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u);
8408 WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u);
8409 WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
8410                                   uint32 type, uint8 *data, int real_len  );
8411 WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
8412 WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u);
8413 void spoolss_notify_server_name(int snum,
8414                                        SPOOL_NOTIFY_INFO_DATA *data,
8415                                        print_queue_struct *queue,
8416                                        NT_PRINTER_INFO_LEVEL *printer,
8417                                        TALLOC_CTX *mem_ctx);
8418 void spoolss_notify_printer_name(int snum,
8419                                         SPOOL_NOTIFY_INFO_DATA *data,
8420                                         print_queue_struct *queue,
8421                                         NT_PRINTER_INFO_LEVEL *printer,
8422                                         TALLOC_CTX *mem_ctx);
8423 void spoolss_notify_share_name(int snum,
8424                                       SPOOL_NOTIFY_INFO_DATA *data,
8425                                       print_queue_struct *queue,
8426                                       NT_PRINTER_INFO_LEVEL *printer,
8427                                       TALLOC_CTX *mem_ctx);
8428 void spoolss_notify_port_name(int snum,
8429                                      SPOOL_NOTIFY_INFO_DATA *data,
8430                                      print_queue_struct *queue,
8431                                      NT_PRINTER_INFO_LEVEL *printer,
8432                                      TALLOC_CTX *mem_ctx);
8433 void spoolss_notify_driver_name(int snum,
8434                                        SPOOL_NOTIFY_INFO_DATA *data,
8435                                        print_queue_struct *queue,
8436                                        NT_PRINTER_INFO_LEVEL *printer,
8437                                        TALLOC_CTX *mem_ctx);
8438 void spoolss_notify_comment(int snum,
8439                                    SPOOL_NOTIFY_INFO_DATA *data,
8440                                    print_queue_struct *queue,
8441                                    NT_PRINTER_INFO_LEVEL *printer,
8442                                    TALLOC_CTX *mem_ctx);
8443 void spoolss_notify_location(int snum,
8444                                     SPOOL_NOTIFY_INFO_DATA *data,
8445                                     print_queue_struct *queue,
8446                                     NT_PRINTER_INFO_LEVEL *printer,
8447                                     TALLOC_CTX *mem_ctx);
8448 void spoolss_notify_sepfile(int snum,
8449                                    SPOOL_NOTIFY_INFO_DATA *data,
8450                                    print_queue_struct *queue,
8451                                    NT_PRINTER_INFO_LEVEL *printer,
8452                                    TALLOC_CTX *mem_ctx);
8453 void spoolss_notify_print_processor(int snum,
8454                                            SPOOL_NOTIFY_INFO_DATA *data,
8455                                            print_queue_struct *queue,
8456                                            NT_PRINTER_INFO_LEVEL *printer,
8457                                            TALLOC_CTX *mem_ctx);
8458 void spoolss_notify_parameters(int snum,
8459                                       SPOOL_NOTIFY_INFO_DATA *data,
8460                                       print_queue_struct *queue,
8461                                       NT_PRINTER_INFO_LEVEL *printer,
8462                                       TALLOC_CTX *mem_ctx);
8463 void spoolss_notify_datatype(int snum,
8464                                     SPOOL_NOTIFY_INFO_DATA *data,
8465                                     print_queue_struct *queue,
8466                                     NT_PRINTER_INFO_LEVEL *printer,
8467                                     TALLOC_CTX *mem_ctx);
8468 void spoolss_notify_attributes(int snum,
8469                                       SPOOL_NOTIFY_INFO_DATA *data,
8470                                       print_queue_struct *queue,
8471                                       NT_PRINTER_INFO_LEVEL *printer,
8472                                       TALLOC_CTX *mem_ctx);
8473 void spoolss_notify_cjobs(int snum,
8474                                  SPOOL_NOTIFY_INFO_DATA *data,
8475                                  print_queue_struct *queue,
8476                                  NT_PRINTER_INFO_LEVEL *printer,
8477                                  TALLOC_CTX *mem_ctx);
8478 void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id);
8479 WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
8480 DEVICEMODE *construct_dev_mode(const char *servicename);
8481 WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
8482 WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
8483 WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u);
8484 WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u);
8485 WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u);
8486 WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u);
8487 WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u);
8488 WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u);
8489 WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u);
8490 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
8491 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
8492 WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
8493 WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u);
8494 WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u);
8495 WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u);
8496 WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u);
8497 WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u);
8498 WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
8499 WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u);
8500 WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u);
8501 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
8502 WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u);
8503 WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u);
8504 WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, SPOOL_R_ADDPRINTERDRIVER *r_u);
8505 WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, SPOOL_R_ADDPRINTERDRIVEREX *r_u);
8506 WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u);
8507 WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
8508 WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
8509 WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u);
8510 WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u);
8511 WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u);
8512 WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u);
8513 WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u);
8514 WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u);
8515 WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u);
8516 WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u);
8517 WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u);
8518 WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u);
8519 WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u);
8520 WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u);
8521 WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
8522 WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u);
8523 WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
8524 WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u);
8525 WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_XCVDATAPORT *r_u);
8526
8527 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
8528
8529 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
8530
8531 /* The following definitions come from rpc_server/srv_svcctl.c  */
8532
8533 void svcctl2_get_pipe_fns( struct api_struct **fns, int *n_fns );
8534 NTSTATUS rpc_svcctl2_init(void);
8535
8536 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
8537
8538 bool init_service_op_table( void );
8539 WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, SVCCTL_R_ENUM_SERVICES_STATUS *r_u);
8540 WERROR _svcctl_query_service_status_ex( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u );
8541 WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u );
8542
8543 /* The following definitions come from rpc_server/srv_winreg_nt.c  */
8544
8545 /* The following definitions come from rpc_server/srv_wkssvc_nt.c  */
8546
8547 /* The following definitions come from rpcclient/cmd_dfs.c  */
8548
8549
8550 /* The following definitions come from rpcclient/cmd_dssetup.c  */
8551
8552
8553 /* The following definitions come from rpcclient/cmd_echo.c  */
8554
8555
8556 /* The following definitions come from rpcclient/cmd_lsarpc.c  */
8557
8558
8559 /* The following definitions come from rpcclient/cmd_netlogon.c  */
8560
8561
8562 /* The following definitions come from rpcclient/cmd_ntsvcs.c  */
8563
8564
8565 /* The following definitions come from rpcclient/cmd_samr.c  */
8566
8567
8568 /* The following definitions come from rpcclient/cmd_shutdown.c  */
8569
8570
8571 /* The following definitions come from rpcclient/cmd_spoolss.c  */
8572
8573 void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch);
8574
8575 /* The following definitions come from rpcclient/cmd_srvsvc.c  */
8576
8577
8578 /* The following definitions come from rpcclient/cmd_test.c  */
8579
8580
8581 /* The following definitions come from rpcclient/cmd_wkssvc.c  */
8582
8583
8584 /* The following definitions come from rpcclient/rpcclient.c  */
8585
8586
8587 /* The following definitions come from services/services_db.c  */
8588
8589 void svcctl_init_keys( void );
8590 SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
8591 bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token );
8592 const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
8593 const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token );
8594 REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token );
8595
8596 /* The following definitions come from services/svc_netlogon.c  */
8597
8598
8599 /* The following definitions come from services/svc_rcinit.c  */
8600
8601
8602 /* The following definitions come from services/svc_spoolss.c  */
8603
8604
8605 /* The following definitions come from services/svc_winreg.c  */
8606
8607
8608 /* The following definitions come from services/svc_wins.c  */
8609
8610
8611 /* The following definitions come from smbd/aio.c  */
8612
8613 void aio_request_done(uint16_t mid);
8614 bool aio_finished(void);
8615 void initialize_async_io_handler(void);
8616 bool schedule_aio_read_and_X(connection_struct *conn,
8617                              struct smb_request *req,
8618                              files_struct *fsp, SMB_OFF_T startpos,
8619                              size_t smb_maxcnt);
8620 bool schedule_aio_write_and_X(connection_struct *conn,
8621                               struct smb_request *req,
8622                               files_struct *fsp, char *data,
8623                               SMB_OFF_T startpos,
8624                               size_t numtowrite);
8625 int process_aio_queue(void);
8626 int wait_for_aio_completion(files_struct *fsp);
8627 void cancel_aio_by_fsp(files_struct *fsp);
8628 bool aio_finished(void);
8629 void initialize_async_io_handler(void);
8630 int process_aio_queue(void);
8631 bool schedule_aio_read_and_X(connection_struct *conn,
8632                              struct smb_request *req,
8633                              files_struct *fsp, SMB_OFF_T startpos,
8634                              size_t smb_maxcnt);
8635 bool schedule_aio_write_and_X(connection_struct *conn,
8636                               struct smb_request *req,
8637                               files_struct *fsp, char *data,
8638                               SMB_OFF_T startpos,
8639                               size_t numtowrite);
8640 void cancel_aio_by_fsp(files_struct *fsp);
8641 int wait_for_aio_completion(files_struct *fsp);
8642
8643 /* The following definitions come from smbd/blocking.c  */
8644
8645 bool push_blocking_lock_request( struct byte_range_lock *br_lck,
8646                 const struct smb_request *req,
8647                 files_struct *fsp,
8648                 int lock_timeout,
8649                 int lock_num,
8650                 uint32 lock_pid,
8651                 enum brl_type lock_type,
8652                 enum brl_flavour lock_flav,
8653                 SMB_BIG_UINT offset,
8654                 SMB_BIG_UINT count,
8655                 uint32 blocking_pid);
8656 void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck);
8657 void remove_pending_lock_requests_by_mid(int mid);
8658 bool blocking_lock_was_deferred(int mid);
8659 bool blocking_lock_cancel(files_struct *fsp,
8660                         uint32 lock_pid,
8661                         SMB_BIG_UINT offset,
8662                         SMB_BIG_UINT count,
8663                         enum brl_flavour lock_flav,
8664                         unsigned char locktype,
8665                         NTSTATUS err);
8666
8667 /* The following definitions come from smbd/change_trust_pw.c  */
8668
8669 NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
8670
8671 /* The following definitions come from smbd/chgpasswd.c  */
8672
8673 bool chgpasswd(const char *name, const struct passwd *pass,
8674                const char *oldpass, const char *newpass, bool as_root);
8675 bool chgpasswd(const char *name, const struct passwd *pass, 
8676                const char *oldpass, const char *newpass, bool as_root);
8677 bool check_lanman_password(char *user, uchar * pass1,
8678                            uchar * pass2, struct samu **hnd);
8679 bool change_lanman_password(struct samu *sampass, uchar *pass2);
8680 NTSTATUS pass_oem_change(char *user,
8681                          uchar password_encrypted_with_lm_hash[516],
8682                          const uchar old_lm_hash_encrypted[16],
8683                          uchar password_encrypted_with_nt_hash[516],
8684                          const uchar old_nt_hash_encrypted[16],
8685                          uint32 *reject_reason);
8686 NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason);
8687
8688 /* The following definitions come from smbd/close.c  */
8689
8690 void set_close_write_time(struct files_struct *fsp, struct timespec ts);
8691 NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type);
8692 void msg_close_file(struct messaging_context *msg_ctx,
8693                     void *private_data,
8694                     uint32_t msg_type,
8695                     struct server_id server_id,
8696                     DATA_BLOB *data);
8697 NTSTATUS delete_all_streams(connection_struct *conn, const char *fname);
8698
8699 /* The following definitions come from smbd/conn.c  */
8700
8701 void conn_init(void);
8702 int conn_num_open(void);
8703 bool conn_snum_used(int snum);
8704 connection_struct *conn_find(unsigned cnum);
8705 connection_struct *conn_new(void);
8706 bool conn_close_all(void);
8707 bool conn_idle_all(time_t t);
8708 void conn_clear_vuid_caches(uint16 vuid);
8709 void conn_free_internal(connection_struct *conn);
8710 void conn_free(connection_struct *conn);
8711 void msg_force_tdis(struct messaging_context *msg,
8712                     void *private_data,
8713                     uint32_t msg_type,
8714                     struct server_id server_id,
8715                     DATA_BLOB *data);
8716
8717 /* The following definitions come from smbd/connection.c  */
8718
8719 bool yield_connection(connection_struct *conn, const char *name);
8720 int count_current_connections( const char *sharename, bool clear  );
8721 int count_all_current_connections(void);
8722 bool claim_connection(connection_struct *conn, const char *name,
8723                       uint32 msg_flags);
8724 bool register_message_flags(bool doreg, uint32 msg_flags);
8725 bool store_pipe_opendb( smb_np_struct *p );
8726 bool delete_pipe_opendb( smb_np_struct *p );
8727
8728 /* The following definitions come from smbd/dfree.c  */
8729
8730 SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
8731                               SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
8732 SMB_BIG_UINT get_dfree_info(connection_struct *conn,
8733                         const char *path,
8734                         bool small_query,
8735                         SMB_BIG_UINT *bsize,
8736                         SMB_BIG_UINT *dfree,
8737                         SMB_BIG_UINT *dsize);
8738
8739 /* The following definitions come from smbd/dir.c  */
8740
8741 bool make_dir_struct(TALLOC_CTX *ctx,
8742                         char *buf,
8743                         const char *mask,
8744                         const char *fname,
8745                         SMB_OFF_T size,
8746                         uint32 mode,
8747                         time_t date,
8748                         bool uc);
8749 void init_dptrs(void);
8750 char *dptr_path(int key);
8751 char *dptr_wcard(int key);
8752 uint16 dptr_attr(int key);
8753 void dptr_close(int *key);
8754 void dptr_closecnum(connection_struct *conn);
8755 void dptr_idlecnum(connection_struct *conn);
8756 void dptr_closepath(char *path,uint16 spid);
8757 NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, bool expect_close,uint16 spid,
8758                 const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret);
8759 int dptr_CloseDir(struct dptr_struct *dptr);
8760 void dptr_SeekDir(struct dptr_struct *dptr, long offset);
8761 long dptr_TellDir(struct dptr_struct *dptr);
8762 bool dptr_has_wild(struct dptr_struct *dptr);
8763 int dptr_dnum(struct dptr_struct *dptr);
8764 const char *dptr_ReadDirName(TALLOC_CTX *ctx,
8765                         struct dptr_struct *dptr,
8766                         long *poffset,
8767                         SMB_STRUCT_STAT *pst);
8768 bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst);
8769 void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset);
8770 bool dptr_fill(char *buf1,unsigned int key);
8771 struct dptr_struct *dptr_fetch(char *buf,int *num);
8772 struct dptr_struct *dptr_fetch_lanman2(int dptr_num);
8773 bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype);
8774 bool get_dir_entry(TALLOC_CTX *ctx,
8775                 connection_struct *conn,
8776                 const char *mask,
8777                 uint32 dirtype,
8778                 char **pp_fname_out,
8779                 SMB_OFF_T *size,
8780                 uint32 *mode,
8781                 time_t *date,
8782                 bool check_descend,
8783                 bool ask_sharemode);
8784 bool is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, bool use_veto);
8785 struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
8786                         const char *name, const char *mask, uint32 attr);
8787 const char *ReadDirName(struct smb_Dir *dirp, long *poffset);
8788 void RewindDir(struct smb_Dir *dirp, long *poffset);
8789 void SeekDir(struct smb_Dir *dirp, long offset);
8790 long TellDir(struct smb_Dir *dirp);
8791 void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
8792 bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset);
8793 NTSTATUS can_delete_directory(struct connection_struct *conn,
8794                                 const char *dirname);
8795
8796 /* The following definitions come from smbd/dmapi.c  */
8797
8798 const void *dmapi_get_current_session(void);
8799 bool dmapi_have_session(void);
8800 bool dmapi_new_session(void);
8801 bool dmapi_destroy_session(void);
8802 uint32 dmapi_file_flags(const char * const path);
8803
8804 /* The following definitions come from smbd/dnsregister.c  */
8805
8806 void dns_register_close(struct dns_reg_state **dns_state_ptr);
8807 void dns_register_smbd(struct dns_reg_state ** dns_state_ptr,
8808                 unsigned port,
8809                 int *maxfd,
8810                 fd_set *listen_set,
8811                 struct timeval *timeout);
8812 bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
8813                 fd_set *lfds, struct timeval *timeout);
8814
8815 /* The following definitions come from smbd/dosmode.c  */
8816
8817 mode_t unix_mode(connection_struct *conn, int dosmode, const char *fname,
8818                  const char *inherit_from_dir);
8819 uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
8820 uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf);
8821 int file_set_dosmode(connection_struct *conn, const char *fname,
8822                      uint32 dosmode, SMB_STRUCT_STAT *st,
8823                      const char *parent_dir,
8824                      bool newfile);
8825 int file_ntimes(connection_struct *conn, const char *fname, const struct timespec ts[2]);
8826 bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
8827                          struct file_id fileid, const struct timespec mtime);
8828 bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
8829 bool update_write_time(struct files_struct *fsp);
8830
8831 /* The following definitions come from smbd/error.c  */
8832
8833 bool use_nt_status(void);
8834 void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
8835 int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
8836 void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
8837                     int line, const char *file);
8838 void reply_force_nt_error(struct smb_request *req, NTSTATUS ntstatus,
8839                           int line, const char *file);
8840 void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
8841                     int line, const char *file);
8842 void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
8843                       NTSTATUS status, int line, const char *file);
8844 void reply_openerror(struct smb_request *req, NTSTATUS status);
8845 void reply_unix_error(struct smb_request *req, uint8 defclass, uint32 defcode,
8846                         NTSTATUS defstatus, int line, const char *file);
8847
8848 /* The following definitions come from smbd/fake_file.c  */
8849
8850 enum FAKE_FILE_TYPE is_fake_file(const char *fname);
8851 NTSTATUS open_fake_file(connection_struct *conn,
8852                                 uint16_t current_vuid,
8853                                 enum FAKE_FILE_TYPE fake_file_type,
8854                                 const char *fname,
8855                                 uint32 access_mask,
8856                                 files_struct **result);
8857 NTSTATUS close_fake_file(files_struct *fsp);
8858
8859 /* The following definitions come from smbd/file_access.c  */
8860
8861 bool can_access_file_acl(struct connection_struct *conn,
8862                                 const char * fname,
8863                                 uint32_t access_mask);
8864 bool can_delete_file_in_directory(connection_struct *conn, const char *fname);
8865 bool can_access_file_data(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask);
8866 bool can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf);
8867 bool directory_has_default_acl(connection_struct *conn, const char *fname);
8868
8869 /* The following definitions come from smbd/fileio.c  */
8870
8871 ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
8872 void trigger_write_time_update(struct files_struct *fsp);
8873 void trigger_write_time_update_immediate(struct files_struct *fsp);
8874 ssize_t write_file(struct smb_request *req,
8875                         files_struct *fsp,
8876                         const char *data,
8877                         SMB_OFF_T pos,
8878                         size_t n);
8879 void delete_write_cache(files_struct *fsp);
8880 void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size);
8881 ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason);
8882 NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_through);
8883 int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst);
8884
8885 /* The following definitions come from smbd/filename.c  */
8886
8887 NTSTATUS unix_convert(TALLOC_CTX *ctx,
8888                         connection_struct *conn,
8889                         const char *orig_path,
8890                         bool allow_wcard_last_component,
8891                         char **pp_conv_path,
8892                         char **pp_saved_last_component,
8893                         SMB_STRUCT_STAT *pst);
8894 NTSTATUS check_name(connection_struct *conn, const char *name);
8895 int get_real_filename(connection_struct *conn, const char *path,
8896                       const char *name, TALLOC_CTX *mem_ctx,
8897                       char **found_name);
8898
8899 /* The following definitions come from smbd/files.c  */
8900
8901 NTSTATUS file_new(connection_struct *conn, files_struct **result);
8902 void file_close_conn(connection_struct *conn);
8903 void file_close_pid(uint16 smbpid, int vuid);
8904 void file_init(void);
8905 void file_close_user(int vuid);
8906 void file_dump_open_table(void);
8907 files_struct *file_find_fd(int fd);
8908 files_struct *file_find_dif(struct file_id id, unsigned long gen_id);
8909 files_struct *file_find_fsp(files_struct *orig_fsp);
8910 files_struct *file_find_di_first(struct file_id id);
8911 files_struct *file_find_di_next(files_struct *start_fsp);
8912 files_struct *file_find_print(void);
8913 bool file_find_subpath(files_struct *dir_fsp);
8914 void file_sync_all(connection_struct *conn);
8915 void file_free(files_struct *fsp);
8916 files_struct *file_fnum(uint16 fnum);
8917 files_struct *file_fsp(uint16 fid);
8918 void file_chain_reset(void);
8919 void dup_file_fsp(files_struct *from,
8920                                 uint32 access_mask,
8921                                 uint32 share_access,
8922                                 uint32 create_options,
8923                                 files_struct *to);
8924
8925 /* The following definitions come from smbd/ipc.c  */
8926
8927 void send_trans_reply(connection_struct *conn,
8928                       const uint8_t *inbuf,
8929                       char *rparam, int rparam_len,
8930                       char *rdata, int rdata_len,
8931                       bool buffer_too_large);
8932 void reply_trans(struct smb_request *req);
8933 void reply_transs(struct smb_request *req);
8934
8935 /* The following definitions come from smbd/lanman.c  */
8936
8937 void api_reply(connection_struct *conn, uint16 vuid,
8938                struct smb_request *req,
8939                char *data, char *params,
8940                int tdscnt, int tpscnt,
8941                int mdrcnt, int mprcnt);
8942
8943 /* The following definitions come from smbd/mangle.c  */
8944
8945 void mangle_reset_cache(void);
8946 void mangle_change_to_posix(void);
8947 bool mangle_is_mangled(const char *s, const struct share_params *p);
8948 bool mangle_is_8_3(const char *fname, bool check_case,
8949                    const struct share_params *p);
8950 bool mangle_is_8_3_wildcards(const char *fname, bool check_case,
8951                              const struct share_params *p);
8952 bool mangle_must_mangle(const char *fname,
8953                    const struct share_params *p);
8954 bool mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
8955                         const char *in,
8956                         char **out, /* talloced on the given context. */
8957                         const struct share_params *p);
8958 bool name_to_8_3(const char *in,
8959                 char out[13],
8960                 bool cache83,
8961                 const struct share_params *p);
8962
8963 /* The following definitions come from smbd/mangle_hash.c  */
8964
8965 struct mangle_fns *mangle_hash_init(void);
8966
8967 /* The following definitions come from smbd/mangle_hash2.c  */
8968
8969 struct mangle_fns *mangle_hash2_init(void);
8970 struct mangle_fns *posix_mangle_init(void);
8971
8972 /* The following definitions come from smbd/map_username.c  */
8973
8974 bool map_username(fstring user);
8975
8976 /* The following definitions come from smbd/message.c  */
8977
8978 void reply_sends(struct smb_request *req);
8979 void reply_sendstrt(struct smb_request *req);
8980 void reply_sendtxt(struct smb_request *req);
8981 void reply_sendend(struct smb_request *req);
8982
8983 /* The following definitions come from smbd/msdfs.c  */
8984
8985 bool is_msdfs_link(connection_struct *conn,
8986                 const char *path,
8987                 SMB_STRUCT_STAT *sbufp);
8988 NTSTATUS get_referred_path(TALLOC_CTX *ctx,
8989                         const char *dfs_path,
8990                         struct junction_map *jucn,
8991                         int *consumedcntp,
8992                         bool *self_referralp);
8993 int setup_dfs_referral(connection_struct *orig_conn,
8994                         const char *dfs_path,
8995                         int max_referral_level,
8996                         char **ppdata, NTSTATUS *pstatus);
8997 bool create_junction(TALLOC_CTX *ctx,
8998                 const char *dfs_path,
8999                 struct junction_map *jucn);
9000 bool create_msdfs_link(const struct junction_map *jucn);
9001 bool remove_msdfs_link(const struct junction_map *jucn);
9002 struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn);
9003 NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
9004                         connection_struct *conn,
9005                         bool dfs_pathnames,
9006                         const char *name_in,
9007                         char **pp_name_out);
9008 NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
9009                                 connection_struct *conn,
9010                                 bool dfs_pathnames,
9011                                 const char *name_in,
9012                                 char **pp_name_out,
9013                                 bool *ppath_contains_wcard);
9014 NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
9015                                 connection_struct **pconn,
9016                                 int snum,
9017                                 const char *path,
9018                             char **poldcwd);
9019
9020 /* The following definitions come from smbd/negprot.c  */
9021
9022 void reply_negprot(struct smb_request *req);
9023
9024 /* The following definitions come from smbd/notify.c  */
9025
9026 void change_notify_reply(connection_struct *conn,
9027                         const uint8 *request_buf, uint32 max_param,
9028                          struct notify_change_buf *notify_buf);
9029 NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
9030                               bool recursive);
9031 NTSTATUS change_notify_add_request(const struct smb_request *req,
9032                                 uint32 max_param,
9033                                 uint32 filter, bool recursive,
9034                                 struct files_struct *fsp);
9035 void remove_pending_change_notify_requests_by_mid(uint16 mid);
9036 void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
9037                                                   NTSTATUS status);
9038 void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
9039                   const char *path);
9040 char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter);
9041 struct sys_notify_context *sys_notify_context_create(connection_struct *conn,
9042                                                      TALLOC_CTX *mem_ctx, 
9043                                                      struct event_context *ev);
9044 NTSTATUS sys_notify_watch(struct sys_notify_context *ctx,
9045                           struct notify_entry *e,
9046                           void (*callback)(struct sys_notify_context *ctx, 
9047                                            void *private_data,
9048                                            struct notify_event *ev),
9049                           void *private_data, void *handle);
9050
9051 /* The following definitions come from smbd/notify_inotify.c  */
9052
9053 NTSTATUS inotify_watch(struct sys_notify_context *ctx,
9054                        struct notify_entry *e,
9055                        void (*callback)(struct sys_notify_context *ctx, 
9056                                         void *private_data,
9057                                         struct notify_event *ev),
9058                        void *private_data, 
9059                        void *handle_p);
9060
9061 /* The following definitions come from smbd/notify_internal.c  */
9062
9063 struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server, 
9064                                    struct messaging_context *messaging_ctx,
9065                                    struct event_context *ev,
9066                                    connection_struct *conn);
9067 NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0,
9068                     void (*callback)(void *, const struct notify_event *), 
9069                     void *private_data);
9070 NTSTATUS notify_remove(struct notify_context *notify, void *private_data);
9071 void notify_trigger(struct notify_context *notify,
9072                     uint32_t action, uint32_t filter, const char *path);
9073
9074 /* The following definitions come from smbd/ntquotas.c  */
9075
9076 int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9077 int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, SMB_NTQUOTA_STRUCT *qt);
9078 int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list);
9079 void *init_quota_handle(TALLOC_CTX *mem_ctx);
9080
9081 /* The following definitions come from smbd/nttrans.c  */
9082
9083 void send_nt_replies(connection_struct *conn,
9084                         struct smb_request *req, NTSTATUS nt_error,
9085                      char *params, int paramsize,
9086                      char *pdata, int datasize);
9087 bool is_ntfs_stream_name(const char *fname);
9088 void reply_ntcreate_and_X(struct smb_request *req);
9089 void reply_ntcancel(struct smb_request *req);
9090 void reply_ntrename(struct smb_request *req);
9091 void reply_nttrans(struct smb_request *req);
9092 void reply_nttranss(struct smb_request *req);
9093
9094 /* The following definitions come from smbd/open.c  */
9095
9096 NTSTATUS smb1_file_se_access_check(const struct security_descriptor *sd,
9097                           const NT_USER_TOKEN *token,
9098                           uint32_t access_desired,
9099                           uint32_t *access_granted);
9100 NTSTATUS fd_close(files_struct *fsp);
9101 bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func,
9102                                  uint32 *paccess_mask,
9103                                  uint32 *pshare_mode,
9104                                  uint32 *pcreate_disposition,
9105                                  uint32 *pcreate_options);
9106 NTSTATUS open_file_ntcreate(connection_struct *conn,
9107                             struct smb_request *req,
9108                             const char *fname,
9109                             SMB_STRUCT_STAT *psbuf,
9110                             uint32 access_mask,         /* access bits (FILE_READ_DATA etc.) */
9111                             uint32 share_access,        /* share constants (FILE_SHARE_READ etc) */
9112                             uint32 create_disposition,  /* FILE_OPEN_IF etc. */
9113                             uint32 create_options,      /* options such as delete on close. */
9114                             uint32 new_dos_attributes,  /* attributes used for new file. */
9115                             int oplock_request,         /* internal Samba oplock codes. */
9116                                                         /* Information (FILE_EXISTS etc.) */
9117                             int *pinfo,
9118                             files_struct **result);
9119 NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
9120                           SMB_STRUCT_STAT *psbuf, files_struct **result);
9121 NTSTATUS close_file_fchmod(files_struct *fsp);
9122 NTSTATUS open_directory(connection_struct *conn,
9123                         struct smb_request *req,
9124                         const char *fname,
9125                         SMB_STRUCT_STAT *psbuf,
9126                         uint32 access_mask,
9127                         uint32 share_access,
9128                         uint32 create_disposition,
9129                         uint32 create_options,
9130                         uint32 file_attributes,
9131                         int *pinfo,
9132                         files_struct **result);
9133 NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, const char *directory);
9134 void msg_file_was_renamed(struct messaging_context *msg,
9135                           void *private_data,
9136                           uint32_t msg_type,
9137                           struct server_id server_id,
9138                           DATA_BLOB *data);
9139 NTSTATUS create_file_unixpath(connection_struct *conn,
9140                               struct smb_request *req,
9141                               const char *fname,
9142                               uint32_t access_mask,
9143                               uint32_t share_access,
9144                               uint32_t create_disposition,
9145                               uint32_t create_options,
9146                               uint32_t file_attributes,
9147                               uint32_t oplock_request,
9148                               SMB_BIG_UINT allocation_size,
9149                               struct security_descriptor *sd,
9150                               struct ea_list *ea_list,
9151
9152                               files_struct **result,
9153                               int *pinfo,
9154                               SMB_STRUCT_STAT *psbuf);
9155 NTSTATUS create_file(connection_struct *conn,
9156                      struct smb_request *req,
9157                      uint16_t root_dir_fid,
9158                      const char *fname,
9159                      uint32_t access_mask,
9160                      uint32_t share_access,
9161                      uint32_t create_disposition,
9162                      uint32_t create_options,
9163                      uint32_t file_attributes,
9164                      uint32_t oplock_request,
9165                      SMB_BIG_UINT allocation_size,
9166                      struct security_descriptor *sd,
9167                      struct ea_list *ea_list,
9168
9169                      files_struct **result,
9170                      int *pinfo,
9171                      SMB_STRUCT_STAT *psbuf);
9172
9173 /* The following definitions come from smbd/oplock.c  */
9174
9175 int32 get_number_of_exclusive_open_oplocks(void);
9176 bool oplock_message_waiting(fd_set *fds);
9177 void process_kernel_oplocks(struct messaging_context *msg_ctx, fd_set *pfds);
9178 bool set_file_oplock(files_struct *fsp, int oplock_type);
9179 void release_file_oplock(files_struct *fsp);
9180 bool remove_oplock(files_struct *fsp);
9181 bool downgrade_oplock(files_struct *fsp);
9182 int oplock_notify_fd(void);
9183 void reply_to_oplock_break_requests(files_struct *fsp);
9184 void release_level_2_oplocks_on_change(files_struct *fsp);
9185 void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
9186 void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
9187 bool init_oplocks(struct messaging_context *msg_ctx);
9188
9189 /* The following definitions come from smbd/oplock_irix.c  */
9190
9191 struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
9192
9193 /* The following definitions come from smbd/oplock_linux.c  */
9194
9195 void linux_set_lease_capability(void);
9196 int linux_set_lease_sighandler(int fd);
9197 int linux_setlease(int fd, int leasetype);
9198 struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
9199
9200 /* The following definitions come from smbd/password.c  */
9201
9202 user_struct *get_valid_user_struct(uint16 vuid);
9203 bool is_partial_auth_vuid(uint16 vuid);
9204 user_struct *get_partial_auth_user_struct(uint16 vuid);
9205 void invalidate_vuid(uint16 vuid);
9206 void invalidate_all_vuids(void);
9207 int register_initial_vuid(void);
9208 int register_existing_vuid(uint16 vuid,
9209                         auth_serversupplied_info *server_info,
9210                         DATA_BLOB response_blob,
9211                         const char *smb_name);
9212 void add_session_user(const char *user);
9213 void add_session_workgroup(const char *workgroup);
9214 const char *get_session_workgroup(void);
9215 bool user_in_netgroup(const char *user, const char *ngname);
9216 bool user_in_list(const char *user,const char **list);
9217 bool authorise_login(int snum, fstring user, DATA_BLOB password,
9218                      bool *guest);
9219
9220 /* The following definitions come from smbd/pipes.c  */
9221
9222 void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req);
9223 void reply_pipe_write(struct smb_request *req);
9224 void reply_pipe_write_and_X(struct smb_request *req);
9225 void reply_pipe_read_and_X(struct smb_request *req);
9226 void reply_pipe_close(connection_struct *conn, struct smb_request *req);
9227
9228 /* The following definitions come from smbd/posix_acls.c  */
9229
9230 void create_file_sids(const SMB_STRUCT_STAT *psbuf, DOM_SID *powner_sid, DOM_SID *pgroup_sid);
9231 NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, const SEC_DESC *psd);
9232 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
9233 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
9234                            SEC_DESC **ppdesc);
9235 NTSTATUS posix_get_nt_acl(struct connection_struct *conn, const char *name,
9236                           uint32_t security_info, SEC_DESC **ppdesc);
9237 int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid);
9238 NTSTATUS append_parent_acl(files_struct *fsp,
9239                                 const SEC_DESC *pcsd,
9240                                 SEC_DESC **pp_new_sd);
9241 NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, const SEC_DESC *psd);
9242 int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode );
9243 int chmod_acl(connection_struct *conn, const char *name, mode_t mode);
9244 int inherit_access_posix_acl(connection_struct *conn, const char *inherit_from_dir,
9245                        const char *name, mode_t mode);
9246 int fchmod_acl(files_struct *fsp, mode_t mode);
9247 bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf,
9248                                 uint16 num_def_acls, const char *pdata);
9249 bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata);
9250 SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname);
9251
9252 /* The following definitions come from smbd/process.c  */
9253
9254 bool srv_send_smb(int fd, char *buffer, bool do_encrypt);
9255 int srv_set_message(char *buf,
9256                         int num_words,
9257                         int num_bytes,
9258                         bool zero);
9259 void init_smb_request(struct smb_request *req,
9260                         const uint8 *inbuf,
9261                         size_t unread_bytes,
9262                         bool encrypted);
9263 void remove_deferred_open_smb_message(uint16 mid);
9264 void schedule_deferred_open_smb_message(uint16 mid);
9265 bool open_was_deferred(uint16 mid);
9266 struct pending_message_list *get_open_deferred_message(uint16 mid);
9267 bool push_deferred_smb_message(struct smb_request *req,
9268                                struct timeval request_time,
9269                                struct timeval timeout,
9270                                char *private_data, size_t priv_len);
9271 struct idle_event *event_add_idle(struct event_context *event_ctx,
9272                                   TALLOC_CTX *mem_ctx,
9273                                   struct timeval interval,
9274                                   const char *name,
9275                                   bool (*handler)(const struct timeval *now,
9276                                                   void *private_data),
9277                                   void *private_data);
9278 NTSTATUS allow_new_trans(struct trans_state *list, int mid);
9279 void respond_to_all_remaining_local_messages(void);
9280 bool create_outbuf(TALLOC_CTX *mem_ctx, const char *inbuf, char **outbuf,
9281                    uint8_t num_words, uint32_t num_bytes);
9282 void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
9283 const char *smb_fn_name(int type);
9284 void add_to_common_flags2(uint32 v);
9285 void remove_from_common_flags2(uint32 v);
9286 void construct_reply_common(const char *inbuf, char *outbuf);
9287 void chain_reply(struct smb_request *req);
9288 void check_reload(time_t t);
9289 void smbd_process(void);
9290
9291 /* The following definitions come from smbd/quotas.c  */
9292
9293 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9294 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9295 bool disk_quotas(const char *path,
9296                 SMB_BIG_UINT *bsize,
9297                 SMB_BIG_UINT *dfree,
9298                 SMB_BIG_UINT *dsize);
9299 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9300 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9301 bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9302 bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
9303 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
9304 bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
9305
9306 /* The following definitions come from smbd/reply.c  */
9307
9308 NTSTATUS check_path_syntax(char *path);
9309 NTSTATUS check_path_syntax_wcard(char *path, bool *p_contains_wcard);
9310 NTSTATUS check_path_syntax_posix(char *path);
9311 size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
9312                         const char *inbuf,
9313                         uint16 smb_flags2,
9314                         char **pp_dest,
9315                         const char *src,
9316                         size_t src_len,
9317                         int flags,
9318                         NTSTATUS *err,
9319                         bool *contains_wcard);
9320 size_t srvstr_get_path(TALLOC_CTX *ctx,
9321                         const char *inbuf,
9322                         uint16 smb_flags2,
9323                         char **pp_dest,
9324                         const char *src,
9325                         size_t src_len,
9326                         int flags,
9327                         NTSTATUS *err);
9328 bool check_fsp_open(connection_struct *conn, struct smb_request *req,
9329                     files_struct *fsp);
9330 bool check_fsp(connection_struct *conn, struct smb_request *req,
9331                files_struct *fsp);
9332 bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
9333                               files_struct *fsp);
9334 bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
9335                       files_struct *fsp);
9336 void reply_special(char *inbuf);
9337 void reply_tcon(struct smb_request *req);
9338 void reply_tcon_and_X(struct smb_request *req);
9339 void reply_unknown_new(struct smb_request *req, uint8 type);
9340 void reply_ioctl(struct smb_request *req);
9341 void reply_checkpath(struct smb_request *req);
9342 void reply_getatr(struct smb_request *req);
9343 void reply_setatr(struct smb_request *req);
9344 void reply_dskattr(struct smb_request *req);
9345 void reply_search(struct smb_request *req);
9346 void reply_fclose(struct smb_request *req);
9347 void reply_open(struct smb_request *req);
9348 void reply_open_and_X(struct smb_request *req);
9349 void reply_ulogoffX(struct smb_request *req);
9350 void reply_mknew(struct smb_request *req);
9351 void reply_ctemp(struct smb_request *req);
9352 NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
9353                           uint32 dirtype, const char *name_in, bool has_wild);
9354 void reply_unlink(struct smb_request *req);
9355 void send_file_readbraw(connection_struct *conn,
9356                         files_struct *fsp,
9357                         SMB_OFF_T startpos,
9358                         size_t nread,
9359                         ssize_t mincount);
9360 void reply_readbraw(struct smb_request *req);
9361 void reply_lockread(struct smb_request *req);
9362 void reply_read(struct smb_request *req);
9363 void reply_read_and_X(struct smb_request *req);
9364 void error_to_writebrawerr(struct smb_request *req);
9365 void reply_writebraw(struct smb_request *req);
9366 void reply_writeunlock(struct smb_request *req);
9367 void reply_write(struct smb_request *req);
9368 bool is_valid_writeX_buffer(const uint8_t *inbuf);
9369 void reply_write_and_X(struct smb_request *req);
9370 void reply_lseek(struct smb_request *req);
9371 void reply_flush(struct smb_request *req);
9372 void reply_exit(struct smb_request *req);
9373 void reply_close(struct smb_request *req);
9374 void reply_writeclose(struct smb_request *req);
9375 void reply_lock(struct smb_request *req);
9376 void reply_unlock(struct smb_request *req);
9377 void reply_tdis(struct smb_request *req);
9378 void reply_echo(struct smb_request *req);
9379 void reply_printopen(struct smb_request *req);
9380 void reply_printclose(struct smb_request *req);
9381 void reply_printqueue(struct smb_request *req);
9382 void reply_printwrite(struct smb_request *req);
9383 void reply_mkdir(struct smb_request *req);
9384 NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
9385                         connection_struct *conn,
9386                         const char *directory);
9387 void reply_rmdir(struct smb_request *req);
9388 NTSTATUS rename_internals_fsp(connection_struct *conn,
9389                         files_struct *fsp,
9390                         char *newname,
9391                         const char *newname_last_component,
9392                         uint32 attrs,
9393                         bool replace_if_exists);
9394 NTSTATUS rename_internals(TALLOC_CTX *ctx,
9395                         connection_struct *conn,
9396                         struct smb_request *req,
9397                         const char *name_in,
9398                         const char *newname_in,
9399                         uint32 attrs,
9400                         bool replace_if_exists,
9401                         bool src_has_wild,
9402                         bool dest_has_wild,
9403                         uint32_t access_mask);
9404 void reply_mv(struct smb_request *req);
9405 NTSTATUS copy_file(TALLOC_CTX *ctx,
9406                         connection_struct *conn,
9407                         const char *src,
9408                         const char *dest1,
9409                         int ofun,
9410                         int count,
9411                         bool target_is_directory);
9412 void reply_copy(struct smb_request *req);
9413 uint32 get_lock_pid( char *data, int data_offset, bool large_file_format);
9414 SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format);
9415 SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err);
9416 void reply_lockingX(struct smb_request *req);
9417 void reply_readbmpx(struct smb_request *req);
9418 void reply_readbs(struct smb_request *req);
9419 void reply_setattrE(struct smb_request *req);
9420 void reply_writebmpx(struct smb_request *req);
9421 void reply_writebs(struct smb_request *req);
9422 void reply_getattrE(struct smb_request *req);
9423
9424 /* The following definitions come from smbd/seal.c  */
9425
9426 uint16_t srv_enc_ctx(void);
9427 bool is_encrypted_packet(const uint8_t *inbuf);
9428 void srv_free_enc_buffer(char *buf);
9429 NTSTATUS srv_decrypt_buffer(char *buf);
9430 NTSTATUS srv_encrypt_buffer(char *buf, char **buf_out);
9431 NTSTATUS srv_request_encryption_setup(connection_struct *conn,
9432                                         unsigned char **ppdata,
9433                                         size_t *p_data_size,
9434                                         unsigned char **pparam,
9435                                         size_t *p_param_size);
9436 NTSTATUS srv_encryption_start(connection_struct *conn);
9437 void server_encryption_shutdown(void);
9438
9439 /* The following definitions come from smbd/sec_ctx.c  */
9440
9441 bool unix_token_equal(const UNIX_USER_TOKEN *t1, const UNIX_USER_TOKEN *t2);
9442 bool push_sec_ctx(void);
9443 void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN *token);
9444 void set_root_sec_ctx(void);
9445 bool pop_sec_ctx(void);
9446 void init_sec_ctx(void);
9447
9448 /* The following definitions come from smbd/server.c  */
9449
9450 int smbd_server_fd(void);
9451 int get_client_fd(void);
9452 struct event_context *smbd_event_context(void);
9453 struct messaging_context *smbd_messaging_context(void);
9454 struct memcache *smbd_memcache(void);
9455 void reload_printers(void);
9456 bool reload_services(bool test);
9457 void exit_server(const char *const explanation);
9458 void exit_server_cleanly(const char *const explanation);
9459 void exit_server_fault(void);
9460
9461 /* The following definitions come from smbd/service.c  */
9462
9463 bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
9464 bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
9465 void load_registry_shares(void);
9466 int add_home_service(const char *service, const char *username, const char *homedir);
9467 int find_service(fstring service);
9468 connection_struct *make_connection_with_chdir(const char *service_in,
9469                                               DATA_BLOB password, 
9470                                               const char *dev, uint16 vuid,
9471                                               NTSTATUS *status);
9472 connection_struct *make_connection(const char *service_in, DATA_BLOB password, 
9473                                    const char *pdev, uint16 vuid,
9474                                    NTSTATUS *status);
9475 void close_cnum(connection_struct *conn, uint16 vuid);
9476
9477 /* The following definitions come from smbd/session.c  */
9478
9479 bool session_init(void);
9480 bool session_claim(user_struct *vuser);
9481 void session_yield(user_struct *vuser);
9482 int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
9483
9484 /* The following definitions come from smbd/sesssetup.c  */
9485
9486 NTSTATUS parse_spnego_mechanisms(DATA_BLOB blob_in,
9487                 DATA_BLOB *pblob_out,
9488                 char **kerb_mechOID);
9489 void reply_sesssetup_and_X(struct smb_request *req);
9490
9491 /* The following definitions come from smbd/share_access.c  */
9492
9493 bool token_contains_name_in_list(const char *username,
9494                                  const char *domain,
9495                                  const char *sharename,
9496                                  const struct nt_user_token *token,
9497                                  const char **list);
9498 bool user_ok_token(const char *username, const char *domain,
9499                    const struct nt_user_token *token, int snum);
9500 bool is_share_read_only_for_token(const char *username,
9501                                   const char *domain,
9502                                   const struct nt_user_token *token,
9503                                   connection_struct *conn);
9504
9505 /* The following definitions come from smbd/srvstr.c  */
9506
9507 size_t srvstr_push_fn(const char *function, unsigned int line,
9508                       const char *base_ptr, uint16 smb_flags2, void *dest,
9509                       const char *src, int dest_len, int flags);
9510 ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);
9511
9512 /* The following definitions come from smbd/statcache.c  */
9513
9514 void stat_cache_add( const char *full_orig_name,
9515                 char *translated_path,
9516                 bool case_sensitive);
9517 bool stat_cache_lookup(connection_struct *conn,
9518                         char **pp_name,
9519                         char **pp_dirpath,
9520                         char **pp_start,
9521                         SMB_STRUCT_STAT *pst);
9522 void send_stat_cache_delete_message(const char *name);
9523 void stat_cache_delete(const char *name);
9524 unsigned int fast_string_hash(TDB_DATA *key);
9525 bool reset_stat_cache( void );
9526
9527 /* The following definitions come from smbd/statvfs.c  */
9528
9529 int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
9530
9531 /* The following definitions come from smbd/trans2.c  */
9532
9533 SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val);
9534 SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
9535 NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
9536                       files_struct *fsp, const char *fname,
9537                       const char *ea_name, struct ea_struct *pea);
9538 NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
9539                                 files_struct *fsp, const char *fname,
9540                                 char ***pnames, size_t *pnum_names);
9541 NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, struct ea_list *ea_list);
9542 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used);
9543 void send_trans2_replies(connection_struct *conn,
9544                         struct smb_request *req,
9545                          const char *params,
9546                          int paramsize,
9547                          const char *pdata,
9548                          int datasize,
9549                          int max_data_bytes);
9550 unsigned char *create_volume_objectid(connection_struct *conn, unsigned char objid[16]);
9551 NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
9552                 connection_struct *conn,
9553                 const char *oldname_in,
9554                 const char *newname_in);
9555 NTSTATUS smb_set_file_time(connection_struct *conn,
9556                            files_struct *fsp,
9557                            const char *fname,
9558                            const SMB_STRUCT_STAT *psbuf,
9559                            struct timespec ts[2],
9560                            bool setting_write_time);
9561 void reply_findclose(struct smb_request *req);
9562 void reply_findnclose(struct smb_request *req);
9563 void reply_trans2(struct smb_request *req);
9564 void reply_transs2(struct smb_request *req);
9565
9566 /* The following definitions come from smbd/uid.c  */
9567
9568 bool change_to_guest(void);
9569 void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
9570 bool change_to_user(connection_struct *conn, uint16 vuid);
9571 bool change_to_root_user(void);
9572 bool become_authenticated_pipe_user(pipes_struct *p);
9573 bool unbecome_authenticated_pipe_user(void);
9574 void become_root(void);
9575 void unbecome_root(void);
9576 bool become_user(connection_struct *conn, uint16 vuid);
9577 bool unbecome_user(void);
9578
9579 /* The following definitions come from smbd/utmp.c  */
9580
9581 void sys_utmp_claim(const char *username, const char *hostname,
9582                         const char *ip_addr_str,
9583                         const char *id_str, int id_num);
9584 void sys_utmp_yield(const char *username, const char *hostname,
9585                         const char *ip_addr_str,
9586                         const char *id_str, int id_num);
9587 void sys_utmp_yield(const char *username, const char *hostname,
9588                         const char *ip_addr_str,
9589                         const char *id_str, int id_num);
9590 void sys_utmp_claim(const char *username, const char *hostname,
9591                         const char *ip_addr_str,
9592                         const char *id_str, int id_num);
9593
9594 /* The following definitions come from smbd/vfs.c  */
9595
9596 NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs_op_tuples);
9597 bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
9598 void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, size_t ext_size);
9599 void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
9600 void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
9601 void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
9602 bool smbd_vfs_init(connection_struct *conn);
9603 bool vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
9604 bool vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf);
9605 bool vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
9606 ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
9607 ssize_t vfs_pread_data(files_struct *fsp, char *buf,
9608                 size_t byte_count, SMB_OFF_T offset);
9609 ssize_t vfs_write_data(struct smb_request *req,
9610                         files_struct *fsp,
9611                         const char *buffer,
9612                         size_t N);
9613 ssize_t vfs_pwrite_data(struct smb_request *req,
9614                         files_struct *fsp,
9615                         const char *buffer,
9616                         size_t N,
9617                         SMB_OFF_T offset);
9618 int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
9619 int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
9620 int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len);
9621 SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
9622 char *vfs_readdirname(connection_struct *conn, void *p);
9623 int vfs_ChDir(connection_struct *conn, const char *path);
9624 char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn);
9625 NTSTATUS check_reduced_name(connection_struct *conn, const char *fname);
9626
9627 /* The following definitions come from torture/denytest.c  */
9628
9629 bool torture_denytest1(int dummy);
9630 bool torture_denytest2(int dummy);
9631
9632 /* The following definitions come from torture/mangle_test.c  */
9633
9634 bool torture_mangle(int dummy);
9635
9636 /* The following definitions come from torture/nbio.c  */
9637
9638 double nbio_total(void);
9639 void nb_alarm(int ignore);
9640 void nbio_shmem(int n);
9641 void nb_setup(struct cli_state *cli);
9642 void nb_unlink(const char *fname);
9643 void nb_createx(const char *fname, 
9644                 unsigned create_options, unsigned create_disposition, int handle);
9645 void nb_writex(int handle, int offset, int size, int ret_size);
9646 void nb_readx(int handle, int offset, int size, int ret_size);
9647 void nb_close(int handle);
9648 void nb_rmdir(const char *fname);
9649 void nb_rename(const char *oldname, const char *newname);
9650 void nb_qpathinfo(const char *fname);
9651 void nb_qfileinfo(int fnum);
9652 void nb_qfsinfo(int level);
9653 void nb_findfirst(const char *mask);
9654 void nb_flush(int fnum);
9655 void nb_deltree(const char *dname);
9656 void nb_cleanup(void);
9657
9658 /* The following definitions come from torture/scanner.c  */
9659
9660 bool torture_trans2_scan(int dummy);
9661 bool torture_nttrans_scan(int dummy);
9662
9663 /* The following definitions come from torture/torture.c  */
9664
9665 void start_timer(void);
9666 double end_timer(void);
9667 void *shm_setup(int size);
9668 bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
9669                       char **hostname, char **sharename);
9670 void torture_open_connection_free_unclist(char **unc_list);
9671 bool torture_open_connection(struct cli_state **c, int conn_index);
9672 bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid);
9673 bool torture_close_connection(struct cli_state *c);
9674 bool torture_ioctl_test(int dummy);
9675 bool torture_chkpath_test(int dummy);
9676
9677 /* The following definitions come from torture/utable.c  */
9678
9679 bool torture_utable(int dummy);
9680 bool torture_casetable(int dummy);
9681
9682 /* The following definitions come from utils/passwd_util.c  */
9683
9684 char *stdin_new_passwd( void);
9685 char *get_pass( const char *prompt, bool stdin_get);
9686
9687 /* The following definitions come from winbindd/idmap.c  */
9688
9689 bool idmap_is_offline(void);
9690 bool idmap_is_online(void);
9691 NTSTATUS smb_register_idmap(int version, const char *name,
9692                             struct idmap_methods *methods);
9693 NTSTATUS smb_register_idmap_alloc(int version, const char *name,
9694                                   struct idmap_alloc_methods *methods);
9695 void idmap_close(void);
9696 NTSTATUS idmap_init_cache(void);
9697 NTSTATUS idmap_allocate_uid(struct unixid *id);
9698 NTSTATUS idmap_allocate_gid(struct unixid *id);
9699 NTSTATUS idmap_set_uid_hwm(struct unixid *id);
9700 NTSTATUS idmap_set_gid_hwm(struct unixid *id);
9701 NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
9702                                       struct id_map *id);
9703 NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
9704                                       struct id_map *id);
9705 NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
9706                            struct unixid *pxid);
9707 NTSTATUS idmap_set_mapping(const struct id_map *map);
9708 NTSTATUS idmap_remove_mapping(const struct id_map *map);
9709
9710 /* The following definitions come from winbindd/idmap_cache.c  */
9711
9712 bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid,
9713                               bool *expired);
9714 bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired);
9715 void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid);
9716 bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid,
9717                               bool *expired);
9718 bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired);
9719 void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid);
9720
9721
9722 /* The following definitions come from winbindd/idmap_nss.c  */
9723
9724 NTSTATUS idmap_nss_init(void);
9725
9726 /* The following definitions come from winbindd/idmap_passdb.c  */
9727
9728 NTSTATUS idmap_passdb_init(void);
9729
9730 /* The following definitions come from winbindd/idmap_tdb.c  */
9731
9732 bool idmap_tdb_tdb_close(TDB_CONTEXT *tdbctx);
9733 NTSTATUS idmap_alloc_tdb_init(void);
9734 NTSTATUS idmap_tdb_init(void);
9735
9736 /* The following definitions come from winbindd/idmap_util.c  */
9737
9738 NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid);
9739 NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid);
9740 NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID *sid, uid_t *uid);
9741 NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid);
9742
9743 /* The following definitions come from winbindd/nss_info.c  */
9744
9745
9746 /* The following definitions come from winbindd/nss_info_template.c  */
9747
9748 NTSTATUS nss_info_template_init( void );
9749
9750 #endif /*  _PROTO_H_  */