Add ip rule flush capabilty and fix all the prototype changes
because of that code rewrites the nlmsghdr.
(Logical change 1.106)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 24c9322..ae6f8c1 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -126,7 +126,8 @@
printf("qlen %d", ifr.ifr_qlen);
}
-int print_linkinfo(const struct sockaddr_nl *who, const struct nlmsghdr *n, void *arg)
+int print_linkinfo(const struct sockaddr_nl *who,
+ struct nlmsghdr *n, void *arg)
{
FILE *fp = (FILE*)arg;
struct ifinfomsg *ifi = NLMSG_DATA(n);
@@ -275,7 +276,7 @@
return 0;
}
-int print_addrinfo(const struct sockaddr_nl *who, const struct nlmsghdr *n,
+int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
FILE *fp = (FILE*)arg;
@@ -466,7 +467,7 @@
}
-static int store_nlmsg(const struct sockaddr_nl *who, const struct nlmsghdr *n,
+static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
struct nlmsg_list **linfo = (struct nlmsg_list**)arg;