pipes.c:
[samba.git] / source3 / include / proto.h
1 /* This file is automatically generated with "make proto". DO NOT EDIT */
2
3
4 /*The following definitions come from  access.c  */
5
6 BOOL check_access(int snum);
7 BOOL allow_access(char *deny_list,char *allow_list,char *cname,char *caddr);
8
9 /*The following definitions come from  charcnv.c  */
10
11 char *unix2dos_format(char *str,BOOL overwrite);
12 char *dos2unix_format(char *str, BOOL overwrite);
13 int interpret_character_set(char *str, int def);
14
15 /*The following definitions come from  charset.c  */
16
17 void charset_initialise();
18 void codepage_initialise(int client_codepage);
19 void add_char_string(char *s);
20
21 /*The following definitions come from  chgpasswd.c  */
22
23 BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence);
24 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
25 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
26
27 /*The following definitions come from  client.c  */
28
29 void setup_pkt(char *outbuf);
30 void do_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(),BOOL recurse_dir);
31 void cmd_help(void);
32 BOOL reopen_connection(char *inbuf,char *outbuf);
33 char *smb_errstr(char *inbuf);
34
35 /*The following definitions come from  clientutil.c  */
36
37 void cli_setup_pkt(char *outbuf);
38 BOOL cli_receive_trans_response(char *inbuf,int trans,int *data_len,
39                                 int *param_len, char **data,char **param);
40 BOOL cli_send_session_request(char *inbuf, char *outbuf);
41 BOOL cli_send_login(char *inbuf, char *outbuf, BOOL start_session, BOOL use_setup);
42 void cli_send_logout(void);
43 BOOL cli_call_api(int prcnt,int drcnt,int mprcnt,int mdrcnt,int *rprcnt,
44               int *rdrcnt, char *param,char *data, char **rparam,char **rdata);
45 BOOL cli_send_trans_request(char *outbuf, int trans, char *name, int fid, int flags,
46                         char *data,char *param,uint16 *setup, int ldata,int lparam,
47                         int lsetup,int mdata,int mparam,int msetup);
48 BOOL cli_open_sockets(int port);
49 BOOL cli_reopen_connection(char *inbuf,char *outbuf);
50 char *smb_errstr(char *inbuf);
51
52 /*The following definitions come from  clitar.c  */
53
54 int padit(char *buf, int bufsize, int padsize);
55 void cmd_block(void);
56 void cmd_tarmode(void);
57 void cmd_setmode(void);
58 void cmd_tar(char *inbuf, char *outbuf);
59 int process_tar(char *inbuf, char *outbuf);
60 int clipfind(char **aret, int ret, char *tok);
61 int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind);
62
63 /*The following definitions come from  dir.c  */
64
65 void init_dptrs(void);
66 char *dptr_path(int key);
67 char *dptr_wcard(int key);
68 BOOL dptr_set_wcard(int key, char *wcard);
69 BOOL dptr_set_attr(int key, uint16 attr);
70 uint16 dptr_attr(int key);
71 void dptr_close(int key);
72 void dptr_closecnum(int cnum);
73 void dptr_idlecnum(int cnum);
74 void dptr_closepath(char *path,int pid);
75 int dptr_create(int cnum,char *path, BOOL expect_close,int pid);
76 BOOL dptr_fill(char *buf1,unsigned int key);
77 BOOL dptr_zero(char *buf);
78 void *dptr_fetch(char *buf,int *num);
79 void *dptr_fetch_lanman2(char *params,int dptr_num);
80 BOOL dir_check_ftype(int cnum,int mode,struct stat *st,int dirtype);
81 BOOL get_dir_entry(int cnum,char *mask,int dirtype,char *fname,int *size,int *mode,time_t *date,BOOL check_descend);
82 void *OpenDir(int cnum, char *name, BOOL use_veto);
83 void CloseDir(void *p);
84 char *ReadDirName(void *p);
85 BOOL SeekDir(void *p,int pos);
86 int TellDir(void *p);
87 void DirCacheAdd(char *path,char *name,char *dname,int snum);
88 char *DirCacheCheck(char *path,char *name,int snum);
89 void DirCacheFlush(int snum);
90
91 /*The following definitions come from  fault.c  */
92
93 void fault_setup(void (*fn)());
94
95 /*The following definitions come from  getsmbpass.c  */
96
97 char *getsmbpass(char *prompt)    ;
98
99 /*The following definitions come from  interface.c  */
100
101 void load_interfaces(void);
102 void iface_set_default(char *ip,char *bcast,char *nmask);
103 BOOL ismyip(struct in_addr ip);
104 BOOL ismybcast(struct in_addr bcast);
105 int iface_count(void);
106 struct in_addr *iface_n_ip(int n);
107 struct in_addr *iface_bcast(struct in_addr ip);
108 struct in_addr *iface_nmask(struct in_addr ip);
109 struct in_addr *iface_ip(struct in_addr ip);
110
111 /*The following definitions come from  ipc.c  */
112
113 int reply_trans(char *inbuf,char *outbuf);
114
115 /*The following definitions come from  kanji.c  */
116
117 char *sj_strtok(char *s1, char *s2);
118 char *sj_strstr(char *s1, char *s2);
119 char *sj_strchr (char *s, int c);
120 char *sj_strrchr(char *s, int c);
121 int interpret_coding_system(char *str, int def);
122
123 /*The following definitions come from  loadparm.c  */
124
125 char *lp_string(char *s);
126 char *lp_logfile(void);
127 char *lp_smbrun(void);
128 char *lp_configfile(void);
129 char *lp_smb_passwd_file(void);
130 char *lp_serverstring(void);
131 char *lp_printcapname(void);
132 char *lp_lockdir(void);
133 char *lp_rootdir(void);
134 char *lp_defaultservice(void);
135 char *lp_msg_command(void);
136 char *lp_dfree_command(void);
137 char *lp_hosts_equiv(void);
138 char *lp_auto_services(void);
139 char *lp_passwd_program(void);
140 char *lp_passwd_chat(void);
141 char *lp_passwordserver(void);
142 char *lp_workgroup(void);
143 char *lp_domain_controller(void);
144 char *lp_username_map(void);
145 char *lp_character_set(void);
146 char *lp_logon_script(void);
147 char *lp_logon_path(void);
148 char *lp_remote_announce(void);
149 char *lp_wins_server(void);
150 char *lp_interfaces(void);
151 char *lp_socket_address(void);
152 char *lp_nis_home_map_name(void);
153 char *lp_announce_version(void);
154 char *lp_netbios_aliases(void);
155 BOOL lp_dns_proxy(void);
156 BOOL lp_wins_support(void);
157 BOOL lp_wins_proxy(void);
158 BOOL lp_local_master(void);
159 BOOL lp_domain_master(void);
160 BOOL lp_domain_logons(void);
161 BOOL lp_preferred_master(void);
162 BOOL lp_load_printers(void);
163 BOOL lp_use_rhosts(void);
164 BOOL lp_getwdcache(void);
165 BOOL lp_readprediction(void);
166 BOOL lp_readbmpx(void);
167 BOOL lp_readraw(void);
168 BOOL lp_writeraw(void);
169 BOOL lp_null_passwords(void);
170 BOOL lp_strip_dot(void);
171 BOOL lp_encrypted_passwords(void);
172 BOOL lp_syslog_only(void);
173 BOOL lp_browse_list(void);
174 BOOL lp_unix_realname(void);
175 BOOL lp_nis_home_map(void);
176 BOOL lp_time_server(void);
177 int lp_os_level(void);
178 int lp_max_ttl(void);
179 int lp_max_log_size(void);
180 int lp_mangledstack(void);
181 int lp_maxxmit(void);
182 int lp_maxmux(void);
183 int lp_maxpacket(void);
184 int lp_keepalive(void);
185 int lp_passwordlevel(void);
186 int lp_usernamelevel(void);
187 int lp_readsize(void);
188 int lp_shmem_size(void);
189 int lp_shmem_hash_size(void);
190 int lp_deadtime(void);
191 int lp_maxprotocol(void);
192 int lp_security(void);
193 int lp_printing(void);
194 int lp_maxdisksize(void);
195 int lp_lpqcachetime(void);
196 int lp_syslog(void);
197 int lp_client_code_page(void);
198 int lp_announce_as(void);
199 char *lp_preexec(int );
200 char *lp_postexec(int );
201 char *lp_rootpreexec(int );
202 char *lp_rootpostexec(int );
203 char *lp_servicename(int );
204 char *lp_pathname(int );
205 char *lp_dontdescend(int );
206 char *lp_username(int );
207 char *lp_guestaccount(int );
208 char *lp_invalid_users(int );
209 char *lp_valid_users(int );
210 char *lp_admin_users(int );
211 char *lp_printcommand(int );
212 char *lp_lpqcommand(int );
213 char *lp_lprmcommand(int );
214 char *lp_lppausecommand(int );
215 char *lp_lpresumecommand(int );
216 char *lp_printername(int );
217 char *lp_printerdriver(int );
218 char *lp_hostsallow(int );
219 char *lp_hostsdeny(int );
220 char *lp_magicscript(int );
221 char *lp_magicoutput(int );
222 char *lp_comment(int );
223 char *lp_force_user(int );
224 char *lp_force_group(int );
225 char *lp_readlist(int );
226 char *lp_writelist(int );
227 char *lp_volume(int );
228 char *lp_mangled_map(int );
229 char *lp_veto_files(int );
230 char *lp_hide_files(int );
231 BOOL lp_alternate_permissions(int );
232 BOOL lp_revalidate(int );
233 BOOL lp_casesensitive(int );
234 BOOL lp_preservecase(int );
235 BOOL lp_shortpreservecase(int );
236 BOOL lp_casemangle(int );
237 BOOL lp_status(int );
238 BOOL lp_hide_dot_files(int );
239 BOOL lp_browseable(int );
240 BOOL lp_readonly(int );
241 BOOL lp_no_set_dir(int );
242 BOOL lp_guest_ok(int );
243 BOOL lp_guest_only(int );
244 BOOL lp_print_ok(int );
245 BOOL lp_postscript(int );
246 BOOL lp_map_hidden(int );
247 BOOL lp_map_archive(int );
248 BOOL lp_locking(int );
249 BOOL lp_strict_locking(int );
250 BOOL lp_share_modes(int );
251 BOOL lp_oplocks(int );
252 BOOL lp_onlyuser(int );
253 BOOL lp_manglednames(int );
254 BOOL lp_widelinks(int );
255 BOOL lp_symlinks(int );
256 BOOL lp_syncalways(int );
257 BOOL lp_map_system(int );
258 BOOL lp_delete_readonly(int );
259 BOOL lp_fake_oplocks(int );
260 BOOL lp_recursive_veto_delete(int );
261 int lp_create_mode(int );
262 int lp_force_create_mode(int );
263 int lp_dir_mode(int );
264 int lp_force_dir_mode(int );
265 int lp_max_connections(int );
266 int lp_defaultcase(int );
267 int lp_minprintspace(int );
268 char lp_magicchar(int );
269 BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir);
270 int lp_add_service(char *pszService, int iDefaultService);
271 BOOL lp_add_printer(char *pszPrintername, int iDefaultService);
272 BOOL lp_file_list_changed(void);
273 BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue);
274 int lp_next_parameter(int snum, int *i, char *label, 
275                            char *value, int allparameters);
276 BOOL lp_snum_ok(int iService);
277 BOOL lp_loaded(void);
278 void lp_killunused(BOOL (*snumused)(int ));
279 BOOL lp_load(char *pszFname,BOOL global_only);
280 int lp_numservices(void);
281 void lp_dump(FILE *f);
282 int lp_servicenumber(char *pszServiceName);
283 char *volume_label(int snum);
284 void lp_rename_service(int snum, char *new_name);
285 void lp_remove_service(int snum);
286 void lp_copy_service(int snum, char *new_name);
287 int lp_default_server_announce(void);
288 int lp_major_announce_version(void);
289 int lp_minor_announce_version(void);
290
291 /*The following definitions come from  locking.c  */
292
293 BOOL is_locked(int fnum,int cnum,uint32 count,uint32 offset);
294 BOOL do_lock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
295 BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
296 BOOL start_share_mode_mgmt(void);
297 BOOL stop_share_mode_mgmt(void);
298 BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *ptok);
299 BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token token);
300 int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode, 
301                     min_share_mode_entry **old_shares);
302 void del_share_mode(share_lock_token token, int fnum);
303 BOOL set_share_mode(share_lock_token token, int fnum, uint16 port, uint16 op_type);
304 BOOL remove_share_oplock(int fnum, share_lock_token token);
305 BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *ptok);
306 BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token token);
307 int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode, 
308                     min_share_mode_entry **old_shares);
309 void del_share_mode(share_lock_token token, int fnum);
310 BOOL set_share_mode(share_lock_token token,int fnum, uint16 port, uint16 op_type);
311 BOOL remove_share_oplock(int fnum, share_lock_token token);
312
313 /*The following definitions come from  lsaparse.c  */
314
315 char* lsa_io_r_open_pol(BOOL io, LSA_R_OPEN_POL *r_p, char *q, char *base, int align);
316 char* lsa_io_q_query(BOOL io, LSA_Q_QUERY_INFO *q_q, char *q, char *base, int align);
317 char* lsa_io_r_query(BOOL io, LSA_R_QUERY_INFO *r_q, char *q, char *base, int align);
318 char* lsa_io_q_lookup_sids(BOOL io, LSA_Q_LOOKUP_SIDS *q_s, char *q, char *base, int align);
319 char* lsa_io_r_lookup_sids(BOOL io, LSA_R_LOOKUP_SIDS *r_s, char *q, char *base, int align);
320 char* lsa_io_q_lookup_rids(BOOL io, LSA_Q_LOOKUP_RIDS *q_r, char *q, char *base, int align);
321 char* lsa_io_r_lookup_rids(BOOL io, LSA_R_LOOKUP_RIDS *r_r, char *q, char *base, int align);
322 char* lsa_io_q_req_chal(BOOL io, LSA_Q_REQ_CHAL *q_c, char *q, char *base, int align);
323 char* lsa_io_r_req_chal(BOOL io, LSA_R_REQ_CHAL *r_c, char *q, char *base, int align);
324 char* lsa_io_q_auth2(BOOL io, LSA_Q_AUTH_2 *q_a, char *q, char *base, int align);
325 char* lsa_io_r_auth_2(BOOL io, LSA_R_AUTH_2 *r_a, char *q, char *base, int align);
326 char* lsa_io_q_srv_pwset(BOOL io, LSA_Q_SRV_PWSET *q_s, char *q, char *base, int align);
327 char* lsa_io_r_srv_pwset(BOOL io, LSA_R_SRV_PWSET *r_s, char *q, char *base, int align);
328 char* lsa_io_user_info(BOOL io, LSA_USER_INFO *usr, char *q, char *base, int align);
329 char* lsa_io_q_sam_logon(BOOL io, LSA_Q_SAM_LOGON *q_l, char *q, char *base, int align);
330 char* lsa_io_r_sam_logon(BOOL io, LSA_R_SAM_LOGON *r_l, char *q, char *base, int align);
331 char* lsa_io_q_sam_logoff(BOOL io, LSA_Q_SAM_LOGOFF *q_l, char *q, char *base, int align);
332 char* lsa_io_r_sam_logoff(BOOL io, LSA_R_SAM_LOGOFF *r_l, char *q, char *base, int align);
333
334 /*The following definitions come from  mangle.c  */
335
336 int str_checksum(char *s);
337 BOOL is_8_3(char *fname, BOOL check_case);
338 void create_mangled_stack(int size);
339 BOOL check_mangled_stack(char *s);
340 BOOL is_mangled(char *s);
341 void mangle_name_83(char *s);
342 BOOL name_map_mangle(char *OutName,BOOL need83,int snum);
343
344 /*The following definitions come from  md4.c  */
345
346 void mdfour(unsigned char *out, unsigned char *in, int n);
347
348 /*The following definitions come from  message.c  */
349
350 int reply_sends(char *inbuf,char *outbuf);
351 int reply_sendstrt(char *inbuf,char *outbuf);
352 int reply_sendtxt(char *inbuf,char *outbuf);
353 int reply_sendend(char *inbuf,char *outbuf);
354
355 /*The following definitions come from  nameannounce.c  */
356
357 void announce_request(struct work_record *work, struct in_addr ip);
358 void do_announce_request(char *info, char *to_name, int announce_type, 
359                          int from,
360                          int to, struct in_addr dest_ip);
361 void sync_server(enum state_type state, char *serv_name, char *work_name, 
362                  int name_type,
363                  struct subnet_record *d,
364                  struct in_addr ip);
365 void do_announce_host(int command,
366                 char *from_name, int from_type, struct in_addr from_ip,
367                 char *to_name  , int to_type  , struct in_addr to_ip,
368                 time_t announce_interval,
369                 char *server_name, int server_type, char *server_comment);
370 void announce_my_servers_removed(void);
371 void announce_server(struct subnet_record *d, struct work_record *work,
372                      char *name, char *comment, time_t ttl, int server_type);
373 void announce_host(time_t t);
374 void reset_announce_timer();
375 void announce_master(time_t t);
376 void announce_remote(time_t t);
377
378 /*The following definitions come from  namebrowse.c  */
379
380 void expire_browse_cache(time_t t);
381 struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
382                                               time_t ttl, struct subnet_record *d,
383                                               struct in_addr ip, BOOL local);
384 void do_browser_lists(time_t t);
385
386 /*The following definitions come from  namedbname.c  */
387
388 void set_samba_nb_type(void);
389 BOOL name_equal(struct nmb_name *n1,struct nmb_name *n2);
390 BOOL ms_browser_name(char *name, int type);
391 void remove_name(struct subnet_record *d, struct name_record *n);
392 struct name_record *find_name(struct name_record *n,
393                         struct nmb_name *name, int search);
394 struct name_record *find_name_search(struct subnet_record **d,
395                         struct nmb_name *name,
396                         int search, struct in_addr ip);
397 void dump_names(void);
398 void load_netbios_names(void);
399 void remove_netbios_name(struct subnet_record *d,
400                         char *name,int type, enum name_source source,
401                          struct in_addr ip);
402 struct name_record *add_netbios_entry(struct subnet_record *d,
403                 char *name, int type, int nb_flags, 
404                 int ttl, enum name_source source, struct in_addr ip,
405                 BOOL new_only,BOOL wins);
406 void expire_names(time_t t);
407 struct name_record *dns_name_search(struct nmb_name *question, int Time);
408
409 /*The following definitions come from  namedbresp.c  */
410
411 void add_response_record(struct subnet_record *d,
412                                 struct response_record *n);
413 void remove_response_record(struct subnet_record *d,
414                                 struct response_record *n);
415 struct response_record *make_response_queue_record(enum state_type state,
416                                 int id,uint16 fd,
417                                 int quest_type, char *name,int type, int nb_flags, time_t ttl,
418                                 int server_type, char *my_name, char *my_comment,
419                                 BOOL bcast,BOOL recurse,
420                                 struct in_addr send_ip, struct in_addr reply_to_ip);
421 struct response_record *find_response_record(struct subnet_record **d,
422                                 uint16 id);
423
424 /*The following definitions come from  namedbserver.c  */
425
426 void remove_old_servers(struct work_record *work, time_t t,
427                                         BOOL remove_all);
428 struct server_record *find_server(struct work_record *work, char *name);
429 struct server_record *add_server_entry(struct subnet_record *d, 
430                                        struct work_record *work,
431                                        char *name,int servertype, 
432                                        int ttl,char *comment,
433                                        BOOL replace);
434 void expire_servers(time_t t);
435
436 /*The following definitions come from  namedbsubnet.c  */
437
438 struct subnet_record *find_subnet(struct in_addr bcast_ip);
439 struct subnet_record *find_req_subnet(struct in_addr ip, BOOL bcast);
440 struct subnet_record *find_subnet_all(struct in_addr bcast_ip);
441 void add_workgroup_to_subnet( struct subnet_record *d, char *group);
442 void add_my_subnets(char *group);
443 void write_browse_list(time_t t);
444
445 /*The following definitions come from  namedbwork.c  */
446
447 struct work_record *remove_workgroup(struct subnet_record *d, 
448                                      struct work_record *work,
449                                          BOOL remove_all_servers);
450 struct work_record *find_workgroupstruct(struct subnet_record *d, 
451                                          fstring name, BOOL add);
452 void dump_workgroups(void);
453
454 /*The following definitions come from  nameelect.c  */
455
456 void check_master_browser(time_t t);
457 void browser_gone(char *work_name, struct in_addr ip);
458 void send_election(struct subnet_record *d, char *group,uint32 criterion,
459                    int timeup,char *name);
460 void name_unregister_work(struct subnet_record *d, char *name, int name_type);
461 void name_register_work(struct subnet_record *d, char *name, int name_type,
462                                 int nb_flags, time_t ttl, struct in_addr ip, BOOL bcast);
463 void become_local_master(struct subnet_record *d, struct work_record *work);
464 void become_domain_master(struct subnet_record *d, struct work_record *work);
465 void become_logon_server(struct subnet_record *d, struct work_record *work);
466 void unbecome_local_master(struct subnet_record *d, struct work_record *work,
467                                 int remove_type);
468 void unbecome_domain_master(struct subnet_record *d, struct work_record *work,
469                                 int remove_type);
470 void unbecome_logon_server(struct subnet_record *d, struct work_record *work,
471                                 int remove_type);
472 void run_elections(time_t t);
473 void process_election(struct packet_struct *p,char *buf);
474 BOOL check_elections(void);
475
476 /*The following definitions come from  namelogon.c  */
477
478 void process_logon_packet(struct packet_struct *p,char *buf,int len);
479
480 /*The following definitions come from  namepacket.c  */
481
482 void debug_browse_data(char *outbuf, int len);
483 void initiate_netbios_packet(uint16 *id,
484                              int fd,int quest_type,char *name,int name_type,
485                              int nb_flags,BOOL bcast,BOOL recurse,
486                              struct in_addr to_ip);
487 void reply_netbios_packet(struct packet_struct *p1,int trn_id,
488                                 int rcode, int rcv_code, int opcode,
489                 BOOL recursion_available,
490                 BOOL recursion_desired,
491                                 struct nmb_name *rr_name,int rr_type,int rr_class,int ttl,
492                                 char *data,int len);
493 void queue_packet(struct packet_struct *packet);
494 void run_packet_queue();
495 void listen_for_packets(BOOL run_election);
496 BOOL send_mailslot_reply(BOOL unique, char *mailslot,int fd,char *buf,int len,char *srcname,
497                          char *dstname,int src_type,int dest_type,
498                          struct in_addr dest_ip,struct in_addr src_ip);
499
500 /*The following definitions come from  namequery.c  */
501
502 BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
503                  struct in_addr to_ip,char *master,char *rname,
504                  void (*fn)());
505 BOOL name_query(int fd,char *name,int name_type, 
506                 BOOL bcast,BOOL recurse,
507                 struct in_addr to_ip, struct in_addr *ip,void (*fn)());
508
509 /*The following definitions come from  nameresp.c  */
510
511 void expire_netbios_response_entries(time_t t);
512 struct response_record *queue_netbios_pkt_wins(
513                                 int fd,int quest_type,enum state_type state,
514                             char *name,int name_type,int nb_flags, time_t ttl,
515                                 int server_type, char *my_name, char *my_comment,
516                                 struct in_addr send_ip, struct in_addr reply_to_ip);
517 struct response_record *queue_netbios_packet(struct subnet_record *d,
518                         int fd,int quest_type,enum state_type state,char *name,
519                         int name_type,int nb_flags, time_t ttl,
520                         int server_type, char *my_name, char *my_comment,
521                         BOOL bcast,BOOL recurse,
522                         struct in_addr send_ip, struct in_addr reply_to_ip);
523
524 /*The following definitions come from  nameserv.c  */
525
526 void remove_name_entry(struct subnet_record *d, char *name,int type);
527 void add_my_name_entry(struct subnet_record *d,char *name,int type,int nb_flags);
528 void add_domain_logon_names(void);
529 void add_domain_master_bcast(void);
530 void add_domain_master_wins(void);
531 void add_domain_names(time_t t);
532 void add_my_names(void);
533 void remove_my_names();
534 void refresh_my_names(time_t t);
535 void query_refresh_names(time_t t);
536
537 /*The following definitions come from  nameservreply.c  */
538
539 void add_name_respond(struct subnet_record *d, int fd, struct in_addr from_ip,
540                                 uint16 response_id,
541                                 struct nmb_name *name,
542                                 int nb_flags, int ttl, struct in_addr register_ip,
543                                 BOOL new_owner, struct in_addr reply_to_ip);
544 void reply_name_release(struct packet_struct *p);
545 void reply_name_reg(struct packet_struct *p);
546 void reply_name_status(struct packet_struct *p);
547 void reply_name_query(struct packet_struct *p);
548
549 /*The following definitions come from  nameservresp.c  */
550
551 void debug_state_type(int state);
552 void response_netbios_packet(struct packet_struct *p);
553
554 /*The following definitions come from  namework.c  */
555
556 void reset_server(char *name, int state, struct in_addr ip);
557 void tell_become_backup(void);
558 BOOL same_context(struct dgram_packet *dgram);
559 void process_browse_packet(struct packet_struct *p,char *buf,int len);
560
561 /*The following definitions come from  nmbd.c  */
562
563 BOOL reload_services(BOOL test);
564
565 /*The following definitions come from  nmblib.c  */
566
567 char *lookup_opcode_name( int opcode );
568 void debug_nmb_packet(struct packet_struct *p);
569 char *namestr(struct nmb_name *n);
570 void free_nmb_packet(struct nmb_packet *nmb);
571 void free_packet(struct packet_struct *packet);
572 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
573 void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope);
574 BOOL send_packet(struct packet_struct *p);
575 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
576
577 /*The following definitions come from  nmblookup.c  */
578
579 int main(int argc,char *argv[]);
580
581 /*The following definitions come from  nmbsync.c  */
582
583 char *getsmbpass(char *pass);
584 void sync_browse_lists(struct subnet_record *d, struct work_record *work,
585                 char *name, int nm_type, struct in_addr ip, BOOL local);
586
587 /*The following definitions come from  params.c  */
588
589 BOOL pm_process( char *FileName,
590                  BOOL (*sfunc)(char *),
591                  BOOL (*pfunc)(char *, char *) );
592
593 /*The following definitions come from  password.c  */
594
595 void generate_next_challenge(char *challenge);
596 BOOL set_challenge(char *challenge);
597 BOOL last_challenge(char *challenge);
598 user_struct *get_valid_user_struct(uint16 vuid);
599 void invalidate_vuid(uint16 vuid);
600 char *validated_username(uint16 vuid);
601 uint16 register_vuid(int uid,int gid, char *name,BOOL guest);
602 void add_session_user(char *user);
603 void dfs_unlogin(void);
604 BOOL password_check(char *password);
605 BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8);
606 BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd);
607 BOOL user_ok(char *user,int snum);
608 BOOL authorise_login(int snum,char *user,char *password, int pwlen, 
609                      BOOL *guest,BOOL *force,uint16 vuid);
610 BOOL check_hosts_equiv(char *user);
611 BOOL server_cryptkey(char *buf);
612 BOOL server_validate(char *buf);
613
614 /*The following definitions come from  pcap.c  */
615
616 BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
617 void pcap_printer_fn(void (*fn)());
618
619 /*The following definitions come from  pipes.c  */
620
621 int reply_open_pipe_and_X(char *inbuf,char *outbuf,int length,int bufsize);
622 BOOL api_LsarpcSNPHS(int cnum,int uid, char *param,char *data,
623                      int mdrcnt,int mprcnt,
624                      char **rdata,char **rparam,
625                      int *rdata_len,int *rparam_len);
626 BOOL api_LsarpcTNP(int cnum,int uid, char *param,char *data,
627                      int mdrcnt,int mprcnt,
628                      char **rdata,char **rparam,
629                      int *rdata_len,int *rparam_len);
630
631 /*The following definitions come from  predict.c  */
632
633 int read_predict(int fd,int offset,char *buf,char **ptr,int num);
634 void do_read_prediction();
635 void invalidate_read_prediction(int fd);
636
637 /*The following definitions come from  printing.c  */
638
639 void lpq_reset(int snum);
640 void print_file(int fnum);
641 int get_printqueue(int snum,int cnum,print_queue_struct **queue,
642                    print_status_struct *status);
643 void del_printqueue(int cnum,int snum,int jobid);
644 void status_printjob(int cnum,int snum,int jobid,int status);
645 int printjob_encode(int snum, int job);
646 void printjob_decode(int jobid, int *snum, int *job);
647
648 /*The following definitions come from  quotas.c  */
649
650 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
651 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
652 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
653 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
654 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
655
656 /*The following definitions come from  replace.c  */
657
658 char *Strstr(char *s, char *p);
659 time_t Mktime(struct tm      *t);
660 int InNetGr(char *group,char *host,char *user,char *dom);
661 void *malloc_wrapped(int size,char *file,int line);
662 void *realloc_wrapped(void *ptr,int size,char *file,int line);
663 void free_wrapped(void *ptr,char *file,int line);
664 void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
665
666 /*The following definitions come from  reply.c  */
667
668 int reply_special(char *inbuf,char *outbuf);
669 int reply_tcon(char *inbuf,char *outbuf);
670 int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize);
671 int reply_unknown(char *inbuf,char *outbuf);
672 int reply_ioctl(char *inbuf,char *outbuf);
673 int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize);
674 int reply_chkpth(char *inbuf,char *outbuf);
675 int reply_getatr(char *inbuf,char *outbuf);
676 int reply_setatr(char *inbuf,char *outbuf);
677 int reply_dskattr(char *inbuf,char *outbuf);
678 int reply_search(char *inbuf,char *outbuf);
679 int reply_fclose(char *inbuf,char *outbuf);
680 int reply_open(char *inbuf,char *outbuf);
681 int reply_open_and_X(char *inbuf,char *outbuf,int length,int bufsize);
682 int reply_ulogoffX(char *inbuf,char *outbuf,int length,int bufsize);
683 int reply_mknew(char *inbuf,char *outbuf);
684 int reply_ctemp(char *inbuf,char *outbuf);
685 int reply_unlink(char *inbuf,char *outbuf);
686 int reply_readbraw(char *inbuf, char *outbuf);
687 int reply_lockread(char *inbuf,char *outbuf);
688 int reply_read(char *inbuf,char *outbuf);
689 int reply_read_and_X(char *inbuf,char *outbuf,int length,int bufsize);
690 int reply_writebraw(char *inbuf,char *outbuf);
691 int reply_writeunlock(char *inbuf,char *outbuf);
692 int reply_write(char *inbuf,char *outbuf,int dum1,int dum2);
693 int reply_write_and_X(char *inbuf,char *outbuf,int length,int bufsize);
694 int reply_lseek(char *inbuf,char *outbuf);
695 int reply_flush(char *inbuf,char *outbuf);
696 int reply_exit(char *inbuf,char *outbuf);
697 int reply_close(char *inbuf,char *outbuf);
698 int reply_writeclose(char *inbuf,char *outbuf);
699 int reply_lock(char *inbuf,char *outbuf);
700 int reply_unlock(char *inbuf,char *outbuf);
701 int reply_tdis(char *inbuf,char *outbuf);
702 int reply_echo(char *inbuf,char *outbuf);
703 int reply_printopen(char *inbuf,char *outbuf);
704 int reply_printclose(char *inbuf,char *outbuf);
705 int reply_printqueue(char *inbuf,char *outbuf);
706 int reply_printwrite(char *inbuf,char *outbuf);
707 int reply_mkdir(char *inbuf,char *outbuf);
708 int reply_rmdir(char *inbuf,char *outbuf);
709 int reply_mv(char *inbuf,char *outbuf);
710 int reply_copy(char *inbuf,char *outbuf);
711 int reply_setdir(char *inbuf,char *outbuf);
712 int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize);
713 int reply_readbmpx(char *inbuf,char *outbuf,int length,int bufsize);
714 int reply_writebmpx(char *inbuf,char *outbuf);
715 int reply_writebs(char *inbuf,char *outbuf);
716 int reply_setattrE(char *inbuf,char *outbuf);
717 int reply_getattrE(char *inbuf,char *outbuf);
718
719 /*The following definitions come from  server.c  */
720
721 void  *dflt_sig(void);
722 void  killkids(void);
723 mode_t unix_mode(int cnum,int dosmode);
724 int dos_mode(int cnum,char *path,struct stat *sbuf);
725 int dos_chmod(int cnum,char *fname,int dosmode,struct stat *st);
726 BOOL unix_convert(char *name,int cnum,pstring saved_last_component, BOOL *bad_path);
727 int disk_free(char *path,int *bsize,int *dfree,int *dsize);
728 int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
729 BOOL check_name(char *name,int cnum);
730 void sync_file(int fnum);
731 void close_file(int fnum);
732 BOOL check_file_sharing(int cnum,char *fname);
733 int check_share_mode( min_share_mode_entry *share, int deny_mode, char *fname,
734                       BOOL fcbopen, int *flags);
735 void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
736                       int mode,int oplock_request, int *Access,int *action);
737 int seek_file(int fnum,uint32 pos);
738 int read_file(int fnum,char *data,uint32 pos,int n);
739 int write_file(int fnum,char *data,int n);
740 BOOL become_service(int cnum,BOOL do_chdir);
741 int find_service(char *service);
742 int cached_error_packet(char *inbuf,char *outbuf,int fnum,int line);
743 int unix_error_packet(char *inbuf,char *outbuf,int def_class,uint32 def_code,int line);
744 int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int line);
745 BOOL oplock_break(uint32 dev, uint32 inode, struct timeval *tval);
746 BOOL request_oplock_break(min_share_mode_entry *share_entry, 
747                           uint32 dev, uint32 inode);
748 BOOL snum_used(int snum);
749 BOOL reload_services(BOOL test);
750 int setup_groups(char *user, int uid, int gid, int *p_ngroups, 
751                  int **p_igroups, gid_t **p_groups);
752 int make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid);
753 int find_free_file(void );
754 int reply_corep(char *outbuf);
755 int reply_coreplus(char *outbuf);
756 int reply_lanman1(char *outbuf);
757 int reply_lanman2(char *outbuf);
758 int reply_nt1(char *outbuf);
759 void close_cnum(int cnum, uint16 vuid);
760 BOOL yield_connection(int cnum,char *name,int max_connections);
761 BOOL claim_connection(int cnum,char *name,int max_connections,BOOL Clear);
762 void exit_server(char *reason);
763 void standard_sub(int cnum,char *str);
764 char *smb_fn_name(int type);
765 int chain_reply(char *inbuf,char *outbuf,int size,int bufsize);
766 int construct_reply(char *inbuf,char *outbuf,int size,int bufsize);
767
768 /*The following definitions come from  shmem.c  */
769
770 BOOL smb_shm_create_hash_table( unsigned int size );
771 BOOL smb_shm_open( char *file_name, int size);
772 BOOL smb_shm_close( void );
773 smb_shm_offset_t smb_shm_alloc(int size);
774 BOOL smb_shm_free(smb_shm_offset_t offset);
775 smb_shm_offset_t smb_shm_get_userdef_off(void);
776 BOOL smb_shm_set_userdef_off(smb_shm_offset_t userdef_off);
777 void *smb_shm_offset2addr(smb_shm_offset_t offset);
778 smb_shm_offset_t smb_shm_addr2offset(void *addr);
779 BOOL smb_shm_lock_hash_entry( unsigned int entry);
780 BOOL smb_shm_unlock_hash_entry( unsigned int entry );
781 BOOL smb_shm_get_usage(int *bytes_free,
782                    int *bytes_used,
783                    int *bytes_overhead);
784
785 /*The following definitions come from  smbdes.c  */
786
787 void E_P16(unsigned char *p14,unsigned char *p16);
788 void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
789
790 /*The following definitions come from  smbencrypt.c  */
791
792 void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
793 void E_md4hash(uchar *passwd, uchar *p16);
794 void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
795
796 /*The following definitions come from  smbparse.c  */
797
798 char* smb_io_utime(BOOL io, UTIME *t, char *q, char *base, int align);
799 char* smb_io_time(BOOL io, NTTIME *nttime, char *q, char *base, int align);
800 char* smb_io_dom_sid(BOOL io, DOM_SID *sid, char *q, char *base, int align);
801 char* smb_io_unihdr(BOOL io, UNIHDR *hdr, char *q, char *base, int align);
802 char* smb_io_unihdr2(BOOL io, UNIHDR2 *hdr2, char *q, char *base, int align);
803 char* smb_io_unistr(BOOL io, UNISTR *uni, char *q, char *base, int align);
804 char* smb_io_unistr2(BOOL io, UNISTR2 *uni2, char *q, char *base, int align);
805 char* smb_io_dom_sid2(BOOL io, DOM_SID2 *sid2, char *q, char *base, int align);
806 char* smb_io_dom_rid2(BOOL io, DOM_RID2 *rid2, char *q, char *base, int align);
807 char* smb_io_log_info(BOOL io, DOM_LOG_INFO *log, char *q, char *base, int align);
808 char* smb_io_chal(BOOL io, DOM_CHAL *chal, char *q, char *base, int align);
809 char* smb_io_cred(BOOL io, DOM_CRED *cred, char *q, char *base, int align);
810 char* smb_io_clnt_info(BOOL io, DOM_CLNT_INFO *clnt, char *q, char *base, int align);
811 char* smb_io_logon_id(BOOL io, DOM_LOGON_ID *log, char *q, char *base, int align);
812 char* smb_io_arc4_owf(BOOL io, ARC4_OWF *hash, char *q, char *base, int align);
813 char* smb_io_id_info1(BOOL io, DOM_ID_INFO_1 *id, char *q, char *base, int align);
814 char* smb_io_sam_info(BOOL io, DOM_SAM_INFO *sam, char *q, char *base, int align);
815 char* smb_io_gid(BOOL io, DOM_GID *gid, char *q, char *base, int align);
816 char* smb_io_rpc_hdr(BOOL io, RPC_HDR *rpc, char *q, char *base, int align);
817 char* smb_io_pol_hnd(BOOL io, LSA_POL_HND *pol, char *q, char *base, int align);
818 char* smb_io_dom_query_3(BOOL io, DOM_QUERY_3 *d_q, char *q, char *base, int align);
819 char* smb_io_dom_query_5(BOOL io, DOM_QUERY_3 *d_q, char *q, char *base, int align);
820 char* smb_io_dom_query(BOOL io, DOM_QUERY *d_q, char *q, char *base, int align);
821 char* smb_io_dom_r_ref(BOOL io, DOM_R_REF *r_r, char *q, char *base, int align);
822 char* smb_io_dom_name(BOOL io, DOM_NAME *name, char *q, char *base, int align);
823 char* smb_io_neg_flags(BOOL io, NEG_FLAGS *neg, char *q, char *base, int align);
824
825 /*The following definitions come from  smbpass.c  */
826
827 int pw_file_lock(char *name, int type, int secs);
828 int pw_file_unlock(int fd);
829 struct smb_passwd *get_smbpwnam(char *name);
830
831 /*The following definitions come from  smbpasswd.c  */
832
833
834 /*The following definitions come from  smbrun.c  */
835
836
837 /*The following definitions come from  status.c  */
838
839 void Ucrit_addUsername(pstring username);
840 unsigned int Ucrit_checkUsername(pstring username);
841 void Ucrit_addPid(int pid);
842 unsigned int   Ucrit_checkPid(int pid);
843
844 /*The following definitions come from  system.c  */
845
846 int sys_select(fd_set *fds,struct timeval *tval);
847 int sys_select(fd_set *fds,struct timeval *tval);
848 int sys_unlink(char *fname);
849 int sys_open(char *fname,int flags,int mode);
850 DIR *sys_opendir(char *dname);
851 int sys_stat(char *fname,struct stat *sbuf);
852 int sys_waitpid(pid_t pid,int *status,int options);
853 int sys_lstat(char *fname,struct stat *sbuf);
854 int sys_mkdir(char *dname,int mode);
855 int sys_rmdir(char *dname);
856 int sys_chdir(char *dname);
857 int sys_utime(char *fname,struct utimbuf *times);
858 int sys_rename(char *from, char *to);
859 int sys_chmod(char *fname,int mode);
860 char *sys_getwd(char *s);
861 int sys_chown(char *fname,int uid,int gid);
862 int sys_chroot(char *dname);
863 struct hostent *sys_gethostbyname(char *name);
864
865 /*The following definitions come from  testparm.c  */
866
867
868 /*The following definitions come from  testprns.c  */
869
870 int main(int argc, char *argv[]);
871
872 /*The following definitions come from  time.c  */
873
874 void GetTimeOfDay(struct timeval *tval);
875 void TimeInit(void);
876 int TimeDiff(time_t t);
877 struct tm *LocalTime(time_t *t);
878 time_t interpret_long_date(char *p);
879 void put_long_date(char *p,time_t t);
880 void put_dos_date(char *buf,int offset,time_t unixdate);
881 void put_dos_date2(char *buf,int offset,time_t unixdate);
882 void put_dos_date3(char *buf,int offset,time_t unixdate);
883 time_t make_unix_date(void *date_ptr);
884 time_t make_unix_date2(void *date_ptr);
885 time_t make_unix_date3(void *date_ptr);
886 BOOL set_filetime(char *fname,time_t mtime);
887 char *timestring(void );
888
889 /*The following definitions come from  trans2.c  */
890
891 int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize);
892 int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize);
893 int reply_transs2(char *inbuf,char *outbuf,int length,int bufsize);
894 int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize);
895
896 /*The following definitions come from  ufc.c  */
897
898 char *ufc_crypt(char *key,char *salt);
899
900 /*The following definitions come from  uid.c  */
901
902 void init_uid(void);
903 BOOL become_guest(void);
904 BOOL become_user(int cnum, uint16 vuid);
905 BOOL unbecome_user(void );
906 int smbrun(char *cmd,char *outfile,BOOL shared);
907
908 /*The following definitions come from  username.c  */
909
910 char *get_home_dir(char *user);
911 void map_username(char *user);
912 struct passwd *Get_Pwnam(char *user,BOOL allow_change);
913 BOOL user_in_list(char *user,char *list);
914
915 /*The following definitions come from  util.c  */
916
917 void setup_logging(char *pname,BOOL interactive);
918 void reopen_logs(void);
919 char *tmpdir(void);
920 BOOL is_a_socket(int fd);
921 BOOL next_token(char **ptr,char *buff,char *sep);
922 char **toktocliplist(int *ctok, char *sep);
923 void *MemMove(void *dest,void *src,int size);
924 void array_promote(char *array,int elsize,int element);
925 void set_socket_options(int fd, char *options);
926 void close_sockets(void );
927 BOOL in_group(gid_t group, int current_gid, int ngroups, int *groups);
928 char *StrCpy(char *dest,char *src);
929 char *StrnCpy(char *dest,char *src,int n);
930 void putip(void *dest,void *src);
931 int name_mangle(char *In,char *Out,char name_type);
932 BOOL file_exist(char *fname,struct stat *sbuf);
933 time_t file_modtime(char *fname);
934 BOOL directory_exist(char *dname,struct stat *st);
935 uint32 file_size(char *file_name);
936 char *attrib_string(int mode);
937 int StrCaseCmp(char *s, char *t);
938 int StrnCaseCmp(char *s, char *t, int n);
939 BOOL strequal(char *s1, char *s2);
940 BOOL strnequal(char *s1,char *s2,int n);
941 BOOL strcsequal(char *s1,char *s2);
942 void strlower(char *s);
943 void strupper(char *s);
944 void strnorm(char *s);
945 BOOL strisnormal(char *s);
946 void string_replace(char *s,char oldc,char newc);
947 void unix_format(char *fname);
948 void dos_format(char *fname);
949 void show_msg(char *buf);
950 int smb_len(char *buf);
951 void _smb_setlen(char *buf,int len);
952 void smb_setlen(char *buf,int len);
953 int set_message(char *buf,int num_words,int num_bytes,BOOL zero);
954 int smb_numwords(char *buf);
955 int smb_buflen(char *buf);
956 int smb_buf_ofs(char *buf);
957 char *smb_buf(char *buf);
958 int smb_offset(char *p,char *buf);
959 char *skip_string(char *buf,int n);
960 BOOL trim_string(char *s,char *front,char *back);
961 void dos_clean_name(char *s);
962 void unix_clean_name(char *s);
963 int ChDir(char *path);
964 char *GetWd(char *str);
965 BOOL reduce_name(char *s,char *dir,BOOL widelinks);
966 void expand_mask(char *Mask,BOOL doext);
967 BOOL strhasupper(char *s);
968 BOOL strhaslower(char *s);
969 int count_chars(char *s,char c);
970 void make_dir_struct(char *buf,char *mask,char *fname,unsigned int size,int mode,time_t date);
971 void close_low_fds(void);
972 int set_blocking(int fd, BOOL set);
973 int write_socket(int fd,char *buf,int len);
974 int read_udp_socket(int fd,char *buf,int len);
975 int read_with_timeout(int fd,char *buf,int mincnt,int maxcnt,long time_out);
976 int read_max_udp(int fd,char *buffer,int bufsize,int maxtime);
977 int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew);
978 BOOL send_keepalive(int client);
979 int read_data(int fd,char *buffer,int N);
980 int write_data(int fd,char *buffer,int N);
981 int transfer_file(int infd,int outfd,int n,char *header,int headlen,int align);
982 int read_smb_length(int fd,char *inbuf,int timeout);
983 BOOL receive_smb(int fd,char *buffer, int timeout);
984 BOOL receive_local_message(int fd, char *buffer, int buffer_len, int timeout);
985 BOOL push_local_message(char *buf, int msg_len);
986 BOOL receive_message_or_smb(int smbfd, int oplock_fd, 
987                            char *buffer, int buffer_len, 
988                            int timeout, BOOL *got_smb);
989 BOOL send_smb(int fd,char *buffer);
990 char *name_ptr(char *buf,int ofs);
991 int name_extract(char *buf,int ofs,char *name);
992 int name_len(char *s);
993 BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
994 void msleep(int t);
995 BOOL in_list(char *s,char *list,BOOL casesensitive);
996 BOOL string_init(char **dest,char *src);
997 void string_free(char **s);
998 BOOL string_set(char **dest,char *src);
999 BOOL string_sub(char *s,char *pattern,char *insert);
1000 BOOL do_match(char *str, char *regexp, int case_sig);
1001 BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2);
1002 void become_daemon(void);
1003 BOOL yesno(char *p);
1004 char *fgets_slash(char *s2,int maxlen,FILE *f);
1005 int set_filelen(int fd, long len);
1006 int byte_checksum(char *buf,int len);
1007 char *dirname_dos(char *path,char *buf);
1008 void *Realloc(void *p,int size);
1009 void Abort(void );
1010 BOOL get_myname(char *my_name,struct in_addr *ip);
1011 BOOL ip_equal(struct in_addr ip1,struct in_addr ip2);
1012 int open_socket_in(int type, int port, int dlevel,uint32 socket_addr);
1013 int open_socket_out(int type, struct in_addr *addr, int port ,int timeout);
1014 int interpret_protocol(char *str,int def);
1015 int interpret_security(char *str,int def);
1016 uint32 interpret_addr(char *str);
1017 struct in_addr *interpret_addr2(char *str);
1018 BOOL zero_ip(struct in_addr ip);
1019 void reset_globals_after_fork();
1020 char *client_name(void);
1021 char *client_addr(void);
1022 void standard_sub_basic(char *str);
1023 BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
1024 int PutUniCode(char *dst,char *src);
1025 struct hostent *Get_Hostbyname(char *name);
1026 BOOL process_exists(int pid);
1027 char *uidtoname(int uid);
1028 char *gidtoname(int gid);
1029 void BlockSignals(BOOL block,int signum);
1030 void ajt_panic(void);
1031 char *readdirname(void *p);
1032 BOOL is_in_path(char *name, name_compare_entry *namelist);
1033 void set_namearray(name_compare_entry **ppname_array, char *namelist);
1034 void free_namearray(name_compare_entry *name_array);
1035 BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
1036 int file_lock(char *name,int timeout);
1037 void file_unlock(int fd);
1038 BOOL is_myname(char *s);
1039 void set_remote_arch(enum remote_arch_types type);
1040 enum remote_arch_types get_remote_arch();
1041 char *skip_unicode_string(char *buf,int n);
1042 char *unistr(char *buf);
1043 int unistrncpy(char *dst, char *src, int len);
1044 int unistrcpy(char *dst, char *src);
1045 void fstrcpy(char *dest, char *src);
1046 void pstrcpy(char *dest, char *src);
1047 char *align4(char *q, char *base);
1048 char *align2(char *q, char *base);
1049 char *align_offset(char *q, char *base, int align_offset_len);