summaryrefslogtreecommitdiffhomepage
path: root/interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/interface.h b/interface.h
index 3a0b96f..dd72389 100644
--- a/interface.h
+++ b/interface.h
@@ -12,11 +12,21 @@ enum interface_event {
IFEV_DOWN,
};
+enum interface_proto_event {
+ PROTO_UP,
+ PROTO_DOWN,
+};
+
struct interface_proto_state {
+ struct interface *iface;
const struct interface_proto *proto;
- int (*event)(struct interface *, struct interface_proto_state *, enum interface_event ev);
- void (*free)(struct interface *, struct interface_proto_state *);
+ /* filled in by the protocol user */
+ int (*proto_event)(struct interface_proto_state *, enum interface_proto_event ev);
+
+ /* filled in by the protocol handler */
+ int (*event)(struct interface_proto_state *, enum interface_event ev);
+ void (*free)(struct interface_proto_state *);
};
struct interface_error {