From bb68f0af5ef99fef980d50643cf4dca36ea62c0e Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Thu, 14 Nov 2002 23:16:18 +0000 Subject: [PATCH] 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 --- sys/net/if.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/net/if.h b/sys/net/if.h index d34b6e915832..7c6349deff4b 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)