From: Varun Chandramohan <varunc@linux.vnet.ibm.com>
To: shemminger@vyatta.com
Cc: netdev@vger.kernel.org
Subject: [IPROUTE2][PATCH 1/2] Add Monitor Support For Neigh Table
Date: Thu, 12 Mar 2009 13:42:07 +0530 [thread overview]
Message-ID: <20090312134207.783f00d4.varunc@linux.vnet.ibm.com> (raw)
This patch adds exclusive support to enable monitoring
neighbour table entries in ip command.
Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
---
ip/ipmonitor.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index df0fd91..a74730e 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -102,6 +102,7 @@ int do_ipmonitor(int argc, char **argv)
int laddr=0;
int lroute=0;
int lprefix=0;
+ int lneigh=0;
rtnl_close(&rth);
ipaddr_reset_filter(1);
@@ -124,6 +125,9 @@ int do_ipmonitor(int argc, char **argv)
} else if (matches(*argv, "prefix") == 0) {
lprefix=1;
groups = 0;
+ } else if (matches(*argv, "neigh") == 0) {
+ lneigh=1;
+ groups = 0;
} else if (strcmp(*argv, "all") == 0) {
groups = ~RTMGRP_TC;
} else if (matches(*argv, "help") == 0) {
@@ -153,7 +157,9 @@ int do_ipmonitor(int argc, char **argv)
if (!preferred_family || preferred_family == AF_INET6)
groups |= nl_mgrp(RTNLGRP_IPV6_PREFIX);
}
-
+ if (lneigh) {
+ groups |= nl_mgrp(RTNLGRP_NEIGH);
+ }
if (file) {
FILE *fp;
fp = fopen(file, "r");
--
1.5.4.3
reply other threads:[~2009-03-12 8:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090312134207.783f00d4.varunc@linux.vnet.ibm.com \
--to=varunc@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).