Skip to content

Commit 163c80b

Browse files
committed
add man page for ndptool
Signed-off-by: Jiri Pirko <[email protected]>
1 parent 1bb2927 commit 163c80b

File tree

5 files changed

+62
-5
lines changed

5 files changed

+62
-5
lines changed

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ MAINTAINERCLEANFILES = Makefile.in
22

33
ACLOCAL_AMFLAGS = -I m4
44

5-
SUBDIRS = include libndp utils
5+
SUBDIRS = include libndp utils man

configure.ac

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ AC_CONFIG_FILES([Makefile
5858
include/Makefile \
5959
libndp/Makefile \
6060
libndp/libndp.pc \
61-
utils/Makefile])
61+
utils/Makefile \
62+
man/Makefile])
6263
AC_OUTPUT

man/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist_man8_MANS = ndptool.8

man/ndptool.8

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.TH ndptool 8 "16 April 2013" "libndp"
2+
.SH NAME
3+
ndptool \(em Neighbor Discovery Protocol tool
4+
.SH SYNOPSIS
5+
.B ndptool
6+
.B \-h
7+
.TP
8+
.B ndptool [OPTIONS] COMMAND
9+
.TP
10+
.SH DESCRIPTION
11+
.PP
12+
ndptool is a tool which provides wrapper over Neighbor Discovery Protocol
13+
messages.
14+
15+
.SH OPTIONS
16+
.TP
17+
.B "\-h, \-\-help"
18+
Print help text to console and exit.
19+
20+
.TP
21+
.B "\-v, \-\-verbose"
22+
Increase output verbosity.
23+
24+
.TP
25+
.B "\-t type, \-\-msg-type type"
26+
Specified message type. Following are supported:
27+
28+
.BR "rs "-
29+
Router Solicitation.
30+
31+
.BR "ra "-
32+
Router Advertisement.
33+
34+
.BR "ns "-
35+
Neighbor Solicitation.
36+
37+
.BR "na "-
38+
Neighbor Advertisement.
39+
40+
.TP
41+
.B "\-i ifname, \-\-ifname ifname"
42+
Specified interface name.
43+
44+
.SH COMMAND
45+
.TP
46+
.B "monitor"
47+
Monitor incoming NDP messages and print them out.
48+
49+
.TP
50+
.B "send"
51+
Send NDP message of specified type.
52+
53+
.SH AUTHOR
54+
.PP
55+
Jiri Pirko is the original author and current maintainer of libndp.

utils/ndptool.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ static void print_help(const char *argv0) {
136136
"%s [options] command\n"
137137
"\t-h --help Show this help\n"
138138
"\t-v --verbose Increase output verbosity\n"
139-
"\t-t --msg_type=TYPE Specified message type\n"
140-
"\t-i --ifname=IFNAME Specified interface name\n"
139+
"\t-t --msg-type=TYPE Specify message type\n"
141140
"\t (\"rs\", \"ra\", \"ns\", \"na\")\n"
141+
"\t-i --ifname=IFNAME Specify interface name\n"
142142
"Available commands:\n"
143143
"\tmonitor\n"
144144
"\tsend\n",
@@ -377,7 +377,7 @@ int main(int argc, char **argv)
377377
static const struct option long_options[] = {
378378
{ "help", no_argument, NULL, 'h' },
379379
{ "verbose", no_argument, NULL, 'v' },
380-
{ "msg_type", required_argument, NULL, 't' },
380+
{ "msg-type", required_argument, NULL, 't' },
381381
{ "ifname", required_argument, NULL, 'i' },
382382
{ NULL, 0, NULL, 0 }
383383
};

0 commit comments

Comments
 (0)