X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fne2k.h;h=10c217514488175fc614db739ba9c13d3fe24ee4;hb=101529b6eae500272347287df43ec51aa003d0aa;hp=e691bf651dc17706a9bc3947a8fe2a264177d107;hpb=e182197139eb26fce23a64453b16a2b8f07533f4;p=palacios.git diff --git a/palacios/include/geekos/ne2k.h b/palacios/include/geekos/ne2k.h index e691bf6..10c2175 100644 --- a/palacios/include/geekos/ne2k.h +++ b/palacios/include/geekos/ne2k.h @@ -1,7 +1,6 @@ #ifndef GEEKOS_NE2K_H #define GEEKOS_NE2K_H -//#include #include #define NE2K_PAGE0 0x00 @@ -11,13 +10,15 @@ #define NE2K_BASE_ADDR 0xc100 /* Starting address of the card */ #define NE2K_CR NE2K_BASE_ADDR /* Command register */ +#define NE2K_DATAPORT (NE2K_CR + 0x10) +#define NE2K_RESET (NE2K_CR + 0x1f) /* Page 0 register offsets */ #define NE2K CLDA0 (NE2K_CR + 0x01) -#define NE2K_PSTART (NE2K_CR + 0x01) +#define NE2K_PSTART (NE2K_CR + 0x01) /* Page start register */ #define NE2K_CLDA1 (NE2K_CR + 0x02) -#define NE2K_PSTOP (NE2K_CR + 0x02) -#define NE2K_BNRY (NE2K_CR + 0x03) +#define NE2K_PSTOP (NE2K_CR + 0x02) /* Page stop register */ +#define NE2K_BNRY (NE2K_CR + 0x03) /* Boundary register */ #define NE2K_TSR (NE2K_CR + 0x04) #define NE2K_TPSR (NE2K_CR + 0x04) #define NE2K_NCR (NE2K_CR + 0x05) @@ -149,8 +150,17 @@ struct _RSR { //RECEIVE STATUS REG uint_t dfr: 1; //DEFERRING }__attribute__((__packed__)) __attribute__((__aligned__(1))); +struct NE2K_Packet_Info { + uchar_t status; + uint_t size; + uchar_t src[6]; + uchar_t dest[6]; +}; + int Init_Ne2k(); -int NE2K_Transmit(struct NE2K_REGS *); int NE2K_Receive(); +int NE2K_Transmit(uint_t size); +int NE2K_Send_Packet(uchar_t *packet, uint_t size); +int NE2K_Send(uchar_t src[], uchar_t dest[], uint_t type, uchar_t *data, uint_t size); #endif /* GEEKOS_NE2K_H */