diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-09-18 17:41:42 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-09-18 17:41:42 +0000 |
commit | 131e3ad4ce7736c260d62c4f5f2ff41a46dc7de0 (patch) | |
tree | f389fec466bb5c5593d80daaaa547ab750789d27 /sys/net/if.h | |
parent | 7f8575ebc78b1e80189dc231cb0aae8db7ddf1ea (diff) | |
download | FreeBSD-src-131e3ad4ce7736c260d62c4f5f2ff41a46dc7de0.zip FreeBSD-src-131e3ad4ce7736c260d62c4f5f2ff41a46dc7de0.tar.gz |
Add two fields to the ifnet structure indicating what extra capabilities
a network device has, and which ones are enabled.
Diffstat (limited to 'sys/net/if.h')
-rw-r--r-- | sys/net/if.h | 7 |
1 files changed, 7 insertions, 0 deletions
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) \ |