NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HostNe2k Class Reference

A simple ne2k pci driver, mainly used on qemu devices. More...

Inheritance diagram for HostNe2k:
StaticReceiver< HostNe2k > Device

Public Member Functions

bool send_packet (const void *buffer, unsigned len)
void reset ()
bool receive (MessageNetwork &msg)
bool receive (MessageIrq &msg)
 HostNe2k (DBus< MessageHwIOIn > &bus_hwioin, DBus< MessageHwIOOut > &bus_hwioout, DBus< MessageNetwork > &bus_network, Clock *clock, unsigned short port, unsigned irq)
- Public Member Functions inherited from StaticReceiver< HostNe2k >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Types

enum  {
  PAGE_SIZE = 256, PG_TX = 0x40, PG_START = PG_TX + 9216/PAGE_SIZE, PG_STOP = 0xc0,
  REG_ISR = 0x7, BUFFER_SIZE = 32768
}

Private Member Functions

void access_internal_ram (unsigned short offset, unsigned short dwords, void *buffer, bool read)
 Read/Write to internal ram of the network card.

Private Attributes

DBus< MessageNetwork > & _bus_network
Clock_clock
unsigned short _port
unsigned _irq
unsigned char _next_packet
unsigned char _receive_buffer [BUFFER_SIZE]
EthernetAddr _mac

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< HostNe2k >
static bool receive_static (Device *o, M &msg)

Detailed Description

A simple ne2k pci driver, mainly used on qemu devices.

Features: reset, send, irq, receive, overflow-recover Missing: read counters, configuration of full-duplex modes State: testing Documentation: DP8390D, rtl8029, mx98905b

Member Enumeration Documentation

anonymous enum
private
Enumerator:
PAGE_SIZE 
PG_TX 
PG_START 
PG_STOP 
REG_ISR 
BUFFER_SIZE 

Constructor & Destructor Documentation

HostNe2k::HostNe2k ( DBus< MessageHwIOIn > &  bus_hwioin,
DBus< MessageHwIOOut > &  bus_hwioout,
DBus< MessageNetwork > &  bus_network,
Clock clock,
unsigned short  port,
unsigned  irq 
)
inline

Member Function Documentation

void HostNe2k::access_internal_ram ( unsigned short  offset,
unsigned short  dwords,
void *  buffer,
bool  read 
)
inlineprivate

Read/Write to internal ram of the network card.

bool HostNe2k::receive ( MessageNetwork msg)
inline
bool HostNe2k::receive ( MessageIrq msg)
inline
void HostNe2k::reset ( )
inline
bool HostNe2k::send_packet ( const void *  buffer,
unsigned  len 
)
inline

Member Data Documentation

DBus<MessageNetwork>& HostNe2k::_bus_network
private
Clock* HostNe2k::_clock
private
unsigned HostNe2k::_irq
private
EthernetAddr HostNe2k::_mac
private
unsigned char HostNe2k::_next_packet
private
unsigned short HostNe2k::_port
private
unsigned char HostNe2k::_receive_buffer[BUFFER_SIZE]
private

The documentation for this class was generated from the following file: