NetSim_PACKET* fn_NetSim_Packet_CreatePacket(int nLayer) is available as an API provided by Networkstack.dll. 


This declaration can be found in packet.h. Expand 'External dependencies' in any one project in NetSim.sln file to find the packet.h file. To find an example of how this API is used, you can see a CreatePacket call in Application.c file, 339 line number. 

Networkstack.dll file is a "protected" file and code is not open to user. Only protocol source codes are provided to users for modification.