summaryrefslogtreecommitdiffstats
path: root/qarsh/qarsh_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'qarsh/qarsh_packet.h')
-rw-r--r--qarsh/qarsh_packet.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/qarsh/qarsh_packet.h b/qarsh/qarsh_packet.h
index b6d821b..64b2b2a 100644
--- a/qarsh/qarsh_packet.h
+++ b/qarsh/qarsh_packet.h
@@ -12,7 +12,8 @@ enum qa_packet_type {
QP_RUNCMD = 3,
QP_ACK = 4,
QP_CMDEXIT = 5,
- QP_SETUSER = 6
+ QP_SETUSER = 6,
+ QP_KILL = 7
};
struct qp_hello_pkt {
@@ -48,6 +49,10 @@ struct qp_setuser_pkt {
char *qp_group;
};
+struct qp_kill_pkt {
+ int qp_sig;
+};
+
#define QP_VERSION 1
struct qa_packet {
@@ -60,6 +65,7 @@ struct qa_packet {
struct qp_ack_pkt ack;
struct qp_cmdexit_pkt cmdexit;
struct qp_setuser_pkt setuser;
+ struct qp_kill_pkt kill;
} qp_u;
};
@@ -69,6 +75,7 @@ struct qa_packet {
#define qp_ack qp_u.ack
#define qp_cmdexit qp_u.cmdexit
#define qp_setuser qp_u.setuser
+#define qp_kill qp_u.kill
/* Prototypes */
char *qp_packet_type(enum qa_packet_type t);
@@ -79,6 +86,7 @@ struct qa_packet *make_qp_ack(enum qa_packet_type t, int i);
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);
char *qptostr(struct qa_packet *qp, char **qpstr, int *qpsize);
void qpfree(struct qa_packet *qp);
void dump_qp(struct qa_packet *qp);