5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrGtpcHeader Class Reference

Header of the GTPv2-C protocol. More...

#include "nr-epc-gtpc-header.h"

+ Inheritance diagram for ns3::NrGtpcHeader:
+ Collaboration diagram for ns3::NrGtpcHeader:

Classes

struct  Fteid_t
 FTEID structure. More...
 

Public Types

enum  InterfaceType_t {
  S1U_GNB_GTPU = 0 , S5_SGW_GTPU = 4 , S5_PGW_GTPU = 5 , S5_SGW_GTPC = 6 ,
  S5_PGW_GTPC = 7 , S11_MME_GTPC = 10
}
 Interface Type enumeration. More...
 
enum  MessageType_t {
  Reserved = 0 , CreateSessionRequest = 32 , CreateSessionResponse = 33 , ModifyBearerRequest = 34 ,
  ModifyBearerResponse = 35 , DeleteSessionRequest = 36 , DeleteSessionResponse = 37 , DeleteBearerCommand = 66 ,
  DeleteBearerRequest = 99 , DeleteBearerResponse = 100
}
 Message Type enumeration. More...
 

Public Member Functions

void ComputeMessageLength ()
 
uint32_t Deserialize (Buffer::Iterator start) override
 
TypeId GetInstanceTypeId () const override
 
uint16_t GetMessageLength () const
 
virtual uint32_t GetMessageSize () const
 
uint8_t GetMessageType () const
 
uint32_t GetSequenceNumber () const
 
uint32_t GetSerializedSize () const override
 
uint32_t GetTeid () const
 
void Print (std::ostream &os) const override
 
void Serialize (Buffer::Iterator start) const override
 
void SetIesLength (uint16_t iesLength)
 
void SetMessageLength (uint16_t messageLength)
 
void SetMessageType (uint8_t messageType)
 
void SetSequenceNumber (uint32_t sequenceNumber)
 
void SetTeid (uint32_t teid)
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

uint32_t PreDeserialize (Buffer::Iterator &i)
 
void PreSerialize (Buffer::Iterator &i) const
 

Detailed Description

Header of the GTPv2-C protocol.

Implementation of the GPRS Tunnelling Protocol for Control Plane (GTPv2-C) header according to the 3GPP TS 29.274 document

Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 24 bytes (on a 64-bit architecture).

Definition at line 26 of file nr-epc-gtpc-header.h.

Member Enumeration Documentation

◆ InterfaceType_t

Interface Type enumeration.

Definition at line 104 of file nr-epc-gtpc-header.h.

◆ MessageType_t

Message Type enumeration.

Definition at line 123 of file nr-epc-gtpc-header.h.

Constructor & Destructor Documentation

◆ NrGtpcHeader()

ns3::NrGtpcHeader::NrGtpcHeader ( )

Definition at line 31 of file nr-epc-gtpc-header.cc.

◆ ~NrGtpcHeader()

ns3::NrGtpcHeader::~NrGtpcHeader ( )
override

Definition at line 40 of file nr-epc-gtpc-header.cc.

Member Function Documentation

◆ ComputeMessageLength()

void ns3::NrGtpcHeader::ComputeMessageLength ( )

Compute the message length according to the message type

Definition at line 182 of file nr-epc-gtpc-header.cc.

References GetMessageSize(), and SetIesLength().

+ Here is the call graph for this function:

◆ Deserialize()

uint32_t ns3::NrGtpcHeader::Deserialize ( Buffer::Iterator  start)
override

Definition at line 76 of file nr-epc-gtpc-header.cc.

◆ GetInstanceTypeId()

TypeId ns3::NrGtpcHeader::GetInstanceTypeId ( ) const
override

Definition at line 45 of file nr-epc-gtpc-header.cc.

◆ GetMessageLength()

uint16_t ns3::NrGtpcHeader::GetMessageLength ( ) const

Get message length

Returns
the message length

Definition at line 131 of file nr-epc-gtpc-header.cc.

◆ GetMessageSize()

uint32_t ns3::NrGtpcHeader::GetMessageSize ( ) const
virtual

Get the message size.

