blob: 3a7340e515346a5c00f58fbfd92f56931f85c95f [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * Netlink helper functions for driver wrappers
3 * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef NETLINK_H
10#define NETLINK_H
11
12struct netlink_data;
13struct ifinfomsg;
14
15struct 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
23struct netlink_data * netlink_init(struct netlink_config *cfg);
24void netlink_deinit(struct netlink_data *netlink);
25int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex,
26 int linkmode, int operstate);
27
28#endif /* NETLINK_H */