added automount home directory support. contributed by simeon@bangor.co.uk
[samba.git] / source / 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(void);
18 void add_char_string(char *s);
19
20 /*The following definitions come from  chgpasswd.c  */
21
22 BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence);
23 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
24 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
25
26 /*The following definitions come from  client.c  */
27
28 void setup_pkt(char *outbuf);
29 void do_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(),BOOL recurse_dir);
30 void cmd_help(void);
31 BOOL reopen_connection(char *inbuf,char *outbuf);
32 char *smb_errstr(char *inbuf);
33
34 /*The following definitions come from  clientutil.c  */
35
36 void cli_setup_pkt(char *outbuf);
37 BOOL cli_receive_trans_response(char *inbuf,int trans,int *data_len,
38                                 int *param_len, char **data,char **param);
39 BOOL cli_send_session_request(char *inbuf, char *outbuf);
40 BOOL cli_send_login(char *inbuf, char *outbuf, BOOL start_session, BOOL use_setup);
41 void cli_send_logout(void);
42 BOOL cli_call_api(int prcnt,int drcnt,int mprcnt,int mdrcnt,int *rprcnt,
43               int *rdrcnt, char *param,char *data, char **rparam,char **rdata);
44 BOOL cli_send_trans_request(char *outbuf, int trans, char *name, int fid, int flags,
45                         char *data,char *param,uint16 *setup, int ldata,int lparam,
46                         int lsetup,int mdata,int mparam,int msetup);
47 BOOL cli_open_sockets(int port);
48 BOOL cli_reopen_connection(char *inbuf,char *outbuf);
49 char *smb_errstr(char *inbuf);
50
51 /*The following definitions come from  clitar.c  */
52
53 int strslashcmp(char *s1,char *s2);
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(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_logon_path(void);
144 char *lp_veto_files(void);
145 char *lp_remote_announce(void);
146 char *lp_wins_server(void);
147 char *lp_interfaces(void);
148 char *lp_socket_address(void);
149 char *lp_nis_home_map_name(void);
150 BOOL lp_wins_support(void);
151 BOOL lp_wins_proxy(void);
152 BOOL lp_domain_master(void);
153 BOOL lp_domain_logons(void);
154 BOOL lp_preferred_master(void);
155 BOOL lp_load_printers(void);
156 BOOL lp_use_rhosts(void);
157 BOOL lp_getwdcache(void);
158 BOOL lp_readprediction(void);
159 BOOL lp_readbmpx(void);
160 BOOL lp_readraw(void);
161 BOOL lp_writeraw(void);
162 BOOL lp_null_passwords(void);
163 BOOL lp_strip_dot(void);
164 BOOL lp_encrypted_passwords(void);
165 BOOL lp_syslog_only(void);
166 BOOL lp_browse_list(void);
167 BOOL lp_unix_realname(void);
168 BOOL lp_nis_home_map(void);
169 int lp_os_level(void);
170 int lp_max_ttl(void);
171 int lp_max_log_size(void);
172 int lp_mangledstack(void);
173 int lp_maxxmit(void);
174 int lp_maxmux(void);
175 int lp_maxpacket(void);
176 int lp_keepalive(void);
177 int lp_passwordlevel(void);
178 int lp_readsize(void);
179 int lp_deadtime(void);
180 int lp_maxprotocol(void);
181 int lp_security(void);
182 int lp_printing(void);
183 int lp_maxdisksize(void);
184 int lp_lpqcachetime(void);
185 int lp_syslog(void);
186 char *lp_preexec(int );
187 char *lp_postexec(int );
188 char *lp_rootpreexec(int );
189 char *lp_rootpostexec(int );
190 char *lp_servicename(int );
191 char *lp_pathname(int );
192 char *lp_dontdescend(int );
193 char *lp_username(int );
194 char *lp_guestaccount(int );
195 char *lp_invalid_users(int );
196 char *lp_valid_users(int );
197 char *lp_admin_users(int );
198 char *lp_printcommand(int );
199 char *lp_lpqcommand(int );
200 char *lp_lprmcommand(int );
201 char *lp_lppausecommand(int );
202 char *lp_lpresumecommand(int );
203 char *lp_printername(int );
204 char *lp_printerdriver(int );
205 char *lp_hostsallow(int );
206 char *lp_hostsdeny(int );
207 char *lp_magicscript(int );
208 char *lp_magicoutput(int );
209 char *lp_comment(int );
210 char *lp_force_user(int );
211 char *lp_force_group(int );
212 char *lp_readlist(int );
213 char *lp_writelist(int );
214 char *lp_volume(int );
215 char *lp_mangled_map(int );
216 BOOL lp_alternate_permissions(int );
217 BOOL lp_revalidate(int );
218 BOOL lp_casesensitive(int );
219 BOOL lp_preservecase(int );
220 BOOL lp_shortpreservecase(int );
221 BOOL lp_casemangle(int );
222 BOOL lp_status(int );
223 BOOL lp_hide_dot_files(int );
224 BOOL lp_browseable(int );
225 BOOL lp_readonly(int );
226 BOOL lp_no_set_dir(int );
227 BOOL lp_guest_ok(int );
228 BOOL lp_guest_only(int );
229 BOOL lp_print_ok(int );
230 BOOL lp_postscript(int );
231 BOOL lp_map_hidden(int );
232 BOOL lp_map_archive(int );
233 BOOL lp_locking(int );
234 BOOL lp_strict_locking(int );
235 BOOL lp_share_modes(int );
236 BOOL lp_onlyuser(int );
237 BOOL lp_manglednames(int );
238 BOOL lp_widelinks(int );
239 BOOL lp_syncalways(int );
240 BOOL lp_map_system(int );
241 BOOL lp_delete_readonly(int );
242 BOOL lp_fake_oplocks(int );
243 int lp_create_mode(int );
244 int lp_dir_mode(int );
245 int lp_max_connections(int );
246 int lp_defaultcase(int );
247 int lp_minprintspace(int );
248 char lp_magicchar(int );
249 BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir);
250 int lp_add_service(char *pszService, int iDefaultService);
251 BOOL lp_add_printer(char *pszPrintername, int iDefaultService);
252 BOOL lp_file_list_changed(void);
253 BOOL lp_snum_ok(int iService);
254 BOOL lp_loaded(void);
255 void lp_killunused(BOOL (*snumused)(int ));
256 BOOL lp_load(char *pszFname,BOOL global_only);
257 int lp_numservices(void);
258 void lp_dump(void);
259 int lp_servicenumber(char *pszServiceName);
260 char *volume_label(int snum);
261
262 /*The following definitions come from  locking.c  */
263
264 BOOL is_locked(int fnum,int cnum,uint32 count,uint32 offset);
265 BOOL do_lock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
266 BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
267 BOOL start_share_mode_mgmt(void);
268 BOOL stop_share_mode_mgmt(void);
269 int get_share_mode_by_fnum(int cnum,int fnum,int *pid);
270 int get_share_mode_byname(int cnum,char *fname,int *pid);
271 int get_share_mode(int cnum,struct stat *sbuf,int *pid);
272 void del_share_mode(int fnum);
273 BOOL set_share_mode(int fnum,int mode);
274 void clean_share_modes(void);
275
276 /*The following definitions come from  mangle.c  */
277
278 int str_checksum(char *s);
279 BOOL is_8_3(char *fname, BOOL check_case);
280 void create_mangled_stack(int size);
281 BOOL check_mangled_stack(char *s);
282 BOOL is_mangled(char *s);
283 void mangle_name_83(char *s);
284 BOOL name_map_mangle(char *OutName,BOOL need83,int snum);
285
286 /*The following definitions come from  md4.c  */
287
288
289 /*The following definitions come from  message.c  */
290
291 int reply_sends(char *inbuf,char *outbuf);
292 int reply_sendstrt(char *inbuf,char *outbuf);
293 int reply_sendtxt(char *inbuf,char *outbuf);
294 int reply_sendend(char *inbuf,char *outbuf);
295
296 /*The following definitions come from  nameannounce.c  */
297
298 void announce_request(struct work_record *work, struct in_addr ip);
299 void do_announce_request(char *info, char *to_name, int announce_type, 
300                          int from,
301                          int to, struct in_addr dest_ip);
302 void sync_server(enum state_type state, char *serv_name, char *work_name, 
303                  int name_type,
304                  struct in_addr ip);
305 void do_announce_host(int command,
306                 char *from_name, int from_type, struct in_addr from_ip,
307                 char *to_name  , int to_type  , struct in_addr to_ip,
308                 time_t announce_interval,
309                 char *server_name, int server_type, char *server_comment);
310 void remove_my_servers(void);
311 void announce_server(struct subnet_record *d, struct work_record *work,
312                      char *name, char *comment, time_t ttl, int server_type);
313 void announce_host(time_t t);
314 void announce_master(time_t t);
315 void announce_remote(time_t t);
316
317 /*The following definitions come from  namebrowse.c  */
318
319 void expire_browse_cache(time_t t);
320 struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
321                                               time_t ttl, struct in_addr ip, BOOL local);
322 void do_browser_lists(time_t t);
323
324 /*The following definitions come from  nameconf.c  */
325
326 int get_num_workgroups(void);
327 int conf_workgroup_name_to_token(char *workgroup_name,char *default_name);
328 char *conf_workgroup_name(int token);
329 int conf_should_workgroup_member(int token);
330 int conf_should_local_master(int token);
331 int conf_should_domain_master(int token);
332 char *conf_browsing_alias(int token);
333 char *conf_browsing_alias_comment(int token);
334 char *conf_alias_to_workgroup(char *alias);
335 int conf_alias_to_token(char *alias);
336 void read_smbbrowse_conf(char *default_name);
337
338 /*The following definitions come from  namedbname.c  */
339
340 void set_samba_nb_type(void);
341 BOOL name_equal(struct nmb_name *n1,struct nmb_name *n2);
342 BOOL ms_browser_name(char *name, int type);
343 void remove_name(struct subnet_record *d, struct name_record *n);
344 struct name_record *find_name(struct name_record *n,
345                         struct nmb_name *name, int search);
346 struct name_record *find_name_search(struct subnet_record **d,
347                         struct nmb_name *name,
348                         int search, struct in_addr ip);
349 void dump_names(void);
350 void load_netbios_names(void);
351 void remove_netbios_name(struct subnet_record *d,
352                         char *name,int type, enum name_source source,
353                          struct in_addr ip);
354 struct name_record *add_netbios_entry(struct subnet_record *d,
355                 char *name, int type, int nb_flags, 
356                 int ttl, enum name_source source, struct in_addr ip,
357                 BOOL new_only,BOOL wins);
358 void expire_names(time_t t);
359 struct name_record *dns_name_search(struct nmb_name *question, int Time);
360
361 /*The following definitions come from  namedbresp.c  */
362
363 void add_response_record(struct subnet_record *d,
364                                 struct response_record *n);
365 void remove_response_record(struct subnet_record *d,
366                                 struct response_record *n);
367 struct response_record *make_response_queue_record(enum state_type state,
368                                 int id,uint16 fd,
369                                 int quest_type, char *name,int type, int nb_flags, time_t ttl,
370                                 int server_type, char *my_name, char *my_comment,
371                                 BOOL bcast,BOOL recurse,
372                                 struct in_addr send_ip, struct in_addr reply_to_ip);
373 struct response_record *find_response_record(struct subnet_record **d,
374                                 uint16 id);
375
376 /*The following definitions come from  namedbserver.c  */
377
378 void remove_old_servers(struct work_record *work, time_t t,
379                                         BOOL remove_all);
380 struct server_record *find_server(struct work_record *work, char *name);
381 struct server_record *add_server_entry(struct subnet_record *d, 
382                                        struct work_record *work,
383                                        char *name,int servertype, 
384                                        int ttl,char *comment,
385                                        BOOL replace);
386 void expire_servers(time_t t);
387
388 /*The following definitions come from  namedbsubnet.c  */
389
390 struct subnet_record *find_subnet(struct in_addr bcast_ip);
391 struct subnet_record *find_req_subnet(struct in_addr ip, BOOL bcast);
392 struct subnet_record *find_subnet_all(struct in_addr bcast_ip);
393 void add_subnet_interfaces(void);
394 void add_my_subnets(char *group);
395 void write_browse_list(time_t t);
396
397 /*The following definitions come from  namedbwork.c  */
398
399 struct work_record *remove_workgroup(struct subnet_record *d, 
400                                      struct work_record *work,
401                                          BOOL remove_all_servers);
402 struct work_record *find_workgroupstruct(struct subnet_record *d, 
403                                          fstring name, BOOL add);
404 void dump_workgroups(void);
405 int check_work_servertype(const char *work_name, int type_mask);
406
407 /*The following definitions come from  nameelect.c  */
408
409 void check_master_browser(time_t t);
410 void browser_gone(char *work_name, struct in_addr ip);
411 void send_election(struct subnet_record *d, char *group,uint32 criterion,
412                    int timeup,char *name);
413 void name_unregister_work(struct subnet_record *d, char *name, int name_type);
414 void name_register_work(struct subnet_record *d, char *name, int name_type,
415                                 int nb_flags, time_t ttl, struct in_addr ip, BOOL bcast);
416 void become_local_master(struct subnet_record *d, struct work_record *work);
417 void become_domain_master(struct subnet_record *d, struct work_record *work);
418 void become_logon_server(struct subnet_record *d, struct work_record *work);
419 void unbecome_local_master(struct subnet_record *d, struct work_record *work,
420                                 int remove_type);
421 void unbecome_domain_master(struct subnet_record *d, struct work_record *work,
422                                 int remove_type);
423 void unbecome_logon_server(struct subnet_record *d, struct work_record *work,
424                                 int remove_type);
425 void run_elections(time_t t);
426 void process_election(struct packet_struct *p,char *buf);
427 BOOL check_elections(void);
428
429 /*The following definitions come from  namelogon.c  */
430
431 void process_logon_packet(struct packet_struct *p,char *buf,int len);
432
433 /*The following definitions come from  namepacket.c  */
434
435 void debug_browse_data(char *outbuf, int len);
436 void initiate_netbios_packet(uint16 *id,
437                              int fd,int quest_type,char *name,int name_type,
438                              int nb_flags,BOOL bcast,BOOL recurse,
439                              struct in_addr to_ip);
440 void reply_netbios_packet(struct packet_struct *p1,int trn_id,
441                                 int rcode, int rcv_code, int opcode, BOOL recurse,
442                                 struct nmb_name *rr_name,int rr_type,int rr_class,int ttl,
443                                 char *data,int len);
444 void queue_packet(struct packet_struct *packet);
445 void run_packet_queue();
446 void listen_for_packets(BOOL run_election);
447 BOOL send_mailslot_reply(BOOL unique, char *mailslot,int fd,char *buf,int len,char *srcname,
448                          char *dstname,int src_type,int dest_type,
449                          struct in_addr dest_ip,struct in_addr src_ip);
450
451 /*The following definitions come from  namequery.c  */
452
453 BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
454                  struct in_addr to_ip,char *master,char *rname,
455                  void (*fn)());
456 BOOL name_query(int fd,char *name,int name_type, 
457                 BOOL bcast,BOOL recurse,
458                 struct in_addr to_ip, struct in_addr *ip,void (*fn)());
459
460 /*The following definitions come from  nameresp.c  */
461
462 void expire_netbios_response_entries(time_t t);
463 struct response_record *queue_netbios_pkt_wins(struct subnet_record *d,
464                                 int fd,int quest_type,enum state_type state,
465                             char *name,int name_type,int nb_flags, time_t ttl,
466                                 int server_type, char *my_name, char *my_comment,
467                             BOOL bcast,BOOL recurse,
468                                 struct in_addr send_ip, struct in_addr reply_to_ip);
469 struct response_record *queue_netbios_packet(struct subnet_record *d,
470                         int fd,int quest_type,enum state_type state,char *name,
471                         int name_type,int nb_flags, time_t ttl,
472                         int server_type, char *my_name, char *my_comment,
473                         BOOL bcast,BOOL recurse,
474                         struct in_addr send_ip, struct in_addr reply_to_ip);
475
476 /*The following definitions come from  nameserv.c  */
477
478 void remove_name_entry(struct subnet_record *d, char *name,int type);
479 void add_my_name_entry(struct subnet_record *d,char *name,int type,int nb_flags);
480 void add_domain_names(time_t t);
481 void add_my_names(void);
482 void remove_my_names();
483 void refresh_my_names(time_t t);
484 void query_refresh_names(time_t t);
485
486 /*The following definitions come from  nameservreply.c  */
487
488 void add_name_respond(struct subnet_record *d, int fd, struct in_addr from_ip,
489                                 uint16 response_id,
490                                 struct nmb_name *name,
491                                 int nb_flags, int ttl, struct in_addr register_ip,
492                                 BOOL new_owner, struct in_addr reply_to_ip);
493 void send_name_response(int fd, struct in_addr from_ip,
494                                 int name_trn_id, int opcode, BOOL success, BOOL recurse,
495                                 struct nmb_name *reply_name, int nb_flags, int ttl,
496                                 struct in_addr ip);
497 void reply_name_release(struct packet_struct *p);
498 void reply_name_reg(struct packet_struct *p);
499 void reply_name_status(struct packet_struct *p);
500 void reply_name_query(struct packet_struct *p);
501
502 /*The following definitions come from  nameservresp.c  */
503
504 void debug_state_type(int state);
505 void response_netbios_packet(struct packet_struct *p);
506
507 /*The following definitions come from  namework.c  */
508
509 void reset_server(char *name, int state, struct in_addr ip);
510 void tell_become_backup(void);
511 BOOL same_context(struct dgram_packet *dgram);
512 void process_browse_packet(struct packet_struct *p,char *buf,int len);
513
514 /*The following definitions come from  nmbd.c  */
515
516 BOOL reload_services(BOOL test);
517
518 /*The following definitions come from  nmblib.c  */
519
520 void debug_nmb_packet(struct packet_struct *p);
521 char *namestr(struct nmb_name *n);
522 void free_nmb_packet(struct nmb_packet *nmb);
523 void free_packet(struct packet_struct *packet);
524 struct packet_struct *read_packet(int fd,enum packet_type packet_type);
525 void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope);
526 BOOL send_packet(struct packet_struct *p);
527 struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
528
529 /*The following definitions come from  nmblookup.c  */
530
531 int main(int argc,char *argv[]);
532
533 /*The following definitions come from  nmbsync.c  */
534
535 char *getsmbpass(char *pass);
536 void sync_browse_lists(struct subnet_record *d, struct work_record *work,
537                 char *name, int nm_type, struct in_addr ip, BOOL local);
538
539 /*The following definitions come from  params.c  */
540
541 BOOL pm_process(char *pszFileName,BOOL (*sfunc)(char *),BOOL (*pfunc)(char *,char *));
542
543 /*The following definitions come from  password.c  */
544
545 void generate_next_challenge(char *challenge);
546 BOOL set_challenge(char *challenge);
547 BOOL last_challenge(char *challenge);
548 user_struct *get_valid_user_struct(uint16 vuid);
549 void invalidate_vuid(uint16 vuid);
550 char *validated_username(uint16 vuid);
551 uint16 register_vuid(int uid,int gid, char *name,BOOL guest);
552 void add_session_user(char *user);
553 void dfs_unlogin(void);
554 BOOL password_check(char *password);
555 BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8);
556 BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd);
557 BOOL user_ok(char *user,int snum);
558 BOOL authorise_login(int snum,char *user,char *password, int pwlen, 
559                      BOOL *guest,BOOL *force,uint16 vuid);
560 BOOL check_hosts_equiv(char *user);
561 BOOL server_cryptkey(char *buf);
562 BOOL server_validate(char *buf);
563
564 /*The following definitions come from  pcap.c  */
565
566 BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
567 void pcap_printer_fn(void (*fn)());
568
569 /*The following definitions come from  pipes.c  */
570
571 int reply_open_pipe_and_X(char *inbuf,char *outbuf,int length,int bufsize);
572 BOOL api_LsarpcSNPHS(int cnum,int uid, char *param,char *data,
573                      int mdrcnt,int mprcnt,
574                      char **rdata,char **rparam,
575                      int *rdata_len,int *rparam_len);
576 BOOL api_LsarpcTNP(int cnum,int uid, char *param,char *data,
577                      int mdrcnt,int mprcnt,
578                      char **rdata,char **rparam,
579                      int *rdata_len,int *rparam_len);
580
581 /*The following definitions come from  predict.c  */
582
583 int read_predict(int fd,int offset,char *buf,char **ptr,int num);
584 void do_read_prediction();
585 void invalidate_read_prediction(int fd);
586
587 /*The following definitions come from  printing.c  */
588
589 void lpq_reset(int snum);
590 void print_file(int fnum);
591 int get_printqueue(int snum,int cnum,print_queue_struct **queue,
592                    print_status_struct *status);
593 void del_printqueue(int cnum,int snum,int jobid);
594 void status_printjob(int cnum,int snum,int jobid,int status);
595
596 /*The following definitions come from  quotas.c  */
597
598 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
599 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
600 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
601 BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
602
603 /*The following definitions come from  replace.c  */
604
605 char *Strstr(char *s, char *p);
606 time_t Mktime(struct tm      *t);
607 int InNetGr(char *group,char *host,char *user,char *dom);
608 void *malloc_wrapped(int size,char *file,int line);
609 void *realloc_wrapped(void *ptr,int size,char *file,int line);
610 void free_wrapped(void *ptr,char *file,int line);
611 void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
612
613 /*The following definitions come from  reply.c  */
614
615 int reply_special(char *inbuf,char *outbuf);
616 int reply_tcon(char *inbuf,char *outbuf);
617 int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize);
618 int reply_unknown(char *inbuf,char *outbuf);
619 int reply_ioctl(char *inbuf,char *outbuf);
620 int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize);
621 int reply_chkpth(char *inbuf,char *outbuf);
622 int reply_getatr(char *inbuf,char *outbuf);
623 int reply_setatr(char *inbuf,char *outbuf);
624 int reply_dskattr(char *inbuf,char *outbuf);
625 int reply_search(char *inbuf,char *outbuf);
626 int reply_fclose(char *inbuf,char *outbuf);
627 int reply_open(char *inbuf,char *outbuf);
628 int reply_open_and_X(char *inbuf,char *outbuf,int length,int bufsize);
629 int reply_ulogoffX(char *inbuf,char *outbuf,int length,int bufsize);
630 int reply_mknew(char *inbuf,char *outbuf);
631 int reply_ctemp(char *inbuf,char *outbuf);
632 int reply_unlink(char *inbuf,char *outbuf);
633 int reply_readbraw(char *inbuf, char *outbuf);
634 int reply_lockread(char *inbuf,char *outbuf);
635 int reply_read(char *inbuf,char *outbuf);
636 int reply_read_and_X(char *inbuf,char *outbuf,int length,int bufsize);
637 int reply_writebraw(char *inbuf,char *outbuf);
638 int reply_writeunlock(char *inbuf,char *outbuf);
639 int reply_write(char *inbuf,char *outbuf,int dum1,int dum2);
640 int reply_write_and_X(char *inbuf,char *outbuf,int length,int bufsize);
641 int reply_lseek(char *inbuf,char *outbuf);
642 int reply_flush(char *inbuf,char *outbuf);
643 int reply_exit(char *inbuf,char *outbuf);
644 int reply_close(char *inbuf,char *outbuf);
645 int reply_writeclose(char *inbuf,char *outbuf);
646 int reply_lock(char *inbuf,char *outbuf);
647 int reply_unlock(char *inbuf,char *outbuf);
648 int reply_tdis(char *inbuf,char *outbuf);
649 int reply_echo(char *inbuf,char *outbuf);
650 int reply_printopen(char *inbuf,char *outbuf);
651 int reply_printclose(char *inbuf,char *outbuf);
652 int reply_printqueue(char *inbuf,char *outbuf);
653 int reply_printwrite(char *inbuf,char *outbuf);
654 int reply_mkdir(char *inbuf,char *outbuf);
655 int reply_rmdir(char *inbuf,char *outbuf);
656 int reply_mv(char *inbuf,char *outbuf);
657 int reply_copy(char *inbuf,char *outbuf);
658 int reply_setdir(char *inbuf,char *outbuf);
659 int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize);
660 int reply_readbmpx(char *inbuf,char *outbuf,int length,int bufsize);
661 int reply_writebmpx(char *inbuf,char *outbuf);
662 int reply_writebs(char *inbuf,char *outbuf);
663 int reply_setattrE(char *inbuf,char *outbuf);
664 int reply_getattrE(char *inbuf,char *outbuf);
665
666 /*The following definitions come from  server.c  */
667
668 void  *dflt_sig(void);
669 void  killkids(void);
670 mode_t unix_mode(int cnum,int dosmode);
671 int dos_mode(int cnum,char *path,struct stat *sbuf);
672 int dos_chmod(int cnum,char *fname,int dosmode,struct stat *st);
673 BOOL unix_convert(char *name,int cnum,pstring saved_last_component);
674 int disk_free(char *path,int *bsize,int *dfree,int *dsize);
675 int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
676 BOOL check_name(char *name,int cnum);
677 int fd_attempt_open(char *fname, int flags, int mode);
678 void fd_attempt_reopen(char *fname, int mode, file_fd_struct *fd_ptr);
679 int fd_attempt_close(file_fd_struct *fd_ptr);
680 void open_file(int fnum,int cnum,char *fname1,int flags,int mode, struct stat *sbuf);
681 void sync_file(int fnum);
682 void close_file(int fnum);
683 BOOL check_file_sharing(int cnum,char *fname);
684 void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
685                       int mode,int *Access,int *action);
686 int seek_file(int fnum,int pos);
687 int read_file(int fnum,char *data,int pos,int n);
688 int write_file(int fnum,char *data,int n);
689 BOOL become_service(int cnum,BOOL do_chdir);
690 int find_service(char *service);
691 int cached_error_packet(char *inbuf,char *outbuf,int fnum,int line);
692 int unix_error_packet(char *inbuf,char *outbuf,int def_class,uint32 def_code,int line);
693 int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int line);
694 BOOL snum_used(int snum);
695 BOOL reload_services(BOOL test);
696 int setup_groups(char *user, int uid, int gid, int *p_ngroups, 
697                  int **p_igroups, gid_t **p_groups);
698 int make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid);
699 int find_free_file(void );
700 int reply_corep(char *outbuf);
701 int reply_coreplus(char *outbuf);
702 int reply_lanman1(char *outbuf);
703 int reply_lanman2(char *outbuf);
704 int reply_nt1(char *outbuf);
705 void close_cnum(int cnum, uint16 vuid);
706 BOOL yield_connection(int cnum,char *name,int max_connections);
707 BOOL claim_connection(int cnum,char *name,int max_connections,BOOL Clear);
708 void exit_server(char *reason);
709 void standard_sub(int cnum,char *s);
710 char *smb_fn_name(int type);
711 int chain_reply(char *inbuf,char *outbuf,int size,int bufsize);
712 int construct_reply(char *inbuf,char *outbuf,int size,int bufsize);
713
714 /*The following definitions come from  shmem.c  */
715
716 BOOL smb_shm_open( char *file_name, int size);
717 BOOL smb_shm_close( void );
718 BOOL smb_shm_free(smb_shm_offset_t offset);
719 BOOL smb_shm_set_userdef_off(smb_shm_offset_t userdef_off);
720 void * smb_shm_offset2addr(smb_shm_offset_t offset);
721 BOOL smb_shm_lock(void);
722 BOOL smb_shm_unlock(void);
723 BOOL smb_shm_get_usage(int *bytes_free,
724                    int *bytes_used,
725                    int *bytes_overhead);
726
727 /*The following definitions come from  smbencrypt.c  */
728
729 void str_to_key(uchar *str,uchar *key);
730 void D1(uchar *k, uchar *d, uchar *out);
731 void E1(uchar *k, uchar *d, uchar *out);
732 void E_P16(uchar *p14,uchar *p16);
733 void E_P24(uchar *p21, uchar *c8, uchar *p24);
734 void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
735 void E_md4hash(uchar *passwd, uchar *p16);
736 void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
737
738 /*The following definitions come from  smbpass.c  */
739
740 int pw_file_lock(char *name, int type, int secs);
741 int pw_file_unlock(int fd);
742 struct smb_passwd *get_smbpwnam(char *name);
743
744 /*The following definitions come from  smbpasswd.c  */
745
746
747 /*The following definitions come from  smbrun.c  */
748
749
750 /*The following definitions come from  status.c  */
751
752 void Ucrit_addUsername(pstring username);
753 unsigned int Ucrit_checkUsername(pstring username);
754 void Ucrit_addPid(int pid);
755 unsigned int   Ucrit_checkPid(int pid);
756
757 /*The following definitions come from  system.c  */
758
759 int sys_select(fd_set *fds,struct timeval *tval);
760 int sys_select(fd_set *fds,struct timeval *tval);
761 int sys_unlink(char *fname);
762 int sys_open(char *fname,int flags,int mode);
763 DIR *sys_opendir(char *dname);
764 int sys_stat(char *fname,struct stat *sbuf);
765 int sys_waitpid(pid_t pid,int *status,int options);
766 int sys_lstat(char *fname,struct stat *sbuf);
767 int sys_mkdir(char *dname,int mode);
768 int sys_rmdir(char *dname);
769 int sys_chdir(char *dname);
770 int sys_utime(char *fname,struct utimbuf *times);
771 int sys_rename(char *from, char *to);
772 int sys_chmod(char *fname,int mode);
773 int sys_chown(char *fname,int uid,int gid);
774 int sys_chroot(char *dname);
775 struct hostent *sys_gethostbyname(char *name);
776
777 /*The following definitions come from  testparm.c  */
778
779
780 /*The following definitions come from  testprns.c  */
781
782 int main(int argc, char *argv[]);
783
784 /*The following definitions come from  time.c  */
785
786 void GetTimeOfDay(struct timeval *tval);
787 void TimeInit(void);
788 int TimeDiff(time_t t);
789 struct tm *LocalTime(time_t *t);
790 time_t interpret_long_date(char *p);
791 void put_long_date(char *p,time_t t);
792 void put_dos_date(char *buf,int offset,time_t unixdate);
793 void put_dos_date2(char *buf,int offset,time_t unixdate);
794 void put_dos_date3(char *buf,int offset,time_t unixdate);
795 time_t make_unix_date(void *date_ptr);
796 time_t make_unix_date2(void *date_ptr);
797 time_t make_unix_date3(void *date_ptr);
798 BOOL set_filetime(char *fname,time_t mtime);
799 char *timestring(void );
800
801 /*The following definitions come from  trans2.c  */
802
803 int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize);
804 int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize);
805 int reply_transs2(char *inbuf,char *outbuf,int length,int bufsize);
806 int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize);
807
808 /*The following definitions come from  ufc.c  */
809
810 char *ufc_crypt(char *key,char *salt);
811
812 /*The following definitions come from  uid.c  */
813
814 void init_uid(void);
815 BOOL become_guest(void);
816 BOOL become_user(int cnum, uint16 vuid);
817 BOOL unbecome_user(void );
818 int smbrun(char *cmd,char *outfile,BOOL shared);
819
820 /*The following definitions come from  username.c  */
821
822 char *get_home_dir(char *user);
823 void map_username(char *user);
824 struct passwd *Get_Pwnam(char *user,BOOL allow_change);
825 BOOL user_in_list(char *user,char *list);
826
827 /*The following definitions come from  util.c  */
828
829 void setup_logging(char *pname,BOOL interactive);
830 void reopen_logs(void);
831 char *tmpdir(void);
832 BOOL is_a_socket(int fd);
833 BOOL next_token(char **ptr,char *buff,char *sep);
834 char **toktocliplist(int *ctok, char *sep);
835 void *MemMove(void *dest,void *src,int size);
836 void array_promote(char *array,int elsize,int element);
837 void set_socket_options(int fd, char *options);
838 void close_sockets(void );
839 BOOL in_group(gid_t group, int current_gid, int ngroups, int *groups);
840 char *StrCpy(char *dest,char *src);
841 char *StrnCpy(char *dest,char *src,int n);
842 void putip(void *dest,void *src);
843 int name_mangle(char *In,char *Out,char name_type);
844 BOOL file_exist(char *fname,struct stat *sbuf);
845 time_t file_modtime(char *fname);
846 BOOL directory_exist(char *dname,struct stat *st);
847 uint32 file_size(char *file_name);
848 char *attrib_string(int mode);
849 int StrCaseCmp(const char *s, const char *t);
850 int StrnCaseCmp(const char *s, const char *t, int n);
851 BOOL strequal(char *s1,char *s2);
852 BOOL strnequal(char *s1,char *s2,int n);
853 BOOL strcsequal(char *s1,char *s2);
854 void strlower(char *s);
855 void strupper(char *s);
856 void strnorm(char *s);
857 BOOL strisnormal(char *s);
858 void string_replace(char *s,char oldc,char newc);
859 void unix_format(char *fname);
860 void dos_format(char *fname);
861 void show_msg(char *buf);
862 int smb_len(char *buf);
863 void _smb_setlen(char *buf,int len);
864 void smb_setlen(char *buf,int len);
865 int set_message(char *buf,int num_words,int num_bytes,BOOL zero);
866 int smb_numwords(char *buf);
867 int smb_buflen(char *buf);
868 int smb_buf_ofs(char *buf);
869 char *smb_buf(char *buf);
870 int smb_offset(char *p,char *buf);
871 char *skip_string(char *buf,int n);
872 BOOL trim_string(char *s,char *front,char *back);
873 void dos_clean_name(char *s);
874 void unix_clean_name(char *s);
875 int ChDir(char *path);
876 char *GetWd(char *str);
877 BOOL reduce_name(char *s,char *dir,BOOL widelinks);
878 void expand_mask(char *Mask,BOOL doext);
879 BOOL strhasupper(char *s);
880 BOOL strhaslower(char *s);
881 int count_chars(char *s,char c);
882 void make_dir_struct(char *buf,char *mask,char *fname,unsigned int size,int mode,time_t date);
883 void close_low_fds(void);
884 int set_blocking(int fd, int set);
885 int write_socket(int fd,char *buf,int len);
886 int read_udp_socket(int fd,char *buf,int len);
887 int read_with_timeout(int fd,char *buf,int mincnt,int maxcnt,long time_out);
888 int read_max_udp(int fd,char *buffer,int bufsize,int maxtime);
889 int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew);
890 BOOL send_keepalive(int client);
891 int read_data(int fd,char *buffer,int N);
892 int write_data(int fd,char *buffer,int N);
893 int transfer_file(int infd,int outfd,int n,char *header,int headlen,int align);
894 int read_smb_length(int fd,char *inbuf,int timeout);
895 BOOL receive_smb(int fd,char *buffer,int timeout);
896 BOOL send_smb(int fd,char *buffer);
897 char *name_ptr(char *buf,int ofs);
898 int name_extract(char *buf,int ofs,char *name);
899 int name_len(char *s);
900 BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
901 void msleep(int t);
902 BOOL in_list(char *s,char *list,BOOL casesensitive);
903 BOOL string_init(char **dest,char *src);
904 void string_free(char **s);
905 BOOL string_set(char **dest,char *src);
906 BOOL string_sub(char *s,char *pattern,char *insert);
907 BOOL do_match(char *str, char *regexp, int case_sig);
908 BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2);
909 void become_daemon(void);
910 BOOL yesno(char *p);
911 char *fgets_slash(char *s2,int maxlen,FILE *f);
912 int set_filelen(int fd, long len);
913 int byte_checksum(char *buf,int len);
914 char *dirname_dos(char *path,char *buf);
915 void *Realloc(void *p,int size);
916 void Abort(void );
917 BOOL get_myname(char *my_name,struct in_addr *ip);
918 BOOL ip_equal(struct in_addr ip1,struct in_addr ip2);
919 int open_socket_in(int type, int port, int dlevel,uint32 socket_addr);
920 int open_socket_out(int type, struct in_addr *addr, int port ,int timeout);
921 int interpret_protocol(char *str,int def);
922 int interpret_security(char *str,int def);
923 uint32 interpret_addr(char *str);
924 struct in_addr *interpret_addr2(char *str);
925 BOOL zero_ip(struct in_addr ip);
926 char *client_name(void);
927 char *client_addr(void);
928 void standard_sub_basic(char *s);
929 BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
930 int PutUniCode(char *dst,char *src);
931 struct hostent *Get_Hostbyname(char *name);
932 BOOL process_exists(int pid);
933 char *uidtoname(int uid);
934 char *gidtoname(int gid);
935 void BlockSignals(BOOL block,int signum);
936 void ajt_panic(void);
937 char *readdirname(void *p);
938 BOOL is_vetoed_name(char *name);
939 BOOL is_vetoed_path(char *name);
940 BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
941 int file_lock(char *name,int timeout);
942 void file_unlock(int fd);
943
944 /*The following definitions come from  vt_mode.c  */
945
946 int     VT_Check(char   *buffer);
947 int VT_Start_utmp(void);
948 int VT_Stop_utmp(void);
949 void    VT_AtExit(void);
950 void    VT_SigCLD(int   sig);
951 void    VT_SigEXIT(int  sig);
952 int     VT_Start(void);
953 int     VT_Output(char  *Buffer);
954 int     VT_Input(char   *Buffer,int             Size);
955 void VT_Process(void);