|
发表于 2005-4-6 22:53:18
|
显示全部楼层
何不把dummy nice 直接写到sky-ne2k.c?
用个条件编译
#ifdef COMPILE_IT_ON_CYGWIN
//#include <linux/if.h>
#include <net/if.h>
#include <linux/if_tun.h>
//#include <sys/types.h>
//#include <sys/stat.h>
//#include <fcntl.h>
#include <sys/ioctl.h>
#include <armdefs.h>
#include <clps7110.h>
#define extern
#include "skyeye-ne2k.h"
#undef extern
...
#else
//#include <linux/if.h>
//#include <net/if.h>
//#include <linux/if_tun.h>
//#include <sys/types.h>
//#include <sys/stat.h>
//#include <fcntl.h>
#include <sys/ioctl.h>
#include <armdefs.h>
#include <clps7110.h>
#define extern
#include "skyeye-ne2k.h"
#undef extern
//if you don't want to the debug info,just commit below two line
//#define DEBUG 1
//#define DEBUG_NETDATA 1
#undef DEBUG
#undef DEBUG_NETDATA
//#define DEBUG_NETDATA
#if DEBUG
#define DBG_PRINT(a...) fprintf(stderr, ##a)
#else
#define DBG_PRINT(a...)
#endif
unsigned long Pen_buffer[8];
void nic_init(void)
{
DBG_PRINT("nic_init\n");
}
int tapif_init(int index,unsigned char *macaddr, unsigned char *hostip)
{
DBG_PRINT("tapif_init\n");
}
void tapif_input(int tapif_fd, ARMul_State *state)
{
DBG_PRINT("tapif_input\n");
}
INT8U tapif_output(int tapif_fd, ARMul_State *state,INT8U startpage,INT16U packet_len)
{
DBG_PRINT("tapif_output\n");
}
INT8U nic_read(int nic_index, ARMul_State *state, INT8U offset)
{
DBG_PRINT("nic_read\n");
}
void nic_write(int nic_index, ARMul_State *state,INT8U offset, INT8U data) //offset should be 00-0f, 10 or 1f
{
DBG_PRINT("nic_write\n");
}
int vnetif_init(int index,unsigned char *macaddr, unsigned char *hostip)
{
DBG_PRINT("vnetif_init\n");
}
#end if |
|