diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2012-11-23 20:12:39 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2012-11-23 20:12:39 +0000 |
commit | 6250ec9638166374db40bab70d1eff697401bbcc (patch) | |
tree | eec91138e3ea427f40d68c9501de378000ddba22 /sbin/ifconfig/ifconfig.c | |
parent | 673d5d2ec6990bc4e901b79ee906e6d0f48e65b9 (diff) |
Display hardmtu value when "ifconfig hwfeatures" is used.
Looks fine reyk@ ok mikeb@
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 4fcba358fd5..deef85657da 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.257 2012/09/06 19:41:59 tedu Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.258 2012/11/23 20:12:38 sthen Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -4722,6 +4722,11 @@ printifhwfeatures(const char *unused, int show) if (ioctl(s, SIOCGIFDATA, (caddr_t)&ifr) == -1) err(1, "SIOCGIFDATA"); printb("\thwfeatures", (u_int)ifrdat.ifi_capabilities, HWFEATURESBITS); + + if (ioctl(s, SIOCGIFHARDMTU, (caddr_t)&ifr) != -1) { + if (ifr.ifr_hardmtu) + printf(" hardmtu %lu", ifr.ifr_hardmtu); + } putchar('\n'); } #endif |