Fixed compile problems in the CRC code, eth.cc, and eth_fbsd.cc.
(Some systems configure with eth_fbsd.cc but can't compile it.)
This commit is contained in:
parent
7d9d0b6769
commit
e519ea4d44
@ -14,7 +14,7 @@ void CRC_Generator::init(void) {
|
||||
int j;
|
||||
crc32_table[i]=reflect(i,8) << 24;
|
||||
for(j=0; j<8; j++)
|
||||
crc32_table[i] = (crc32_table[i]<<1)^(crc_table[i] & (1<<31) ? POLYNOMIAL : 0);
|
||||
crc32_table[i] = (crc32_table[i]<<1)^(crc32_table[i] & (1<<31) ? POLYNOMIAL : 0);
|
||||
crc32_table[i] = reflect(crc32_table[i], 32);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
#ifndef _CRC_32_H_
|
||||
#define _CRC_32_H_
|
||||
|
||||
#include "bochs.h"
|
||||
|
||||
class CRC_Generator {
|
||||
private:
|
||||
Bit32u crc32_table[256];
|
||||
@ -13,7 +15,7 @@ public:
|
||||
void init(void);
|
||||
CRC_Generator();
|
||||
Bit32u get_CRC(Bit8u * buf, Bit32u buflen);
|
||||
}
|
||||
};
|
||||
|
||||
#endif //_CRC_32_H_
|
||||
|
||||
|
@ -41,6 +41,22 @@ eth_locator_c::eth_locator_c(const char *type)
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
#ifdef ETH_NULL
|
||||
extern class bx_null_locator_c bx_null_match;
|
||||
#endif
|
||||
#ifdef ETH_FBSD
|
||||
extern class bx_fbsd_locator_c bx_fbsd_match;
|
||||
#endif
|
||||
#ifdef ETH_LINUX
|
||||
extern class bx_linux_locator_c bx_linux_match;
|
||||
#endif
|
||||
#ifdef ETH_TEST
|
||||
extern bx_test_match;
|
||||
#endif
|
||||
#ifdef ETH_ARPBACK
|
||||
extern class bx_arpback_locator_c bx_arpback_match;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Called by ethernet chip emulations to locate and create a pktmover
|
||||
// object
|
||||
@ -58,30 +74,32 @@ eth_locator_c::create(const char *type, const char *netif,
|
||||
#else
|
||||
eth_locator_c *ptr = 0;
|
||||
|
||||
#ifdef ETH_ARPBACK
|
||||
{
|
||||
if (!strcmp(type, "arpback"))
|
||||
ptr = (eth_locator_c *) &bx_arpback_match;
|
||||
}
|
||||
#endif
|
||||
#ifdef ETH_NULL
|
||||
{
|
||||
extern class bx_null_locator_c bx_null_match;
|
||||
if (!strcmp(type, "null"))
|
||||
ptr = (eth_locator_c *) &bx_null_match;
|
||||
}
|
||||
#endif
|
||||
#ifdef ETH_FBSD
|
||||
{
|
||||
extern class bx_fbsd_locator_c bx_fbsd_match;
|
||||
if (!strcmp(type, "fbsd"))
|
||||
ptr = (eth_locator_c *) &bx_fbsd_match;
|
||||
}
|
||||
#endif
|
||||
#ifdef ETH_LINUX
|
||||
{
|
||||
extern class bx_linux_locator_c bx_linux_match;
|
||||
if (!strcmp(type, "linux"))
|
||||
ptr = (eth_locator_c *) &bx_linux_match;
|
||||
}
|
||||
#endif
|
||||
#ifdef ETH_TEST
|
||||
{
|
||||
extern bx_test_match;
|
||||
if (!strcmp(type, "test"))
|
||||
ptr = (eth_locator_c *) &bx_test_match;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@
|
||||
//
|
||||
|
||||
#include "bochs.h"
|
||||
#ifdef ETH_FBSD
|
||||
#define LOG_THIS this->
|
||||
|
||||
extern "C" {
|
||||
@ -282,3 +283,5 @@ bx_fbsd_pktmover_c::rx_timer(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user