2009-12-18 15:35:33 +01:00
|
|
|
/*
|
|
|
|
* Netlink helper functions for driver wrappers
|
|
|
|
* Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2009-12-18 15:35:33 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NETLINK_H
|
|
|
|
#define NETLINK_H
|
|
|
|
|
2009-12-18 16:11:54 +01:00
|
|
|
struct netlink_data;
|
2010-09-30 06:52:51 +02:00
|
|
|
struct ifinfomsg;
|
2009-12-18 16:11:54 +01:00
|
|
|
|
|
|
|
struct netlink_config {
|
|
|
|
void *ctx;
|
2009-12-18 16:49:07 +01:00
|
|
|
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);
|
2009-12-18 16:11:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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);
|
2009-12-18 15:35:33 +01:00
|
|
|
|
|
|
|
#endif /* NETLINK_H */
|