Ipv6Header

Namespace: inet

class Ipv6Header

Ipv6 datagram. RFC 2460 Section 3.

Header fields not explicitly modelled:

  • payload length: will be calculated from encapsulated message length

    and extension headers’ length

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

NetworkHeaderBase

class

(no description)

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

sourceAddress

L3Address

destinationAddress

L3Address

protocol

const Protocol *

chunkLength

version

uint8_t

srcAddress

Ipv6Address

destAddress

Ipv6Address

payloadLength

B

The size of the payload in octets, including any extension headers. The length is set to zero when a Hop-by-Hop extension header carries a Jumbo Payload option.

trafficClass

short

@bits(8) Traffic Class OMNeT++ 6.0: short __dscp @custom @getter(getDscp) @setter(setDscp); // @bit(6), maps to bits 0-5 of trafficClass short __ecn @custom @getter(getEcn) @setter(setEcn); // @bit(2), maps to bits 6-7 of trafficClass

flowLabel

unsigned int

hopLimit

short

protocolId

IpProtocolId

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

Source code

//
// Ipv6 datagram. RFC 2460 Section 3.
//
// Header fields not explicitly modelled:
//    - payload length: will be calculated from encapsulated message length
//      and extension headers' length
//
class Ipv6Header extends NetworkHeaderBase
{
    chunkLength = IPv6_HEADER_BYTES;
    uint8_t version = 6;
    Ipv6Address srcAddress;
    Ipv6Address destAddress;
    B payloadLength = B(-1);    // The size of the payload in octets, including any extension headers. The length is set to zero when a Hop-by-Hop extension header carries a Jumbo Payload option.
    short trafficClass;    // @bits(8) Traffic Class
    // OMNeT++ 6.0:
    // short __dscp @custom @getter(getDscp) @setter(setDscp);  // @bit(6), maps to bits 0-5 of trafficClass
    // short __ecn @custom @getter(getEcn) @setter(setEcn);  // @bit(2),  maps to bits 6-7 of trafficClass

    unsigned int flowLabel;
    short hopLimit = 0;
    IpProtocolId protocolId = IP_PROT_NONE;
}

File: src/inet/networklayer/ipv6/Ipv6Header.msg