NetSim Source Code Help
Loading...
Searching...
No Matches
Ethernet.c File Reference
#include "main.h"
#include "Ethernet.h"
#include "Ethernet_enum.h"
Include dependency graph for Ethernet.c:

Go to the source code of this file.

Functions

char * GetStringEthernet_Subevent (NETSIM_ID)
 
int fn_NetSim_Ethernet_Configure_F (void **var)
 
int fn_NetSim_Ethernet_Init_F (struct stru_NetSim_Network *net, NetSim_EVENTDETAILS *pevent, char *appPath, char *iopath, int version, void **fnPointer)
 
int fn_NetSim_Ethernet_CopyPacket_F (NetSim_PACKET *dst, NetSim_PACKET *src)
 
int fn_NetSim_Ethernet_FreePacket_F (NetSim_PACKET *packet)
 
int fn_NetSim_Ethernet_Finish_F ()
 
int fn_NetSim_Ethernet_Metrics_F (PMETRICSWRITER metricsWriter)
 
char * fn_NetSim_Ethernet_ConfigPacketTrace_F (const void *xmlNetSimNode)
 
int fn_NetSim_Ethernet_WritePacketTrace_F (NetSim_PACKET *pstruPacket, char **ppszTrace)
 
int fn_NetSim_Ethernet_HandleMacOut ()
 
int fn_NetSim_Ethernet_HandleMacIn ()
 
int fn_NetSim_Ethernet_HandlePhyOut ()
 
int fn_NetSim_Ethernet_HandlePhyIn ()
 
static int fn_NetSim_Ethernet_HandleTimer ()
 
int fn_NetSim_Ethernet_Run ()
 
int fn_NetSim_Ethernet_Configure (void **var)
 
int fn_NetSim_Ethernet_Init (struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
 
int fn_NetSim_Ethernet_Finish ()
 
char * fn_NetSim_Ethernet_Trace (int nSubEvent)
 
int fn_NetSim_Ethernet_FreePacket (NetSim_PACKET *pstruPacket)
 
int fn_NetSim_Ethernet_CopyPacket (NetSim_PACKET *pstruDestPacket, NetSim_PACKET *pstruSrcPacket)
 
int fn_NetSim_Ethernet_Metrics (PMETRICSWRITER metricsWriter)
 
char * fn_NetSim_Ethernet_ConfigPacketTrace (const void *xmlNetSimNode)
 
int fn_NetSim_Ethernet_WritePacketTrace (NetSim_PACKET *pstruPacket, char **ppszTrace)
 

Function Documentation

◆ fn_NetSim_Ethernet_ConfigPacketTrace()

char * fn_NetSim_Ethernet_ConfigPacketTrace ( const void *  xmlNetSimNode)

This function will return the string to write packet trace heading.

Definition at line 158 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_ConfigPacketTrace_F()

char * fn_NetSim_Ethernet_ConfigPacketTrace_F ( const void *  xmlNetSimNode)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_Configure()

int fn_NetSim_Ethernet_Configure ( void **  var)

This function is called by NetworkStack.dll, while configuring the device Mac/Phy layer for Ethernet protocol.

Definition at line 90 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_Configure_F()

int fn_NetSim_Ethernet_Configure_F ( void **  var)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_CopyPacket()

int fn_NetSim_Ethernet_CopyPacket ( NetSim_PACKET pstruDestPacket,
NetSim_PACKET pstruSrcPacket 
)

This function is called by NetworkStack.dll, to copy the Ethernet protocol from source packet to destination.

Definition at line 142 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_CopyPacket_F()

int fn_NetSim_Ethernet_CopyPacket_F ( NetSim_PACKET dst,
NetSim_PACKET src 
)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_Finish()

int fn_NetSim_Ethernet_Finish ( )

This function is called by NetworkStack.dll, once simulation end to free the allocated memory for the network.

Definition at line 117 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_Finish_F()

int fn_NetSim_Ethernet_Finish_F ( )
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_FreePacket()

int fn_NetSim_Ethernet_FreePacket ( NetSim_PACKET pstruPacket)

This function is called by NetworkStack.dll, to free the Ethernet protocol

Definition at line 134 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_FreePacket_F()

int fn_NetSim_Ethernet_FreePacket_F ( NetSim_PACKET packet)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_HandleMacIn()

int fn_NetSim_Ethernet_HandleMacIn ( )

Definition at line 364 of file Ethernet_Mac.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_HandleMacOut()

int fn_NetSim_Ethernet_HandleMacOut ( )

Definition at line 145 of file Ethernet_Mac.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_HandlePhyIn()

int fn_NetSim_Ethernet_HandlePhyIn ( )

Definition at line 182 of file Ethernet_Phy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_HandlePhyOut()

int fn_NetSim_Ethernet_HandlePhyOut ( )

Definition at line 134 of file Ethernet_Phy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_HandleTimer()

static int fn_NetSim_Ethernet_HandleTimer ( )
static

Definition at line 171 of file Ethernet.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_Init()

int fn_NetSim_Ethernet_Init ( struct stru_NetSim_Network NETWORK_Formal,
NetSim_EVENTDETAILS pstruEventDetails_Formal,
char *  pszAppPath_Formal,
char *  pszWritePath_Formal,
int  nVersion_Type,
void **  fnPointer 
)

This function initializes the Ethernet parameters.

Definition at line 98 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_Init_F()

int fn_NetSim_Ethernet_Init_F ( struct stru_NetSim_Network net,
NetSim_EVENTDETAILS pevent,
char *  appPath,
char *  iopath,
int  version,
void **  fnPointer 
)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_Metrics()

int fn_NetSim_Ethernet_Metrics ( PMETRICSWRITER  metricsWriter)

This function write the Metrics in Metrics.txt

Definition at line 150 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_Metrics_F()

int fn_NetSim_Ethernet_Metrics_F ( PMETRICSWRITER  metricsWriter)
Here is the caller graph for this function:

◆ fn_NetSim_Ethernet_Run()

int fn_NetSim_Ethernet_Run ( )

This function is called by NetworkStack.dll, whenever the event gets triggered inside the NetworkStack.dll for the Mac/Phy layer Ethernet protocol It includes MAC_OUT, MAC_IN, PHY_OUT, PHY_IN and TIMER_EVENT.

Definition at line 59 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_Trace()

char * fn_NetSim_Ethernet_Trace ( int  nSubEvent)

This function is called by NetworkStack.dll, while writing the event trace to get the sub event as a string.

Definition at line 126 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_WritePacketTrace()

int fn_NetSim_Ethernet_WritePacketTrace ( NetSim_PACKET pstruPacket,
char **  ppszTrace 
)

This function will return the string to write packet trace.

Definition at line 166 of file Ethernet.c.

Here is the call graph for this function:

◆ fn_NetSim_Ethernet_WritePacketTrace_F()

int fn_NetSim_Ethernet_WritePacketTrace_F ( NetSim_PACKET pstruPacket,
char **  ppszTrace 
)
Here is the caller graph for this function:

◆ GetStringEthernet_Subevent()

char * GetStringEthernet_Subevent ( NETSIM_ID  )
Here is the caller graph for this function: