eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit e3e569b75b0c762be50d8d4833d6db29eee0b73a
parent c8eb33c2c25521a8c915b234fec3706369063da3
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date:   Fri, 27 Sep 2019 12:52:24 -0700

rtnlutil: Add IPv6 address dump

Diffstat:
Msrc/rtnlutil.c | 21+++++++++++++++++++++
Msrc/rtnlutil.h | 4++++
2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/rtnlutil.c b/src/rtnlutil.c @@ -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; +} diff --git a/src/rtnlutil.h b/src/rtnlutil.h @@ -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);