2019-05-06 20:17:52 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
|
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint32_t rtnl_set_linkmode_and_operstate(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t linkmode, uint8_t operstate,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-06-26 00:20:53 +02:00
|
|
|
|
2019-07-02 01:28:39 +02:00
|
|
|
uint32_t rtnl_set_mac(struct l_netlink *rtnl, int ifindex,
|
|
|
|
const uint8_t addr[static 6],
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
|
|
|
|
2019-06-26 00:20:53 +02:00
|
|
|
void rtnl_ifaddr_extract(const struct ifaddrmsg *ifa, int bytes,
|
|
|
|
char **label, char **ip, char **broadcast);
|
2019-06-26 00:20:55 +02:00
|
|
|
uint32_t rtnl_ifaddr_get(struct l_netlink *rtnl, l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-06-26 00:20:58 +02:00
|
|
|
uint32_t rtnl_ifaddr_add(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t prefix_len, const char *ip,
|
|
|
|
const char *broadcast,
|
|
|
|
l_netlink_command_func_t cb, void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
|
|
|
uint32_t rtnl_ifaddr_delete(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t prefix_len, const char *ip,
|
|
|
|
const char *broadcast,
|
|
|
|
l_netlink_command_func_t cb, void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-07-17 02:49:44 +02:00
|
|
|
|
|
|
|
void rtnl_route_extract_ipv4(const struct rtmsg *rtmsg, uint32_t len,
|
|
|
|
uint32_t *ifindex, char **dst, char **gateway,
|
|
|
|
char **src);
|
2019-07-17 02:49:45 +02:00
|
|
|
uint32_t rtnl_route_dump_ipv4(struct l_netlink *rtnl,
|
|
|
|
l_netlink_command_func_t cb, void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|