1 #ifndef __NETIFD_PROTO_H
2 #define __NETIFD_PROTO_H
4 struct interface_proto_state
;
6 enum interface_proto_event
{
11 enum interface_proto_cmd
{
17 PROTO_FLAG_IMMEDIATE
= (1 << 0),
20 struct interface_proto_state
{
21 struct interface
*iface
;
24 /* filled in by the protocol user */
25 void (*proto_event
)(struct interface_proto_state
*, enum interface_proto_event ev
);
27 /* filled in by the protocol handler */
28 int (*handler
)(struct interface_proto_state
*, enum interface_proto_cmd cmd
, bool force
);
29 void (*free
)(struct interface_proto_state
*);
32 struct interface_proto_state
*get_default_proto(void);
33 int interface_proto_event(struct interface_proto_state
*proto
,
34 enum interface_proto_cmd cmd
, bool force
);