fix Makefile - remove Lukes private stuff :-)
[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,struct from_host *client);
8 BOOL fromhost(int sock,struct from_host *f);
9
10 /*The following definitions come from  charcnv.c  */
11
12 char *unix2dos_format(char *str,BOOL overwrite);
13 char *dos2unix_format(char *str, BOOL overwrite);
14 int interpret_character_set(char *str, int def);
15
16 /*The following definitions come from  charset.c  */
17
18 void charset_initialise(void);
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 strslashcmp(const char *s1, const char *s2);
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(char *name);
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 int interpret_coding_system(char *str, int def);
118
119 /*The following definitions come from  loadparm.c  */
120
121 char *lp_string(char *s);
122 char *lp_logfile(void);
123 char *lp_smbrun(void);
124 char *lp_configfile(void);
125 char *lp_smb_passwd_file(void);
126 char *lp_serverstring(void);
127 char *lp_printcapname(void);
128 char *lp_lockdir(void);
129 char *lp_rootdir(void);
130 char *lp_defaultservice(void);
131 char *lp_msg_command(void);
132 char *lp_dfree_command(void);
133 char *lp_hosts_equiv(void);
134 char *lp_auto_services(void);
135 char *lp_passwd_program(void);
136 char *lp_passwd_chat(void);
137 char *lp_passwordserver(void);
138 char *lp_workgroup(void);
139 char *lp_domain_controller(void);
140 char *lp_username_map(void);
141 char *lp_character_set(void);
142 char *lp_logon_script(void);
143 char *lp_wins_server(void);
144 char *lp_interfaces(void);
145 char *lp_remote_interfaces(void);
146 BOOL lp_wins_support(void);
147 BOOL lp_wins_proxy(void);
148 BOOL lp_domain_master(void);
149 BOOL lp_domain_logons(void);
150 BOOL lp_preferred_master(void);
151 BOOL lp_load_printers(void);
152 BOOL lp_use_rhosts(void);
153 BOOL lp_getwdcache(void);
154 BOOL lp_readprediction(void);
155 BOOL lp_readbmpx(void);
156 BOOL lp_readraw(void);
157 BOOL lp_writeraw(void);
158 BOOL lp_null_passwords(void);
159 BOOL lp_strip_dot(void);
160 BOOL lp_encrypted_passwords(void);
161 BOOL lp_syslog_only(void);
162 BOOL lp_browse_list(void);
163 int lp_os_level(void);
164 int lp_max_ttl(void);
165 int lp_max_log_size(void);
166 int lp_mangledstack(void);
167 int lp_maxxmit(void);
168 int lp_maxmux(void);
169 int lp_maxpacket(void);
170 int lp_keepalive(void);
171 int lp_passwordlevel(void);
172 int lp_readsize(void);
173 int lp_deadtime(void);
174 int lp_maxprotocol(void);
175 int lp_security(void);
176 int lp_printing(void);
177 int lp_maxdisksize(void);
178 int lp_lpqcachetime(void);
179 int lp_syslog(void);
180 char *lp_preexec(int );
181 char *lp_postexec(int );
182 char *lp_rootpreexec(int );
183 char *lp_rootpostexec(int );
184 char *lp_servicename(int );
185 char *lp_pathname(int );
186 char *lp_dontdescend(int );
187 char *lp_username(int );
188 char *lp_guestaccount(int );
189 char *lp_invalid_users(int );
190 char *lp_valid_users(int );
191 char *lp_admin_users(int );
192 char *lp_printcommand(int );
193 char *lp_lpqcommand(int );
194 char *lp_lprmcommand(int );
195 char *lp_lppausecommand(int );
196 char *lp_lpresumecommand(int );
197 char *lp_printername(int );
198 char *lp_hostsallow(int );
199 char *lp_hostsdeny(int );
200 char *lp_magicscript(int );
201 char *lp_magicoutput(int );
202 char *lp_comment(int );
203 char *lp_force_user(int );
204 char *lp_force_group(int );
205 char *lp_readlist(int );
206 char *lp_writelist(int );
207 char *lp_volume(int );
208 char *lp_mangled_map(int );
209 BOOL lp_alternate_permissions(int );
210 BOOL lp_revalidate(int );
211 BOOL lp_casesensitive(int );
212 BOOL lp_preservecase(int );
213 BOOL lp_shortpreservecase(int );
214 BOOL lp_casemangle(int );
215 BOOL lp_status(int );
216 BOOL lp_hide_dot_files(int );
217 BOOL lp_browseable(int );
218 BOOL lp_readonly(int );
219 BOOL lp_no_set_dir(int );
220 BOOL lp_guest_ok(int );
221 BOOL lp_guest_only(int );
222 BOOL lp_print_ok(int );
223 BOOL lp_postscript(int );
224 BOOL lp_map_hidden(int );
225 BOOL lp_map_archive(int );
226 BOOL lp_locking(int );
227 BOOL lp_strict_locking(int );
228 BOOL lp_share_modes(int );
229 BOOL lp_onlyuser(int );
230 BOOL lp_manglednames(int );
231 BOOL lp_widelinks(int );
232 BOOL lp_syncalways(int );
233 BOOL lp_map_system(int );
234 BOOL lp_delete_readonly(int );
235 int lp_create_mode(int );
236 int lp_max_connections(int );
237 int lp_defaultcase(int );
238 int lp_minprintspace(int );
239 char lp_magicchar(int );
240 BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir);
241 int lp_add_service(char *pszService, int iDefaultService);
242 BOOL lp_add_printer(char *pszPrintername, int iDefaultService);
243 BOOL lp_file_list_changed(void);
244 BOOL lp_snum_ok(int iService);
245 BOOL lp_loaded(void);
246 void lp_killunused(BOOL (*snumused)(int ));
247 BOOL lp_load(char *pszFname,BOOL global_only);
248 int lp_numservices(void);
249 void lp_dump(void);
250 int lp_servicenumber(char *pszServiceName);
251 char *my_workgroup(void);
252 char *volume_label(int snum);
253
254 /*The following definitions come from  locking.c  */
255
256 BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
257 int file_lock(char *name,int timeout);
258 void file_unlock(int fd);
259 BOOL is_locked(int fnum,int cnum,uint32 count,uint32 offset);
260 BOOL do_lock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
261 BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
262 int get_share_mode_by_fnum(int cnum,int fnum,int *pid);
263 int get_share_mode_byname(int cnum,char *fname,int *pid);
264 int get_share_mode(int cnum,struct stat *sbuf,int *pid);
265 void del_share_mode(int fnum);
266 BOOL set_share_mode(int fnum,int mode);
267 void clean_share_files(void);
268
269 /*The following definitions come from  mangle.c  */
270
271 int str_checksum(char *s);
272 BOOL is_8_3(char *fname);
273 void create_mangled_stack(int size);
274 BOOL check_mangled_stack(char *s);
275 BOOL is_mangled(char *s);
276 void mangle_name_83(char *s);
277 BOOL name_map_mangle(char *OutName,BOOL need83,int snum);
278
279 /*The following definitions come from  md4.c  */
280
281
282 /*The following definitions come from  message.c  */
283
284 int reply_sends(char *inbuf,char *outbuf);
285 int reply_sendstrt(char *inbuf,char *outbuf);
286 int reply_sendtxt(char *inbuf,char *outbuf);
287 int reply_sendend(char *inbuf,char *outbuf);
288
289 /*The following definitions come from  nameannounce.c  */
290
291 void announce_request(struct work_record *work, struct in_addr ip);
292 void do_announce_request(char *info, char *to_name, int announce_type, 
293                          int from,
294                          int to, struct in_addr dest_ip);
295 void sync_server(enum state_type state, char *serv_name, char *work_name, 
296                  int name_type,
297                  struct in_addr ip);
298 void announce_backup(void);
299 void do_announce_host(int command,
300                 char *from_name, int from_type, struct in_addr from_ip,
301                 char *to_name  , int to_type  , struct in_addr to_ip,
302                 int updatecount, time_t announce_interval,
303                 char *server_name, int server_type, char *server_comment);
304 void announce_server(struct subnet_record *d, struct work_record *work,
305                                         char *name, char *comment, time_t ttl, int server_type);
306 void announce_host(void);
307 void announce_master(void);
308
309 /*The following definitions come from  namebrowse.c  */
310
311 void expire_browse_cache(time_t t);
312 struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
313                                               time_t ttl, struct in_addr ip);
314 void do_browser_lists(void);
315
316 /*The following definitions come from  namedb.c  */
317
318 struct work_record *remove_workgroup(struct subnet_record *d, 
319                                      struct work_record *work);
320 struct work_record *find_workgroupstruct(struct subnet_record *d, 
321                                          fstring name, BOOL add);
322 struct subnet_record *find_subnet(struct in_addr bcast_ip);
323 void dump_workgroups(void);
324 void add_subnet_interfaces(void);
325 struct subnet_record *add_subnet_entry(struct in_addr bcast_ip, 
326                                        struct in_addr mask_ip,
327                                        char *name, BOOL add, BOOL lmhosts);
328 void remove_my_servers(void);
329 struct server_record *add_server_entry(struct subnet_record *d, 
330                                        struct work_record *work,
331                                        char *name,int servertype, 
332                                        int ttl,char *comment,
333                                        BOOL replace);
334 void add_my_subnets(char *group);
335 void write_browse_list(void);
336 void expire_servers(time_t t);
337
338 /*The following definitions come from  nameelect.c  */
339
340 void check_master_browser(void);
341 void browser_gone(char *work_name, struct in_addr ip);
342 void send_election(struct subnet_record *d, char *group,uint32 criterion,
343                    int timeup,char *name);
344 void become_nonmaster(struct subnet_record *d, struct work_record *work,
345                                 int remove_type);
346 void run_elections(void);
347 void process_election(struct packet_struct *p,char *buf);
348 BOOL check_elections(void);
349
350 /*The following definitions come from  namelogon.c  */
351
352 void process_logon_packet(struct packet_struct *p,char *buf,int len);
353
354 /*The following definitions come from  namequery.c  */
355
356 BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
357                  struct in_addr to_ip,char *master,char *rname,
358                  void (*fn)());
359 BOOL name_query(int fd,char *name,int name_type, 
360                 BOOL bcast,BOOL recurse,
361                 struct in_addr to_ip, struct in_addr *ip,void (*fn)());
362
363 /*The following definitions come from  nameresp.c  */
364
365 void expire_netbios_response_entries();
366 void reply_netbios_packet(struct packet_struct *p1,int trn_id,
367                                 int rcode,int opcode, BOOL recurse,
368                                 struct nmb_name *rr_name,int rr_type,int rr_class,int ttl,
369                                 char *data,int len);
370 void queue_netbios_pkt_wins(struct subnet_record *d,
371                                 int fd,int quest_type,enum state_type state,
372                             char *name,int name_type,int nb_flags, time_t ttl,
373                             BOOL bcast,BOOL recurse,struct in_addr to_ip);
374 void queue_netbios_packet(struct subnet_record *d,
375                         int fd,int quest_type,enum state_type state,char *name,
376                         int name_type,int nb_flags, time_t ttl,
377                         BOOL bcast,BOOL recurse, struct in_addr to_ip);
378 struct response_record *find_response_record(struct subnet_record **d,
379                                 uint16 id);
380 void queue_packet(struct packet_struct *packet);
381 void run_packet_queue();
382 void listen_for_packets(BOOL run_election);
383 BOOL interpret_node_status(struct subnet_record *d,
384                                 char *p, struct nmb_name *name,int t,
385                            char *serv_name, struct in_addr ip, BOOL bcast);
386 BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,char *srcname,
387                          char *dstname,int src_type,int dest_type,
388                          struct in_addr dest_ip,struct in_addr src_ip);
389
390 /*The following definitions come from  nameserv.c  */
391
392 void remove_name(struct subnet_record *d, struct name_record *n);
393 void dump_names(void);
394 void load_netbios_names(void);
395 void remove_netbios_name(struct subnet_record *d,
396                         char *name,int type, enum name_source source,
397                          struct in_addr ip);
398 struct name_record *add_netbios_entry(struct subnet_record *d,
399                 char *name, int type, int nb_flags, 
400                 int ttl, enum name_source source, struct in_addr ip,
401                 BOOL new_only,BOOL wins);
402 void remove_name_entry(struct subnet_record *d, char *name,int type);
403 void add_my_name_entry(struct subnet_record *d,char *name,int type,int nb_flags);
404 void add_my_names(void);
405 void remove_my_names();
406 void refresh_my_names(time_t t);
407 void query_refresh_names(void);
408 void expire_names(time_t t);
409 void response_name_release(struct subnet_record *d, struct packet_struct *p);
410 void reply_name_release(struct packet_struct *p);
411 void response_name_reg(struct subnet_record *d, struct packet_struct *p);
412 void reply_name_reg(struct packet_struct *p);
413 void reply_name_status(struct packet_struct *p);
414 struct name_record *search_for_name(struct subnet_record **d,
415                                         struct nmb_name *question,
416                                     struct in_addr ip, int Time, int search);
417 void reply_name_query(struct packet_struct *p);
418 void process_nmb(struct packet_struct *p);
419
420 /*The following definitions come from  namework.c  */
421
422 void reset_server(char *name, int state, struct in_addr ip);
423 void tell_become_backup(void);
424 BOOL same_context(struct dgram_packet *dgram);
425 BOOL listening_name(struct work_record *work, struct nmb_name *n);
426 BOOL listening_type(struct packet_struct *p, int command);
427 void process_browse_packet(struct packet_struct *p,char *buf,int len);
428 void process_dgram(struct packet_struct *p);
429
430 /*The following definitions come from  nmbd.c  */
431
432 BOOL reload_services(BOOL test);
433
434 /*The following definitions come from  nmblib.c  */
435
436 void debug_nmb_packet(struct packet_struct *p);
437 char *namestr(struct nmb_name *n);
438 void free_nmb_packet(struct nmb_packet *nmb);
439 void free_packet(struct packet_struct *packet);
440 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
441 void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope);
442 BOOL send_packet(struct packet_struct *p);
443 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
444
445 /*The following definitions come from  nmblookup.c  */
446
447 int main(int argc,char *argv[]);
448
449 /*The following definitions come from  nmbsync.c  */
450
451 char *getsmbpass(char *pass);
452 void sync_browse_lists(struct subnet_record *d, struct work_record *work,
453                 char *name, int nm_type, struct in_addr ip);
454
455 /*The following definitions come from  params.c  */
456
457 BOOL pm_process(char *pszFileName,BOOL (*sfunc)(char *),BOOL (*pfunc)(char *,char *));
458
459 /*The following definitions come from  password.c  */
460
461 void generate_next_challenge(char *challenge);
462 BOOL set_challenge(char *challenge);
463 BOOL last_challenge(char *challenge);
464 int valid_uid(int uid);
465 user_struct *get_valid_user_struct(int uid);
466 void invalidate_uid(int uid);
467 char *validated_username(int vuid);
468 void register_uid(int uid,int gid, char *name,BOOL guest);
469 void add_session_user(char *user);
470 void dfs_unlogin(void);
471 BOOL password_check(char *password);
472 BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8);
473 BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd, BOOL is_nt_password);
474 BOOL user_ok(char *user,int snum);
475 BOOL authorise_login(int snum,char *user,char *password, int pwlen, 
476                      BOOL *guest,BOOL *force,int vuid);
477 BOOL check_hosts_equiv(char *user);
478 BOOL server_cryptkey(char *buf);
479 BOOL server_validate(char *buf);
480
481 /*The following definitions come from  pcap.c  */
482
483 BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
484 void pcap_printer_fn(void (*fn)());
485
486 /*The following definitions come from  predict.c  */
487
488 int read_predict(int fd,int offset,char *buf,char **ptr,int num);
489 void do_read_prediction();
490 void invalidate_read_prediction(int fd);
491
492 /*The following definitions come from  printing.c  */
493
494 void lpq_reset(int snum);
495 void print_file(int fnum);
496 int get_printqueue(int snum,int cnum,print_queue_struct **queue,
497                    print_status_struct *status);
498 void del_printqueue(int cnum,int snum,int jobid);
499 void status_printjob(int cnum,int snum,int jobid,int status);
500
501 /*The following definitions come from  quotas.c  */
502
503 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
504 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
505 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
506 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
507
508 /*The following definitions come from  replace.c  */
509
510 char *Strstr(char *s, char *p);
511 time_t Mktime(struct tm      *t);
512 int InNetGr(char *group,char *host,char *user,char *dom);
513 void *malloc_wrapped(int size,char *file,int line);
514 void *realloc_wrapped(void *ptr,int size,char *file,int line);
515 void free_wrapped(void *ptr,char *file,int line);
516 void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
517
518 /*The following definitions come from  reply.c  */
519
520 int reply_special(char *inbuf,char *outbuf);
521 int reply_tcon(char *inbuf,char *outbuf);
522 int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize);
523 int reply_unknown(char *inbuf,char *outbuf);
524 int reply_ioctl(char *inbuf,char *outbuf);
525 int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize);
526 int reply_chkpth(char *inbuf,char *outbuf);
527 int reply_getatr(char *inbuf,char *outbuf);
528 int reply_setatr(char *inbuf,char *outbuf);
529 int reply_dskattr(char *inbuf,char *outbuf);
530 int reply_search(char *inbuf,char *outbuf);
531 int reply_fclose(char *inbuf,char *outbuf);
532 int reply_open(char *inbuf,char *outbuf);
533 int reply_open_and_X(char *inbuf,char *outbuf,int length,int bufsize);
534 int reply_ulogoffX(char *inbuf,char *outbuf,int length,int bufsize);
535 int reply_mknew(char *inbuf,char *outbuf);
536 int reply_ctemp(char *inbuf,char *outbuf);
537 int reply_unlink(char *inbuf,char *outbuf);
538 int reply_readbraw(char *inbuf, char *outbuf);
539 int reply_lockread(char *inbuf,char *outbuf);
540 int reply_read(char *inbuf,char *outbuf);
541 int reply_read_and_X(char *inbuf,char *outbuf,int length,int bufsize);
542 int reply_writebraw(char *inbuf,char *outbuf);
543 int reply_writeunlock(char *inbuf,char *outbuf);
544 int reply_write(char *inbuf,char *outbuf,int dum1,int dum2);
545 int reply_write_and_X(char *inbuf,char *outbuf,int length,int bufsize);
546 int reply_lseek(char *inbuf,char *outbuf);
547 int reply_flush(char *inbuf,char *outbuf);
548 int reply_exit(char *inbuf,char *outbuf);
549 int reply_close(char *inbuf,char *outbuf);
550 int reply_writeclose(char *inbuf,char *outbuf);
551 int reply_lock(char *inbuf,char *outbuf);
552 int reply_unlock(char *inbuf,char *outbuf);
553 int reply_tdis(char *inbuf,char *outbuf);
554 int reply_echo(char *inbuf,char *outbuf);
555 int reply_printopen(char *inbuf,char *outbuf);
556 int reply_printclose(char *inbuf,char *outbuf);
557 int reply_printqueue(char *inbuf,char *outbuf);
558 int reply_printwrite(char *inbuf,char *outbuf);
559 int reply_mkdir(char *inbuf,char *outbuf);
560 int reply_rmdir(char *inbuf,char *outbuf);
561 int reply_mv(char *inbuf,char *outbuf);
562 int reply_copy(char *inbuf,char *outbuf);
563 int reply_setdir(char *inbuf,char *outbuf);
564 int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize);
565 int reply_readbmpx(char *inbuf,char *outbuf,int length,int bufsize);
566 int reply_writebmpx(char *inbuf,char *outbuf);
567 int reply_writebs(char *inbuf,char *outbuf);
568 int reply_setattrE(char *inbuf,char *outbuf);
569 int reply_getattrE(char *inbuf,char *outbuf);
570
571 /*The following definitions come from  server.c  */
572
573 mode_t unix_mode(int cnum,int dosmode);
574 int dos_mode(int cnum,char *path,struct stat *sbuf);
575 int dos_chmod(int cnum,char *fname,int dosmode,struct stat *st);
576 BOOL unix_convert(char *name,int cnum);
577 int disk_free(char *path,int *bsize,int *dfree,int *dsize);
578 int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
579 BOOL check_name(char *name,int cnum);
580 void open_file(int fnum,int cnum,char *fname1,int flags,int mode);
581 void sync_file(int fnum);
582 void close_file(int fnum);
583 BOOL check_file_sharing(int cnum,char *fname);
584 void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
585                       int mode,int *Access,int *action);
586 int seek_file(int fnum,int pos);
587 int read_file(int fnum,char *data,int pos,int mincnt,int maxcnt,int timeout,BOOL exact);
588 int write_file(int fnum,char *data,int n);
589 BOOL become_service(int cnum,BOOL do_chdir);
590 int find_service(char *service);
591 int cached_error_packet(char *inbuf,char *outbuf,int fnum,int line);
592 int unix_error_packet(char *inbuf,char *outbuf,int def_class,uint32 def_code,int line);
593 int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int line);
594 BOOL snum_used(int snum);
595 BOOL reload_services(BOOL test);
596 int setup_groups(char *user, int uid, int gid, int *p_ngroups, 
597                  int **p_igroups, gid_t **p_groups);
598 int make_connection(char *service,char *user,char *password, int pwlen, char *dev,int vuid);
599 int find_free_file(void );
600 int reply_corep(char *outbuf);
601 int reply_coreplus(char *outbuf);
602 int reply_lanman1(char *outbuf);
603 int reply_lanman2(char *outbuf);
604 int reply_nt1(char *outbuf);
605 void parse_connect(char *buf,char *service,char *user,char *password,int *pwlen,char *dev);
606 void close_cnum(int cnum, int uid);
607 BOOL yield_connection(int cnum,char *name,int max_connections);
608 BOOL claim_connection(int cnum,char *name,int max_connections,BOOL Clear);
609 void exit_server(char *reason);
610 void standard_sub(int cnum,char *s);
611 char *smb_fn_name(int type);
612 int chain_reply(int type,char *inbuf,char *inbuf2,char *outbuf,char *outbuf2,int size,int bufsize);
613 int construct_reply(char *inbuf,char *outbuf,int size,int bufsize);
614
615 /*The following definitions come from  smbencrypt.c  */
616
617 void str_to_key(uchar *str,uchar *key);
618 void D1(uchar *k, uchar *d, uchar *out);
619 void E1(uchar *k, uchar *d, uchar *out);
620 void E_P16(uchar *p14,uchar *p16);
621 void E_P24(uchar *p21, uchar *c8, uchar *p24);
622 void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
623 void E_md4hash(uchar *passwd, uchar *p16);
624 void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
625
626 /*The following definitions come from  smbpass.c  */
627
628
629 /*The following definitions come from  smbpasswd.c  */
630
631
632 /*The following definitions come from  smbrun.c  */
633
634
635 /*The following definitions come from  status.c  */
636
637 void Ucrit_addUsername(pstring username);
638 unsigned int Ucrit_checkUsername(pstring username);
639 void Ucrit_addPid(int pid);
640 unsigned int   Ucrit_checkPid(int pid);
641
642 /*The following definitions come from  system.c  */
643
644 int sys_select(fd_set *fds,struct timeval *tval);
645 int sys_select(fd_set *fds,struct timeval *tval);
646 int sys_unlink(char *fname);
647 int sys_open(char *fname,int flags,int mode);
648 DIR *sys_opendir(char *dname);
649 int sys_stat(char *fname,struct stat *sbuf);
650 int sys_lstat(char *fname,struct stat *sbuf);
651 int sys_mkdir(char *dname,int mode);
652 int sys_rmdir(char *dname);
653 int sys_chdir(char *dname);
654 int sys_utime(char *fname,struct utimbuf *times);
655 int sys_rename(char *from, char *to);
656 int sys_chown(char *fname,int uid,int gid);
657 int sys_chroot(char *dname);
658
659 /*The following definitions come from  testparm.c  */
660
661
662 /*The following definitions come from  testprns.c  */
663
664 int main(int argc, char *argv[]);
665
666 /*The following definitions come from  time.c  */
667
668 void GetTimeOfDay(struct timeval *tval);
669 void TimeInit(void);
670 int TimeDiff(time_t t);
671 struct tm *LocalTime(time_t *t);
672 time_t interpret_long_date(char *p);
673 void put_long_date(char *p,time_t t);
674 void put_dos_date(char *buf,int offset,time_t unixdate);
675 void put_dos_date2(char *buf,int offset,time_t unixdate);
676 void put_dos_date3(char *buf,int offset,time_t unixdate);
677 time_t make_unix_date(void *date_ptr);
678 time_t make_unix_date2(void *date_ptr);
679 time_t make_unix_date3(void *date_ptr);
680 BOOL set_filetime(char *fname,time_t mtime);
681 char *timestring(void );
682
683 /*The following definitions come from  trans2.c  */
684
685 int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize);
686 int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize);
687 int reply_transs2(char *inbuf,char *outbuf,int length,int bufsize);
688 int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize);
689
690 /*The following definitions come from  ufc.c  */
691
692 char *ufc_crypt(char *key,char *salt);
693
694 /*The following definitions come from  uid.c  */
695
696 void init_uid(void);
697 BOOL become_guest(void);
698 BOOL become_user(int cnum, int uid);
699 BOOL unbecome_user(void );
700 int smbrun(char *cmd,char *outfile);
701
702 /*The following definitions come from  username.c  */
703
704 char *get_home_dir(char *user);
705 void map_username(char *user);
706 struct passwd *Get_Pwnam(char *user,BOOL allow_change);
707 BOOL user_in_list(char *user,char *list);
708
709 /*The following definitions come from  util.c  */
710
711 void setup_logging(char *pname,BOOL interactive);
712 void reopen_logs(void);
713 BOOL is_a_socket(int fd);
714 BOOL next_token(char **ptr,char *buff,char *sep);
715 char **toktocliplist(int *ctok, char *sep);
716 void *MemMove(void *dest,void *src,int size);
717 void array_promote(char *array,int elsize,int element);
718 void set_socket_options(int fd, char *options);
719 void close_sockets(void );
720 BOOL in_group(gid_t group, int current_gid, int ngroups, int *groups);
721 char *StrCpy(char *dest,char *src);
722 char *StrnCpy(char *dest,const char *src,int n);
723 void putip(void *dest,void *src);
724 int name_mangle(char *In,char *Out,char name_type);
725 BOOL file_exist(char *fname,struct stat *sbuf);
726 time_t file_modtime(char *fname);
727 BOOL directory_exist(char *dname,struct stat *st);
728 uint32 file_size(char *file_name);
729 char *attrib_string(int mode);
730 int StrCaseCmp(char *s, char *t);
731 int StrnCaseCmp(char *s, char *t, int n);
732 BOOL strequal(char *s1,char *s2);
733 BOOL strnequal(char *s1,char *s2,int n);
734 BOOL strcsequal(char *s1,char *s2);
735 void strlower(char *s);
736 void strupper(char *s);
737 void strnorm(char *s);
738 BOOL strisnormal(char *s);
739 void string_replace(char *s,char oldc,char newc);
740 void unix_format(char *fname);
741 void dos_format(char *fname);
742 void show_msg(char *buf);
743 int smb_len(char *buf);
744 void _smb_setlen(char *buf,int len);
745 void smb_setlen(char *buf,int len);
746 int set_message(char *buf,int num_words,int num_bytes,BOOL zero);
747 int smb_numwords(char *buf);
748 int smb_buflen(char *buf);
749 int smb_buf_ofs(char *buf);
750 char *smb_buf(char *buf);
751 int smb_offset(char *p,char *buf);
752 char *skip_string(char *buf,int n);
753 BOOL trim_string(char *s,char *front,char *back);
754 void dos_clean_name(char *s);
755 void unix_clean_name(char *s);
756 int ChDir(char *path);
757 char *GetWd(char *str);
758 BOOL reduce_name(char *s,char *dir,BOOL widelinks);
759 void expand_mask(char *Mask,BOOL doext);
760 BOOL strhasupper(char *s);
761 BOOL strhaslower(char *s);
762 int count_chars(char *s,char c);
763 void make_dir_struct(char *buf,char *mask,char *fname,unsigned int size,int mode,time_t date);
764 void close_low_fds(void);
765 int write_socket(int fd,char *buf,int len);
766 int read_udp_socket(int fd,char *buf,int len);
767 int set_blocking(int fd, BOOL set);
768 int read_with_timeout(int fd,char *buf,int mincnt,int maxcnt,long time_out,BOOL exact);
769 int read_max_udp(int fd,char *buffer,int bufsize,int maxtime);
770 int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew);
771 BOOL send_keepalive(int client);
772 int read_data(int fd,char *buffer,int N);
773 int write_data(int fd,char *buffer,int N);
774 int transfer_file(int infd,int outfd,int n,char *header,int headlen,int align);
775 int read_smb_length(int fd,char *inbuf,int timeout);
776 BOOL receive_smb(int fd,char *buffer,int timeout);
777 BOOL send_smb(int fd,char *buffer);
778 char *name_ptr(char *buf,int ofs);
779 int name_extract(char *buf,int ofs,char *name);
780 int name_len(char *s);
781 BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
782 void msleep(int t);
783 BOOL in_list(char *s,char *list,BOOL casesensitive);
784 BOOL string_init(char **dest,char *src);
785 void string_free(char **s);
786 BOOL string_set(char **dest,char *src);
787 BOOL string_sub(char *s,char *pattern,char *insert);
788 BOOL do_match(char *str, char *regexp, int case_sig);
789 BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2);
790 void become_daemon(void);
791 BOOL yesno(char *p);
792 char *fgets_slash(char *s2,int maxlen,FILE *f);
793 int set_filelen(int fd, long len);
794 int byte_checksum(char *buf,int len);
795 char *dirname_dos(char *path,char *buf);
796 void *Realloc(void *p,int size);
797 void Abort(void );
798 BOOL get_myname(char *myname,struct in_addr *ip);
799 BOOL ip_equal(struct in_addr ip1,struct in_addr ip2);
800 int open_socket_in(int type, int port, int dlevel);
801 int open_socket_out(int type, struct in_addr *addr, int port );
802 int interpret_protocol(char *str,int def);
803 int interpret_security(char *str,int def);
804 unsigned long interpret_addr(char *str);
805 struct in_addr *interpret_addr2(char *str);
806 BOOL zero_ip(struct in_addr ip);
807 void standard_sub_basic(char *s);
808 BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
809 int PutUniCode(char *dst,char *src);
810 struct hostent *Get_Hostbyname(char *name);
811 BOOL process_exists(int pid);
812 char *uidtoname(int uid);
813 char *gidtoname(int gid);
814 void BlockSignals(BOOL block);
815 void ajt_panic(void);
816 char *readdirname(void *p);
817
818 /*The following definitions come from  vt_mode.c  */
819
820 int     VT_Check(char   *buffer);
821 int VT_Start_utmp(void);
822 int VT_Stop_utmp(void);
823 void    VT_AtExit(void);
824 void    VT_SigCLD(int   sig);
825 void    VT_SigEXIT(int  sig);
826 int     VT_Start(void);
827 int     VT_Output(char  *Buffer);
828 int     VT_Input(char   *Buffer,int             Size);
829 void VT_Process(void);