Writing your own code in NetSim

How do I get the current simulation time?
    To start, note that the notion of time in a simulation is not directly related to the actual time that it takes to run a simulation (as measured by a wa...
Fri, 29 Sep, 2017 at 11:52 AM
Which version of Visual Studio is required for NetSim?
For NetSim v8 (8.0, 8.3) and v9 (9.0, 9.1) MS Visual Studio 2010 is recommended.  For NetSim v10, MS Visual Studio 2015 is required Both Visua...
Wed, 17 May, 2017 at 8:31 AM
What is the API to create a packet?
NetSim_PACKET* fn_NetSim_Packet_CreatePacket(int nLayer) is available as an API provided by Networkstack.dll.  This declaration can be found in pack...
Tue, 19 Apr, 2016 at 4:03 PM
How to resolve Error LNK1123 when building code?
This problem is related to the Visual Studio project settings. Please do the following: 1. Right click on <Protocol>project in the Visua...
Fri, 22 Apr, 2016 at 11:36 AM
How do I write to NetSim console for debugging ?
You must use the fprintf statement, and an example is shown below - fprintf(stderr, "The value of the variable X is %d\n", X); You m...
Fri, 29 Sep, 2017 at 12:42 PM
Are there any videos on how to link your code to NetSim?
Yes, please see https://www.youtube.com/watch?v=UAZuflGNEps&index=7&list=PLS8vhyBd_bXnly7paSPdvwt2r7xKMo6tV A detailed write up in available...
Sat, 9 Jul, 2016 at 12:21 PM
How do I change the payload of a packet in NetSim?
The payload of the packet is added in the application layer while generating the packet. Note that encryption is done after the payload is added.  ...
Fri, 8 Dec, 2017 at 3:35 PM
What are the packet buffers in nodes in NetSim ? How can they be accessed ?
There are two packet buffers for regular nodes in NetSim. These are a. Socket buffer between the application and transport layers b. Access b...
Fri, 29 Sep, 2017 at 12:40 PM
How to use fprintf() with stderr, stdout and printf() statements in NetSim?
In NetSim printf() is customized, for which the syntax is available in main.h file. fprintf(stderr,"") and fprintf(stdout,"") ar...
Fri, 29 Sep, 2017 at 12:44 PM
How do I print TCP variables to a file or to console?
Please use printf based debugging to get a clear understanding your code flow. It is available in the link below - https://tetcos.freshdesk.com/solution/art...
Sat, 18 Mar, 2017 at 6:17 PM