/* This file is automatically generated with "make proto". DO NOT EDIT */

int allow_access(char *addr, char *host, char *allow_list, char *deny_list);
void base64_encode(char *buf, int len, char *out);
char *auth_server(int f_in, int f_out, int module, char *addr, char *leader);
void auth_client(int fd, char *user, char *challenge);
char *get_backup_name(char *fname);
int make_backup(char *fname);
void write_stream_flags(int fd);
void read_stream_flags(int fd);
void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt);
void show_flist(int index, struct file_struct **fptr);
void show_argvs(int argc, char *argv[]);
uint32 get_checksum1(char *buf1,int len);
void get_checksum2(char *buf,int len,char *sum);
void file_checksum(char *fname,char *sum,OFF_T size);
void sum_init(int seed);
void sum_update(char *p, int len);
void sum_end(char *sum);
void close_all(void);
void _exit_cleanup(int code, const char *file, int line);
void cleanup_disable(void);
void cleanup_set(char *fnametmp, char *fname, struct file_struct *file,
		 int fd_r, int fd_w);
void cleanup_set_pid(pid_t pid);
char *client_addr(int fd);
char *client_name(int fd);
void client_sockaddr(int fd,
		     struct sockaddr_storage *ss,
		     socklen_t *ss_len);
int lookup_name(int fd, const struct sockaddr_storage *ss,
		socklen_t ss_len,
		char *name_buf, size_t name_buf_len,
		char *port_buf, size_t port_buf_len);
int compare_addrinfo_sockaddr(const struct addrinfo *ai,
			      const struct sockaddr_storage *ss);
int check_name(int fd,
	       const struct sockaddr_storage *ss,
	       char *name_buf);
int start_socket_client(char *host, char *path, int argc, char *argv[]);
int start_inband_exchange(char *user, char *path, int f_in, int f_out, 
			  int argc);
int start_daemon(int f_in, int f_out);
int daemon_main(void);
void setup_protocol(int f_out,int f_in);
int claim_connection(char *fname,int max_connections);
void clear_exclude_list(struct exclude_list_struct *listp);
int check_exclude(struct exclude_list_struct *listp, char *name, int name_is_dir);
void add_exclude(struct exclude_list_struct *listp, const char *pattern,
		 int xflags);
void add_exclude_file(struct exclude_list_struct *listp, const char *fname,
		      int xflags);
void send_exclude_list(int f);
void recv_exclude_list(int f);
void add_cvs_excludes(void);
int sparse_end(int f);
int flush_write_file(int f);
int write_file(int f,char *buf,size_t len);
struct map_struct *map_file(int fd, OFF_T len, OFF_T map_size,
			    size_t block_size);
char *map_ptr(struct map_struct *map,OFF_T offset,int len);
int unmap_file(struct map_struct *map);
void init_flist(void);
void show_flist_stats(void);
int link_stat(const char *path, STRUCT_STAT *buffer, int follow_dirlinks);
void flist_expand(struct file_list *flist);
void send_file_entry(struct file_struct *file, int f, unsigned short base_flags);
void receive_file_entry(struct file_struct **fptr, unsigned short flags,
			struct file_list *flist, int f);
struct file_struct *make_file(char *fname, struct file_list *flist,
			      int exclude_level);
void send_file_name(int f, struct file_list *flist, char *fname,
		    int recursive, unsigned short base_flags);
