Ipv4OptionTimestamp

Namespace: inet

class Ipv4OptionTimestamp

Option structure: Timestamp RFC 781

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

Ipv4Option

class

(no description)

Fields

Name

Type

Description

type

short

length

short

total length of option

type

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

flag

TimestampFlag

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[]

Properties

Name

Value

Description

packetData

Source code

//
// Option structure: Timestamp
// RFC 781
//
class Ipv4OptionTimestamp extends Ipv4Option
{
    type = IPOPTION_TIMESTAMP;
    // length = 4 + 4 * getRecordAddressArraySize() + 4 * getRecordTimestampArraySize();
    TimestampFlag flag;
    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[];
}

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