00001 /*00002 * Netlink helper functions for driver wrappers00003 * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>00004 *00005 * This program is free software; you can redistribute it and/or modify00006 * it under the terms of the GNU General Public License version 2 as00007 * published by the Free Software Foundation.00008 *00009 * Alternatively, this software may be distributed under the terms of BSD00010 * license.00011 *00012 * See README and COPYING for more details.00013 */00014
00015 #ifndef NETLINK_H00016 #define NETLINK_H00017
00018 struct netlink_data;
00019
00020struct netlink_config {
00021void *ctx;
00022 void (*newlink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
00023 size_t len);
00024 void (*dellink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf,
00025 size_t len);
00026 };
00027
00028 struct netlink_data * netlink_init(structnetlink_config *cfg);
00029 voidnetlink_deinit(structnetlink_data *netlink);
00030 intnetlink_send_oper_ifla(structnetlink_data *netlink, int ifindex,
00031 int linkmode, int operstate);
00032
00033 #endif /* NETLINK_H */