Class UDPDataIndication

File: src/inet/transportlayer/contract/udp/UDPControlInfo.msg

C++ definition

Control info that is attached to received data packets, sent up from the UDP module to the application with UDP_I_DATA as message kind.

See also: UDPCommandCode

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends:

Name Type Description
UDPControlInfo class

Base class for UDP control info classes. The most convenient way to handle UDP is the UDPSocket class, which hides control info from you.

Fields:

Name Type Description
srcAddr L3Address

source IPv4 or IPv6 address of the received packet

destAddr L3Address

destination IPv4 or IPv6 address of the received packet

srcPort int

source port of the received packet

destPort int

destination port of the received packet

ttl int

TTL field of the received packet

interfaceId int

interface on which the packet was received (see InterfaceTable)

typeOfService unsigned char

IPv4 Type of Service / IPv6 Traffic Class field of received packet

sockId int

must uniquely identify the socket in the UDP module

Source code:

//
// Control info that is attached to received data packets, sent up from the
// ~UDP module to the application with UDP_I_DATA as message kind.
//
// @see ~UDPCommandCode
//
class UDPDataIndication extends UDPControlInfo
{
    L3Address srcAddr;   // source IPv4 or IPv6 address of the received packet
    L3Address destAddr;  // destination IPv4 or IPv6 address of the received packet
    int srcPort;           // source port of the received packet
    int destPort;          // destination port of the received packet
    int ttl;               // TTL field of the received packet
    int interfaceId;       // interface on which the packet was received (see ~InterfaceTable)
    unsigned char typeOfService; // IPv4 Type of Service / IPv6 Traffic Class field of received packet
}