8 struct static_proto_state {
9 struct interface_proto_state proto;
14 static_handler(struct interface_proto_state *proto,
15 enum interface_proto_cmd cmd, bool force)
21 static_free(struct interface_proto_state *proto)
23 struct static_proto_state *state;
25 state = container_of(proto, struct static_proto_state, proto);
29 struct interface_proto_state *
30 static_attach(struct proto_handler *h, struct interface *iface,
31 struct uci_section *s)
33 struct static_proto_state *state;
35 state = calloc(1, sizeof(*state));
36 state->proto.free = static_free;
37 state->proto.handler = static_handler;
38 state->proto.flags = PROTO_FLAG_IMMEDIATE;
43 static struct proto_handler static_proto = {
45 .attach = static_attach,
49 static_proto_init(void)
51 add_proto_handler(&static_proto);