Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Netlink helper functions for driver wrappers |
| 3 | * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 */ |