The Application project contains an Application.c file where,
Additional Reference:
Refer to Section 9.3 of the NetSim User Manual for help on how to debug NetSim source codes.
Refer to our knowledge base article on "How do I change the payload of a packet in NetSim?" at How do I change the payload of a packet in NetSim?
Refer to our file exchange example on "Adding your own encryption" at https://tetcos.com/pdf/v12.1/MISTY_ENCRYPTION_v12.1.pdf
As you would notice in the above MYSTY project calls are made to perform encryption from the copy_payload() function that is part of the Application.c file.
In a similar way, users could add a new c file to the application project which contains code for your encryption algorithm. Then make calls to your algorithm from the copy_payload() function.
For your algorithm
1. Identify the input format of your algorithm. That is, the data type of plain text that it takes as input.
2. Modify the packet payload in NetSim as per the input format of your algorithm.
3. After your algorithm encrypts the payload, update the NetSim payload string accordingly after taking care of any type of conversions if required.
In Mysty algorithm implementation, you will see a misty_run.c file which takes care of these steps.