if (n->nlmsg_type != RTM_NEWADDR &&
n->nlmsg_type != RTM_DELADDR &&
n->nlmsg_type != RTM_NEWMULTICAST &&
- n->nlmsg_type != RTM_DELMULTICAST)
+ n->nlmsg_type != RTM_DELMULTICAST &&
+ n->nlmsg_type != RTM_NEWANYCAST &&
+ n->nlmsg_type != RTM_DELANYCAST)
return 0;
len -= NLMSG_LENGTH(sizeof(*ifa));
if (len < 0) {
print_headers(fp, "[ADDR]");
- if (n->nlmsg_type == RTM_DELADDR || n->nlmsg_type == RTM_DELMULTICAST)
+ if (n->nlmsg_type == RTM_DELADDR ||
+ n->nlmsg_type == RTM_DELMULTICAST ||
+ n->nlmsg_type == RTM_DELANYCAST)
print_bool(PRINT_ANY, "deleted", "Deleted ", true);
if (!brief) {
fprintf(stderr,
"Usage: ip monitor [ all | OBJECTS ] [ FILE ] [ label ] [ all-nsid ]\n"
" [ dev DEVICE ]\n"
- "OBJECTS := address | link | mroute | maddress | neigh | netconf |\n"
- " nexthop | nsid | prefix | route | rule | stats\n"
+ "OBJECTS := address | link | mroute | maddress | acaddress | neigh |\n"
+ " netconf | nexthop | nsid | prefix | route | rule | stats\n"
"FILE := file FILENAME\n");
exit(-1);
}
case RTM_DELMULTICAST:
case RTM_NEWMULTICAST:
+ case RTM_DELANYCAST:
+ case RTM_NEWANYCAST:
print_addrinfo(n, arg);
return 0;
#define IPMON_LNSID BIT(9)
#define IPMON_LNEXTHOP BIT(10)
#define IPMON_LMADDR BIT(11)
+#define IPMON_LACADDR BIT(12)
#define IPMON_L_ALL (~0)
lmask |= IPMON_LADDR;
} else if (matches(*argv, "maddress") == 0) {
lmask |= IPMON_LMADDR;
+ } else if (strcmp(*argv, "acaddress") == 0) {
+ lmask |= IPMON_LACADDR;
} else if (matches(*argv, "route") == 0) {
lmask |= IPMON_LROUTE;
} else if (matches(*argv, "mroute") == 0) {
}
}
+ if (lmask & IPMON_LACADDR) {
+ if ((!preferred_family || preferred_family == AF_INET6) &&
+ rtnl_add_nl_group(&rth, RTNLGRP_IPV6_ACADDR) < 0) {
+ fprintf(stderr,
+ "Failed to add ipv6 acaddr group to list\n");
+ exit(1);
+ }
+ }
+
if (listen_all_nsid && rtnl_listen_all_nsid(&rth) < 0)
exit(1);
.I OBJECT-LIST
is the list of object types that we want to monitor.
It may contain
-.BR link ", " address ", " route ", " mroute ", " maddress ", " prefix ", "
-.BR neigh ", " netconf ", " rule ", " stats ", " nsid " and " nexthop "."
+.BR link ", " address ", " route ", " mroute ", " maddress ", " acaddress ", "
+.BR prefix ", "neigh ", " netconf ", " rule ", " stats ", " nsid " and "
+.BR nexthop "."
If no
.B file
argument is given,