11 #define BE_NEEDLEN 0x01
24 int (*write
)(struct backend
*);
32 int init_data(struct backend
*be
, const char *argv
[]);
33 int write_data(struct backend
*be
, const void *buf
, size_t len
);
34 int flush_data(struct backend
*be
);
37 #define cpio_init init_data
38 int cpio_hdr(struct backend
*be
, uint32_t mode
, size_t datalen
,
39 const char *filename
);
40 int cpio_mkdir(struct backend
*be
, const char *filename
);
41 int cpio_writefile(struct backend
*be
, const char *filename
,
42 const void *data
, size_t len
);
43 int cpio_close(struct backend
*be
);
44 #define MODE_FILE 0100644
45 #define MODE_DIR 0040755
48 struct backend
*get_backend(const char *name
);
51 extern struct backend be_tftp
;
52 extern struct backend be_ymodem
;
54 #endif /* BACKEND_H */