> Date: Tue, 13 Dec 2016 10:51:40 +0100
> From: Reyk Floeter <r...@openbsd.org>
> 
> Hi,
> 
> printing the netmask in hex seems to be a historical artifact in ifconfig;
> I always wondered about it and I never got used to it.
> 
> The following diff changes ifconfig output to print contiguous
> netmasks in CIDR notation.  Non-contiguous netmasks will still be
> printed in full, tunnels will print explicit "prefixlen" because it is
> not unambiguous where the mask belongs to in this case.
> 
> lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> rdomain 1 mtu 32768
>         index 7 priority 0 llprio 3
>         groups: lo
>         inet6 ::1/128
>         inet6 fe80::1%lo1/64 scopeid 0x7
>         inet 10.2.1.100 netmask 0xffff00ff
>         inet 10.3.100.1/24
> 
> A similar change has been done in NetBSD and FreeBSD is doing the
> FreeBSD thing by providing an -f command-line button to select one of
> three output modes ...
> 
> Thoughts?

I'd say it is a bad idea to mix the two forms in ifconfig output.

Reply via email to