File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / rsync / proto.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Fri Feb 17 15:09:30 2012 UTC (12 years, 4 months ago) by misho
Branches: rsync, MAIN
CVS tags: rsync3_0_9p0, RSYNC3_0_9, HEAD
rsync

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>