From 1e1c215656b1c6e500362a3837afe5b1fa66b29f Mon Sep 17 00:00:00 2001 From: jca Date: Mon, 4 Apr 2016 11:37:09 +0000 Subject: Hook up ndp -f. Initial diff from Dimitris Papastamos. Support from mikeb@, ok benno@. --- usr.sbin/ndp/ndp.8 | 10 ++++++++-- usr.sbin/ndp/ndp.c | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ndp') diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 9a1912302ce..5bbea46a978 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ndp.8,v 1.35 2015/10/05 10:25:19 sobrado Exp $ +.\" $OpenBSD: ndp.8,v 1.36 2016/04/04 11:37:09 jca Exp $ .\" $KAME: ndp.8,v 1.28 2002/07/17 08:46:33 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: October 5 2015 $ +.Dd $Mdocdate: April 4 2016 $ .Dt NDP 8 .Os .Sh NAME @@ -117,6 +117,12 @@ Delete the specified NDP entry. .It Fl f Ar filename Parse the file specified by .Ar filename . +Entries in the file should be of the form: +.Bd -ragged -offset indent -compact +.Ar nodename etheraddr +.Op Ar temp +.Op Ar proxy +.Ed .It Fl H Harmonize consistency between the routing table and the default router list; install the top entry of the list into the kernel routing table. diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 1794932a4c7..c5dbc38738c 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.69 2016/01/26 18:26:19 mmcc Exp $ */ +/* $OpenBSD: ndp.c,v 1.70 2016/04/04 11:37:09 jca Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -241,6 +241,11 @@ main(int argc, char *argv[]) } delete(arg); break; + case 'f': + if (argc != 0) + usage(); + file(arg); + break; case 'p': if (argc != 0) { usage(); -- cgit v1.2.3-59-g8ed1b