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 types. Unresolved types are missing from the diagram. Click here to see the full picture.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.
Name | Type | Description |
---|---|---|
UDP | simple module |
UDP protocol implementation, for IPv4 and IPv6. |
Name | Type | Description |
---|---|---|
SimpleMultiOverlayHost | compound module |
Host in the simple network that participates in the overlay |
SimpleOverlayHost | compound module |
Host in the simple network that participates in the overlay |
Name | Type | Default value | Description |
---|---|---|---|
constantDelay | double |
constant delay between two peers |
|
useCoordinateBasedDelay | bool |
delay should be calculated from euklidean distance between two peers |
|
delayFaultType | string |
augment coordinate based delays with a realistic error, according to "Network Coordinates in the Wild", Figure 7 possible values: empty, "live_all", "live_planetlab", "simulation" |
|
jitter | double |
average amount of jitter in % |
|
enableAccessRouterTxQueue | bool |
model the tx queue of the access router of an destination node |
Name | Value | Description |
---|---|---|
display | i=block/transport | |
class | SimpleUDP |
Name | Direction | Size | Description |
---|---|---|---|
appIn [ ] | input | ||
ipIn | input | ||
ipv6In | input | ||
appOut [ ] | output | ||
ipOut | output | ||
ipv6Out | output |
// // UDP protocol implementation, for IPv4 and IPv6. // // The \UDP protocol header is represented by the class UDPPacket. // // <b>Communication with clients (applications)</b> // // 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. // // <b>Communication with other nodes</b> // // The SimpleUDP model sends packets directly to the destination // // @see SimpleUDPPacket, UDPControlInfo, GlobalRoutingHashMap // simple SimpleUDP extends UDP { parameters: @class(SimpleUDP); double constantDelay @unit(s); // constant delay between two peers bool useCoordinateBasedDelay; // delay should be calculated from // euklidean distance between two peers string delayFaultType; // augment coordinate based delays with a realistic error, // according to "Network Coordinates in the Wild", Figure 7 // possible values: empty, "live_all", "live_planetlab", "simulation" double jitter; // average amount of jitter in % bool enableAccessRouterTxQueue; // model the tx queue of the access router of an destination node @display("i=block/transport"); gates: }