16#define _CRT_SECURE_NO_DEPRECATE
40 int nDestinationPresentFlag = 0;
45 ARP_TABLE *pstruTableHead, *pstruCurrentTable;
91 pstruCurrentTable = pstruTableHead;
92 while(pstruCurrentTable != 0)
96 nDestinationPresentFlag = 1;
103 if(!nDestinationPresentFlag)
109 printf(
"\n%s\n",
"ARP---Reply not received with in the ARP_RETRY_INTERVAL, send request once again");
130 printf(
"\n%s\n",
"ARP---Request reached the ARP_RETRY_LIMIT, drop the packet");
int fn_NetSim_Arp_Drop_Buffered_Packet(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_IPAddress szDestIPadd, int *nPacketDropCount)
NETSIM_IPAddress IP_COPY(NETSIM_IPAddress ip)
#define IP_TO_STR(ip, ipstr)
#define IP_COMPARE(ip1, ip2)
int fn_NetSim_ARP_Request_Timeout(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
EXPORTED struct stru_NetSim_Network * NETWORK
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_INTERFACE(DeviceId, InterfaceId)
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asIP(NETSIM_IPAddress ip, NETSIM_ID *nInterfaceId)
#define fn_NetSim_Packet_FreePacket(pstruPacket)
#define fnpAddEvent(pstruEvent)
int * pnArpRequestFlag
Set when generate Request.
ARP_BUFFER * pstruPacketBuffer
int * pnArpRetryCount
To keep track of number of retries.
int nArpRetryLimit
Store the ARP_RETRY_LIMIT from the config file.
ARP_METRICS * pstruArpMetrics
NetSim specific ARP metrics structure.
ARP_TABLE * pstruArpTable
int nPacketsInBuffer
Number of packets in the buffer
struct stru_ARP_Table * pstruNextEntry
Next entry pointer.
NETSIM_IPAddress szIPAddress
IP address of the deivce
NetSim_PACKET * pstruPacket
Store the packet
struct stru_NetSim_Packet * pPacket
NETSIM_IPAddress szGatewayIP
NETSIM_IPAddress szNextHopIp
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData