aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemming@brocade.com>2015-11-03 16:31:57 -0800
committerStephen Hemminger <shemming@brocade.com>2015-11-03 16:31:57 -0800
commit1e5aa99024a299f49d46fd266dcad9759abd1336 (patch)
tree1cee13692b45e8944eabd0438d29a17db1b012a8
parentdddf1b44126eaa25c6698be618fb452fc7b9bed3 (diff)
parentb5bb1820e8a7666a1cab56bf8370b338647fd7a2 (diff)
downloadandroid_external_iproute2-1e5aa99024a299f49d46fd266dcad9759abd1336.tar.gz
android_external_iproute2-1e5aa99024a299f49d46fd266dcad9759abd1336.tar.bz2
android_external_iproute2-1e5aa99024a299f49d46fd266dcad9759abd1336.zip
Merge branch 'master' into net-next
-rw-r--r--bridge/fdb.c6
-rw-r--r--lib/utils.c6
-rw-r--r--man/man8/genl.877
-rw-r--r--man/man8/ifcfg.848
-rw-r--r--man/man8/ifstat.859
5 files changed, 191 insertions, 5 deletions
diff --git a/bridge/fdb.c b/bridge/fdb.c
index 5ea50ab..4d10925 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -31,11 +31,11 @@ static unsigned int filter_index;
static void usage(void)
{
- fprintf(stderr, "Usage: bridge fdb { add | append | del | replace ADDR dev DEV\n"
+ fprintf(stderr, "Usage: bridge fdb { add | append | del | replace } ADDR dev DEV\n"
" [ self ] [ master ] [ use ] [ router ]\n"
" [ local | temp ] [ dst IPADDR ] [ vlan VID ]\n"
- " [ port PORT] [ vni VNI ] [via DEV]\n");
- fprintf(stderr, " bridge fdb {show} [ br BRDEV ] [ brport DEV ]\n");
+ " [ port PORT] [ vni VNI ] [ via DEV ]\n");
+ fprintf(stderr, " bridge fdb [ show [ br BRDEV ] [ brport DEV ] ]\n");
exit(-1);
}
diff --git a/lib/utils.c b/lib/utils.c
index 107e3f5..939a44f 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -531,7 +531,8 @@ done:
int get_addr(inet_prefix *dst, const char *arg, int family)
{
if (get_addr_1(dst, arg, family)) {
- fprintf(stderr, "Error: an inet address is expected rather than \"%s\".\n", arg);
+ fprintf(stderr, "Error: %s address is expected rather than \"%s\".\n",
+ family_name(family) ,arg);
exit(1);
}
return 0;
@@ -544,7 +545,8 @@ int get_prefix(inet_prefix *dst, char *arg, int family)
exit(1);
}
if (get_prefix_1(dst, arg, family)) {
- fprintf(stderr, "Error: an inet prefix is expected rather than \"%s\".\n", arg);
+ fprintf(stderr, "Error: %s prefix is expected rather than \"%s\".\n",
+ family_name(family) ,arg);
exit(1);
}
return 0;
diff --git a/man/man8/genl.8 b/man/man8/genl.8
new file mode 100644
index 0000000..b9de594
--- /dev/null
+++ b/man/man8/genl.8
@@ -0,0 +1,77 @@
+.TH GENL 8 "29 Oct 2015" "iproute2" "Linux"
+.SH NAME
+genl \- generic netlink utility frontend
+.SH SYNOPSIS
+.in +8
+.ti -8
+.BR genl " [ " -s [ tatistics "] ] [ " -d [ etails "] ] [ " -r [ aw "] ] " OBJECT
+
+.ti -8
+.BR genl " { " -V [ ersion "] | " -h [ elp "] }"
+
+.ti -8
+.IR OBJECT " := { "
+.B ctrl
+.IR CTRL_OPTS " }"
+
+.ti -8
+.IR CTRL_OPTS " := { "
+.BR help " | " list " | " monitor " | " get
+.IR PARMS " }"
+
+.ti -8
+.IR PARMS " := { "
+.B name
+.IR NAME " | "
+.B id
+.IR ID " }"
+.SH DESCRIPTION
+The
+.B genl
+utility provides a simple frontend to the generic netlink library. Although it's
+designed to support multiple
+.IR OBJECT s,
+for now only the
+.B ctrl
+object is available, which is used to query the generic netlink controller.
+.SS ctrl
+The generic netlink controller can be queried in various ways:
+.TP
+.B help
+This command just prints a help text for the
+.B ctrl
+object.
+.TP
+.B list
+Show the registered netlink users.
+.TP
+.B monitor
+Listen for generic netlink notifications.
+.TP
+.B get
+Query the controller for a given user, identified either by
+.BR name " or " id .
+.SH OPTIONS
+genl supports the following options.
+.TP
+.B \-h, \-help
+Show summary of options.
+.TP
+.B \-V, \-Version
+Show version of program.
+.TP
+.B \-s, \-stats, \-statistics
+Show object statistics.
+.TP
+.B \-d, \-details
+Show object details.
+.TP
+.B \-r, \-raw
+Dump raw output only.
+.SH SEE ALSO
+.BR ip (8)
+.br
+.SH AUTHOR
+genl was written by Jamal Hadi Salim <hadi@cyberus.ca>.
+.PP
+This manual page was written by Petr Sabata <contyk@redhat.com>.
diff --git a/man/man8/ifcfg.8 b/man/man8/ifcfg.8
new file mode 100644
index 0000000..79033bd
--- /dev/null
+++ b/man/man8/ifcfg.8
@@ -0,0 +1,48 @@
+.TH IFCFG 8 "September 24 2009" "iproute2" "Linux"
+.SH NAME
+ifcfg \- simplistic script which replaces ifconfig IP managment
+.SH SYNOPSIS
+.ad l
+.in +8
+.ti -8
+.B ifcfg
+.RI "[ " DEVICE " ] [ " command " ] " ADDRESS " [ " PEER " ] "
+.sp
+
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ifcfg
+command.
+.PP
+This is a simplistic script replacing one option of
+.B ifconfig
+, namely, IP address management. It not only adds
+addresses, but also carries out Duplicate Address Detection RFC-DHCP,
+sends unsolicited ARP to update the caches of other hosts sharing
+the interface, adds some control routes and restarts Router Discovery
+when it is necessary.
+
+.SH IFCONFIG - COMMAND SYNTAX
+
+.SS
+.TP
+.B DEVICE
+- it may have alias, suffix, separated by colon.
+
+.TP
+.B command
+- add, delete or stop.
+
+.TP
+.B ADDRESS
+- optionally followed by prefix length.
+
+.TP
+.B peer
+- optional peer address for pointpoint interfaces.
+
+.SH NOTES
+This script is not suitable for use with IPv6.
+
+.SH SEE ALSO
+.RB "IP Command reference " ip-cref.ps
diff --git a/man/man8/ifstat.8 b/man/man8/ifstat.8
new file mode 100644
index 0000000..e49d868
--- /dev/null
+++ b/man/man8/ifstat.8
@@ -0,0 +1,59 @@
+.TH IFSTAT 8 "28 Oct 2015" "iproute2" "Linux"
+.SH NAME
+ifstat \- handy utility to read network interface statistics
+.SH SYNOPSIS
+.in +8
+.ti -8
+.BR ifstat " [ "
+.IR OPTIONS " ] [ " INTERFACE_LIST " ]"
+
+.ti -8
+.IR INTERFACE_LIST " := " INTERFACE_LIST " | " interface
+.SH DESCRIPTION
+\fBifstat\fP neatly prints out network interface statistics.
+The utility keeps records of the previous data displayed in history files and
+by default only shows difference between the last and the current call.
+Location of the history files defaults to /tmp/.ifstat.u$UID but may be
+overridden with the IFSTAT_HISTORY environment variable.
+.SH OPTIONS
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-V, \-\-version
+Show version of program.
+.TP
+.B \-a, \-\-ignore
+Ignore the history file.
+.TP
+.B \-d, \-\-scan=SECS
+Sample statistics every SECS second.
+.TP
+.B \-e, \-\-errors
+Show errors.
+.TP
+.B \-n, \-\-nooutput
+Don't display any output. Update the history file only.
+.TP
+.B \-r, \-\-reset
+Reset history.
+.TP
+.B \-s, \-\-noupdate
+Don't update the history file.
+.TP
+.B \-t, \-\-interval=SECS
+Report average over the last SECS seconds.
+.TP
+.B \-z, \-\-zeros
+Show entries with zero activity.
+.SH ENVIRONMENT
+.TP
+.B IFSTAT_HISTORY
+If set, it's value is interpreted as alternate history file path.
+.SH SEE ALSO
+.BR ip (8)
+.br
+.SH AUTHOR
+ifstat was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
+.PP
+This manual page was written by Petr Sabata <contyk@redhat.com>.