VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/Etherboot-src/include/nic.h@ 545

Last change on this file since 545 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
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 */
7
8#ifndef NIC_H
9#define NIC_H
10
11#include "dev.h"
12
13typedef enum {
14 DISABLE = 0,
15 ENABLE,
16 FORCE
17} irq_action_t;
18
19/*
20 * Structure returned from eth_probe and passed to other driver
21 * functions.
22 */
23struct nic
24{
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 */
38};
39
40
41extern struct nic nic;
42extern int eth_probe(struct dev *dev);
43extern int eth_poll(int retrieve);
44extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p);
45extern void eth_disable(void);
46extern void eth_irq(irq_action_t action);
47extern int eth_load_configuration(struct dev *dev);
48extern int eth_load(struct dev *dev);;
49#endif /* NIC_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette