Date: Wed, 13 Apr 2011 17:03:08 +0400 From: Sergey Vinogradov <boogie@lazybytes.org> To: gljennjohn@googlemail.com Cc: freebsd-current@freebsd.org Subject: Re: [PATCH] ifconfig(8) flag to display IPv4 netmasks in dot-decimal format Message-ID: <4DA59F0C.3060708@lazybytes.org> In-Reply-To: <20110411171713.144d9a72@ernst.jennejohn.org> References: <4DA2EFEF.3010004@lazybytes.org> <20110411171713.144d9a72@ernst.jennejohn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11.04.2011 19:17, Gary Jennejohn wrote: > On Mon, 11 Apr 2011 16:11:27 +0400 > Sergey Vinogradov<boogie@lazybytes.org> wrote: > >> I've written a tiny-tiny patch, which adds the '-t' flag to ifconfig(8). >> It modifies the output to display IPv4 netmasks in dotted decimal notation: >> >> % ifconfig msk0 >> msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 >> >> options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE> >> ether 00:16:e6:88:0f:89 >> inet 10.10.0.1 netmask 0xffffff00 broadcast 10.10.0.255 >> media: Ethernet autoselect (none) >> status: no carrier >> >> % ifconfig -t msk0 >> msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 >> >> options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE> >> ether 00:16:e6:88:0f:89 >> inet 10.10.0.1 netmask 255.255.255.0 broadcast 10.10.0.255 >> media: Ethernet autoselect (none) >> status: no carrier >> >> There was a discussion [1] in freebsd-hackers@ about adding such >> functionality to ifconfig(8), which urged me write this patch. The >> default behavior of ifconfig(8) is kept unmodified, so there shouldn't >> be any compatibility breakages. At least, it works fine for me :) >> >> [1] >> http://lists.freebsd.org/pipermail/freebsd-hackers/2011-April/034997.html >> > > Looks good, except I'd change this line to read like this: > +The > +.Fl t > +flag makes IPv4 netmasks being displayed in dotted decimal notation. > ^^^^^ results in > Note taken, fix will appear in the next patch version (if any). -- wbr, Boo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DA59F0C.3060708>