1: /* This file is automatically generated with "make proto". DO NOT EDIT */
2:
3: int allow_access(const char *addr, const char **host_ptr, int i);
4: void free_acl(stat_x *sxp);
5: int get_acl(const char *fname, stat_x *sxp);
6: void send_acl(int f, stat_x *sxp);
7: void receive_acl(int f, struct file_struct *file);
8: void cache_tmp_acl(struct file_struct *file, stat_x *sxp);
9: void uncache_tmp_acls(void);
10: int set_acl(const char *fname, const struct file_struct *file, stat_x *sxp, mode_t new_mode);
11: void match_acl_ids(void);
12: int default_perms_for_dir(const char *dir);
13: void base64_encode(const char *buf, int len, char *out, int pad);
14: char *auth_server(int f_in, int f_out, int module, const char *host,
15: const char *addr, const char *leader);
16: void auth_client(int fd, const char *user, const char *challenge);
17: char *get_backup_name(const char *fname);
18: int make_backup(const char *fname, BOOL prefer_rename);
19: void write_stream_flags(int fd);
20: void read_stream_flags(int fd);
21: void check_batch_flags(void);
22: void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt);
23: uint32 get_checksum1(char *buf1, int32 len);
24: void get_checksum2(char *buf, int32 len, char *sum);
25: void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum);
26: void sum_init(int seed);
27: void sum_update(const char *p, int32 len);
28: int sum_end(char *sum);
29: struct chmod_mode_struct *parse_chmod(const char *modestr,
30: struct chmod_mode_struct **root_mode_ptr);
31: int tweak_mode(int mode, struct chmod_mode_struct *chmod_modes);
32: int free_chmod_mode(struct chmod_mode_struct *chmod_modes);
33: void close_all(void);
34: NORETURN void _exit_cleanup(int code, const char *file, int line);
35: void cleanup_disable(void);
36: void cleanup_set(const char *fnametmp, const char *fname, struct file_struct *file,
37: int fd_r, int fd_w);
38: void cleanup_set_pid(pid_t pid);
39: char *client_addr(int fd);
40: char *client_name(int fd);
41: void client_sockaddr(int fd,
42: struct sockaddr_storage *ss,
43: socklen_t *ss_len);
44: int lookup_name(int fd, const struct sockaddr_storage *ss,
45: socklen_t ss_len,
46: char *name_buf, size_t name_buf_size,
47: char *port_buf, size_t port_buf_size);
48: int compare_addrinfo_sockaddr(const struct addrinfo *ai,
49: const struct sockaddr_storage *ss);
50: int check_name(int fd,
51: const struct sockaddr_storage *ss,
52: char *name_buf, size_t name_buf_size);
53: int start_socket_client(char *host, int remote_argc, char *remote_argv[],
54: int argc, char *argv[]);
55: int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char *argv[]);
56: int start_daemon(int f_in, int f_out);
57: int daemon_main(void);
58: void set_allow_inc_recurse(void);
59: void setup_protocol(int f_out,int f_in);
60: int claim_connection(char *fname, int max_connections);
61: enum delret delete_item(char *fbuf, uint16 mode, uint16 flags);
62: uint16 get_del_for_flag(uint16 mode);
63: void set_filter_dir(const char *dir, unsigned int dirlen);
64: void *push_local_filters(const char *dir, unsigned int dirlen);
65: void pop_local_filters(void *mem);
66: void change_local_filter_dir(const char *dname, int dlen, int dir_depth);
67: int check_filter(filter_rule_list *listp, enum logcode code,
68: const char *name, int name_is_dir);
69: const filter_rule *rule_template(uint32 rflags);
70: void parse_filter_str(filter_rule_list *listp, const char *rulestr,
71: const filter_rule *template, int xflags);
72: void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_rule *template, int xflags);
73: char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
74: unsigned int *plen_ptr);
75: void send_filter_list(int f_out);
76: void recv_filter_list(int f_in);
77: int sparse_end(int f, OFF_T size);
78: int flush_write_file(int f);
79: int write_file(int f, char *buf, int len);
80: struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
81: char *map_ptr(struct map_struct *map, OFF_T offset, int32 len);
82: int unmap_file(struct map_struct *map);
83: void init_flist(void);
84: void show_flist_stats(void);
85: int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks);
86: int change_pathname(struct file_struct *file, const char *dir, int dirlen);
87: struct file_struct *make_file(const char *fname, struct file_list *flist,
88: STRUCT_STAT *stp, int flags, int filter_level);
89: void unmake_file(struct file_struct *file);
90: void send_extra_file_list(int f, int at_least);
91: struct file_list *send_file_list(int f, int argc, char *argv[]);
92: struct file_list *recv_file_list(int f, int dir_ndx);
93: void recv_additional_file_list(int f);
94: int flist_find(struct file_list *flist, struct file_struct *f);
95: int flist_find_name(struct file_list *flist, const char *fname, int want_dir_match);
96: int flist_find_ignore_dirness(struct file_list *flist, struct file_struct *f);
97: void clear_file(struct file_struct *file);
98: struct file_list *flist_new(int flags, char *msg);
99: void flist_free(struct file_list *flist);
100: int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2);
101: int f_name_has_prefix(const struct file_struct *f1, const struct file_struct *f2);
102: char *f_name_buf(void);
103: char *f_name(const struct file_struct *f, char *fbuf);
104: struct file_list *get_dirlist(char *dirname, int dlen, int flags);
105: int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp);
106: void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statret,
107: stat_x *sxp, int32 iflags, uchar fnamecmp_type,
108: const char *xname);
109: int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st);
110: int atomic_create(struct file_struct *file, char *fname, const char *slnk, const char *hlnk,
111: dev_t rdev, stat_x *sxp, int del_for_flag);
112: void check_for_finished_files(int itemizing, enum logcode code, int check_redo);
113: void generate_files(int f_out, const char *local_name);
114: struct hashtable *hashtable_create(int size, int key64);
115: void hashtable_destroy(struct hashtable *tbl);
116: void *hashtable_find(struct hashtable *tbl, int64 key, int allocate_if_missing);
117: void init_hard_links(void);
118: struct ht_int64_node *idev_find(int64 dev, int64 ino);
119: void idev_destroy(void);
120: void match_hard_links(struct file_list *flist);
121: int hard_link_check(struct file_struct *file, int ndx, char *fname,
122: int statret, stat_x *sxp, int itemizing,
123: enum logcode code);
124: int hard_link_one(struct file_struct *file, const char *fname,
125: const char *oldname, int terse);
126: void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx,
127: STRUCT_STAT *stp, int itemizing, enum logcode code,
128: int alt_dest);
129: int skip_hard_link(struct file_struct *file, struct file_list **flist_p);
130: void reduce_iobuf_size(xbuf *out, size_t new_size);
131: void restore_iobuf_size(xbuf *out);
132: void noop_io_until_death(void);
133: int send_msg(enum msgcode code, const char *buf, size_t len, int convert);
134: void send_msg_int(enum msgcode code, int num);
135: void io_set_sock_fds(int f_in, int f_out);
136: void set_io_timeout(int secs);
137: void increment_active_files(int ndx, int itemizing, enum logcode code);
138: int get_redo_num(void);
139: int get_hlink_num(void);
140: void start_filesfrom_forwarding(int fd);
141: int read_line(int fd, char *buf, size_t bufsiz, int flags);
142: void read_args(int f_in, char *mod_name, char *buf, size_t bufsiz, int rl_nulls,
143: char ***argv_p, int *argc_p, char **request_p);
144: BOOL io_start_buffering_out(int f_out);
145: BOOL io_start_buffering_in(int f_in);
146: void io_end_buffering_in(BOOL free_buffers);
147: void io_end_buffering_out(BOOL free_buffers);
148: void maybe_flush_socket(int important);
149: void maybe_send_keepalive(time_t now, int flags);
150: void start_flist_forward(int ndx);
151: void stop_flist_forward(void);
152: void wait_for_receiver(void);
153: unsigned short read_shortint(int f);
154: int32 read_int(int f);
155: int32 read_varint(int f);
156: int64 read_varlong(int f, uchar min_bytes);
157: int64 read_longint(int f);
158: void read_buf(int f, char *buf, size_t len);
159: void read_sbuf(int f, char *buf, size_t len);
160: uchar read_byte(int f);
161: int read_vstring(int f, char *buf, int bufsize);
162: void read_sum_head(int f, struct sum_struct *sum);
163: void write_sum_head(int f, struct sum_struct *sum);
164: void io_flush(int flush_it_all);
165: void write_shortint(int f, unsigned short x);
166: void write_int(int f, int32 x);
167: void write_varint(int f, int32 x);
168: void write_varlong(int f, int64 x, uchar min_bytes);
169: void write_longint(int f, int64 x);
170: void write_bigbuf(int f, const char *buf, size_t len);
171: void write_buf(int f, const char *buf, size_t len);
172: void write_sbuf(int f, const char *buf);
173: void write_byte(int f, uchar c);
174: void write_vstring(int f, const char *str, int len);
175: void write_ndx(int f, int32 ndx);
176: int32 read_ndx(int f);
177: int read_line_old(int fd, char *buf, size_t bufsiz, int eof_ok);
178: void io_printf(int fd, const char *format, ...);
179: void io_start_multiplex_out(int fd);
180: void io_start_multiplex_in(int fd);
181: int io_end_multiplex_in(int mode);
182: int io_end_multiplex_out(int mode);
183: void start_write_batch(int fd);
184: void stop_write_batch(void);
185: char *lp_bind_address(void);
186: char *lp_motd_file(void);
187: char *lp_pid_file(void);
188: char *lp_socket_options(void);
189: int lp_listen_backlog(void);
190: int lp_rsync_port(void);
191: char *lp_auth_users(int module_id);
192: char *lp_charset(int module_id);
193: char *lp_comment(int module_id);
194: char *lp_dont_compress(int module_id);
195: char *lp_exclude(int module_id);
196: char *lp_exclude_from(int module_id);
197: char *lp_filter(int module_id);
198: char *lp_gid(int module_id);
199: char *lp_hosts_allow(int module_id);
200: char *lp_hosts_deny(int module_id);
201: char *lp_include(int module_id);
202: char *lp_include_from(int module_id);
203: char *lp_incoming_chmod(int module_id);
204: char *lp_lock_file(int module_id);
205: char *lp_log_file(int module_id);
206: char *lp_log_format(int module_id);
207: char *lp_name(int module_id);
208: char *lp_outgoing_chmod(int module_id);
209: char *lp_path(int module_id);
210: char *lp_postxfer_exec(int module_id);
211: char *lp_prexfer_exec(int module_id);
212: char *lp_refuse_options(int module_id);
213: char *lp_secrets_file(int module_id);
214: char *lp_temp_dir(int module_id);
215: char *lp_uid(int module_id);
216: int lp_max_connections(int module_id);
217: int lp_max_verbosity(int module_id);
218: int lp_syslog_facility(int module_id);
219: int lp_timeout(int module_id);
220: BOOL lp_fake_super(int module_id);
221: BOOL lp_forward_lookup(int module_id);
222: BOOL lp_ignore_errors(int module_id);
223: BOOL lp_ignore_nonreadable(int module_id);
224: BOOL lp_list(int module_id);
225: BOOL lp_munge_symlinks(int module_id);
226: BOOL lp_numeric_ids(int module_id);
227: BOOL lp_read_only(int module_id);
228: BOOL lp_reverse_lookup(int module_id);
229: BOOL lp_strict_modes(int module_id);
230: BOOL lp_transfer_logging(int module_id);
231: BOOL lp_use_chroot(int module_id);
232: BOOL lp_write_only(int module_id);
233: int lp_load(char *pszFname, int globals_only);
234: BOOL set_dparams(int syntax_check_only);
235: int lp_num_modules(void);
236: int lp_number(char *name);
237: void log_init(int restart);
238: void logfile_close(void);
239: void logfile_reopen(void);
240: void rwrite(enum logcode code, const char *buf, int len, int is_utf8);
241: void rprintf(enum logcode code, const char *format, ...);
242: void rsyserr(enum logcode code, int errcode, const char *format, ...);
243: void rflush(enum logcode code);
244: void remember_initial_stats(void);
245: int log_format_has(const char *format, char esc);
246: void log_item(enum logcode code, struct file_struct *file, int iflags, const char *hlink);
247: void maybe_log_item(struct file_struct *file, int iflags, int itemizing,
248: const char *buf);
249: void log_delete(const char *fname, int mode);
250: void log_exit(int code, const char *file, int line);
251: pid_t wait_process(pid_t pid, int *status_ptr, int flags);
252: void write_del_stats(int f);
253: void read_del_stats(int f);
254: int child_main(int argc, char *argv[]);
255: void start_server(int f_in, int f_out, int argc, char *argv[]);
256: int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]);
257: void remember_children(UNUSED(int val));
258: const char *get_panic_action(void);
259: int main(int argc,char *argv[]);
260: void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len);
261: void match_report(void);
262: void limit_output_verbosity(int level);
263: void reset_output_levels(void);
264: void negate_output_levels(void);
265: void usage(enum logcode F);
266: void option_error(void);
267: int parse_arguments(int *argc_p, const char ***argv_p);
268: void server_options(char **args, int *argc_p);
269: char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr);
270: int pm_process( char *FileName,
271: BOOL (*sfunc)(char *),
272: BOOL (*pfunc)(char *, char *) );
273: pid_t piped_child(char **command, int *f_in, int *f_out);
274: pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
275: int (*child_main)(int, char*[]));
276: void set_current_file_index(struct file_struct *file, int ndx);
277: void end_progress(OFF_T size);
278: void show_progress(OFF_T ofs, OFF_T size);
279: int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique);
280: int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file);
281: int recv_files(int f_in, int f_out, char *local_name);
282: void setup_iconv(void);
283: int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags);
284: void send_protected_args(int fd, char *args[]);
285: int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
286: char *buf, int *len_ptr);
287: void free_sums(struct sum_struct *s);
288: mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
289: int exists);
290: int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
291: const char *fnamecmp, int flags);
292: void sig_int(int sig_num);
293: int finish_transfer(const char *fname, const char *fnametmp,
294: const char *fnamecmp, const char *partialptr,
295: struct file_struct *file, int ok_to_set_time,
296: int overwriting_basis);
297: struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc);
298: const char *who_am_i(void);
299: void successful_send(int ndx);
300: void send_files(int f_in, int f_out);
301: int try_bind_local(int s, int ai_family, int ai_socktype,
302: const char *bind_addr);
303: int open_socket_out(char *host, int port, const char *bind_addr,
304: int af_hint);
305: int open_socket_out_wrapped(char *host, int port, const char *bind_addr,
306: int af_hint);
307: int is_a_socket(int fd);
308: void start_accept_loop(int port, int (*fn)(int, int));
309: void set_socket_options(int fd, char *options);
310: int do_unlink(const char *fname);
311: int do_symlink(const char *lnk, const char *fname);
312: ssize_t do_readlink(const char *path, char *buf, size_t bufsiz);
313: int do_link(const char *fname1, const char *fname2);
314: int do_lchown(const char *path, uid_t owner, gid_t group);
315: int do_mknod(const char *pathname, mode_t mode, dev_t dev);
316: int do_rmdir(const char *pathname);
317: int do_open(const char *pathname, int flags, mode_t mode);
318: int do_chmod(const char *path, mode_t mode);
319: int do_rename(const char *fname1, const char *fname2);
320: int do_ftruncate(int fd, OFF_T size);
321: void trim_trailing_slashes(char *name);
322: int do_mkdir(char *fname, mode_t mode);
323: int do_mkstemp(char *template, mode_t perms);
324: int do_stat(const char *fname, STRUCT_STAT *st);
325: int do_lstat(const char *fname, STRUCT_STAT *st);
326: int do_fstat(int fd, STRUCT_STAT *st);
327: OFF_T do_lseek(int fd, OFF_T offset, int whence);
328: int do_utimensat(const char *fname, time_t modtime, uint32 mod_nsec);
329: int do_lutimes(const char *fname, time_t modtime, uint32 mod_nsec);
330: int do_utimes(const char *fname, time_t modtime, uint32 mod_nsec);
331: int do_utime(const char *fname, time_t modtime, UNUSED(uint32 mod_nsec));
332: int do_fallocate(int fd, OFF_T offset, OFF_T length);
333: int do_open_nofollow(const char *pathname, int flags);
334: void set_compression(const char *fname);
335: void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
336: int32 n, int32 toklen);
337: int32 recv_token(int f, char **data);
338: void see_token(char *data, int32 toklen);
339: char *uid_to_user(uid_t uid);
340: char *gid_to_group(gid_t gid);
341: int user_to_uid(const char *name, uid_t *uid_p, BOOL num_ok);
342: int group_to_gid(const char *name, gid_t *gid_p, BOOL num_ok);
343: uid_t match_uid(uid_t uid);
344: gid_t match_gid(gid_t gid, uint16 *flags_ptr);
345: const char *add_uid(uid_t uid);
346: const char *add_gid(gid_t gid);
347: void send_id_list(int f);
348: uid_t recv_user_name(int f, uid_t uid);
349: gid_t recv_group_name(int f, gid_t gid, uint16 *flags_ptr);
350: void recv_id_list(int f, struct file_list *flist);
351: void parse_name_map(char *map, BOOL usernames);
352: const char *getallgroups(uid_t uid, item_list *gid_list);
353: void set_nonblocking(int fd);
354: void set_blocking(int fd);
355: int fd_pair(int fd[2]);
356: void print_child_argv(const char *prefix, char **cmd);
357: int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode);
358: int make_path(char *fname, int flags);
359: int full_write(int desc, const char *ptr, size_t len);
360: int copy_file(const char *source, const char *dest, int ofd, mode_t mode);
361: int robust_unlink(const char *fname);
362: int robust_rename(const char *from, const char *to, const char *partialptr,
363: int mode);
364: pid_t do_fork(void);
365: void kill_all(int sig);
366: int lock_range(int fd, int offset, int len);
367: int glob_expand(const char *arg, char ***argv_p, int *argc_p, int *maxargs_p);
368: void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int *maxargs_p);
369: void strlower(char *s);
370: size_t pathjoin(char *dest, size_t destsize, const char *p1, const char *p2);
371: size_t stringjoin(char *dest, size_t destsize, ...);
372: int count_dir_elements(const char *p);
373: int clean_fname(char *name, int flags);
374: char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth,
375: int flags);
376: int change_dir(const char *dir, int set_path_only);
377: char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr);
378: char *full_fname(const char *fn);
379: char *partial_dir_fname(const char *fname);
380: int handle_partial_dir(const char *fname, int create);
381: int unsafe_symlink(const char *dest, const char *src);
382: char *timestring(time_t t);
383: int cmp_time(time_t file1, time_t file2);
384: int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
385: const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr);
386: uint32 fuzzy_distance(const char *s1, unsigned len1, const char *s2, unsigned len2);
387: struct bitbag *bitbag_create(int max_ndx);
388: void bitbag_set_bit(struct bitbag *bb, int ndx);
389: void bitbag_clear_bit(struct bitbag *bb, int ndx);
390: int bitbag_check_bit(struct bitbag *bb, int ndx);
391: int bitbag_next_bit(struct bitbag *bb, int after);
392: void flist_ndx_push(flist_ndx_list *lp, int ndx);
393: int flist_ndx_pop(flist_ndx_list *lp);
394: void *expand_item_list(item_list *lp, size_t item_size,
395: const char *desc, int incr);
396: int msleep(int t);
397: void *_new_array(unsigned long num, unsigned int size, int use_calloc);
398: void *_realloc_array(void *ptr, unsigned int size, size_t num);
399: const char *sum_as_hex(const char *sum);
400: NORETURN void out_of_memory(const char *str);
401: NORETURN void overflow_exit(const char *str);
402: void free_xattr(stat_x *sxp);
403: int get_xattr(const char *fname, stat_x *sxp);
404: int copy_xattrs(const char *source, const char *dest);
405: int send_xattr(int f, stat_x *sxp);
406: int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all);
407: void send_xattr_request(const char *fname, struct file_struct *file, int f_out);
408: int recv_xattr_request(struct file_struct *file, int f_in);
409: void receive_xattr(int f, struct file_struct *file);
410: void cache_tmp_xattr(struct file_struct *file, stat_x *sxp);
411: void uncache_tmp_xattrs(void);
412: int set_xattr(const char *fname, const struct file_struct *file,
413: const char *fnamecmp, stat_x *sxp);
414: char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p);
415: int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t buf_len);
416: int del_def_xattr_acl(const char *fname);
417: int get_stat_xattr(const char *fname, int fd, STRUCT_STAT *fst, STRUCT_STAT *xst);
418: int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode);
419: int x_stat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst);
420: int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst);
421: int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst);
422: int sys_gettimeofday(struct timeval *tv);
423: char *do_big_num(int64 num, int human_flag, const char *fract);
424: char *do_big_dnum(double dnum, int human_flag, int decimal_digits);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>