diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2014-04-21 17:41:53 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2014-04-21 17:41:53 +0000 |
commit | 76212dc40f08e351e71200a4b49328c53d2c53fc (patch) | |
tree | e24d89eea0e3c66609e2e41861e12f808acb005f /usr.sbin/iscsid/iscsid.h | |
parent | 27d8653b958231d55281025077929a5d681cb2e5 (diff) |
Redo most of the control message handling. Switch it back to use
SOCK_SEQPACKET and provide functions to build the control messages that
can also be used by iscsictl.
Diffstat (limited to 'usr.sbin/iscsid/iscsid.h')
-rw-r--r-- | usr.sbin/iscsid/iscsid.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/iscsid/iscsid.h b/usr.sbin/iscsid/iscsid.h index a530ada3f83..e47d622e1e8 100644 --- a/usr.sbin/iscsid/iscsid.h +++ b/usr.sbin/iscsid/iscsid.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iscsid.h,v 1.12 2014/04/21 09:48:31 claudio Exp $ */ +/* $OpenBSD: iscsid.h,v 1.13 2014/04/21 17:41:52 claudio Exp $ */ /* * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org> @@ -46,6 +46,13 @@ struct ctrlmsghdr { u_int16_t len[3]; }; +struct ctrldata { + void *buf; + size_t len; +}; + +#define CTRLARGV(x...) ((struct ctrldata []){ x }) + /* Control message types */ #define CTRL_SUCCESS 1 #define CTRL_FAILURE 2 @@ -311,8 +318,9 @@ char *default_initiator_name(void); int control_init(char *); void control_cleanup(char *); void control_event_init(void); -int control_queue(void *, struct pdu *); +void control_queue(void *, struct pdu *); int control_compose(void *, u_int16_t, void *, size_t); +int control_build(void *, u_int16_t, int, struct ctrldata *); struct session *session_find(struct initiator *, char *); struct session *session_new(struct initiator *, u_int8_t); |