diff options
author | sam <sam@FreeBSD.org> | 2002-11-14 23:16:18 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2002-11-14 23:16:18 +0000 |
commit | 7092aea8c374b04d088d4a58833928c81805dd36 (patch) | |
tree | 308fb6729cf6bfbd368c237e3e2907fa6042abb1 | |
parent | 07e90eccd6747ddf19b864268c3447737985297e (diff) | |
download | FreeBSD-src-7092aea8c374b04d088d4a58833928c81805dd36.zip FreeBSD-src-7092aea8c374b04d088d4a58833928c81805dd36.tar.gz |
o add IF_*bps macros for netbsd compatibility
o add interface capabilities for vlan use and to signal jumbo frame support
Reviewed by: many
Approved by: re
-rw-r--r-- | sys/net/if.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index d34b6e9..7c6349d 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -157,10 +157,21 @@ struct if_data { IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\ IFF_POLLING) +/* + * Some convenience macros used for setting ifi_baudrate. + * XXX 1000 vs. 1024? --thorpej@netbsd.org + */ +#define IF_Kbps(x) ((x) * 1000) /* kilobits/sec. */ +#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */ +#define IF_Gbps(x) (IF_Mbps((x) * 1000)) /* gigabits/sec. */ + /* Capabilities that interfaces can advertise. */ #define IFCAP_RXCSUM 0x0001 /* can offload checksum on RX */ #define IFCAP_TXCSUM 0x0002 /* can offload checksum on TX */ #define IFCAP_NETCONS 0x0004 /* can be a network console */ +#define IFCAP_VLAN_MTU 0x0008 /* VLAN-compatible MTU */ +#define IFCAP_VLAN_HWTAGGING 0x0010 /* hardware VLAN tag support */ +#define IFCAP_JUMBO_MTU 0x0020 /* 9000 byte MTU supported */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) |