nl80211: Include linux/rtnetlink.h explicitly
[libeap.git] / src / drivers / netlink.h
index c2cf59d..ccf12a5 100644 (file)
 #ifndef NETLINK_H
 #define NETLINK_H
 
-int netlink_send_oper_ifla(int sock, int ifindex, int linkmode, int operstate);
+struct netlink_data;
+struct ifinfomsg;
+
+struct netlink_config {
+       void *ctx;
+       void (*newlink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
+                          size_t len);
+       void (*dellink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
+                          size_t len);
+};
+
+struct netlink_data * netlink_init(struct netlink_config *cfg);
+void netlink_deinit(struct netlink_data *netlink);
+int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex,
+                          int linkmode, int operstate);
 
 #endif /* NETLINK_H */