![]() |
5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
|
Header of the GTPv2-C protocol. More...
#include "nr-epc-gtpc-header.h"
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 |
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.
Interface Type enumeration.
Definition at line 104 of file nr-epc-gtpc-header.h.
Message Type enumeration.
Definition at line 123 of file nr-epc-gtpc-header.h.
ns3::NrGtpcHeader::NrGtpcHeader | ( | ) |
Definition at line 31 of file nr-epc-gtpc-header.cc.
|
override |
Definition at line 40 of file nr-epc-gtpc-header.cc.
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().
|
override |
Definition at line 76 of file nr-epc-gtpc-header.cc.
|
override |
Definition at line 45 of file nr-epc-gtpc-header.cc.
uint16_t ns3::NrGtpcHeader::GetMessageLength | ( | ) | const |
|
virtual |
Get the message size.
Subclasses are supposed to have a message size greater than zero.
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().
uint8_t ns3::NrGtpcHeader::GetMessageType | ( | ) | const |
Get message type
Definition at line 125 of file nr-epc-gtpc-header.cc.
Referenced by ns3::NrEpcPgwApplication::RecvFromS5cSocket().
uint32_t ns3::NrGtpcHeader::GetSequenceNumber | ( | ) | const |
Get sequence number
Definition at line 143 of file nr-epc-gtpc-header.cc.
|
override |
Definition at line 51 of file nr-epc-gtpc-header.cc.
uint32_t ns3::NrGtpcHeader::GetTeid | ( | ) | const |
|
static |
|
protected |
Deserialize the GTP-C header in the GTP-C messages
i | the buffer iterator |
Definition at line 82 of file nr-epc-gtpc-header.cc.
|
protected |
Serialize the GTP-C header in the GTP-C messages
i | the buffer iterator |
Definition at line 63 of file nr-epc-gtpc-header.cc.
|
override |
Definition at line 112 of file nr-epc-gtpc-header.cc.
|
override |
Definition at line 57 of file nr-epc-gtpc-header.cc.
void ns3::NrGtpcHeader::SetIesLength | ( | uint16_t | iesLength | ) |
Set IEs length. It is used to compute the message length
iesLength | the IEs length |
Definition at line 175 of file nr-epc-gtpc-header.cc.
Referenced by ComputeMessageLength().
void ns3::NrGtpcHeader::SetMessageLength | ( | uint16_t | messageLength | ) |
Set message length
messageLength | the message length |
Definition at line 155 of file nr-epc-gtpc-header.cc.
void ns3::NrGtpcHeader::SetMessageType | ( | uint8_t | messageType | ) |
Set message type
messageType | the message type |
Definition at line 149 of file nr-epc-gtpc-header.cc.
void ns3::NrGtpcHeader::SetSequenceNumber | ( | uint32_t | sequenceNumber | ) |
Set sequence number
sequenceNumber | the sequence number |
Definition at line 169 of file nr-epc-gtpc-header.cc.
void ns3::NrGtpcHeader::SetTeid | ( | uint32_t | teid | ) |