Line 150... |
Line 150... |
#define PING_SEQUENCE 40 //2
|
#define PING_SEQUENCE 40 //2
|
#define PING_DATA 44
|
#define PING_DATA 44
|
|
|
static void IPClose2(IPSocket *Socket);
|
static void IPClose2(IPSocket *Socket);
|
|
|
static uint8 ethernetAddressNull[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
|
static uint8 ethernetAddressGateway[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
static uint8 ethernetAddressGateway[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
#ifndef WIN32
|
#ifndef WIN32
|
static uint8 ethernetAddressPlasma[] = {0x00, 0x10, 0xdd, 0xce, 0x15, 0xd4};
|
static uint8 ethernetAddressPlasma[] = {0x00, 0x10, 0xdd, 0xce, 0x15, 0xd4};
|
#else
|
#else
|
static uint8 ethernetAddressPlasma[] = {0x00, 0x10, 0xdd, 0xce, 0x15, 0xd5};
|
static uint8 ethernetAddressPlasma[] = {0x00, 0x10, 0xdd, 0xce, 0x15, 0xd5};
|
Line 910... |
Line 909... |
memcpy(ethernetAddressGateway, packet+ARP_ETHERNET_SENDER, 6);
|
memcpy(ethernetAddressGateway, packet+ARP_ETHERNET_SENDER, 6);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
//Check if ARP request
|
//Check if ARP request
|
if(memcmp(packet+ETHERNET_DEST, ethernetAddressNull, 6) ||
|
if(packet[ARP_OP] != 0 || packet[ARP_OP+1] != 1 ||
|
packet[ARP_OP] != 0 || packet[ARP_OP+1] != 1 ||
|
|
memcmp(packet+ARP_IP_TARGET, ipAddressPlasma, 4))
|
memcmp(packet+ARP_IP_TARGET, ipAddressPlasma, 4))
|
return 0;
|
return 0;
|
//Create ARP response
|
//Create ARP response
|
frameOut = IPFrameGet(0);
|
frameOut = IPFrameGet(0);
|
if(frameOut == NULL)
|
if(frameOut == NULL)
|
Line 1519... |
Line 1517... |
IPSocket *socket, *socket2;
|
IPSocket *socket, *socket2;
|
unsigned long ticks;
|
unsigned long ticks;
|
static unsigned long ticksPrev=0, ticksPrev2=0;
|
static unsigned long ticksPrev=0, ticksPrev2=0;
|
|
|
ticks = OS_ThreadTime();
|
ticks = OS_ThreadTime();
|
|
#ifdef WIN32
|
|
ticks = ticksPrev + 100;
|
|
#endif
|
if(ticks - ticksPrev >= 95)
|
if(ticks - ticksPrev >= 95)
|
{
|
{
|
if(IPVerbose && (Seconds % 60) == 0)
|
if(IPVerbose && (Seconds % 60) == 0)
|
{
|
{
|
if(FrameFreeCount >= FRAME_COUNT-1)
|
if(FrameFreeCount >= FRAME_COUNT-1)
|