HomeFreeBSD

- Add -W flag support for network column in intpr() (-i flag) and

Description

  • Add -W flag support for network column in intpr() (-i flag) and routepr() (-r flag). It is too narrow to show an IPv6 prefix in most cases.
  • Accept "local" as a synonym of "unix" in protocol family name.
  • Show a prefix length in CIDR notation when name resolution failed in netname().
  • Make routename() and netname() AF-independent and remove unnecessary typecasting from struct sockaddr.
  • Use getnameinfo(3) to format L2 addr in intpr().
  • Fix a bug which showed "Address" when -A flag is specfied in pr_rthdr().
  • Replace cryptic GETSA() macro with SA_SIZE().
  • Fix declarations shadowing local variables with the same names.
  • Add more static, remove unused header files and variables.

MFC after: 1 week

Details

Provenance
hrsAuthored on
Parents
rS287350: Use ANSI C prototypes.
Branches
Unknown
Tags
Unknown