netlink: partial netlink handler for gset (no option)
Partially implement "ethtool <dev>" subcommand. This commit retrieves and
displays information provided by ETHTOOL_MSG_LINKINFO_GET,
ETHTOOL_MSG_LINKMODES_GET and ETHTOOL_MSG_LINKSTATE_GET netlink requests,
i.e. everything except wake-on-lan and debugging (msglevel).
Also register the callbacks in monitor so that corresponding notifications
can be displayed with "ethtool --monitor".
v2:
- print banner only once unless monitor or wildcard (dump request)
- suppress error messages for -EOPNOTSUPP responses
- only show "No data available" if there is no reply at all
- more readable nl_gset()
v3:
- fix gcc9 compiler warning
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6 files changed