Commit 761a1e60 authored by Christoph J. Thompson's avatar Christoph J. Thompson Committed by Stephen Hemminger

iproute2 - Split up manual page installation

Generate manual pages based on where the config files are installed.
Add missing manual pages for utilities which are links to other binaries.
Make tc-pfifo.8 a real file that points to tc-bfifo.8 instead of symlink
which causes problems with compressing manual pages.
Signed-off-by: default avatarChristoph J. Thompson <cjsthompson@gmail.com>
parent c8610020
......@@ -35,7 +35,7 @@ WFLAGS = -Wall -Wstrict-prototypes
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
YACCFLAGS = -d -t -v
SUBDIRS=lib ip tc misc netem genl
SUBDIRS=lib ip tc misc netem genl man
LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
LDLIBS += $(LIBNETLINK)
......@@ -60,17 +60,6 @@ install: all
$(DESTDIR)$(DOCDIR)/examples/diffserv
@for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
install -m 0755 -d $(DESTDIR)$(MANDIR)/man7
install -m 0644 $(shell find man/man7 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man7
ln -sf tc-bfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/rtstat.8
ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/ctstat.8
ln -sf rtacct.8 $(DESTDIR)$(MANDIR)/man8/nstat.8
ln -sf routel.8 $(DESTDIR)$(MANDIR)/man8/routef.8
install -m 0755 -d $(DESTDIR)$(MANDIR)/man3
install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
snapshot:
echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
......
INSTALL=install
INSTALLDIR=install -m 0755 -d
INSTALLMAN=install -m 0644
SUBDIRS = man3 man8
all:
@for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir; done
distclean: clean
clean:
@for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir clean; done
install:
@for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir install; done
.PHONY: install clean distclean
.EXPORT_ALL_VARIABLES:
MAN3PAGES=libnetlink.3
all:
distclean: clean
clean:
install:
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man3
$(INSTALLMAN) $(MAN3PAGES) $(DESTDIR)$(MANDIR)/man3
.PHONY: install clean distclean
TARGETS = ip-address.8 ip-link.8 ip-route.8
MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 ss.8 \
tc-bfifo.8 tc-cbq-details.8 tc-cbq.8 tc-drr.8 tc-htb.8 \
tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfq.8 \
tc-tbf.8 tc.8 rtstat.8 ctstat.8 nstat.8 routef.8
all: $(TARGETS)
ip-address.8: ip-address.8.in
sed "s|@SYSCONFDIR@|$(CONFDIR)|g" $< > $@
ip-link.8: ip-link.8.in
sed "s|@SYSCONFDIR@|$(CONFDIR)|g" $< > $@
ip-route.8: ip-route.8.in
sed "s|@SYSCONFDIR@|$(CONFDIR)|g" $< > $@
distclean: clean
clean:
@rm -f $(TARGETS)
install:
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALLMAN) $(MAN8PAGES) $(DESTDIR)$(MANDIR)/man8
.PHONY: install clean distclean
.so man8/lnstat.8
.TH "IP\-ADDRESS" 8 "20 Dec 2011" "iproute2" "Linux"
.SH "NAME"
ip-address \- protocol address management
.SH "SYNOPSIS"
.sp
.ad l
.in +8
.ti -8
.B ip
.RI "[ " OPTIONS " ]"
.B address
.RI " { " COMMAND " | "
.BR help " }"
.sp
.ti -8
.BR "ip address" " { " add " | " del " } "
.IB IFADDR " dev " STRING
.ti -8
.BR "ip address" " { " show " | " flush " } [ " dev
.IR STRING " ] [ "
.B scope
.IR SCOPE-ID " ] [ "
.B to
.IR PREFIX " ] [ " FLAG-LIST " ] [ "
.B label
.IR PATTERN " ]"
.ti -8
.IR IFADDR " := " PREFIX " | " ADDR
.B peer
.IR PREFIX " [ "
.B broadcast
.IR ADDR " ] [ "
.B anycast
.IR ADDR " ] [ "
.B label
.IR STRING " ] [ "
.B scope
.IR SCOPE-ID " ]"
.ti -8
.IR SCOPE-ID " := "
.RB "[ " host " | " link " | " global " | "
.IR NUMBER " ]"
.ti -8
.IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
.ti -8
.IR FLAG " := "
.RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
tentative " | " deprecated " | " dadfailed " | " temporary " ]"
.SH "DESCRIPTION"
The
.B address
is a protocol (IP or IPv6) address attached
to a network device. Each device must have at least one address
to use the corresponding protocol. It is possible to have several
different addresses attached to one device. These addresses are not
discriminated, so that the term
.B alias
is not quite appropriate for them and we do not use it in this document.
.sp
The
.B ip address
command displays addresses and their properties, adds new addresses
and deletes old ones.
.SS ip address add - add new protocol address.
.TP
.BI dev " NAME"
the name of the device to add the address to.
.TP
.BI local " ADDRESS " (default)
the address of the interface. The format of the address depends
on the protocol. It is a dotted quad for IP and a sequence of
hexadecimal halfwords separated by colons for IPv6. The
.I ADDRESS
may be followed by a slash and a decimal number which encodes
the network prefix length.
.TP
.BI peer " ADDRESS"
the address of the remote endpoint for pointopoint interfaces.
Again, the
.I ADDRESS
may be followed by a slash and a decimal number, encoding the network
prefix length. If a peer address is specified, the local address
cannot have a prefix length. The network prefix is associated
with the peer rather than with the local address.
.TP
.BI broadcast " ADDRESS"
the broadcast address on the interface.
.sp
It is possible to use the special symbols
.B '+'
and
.B '-'
instead of the broadcast address. In this case, the broadcast address
is derived by setting/resetting the host bits of the interface prefix.
.TP
.BI label " NAME"
Each address may be tagged with a label string.
In order to preserve compatibility with Linux-2.0 net aliases,
this string must coincide with the name of the device or must be prefixed
with the device name followed by colon.
.TP
.BI scope " SCOPE_VALUE"
the scope of the area where this address is valid.
The available scopes are listed in file
.BR "@SYSCONFDIR@/rt_scopes" .
Predefined scope values are:
.in +8
.B global
- the address is globally valid.
.sp
.B site
- (IPv6 only) the address is site local, i.e. it is
valid inside this site.
.sp
.B link
- the address is link local, i.e. it is valid only on this device.
.sp
.B host
- the address is valid only inside this host.
.in -8
.SS ip address delete - delete protocol address
.B Arguments:
coincide with the arguments of
.B ip addr add.
The device name is a required argument. The rest are optional.
If no arguments are given, the first address is deleted.
.SS ip address show - look at protocol addresses
.TP
.BI dev " NAME " (default)
name of device.
.TP
.BI scope " SCOPE_VAL"
only list addresses with this scope.
.TP
.BI to " PREFIX"
only list addresses matching this prefix.
.TP
.BI label " PATTERN"
only list addresses with labels matching the
.IR "PATTERN" .
.I PATTERN
is a usual shell style pattern.
.TP
.BR dynamic " and " permanent
(IPv6 only) only list addresses installed due to stateless
address configuration or only list permanent (not dynamic)
addresses.
.TP
.B tentative
(IPv6 only) only list addresses which have not yet passed duplicate
address detection.
.TP
.B deprecated
(IPv6 only) only list deprecated addresses.
.TP
.B dadfailed
(IPv6 only) only list addresses which have failed duplicate
address detection.
.TP
.B temporary
(IPv6 only) only list temporary addresses.
.TP
.BR primary " and " secondary
only list primary (or secondary) addresses.
.SS ip address flush - flush protocol addresses
This command flushes the protocol addresses selected by some criteria.
.PP
This command has the same arguments as
.B show.
The difference is that it does not run when no arguments are given.
.PP
.B Warning:
This command (and other
.B flush
commands described below) is pretty dangerous. If you make a mistake,
it will not forgive it, but will cruelly purge all the addresses.
.PP
With the
.B -statistics
option, the command becomes verbose. It prints out the number of deleted
addresses and the number of rounds made to flush the address list. If
this option is given twice,
.B ip address flush
also dumps all the deleted addresses in the format described in the
previous subsection.
.SH "EXAMPLES"
.PP
ip address show dev eth0
.RS 4
Shows the addresses assigned to network interface eth0
.RE
.PP
ip addr add 2001:0db8:85a3::0370:7334/64 dev eth1
.RS 4
Adds an IPv6 address to network interface eth1
.RE
.PP
ip addr flush dev eth4
.RS 4
Removes all addresses from device eth4
.RE
.SH SEE ALSO
.br
.BR ip (8)
.SH AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com>
.TH IP\-LINK 8 "20 Dec 2011" "iproute2" "Linux"
.SH "NAME"
ip-link \- network device configuration
.SH "SYNOPSIS"
.sp
.ad l
.in +8
.ti -8
.B ip
.RI "[ " OPTIONS " ]"
.B link
.RI " { " COMMAND " | "
.BR help " }"
.sp
.ti -8
.IR OPTIONS " := { "
\fB\-V\fR[\fIersion\fR] |
\fB\-s\fR[\fItatistics\fR] |
\fB\-r\fR[\fIesolve\fR] |
\fB\-f\fR[\fIamily\fR] {
.BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
\fB\-o\fR[\fIneline\fR] }
.ti -8
.BI "ip link add link " DEVICE
.RB "[ " name " ]"
.I NAME
.br
.RB "[ " txqueuelen
.IR PACKETS " ]"
.br
.RB "[ " address
.IR LLADDR " ]"
.RB "[ " broadcast
.IR LLADDR " ]"
.br
.RB "[ " mtu
.IR MTU " ]"
.br
.BR type " TYPE"
.RI "[ " ARGS " ]"
.ti -8
.IR TYPE " := [ "
.BR vlan " | " veth " | " vcan " | " dummy " | " ifb " | " macvlan " | " can " | " bridge " ]"
.ti -8
.BI "ip link delete " DEVICE
.BI type " TYPE"
.RI "[ " ARGS " ]"
.ti -8
.BR "ip link set " {
.IR DEVICE " | "
.BI "group " GROUP
.RB "} { " up " | " down " | " arp " { " on " | " off " } |"
.br
.BR promisc " { " on " | " off " } |"
.br
.BR allmulticast " { " on " | " off " } |"
.br
.BR dynamic " { " on " | " off " } |"
.br
.BR multicast " { " on " | " off " } |"
.br
.B txqueuelen
.IR PACKETS " |"
.br
.B name
.IR NEWNAME " |"
.br
.B address
.IR LLADDR " |"
.B broadcast
.IR LLADDR " |"
.br
.B mtu
.IR MTU " |"
.br
.B netns
.IR PID " |"
.br
.B netns
.IR NETNSNAME " |"
.br
.B alias
.IR NAME " |"
.br
.B vf
.IR NUM " ["
.B mac
.IR LLADDR " ] ["
.B vlan
.IR VLANID " [ "
.B qos
.IR VLAN-QOS " ] ] ["
.B rate
.IR TXRATE " ] ["
.B spoofchk { on | off }
] |
.br
.B master
.IR DEVICE
.br
.B nomaster
.BR " }"
.ti -8
.B ip link show
.RI "[ " DEVICE " | "
.B group
.IR GROUP " ]"
.SH "DESCRIPTION"
.SS ip link add - add virtual link
.TP
.BI link " DEVICE "
specifies the physical device to act operate on.
.I NAME
specifies the name of the new virtual device.
.I TYPE
specifies the type of the new device.
.sp
Link types:
.in +8
.B vlan
- 802.1q tagged virtual LAN interface
.sp
.B veth
- Virtual ethernet interface
.sp
.B vcan
- Virtual Local CAN interface
.sp
.B dummy
- Dummy network interface
.sp
.B ifb
- Intermediate Functional Block device
.sp
.B macvlan
- virtual interface base on link layer address (MAC)
.sp
.B can
- Controller Area Network interface
.sp
.B bridge
- Ethernet Bridge device
.in -8
.SS ip link delete - delete virtual link
.I DEVICE
specifies the virtual device to act operate on.
.I TYPE
specifies the type of the device.
.TP
.BI dev " DEVICE "
specifies the physical device to act operate on.
.SS ip link set - change device attributes
.TP
.BI dev " DEVICE "
.I DEVICE
specifies network device to operate on. When configuring SR-IOV Virtual Fuction
(VF) devices, this keyword should specify the associated Physical Function (PF)
device.
.TP
.BI group " GROUP "
.I GROUP
has a dual role: If both group and dev are present, then move the device to the
specified group. If only a group is specified, then the command operates on
all devices in that group.
.TP
.BR up " and " down
change the state of the device to
.B UP
or
.BR "DOWN" .
.TP
.BR "arp on " or " arp off"
change the
.B NOARP
flag on the device.
.TP
.BR "multicast on " or " multicast off"
change the
.B MULTICAST
flag on the device.
.TP
.BR "dynamic on " or " dynamic off"
change the
.B DYNAMIC
flag on the device.
.TP
.BI name " NAME"
change the name of the device. This operation is not
recommended if the device is running or has some addresses
already configured.
.TP
.BI txqueuelen " NUMBER"
.TP
.BI txqlen " NUMBER"
change the transmit queue length of the device.
.TP
.BI mtu " NUMBER"
change the
.I MTU
of the device.
.TP
.BI address " LLADDRESS"
change the station address of the interface.
.TP
.BI broadcast " LLADDRESS"
.TP
.BI brd " LLADDRESS"
.TP
.BI peer " LLADDRESS"
change the link layer broadcast address or the peer address when
the interface is
.IR "POINTOPOINT" .
.TP
.BI netns " PID"
move the device to the network namespace associated with the process
.IR "PID".
.TP
.BI netns " NETNSNAME"
move the device to the network namespace associated with name
.IR "NETNSNAME".
.TP
.BI alias " NAME"
give the device a symbolic name for easy reference.
.TP
.BI group " GROUP"
specify the group the device belongs to.
The available groups are listed in file
.BR "@SYSCONFDIR@/group" .
.TP
.BI vf " NUM"
specify a Virtual Function device to be configured. The associated PF device
must be specified using the
.B dev
parameter.
.in +8
.BI mac " LLADDRESS"
- change the station address for the specified VF. The
.B vf
parameter must be specified.
.sp
.BI vlan " VLANID"
- change the assigned VLAN for the specified VF. When specified, all traffic
sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
will be filtered for the specified VLAN ID, and will have all VLAN tags
stripped before being passed to the VF. Setting this parameter to 0 disables
VLAN tagging and filtering. The
.B vf
parameter must be specified.
.sp
.BI qos " VLAN-QOS"
- assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
tags transmitted by the VF will include the specified priority bits in the
VLAN tag. If not specified, the value is assumed to be 0. Both the
.B vf
and
.B vlan
parameters must be specified. Setting both
.B vlan
and
.B qos
as 0 disables VLAN tagging and filtering for the VF.
.sp
.BI rate " TXRATE"
- change the allowed transmit bandwidth, in Mbps, for the specified VF.
Setting this parameter to 0 disables rate limiting. The
.B vf
parameter must be specified.
.sp
.BI spoofchk " on|off"
- turn packet spoof checking on or off for the specified VF.
.in -8
.TP
.BI master " DEVICE"
set master device of the device (enslave device).
.TP
.BI nomaster
unset master device of the device (release device).
.PP
.B Warning:
If multiple parameter changes are requested,
.B ip
aborts immediately after any of the changes have failed.
This is the only case when
.B ip
can move the system to an unpredictable state. The solution
is to avoid changing several parameters with one
.B ip link set
call.
.SS ip link show - display device attributes
.TP
.BI dev " NAME " (default)
.I NAME
specifies the network device to show.
If this argument is omitted all devices in the default group are listed.
.TP
.BI group " GROUP "
.I GROUP
specifies what group of devices to show.
.TP
.B up
only display running interfaces.
.SH "EXAMPLES"
.PP
ip link show
.RS 4
Shows the state of all network interfaces on the system.
.RE
.PP
ip link set dev ppp0 mtu 1400
.RS 4
Change the MTU the ppp0 device.
.RE
.PP
ip link add link eth0 name eth0.10 type vlan id 10
.RS 4
Creates a new vlan device eth0.10 on device eth0.
.RE
.PP
ip link delete dev eth0.10
.RS 4
Removes vlan device.
.RE
.SH SEE ALSO
.br
.BR ip (8)
.SH AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com>
This diff is collapsed.
.so man8/rtacct.8
.so man8/routel.8
.so man8/lnstat.8
tc-bfifo.8
\ No newline at end of file
.so man8/tc-bfifo.8
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