diff options
author | marius <marius@FreeBSD.org> | 2011-05-15 12:58:29 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2011-05-15 12:58:29 +0000 |
commit | 03919a330383c466e2b1534e8c39cb838cb7d4ab (patch) | |
tree | 16ffa2286dec1852a5d2d1f79278abc4dce3b6ed /sys/net | |
parent | 8ca2a25dc01b1367f1c2a3840de1767c78bef883 (diff) | |
download | FreeBSD-src-03919a330383c466e2b1534e8c39cb838cb7d4ab.zip FreeBSD-src-03919a330383c466e2b1534e8c39cb838cb7d4ab.tar.gz |
- Add 10baseT as an alias for 10baseT/UTP.
- Add shorthand aliases for common media+option combinations as announced
by miibus(4) so that one can actually supply the media strings found in
the dmesg output to ifconfig(8).
Obtained from: NetBSD (in principle)
MFC after: 2 weeks
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_media.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 1eb26ea..b6fd316 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -370,6 +370,7 @@ struct ifmedia_description { } #define IFM_SUBTYPE_ETHERNET_ALIASES { \ + { IFM_10_T, "10baseT" }, \ { IFM_10_T, "UTP" }, \ { IFM_10_T, "10UTP" }, \ { IFM_10_2, "BNC" }, \ @@ -389,6 +390,23 @@ struct ifmedia_description { { IFM_1000_T, "1000TX" }, \ { IFM_1000_T, "1000T" }, \ { IFM_2500_SX, "2500SX" }, \ + \ + /* \ + * Shorthands for common media+option combinations as announced \ + * by miibus(4) \ + */ \ + { IFM_10_T | IFM_FDX, "10baseT-FDX" }, \ + { IFM_10_T | IFM_FDX | IFM_FLOW, "10baseT-FDX-flow" }, \ + { IFM_100_TX | IFM_FDX, "100baseTX-FDX" }, \ + { IFM_100_TX | IFM_FDX | IFM_FLOW, "100baseTX-FDX-flow" }, \ + { IFM_1000_T | IFM_FDX, "1000baseT-FDX" }, \ + { IFM_1000_T | IFM_FDX | IFM_FLOW, "1000baseT-FDX-flow" }, \ + { IFM_1000_T | IFM_FDX | IFM_FLOW | IFM_ETH_MASTER, \ + "1000baseT-FDX-flow-master" }, \ + { IFM_1000_T | IFM_FDX | IFM_ETH_MASTER, \ + "1000baseT-FDX-master" }, \ + { IFM_1000_T | IFM_ETH_MASTER, "1000baseT-master" }, \ + \ { 0, NULL }, \ } @@ -584,6 +602,13 @@ struct ifmedia_description { #define IFM_SUBTYPE_SHARED_ALIASES { \ { IFM_AUTO, "auto" }, \ + \ + /* \ + * Shorthands for common media+option combinations as announced \ + * by miibus(4) \ + */ \ + { IFM_AUTO | IFM_FLOW, "auto-flow" }, \ + \ { 0, NULL }, \ } |