btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / net / ether_driver.h
blob0ce22aa0794333b93154bf327c407e6f82650ddd
1 /*
2 * Copyright 2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _ETHER_DRIVER_H
6 #define _ETHER_DRIVER_H
8 /*! Standard ethernet driver interface */
11 #include <Drivers.h>
14 /* ioctl() opcodes a driver should support */
15 enum {
16 ETHER_GETADDR = B_DEVICE_OP_CODES_END,
17 /* get ethernet address (required) */
18 ETHER_INIT, /* (obsolete) */
19 ETHER_NONBLOCK, /* change non blocking mode (int *) */
20 ETHER_ADDMULTI, /* add multicast address */
21 ETHER_REMMULTI, /* remove multicast address */
22 ETHER_SETPROMISC, /* set promiscuous mode (int *) */
23 ETHER_GETFRAMESIZE, /* get frame size (required) (int *) */
24 ETHER_SET_LINK_STATE_SEM,
25 /* pass over a semaphore to release on link state changes (sem_id *) */
26 ETHER_GET_LINK_STATE
27 /* get line speed, quality, duplex mode, etc. (ether_link_state_t *) */
31 /* ETHER_GETADDR - MAC address */
32 typedef struct ether_address {
33 uint8 ebyte[6];
34 } ether_address_t;
36 /* ETHER_GETLINKSTATE */
37 typedef struct ether_link_state {
38 uint32 media; /* as specified in net/if_media.h */
39 uint32 quality; /* in one tenth of a percent */
40 uint64 speed; /* in bit/s */
41 } ether_link_state_t;
43 #endif /* _ETHER_DRIVER_H */