Class IPv4OptionTimestamp

File: src/inet/networklayer/ipv4/IPv4Datagram.msg

C++ definition

Option structure: Timestamp

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
IPv4Option class (no description)

Fields:

Name Type Description
type short
flag int

length = 4 + 4 * getRecordAddressArraySize() + 4 * getRecordTimestampArraySize();

overflow short
nextIdx short

pointer = 5 + (flag == IP_TIMESTAMP_TIMESTAMP_ONLY ? 4 : 8) * nextIdx

recordAddress IPv4Address[]

use either up to 4 addresses with timestamps or only up to 9 timestamps, according to the flag

recordTimestamp simtime_t[]
length short

total length of option

Source code:

//
// Option structure: Timestamp
//
class IPv4OptionTimestamp extends IPv4Option
{
    type = IPOPTION_TIMESTAMP;
    // length = 4 + 4 * getRecordAddressArraySize() + 4 * getRecordTimestampArraySize();
    int flag @enum(TimestampFlag);
    short overflow;
    short nextIdx;
    // pointer = 5 + (flag == IP_TIMESTAMP_TIMESTAMP_ONLY ? 4 : 8) * nextIdx

    // use either up to 4 addresses with timestamps or
    // only up to 9 timestamps, according to the flag
    IPv4Address recordAddress[];
    simtime_t recordTimestamp[];
}