VirtualBox

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

最後變更 在這個檔案從20295是 11982,由 vboxsync 提交於 16 年 前

All: license header changes for 2.0 (OSE headers, add Sun GPL/LGPL disclaimer)

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.8 KB
 
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/*
9 * Sun GPL Disclaimer: For the avoidance of doubt, except that if any license choice
10 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
11 * the General Public License version 2 (GPLv2) at this time for any software where
12 * a choice of GPL license versions is made available with the language indicating
13 * that GPLv2 or any later version may be used, or where a choice of which version
14 * of the GPL is applied is otherwise unspecified.
15 */
16
17#ifndef NIC_H
18#define NIC_H
19
20#include "dev.h"
21
22typedef enum {
23 DISABLE = 0,
24 ENABLE,
25 FORCE
26} irq_action_t;
27
28/*
29 * Structure returned from eth_probe and passed to other driver
30 * functions.
31 */
32struct nic
33{
34 struct dev dev; /* This must come first */
35 int (*poll)P((struct nic *, int retrieve));
36 void (*transmit)P((struct nic *, const char *d,
37 unsigned int t, unsigned int s, const char *p));
38 void (*irq)P((struct nic *, irq_action_t));
39 int flags; /* driver specific flags */
40 struct rom_info *rom_info; /* -> rom_info from main */
41 unsigned char *node_addr;
42 unsigned char *packet;
43 unsigned int packetlen;
44 unsigned int ioaddr;
45 unsigned char irqno;
46 void *priv_data; /* driver can hang private data here */
47};
48
49
50extern struct nic nic;
51extern int eth_probe(struct dev *dev);
52extern int eth_poll(int retrieve);
53extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p);
54extern void eth_disable(void);
55extern void eth_irq(irq_action_t action);
56extern int eth_load_configuration(struct dev *dev);
57extern int eth_load(struct dev *dev);;
58#endif /* NIC_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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