struct file_list *send_file_list(int f, int argc, char *argv[]);
struct file_list *recv_file_list(int f);
int file_compare(struct file_struct **file1, struct file_struct **file2);
int flist_find(struct file_list *flist, struct file_struct *f);
void clear_file(int i, struct file_list *flist);
struct file_list *flist_new(int with_hlink, char *msg);
void flist_free(struct file_list *flist);
int f_name_cmp(struct file_struct *f1, struct file_struct *f2);
char *f_name_to(struct file_struct *f, char *fbuf);
char *f_name(struct file_struct *f);
void write_sum_head(int f, struct sum_struct *sum);
void generate_files(int f_out, struct file_list *flist, char *local_name);
void init_hard_links(struct file_list *flist);
int hard_link_check(struct file_struct *file, int skip);
void do_hard_links(void);
void io_set_sock_fds(int f_in, int f_out);
void set_msg_fd_in(int fd);
void set_msg_fd_out(int fd);
void send_msg(enum msgcode code, char *buf, int len);
int msg_list_push(int flush_it_all);
int get_redo_num(void);
void io_set_filesfrom_fds(int f_in, int f_out);
int read_filesfrom_line(int fd, char *fname);
void io_start_buffering_out(void);
void io_start_buffering_in(void);
void io_end_buffering(void);
int32 read_int(int f);
int64 read_longint(int f);
void read_buf(int f,char *buf,size_t len);
void read_sbuf(int f,char *buf,size_t len);
unsigned char read_byte(int f);
void io_flush(int flush_it_all);
void write_int(int f,int32 x);
void write_int_named(int f, int32 x, const char *phase);
void write_longint(int f, int64 x);
void write_buf(int f,char *buf,size_t len);
void write_sbuf(int f, char *buf);
void write_byte(int f,unsigned char c);
int read_line(int f, char *buf, size_t maxlen);
void io_printf(int fd, const char *format, ...);
void io_start_multiplex_out(void);
void io_start_multiplex_in(void);
int io_multiplex_write(enum msgcode code, char *buf, size_t len);
void close_multiplexing_in(void);
void close_multiplexing_out(void);
void start_write_batch(int fd);
void stop_write_batch(void);
char *lp_motd_file(void);
char *lp_log_file(void);
char *lp_pid_file(void);
char *lp_socket_options(void);
int lp_syslog_facility(void);
int lp_max_verbosity(void);
char *lp_name(int );
char *lp_comment(int );
char *lp_path(int );
char *lp_lock_file(int );
BOOL lp_read_only(int );
BOOL lp_write_only(int );
BOOL lp_list(int );
BOOL lp_use_chroot(int );
BOOL lp_transfer_logging(int );
BOOL lp_ignore_errors(int );
BOOL lp_ignore_nonreadable(int );
char *lp_uid(int );
char *lp_gid(int );
char *lp_hosts_allow(int );
char *lp_hosts_deny(int );
char *lp_auth_users(int );
char *lp_secrets_file(int );
BOOL lp_strict_modes(int );
char *lp_exclude(int );
char *lp_exclude_from(int );
char *lp_include(int );
char *lp_include_from(int );
char *lp_log_format(int );
char *lp_refuse_options(int );
char *lp_dont_compress(int );
int lp_timeout(int );
int lp_max_connections(int );
BOOL lp_load(char *pszFname, int globals_only);
int lp_numservices(void);
int lp_number(char *name);
void log_init(void);
void log_open(void);
void log_close(void);
void rwrite(enum logcode code, char *buf, int len);
void rprintf(enum logcode code, const char *format, ...);
void rsyserr(enum logcode code, int errcode, const char *format, ...);
void rflush(enum logcode code);
void log_send(struct file_struct *file, struct stats *initial_stats);
void log_recv(struct file_struct *file, struct stats *initial_stats);
void log_exit(int code, const char *file, int line);
void wait_process(pid_t pid, int *status);
int child_main(int argc, char *argv[]);
void start_server(int f_in, int f_out, int argc, char *argv[]);
int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]);
const char *get_panic_action(void);
int main(int argc,char *argv[]);
void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len);
void match_report(void);
void usage(enum logcode F);
void option_error(void);
int parse_arguments(int *argc, const char ***argv, int frommain);
void server_options(char **args,int *argc);
char *find_colon(char *s);
BOOL pm_process( char *FileName,
                 BOOL (*sfunc)(char *),
                 BOOL (*pfunc)(char *, char *) );
pid_t piped_child(char **command, int *f_in, int *f_out);
pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
		  int (*child_main)(int, char*[]));
void end_progress(OFF_T size);
void show_progress(OFF_T ofs, OFF_T size);
void delete_files(struct file_list *flist);
int recv_files(int f_in, struct file_list *flist, char *local_name);
void free_sums(struct sum_struct *s);
int delete_file(char *fname);
int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
	      int flags);
void sig_int(void);
void finish_transfer(char *fname, char *fnametmp, struct file_struct *file,
		     int ok_to_set_time);
const char *who_am_i(void);
void read_sum_head(int f, struct sum_struct *sum);
void send_files(struct file_list *flist, int f_out, int f_in);
int try_bind_local(int s, int ai_family, int ai_socktype,
		   const char *bind_address);
int open_socket_out(char *host, int port, const char *bind_address,
		    int af_hint);
int open_socket_out_wrapped(char *host, int port, const char *bind_address,
			    int af_hint);
int is_a_socket(int fd);
void start_accept_loop(int port, int (*fn)(int, int));
void set_socket_options(int fd, char *options);
void become_daemon(void);
int sock_exec(const char *prog);
int do_unlink(char *fname);
int do_symlink(char *fname1, char *fname2);
int do_link(char *fname1, char *fname2);
int do_lchown(const char *path, uid_t owner, gid_t group);
int do_mknod(char *pathname, mode_t mode, dev_t dev);
int do_rmdir(char *pathname);
int do_open(char *pathname, int flags, mode_t mode);
int do_chmod(const char *path, mode_t mode);
int do_rename(char *fname1, char *fname2);
void trim_trailing_slashes(char *name);
int do_mkdir(char *fname, mode_t mode);
int do_mkstemp(char *template, mode_t perms);
int do_stat(const char *fname, STRUCT_STAT *st);
int do_lstat(const char *fname, STRUCT_STAT *st);
int do_fstat(int fd, STRUCT_STAT *st);
OFF_T do_lseek(int fd, OFF_T offset, int whence);
void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset);
char *d_name(struct dirent *di);
void set_compression(char *fname);
void send_token(int f,int token,struct map_struct *buf,OFF_T offset,
		int n,int toklen);
int recv_token(int f,char **data);
void see_token(char *data, int toklen);
void add_uid(uid_t uid);
void add_gid(gid_t gid);
void send_uid_list(int f);
void recv_uid_list(int f, struct file_list *flist);
void set_nonblocking(int fd);
void set_blocking(int fd);
int fd_pair(int fd[2]);
void print_child_argv(char **cmd);
void out_of_memory(char *str);
void overflow(char *str);
int set_modtime(char *fname, time_t modtime);
int create_directory_path(char *fname, int base_umask);
int full_write(int desc, char *ptr, size_t len);
int copy_file(char *source, char *dest, mode_t mode);
int robust_unlink(char *fname);
int robust_rename(char *from, char *to, int mode);
pid_t do_fork(void);
void kill_all(int sig);
int name_to_uid(char *name, uid_t *uid);
int name_to_gid(char *name, gid_t *gid);
int lock_range(int fd, int offset, int len);
void glob_expand(char *base1, char ***argv_ptr, int *argc_ptr, int *maxargs_ptr);
void strlower(char *s);
size_t pathjoin(char *dest, size_t destsize, const char *p1, const char *p2);
size_t stringjoin(char *dest, size_t destsize, ...);
int count_dir_elements(const char *p);
unsigned int clean_fname(char *name, BOOL collapse_dot_dot);
char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth);
int push_dir(char *dir);
int pop_dir(char *dir);
const char *safe_fname(const char *fname);
char *full_fname(const char *fn);
char *partial_dir_fname(const char *fname);
int handle_partial_dir(const char *fname, int create);
int u_strcmp(const char *cs1, const char *cs2);
int unsafe_symlink(const char *dest, const char *src);
char *timestring(time_t t);
int msleep(int t);
int cmp_modtime(time_t file1, time_t file2);
int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
void *_new_array(unsigned int size, unsigned long num);
void *_realloc_array(void *ptr, unsigned int size, unsigned long num);
int sys_gettimeofday(struct timeval *tv);
