1 /*
2  * Netlink helper functions for driver wrappers
3  * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef NETLINK_H
10 #define NETLINK_H
11 
12 struct netlink_data;
13 struct ifinfomsg;
14 
15 struct netlink_config {
16           void *ctx;
17           void (*newlink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
18                                  size_t len);
19           void (*dellink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
20                                  size_t len);
21 };
22 
23 struct netlink_data * netlink_init(struct netlink_config *cfg);
24 void netlink_deinit(struct netlink_data *netlink);
25 int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex,
26                                  int linkmode, int operstate);
27 
28 #endif /* NETLINK_H */
29