]> git.proxmox.com Git - qemu.git/blame - hw/ne2000.h
Merge remote-tracking branch 'kraxel/usb.31' into staging
[qemu.git] / hw / ne2000.h
CommitLineData
9453c5bc
GH
1#define NE2000_PMEM_SIZE (32*1024)
2#define NE2000_PMEM_START (16*1024)
3#define NE2000_PMEM_END (NE2000_PMEM_SIZE+NE2000_PMEM_START)
4#define NE2000_MEM_SIZE NE2000_PMEM_END
5
6typedef struct NE2000State {
1ec4e1dd 7 MemoryRegion io;
9453c5bc
GH
8 uint8_t cmd;
9 uint32_t start;
10 uint32_t stop;
11 uint8_t boundary;
12 uint8_t tsr;
13 uint8_t tpsr;
14 uint16_t tcnt;
15 uint16_t rcnt;
16 uint32_t rsar;
17 uint8_t rsr;
18 uint8_t rxcr;
19 uint8_t isr;
20 uint8_t dcfg;
21 uint8_t imr;
22 uint8_t phys[6]; /* mac address */
23 uint8_t curpag;
24 uint8_t mult[8]; /* multicast mask array */
25 qemu_irq irq;
1c2045b5 26 NICState *nic;
93db6685 27 NICConf c;
9453c5bc
GH
28 uint8_t mem[NE2000_MEM_SIZE];
29} NE2000State;
30
1ec4e1dd 31void ne2000_setup_io(NE2000State *s, unsigned size);
7c131dd5 32extern const VMStateDescription vmstate_ne2000;
9453c5bc
GH
33void ne2000_reset(NE2000State *s);
34int ne2000_can_receive(VLANClientState *vc);
35ssize_t ne2000_receive(VLANClientState *vc, const uint8_t *buf, size_t size_);