From 131e3ad4ce7736c260d62c4f5f2ff41a46dc7de0 Mon Sep 17 00:00:00 2001 From: jlemon Date: Tue, 18 Sep 2001 17:41:42 +0000 Subject: Add two fields to the ifnet structure indicating what extra capabilities a network device has, and which ones are enabled. --- sys/net/if.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/net/if.h') diff --git a/sys/net/if.h b/sys/net/if.h index 70428bf..b0cc905 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -136,6 +136,10 @@ struct if_data { (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART) +/* Capabilities that interfaces can advertise. */ +#define IFCAP_HWCSUM 0x0001 /* can do hardware checksums */ +#define IFCAP_NETCONS 0x0002 /* can be a network console */ + #define IFQ_MAXLEN 50 #define IFNET_SLOWHZ 1 /* granularity is 1 second */ @@ -198,6 +202,7 @@ struct ifreq { int ifru_phys; int ifru_media; caddr_t ifru_data; + int ifru_cap[2]; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -209,6 +214,8 @@ struct ifreq { #define ifr_phys ifr_ifru.ifru_phys /* physical wire */ #define ifr_media ifr_ifru.ifru_media /* physical media */ #define ifr_data ifr_ifru.ifru_data /* for use by interface */ +#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */ +#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ }; #define _SIZEOF_ADDR_IFREQ(ifr) \ -- cgit v1.1