diff options
author | Dean Jansa <djansa@redhat.com> | 2005-09-01 21:11:41 +0000 |
---|---|---|
committer | Dean Jansa <djansa@redhat.com> | 2005-09-01 21:11:41 +0000 |
commit | b3c4810fcd272e113797f6e2119b8102f53b8d58 (patch) | |
tree | aa4061914f0fa2bf4fb6a9ebee7fe674e1deebd4 /qarsh/qarsh_packet.h | |
parent | 4ac88fc3498eca53a4c419412cf18a8d102daa41 (diff) | |
download | qarsh-b3c4810fcd272e113797f6e2119b8102f53b8d58.tar.gz qarsh-b3c4810fcd272e113797f6e2119b8102f53b8d58.tar.xz qarsh-b3c4810fcd272e113797f6e2119b8102f53b8d58.zip |
Added qacp, the scp replacement using qarshd. Currently can only
transver files *to* the remote host. No recursive copies and
the srcfile can not be a dir. These features are underway.
New packet types were added and handlers for those packets in qarshd.
Diffstat (limited to 'qarsh/qarsh_packet.h')
-rw-r--r-- | qarsh/qarsh_packet.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/qarsh/qarsh_packet.h b/qarsh/qarsh_packet.h index 64b2b2a..b858631 100644 --- a/qarsh/qarsh_packet.h +++ b/qarsh/qarsh_packet.h @@ -13,7 +13,9 @@ enum qa_packet_type { QP_ACK = 4, QP_CMDEXIT = 5, QP_SETUSER = 6, - QP_KILL = 7 + QP_KILL = 7, + QP_RECVFILE = 8, + QP_SENDFILE = 9 }; struct qp_hello_pkt { @@ -53,6 +55,20 @@ struct qp_kill_pkt { int qp_sig; }; +struct qp_recvfile_pkt { + char *qp_path; + mode_t qp_mode; + int qp_if_port; + size_t qp_count; +}; + +struct qp_sendfile_pkt { + char *qp_path; + int qp_of_port; + size_t qp_count; +}; + + #define QP_VERSION 1 struct qa_packet { @@ -66,6 +82,8 @@ struct qa_packet { struct qp_cmdexit_pkt cmdexit; struct qp_setuser_pkt setuser; struct qp_kill_pkt kill; + struct qp_recvfile_pkt recvfile; + struct qp_sendfile_pkt sendfile; } qp_u; }; @@ -76,6 +94,8 @@ struct qa_packet { #define qp_cmdexit qp_u.cmdexit #define qp_setuser qp_u.setuser #define qp_kill qp_u.kill +#define qp_recvfile qp_u.recvfile +#define qp_sendfile qp_u.sendfile /* Prototypes */ char *qp_packet_type(enum qa_packet_type t); @@ -87,6 +107,8 @@ struct qa_packet *make_qp_runcmd(char *cmdline, int p_in, int p_out, int p_err); struct qa_packet *make_qp_cmdexit(pid_t pid, int status); struct qa_packet *make_qp_setuser(char *user, char *group); struct qa_packet *make_qp_kill(int sig); +struct qa_packet *make_qp_recvfile(const char *path, int if_port, size_t count, mode_t mode); +struct qa_packet *make_qp_sendfile(const char *path, int of_port, size_t count); char *qptostr(struct qa_packet *qp, char **qpstr, int *qpsize); void qpfree(struct qa_packet *qp); void dump_qp(struct qa_packet *qp); |