15#define _CRT_SECURE_NO_DEPRECATE
33 switch(nSub_Event_Type)
45 switch(nSub_Event_Type)
54 switch(nSub_Event_Type)
185 ARP_TABLE *pstruTableHead,*pstruCurrentTable;
205 pstruCurrentTable = pstruTableHead;
209 while(pstruCurrentTable != NULL)
230 pstruTemp_Data = NULL;
int fn_NetSim_ARP_FreePacket_F(NetSim_PACKET *)
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)
int fn_NetSim_Generate_ARP_Reply(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
int fn_NetSim_Update_ARP_Table_ForwardPacket(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
int fn_NetSim_ARP_CopyPacket_F(NetSim_PACKET *, NetSim_PACKET *)
int fn_NetSim_ARP_Init_F(struct stru_NetSim_Network *, NetSim_EVENTDETAILS *, char *, char *, int, void **fnPointer)
int fn_NetSim_ARP_Finish_F()
int fn_NetSim_ARP_Request_Timeout(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
enum enum_ARP_Subevent_Type SUB_EVENT
@ UPDATE_ARP_TABLE_FWD_PKT
int fn_NetSim_ARP_Configure_F(void **var)
int fn_NetSim_Generate_ARP_Request(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
char * fn_NetSim_ARP_Trace_F(int nSubEvent)
char * fn_NetSim_ARP_Trace(int nSubEvent)
Return the subevent name with respect to the subevent number for writting event trace.
int fn_NetSim_ARP_Metrics(PMETRICSWRITER writer)
int fn_NetSim_ARP_Run()
Function to run ARP protocol.
char * fn_NetSim_ARP_ConfigPacketTrace()
int fn_NetSim_ARP_Finish()
Function to free the ARP protocol variable and Unload the primitives.
int fn_NetSim_ARP_Configure(void **var)
Function for configuring ARP parameters.
char * fn_NetSim_ARP_WritePacketTrace(NetSim_PACKET *pstruPacket, char **ppszTrace)
int fn_NetSim_ARP_FreePacket(NetSim_PACKET *pstruPacket)
Function to free the allocated memory for the ARP packet.
int fn_NetSim_ARP_CopyPacket(NetSim_PACKET *pstruDestPacket, NetSim_PACKET *pstruSrcPacket)
Function to copy the ARP packet from source to destination.
int fn_Netsim_ARP_CheckDestinationDevice(NetSim_EVENTDETAILS *pstruEventDetails, struct stru_NetSim_Network *NETWORK)
int fn_NetSim_ARP_Init(struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
Function for Intializing ARP protocol.
NETSIM_IPAddress IP_COPY(NETSIM_IPAddress ip)
void IP_FREE(NETSIM_IPAddress ip)
#define IP_COMPARE(ip1, ip2)
#define _declspec(dllexport)
This function is used to trigger the update.
#define fnNetSimError(x,...)
NetSim_EVENTDETAILS * pstruEventDetails_Formal
NetSim_EVENTDETAILS char * pszAppPath_Formal
NetSim_EVENTDETAILS char char int nVersion_Type
NetSim_EVENTDETAILS char char * pszWritePath_Formal
NetSim_EVENTDETAILS char char int void ** fnPointer
int fn_NetSim_Read_ARP_Table()
EXPORTED EVENT_TYPE nEventType
#define DEVICE_NWADDRESS(DeviceId, InterfaceId)
EXPORTED struct stru_NetSim_Network * NETWORK
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_INTERFACE(DeviceId, InterfaceId)
#define fn_NetSim_Packet_FreePacket(pstruPacket)
#define fnpAddEvent(pstruEvent)
ARP_TABLE * pstruArpTable
struct stru_ARP_Table * pstruNextEntry
Next entry pointer.
NETSIM_IPAddress szIPAddress
IP address of the deivce
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_NetSim_Packet * pPacket
void * Packet_NetworkProtocol
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
unsigned int nControlDataType