ifconfig(8): Add '-f' option to print in more formats
* Add the '-f' option to control the output formats of addresses,
inet (IPv4) subnet masks, inet6 (IPv6) prefix length, Ethernet (MAC)
address. The following output formats are supported:
- address: numeric (default), host, FQDN
- inet (IPv4) subnet masks: CIDR, dotted-quad, and traditional hex
output (default)
- inet6 (IPv6) prefix length: CIDR, traditional integer format
(default)
- ether (MAC address): colon-separated (default), dash-separated
* The 'IFCONFIG_FORMAT' environment variable has the same usage as the
'-f' option and can be overrided by the latter.
* Some minor cleanups.
Obtained from FreeBSD (revisions 301059 and 301185; review D2856), but
with my own minor modifications.