mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
rtnlutil: Add IPv6 address dump
This commit is contained in:
parent
c8eb33c2c2
commit
e3e569b75b
@ -448,3 +448,24 @@ void rtnl_ifaddr_ipv6_extract(const struct ifaddrmsg *ifa, int len, char **ip)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
struct ifaddrmsg *rtmmsg;
|
||||
uint32_t id;
|
||||
|
||||
rtmmsg = l_malloc(sizeof(struct ifaddrmsg));
|
||||
memset(rtmmsg, 0, sizeof(struct ifaddrmsg));
|
||||
|
||||
rtmmsg->ifa_family = AF_INET6;
|
||||
|
||||
id = l_netlink_send(rtnl, RTM_GETADDR, NLM_F_DUMP, rtmmsg,
|
||||
sizeof(struct ifaddrmsg), cb, user_data,
|
||||
destroy);
|
||||
|
||||
l_free(rtmmsg);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
@ -70,3 +70,7 @@ uint32_t rtnl_route_ipv4_add_gateway(struct l_netlink *rtnl, int ifindex,
|
||||
|
||||
void rtnl_ifaddr_ipv6_extract(const struct ifaddrmsg *ifa, int bytes,
|
||||
char **ip);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user