summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/proto.h b/proto.h
index 273ec94..e066b43 100644
--- a/proto.h
+++ b/proto.h
@@ -17,17 +17,18 @@ enum interface_proto_cmd {
enum {
PROTO_FLAG_IMMEDIATE = (1 << 0),
+ PROTO_FLAG_NODEV = (1 << 1),
};
struct interface_proto_state {
+ const struct proto_handler *handler;
struct interface *iface;
- unsigned int flags;
/* filled in by the protocol user */
void (*proto_event)(struct interface_proto_state *, enum interface_proto_event ev);
/* filled in by the protocol handler */
- int (*handler)(struct interface_proto_state *, enum interface_proto_cmd cmd, bool force);
+ int (*cb)(struct interface_proto_state *, enum interface_proto_cmd cmd, bool force);
void (*free)(struct interface_proto_state *);
};
@@ -35,6 +36,8 @@ struct interface_proto_state {
struct proto_handler {
struct avl_node avl;
+ unsigned int flags;
+
const char *name;
const struct config_param_list *config_params;