]>
Commit | Line | Data |
---|---|---|
3c4e084d JP |
1 | /* etherboot-compat.h |
2 | * EtherBoot driver compatibility routines | |
3 | * NetWatch system management mode administration console | |
4 | * | |
5 | * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. | |
6 | * This program is free software; you can redistribute and/or modify it under | |
7 | * the terms found in the file LICENSE in the root of this source tree. | |
8 | * | |
9 | */ | |
10 | ||
11 | ||
42125f27 JP |
12 | #ifndef _ETHERBOOT_COMPAT_H |
13 | #define _ETHERBOOT_COMPAT_H | |
14 | ||
68beefa8 | 15 | #include <paging.h> |
54d4b877 | 16 | #include "lwip/pbuf.h" |
68beefa8 | 17 | |
748534f4 JP |
18 | #define ETH_ALEN 6 |
19 | ||
20 | struct dev { | |
21 | void (*disable) (struct dev *dev); | |
22 | }; | |
23 | ||
24 | struct nic { | |
25 | char * packet; | |
26 | int packetlen; | |
27 | ||
28 | unsigned int ioaddr; | |
29 | unsigned int irqno; | |
47c41031 JW |
30 | |
31 | unsigned char hwaddr[6]; | |
748534f4 | 32 | |
bec09bd1 | 33 | int (*recv) (struct nic *nic); |
6d6494e4 | 34 | void (*transmit) (struct nic *nic, struct pbuf *p); |
748534f4 JP |
35 | }; |
36 | ||
68beefa8 | 37 | #define virt_to_bus(x) memory_v2p((void *)(x)) |
42125f27 JP |
38 | |
39 | #endif |