]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip address: Export ip_linkaddr_list
authorDavid Ahern <dsahern@gmail.com>
Sat, 27 May 2017 23:34:47 +0000 (17:34 -0600)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 31 May 2017 00:54:03 +0000 (17:54 -0700)
commit4ad875944fc50532cceafa4ac586bb8ec15c2f47
tree268d3e553081ba19d9f3421446dd4337291a4105
parent218560185d2d0aa3b3ac6ab166a7e6bfee39f5e5
ip address: Export ip_linkaddr_list

ipaddr_list_flush_or_save generates a list of nlmsg's for links and
optionally for addresses. Move the code into ip_linkaddr_list and
export it along with the supporting infrastructure.

API to use this function is:
        struct nlmsg_chain linfo = { NULL, NULL};
        struct nlmsg_chain ainfo = { NULL, NULL};

        ip_linkaddr_list(family, filter_req, &linfo, &ainfo);

        ... error checking and code looping over linfo/ainfo ...

        free_nlmsg_chain(&linfo);
        free_nlmsg_chain(&ainfo);

Signed-off-by: David Ahern <dsahern@gmail.com>
include/libnetlink.h
ip/ip_common.h
ip/ipaddress.c