Network analysis techniques network simulator software:
- Model the system at abstract level via software
- Used hardware components that behave like real systems
- Measurement of both active and passive
- Mathematical analysis and modeling of systems
- Conducting experiment on a testbed etc
Aim and motivation of ns-3:
- Real code integration such as real Linux stacks, real sockets application binaries
- Easy extensibility
- Ease of contributing, open development community etc.
Simulated entities in ns-3:
- Protocol: it manages connectivity and a sockets like API exists for applications to send and receive data through protocols
- Nodes: entities which form the network, connected by channels
- NetDevices: interfaces protocol stack with channels/physical transmission medium
- Channels: transmission medium
- Packets: what is sent across networks
- Applications: typically the final data sending/receiving entities, exist on nodes.
Callbacks function in ns3:
- Callback is function pointer, but with type-safe parameters
- Using typedef, the callback is defined
- Example code for define callback in ns3:
Typedef callback<void, Ptr<NetDevice>, Ptr<const Packet>, unit16_t, const Address &, const Address &, NetDevice::PacketType> ProtocolHandler;
- First argument is return type of void and remaining are the types of parameters to the callback function.