1 /* This file is automatically generated with "make proto". DO NOT EDIT */
4 /*The following definitions come from access.c */
6 BOOL
check_access(int snum
);
7 BOOL
allow_access(char *deny_list
,char *allow_list
,char *cname
,char *caddr
);
9 /*The following definitions come from asyncdns.c */
11 int asyncdns_fd(void);
12 void start_async_dns(void);
13 void run_dns_queue(void);
14 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
15 struct name_record
**n
);
16 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
17 struct name_record
**n
);
19 /*The following definitions come from cgi.c */
21 void cgi_load_variables(FILE *f1
);
22 char *cgi_variable(char *name
);
23 char *cgi_vnum(int i
, char **name
);
24 int cgi_boolean(char *name
, int def
);
25 char *quotedup(char *s
);
26 char *urlquote(char *s
);
27 char *quotequotes(char *s
);
28 void quote_spaces(char *buf
);
29 void cgi_setup(char *rootdir
);
31 /*The following definitions come from charcnv.c */
33 char *unix2dos_format(char *str
,BOOL overwrite
);
34 char *dos2unix_format(char *str
, BOOL overwrite
);
35 void interpret_character_set(char *str
);
37 /*The following definitions come from charset.c */
39 void charset_initialise();
40 void codepage_initialise(int client_codepage
);
41 void add_char_string(char *s
);
43 /*The following definitions come from chgpasswd.c */
45 BOOL
chat_with_program(char *passwordprogram
,char *name
,char *chatsequence
);
46 BOOL
chgpasswd(char *name
,char *oldpass
,char *newpass
);
47 BOOL
chgpasswd(char *name
,char *oldpass
,char *newpass
);
49 /*The following definitions come from client.c */
51 void cli_smb_close(char *inbuf
, char *outbuf
, int clnt_fd
, int c_num
, int f_num
);
52 void do_dir(char *inbuf
,char *outbuf
,char *Mask
,int attribute
,void (*fn
)(),BOOL recurse_dir
);
55 /*The following definitions come from clientgen.c */
57 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
58 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
59 void (*fn
)(char *, uint32
, char *));
60 BOOL
cli_session_setup(struct cli_state
*cli
,
62 char *pass
, int passlen
,
63 char *ntpass
, int ntpasslen
,
65 BOOL
cli_send_tconX(struct cli_state
*cli
,
66 char *share
, char *dev
, char *pass
, int passlen
);
67 BOOL
cli_tdis(struct cli_state
*cli
);
68 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
69 int cli_open(struct cli_state
*cli
, char *fname
, int flags
, int share_mode
);
70 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
71 BOOL
cli_lock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
, int timeout
);
72 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
, int timeout
);
73 int cli_read(struct cli_state
*cli
, int fnum
, char *buf
, uint32 offset
, uint16 size
);
74 int cli_write(struct cli_state
*cli
, int fnum
, char *buf
, uint32 offset
, uint16 size
);
75 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
76 int *attr
, uint32
*size
, time_t *t
);
77 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, int attr
, time_t t
);
78 BOOL
cli_qpathinfo(struct cli_state
*cli
, char *fname
,
79 time_t *c_time
, time_t *a_time
, time_t *m_time
, uint32
*size
);
80 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
81 time_t *c_time
, time_t *a_time
, time_t *m_time
, uint32
*size
);
82 BOOL
cli_negprot(struct cli_state
*cli
);
83 BOOL
cli_session_request(struct cli_state
*cli
, char *host
, int name_type
,
85 BOOL
cli_connect(struct cli_state
*cli
, char *host
, struct in_addr
*ip
);
86 BOOL
cli_initialise(struct cli_state
*cli
);
87 void cli_shutdown(struct cli_state
*cli
);
88 char *cli_errstr(struct cli_state
*cli
);
89 void cli_error(struct cli_state
*cli
, int *eclass
, int *num
);
90 void cli_sockopt(struct cli_state
*cli
, char *options
);
91 int cli_setpid(struct cli_state
*cli
, int pid
);
93 /*The following definitions come from clientutil.c */
95 void cli_setup_pkt(char *outbuf
);
96 BOOL
cli_call_api(char *pipe_name
, int pipe_name_len
,
97 int prcnt
,int drcnt
, int srcnt
,
98 int mprcnt
,int mdrcnt
,
99 int *rprcnt
,int *rdrcnt
,
100 char *param
,char *data
, uint16
*setup
,
101 char **rparam
,char **rdata
);
102 BOOL
cli_receive_trans_response(char *inbuf
,int trans
,
103 int *data_len
,int *param_len
,
104 char **data
,char **param
);
105 BOOL
cli_send_trans_request(char *outbuf
,int trans
,
106 char *name
,int namelen
, int fid
,int flags
,
107 char *data
,char *param
,uint16
*setup
,
108 int ldata
,int lparam
,int lsetup
,
109 int mdata
,int mparam
,int msetup
);
110 BOOL
cli_send_session_request(char *inbuf
,char *outbuf
);
111 BOOL
cli_send_login(char *inbuf
,char *outbuf
,BOOL start_session
,BOOL use_setup
);
112 void cli_send_logout(void );
113 BOOL
cli_open_sockets(int port
);
114 BOOL
cli_reopen_connection(char *inbuf
,char *outbuf
);
116 /*The following definitions come from clitar.c */
118 int padit(char *buf
, int bufsize
, int padsize
);
119 void cmd_block(void);
120 void cmd_tarmode(void);
121 void cmd_setmode(void);
122 void cmd_tar(char *inbuf
, char *outbuf
);
123 int process_tar(char *inbuf
, char *outbuf
);
124 int clipfind(char **aret
, int ret
, char *tok
);
125 int tar_parseargs(int argc
, char *argv
[], char *Optarg
, int Optind
);
127 /*The following definitions come from credentials.c */
129 char *credstr(uchar
*cred
);
130 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, char *pass
,
131 uchar session_key
[8]);
132 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
134 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
136 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
137 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
138 BOOL
deal_with_creds(uchar sess_key
[8],
139 DOM_CRED
*sto_clnt_cred
,
140 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
142 /*The following definitions come from dir.c */
144 void init_dptrs(void);
145 char *dptr_path(int key
);
146 char *dptr_wcard(int key
);
147 BOOL
dptr_set_wcard(int key
, char *wcard
);
148 BOOL
dptr_set_attr(int key
, uint16 attr
);
149 uint16
dptr_attr(int key
);
150 void dptr_close(int key
);
151 void dptr_closecnum(int cnum
);
152 void dptr_idlecnum(int cnum
);
153 void dptr_closepath(char *path
,int pid
);
154 int dptr_create(int cnum
,char *path
, BOOL expect_close
,int pid
);
155 BOOL
dptr_fill(char *buf1
,unsigned int key
);
156 BOOL
dptr_zero(char *buf
);
157 void *dptr_fetch(char *buf
,int *num
);
158 void *dptr_fetch_lanman2(char *params
,int dptr_num
);
159 BOOL
dir_check_ftype(int cnum
,int mode
,struct stat
*st
,int dirtype
);
160 BOOL
get_dir_entry(int cnum
,char *mask
,int dirtype
,char *fname
,int *size
,int *mode
,time_t *date
,BOOL check_descend
);
161 void *OpenDir(int cnum
, char *name
, BOOL use_veto
);
162 void CloseDir(void *p
);
163 char *ReadDirName(void *p
);
164 BOOL
SeekDir(void *p
,int pos
);
165 int TellDir(void *p
);
166 void DirCacheAdd( char *path
, char *name
, char *dname
, int snum
);
167 char *DirCacheCheck( char *path
, char *name
, int snum
);
168 void DirCacheFlush( int snum
);
170 /*The following definitions come from fault.c */
172 void fault_setup(void (*fn
)());
174 /*The following definitions come from getsmbpass.c */
176 char *getsmbpass(char *prompt
) ;
178 /*The following definitions come from interface.c */
180 void load_interfaces(void);
181 void iface_set_default(char *ip
,char *bcast
,char *nmask
);
182 BOOL
ismyip(struct in_addr ip
);
183 BOOL
ismybcast(struct in_addr bcast
);
184 BOOL
is_local_net(struct in_addr from
);
185 int iface_count(void);
186 struct in_addr
*iface_n_ip(int n
);
187 struct in_addr
*iface_bcast(struct in_addr ip
);
188 struct in_addr
*iface_nmask(struct in_addr ip
);
189 struct in_addr
*iface_ip(struct in_addr ip
);
191 /*The following definitions come from ipc.c */
193 int get_printerdrivernumber(int snum
);
194 int reply_trans(char *inbuf
,char *outbuf
, int size
, int bufsize
);
196 /*The following definitions come from kanji.c */
198 char *sj_strtok(char *s1
, char *s2
);
199 char *sj_strstr(char *s1
, char *s2
);
200 char *sj_strchr (char *s
, int c
);
201 char *sj_strrchr(char *s
, int c
);
202 int interpret_coding_system(char *str
);
204 /*The following definitions come from loadparm.c */
206 char *lp_string(char *s
);
207 char *lp_logfile(void);
208 char *lp_smbrun(void);
209 char *lp_configfile(void);
210 char *lp_smb_passwd_file(void);
211 char *lp_serverstring(void);
212 char *lp_printcapname(void);
213 char *lp_lockdir(void);
214 char *lp_rootdir(void);
215 char *lp_defaultservice(void);
216 char *lp_msg_command(void);
217 char *lp_dfree_command(void);
218 char *lp_hosts_equiv(void);
219 char *lp_auto_services(void);
220 char *lp_passwd_program(void);
221 char *lp_passwd_chat(void);
222 char *lp_passwordserver(void);
223 char *lp_workgroup(void);
224 char *lp_username_map(void);
225 char *lp_character_set(void);
226 char *lp_logon_script(void);
227 char *lp_logon_path(void);
228 char *lp_logon_drive(void);
229 char *lp_logon_home(void);
230 char *lp_remote_announce(void);
231 char *lp_remote_browse_sync(void);
232 char *lp_wins_server(void);
233 char *lp_interfaces(void);
234 char *lp_socket_address(void);
235 char *lp_nis_home_map_name(void);
236 char *lp_announce_version(void);
237 char *lp_netbios_aliases(void);
238 char *lp_driverfile(void);
239 char *lp_domain_sid(void);
240 char *lp_domain_other_sids(void);
241 char *lp_domain_groups(void);
242 char *lp_domain_admin_users(void);
243 char *lp_domain_guest_users(void);
244 char *lp_domain_hostsallow(void);
245 char *lp_domain_hostsdeny(void);
246 BOOL
lp_dns_proxy(void);
247 BOOL
lp_wins_support(void);
248 BOOL
lp_wins_proxy(void);
249 BOOL
lp_local_master(void);
250 BOOL
lp_domain_controller(void);
251 BOOL
lp_domain_master(void);
252 BOOL
lp_domain_logons(void);
253 BOOL
lp_preferred_master(void);
254 BOOL
lp_load_printers(void);
255 BOOL
lp_use_rhosts(void);
256 BOOL
lp_getwdcache(void);
257 BOOL
lp_readprediction(void);
258 BOOL
lp_readbmpx(void);
259 BOOL
lp_readraw(void);
260 BOOL
lp_writeraw(void);
261 BOOL
lp_null_passwords(void);
262 BOOL
lp_strip_dot(void);
263 BOOL
lp_encrypted_passwords(void);
264 BOOL
lp_syslog_only(void);
265 BOOL
lp_browse_list(void);
266 BOOL
lp_unix_realname(void);
267 BOOL
lp_nis_home_map(void);
268 BOOL
lp_time_server(void);
269 BOOL
lp_bind_interfaces_only(void);
270 int lp_os_level(void);
271 int lp_max_ttl(void);
272 int lp_max_log_size(void);
273 int lp_mangledstack(void);
274 int lp_maxxmit(void);
276 int lp_maxpacket(void);
277 int lp_keepalive(void);
278 int lp_passwordlevel(void);
279 int lp_usernamelevel(void);
280 int lp_readsize(void);
281 int lp_shmem_size(void);
282 int lp_deadtime(void);
283 int lp_maxprotocol(void);
284 int lp_security(void);
285 int lp_printing(void);
286 int lp_maxdisksize(void);
287 int lp_lpqcachetime(void);
289 int lp_client_code_page(void);
290 int lp_announce_as(void);
291 char *lp_preexec(int );
292 char *lp_postexec(int );
293 char *lp_rootpreexec(int );
294 char *lp_rootpostexec(int );
295 char *lp_servicename(int );
296 char *lp_pathname(int );
297 char *lp_dontdescend(int );
298 char *lp_username(int );
299 char *lp_guestaccount(int );
300 char *lp_invalid_users(int );
301 char *lp_valid_users(int );
302 char *lp_admin_users(int );
303 char *lp_printcommand(int );
304 char *lp_lpqcommand(int );
305 char *lp_lprmcommand(int );
306 char *lp_lppausecommand(int );
307 char *lp_lpresumecommand(int );
308 char *lp_printername(int );
309 char *lp_printerdriver(int );
310 char *lp_hostsallow(int );
311 char *lp_hostsdeny(int );
312 char *lp_magicscript(int );
313 char *lp_magicoutput(int );
314 char *lp_comment(int );
315 char *lp_force_user(int );
316 char *lp_force_group(int );
317 char *lp_readlist(int );
318 char *lp_writelist(int );
319 char *lp_volume(int );
320 char *lp_mangled_map(int );
321 char *lp_veto_files(int );
322 char *lp_hide_files(int );
323 char *lp_veto_oplocks(int );
324 char *lp_driverlocation(int );
325 BOOL
lp_alternate_permissions(int );
326 BOOL
lp_revalidate(int );
327 BOOL
lp_casesensitive(int );
328 BOOL
lp_preservecase(int );
329 BOOL
lp_shortpreservecase(int );
330 BOOL
lp_casemangle(int );
331 BOOL
lp_status(int );
332 BOOL
lp_hide_dot_files(int );
333 BOOL
lp_browseable(int );
334 BOOL
lp_readonly(int );
335 BOOL
lp_no_set_dir(int );
336 BOOL
lp_guest_ok(int );
337 BOOL
lp_guest_only(int );
338 BOOL
lp_print_ok(int );
339 BOOL
lp_postscript(int );
340 BOOL
lp_map_hidden(int );
341 BOOL
lp_map_archive(int );
342 BOOL
lp_locking(int );
343 BOOL
lp_strict_locking(int );
344 BOOL
lp_share_modes(int );
345 BOOL
lp_oplocks(int );
346 BOOL
lp_onlyuser(int );
347 BOOL
lp_manglednames(int );
348 BOOL
lp_widelinks(int );
349 BOOL
lp_symlinks(int );
350 BOOL
lp_syncalways(int );
351 BOOL
lp_map_system(int );
352 BOOL
lp_delete_readonly(int );
353 BOOL
lp_fake_oplocks(int );
354 BOOL
lp_recursive_veto_delete(int );
355 BOOL
lp_dos_filetimes(int );
356 int lp_create_mode(int );
357 int lp_force_create_mode(int );
358 int lp_dir_mode(int );
359 int lp_force_dir_mode(int );
360 int lp_max_connections(int );
361 int lp_defaultcase(int );
362 int lp_minprintspace(int );
363 char lp_magicchar(int );
364 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
365 int lp_add_service(char *pszService
, int iDefaultService
);
366 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
367 BOOL
lp_file_list_changed(void);
368 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
369 int lp_next_parameter(int snum
, int *i
, char *label
,
370 char *value
, int allparameters
);
371 BOOL
lp_snum_ok(int iService
);
372 BOOL
lp_loaded(void);
373 void lp_killunused(BOOL (*snumused
)(int ));
374 BOOL
lp_load(char *pszFname
,BOOL global_only
);
375 int lp_numservices(void);
376 void lp_dump(FILE *f
);
377 int lp_servicenumber(char *pszServiceName
);
378 char *volume_label(int snum
);
379 void lp_rename_service(int snum
, char *new_name
);
380 void lp_remove_service(int snum
);
381 void lp_copy_service(int snum
, char *new_name
);
382 int lp_default_server_announce(void);
383 int lp_major_announce_version(void);
384 int lp_minor_announce_version(void);
386 /*The following definitions come from locking.c */
388 BOOL
is_locked(int fnum
,int cnum
,uint32 count
,uint32 offset
);
389 BOOL
do_lock(int fnum
,int cnum
,uint32 count
,uint32 offset
,int *eclass
,uint32
*ecode
);
390 BOOL
do_unlock(int fnum
,int cnum
,uint32 count
,uint32 offset
,int *eclass
,uint32
*ecode
);
391 BOOL
locking_init(int read_only
);
392 BOOL
locking_end(void);
393 BOOL
lock_share_entry(int cnum
, uint32 dev
, uint32 inode
, int *ptok
);
394 BOOL
unlock_share_entry(int cnum
, uint32 dev
, uint32 inode
, int token
);
395 int get_share_modes(int cnum
, int token
, uint32 dev
, uint32 inode
,
396 share_mode_entry
**shares
);
397 void del_share_mode(int token
, int fnum
);
398 BOOL
set_share_mode(int token
, int fnum
, uint16 port
, uint16 op_type
);
399 BOOL
remove_share_oplock(int fnum
, int token
);
400 int share_mode_forall(void (*fn
)(share_mode_entry
*, char *));
401 void share_status(FILE *f
);
403 /*The following definitions come from locking_shm.c */
405 struct share_ops
*locking_shm_init(int ronly
);
407 /*The following definitions come from locking_slow.c */
409 struct share_ops
*locking_slow_init(int ronly
);
411 /*The following definitions come from mangle.c */
413 int str_checksum(char *s
);
414 BOOL
is_8_3(char *fname
, BOOL check_case
);
415 void reset_mangled_stack( int size
);
416 BOOL
check_mangled_stack(char *s
);
417 BOOL
is_mangled( char *s
);
418 void mangle_name_83(char *s
);
419 BOOL
name_map_mangle(char *OutName
,BOOL need83
,int snum
);
421 /*The following definitions come from md4.c */
423 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
425 /*The following definitions come from message.c */
427 int reply_sends(char *inbuf
,char *outbuf
);
428 int reply_sendstrt(char *inbuf
,char *outbuf
);
429 int reply_sendtxt(char *inbuf
,char *outbuf
);
430 int reply_sendend(char *inbuf
,char *outbuf
);
432 /*The following definitions come from nameannounce.c */
434 void announce_request(struct work_record
*work
, struct in_addr ip
);
435 void do_announce_request(char *info
, char *to_name
, int announce_type
,
437 int to
, struct in_addr dest_ip
);
438 void sync_server(enum state_type state
, char *serv_name
, char *work_name
,
440 struct subnet_record
*d
,
442 void announce_my_servers_removed(void);
443 void announce_server(struct subnet_record
*d
, struct work_record
*work
,
444 char *name
, char *comment
, time_t ttl
, int server_type
);
445 void announce_host(time_t t
);
446 void reset_announce_timer();
447 void announce_master(time_t t
);
448 void announce_remote(time_t t
);
449 void browse_sync_remote(time_t t
);
451 /*The following definitions come from namebrowse.c */
453 void expire_browse_cache(time_t t
);
454 struct browse_cache_record
*add_browser_entry(char *name
, int type
, char *wg
,
455 time_t ttl
, struct subnet_record
*d
,
456 struct in_addr ip
, BOOL local
);
457 void do_browser_lists(time_t t
);
459 /*The following definitions come from namedbname.c */
461 void set_samba_nb_type(void);
462 BOOL
name_equal(struct nmb_name
*n1
,struct nmb_name
*n2
);
463 BOOL
ms_browser_name(char *name
, int type
);
464 void remove_name(struct subnet_record
*d
, struct name_record
*n
);
465 struct name_record
*find_name_on_subnet(struct subnet_record
*d
,
466 struct nmb_name
*name
, BOOL self_only
);
467 void dump_names(void);
468 void load_netbios_names(void);
469 void remove_netbios_name(struct subnet_record
*d
,
470 char *name
,int type
, enum name_source source
);
471 struct name_record
*add_netbios_entry(struct subnet_record
*d
,
472 char *name
, int type
, int nb_flags
, int ttl
,
473 enum name_source source
, struct in_addr ip
, BOOL new_only
);
474 void expire_names(time_t t
);
476 /*The following definitions come from namedbresp.c */
478 void add_response_record(struct subnet_record
*d
,
479 struct response_record
*n
);
480 void remove_response_record(struct subnet_record
*d
,
481 struct response_record
*n
);
482 struct response_record
*make_response_queue_record(enum state_type state
,
484 int quest_type
, char *name
,int type
, int nb_flags
, time_t ttl
,
485 int server_type
, char *my_name
, char *my_comment
,
486 BOOL bcast
,BOOL recurse
,
487 struct in_addr send_ip
, struct in_addr reply_to_ip
,
489 struct response_record
*find_response_record(struct subnet_record
**d
,
492 /*The following definitions come from namedbserver.c */
494 void remove_old_servers(struct work_record
*work
, time_t t
,
496 struct server_record
*find_server(struct work_record
*work
, char *name
);
497 struct server_record
*add_server_entry(struct subnet_record
*d
,
498 struct work_record
*work
,
499 char *name
,int servertype
,
500 int ttl
,char *comment
,
502 void expire_servers(time_t t
);
504 /*The following definitions come from namedbsubnet.c */
506 struct subnet_record
*find_subnet(struct in_addr ip
);
507 struct subnet_record
*find_subnet_all(struct in_addr ip
);
508 void add_workgroup_to_subnet( struct subnet_record
*d
, char *group
);
509 void add_my_subnets(char *group
);
510 void write_browse_list(time_t t
);
512 /*The following definitions come from namedbwork.c */
514 struct work_record
*remove_workgroup(struct subnet_record
*d
,
515 struct work_record
*work
,
516 BOOL remove_all_servers
);
517 struct work_record
*find_workgroupstruct(struct subnet_record
*d
,
518 fstring name
, BOOL add
);
519 void dump_workgroups(void);
521 /*The following definitions come from nameelect.c */
523 void check_master_browser(time_t t
);
524 void browser_gone(char *work_name
, struct in_addr ip
);
525 void send_election(struct subnet_record
*d
, char *group
,uint32 criterion
,
526 int timeup
,char *name
);
527 void name_unregister_work(struct subnet_record
*d
, char *name
, int name_type
);
528 void name_register_work(struct subnet_record
*d
, char *name
, int name_type
,
529 int nb_flags
, time_t ttl
, struct in_addr ip
, BOOL bcast
);
530 void become_local_master(struct subnet_record
*d
, struct work_record
*work
);
531 void become_domain_master(struct subnet_record
*d
, struct work_record
*work
);
532 void become_logon_server(struct subnet_record
*d
, struct work_record
*work
);
533 void unbecome_local_master(struct subnet_record
*d
, struct work_record
*work
,
535 void unbecome_domain_master(struct subnet_record
*d
, struct work_record
*work
,
537 void unbecome_logon_server(struct subnet_record
*d
, struct work_record
*work
,
539 void run_elections(time_t t
);
540 void process_election(struct packet_struct
*p
,char *buf
);
541 BOOL
check_elections(void);
543 /*The following definitions come from namelogon.c */
545 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
);
547 /*The following definitions come from namepacket.c */
549 void debug_browse_data(char *outbuf
, int len
);
550 void initiate_netbios_packet(uint16
*id
,
551 int fd
,int quest_type
,char *name
,int name_type
,
552 int nb_flags
,BOOL bcast
,BOOL recurse
,
553 struct in_addr to_ip
);
554 void reply_netbios_packet(struct packet_struct
*p1
,int trn_id
,
555 int rcode
, int rcv_code
, int opcode
,
556 BOOL recursion_available
,
557 BOOL recursion_desired
,
558 struct nmb_name
*rr_name
,int rr_type
,int rr_class
,int ttl
,
560 void queue_packet(struct packet_struct
*packet
);
561 void run_packet_queue();
562 BOOL
listen_for_packets(BOOL run_election
);
563 BOOL
send_mailslot_reply(BOOL unique
, char *mailslot
,int fd
,char *buf
,int len
,char *srcname
,
564 char *dstname
,int src_type
,int dest_type
,
565 struct in_addr dest_ip
,struct in_addr src_ip
);
567 /*The following definitions come from namequery.c */
569 BOOL
name_status(int fd
,char *name
,int name_type
,BOOL recurse
,
570 struct in_addr to_ip
,char *master
,char *rname
,
572 BOOL
name_query(int fd
,char *name
,int name_type
,
573 BOOL bcast
,BOOL recurse
,
574 struct in_addr to_ip
, struct in_addr
*ip
,void (*fn
)());
576 /*The following definitions come from nameresp.c */
578 void expire_netbios_response_entries(time_t t
);
579 struct response_record
*queue_netbios_pkt_wins(
580 int fd
,int quest_type
,enum state_type state
,
581 char *name
,int name_type
,int nb_flags
, time_t ttl
,
582 int server_type
, char *my_name
, char *my_comment
,
583 struct in_addr send_ip
, struct in_addr reply_to_ip
);
584 struct response_record
*queue_netbios_packet(struct subnet_record
*d
,
585 int fd
,int quest_type
,enum state_type state
,char *name
,
586 int name_type
,int nb_flags
, time_t ttl
,
587 int server_type
, char *my_name
, char *my_comment
,
588 BOOL bcast
,BOOL recurse
,
589 struct in_addr send_ip
, struct in_addr reply_to_ip
,
592 /*The following definitions come from nameserv.c */
594 void remove_name_entry(struct subnet_record
*d
, char *name
,int type
);
595 void add_my_name_entry(struct subnet_record
*d
,char *name
,int type
,int nb_flags
);
596 void add_domain_logon_names(void);
597 void add_domain_master_bcast(void);
598 void add_domain_master_wins(void);
599 void add_domain_names(time_t t
);
600 void add_my_names(void);
601 void remove_my_names();
602 void refresh_my_names(time_t t
);
603 void query_refresh_names(time_t t
);
605 /*The following definitions come from nameservreply.c */
607 void add_name_respond(struct subnet_record
*d
, int fd
, struct in_addr from_ip
,
609 struct nmb_name
*name
,
610 int nb_flags
, int ttl
, struct in_addr register_ip
,
611 BOOL new_owner
, struct in_addr reply_to_ip
);
612 void reply_name_release(struct packet_struct
*p
);
613 void reply_name_reg(struct packet_struct
*p
);
614 void reply_name_status(struct packet_struct
*p
);
615 void reply_name_query(struct packet_struct
*p
);
617 /*The following definitions come from nameservresp.c */
619 void debug_state_type(int state
);
620 void response_netbios_packet(struct packet_struct
*p
);
622 /*The following definitions come from namework.c */
624 void reset_server(char *name
, int state
, struct in_addr ip
);
625 void tell_become_backup(void);
626 BOOL
same_context(struct dgram_packet
*dgram
);
627 void process_browse_packet(struct packet_struct
*p
,char *buf
,int len
);
629 /*The following definitions come from nmbd.c */
631 BOOL
reload_services(BOOL test
);
633 /*The following definitions come from nmblib.c */
635 char *lookup_opcode_name( int opcode
);
636 void debug_nmb_packet(struct packet_struct
*p
);
637 char *namestr(struct nmb_name
*n
);
638 void free_nmb_packet(struct nmb_packet
*nmb
);
639 void free_packet(struct packet_struct
*packet
);
640 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
641 void make_nmb_name(struct nmb_name
*n
,char *name
,int type
,char *this_scope
);
642 BOOL
send_packet(struct packet_struct
*p
);
643 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
645 /*The following definitions come from nmbsync.c */
647 void sync_browse_lists(struct subnet_record
*d
, struct work_record
*work
,
648 char *name
, int nm_type
, struct in_addr ip
, BOOL local
);
650 /*The following definitions come from ntclient.c */
652 BOOL
do_nt_login(char *desthost
, char *myhostname
,
653 int Client
, int cnum
);
655 /*The following definitions come from params.c */
657 BOOL
pm_process( char *FileName
,
658 BOOL (*sfunc
)(char *),
659 BOOL (*pfunc
)(char *, char *) );
661 /*The following definitions come from password.c */
663 void generate_next_challenge(char *challenge
);
664 BOOL
set_challenge(char *challenge
);
665 BOOL
last_challenge(char *challenge
);
666 user_struct
*get_valid_user_struct(uint16 vuid
);
667 void invalidate_vuid(uint16 vuid
);
668 char *validated_username(uint16 vuid
);
669 uint16
register_vuid(int uid
,int gid
, char *name
,BOOL guest
);
670 void add_session_user(char *user
);
671 void dfs_unlogin(void);
672 BOOL
password_check(char *password
);
673 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
674 BOOL
password_ok(char *user
,char *password
, int pwlen
, struct passwd
*pwd
);
675 BOOL
user_ok(char *user
,int snum
);
676 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
677 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
678 BOOL
check_hosts_equiv(char *user
);
679 struct cli_state
*server_client(void);
680 struct cli_state
*server_cryptkey(void);
681 BOOL
server_validate(char *user
, char *domain
,
682 char *pass
, int passlen
,
683 char *ntpass
, int ntpasslen
);
685 /*The following definitions come from pcap.c */
687 BOOL
pcap_printername_ok(char *pszPrintername
, char *pszPrintcapname
);
688 void pcap_printer_fn(void (*fn
)());
690 /*The following definitions come from pipes.c */
692 int reply_open_pipe_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
693 int reply_pipe_close(char *inbuf
,char *outbuf
);
694 BOOL
api_LsarpcSNPHS(int pnum
, int cnum
, char *param
);
695 BOOL
api_LsarpcTNP(int cnum
,int uid
, char *param
,char *data
,
696 int mdrcnt
,int mprcnt
,
697 char **rdata
,char **rparam
,
698 int *rdata_len
,int *rparam_len
);
700 /*The following definitions come from predict.c */
702 int read_predict(int fd
,int offset
,char *buf
,char **ptr
,int num
);
703 void do_read_prediction();
704 void invalidate_read_prediction(int fd
);
706 /*The following definitions come from printing.c */
708 void lpq_reset(int snum
);
709 void print_file(int fnum
);
710 int get_printqueue(int snum
,int cnum
,print_queue_struct
**queue
,
711 print_status_struct
*status
);
712 void del_printqueue(int cnum
,int snum
,int jobid
);
713 void status_printjob(int cnum
,int snum
,int jobid
,int status
);
714 int printjob_encode(int snum
, int job
);
715 void printjob_decode(int jobid
, int *snum
, int *job
);
717 /*The following definitions come from quotas.c */
719 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
720 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
721 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
722 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
723 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
724 BOOL
disk_quotas(char *path
, int *bsize
, int *dfree
, int *dsize
);
726 /*The following definitions come from replace.c */
728 char *Strstr(char *s
, char *p
);
729 time_t Mktime(struct tm
*t
);
730 int InNetGr(char *group
,char *host
,char *user
,char *dom
);
731 void *malloc_wrapped(int size
,char *file
,int line
);
732 void *realloc_wrapped(void *ptr
,int size
,char *file
,int line
);
733 void free_wrapped(void *ptr
,char *file
,int line
);
734 void *memcpy_wrapped(void *d
,void *s
,int l
,char *fname
,int line
);
736 /*The following definitions come from reply.c */
738 int reply_special(char *inbuf
,char *outbuf
);
739 int reply_tcon(char *inbuf
,char *outbuf
);
740 int reply_tcon_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
741 int reply_unknown(char *inbuf
,char *outbuf
);
742 int reply_ioctl(char *inbuf
,char *outbuf
);
743 int reply_sesssetup_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
744 int reply_chkpth(char *inbuf
,char *outbuf
);
745 int reply_getatr(char *inbuf
,char *outbuf
);
746 int reply_setatr(char *inbuf
,char *outbuf
);
747 int reply_dskattr(char *inbuf
,char *outbuf
);
748 int reply_search(char *inbuf
,char *outbuf
);
749 int reply_fclose(char *inbuf
,char *outbuf
);
750 int reply_open(char *inbuf
,char *outbuf
);
751 int reply_open_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
752 int reply_ulogoffX(char *inbuf
,char *outbuf
,int length
,int bufsize
);
753 int reply_mknew(char *inbuf
,char *outbuf
);
754 int reply_ctemp(char *inbuf
,char *outbuf
);
755 int reply_unlink(char *inbuf
,char *outbuf
);
756 int reply_readbraw(char *inbuf
, char *outbuf
);
757 int reply_lockread(char *inbuf
,char *outbuf
);
758 int reply_read(char *inbuf
,char *outbuf
);
759 int reply_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
760 int reply_writebraw(char *inbuf
,char *outbuf
);
761 int reply_writeunlock(char *inbuf
,char *outbuf
);
762 int reply_write(char *inbuf
,char *outbuf
,int dum1
,int dum2
);
763 int reply_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
764 int reply_lseek(char *inbuf
,char *outbuf
);
765 int reply_flush(char *inbuf
,char *outbuf
);
766 int reply_exit(char *inbuf
,char *outbuf
);
767 int reply_close(char *inbuf
,char *outbuf
);
768 int reply_writeclose(char *inbuf
,char *outbuf
);
769 int reply_lock(char *inbuf
,char *outbuf
);
770 int reply_unlock(char *inbuf
,char *outbuf
);
771 int reply_tdis(char *inbuf
,char *outbuf
);
772 int reply_echo(char *inbuf
,char *outbuf
);
773 int reply_printopen(char *inbuf
,char *outbuf
);
774 int reply_printclose(char *inbuf
,char *outbuf
);
775 int reply_printqueue(char *inbuf
,char *outbuf
);
776 int reply_printwrite(char *inbuf
,char *outbuf
);
777 int reply_mkdir(char *inbuf
,char *outbuf
);
778 int reply_rmdir(char *inbuf
,char *outbuf
);
779 int reply_mv(char *inbuf
,char *outbuf
);
780 int reply_copy(char *inbuf
,char *outbuf
);
781 int reply_setdir(char *inbuf
,char *outbuf
);
782 int reply_lockingX(char *inbuf
,char *outbuf
,int length
,int bufsize
);
783 int reply_readbmpx(char *inbuf
,char *outbuf
,int length
,int bufsize
);
784 int reply_writebmpx(char *inbuf
,char *outbuf
);
785 int reply_writebs(char *inbuf
,char *outbuf
);
786 int reply_setattrE(char *inbuf
,char *outbuf
);
787 int reply_getattrE(char *inbuf
,char *outbuf
);
789 /*The following definitions come from rpc_pipes/lsa_hnd.c */
791 void init_lsa_policy_hnd(void);
792 BOOL
open_lsa_policy_hnd(LSA_POL_HND
*hnd
);
793 BOOL
set_lsa_policy_samr_rid(LSA_POL_HND
*hnd
, uint32 rid
);
794 BOOL
set_lsa_policy_samr_pol_status(LSA_POL_HND
*hnd
, uint32 pol_status
);
795 BOOL
set_lsa_policy_samr_sid(LSA_POL_HND
*hnd
, DOM_SID
*sid
);
796 uint32
get_lsa_policy_samr_rid(LSA_POL_HND
*hnd
);
797 BOOL
close_lsa_policy_hnd(LSA_POL_HND
*hnd
);
799 /*The following definitions come from rpc_pipes/lsaparse.c */
801 void make_q_open_pol(LSA_Q_OPEN_POL
*r_q
, char *server_name
,
802 uint32 attributes
, uint32 sec_qos
,
803 uint16 desired_access
);
804 char* lsa_io_q_open_pol(BOOL io
, LSA_Q_OPEN_POL
*r_q
, char *q
, char *base
, int align
, int depth
);
805 char* lsa_io_r_open_pol(BOOL io
, LSA_R_OPEN_POL
*r_p
, char *q
, char *base
, int align
, int depth
);
806 void make_q_query(LSA_Q_QUERY_INFO
*q_q
, LSA_POL_HND
*hnd
, uint16 info_class
);
807 char* lsa_io_q_query(BOOL io
, LSA_Q_QUERY_INFO
*q_q
, char *q
, char *base
, int align
, int depth
);
808 char* lsa_io_q_enum_trust_dom(BOOL io
, LSA_Q_ENUM_TRUST_DOM
*q_e
, char *q
, char *base
, int align
, int depth
);
809 void make_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
*r_e
, LSA_POL_HND
*hnd
, uint32 status
);
810 char* lsa_io_r_enum_trust_dom(BOOL io
, LSA_R_ENUM_TRUST_DOM
*r_e
, char *q
, char *base
, int align
, int depth
);
811 void make_q_close(LSA_Q_CLOSE
*q_c
, LSA_POL_HND
*hnd
);
812 char* lsa_io_q_close(BOOL io
, LSA_Q_CLOSE
*q_c
, char *q
, char *base
, int align
, int depth
);
813 void make_r_close(LSA_R_CLOSE
*q_r
, LSA_POL_HND
*hnd
);
814 char* lsa_io_r_close(BOOL io
, LSA_R_CLOSE
*r_c
, char *q
, char *base
, int align
, int depth
);
815 char* lsa_io_r_query(BOOL io
, LSA_R_QUERY_INFO
*r_q
, char *q
, char *base
, int align
, int depth
);
816 char* lsa_io_q_lookup_sids(BOOL io
, LSA_Q_LOOKUP_SIDS
*q_s
, char *q
, char *base
, int align
, int depth
);
817 char* lsa_io_r_lookup_sids(BOOL io
, LSA_R_LOOKUP_SIDS
*r_s
, char *q
, char *base
, int align
, int depth
);
818 char* lsa_io_q_lookup_rids(BOOL io
, LSA_Q_LOOKUP_RIDS
*q_r
, char *q
, char *base
, int align
, int depth
);
819 char* lsa_io_r_lookup_rids(BOOL io
, LSA_R_LOOKUP_RIDS
*r_r
, char *q
, char *base
, int align
, int depth
);
820 void make_q_req_chal(LSA_Q_REQ_CHAL
*q_c
,
821 char *logon_srv
, char *logon_clnt
,
822 DOM_CHAL
*clnt_chal
);
823 char* lsa_io_q_req_chal(BOOL io
, LSA_Q_REQ_CHAL
*q_c
, char *q
, char *base
, int align
, int depth
);
824 char* lsa_io_r_req_chal(BOOL io
, LSA_R_REQ_CHAL
*r_c
, char *q
, char *base
, int align
, int depth
);
825 void make_q_auth_2(LSA_Q_AUTH_2
*q_a
,
826 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
827 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
828 char* lsa_io_q_auth_2(BOOL io
, LSA_Q_AUTH_2
*q_a
, char *q
, char *base
, int align
, int depth
);
829 char* lsa_io_r_auth_2(BOOL io
, LSA_R_AUTH_2
*r_a
, char *q
, char *base
, int align
, int depth
);
830 void make_q_srv_pwset(LSA_Q_SRV_PWSET
*q_s
, char sess_key
[8],
831 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
832 DOM_CRED
*cred
, char nt_cypher
[16]);
833 char* lsa_io_q_srv_pwset(BOOL io
, LSA_Q_SRV_PWSET
*q_s
, char *q
, char *base
, int align
, int depth
);
834 char* lsa_io_r_srv_pwset(BOOL io
, LSA_R_SRV_PWSET
*r_s
, char *q
, char *base
, int align
, int depth
);
835 char* lsa_io_user_info(BOOL io
, LSA_USER_INFO
*usr
, char *q
, char *base
, int align
, int depth
);
836 char* lsa_io_q_sam_logon(BOOL io
, LSA_Q_SAM_LOGON
*q_l
, char *q
, char *base
, int align
, int depth
);
837 char* lsa_io_r_sam_logon(BOOL io
, LSA_R_SAM_LOGON
*r_l
, char *q
, char *base
, int align
, int depth
);
838 char* lsa_io_q_sam_logoff(BOOL io
, LSA_Q_SAM_LOGOFF
*q_l
, char *q
, char *base
, int align
, int depth
);
839 char* lsa_io_r_sam_logoff(BOOL io
, LSA_R_SAM_LOGOFF
*r_l
, char *q
, char *base
, int align
, int depth
);
841 /*The following definitions come from rpc_pipes/ntclientlsa.c */
843 BOOL
do_lsa_open_policy(uint16 fnum
, uint32 call_id
,
844 char *server_name
, LSA_POL_HND
*hnd
);
845 BOOL
do_lsa_query_info_pol(uint16 fnum
, uint32 call_id
,
846 LSA_POL_HND
*hnd
, uint16 info_class
,
847 fstring domain_name
, pstring domain_sid
);
848 BOOL
do_lsa_close(uint16 fnum
, uint32 call_id
,
851 /*The following definitions come from rpc_pipes/ntclientnet.c */
853 BOOL
do_lsa_req_chal(uint16 fnum
, uint32 call_id
,
854 char *desthost
, char *myhostname
,
855 DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
856 BOOL
do_lsa_auth2(uint16 fnum
, uint32 call_id
,
857 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
858 DOM_CHAL
*clnt_chal
, uint32 neg_flags
, DOM_CHAL
*srv_chal
);
859 BOOL
do_lsa_srv_pwset(uint16 fnum
, uint32 call_id
,
861 char *logon_srv
, char *mach_acct
, uint16 sec_chan_type
, char *comp_name
,
862 DOM_CRED
*clnt_cred
, DOM_CRED
*srv_cred
,
863 char nt_owf_new_mach_pwd
[16]);
864 BOOL
do_lsa_sam_logon(uint16 fnum
, uint32 call_id
,
865 uchar sess_key
[8], DOM_CRED
*sto_clnt_cred
,
866 char *logon_srv
, char *comp_name
,
867 DOM_CRED
*clnt_cred
, DOM_CRED
*rtn_cred
,
868 uint16 logon_level
, uint16 switch_value
, DOM_ID_INFO_1
*id1
,
869 LSA_USER_INFO
*user_info
,
871 BOOL
do_lsa_sam_logoff(uint16 fnum
, uint32 call_id
,
872 uchar sess_key
[8], DOM_CRED
*sto_clnt_cred
,
873 char *logon_srv
, char *comp_name
,
874 DOM_CRED
*clnt_cred
, DOM_CRED
*rtn_cred
,
875 uint16 logon_level
, uint16 switch_value
, DOM_ID_INFO_1
*id1
,
878 /*The following definitions come from rpc_pipes/ntclientpipe.c */
880 uint16
rpc_pipe_open(char *inbuf
, char *outbuf
, char *rname
, int Client
, int cnum
);
881 BOOL
rpc_pipe_set_hnd_state(char *pipe_name
, uint16 fnum
, uint16 device_state
);
882 BOOL
rpc_pipe_bind(char *pipe_name
, uint16 fnum
, uint32 call_id
,
883 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
885 /*The following definitions come from rpc_pipes/pipe_hnd.c */
887 void reset_chain_pnum(void);
888 void init_rpc_pipe_hnd(void);
889 int open_rpc_pipe_hnd(char *pipe_name
, int cnum
);
890 char *get_rpc_pipe_hnd_name(int pnum
);
891 BOOL
set_rpc_pipe_hnd_state(int pnum
, int cnum
, uint16 device_state
);
892 BOOL
close_rpc_pipe_hnd(int pnum
, int cnum
);
893 int get_rpc_pipe_num(char *buf
, int where
);
895 /*The following definitions come from rpc_pipes/pipenetlog.c */
897 BOOL
api_netlogrpcTNP(int cnum
,int uid
, char *param
,char *data
,
898 int mdrcnt
,int mprcnt
,
899 char **rdata
,char **rparam
,
900 int *rdata_len
,int *rparam_len
);
902 /*The following definitions come from rpc_pipes/pipentlsa.c */
904 BOOL
api_ntLsarpcTNP(int cnum
,int uid
, char *param
,char *data
,
905 int mdrcnt
,int mprcnt
,
906 char **rdata
,char **rparam
,
907 int *rdata_len
,int *rparam_len
);
909 /*The following definitions come from rpc_pipes/pipesamr.c */
911 BOOL
api_samrTNP(int cnum
,int uid
, char *param
,char *data
,
912 int mdrcnt
,int mprcnt
,
913 char **rdata
,char **rparam
,
914 int *rdata_len
,int *rparam_len
);
916 /*The following definitions come from rpc_pipes/pipesrvsvc.c */
918 BOOL
api_srvsvcTNP(int cnum
,int uid
, char *param
,char *data
,
919 int mdrcnt
,int mprcnt
,
920 char **rdata
,char **rparam
,
921 int *rdata_len
,int *rparam_len
);
923 /*The following definitions come from rpc_pipes/pipeutil.c */
925 void initrpcreply(char *inbuf
, char *q
);
926 void endrpcreply(char *inbuf
, char *q
, int datalen
, int rtnval
, int *rlen
);
927 BOOL
name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
928 char *dom_sid_to_string(DOM_SID
*sid
);
929 int make_dom_sids(char *sids_str
, DOM_SID
*sids
, int max_sids
);
930 int make_dom_gids(char *gids_str
, DOM_GID
*gids
);
931 int create_rpc_request(uint32 call_id
, uint8 op_num
, char *q
, int data_len
);
932 int create_rpc_reply(uint32 call_id
, char *q
, int data_len
);
934 /*The following definitions come from rpc_pipes/pipewkssvc.c */
936 BOOL
api_wkssvcTNP(int cnum
,int uid
, char *param
,char *data
,
937 int mdrcnt
,int mprcnt
,
938 char **rdata
,char **rparam
,
939 int *rdata_len
,int *rparam_len
);
941 /*The following definitions come from rpc_pipes/samrparse.c */
943 char* samr_io_q_close(BOOL io
, SAMR_Q_CLOSE
*q_u
, char *q
, char *base
, int align
, int depth
);
944 char* samr_io_r_close(BOOL io
, SAMR_R_CLOSE
*r_u
, char *q
, char *base
, int align
, int depth
);
945 char* samr_io_q_open_secret(BOOL io
, SAMR_Q_OPEN_SECRET
*q_u
, char *q
, char *base
, int align
, int depth
);
946 char* samr_io_r_open_secret(BOOL io
, SAMR_R_OPEN_SECRET
*r_u
, char *q
, char *base
, int align
, int depth
);
947 char* samr_io_q_lookup_rids(BOOL io
, SAMR_Q_LOOKUP_RIDS
*q_u
, char *q
, char *base
, int align
, int depth
);
948 void make_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS
*r_u
,
949 uint32 num_rids
, uint32 rid
, uint32 status
);
950 char* samr_io_r_lookup_rids(BOOL io
, SAMR_R_LOOKUP_RIDS
*r_u
, char *q
, char *base
, int align
, int depth
);
951 char* samr_io_q_unknown_22(BOOL io
, SAMR_Q_UNKNOWN_22
*q_u
, char *q
, char *base
, int align
, int depth
);
952 char* samr_io_r_unknown_22(BOOL io
, SAMR_R_UNKNOWN_22
*r_u
, char *q
, char *base
, int align
, int depth
);
953 char* samr_io_q_unknown_24(BOOL io
, SAMR_Q_UNKNOWN_24
*q_u
, char *q
, char *base
, int align
, int depth
);
954 void make_samr_r_unknown_24(SAMR_R_UNKNOWN_24
*r_u
,
955 uint16 unknown_0
, NTTIME
*expiry
, char *mach_acct
,
956 uint32 unknown_id_0
, uint32 status
);
957 char* samr_io_r_unknown_24(BOOL io
, SAMR_R_UNKNOWN_24
*r_u
, char *q
, char *base
, int align
, int depth
);
958 char* samr_io_q_unknown_32(BOOL io
, SAMR_Q_UNKNOWN_32
*q_u
, char *q
, char *base
, int align
, int depth
);
959 char* samr_io_r_unknown_32(BOOL io
, SAMR_R_UNKNOWN_32
*r_u
, char *q
, char *base
, int align
, int depth
);
960 char* samr_io_q_open_policy(BOOL io
, SAMR_Q_OPEN_POLICY
*q_u
, char *q
, char *base
, int align
, int depth
);
961 char* samr_io_r_open_policy(BOOL io
, SAMR_R_OPEN_POLICY
*r_u
, char *q
, char *base
, int align
, int depth
);
963 /*The following definitions come from rpc_pipes/smbparse.c */
965 char* smb_io_utime(BOOL io
, UTIME
*t
, char *q
, char *base
, int align
, int depth
);
966 char* smb_io_time(BOOL io
, NTTIME
*nttime
, char *q
, char *base
, int align
, int depth
);
967 void make_dom_sid(DOM_SID
*sid
, char *domsid
);
968 char* smb_io_dom_sid(BOOL io
, DOM_SID
*sid
, char *q
, char *base
, int align
, int depth
);
969 void make_uni_hdr(UNIHDR
*hdr
, int max_len
, int len
, uint16 terminate
);
970 char* smb_io_unihdr(BOOL io
, UNIHDR
*hdr
, char *q
, char *base
, int align
, int depth
);
971 void make_uni_hdr2(UNIHDR2
*hdr
, int max_len
, int len
, uint16 terminate
);
972 char* smb_io_unihdr2(BOOL io
, UNIHDR2
*hdr2
, char *q
, char *base
, int align
, int depth
);
973 void make_unistr(UNISTR
*str
, char *buf
);
974 char* smb_io_unistr(BOOL io
, UNISTR
*uni
, char *q
, char *base
, int align
, int depth
);
975 void make_unistr2(UNISTR2
*str
, char *buf
, int len
);
976 char* smb_io_unistr2(BOOL io
, UNISTR2
*uni2
, char *q
, char *base
, int align
, int depth
);
977 void make_dom_sid2(DOM_SID2
*sid2
, char *sid_str
);
978 char* smb_io_dom_sid2(BOOL io
, DOM_SID2
*sid2
, char *q
, char *base
, int align
, int depth
);
979 void make_dom_rid2(DOM_RID2
*rid2
, uint32 rid
);
980 char* smb_io_dom_rid2(BOOL io
, DOM_RID2
*rid2
, char *q
, char *base
, int align
, int depth
);
981 void make_dom_rid3(DOM_RID3
*rid3
, uint32 rid
);
982 char* smb_io_dom_rid3(BOOL io
, DOM_RID3
*rid3
, char *q
, char *base
, int align
, int depth
);
983 void make_clnt_srv(DOM_CLNT_SRV
*log
, char *logon_srv
, char *comp_name
);
984 char* smb_io_clnt_srv(BOOL io
, DOM_CLNT_SRV
*log
, char *q
, char *base
, int align
, int depth
);
985 void make_log_info(DOM_LOG_INFO
*log
, char *logon_srv
, char *acct_name
,
986 uint16 sec_chan
, char *comp_name
);
987 char* smb_io_log_info(BOOL io
, DOM_LOG_INFO
*log
, char *q
, char *base
, int align
, int depth
);
988 char* smb_io_chal(BOOL io
, DOM_CHAL
*chal
, char *q
, char *base
, int align
, int depth
);
989 char* smb_io_cred(BOOL io
, DOM_CRED
*cred
, char *q
, char *base
, int align
, int depth
);
990 void make_clnt_info2(DOM_CLNT_INFO2
*clnt
,
991 char *logon_srv
, char *comp_name
,
992 DOM_CRED
*clnt_cred
);
993 char* smb_io_clnt_info2(BOOL io
, DOM_CLNT_INFO2
*clnt
, char *q
, char *base
, int align
, int depth
);
994 char* make_clnt_info(DOM_CLNT_INFO
*clnt
,
995 char *logon_srv
, char *acct_name
,
996 uint16 sec_chan
, char *comp_name
,
998 char* smb_io_clnt_info(BOOL io
, DOM_CLNT_INFO
*clnt
, char *q
, char *base
, int align
, int depth
);
999 void make_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
1000 char* smb_io_logon_id(BOOL io
, DOM_LOGON_ID
*log
, char *q
, char *base
, int align
, int depth
);
1001 void make_arc4_owf(ARC4_OWF
*hash
, char data
[16]);
1002 char* smb_io_arc4_owf(BOOL io
, ARC4_OWF
*hash
, char *q
, char *base
, int align
, int depth
);
1003 void make_id_info1(DOM_ID_INFO_1
*id
, char *domain_name
,
1004 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
1005 char *user_name
, char *wksta_name
,
1007 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
1008 char* smb_io_id_info1(BOOL io
, DOM_ID_INFO_1
*id
, char *q
, char *base
, int align
, int depth
);
1009 void make_sam_info(DOM_SAM_INFO
*sam
,
1010 char *logon_srv
, char *comp_name
, DOM_CRED
*clnt_cred
,
1011 DOM_CRED
*rtn_cred
, uint16 logon_level
, uint16 switch_value
,
1012 DOM_ID_INFO_1
*id1
);
1013 char* smb_io_sam_info(BOOL io
, DOM_SAM_INFO
*sam
, char *q
, char *base
, int align
, int depth
);
1014 char* smb_io_gid(BOOL io
, DOM_GID
*gid
, char *q
, char *base
, int align
, int depth
);
1015 void make_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 frag
,
1016 uint32 call_id
, int data_len
);
1017 char* smb_io_rpc_hdr(BOOL io
, RPC_HDR
*rpc
, char *q
, char *base
, int align
, int depth
);
1018 void make_rpc_iface(RPC_IFACE
*ifc
, char data
[16], uint32 version
);
1019 char* smb_io_rpc_iface(BOOL io
, RPC_IFACE
*ifc
, char *q
, char *base
, int align
, int depth
);
1020 void make_rpc_addr_str(RPC_ADDR_STR
*str
, char *name
);
1021 char* smb_io_rpc_addr_str(BOOL io
, RPC_ADDR_STR
*str
, char *q
, char *base
, int align
, int depth
);
1022 void make_rpc_hdr_bba(RPC_HDR_BBA
*bba
, uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
);
1023 char* smb_io_rpc_hdr_bba(BOOL io
, RPC_HDR_BBA
*rpc
, char *q
, char *base
, int align
, int depth
);
1024 void make_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
1025 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
1026 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
1027 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
1028 char* smb_io_rpc_hdr_rb(BOOL io
, RPC_HDR_RB
*rpc
, char *q
, char *base
, int align
, int depth
);
1029 void make_rpc_results(RPC_RESULTS
*res
,
1030 uint8 num_results
, uint16 result
, uint16 reason
);
1031 char* smb_io_rpc_results(BOOL io
, RPC_RESULTS
*res
, char *q
, char *base
, int align
, int depth
);
1032 void make_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
1033 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
1035 uint8 num_results
, uint16 result
, uint16 reason
,
1036 RPC_IFACE
*transfer
);
1037 char* smb_io_rpc_hdr_ba(BOOL io
, RPC_HDR_BA
*rpc
, char *q
, char *base
, int align
, int depth
);
1038 void make_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, uint32 sec_qos
);
1039 char* smb_io_obj_attr(BOOL io
, LSA_OBJ_ATTR
*attr
, char *q
, char *base
, int align
, int depth
);
1040 void make_rpc_hdr_rr(RPC_HDR_RR
*hdr
, enum RPC_PKT_TYPE pkt_type
,
1041 uint32 call_id
, int data_len
, uint8 opnum
);
1042 char* smb_io_rpc_hdr_rr(BOOL io
, RPC_HDR_RR
*rpc
, char *q
, char *base
, int align
, int depth
);
1043 char* smb_io_pol_hnd(BOOL io
, LSA_POL_HND
*pol
, char *q
, char *base
, int align
, int depth
);
1044 char* smb_io_dom_query_3(BOOL io
, DOM_QUERY_3
*d_q
, char *q
, char *base
, int align
, int depth
);
1045 char* smb_io_dom_query_5(BOOL io
, DOM_QUERY_3
*d_q
, char *q
, char *base
, int align
, int depth
);
1046 char* smb_io_dom_query(BOOL io
, DOM_QUERY
*d_q
, char *q
, char *base
, int align
, int depth
);
1047 char* smb_io_dom_r_ref(BOOL io
, DOM_R_REF
*r_r
, char *q
, char *base
, int align
, int depth
);
1048 char* smb_io_dom_name(BOOL io
, DOM_NAME
*name
, char *q
, char *base
, int align
, int depth
);
1049 char* smb_io_neg_flags(BOOL io
, NEG_FLAGS
*neg
, char *q
, char *base
, int align
, int depth
);
1051 /*The following definitions come from rpc_pipes/srvparse.c */
1053 char* srv_io_share_info1_str(BOOL io
, SH_INFO_1_STR
*sh1
, char *q
, char *base
, int align
, int depth
);
1054 char* srv_io_share_info1(BOOL io
, SH_INFO_1
*sh1
, char *q
, char *base
, int align
, int depth
);
1055 char* srv_io_share_1_ctr(BOOL io
, SHARE_INFO_1_CTR
*ctr
, char *q
, char *base
, int align
, int depth
);
1056 char* srv_io_q_net_share_enum(BOOL io
, SRV_Q_NET_SHARE_ENUM
*q_n
, char *q
, char *base
, int align
, int depth
);
1057 char* srv_io_r_net_share_enum(BOOL io
, SRV_R_NET_SHARE_ENUM
*r_n
, char *q
, char *base
, int align
, int depth
);
1059 /*The following definitions come from rpc_pipes/wksparse.c */
1061 char* wks_io_q_unknown_0(BOOL io
, WKS_Q_UNKNOWN_0
*q_u
, char *q
, char *base
, int align
, int depth
);
1062 char* wks_io_r_unknown_0(BOOL io
, WKS_R_UNKNOWN_0
*r_u
, char *q
, char *base
, int align
, int depth
);
1064 /*The following definitions come from server.c */
1066 void *dflt_sig(void);
1067 void killkids(void);
1068 mode_t
unix_mode(int cnum
,int dosmode
);
1069 int dos_mode(int cnum
,char *path
,struct stat
*sbuf
);
1070 int dos_chmod(int cnum
,char *fname
,int dosmode
,struct stat
*st
);
1071 int file_utime(int cnum
, char *fname
, struct utimbuf
*times
);
1072 BOOL
set_filetime(int cnum
, char *fname
, time_t mtime
);
1073 BOOL
unix_convert(char *name
,int cnum
,pstring saved_last_component
, BOOL
*bad_path
);
1074 int disk_free(char *path
,int *bsize
,int *dfree
,int *dsize
);
1075 int sys_disk_free(char *path
,int *bsize
,int *dfree
,int *dsize
);
1076 BOOL
check_name(char *name
,int cnum
);
1077 void sync_file(int fnum
);
1078 void close_file(int fnum
, BOOL normal_close
);
1079 BOOL
check_file_sharing(int cnum
,char *fname
);
1080 int check_share_mode( share_mode_entry
*share
, int deny_mode
, char *fname
,
1081 BOOL fcbopen
, int *flags
);
1082 void open_file_shared(int fnum
,int cnum
,char *fname
,int share_mode
,int ofun
,
1083 int mode
,int oplock_request
, int *Access
,int *action
);
1084 int seek_file(int fnum
,uint32 pos
);
1085 int read_file(int fnum
,char *data
,uint32 pos
,int n
);
1086 int write_file(int fnum
,char *data
,int n
);
1087 BOOL
become_service(int cnum
,BOOL do_chdir
);
1088 int find_service(char *service
);
1089 int cached_error_packet(char *inbuf
,char *outbuf
,int fnum
,int line
);
1090 int unix_error_packet(char *inbuf
,char *outbuf
,int def_class
,uint32 def_code
,int line
);
1091 int error_packet(char *inbuf
,char *outbuf
,int error_class
,uint32 error_code
,int line
);
1092 BOOL
oplock_break(uint32 dev
, uint32 inode
, struct timeval
*tval
);
1093 BOOL
request_oplock_break(share_mode_entry
*share_entry
,
1094 uint32 dev
, uint32 inode
);
1095 BOOL
receive_next_smb(int smbfd
, int oplockfd
, char *inbuf
, int bufsize
, int timeout
);
1096 BOOL
snum_used(int snum
);
1097 BOOL
reload_services(BOOL test
);
1098 int setup_groups(char *user
, int uid
, int gid
, int *p_ngroups
,
1099 int **p_igroups
, gid_t
**p_groups
,
1101 int make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
);
1102 int find_free_file(void );
1103 int reply_corep(char *outbuf
);
1104 int reply_coreplus(char *outbuf
);
1105 int reply_lanman1(char *outbuf
);
1106 int reply_lanman2(char *outbuf
);
1107 int reply_nt1(char *outbuf
);
1108 void close_cnum(int cnum
, uint16 vuid
);
1109 BOOL
yield_connection(int cnum
,char *name
,int max_connections
);
1110 BOOL
claim_connection(int cnum
,char *name
,int max_connections
,BOOL Clear
);
1111 void exit_server(char *reason
);
1112 void standard_sub(int cnum
,char *str
);
1113 char *smb_fn_name(int type
);
1114 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
1115 int construct_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
1117 /*The following definitions come from shmem.c */
1119 struct shmem_ops
*smb_shm_open(int ronly
);
1121 /*The following definitions come from shmem_sysv.c */
1123 struct shmem_ops
*sysv_shm_open(int ronly
);
1125 /*The following definitions come from smbdes.c */
1127 void E_P16(unsigned char *p14
,unsigned char *p16
);
1128 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
1129 void cred_hash1(unsigned char *out
,unsigned char *in
,unsigned char *key
);
1130 void cred_hash2(unsigned char *out
,unsigned char *in
,unsigned char *key
);
1132 /*The following definitions come from smbencrypt.c */
1134 void SMBencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
1135 void E_md4hash(uchar
*passwd
, uchar
*p16
);
1136 void SMBNTencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
1137 void nt_lm_owf_gen(char *pwd
, char *nt_p16
, char *p16
);
1139 /*The following definitions come from smberr.c */
1141 char *smb_errstr(char *inbuf
);
1143 /*The following definitions come from smbpass.c */
1145 int pw_file_lock(char *name
, int type
, int secs
);
1146 int pw_file_unlock(int fd
);
1147 struct smb_passwd
*get_smbpwd_entry(char *name
, int smb_userid
);
1148 BOOL
add_smbpwd_entry(struct smb_passwd
* pwd
);
1149 BOOL
mod_smbpwd_entry(struct smb_passwd
* pwd
);
1151 /*The following definitions come from status.c */
1153 void Ucrit_addUsername(pstring username
);
1154 unsigned int Ucrit_checkUsername(pstring username
);
1155 void Ucrit_addPid(int pid
);
1156 unsigned int Ucrit_checkPid(int pid
);
1158 /*The following definitions come from system.c */
1160 int sys_select(fd_set
*fds
,struct timeval
*tval
);
1161 int sys_select(fd_set
*fds
,struct timeval
*tval
);
1162 int sys_unlink(char *fname
);
1163 int sys_open(char *fname
,int flags
,int mode
);
1164 DIR *sys_opendir(char *dname
);
1165 int sys_stat(char *fname
,struct stat
*sbuf
);
1166 int sys_waitpid(pid_t pid
,int *status
,int options
);
1167 int sys_lstat(char *fname
,struct stat
*sbuf
);
1168 int sys_mkdir(char *dname
,int mode
);
1169 int sys_rmdir(char *dname
);
1170 int sys_chdir(char *dname
);
1171 int sys_utime(char *fname
,struct utimbuf
*times
);
1172 int sys_rename(char *from
, char *to
);
1173 int sys_chmod(char *fname
,int mode
);
1174 char *sys_getwd(char *s
);
1175 int sys_chown(char *fname
,int uid
,int gid
);
1176 int sys_chroot(char *dname
);
1177 struct hostent
*sys_gethostbyname(char *name
);
1179 /*The following definitions come from time.c */
1181 void GetTimeOfDay(struct timeval
*tval
);
1182 void TimeInit(void);
1183 int TimeDiff(time_t t
);
1184 struct tm
*LocalTime(time_t *t
);
1185 time_t interpret_long_date(char *p
);
1186 void put_long_date(char *p
,time_t t
);
1187 BOOL
null_mtime(time_t mtime
);
1188 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
1189 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
1190 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
1191 time_t make_unix_date(void *date_ptr
);
1192 time_t make_unix_date2(void *date_ptr
);
1193 time_t make_unix_date3(void *date_ptr
);
1194 char *timestring(void );
1196 /*The following definitions come from trans2.c */
1198 int reply_findclose(char *inbuf
,char *outbuf
,int length
,int bufsize
);
1199 int reply_findnclose(char *inbuf
,char *outbuf
,int length
,int bufsize
);
1200 int reply_transs2(char *inbuf
,char *outbuf
,int length
,int bufsize
);
1201 int reply_trans2(char *inbuf
,char *outbuf
,int length
,int bufsize
);
1203 /*The following definitions come from ubiqx/ubi_dLinkList.c */
1206 /*The following definitions come from ufc.c */
1208 char *ufc_crypt(char *key
,char *salt
);
1210 /*The following definitions come from uid.c */
1212 void init_uid(void);
1213 BOOL
become_guest(void);
1214 BOOL
become_user(connection_struct
*conn
, int cnum
, uint16 vuid
);
1215 BOOL
unbecome_user(void );
1216 int smbrun(char *cmd
,char *outfile
,BOOL shared
);
1217 void become_root(BOOL save_dir
) ;
1218 void unbecome_root(BOOL restore_dir
);
1220 /*The following definitions come from username.c */
1222 char *get_home_dir(char *user
);
1223 void map_username(char *user
);
1224 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
1225 BOOL
user_in_list(char *user
,char *list
);
1227 /*The following definitions come from util.c */
1229 void setup_logging(char *pname
,BOOL interactive
);
1230 void reopen_logs(void);
1232 BOOL
is_a_socket(int fd
);
1233 BOOL
next_token(char **ptr
,char *buff
,char *sep
);
1234 char **toktocliplist(int *ctok
, char *sep
);
1235 void *MemMove(void *dest
,void *src
,int size
);
1236 void array_promote(char *array
,int elsize
,int element
);
1237 void set_socket_options(int fd
, char *options
);
1238 void close_sockets(void );
1239 BOOL
in_group(gid_t group
, int current_gid
, int ngroups
, int *groups
);
1240 char *StrCpy(char *dest
,char *src
);
1241 char *StrnCpy(char *dest
,char *src
,int n
);
1242 void putip(void *dest
,void *src
);
1243 int name_mangle( char *In
, char *Out
, char name_type
);
1244 BOOL
file_exist(char *fname
,struct stat
*sbuf
);
1245 time_t file_modtime(char *fname
);
1246 BOOL
directory_exist(char *dname
,struct stat
*st
);
1247 uint32
file_size(char *file_name
);
1248 char *attrib_string(int mode
);
1249 int StrCaseCmp(char *s
, char *t
);
1250 int StrnCaseCmp(char *s
, char *t
, int n
);
1251 BOOL
strequal(char *s1
, char *s2
);
1252 BOOL
strnequal(char *s1
,char *s2
,int n
);
1253 BOOL
strcsequal(char *s1
,char *s2
);
1254 void strlower(char *s
);
1255 void strupper(char *s
);
1256 void strnorm(char *s
);
1257 BOOL
strisnormal(char *s
);
1258 void string_replace(char *s
,char oldc
,char newc
);
1259 void unix_format(char *fname
);
1260 void dos_format(char *fname
);
1261 void show_msg(char *buf
);
1262 int smb_len(char *buf
);
1263 void _smb_setlen(char *buf
,int len
);
1264 void smb_setlen(char *buf
,int len
);
1265 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
1266 int smb_numwords(char *buf
);
1267 int smb_buflen(char *buf
);
1268 int smb_buf_ofs(char *buf
);
1269 char *smb_buf(char *buf
);
1270 int smb_offset(char *p
,char *buf
);
1271 char *skip_string(char *buf
,int n
);
1272 BOOL
trim_string(char *s
,char *front
,char *back
);
1273 void dos_clean_name(char *s
);
1274 void unix_clean_name(char *s
);
1275 int ChDir(char *path
);
1276 char *GetWd(char *str
);
1277 BOOL
reduce_name(char *s
,char *dir
,BOOL widelinks
);
1278 void expand_mask(char *Mask
,BOOL doext
);
1279 BOOL
strhasupper(char *s
);
1280 BOOL
strhaslower(char *s
);
1281 int count_chars(char *s
,char c
);
1282 void make_dir_struct(char *buf
,char *mask
,char *fname
,unsigned int size
,int mode
,time_t date
);
1283 void close_low_fds(void);
1284 int set_blocking(int fd
, BOOL set
);
1285 int write_socket(int fd
,char *buf
,int len
);
1286 int read_udp_socket(int fd
,char *buf
,int len
);
1287 int read_with_timeout(int fd
,char *buf
,int mincnt
,int maxcnt
,long time_out
);
1288 int read_max_udp(int fd
,char *buffer
,int bufsize
,int maxtime
);
1289 int TvalDiff(struct timeval
*tvalold
,struct timeval
*tvalnew
);
1290 BOOL
send_keepalive(int client
);
1291 int read_data(int fd
,char *buffer
,int N
);
1292 int write_data(int fd
,char *buffer
,int N
);
1293 int transfer_file(int infd
,int outfd
,int n
,char *header
,int headlen
,int align
);
1294 int read_smb_length(int fd
,char *inbuf
,int timeout
);
1295 BOOL
receive_smb(int fd
,char *buffer
, int timeout
);
1296 BOOL
receive_local_message(int fd
, char *buffer
, int buffer_len
, int timeout
);
1297 BOOL
push_local_message(char *buf
, int msg_len
);
1298 BOOL
receive_message_or_smb(int smbfd
, int oplock_fd
,
1299 char *buffer
, int buffer_len
,
1300 int timeout
, BOOL
*got_smb
);
1301 BOOL
send_smb(int fd
,char *buffer
);
1302 char *name_ptr(char *buf
,int ofs
);
1303 int name_extract(char *buf
,int ofs
,char *name
);
1304 int name_len( char *s
);
1305 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
1307 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
1308 BOOL
string_init(char **dest
,char *src
);
1309 void string_free(char **s
);
1310 BOOL
string_set(char **dest
,char *src
);
1311 BOOL
string_sub(char *s
,char *pattern
,char *insert
);
1312 BOOL
do_match(char *str
, char *regexp
, int case_sig
);
1313 BOOL
mask_match(char *str
, char *regexp
, int case_sig
,BOOL trans2
);
1314 void become_daemon(void);
1315 BOOL
yesno(char *p
);
1316 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
1317 int set_filelen(int fd
, long len
);
1318 int byte_checksum(char *buf
,int len
);
1319 char *dirname_dos(char *path
,char *buf
);
1320 void *Realloc(void *p
,int size
);
1322 BOOL
get_myname(char *my_name
,struct in_addr
*ip
);
1323 BOOL
ip_equal(struct in_addr ip1
,struct in_addr ip2
);
1324 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
);
1325 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
1326 int interpret_protocol(char *str
,int def
);
1327 int interpret_security(char *str
,int def
);
1328 uint32
interpret_addr(char *str
);
1329 struct in_addr
*interpret_addr2(char *str
);
1330 BOOL
zero_ip(struct in_addr ip
);
1331 void reset_globals_after_fork();
1332 char *client_name(void);
1333 char *client_addr(void);
1334 char *automount_server(char *user_name
);
1335 void standard_sub_basic(char *str
);
1336 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
1337 int PutUniCode(char *dst
,char *src
);
1338 struct hostent
*Get_Hostbyname(char *name
);
1339 BOOL
process_exists(int pid
);
1340 char *uidtoname(int uid
);
1341 char *gidtoname(int gid
);
1342 void BlockSignals(BOOL block
,int signum
);
1343 void ajt_panic(void);
1344 char *readdirname(void *p
);
1345 BOOL
is_in_path(char *name
, name_compare_entry
*namelist
);
1346 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
1347 void free_namearray(name_compare_entry
*name_array
);
1348 BOOL
fcntl_lock(int fd
,int op
,uint32 offset
,uint32 count
,int type
);
1349 int file_lock(char *name
,int timeout
);
1350 void file_unlock(int fd
);
1351 BOOL
is_myname(char *s
);
1352 void set_remote_arch(enum remote_arch_types type
);
1353 enum remote_arch_types
get_remote_arch();
1354 char *skip_unicode_string(char *buf
,int n
);
1355 char *unistrn2(uint16
*buf
, int len
);
1356 char *unistr2(uint16
*buf
);
1357 int struni2(uint16
*p
, char *buf
);
1358 char *unistr(char *buf
);
1359 int unistrncpy(char *dst
, char *src
, int len
);
1360 int unistrcpy(char *dst
, char *src
);
1361 void fstrcpy(char *dest
, char *src
);
1362 void pstrcpy(char *dest
, char *src
);
1363 char *align4(char *q
, char *base
);
1364 char *align2(char *q
, char *base
);
1365 char *align_offset(char *q
, char *base
, int align_offset_len
);
1366 void print_asc(int level
, unsigned char *buf
,int len
);
1367 void dump_data(int level
,char *buf1
,int len
);
1368 char *tab_depth(int depth
);