Merge branch 'master' of git://github.com/illumos/illumos-gate
[unleashed.git] / usr / src / grub / grub-0.97 / netboot / nic.h
blob40b35daf0189094f08015aa35097b8016ba28a99
1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2, or (at
5 * your option) any later version.
6 */
8 #ifndef NIC_H
9 #define NIC_H
11 #include "dev.h"
13 typedef enum {
14 DISABLE = 0,
15 ENABLE,
16 FORCE
17 } irq_action_t;
20 * Structure returned from eth_probe and passed to other driver
21 * functions.
23 struct nic
25 struct dev dev; /* This must come first */
26 int (*poll)P((struct nic *, int retrieve));
27 void (*transmit)P((struct nic *, const char *d,
28 unsigned int t, unsigned int s, const char *p));
29 void (*irq)P((struct nic *, irq_action_t));
30 int flags; /* driver specific flags */
31 struct rom_info *rom_info; /* -> rom_info from main */
32 unsigned char *node_addr;
33 unsigned char *packet;
34 unsigned int packetlen;
35 unsigned int ioaddr;
36 unsigned char irqno;
37 void *priv_data; /* driver can hang private data here */
40 extern int eth_probe(struct dev *dev);
41 extern int eth_poll(int retrieve);
42 extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p);
43 extern void eth_disable(void);
44 extern void eth_irq(irq_action_t action);
45 #endif /* NIC_H */