File: Underlay/SimpleUnderlay/SimpleUDP.ned
C++ definition: click here
UDP protocol implementation, for IPv4 and IPv6.
The UDP protocol header is represented by the class UDPPacket.
Communication with clients (applications)
The module can (should) be connected to several applications. For sending an UDP packet, the application should attach an UDPControlInfo object to the payload, and send it to UDP. UDP will also attach an UDPControlInfo object to any payload message in sends up to the application.
For receiving UDP packets, the connected applications should first "bind" to the given UDP port. This can be done by sending an arbitrary message with message kind UDP_C_BIND and an UDPControlInfo attached with srcPort filled in.
If there is only one app which doesn't bind to any port, it will receive all packets.
Communication with other nodes
The SimpleUDP model sends packets directly to the destination
See also: SimpleUDPPacket, UDPControlInfo, GlobalRoutingHashMap
The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.
If a module type shows up more than once, that means it has been defined in more than one NED file.
SimpleMultiOverlayHost | Host in the simple network that participates in the overlay |
SimpleOverlayHost | Host in the simple network that participates in the overlay |
Name | Type | Description |
---|---|---|
constantDelay | numeric | constant delay between two peers |
useCoordinateBasedDelay | bool | delay should be calculated from euklidean distance between two peers |
Name | Direction | Description |
---|---|---|
from_app [ ] | input | incoming gate from application |
network_in | input | incoming gate from network |
to_app [ ] | output | outgoing gate to application |
simple SimpleUDP parameters: constantDelay : numeric, // constant delay between two peers useCoordinateBasedDelay : bool; // delay should be calculated from euklidean distance between two peers gates: in: from_app[]; // incoming gate from application in: network_in; // incoming gate from network out: to_app[]; // outgoing gate to application endsimple