Subclasses are supposed to have a message size greater than zero.

Returns
the message size

Reimplemented in ns3::NrGtpcCreateSessionRequestMessage, ns3::NrGtpcCreateSessionResponseMessage, ns3::NrGtpcModifyBearerRequestMessage, ns3::NrGtpcModifyBearerResponseMessage, ns3::NrGtpcDeleteBearerCommandMessage, ns3::NrGtpcDeleteBearerRequestMessage, and ns3::NrGtpcDeleteBearerResponseMessage.

Definition at line 119 of file nr-epc-gtpc-header.cc.

Referenced by ComputeMessageLength().

+ Here is the caller graph for this function:

◆ GetMessageType()

uint8_t ns3::NrGtpcHeader::GetMessageType ( ) const

Get message type

Returns
the message type

Definition at line 125 of file nr-epc-gtpc-header.cc.

Referenced by ns3::NrEpcPgwApplication::RecvFromS5cSocket().

+ Here is the caller graph for this function:

◆ GetSequenceNumber()

uint32_t ns3::NrGtpcHeader::GetSequenceNumber ( ) const

Get sequence number

Returns
the sequence number

Definition at line 143 of file nr-epc-gtpc-header.cc.

◆ GetSerializedSize()

uint32_t ns3::NrGtpcHeader::GetSerializedSize ( ) const
override

Definition at line 51 of file nr-epc-gtpc-header.cc.

◆ GetTeid()

uint32_t ns3::NrGtpcHeader::GetTeid ( ) const

Get TEID

Returns
the TEID

Definition at line 137 of file nr-epc-gtpc-header.cc.

◆ GetTypeId()

TypeId ns3::NrGtpcHeader::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 22 of file nr-epc-gtpc-header.cc.

◆ PreDeserialize()

uint32_t ns3::NrGtpcHeader::PreDeserialize ( Buffer::Iterator &  i)
protected

Deserialize the GTP-C header in the GTP-C messages

Parameters
ithe buffer iterator
Returns
number of bytes deserialized

Definition at line 82 of file nr-epc-gtpc-header.cc.

◆ PreSerialize()

void ns3::NrGtpcHeader::PreSerialize ( Buffer::Iterator &  i) const
protected

Serialize the GTP-C header in the GTP-C messages

Parameters
ithe buffer iterator

Definition at line 63 of file nr-epc-gtpc-header.cc.

◆ Print()

void ns3::NrGtpcHeader::Print ( std::ostream &  os) const
override

Definition at line 112 of file nr-epc-gtpc-header.cc.

◆ Serialize()

void ns3::NrGtpcHeader::Serialize ( Buffer::Iterator  start) const
override

Definition at line 57 of file nr-epc-gtpc-header.cc.

◆ SetIesLength()

void ns3::NrGtpcHeader::SetIesLength ( uint16_t  iesLength)

Set IEs length. It is used to compute the message length

Parameters
iesLengththe IEs length

Definition at line 175 of file nr-epc-gtpc-header.cc.

Referenced by ComputeMessageLength().

+ Here is the caller graph for this function:

◆ SetMessageLength()

void ns3::NrGtpcHeader::SetMessageLength ( uint16_t  messageLength)

Set message length

Parameters
messageLengththe message length

Definition at line 155 of file nr-epc-gtpc-header.cc.

◆ SetMessageType()

void ns3::NrGtpcHeader::SetMessageType ( uint8_t  messageType)

Set message type

Parameters
messageTypethe message type

Definition at line 149 of file nr-epc-gtpc-header.cc.

◆ SetSequenceNumber()

void ns3::NrGtpcHeader::SetSequenceNumber ( uint32_t  sequenceNumber)

Set sequence number

Parameters
sequenceNumberthe sequence number

Definition at line 169 of file nr-epc-gtpc-header.cc.

◆ SetTeid()

void ns3::NrGtpcHeader::SetTeid ( uint32_t  teid)

Set TEID

Parameters
teidthe TEID

Definition at line 161 of file nr-epc-gtpc-header.cc.


The documentation for this class was generated from the following files: