Checkign in new iproute2
[iproute2.git] / ip / rtmon.c
index 5ce7731..7869b32 100644 (file)
@@ -17,7 +17,6 @@
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <net/if.h>
 #include <netinet/in.h>
 #include <string.h>
 
@@ -46,7 +45,7 @@ static void write_stamp(FILE *fp)
        fwrite((void*)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp);
 }
 
-static int dump_msg(const struct sockaddr_nl *who, struct nlmsghdr *n, 
+static int dump_msg(const struct sockaddr_nl *who, struct nlmsghdr *n,
                    void *arg)
 {
        FILE *fp = (FILE*)arg;
@@ -134,18 +133,18 @@ main(int argc, char **argv)
                exit(-1);
        }
        if (llink)
-               groups |= RTMGRP_LINK;
+               groups |= nl_mgrp(RTNLGRP_LINK);
        if (laddr) {
                if (!family || family == AF_INET)
-                       groups |= RTMGRP_IPV4_IFADDR;
+                       groups |= nl_mgrp(RTNLGRP_IPV4_IFADDR);
                if (!family || family == AF_INET6)
-                       groups |= RTMGRP_IPV6_IFADDR;
+                       groups |= nl_mgrp(RTNLGRP_IPV6_IFADDR);
        }
        if (lroute) {
                if (!family || family == AF_INET)
-                       groups |= RTMGRP_IPV4_ROUTE;
+                       groups |= nl_mgrp(RTNLGRP_IPV4_ROUTE);
                if (!family || family == AF_INET6)
-                       groups |= RTMGRP_IPV6_ROUTE;
+                       groups |= nl_mgrp(RTNLGRP_IPV6_ROUTE);
        }
 
        fp = fopen(file, "w");