[PATCH] ifconfig(8) flag to display IPv4 netmasks in
	dot-decimal format
    Pan Tsu 
    inyaoo at gmail.com
       
    Tue Apr 12 12:26:48 UTC 2011
    
    
  
Sergey Vinogradov <boogie at lazybytes.org> writes:
> Hi,
> 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 -t msk0
[...]
>         inet 10.10.0.1 netmask 255.255.255.0 broadcast 10.10.0.255
Isn't netstat(8) a better place for such an option? domask() already
converts netmask to CIDR notation if possible, e.g. `netstat -ni'
   10.10.0.1/24
   10.10.0.1&0xff00ff00
Unfortunately, Network column is always truncated to 13 characters even
with -W flag while it can be up to 26 characters long with `-n' flag or
more with a symbolic network name.
    
    
More information about the freebsd-current
mailing list