24#define _CRT_SECURE_NO_DEPRECATE
52 ARP_BUFFER *pstruPacketBuffer, *pstruPrevBuffer,*tempBuffer=NULL;
81 while(pstruPacketBuffer)
85 pstruTempBufferData = pstruPacketBuffer->
pstruPacket;
122 pstruPrevBuffer = pstruPacketBuffer;
126 tempBuffer = pstruPrevBuffer;
128 pstruPrevBuffer = pstruPacketBuffer;
131 nDestinationId = pstruTemp_Data->
nSourceId;
141 pstruTemp_Data = NULL;
int fn_NetSim_Add_IP_MAC_AddressTo_ARP_Table(ARP_TABLE **, NETSIM_IPAddress, PNETSIM_MACADDRESS, int)
Function to add the new entry to the ARP_TABLE(IP add, MAC add and Type)
NETSIM_IPAddress IP_COPY(NETSIM_IPAddress ip)
void IP_FREE(NETSIM_IPAddress ip)
#define IP_COMPARE(ip1, ip2)
bool fn_NetSim_GetBufferStatus(NetSim_BUFFER *pstruBuffer)
MAC_LAYER_PROTOCOL fn_NetSim_Stack_GetMacProtocol(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
EXPORTED struct stru_NetSim_Network * NETWORK
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_INTERFACE(DeviceId, InterfaceId)
int fn_NetSim_Update_ARP_Table_ForwardPacket(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
#define fn_NetSim_Packet_FreePacket(pstruPacket)
#define fnpAddEvent(pstruEvent)
#define fn_NetSim_Packet_AddPacketToList(pstruBuffer, pstruPacket, nInsertionType)
int * pnArpRequestFlag
Set when generate Request.
ARP_BUFFER * pstruPacketBuffer
ARP_METRICS * pstruArpMetrics
NetSim specific ARP metrics structure.
ARP_TABLE * pstruArpTable
int * pnArpReplyFlag
Set when receive the Reply.
int nPacketsInBuffer
Number of packets in the buffer
int nArpReplyReceivedCount
Number of replies received from destination.
This Arp packet structure is according to RFC 826.
NETSIM_IPAddress sz_ar$spa
Protocol address of the sender.
PNETSIM_MACADDRESS sz_ar$sha
Hardware address of the sender.
NETSIM_IPAddress sz_ar$tpa
Protocol address of target.
struct stru_ArpDataPacket_Buffer * pstruNextBuffer
NETSIM_IPAddress szDestAdd
Store the destination IP address.
NetSim_PACKET * pstruPacket
Store the packet
struct stru_NetSim_Packet * pPacket
PNETSIM_MACADDRESS szDestMac
PNETSIM_MACADDRESS szSourceMac
void * Packet_NetworkProtocol
struct stru_NetSim_Packet_AppLayer * pstruAppData
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
struct stru_NetSim_Packet_MACLayer * pstruMacData
char str_ip[_NETSIM_IP_LEN]