Applicable Versions
NetSim StandardNetSim Pro


Each link is referred to using a unique ID which is the Link_ID. Each interface of a device has a unique ID which is the Interface_ID. For Eg: If a router is connected to three devices, it will have three interfaces each referred using a unique ID.


The properties of links can be accessed from the NETWORK variable as follows:
NETWORK->ppstruNetSimLinks[LINK_ID]

Where, 

LINK_ID is the unique ID of a link

The properties of each interface of a specific device can be accessed from the NETWORK variable as follows:

NETWORK->ppstruDeviceList[DEVICE_ID]->ppstruInterfaceList[INTERFACE_ID]

Where,

DEVICE_ID is the unique ID of the device for which the interface details needs to be accessed

INTERFACE_ID is the unique ID of the interface of device with ID DEVICE_ID which is to be accessed


NOTE: Examples provided may vary for different releases of NetSim. Please follow the steps mentioned under the applicable release.


Applicable Releases
v13


For examples related to accessing links and interface properties, refer the function: fn_NetSim_RIP_Update_Timer() 

file: UpdateTimer.c

Project: Routing



Applicable Releases
v10.2v11
v12


For examples related to accessing links and interface properties, refer the function: fn_NetSim_OSPF_LSUpacketformation() 

file: SendLSU.c

Project: Routing 


Other Useful Knowledge Base articles:

What are some best practices for writing my own code in NetSim?

How to restore the original DLL files if they are accidentally replaced in the bin folder?