2 * Copyright 2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _ETHER_DRIVER_H
6 #define _ETHER_DRIVER_H
8 /*! Standard ethernet driver interface */
14 /* ioctl() opcodes a driver should support */
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 *) */
27 /* get line speed, quality, duplex mode, etc. (ether_link_state_t *) */
31 /* ETHER_GETADDR - MAC address */
32 typedef struct ether_address
{
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 */
43 #endif /* _ETHER_DRIVER_H */