Hi bugs@
I spent some time reading afterboot.8 and noticed a few discrepancies with
reality.
Output from netstat(1) and from ifconfig(8) itself has changed lately.
I wasn't able to validate the correct output from the ppp(4), but based my
patch on gre(4) which i guess is similar enough.
Thank you for your time working on your project!
Best regards,
Pedro Caetano
Index: share/man/man8/afterboot.8
===================================================================
RCS file: /cvs/src/share/man/man8/afterboot.8,v
retrieving revision 1.160
diff -u -p -u -r1.160 afterboot.8
--- share/man/man8/afterboot.8 7 Sep 2017 13:08:39 -0000 1.160
+++ share/man/man8/afterboot.8 13 Jun 2018 01:20:39 -0000
@@ -173,22 +173,29 @@ man page for more information on the for
files.
The loopback interface will look something like:
.Bd -literal -offset indent
-lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 32972
- inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
- inet6 ::1 prefixlen 128
- inet 127.0.0.1 netmask 0xff000000
+lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
+ index 5 priority 0 llprio 3
+ groups: lo
+ inet6 ::1 prefixlen 128
+ inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
+ inet 127.0.0.1 netmask 0xff000000
.Ed
.Pp
an Ethernet interface something like:
.Bd -literal -offset indent
-em0: flags=9863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
- inet 192.168.4.52 netmask 0xffffff00 broadcast 192.168.4.255
- inet6 fe80::5ef0:f0f0%em0 prefixlen 64 scopeid 0x1
+em0: flags=8a43<UP,BROADCAST,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
+ lladdr 08:ad:0b:7a:a9:4e
+ index 1 priority 0 llprio 3
+ media: Ethernet autoselect (1000baseT full-duplex)
+ status: active
+ inet 192.168.4.52 netmask 0xffffff00 broadcast 192.168.4.255
.Ed
.Pp
and a PPP interface something like:
.Bd -literal -offset indent
-ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST>
+ppp0: flags=8010<UP,POINTOPOINT,RUNNING,,MULTICAST> mtu 1500
+ index 11 priority 0 llprio 3
+ groups: ppp
inet 203.3.131.108 --> 198.181.0.253 netmask 0xffff0000
.Ed
.Pp
@@ -208,26 +215,25 @@ The output will look something like:
Routing tables
Internet:
-Destination Gateway Flags Refs Use Mtu Interface
-default 192.168.4.254 UGS 0 11098028 - em0
-127 127.0.0.1 UGRS 0 0 - lo0
-127.0.0.1 127.0.0.1 UH 3 24 - lo0
-192.168.4 link#1 UC 0 0 - em0
-192.168.4.52 8:0:20:73:b8:4a UHL 1 6707 - em0
-192.168.4.254 0:60:3e:99:67:ea UHL 1 0 - em0
+Destination Gateway Flags Refs Use Mtu Prio
Iface
+default 192.168.4.254 UGS 61 28209655 - 8 em0
+127/8 127.0.0.1 UGRS 0 0 32768 8
lo0
+127.0.0.1 127.0.0.1 UHhl 8 196342 32768 1
lo0
+192.168.4/24 192.168.4.52 UCn 4 1523 - 4 em0
+192.168.4.52 08:ad:0b:7a:a9:4e UHLl 0 9916 - 1 em0
Internet6:
-Destination Gateway Flags Refs Use Mtu Interface
-::/96 ::1 UGRS 0 0 32972 lo0 =>
-::1 ::1 UH 4 0 32972 lo0
-::ffff:0.0.0.0/96 ::1 UGRS 0 0 32972 lo0
-fc80::/10 ::1 UGRS 0 0 32972 lo0
-fe80::/10 ::1 UGRS 0 0 32972 lo0
-fe80::%em0/64 link#1 UC 0 0 1500 em0
-fe80::%lo0/64 fe80::1%lo0 U 0 0 32972 lo0
-ff01::/32 ::1 U 0 0 32972 lo0
-ff02::%em0/32 link#1 UC 0 0 1500 em0
-ff02::%lo0/32 fe80::1%lo0 UC 0 0 32972 lo0
+Destination Gateway Flags
Refs Use Mtu Prio Iface
+::/96 ::1
UGRS 0 145 32768 8 lo0
+::1 ::1
UHhl 10 53 32768 1 lo0
+::ffff:0.0.0.0/96 ::1
UGRS 0 0 32768 8 lo0
+fe80::/10 ::1
UGRS 0 2 32768 8 lo0
+fec0::/10 ::1
UGRS 0 0 32768 8 lo0
+fe80::1%lo0 fe80::1%lo0
UHl 0 0 32768 1 lo0
+ff01::/16 ::1
UGRS 1 3 32768 8 lo0
+ff01::%lo0/32 ::1
Um 0 1 32768 4 lo0
+ff02::/16 ::1
UGRS 1 3 32768 8 lo0
+ff02::%lo0/32 ::1
Um 0 1 32768 4 lo0
.Ed
.Pp
The default gateway address is stored in the