diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 12:31:50 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 12:31:50 +0200 |
commit | bbfa8c18c8ae086b6fd941e950c466f25c134c17 (patch) | |
tree | 208e77fd95237c1d6e525861179826d445012766 /proto.h | |
parent | e32103ad7e944ccbebef4335333481e565311f5c (diff) |
move protocol flags to the handler, add a pointer to the handler in the proto state, add PROTO_FLAG_NODEV
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |