shithub: riscv

Download patch

ref: f692b73955817f52c7e2a7448a2e9ce4504f78f0
parent: dac42bd005cb2d7701ee27547a3a62feb4a08835
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 8 18:11:18 EDT 2018

ip(3): document changes on /net/arp and /net/iproute

--- a/sys/man/3/ip
+++ b/sys/man/3/ip
@@ -345,12 +345,14 @@
 .I iproute
 controls information about IP routing.
 When read, it returns one line per routing entry.
-Each line contains six white-space-separated fields:
+Each line contains eight white-space-separated fields:
 target address, target mask, address of next hop, flags,
-tag, and interface number.
+tag, interface number, source address, source mask.
 The entry used for routing an IP packet is the one with
-the longest mask for which destination address ANDed with
-target mask equals the target address.
+the longest destination and source mask for which
+destination address ANDed with target mask equals the
+target and also the source ANDed with the source mask equals
+the source address.
 The one-character flags are:
 .TF m
 .TP
@@ -385,8 +387,10 @@
 .TF "\fLtag \fIstring\fR"
 .PD
 .TP
-.B flush
-Remove all routes.
+.BI flush\ tag
+Remove routes of the specified tag, or all routes if
+.I tag
+is omitted.
 .TP
 .BI tag\  string
 Associate the tag,
@@ -393,12 +397,37 @@
 .IR string ,
 with all subsequent routes added via this file descriptor.
 .TP
-.BI add\  "target mask nexthop"
+.BI add "target mask nexthop"
+.TP
+.BI add "target mask nexthop interface"
+.TP
+.BI add "target mask nexthop source smask"
+.TP
+.BI add "target mask nexthop interface source smask"
+.TP
+.BI add "target mask nexthop tag interface source smask"
+.TP
+.BI add "target mask nexthop type tag interface source smask"
 Add the route to the table.  If one already exists with the
-same target and mask, replace it.
+same target and mask, replace it. The
+.I interface
+can be given as eigther the interface number or a local
+IP address on the desired interface.
 .TP
-.BI remove\  "target mask"
-Remove a route with a matching target and mask.
+.BI remove "target mask"
+.TP
+.BI remove "target mask nexthop"
+.TP
+.BI remove "target mask source smask"
+.TP
+.BI remove "target mask nexthop source smask"
+.TP
+.BI remove "target mask nexthop interface source smask"
+.TP
+.BI remove "target mask nexthop tag interface source smask"
+.TP
+.BI remove "target mask nexthop type tag interface source smask"
+Remove the matching route.
 .
 .SS "Address resolution
 The file
@@ -408,7 +437,8 @@
 information for Ethernet interfaces.
 When read, the file returns one line per address containing the
 type of medium, the status of the entry (OK, WAIT), the IP
-address, and the medium address.
+address, the medium address and the IP address of the interface
+where the entry is valid.
 Writing to
 .B /net/arp
 administers the ARP information.
@@ -419,9 +449,11 @@
 .B flush
 Remove all entries.
 .TP
-.BI add\  "type IP-addr Media-addr"
+.BI add\  "type IP-addr Media-addr [Interface-IP-addr]"
 Add an entry or replace an existing one for the
-same IP address.
+same IP address. The optional interface IP address specifies the
+interface where the ARP entry will be valid. This is needed
+for IPv6 link local addresses.
 .TP
 .BI del\  "IP-addr"
 Delete an individual entry.
@@ -509,7 +541,6 @@
 and flags.  The usage count is the number of interfaces to which
 the address applies.  The flags are the same as for routing
 entries.
-Note that the `IPv4 route' flag will never be set.
 .br
 .ne 3
 .