| 1 |
//Written in the D programming language |
| 2 |
|
| 3 |
/++ |
| 4 |
D header file for FreeBSD's net/if.h. |
| 5 |
|
| 6 |
Copyright: Copyright 2024 |
| 7 |
License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). |
| 8 |
Authors: $(HTTP jmdavisprog.com, Jonathan M Davis) |
| 9 |
+/ |
| 10 |
module core.sys.freebsd.net.if_; |
| 11 |
|
| 12 |
public import core.sys.posix.net.if_; |
| 13 |
|
| 14 |
version (FreeBSD): |
| 15 |
extern(C): |
| 16 |
@nogc: |
| 17 |
nothrow: |
| 18 |
|
| 19 |
import core.stdc.config; |
| 20 |
import core.sys.freebsd.sys.types : caddr_t; |
| 21 |
import core.sys.posix.sys.socket : sockaddr; |
| 22 |
import core.sys.posix.sys.time : time_t, timeval; |
| 23 |
|
| 24 |
enum IF_MAXUNIT = 0x7fff; |
| 25 |
|
| 26 |
struct if_clonereq |
| 27 |
{ |
| 28 |
int ifcr_total; |
| 29 |
int ifcr_count; |
| 30 |
ubyte* ifcr_buffer; |
| 31 |
} |
| 32 |
|
| 33 |
struct if_data |
| 34 |
{ |
| 35 |
ubyte ifi_type; |
| 36 |
ubyte ifi_physical; |
| 37 |
ubyte ifi_addrlen; |
| 38 |
ubyte ifi_hdrlen; |
| 39 |
ubyte ifi_link_state; |
| 40 |
ubyte ifi_vhid; |
| 41 |
ushort ifi_datalen; |
| 42 |
uint ifi_mtu; |
| 43 |
uint ifi_metric; |
| 44 |
ulong ifi_baudrate; |
| 45 |
|
| 46 |
ulong ifi_ipackets; |
| 47 |
ulong ifi_ierrors; |
| 48 |
ulong ifi_opackets; |
| 49 |
ulong ifi_oerrors; |
| 50 |
ulong ifi_collisions; |
| 51 |
ulong ifi_ibytes; |
| 52 |
ulong ifi_obytes; |
| 53 |
ulong ifi_imcasts; |
| 54 |
ulong ifi_omcasts; |
| 55 |
ulong ifi_iqdrops; |
| 56 |
ulong ifi_oqdrops; |
| 57 |
ulong ifi_noproto; |
| 58 |
ulong ifi_hwassist; |
| 59 |
|
| 60 |
union |
| 61 |
{ |
| 62 |
time_t ifi_epoch; |
| 63 |
private ulong ph; |
| 64 |
} |
| 65 |
|
| 66 |
union |
| 67 |
{ |
| 68 |
timeval ifi_lastchange; |
| 69 |
struct |
| 70 |
{ |
| 71 |
private ulong ph1; |
| 72 |
private ulong ph2; |
| 73 |
} |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
enum IFF_UP = 0x1; |
| 78 |
enum IFF_BROADCAST = 0x2; |
| 79 |
enum IFF_DEBUG = 0x4; |
| 80 |
enum IFF_LOOPBACK = 0x8; |
| 81 |
enum IFF_POINTOPOINT = 0x10; |
| 82 |
enum IFF_NEEDSEPOCH = 0x20; |
| 83 |
enum IFF_DRV_RUNNING = 0x40; |
| 84 |
enum IFF_NOARP = 0x80; |
| 85 |
enum IFF_PROMISC = 0x100; |
| 86 |
enum IFF_ALLMULTI = 0x200; |
| 87 |
enum IFF_DRV_OACTIVE = 0x400; |
| 88 |
enum IFF_SIMPLEX = 0x800; |
| 89 |
enum IFF_LINK0 = 0x1000; |
| 90 |
enum IFF_LINK1 = 0x2000; |
| 91 |
enum IFF_LINK2 = 0x4000; |
| 92 |
enum IFF_ALTPHYS = IFF_LINK2; |
| 93 |
enum IFF_MULTICAST = 0x8000; |
| 94 |
enum IFF_CANTCONFIG = 0x10000; |
| 95 |
enum IFF_PPROMISC = 0x20000; |
| 96 |
enum IFF_MONITOR = 0x40000; |
| 97 |
enum IFF_STATICARP = 0x80000; |
| 98 |
enum IFF_STICKYARP = 0x100000; |
| 99 |
enum IFF_DYING = 0x200000; |
| 100 |
enum IFF_RENAMING = 0x400000; |
| 101 |
enum IFF_SPARE = 0x800000; |
| 102 |
enum IFF_NETLINK_1 = 0x1000000; |
| 103 |
|
| 104 |
enum IFF_RUNNING = IFF_DRV_RUNNING; |
| 105 |
enum IFF_OACTIVE = IFF_DRV_OACTIVE; |
| 106 |
|
| 107 |
enum IFF_CANTCHANGE = IFF_BROADCAST | |
| 108 |
IFF_POINTOPOINT | |
| 109 |
IFF_DRV_RUNNING | |
| 110 |
IFF_DRV_OACTIVE | |
| 111 |
IFF_SIMPLEX | |
| 112 |
IFF_MULTICAST | |
| 113 |
IFF_ALLMULTI | |
| 114 |
IFF_PROMISC | |
| 115 |
IFF_DYING | |
| 116 |
IFF_CANTCONFIG | |
| 117 |
IFF_NEEDSEPOCH; |
| 118 |
|
| 119 |
enum LINK_STATE_UNKNOWN = 0; |
| 120 |
enum LINK_STATE_DOWN = 1; |
| 121 |
enum LINK_STATE_UP = 2; |
| 122 |
|
| 123 |
auto IF_Kbps(T)(T x) { return uintmax_t(x) * 1000; } |
| 124 |
auto IF_Mbps(T)(T x) { return IF_Kbps(x * 1000); } |
| 125 |
auto IF_Gbps(T)(T x) { return IF_Mbps(x * 1000); } |
| 126 |
|
| 127 |
enum IFCAP_B_RXCSUM = 0; |
| 128 |
enum IFCAP_B_TXCSUM = 1; |
| 129 |
enum IFCAP_B_NETCONS = 2; |
| 130 |
enum IFCAP_B_VLAN_MTU = 3; |
| 131 |
enum IFCAP_B_VLAN_HWTAGGING = 4; |
| 132 |
enum IFCAP_B_JUMBO_MTU = 5; |
| 133 |
enum IFCAP_B_POLLING = 6; |
| 134 |
enum IFCAP_B_VLAN_HWCSUM = 7; |
| 135 |
enum IFCAP_B_TSO4 = 8; |
| 136 |
enum IFCAP_B_TSO6 = 9; |
| 137 |
enum IFCAP_B_LRO = 10; |
| 138 |
enum IFCAP_B_WOL_UCAST = 11; |
| 139 |
enum IFCAP_B_WOL_MCAST = 12; |
| 140 |
enum IFCAP_B_WOL_MAGIC = 13; |
| 141 |
enum IFCAP_B_TOE4 = 14; |
| 142 |
enum IFCAP_B_TOE6 = 15; |
| 143 |
enum IFCAP_B_VLAN_HWFILTER = 16; |
| 144 |
enum IFCAP_B_NV = 17; |
| 145 |
enum IFCAP_B_VLAN_HWTSO = 18; |
| 146 |
enum IFCAP_B_LINKSTATE = 19; |
| 147 |
enum IFCAP_B_NETMAP = 20; |
| 148 |
enum IFCAP_B_RXCSUM_IPV6 = 21; |
| 149 |
enum IFCAP_B_TXCSUM_IPV6 = 22; |
| 150 |
enum IFCAP_B_HWSTATS = 23; |
| 151 |
enum IFCAP_B_TXRTLMT = 24; |
| 152 |
enum IFCAP_B_HWRXTSTMP = 25; |
| 153 |
enum IFCAP_B_MEXTPG = 26; |
| 154 |
enum IFCAP_B_TXTLS4 = 27; |
| 155 |
enum IFCAP_B_TXTLS6 = 28; |
| 156 |
enum IFCAP_B_VXLAN_HWCSUM = 29; |
| 157 |
enum IFCAP_B_VXLAN_HWTSO = 30; |
| 158 |
enum IFCAP_B_TXTLS_RTLMT = 31; |
| 159 |
enum IFCAP_B_RXTLS4 = 32; |
| 160 |
enum IFCAP_B_RXTLS6 = 33; |
| 161 |
enum __IFCAP_B_SIZE = 34; |
| 162 |
|
| 163 |
// IFCAP_B_MAX is defined in net/if.h, but __IFCAP_B_MAX doesn't seem to be defined anywhere. |
| 164 |
// enum IFCAP_B_MAX = __IFCAP_B_MAX - 1; |
| 165 |
enum IFCAP_B_SIZE = __IFCAP_B_SIZE; |
| 166 |
|
| 167 |
auto IFCAP_BIT(T)(T x) { return 1 << x; } |
| 168 |
|
| 169 |
enum IFCAP_RXCSUM = IFCAP_BIT(IFCAP_B_RXCSUM); |
| 170 |
enum IFCAP_TXCSUM = IFCAP_BIT(IFCAP_B_TXCSUM); |
| 171 |
enum IFCAP_NETCONS = IFCAP_BIT(IFCAP_B_NETCONS); |
| 172 |
enum IFCAP_VLAN_MTU = IFCAP_BIT(IFCAP_B_VLAN_MTU); |
| 173 |
enum IFCAP_VLAN_HWTAGGING = IFCAP_BIT(IFCAP_B_VLAN_HWTAGGING); |
| 174 |
enum IFCAP_JUMBO_MTU = IFCAP_BIT(IFCAP_B_JUMBO_MTU); |
| 175 |
enum IFCAP_POLLING = IFCAP_BIT(IFCAP_B_POLLING); |
| 176 |
enum IFCAP_VLAN_HWCSUM = IFCAP_BIT(IFCAP_B_VLAN_HWCSUM); |
| 177 |
enum IFCAP_TSO4 = IFCAP_BIT(IFCAP_B_TSO4); |
| 178 |
enum IFCAP_TSO6 = IFCAP_BIT(IFCAP_B_TSO6); |
| 179 |
enum IFCAP_LRO = IFCAP_BIT(IFCAP_B_LRO); |
| 180 |
enum IFCAP_WOL_UCAST = IFCAP_BIT(IFCAP_B_WOL_UCAST); |
| 181 |
enum IFCAP_WOL_MCAST = IFCAP_BIT(IFCAP_B_WOL_MCAST); |
| 182 |
enum IFCAP_WOL_MAGIC = IFCAP_BIT(IFCAP_B_WOL_MAGIC); |
| 183 |
enum IFCAP_TOE4 = IFCAP_BIT(IFCAP_B_TOE4); |
| 184 |
enum IFCAP_TOE6 = IFCAP_BIT(IFCAP_B_TOE6); |
| 185 |
enum IFCAP_VLAN_HWFILTER = IFCAP_BIT(IFCAP_B_VLAN_HWFILTER); |
| 186 |
enum IFCAP_NV = IFCAP_BIT(IFCAP_B_NV); |
| 187 |
enum IFCAP_VLAN_HWTSO = IFCAP_BIT(IFCAP_B_VLAN_HWTSO); |
| 188 |
enum IFCAP_LINKSTATE = IFCAP_BIT(IFCAP_B_LINKSTATE); |
| 189 |
enum IFCAP_NETMAP = IFCAP_BIT(IFCAP_B_NETMAP); |
| 190 |
enum IFCAP_RXCSUM_IPV6 = IFCAP_BIT(IFCAP_B_RXCSUM_IPV6); |
| 191 |
enum IFCAP_TXCSUM_IPV6 = IFCAP_BIT(IFCAP_B_TXCSUM_IPV6); |
| 192 |
enum IFCAP_HWSTATS = IFCAP_BIT(IFCAP_B_HWSTATS); |
| 193 |
enum IFCAP_TXRTLMT = IFCAP_BIT(IFCAP_B_TXRTLMT); |
| 194 |
enum IFCAP_HWRXTSTMP = IFCAP_BIT(IFCAP_B_HWRXTSTMP); |
| 195 |
enum IFCAP_MEXTPG = IFCAP_BIT(IFCAP_B_MEXTPG); |
| 196 |
enum IFCAP_TXTLS4 = IFCAP_BIT(IFCAP_B_TXTLS4); |
| 197 |
enum IFCAP_TXTLS6 = IFCAP_BIT(IFCAP_B_TXTLS6); |
| 198 |
enum IFCAP_VXLAN_HWCSUM = IFCAP_BIT(IFCAP_B_VXLAN_HWCSUM); |
| 199 |
enum IFCAP_VXLAN_HWTSO = IFCAP_BIT(IFCAP_B_VXLAN_HWTSO); |
| 200 |
enum IFCAP_TXTLS_RTLMT = IFCAP_BIT(IFCAP_B_TXTLS_RTLMT); |
| 201 |
|
| 202 |
enum IFCAP2_RXTLS4 = IFCAP_B_RXTLS4 - 32; |
| 203 |
enum IFCAP2_RXTLS6 = IFCAP_B_RXTLS6 - 32; |
| 204 |
|
| 205 |
auto IFCAP2_BIT(T)(T x) { return 1UL << x; } |
| 206 |
|
| 207 |
enum IFCAP_HWCSUM_IPV6 = IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6; |
| 208 |
|
| 209 |
enum IFCAP_HWCSUM = IFCAP_RXCSUM | IFCAP_TXCSUM; |
| 210 |
enum IFCAP_TSO = IFCAP_TSO4 | IFCAP_TSO6; |
| 211 |
enum IFCAP_WOL = IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC; |
| 212 |
enum IFCAP_TOE = IFCAP_TOE4 | IFCAP_TOE6; |
| 213 |
enum IFCAP_TXTLS = IFCAP_TXTLS4 | IFCAP_TXTLS6; |
| 214 |
|
| 215 |
enum IFCAP_CANTCHANGE = IFCAP_NETMAP | IFCAP_NV; |
| 216 |
enum IFCAP_ALLCAPS = 0xffffffff; |
| 217 |
|
| 218 |
enum IFQ_MAXLEN = 50; |
| 219 |
enum IFNET_SLOWHZ = 1; |
| 220 |
|
| 221 |
struct if_msghdr |
| 222 |
{ |
| 223 |
ushort ifm_msglen; |
| 224 |
ubyte ifm_version; |
| 225 |
ubyte ifm_type; |
| 226 |
int ifm_addrs; |
| 227 |
int ifm_flags; |
| 228 |
ushort ifm_index; |
| 229 |
ushort _ifm_spare1; |
| 230 |
if_data ifm_data; |
| 231 |
} |
| 232 |
|
| 233 |
auto IF_MSGHDRL_IFM_DATA(T)(T _l) { return cast(if_data*) (cast(ubyte*) _l + _l.ifm_data_off); } |
| 234 |
|
| 235 |
auto IF_MSGHDRL_RTA(T)(T_l) { return cast(void*) (cast(uintptr_t) _l + _l.ifm_len); } |
| 236 |
|
| 237 |
struct if_msghdrl |
| 238 |
{ |
| 239 |
ushort ifm_msglen; |
| 240 |
ubyte ifm_version; |
| 241 |
ubyte ifm_type; |
| 242 |
int ifm_addrs; |
| 243 |
int ifm_flags; |
| 244 |
ushort ifm_index; |
| 245 |
ushort _ifm_spare1; |
| 246 |
ushort ifm_len; |
| 247 |
ushort ifm_data_off; |
| 248 |
int _ifm_spare2; |
| 249 |
if_data ifm_data; |
| 250 |
} |
| 251 |
|
| 252 |
struct ifa_msghdr |
| 253 |
{ |
| 254 |
ushort ifam_msglen; |
| 255 |
ubyte ifam_version; |
| 256 |
ubyte ifam_type; |
| 257 |
int ifam_addrs; |
| 258 |
int ifam_flags; |
| 259 |
ushort ifam_index; |
| 260 |
ushort _ifam_spare1; |
| 261 |
int ifam_metric; |
| 262 |
} |
| 263 |
|
| 264 |
auto IFA_MSGHDRL_IFAM_DATA(T)(T _l) { return cast(if_data*) (cast(ubyte*) _l + _l.ifam_data_off); } |
| 265 |
|
| 266 |
auto IFA_MSGHDRL_RTA(T)(T _l) { return cast(void*) (cast(uintptr_t) _l + _l.ifam_len); } |
| 267 |
|
| 268 |
struct ifa_msghdrl |
| 269 |
{ |
| 270 |
ushort ifam_msglen; |
| 271 |
ubyte ifam_version; |
| 272 |
ubyte ifam_type; |
| 273 |
int ifam_addrs; |
| 274 |
int ifam_flags; |
| 275 |
ushort ifam_index; |
| 276 |
ushort _ifam_spare1; |
| 277 |
ushort ifam_len; |
| 278 |
ushort ifam_data_off; |
| 279 |
int ifam_metric; |
| 280 |
if_data ifam_data; |
| 281 |
} |
| 282 |
|
| 283 |
struct ifma_msghdr |
| 284 |
{ |
| 285 |
ushort ifmam_msglen; |
| 286 |
ubyte ifmam_version; |
| 287 |
ubyte ifmam_type; |
| 288 |
int ifmam_addrs; |
| 289 |
int ifmam_flags; |
| 290 |
ushort ifmam_index; |
| 291 |
ushort _ifmam_spare1; |
| 292 |
} |
| 293 |
|
| 294 |
struct if_announcemsghdr |
| 295 |
{ |
| 296 |
ushort ifan_msglen; |
| 297 |
ubyte ifan_version; |
| 298 |
ubyte ifan_type; |
| 299 |
ushort ifan_index; |
| 300 |
char[IF_NAMESIZE] ifan_name; |
| 301 |
ushort ifan_what; |
| 302 |
} |
| 303 |
|
| 304 |
enum IFAN_ARRIVAL = 0; |
| 305 |
enum IFAN_DEPARTURE = 1; |
| 306 |
|
| 307 |
struct ifreq_buffer |
| 308 |
{ |
| 309 |
size_t length; |
| 310 |
void* buffer; |
| 311 |
} |
| 312 |
|
| 313 |
struct ifreq_nv_req |
| 314 |
{ |
| 315 |
uint buf_length; |
| 316 |
uint length; |
| 317 |
void* buffer; |
| 318 |
} |
| 319 |
|
| 320 |
enum IFR_CAP_NV_MAXBUFSIZE = 2 * 1024 * 1024; |
| 321 |
|
| 322 |
struct ifreq |
| 323 |
{ |
| 324 |
char[IF_NAMESIZE] ifr_name; |
| 325 |
|
| 326 |
union |
| 327 |
{ |
| 328 |
sockaddr ifr_addr; |
| 329 |
sockaddr ifr_dstaddr; |
| 330 |
sockaddr ifr_broadaddr; |
| 331 |
ifreq_buffer ifr_buffer; |
| 332 |
private short[2] ifru_flags; |
| 333 |
short ifr_index; |
| 334 |
int ifr_jid; |
| 335 |
int ifr_metric; |
| 336 |
int ifr_mtu; |
| 337 |
int ifr_phys; |
| 338 |
int ifr_media; |
| 339 |
caddr_t ifr_data; |
| 340 |
private int[2] ifru_cap; |
| 341 |
uint ifr_fib; |
| 342 |
ubyte ifr_vlan_pcp; |
| 343 |
ifreq_nv_req ifr_cap_nv; |
| 344 |
} |
| 345 |
|
| 346 |
@property ref ifr_flags() { return ifru_flags[0]; } |
| 347 |
@property ref ifr_flagshigh() { return ifru_flags[1]; } |
| 348 |
@property ref ifr_reqcap() { return ifru_cap[0]; } |
| 349 |
@property ref ifr_curcap() { return ifru_cap[1]; } |
| 350 |
alias ifr_lan_pcp = ifr_vlan_pcp; |
| 351 |
} |
| 352 |
|
| 353 |
auto _SIZEOF_ADDR_IFREQ(T)(T ifr) { return ifr.ifr_addr.sa_len > sockaddr.sizeof ? |
| 354 |
ifreq.sizeof - sockaddr.sizeof + ifr.ifr_addr.sa_len : |
| 355 |
ifreq.sizeof; } |
| 356 |
|
| 357 |
struct ifaliasreq |
| 358 |
{ |
| 359 |
char[IF_NAMESIZE] ifra_name; |
| 360 |
sockaddr ifra_addr; |
| 361 |
sockaddr ifra_broadaddr; |
| 362 |
sockaddr ifra_mask; |
| 363 |
int ifra_vhid; |
| 364 |
} |
| 365 |
|
| 366 |
struct oifaliasreq |
| 367 |
{ |
| 368 |
char[IF_NAMESIZE] ifra_name; |
| 369 |
sockaddr ifra_addr; |
| 370 |
sockaddr ifra_broadaddr; |
| 371 |
sockaddr ifra_mask; |
| 372 |
} |
| 373 |
|
| 374 |
struct ifmediareq |
| 375 |
{ |
| 376 |
char[IF_NAMESIZE] ifm_name; |
| 377 |
int ifm_current; |
| 378 |
int ifm_mask; |
| 379 |
int ifm_status; |
| 380 |
int ifm_active; |
| 381 |
int ifm_count; |
| 382 |
int* ifm_ulist; |
| 383 |
} |
| 384 |
|
| 385 |
struct ifdrv |
| 386 |
{ |
| 387 |
char[IF_NAMESIZE] ifd_name; |
| 388 |
c_ulong ifd_cmd; |
| 389 |
size_t ifd_len; |
| 390 |
void* ifd_data; |
| 391 |
} |
| 392 |
|
| 393 |
enum IFSTATMAX = 800; |
| 394 |
struct ifstat |
| 395 |
{ |
| 396 |
char[IF_NAMESIZE] ifs_name; |
| 397 |
char[IFSTATMAX + 1] ascii; |
| 398 |
} |
| 399 |
|
| 400 |
struct ifconf |
| 401 |
{ |
| 402 |
int ifc_len; |
| 403 |
union |
| 404 |
{ |
| 405 |
caddr_t ifc_buf; |
| 406 |
ifreq* ifc_req; |
| 407 |
} |
| 408 |
} |
| 409 |
|
| 410 |
enum IFG_ALL = "all"; |
| 411 |
enum IFG_EGRESS = "egress"; |
| 412 |
|
| 413 |
struct ifg_req |
| 414 |
{ |
| 415 |
union |
| 416 |
{ |
| 417 |
char[IF_NAMESIZE] ifgrq_group; |
| 418 |
char[IF_NAMESIZE] ifgrq_member; |
| 419 |
} |
| 420 |
} |
| 421 |
|
| 422 |
struct ifgroupreq |
| 423 |
{ |
| 424 |
char[IF_NAMESIZE] ifgr_name; |
| 425 |
uint ifgr_len; |
| 426 |
union |
| 427 |
{ |
| 428 |
char[IF_NAMESIZE] ifgr_group; |
| 429 |
ifg_req* ifgr_groups; |
| 430 |
} |
| 431 |
} |
| 432 |
|
| 433 |
struct ifi2creq |
| 434 |
{ |
| 435 |
ubyte dev_addr; |
| 436 |
ubyte offset; |
| 437 |
ubyte len; |
| 438 |
ubyte spare0; |
| 439 |
uint spare1; |
| 440 |
ubyte[8] data; |
| 441 |
} |
| 442 |
|
| 443 |
enum RSS_FUNC_NONE = 0; |
| 444 |
enum RSS_FUNC_PRIVATE = 1; |
| 445 |
enum RSS_FUNC_TOEPLITZ = 2; |
| 446 |
|
| 447 |
enum RSS_TYPE_IPV4 = 0x00000001; |
| 448 |
enum RSS_TYPE_TCP_IPV4 = 0x00000002; |
| 449 |
enum RSS_TYPE_IPV6 = 0x00000004; |
| 450 |
enum RSS_TYPE_IPV6_EX = 0x00000008; |
| 451 |
enum RSS_TYPE_TCP_IPV6 = 0x00000010; |
| 452 |
enum RSS_TYPE_TCP_IPV6_EX = 0x00000020; |
| 453 |
enum RSS_TYPE_UDP_IPV4 = 0x00000040; |
| 454 |
enum RSS_TYPE_UDP_IPV6 = 0x00000080; |
| 455 |
enum RSS_TYPE_UDP_IPV6_EX = 0x00000100; |
| 456 |
|
| 457 |
enum RSS_KEYLEN = 128; |
| 458 |
|
| 459 |
struct ifrsskey |
| 460 |
{ |
| 461 |
char[IF_NAMESIZE] ifrk_name; |
| 462 |
ubyte ifrk_func; |
| 463 |
ubyte ifrk_spare0; |
| 464 |
ushort ifrk_keylen; |
| 465 |
ubyte[RSS_KEYLEN] ifrk_key; |
| 466 |
} |
| 467 |
|
| 468 |
struct ifrsshash |
| 469 |
{ |
| 470 |
char[IF_NAMESIZE] ifrh_name; |
| 471 |
ubyte ifrh_func; |
| 472 |
ubyte ifrh_spare0; |
| 473 |
ushort ifrh_spare1; |
| 474 |
uint ifrh_types; |
| 475 |
} |
| 476 |
|
| 477 |
enum IFNET_PCP_NONE = 0xff; |
| 478 |
|
| 479 |
enum IFDR_MSG_SIZE = 64; |
| 480 |
enum IFDR_REASON_MSG = 1; |
| 481 |
enum IFDR_REASON_VENDOR = 2; |
| 482 |
|
| 483 |
struct ifdownreason |
| 484 |
{ |
| 485 |
char[IF_NAMESIZE] ifdr_name; |
| 486 |
uint ifdr_reason; |
| 487 |
uint ifdr_vendor; |
| 488 |
char[IFDR_MSG_SIZE] ifdr_msg; |
| 489 |
} |
| 490 |
|
| 491 |
// FIXME It's not clear where ifnet is supposed to be coming from, so this is |
| 492 |
// commented out for now. |
| 493 |
//alias if_t = ifnet*; |