Commit b64f58b0 authored by jamal's avatar jamal Committed by Stephen Hemminger

update rest to use nl_mgrp

cheers,
jamal

[ALL] update rest to use nl_mgrp
Signed-off-by: default avatarJ Hadi Salim <hadi@cyberus.ca>
Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
parent e309c5fa
......@@ -132,22 +132,22 @@ int do_ipmonitor(int argc, char **argv)
}
if (llink)
groups |= RTMGRP_LINK;
groups |= nl_mgrp(RTNLGRP_LINK);
if (laddr) {
if (!preferred_family || preferred_family == AF_INET)
groups |= RTMGRP_IPV4_IFADDR;
groups |= nl_mgrp(RTNLGRP_IPV4_IFADDR);
if (!preferred_family || preferred_family == AF_INET6)
groups |= RTMGRP_IPV6_IFADDR;
groups |= nl_mgrp(RTNLGRP_IPV6_IFADDR);
}
if (lroute) {
if (!preferred_family || preferred_family == AF_INET)
groups |= RTMGRP_IPV4_ROUTE;
groups |= nl_mgrp(RTNLGRP_IPV4_ROUTE);
if (!preferred_family || preferred_family == AF_INET6)
groups |= RTMGRP_IPV6_ROUTE;
groups |= nl_mgrp(RTNLGRP_IPV6_ROUTE);
}
if (lprefix) {
if (!preferred_family || preferred_family == AF_INET6)
groups |= RTMGRP_IPV6_PREFIX;
groups |= nl_mgrp(RTNLGRP_IPV6_PREFIX);
}
if (file) {
......
......@@ -134,18 +134,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");
......
......@@ -68,7 +68,7 @@ int do_tcmonitor(int argc, char **argv)
{
struct rtnl_handle rth;
char *file = NULL;
unsigned groups = RTMGRP_TC;
unsigned groups = nl_mgrp(RTNLGRP_TC);
while (argc > 0) {
if (matches(*argv, "file") == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment