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-11-20 23:23:44 +01:00
|
|
|
uint32_t rtnl_set_powered(struct l_netlink *rtnl, int ifindex, bool powered,
|
|
|
|
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);
|
2019-07-31 03:16:11 +02:00
|
|
|
uint32_t rtnl_route_ipv4_add_connected(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t dst_len, const char *dst,
|
|
|
|
const char *src, uint8_t proto,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
|
|
|
uint32_t rtnl_route_ipv4_add_gateway(struct l_netlink *rtnl, int ifindex,
|
|
|
|
const char *gateway, const char *src,
|
|
|
|
uint32_t priority_offset,
|
|
|
|
uint8_t proto,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-09-27 21:52:22 +02:00
|
|
|
|
|
|
|
void rtnl_ifaddr_ipv6_extract(const struct ifaddrmsg *ifa, int bytes,
|
|
|
|
char **ip);
|
2019-09-27 21:52:24 +02:00
|
|
|
uint32_t rtnl_ifaddr_ipv6_get(struct l_netlink *rtnl,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-09-27 21:52:26 +02:00
|
|
|
uint32_t rtnl_ifaddr_ipv6_add(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t prefix_len, const char *ip,
|
|
|
|
l_netlink_command_func_t cb, void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
|
|
|
uint32_t rtnl_ifaddr_ipv6_delete(struct l_netlink *rtnl, int ifindex,
|
|
|
|
uint8_t prefix_len, const char *ip,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-09-27 21:52:28 +02:00
|
|
|
uint32_t rtnl_route_ipv6_add_gateway(struct l_netlink *rtnl, int ifindex,
|
|
|
|
const char *gateway,
|
|
|
|
uint32_t priority_offset,
|
|
|
|
uint8_t proto,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|
2019-10-02 22:39:56 +02:00
|
|
|
uint32_t rtnl_route_ipv6_delete_gateway(struct l_netlink *rtnl, int ifindex,
|
|
|
|
const char *gateway,
|
|
|
|
uint32_t priority_offset,
|
|
|
|
uint8_t proto,
|
|
|
|
l_netlink_command_func_t cb,
|
|
|
|
void *user_data,
|
|
|
|
l_netlink_destroy_func_t destroy);
|