21 #if (BYTE_ORDER == LITTLE_ENDIAN)
216 struct gtpv1_header_extra
218 uint16_t sequenceNumber;
220 uint8_t nextExtensionHeader;
223 gtpv1_header_extra* getHeaderExtra()
const;
225 void init(
GtpV1MessageType messageType, uint32_t teid,
bool setSeqNum, uint16_t seqNum,
bool setNpduNum,
242 GtpExtension(uint8_t* data,
size_t dataLen, uint8_t type);
244 void setNextHeaderType(uint8_t nextHeaderType);
246 static GtpExtension createGtpExtension(uint8_t* data,
size_t dataLen, uint8_t extType, uint16_t content);
320 :
Layer(data, dataLen, prevLayer, packet,
GTPv1)
352 static bool isGTPv1(
const uint8_t* data,
size_t dataSize);
449 return port == 2152 || port == 2123 ;
Definition: GtpLayer.h:234
uint8_t getNextExtensionHeaderType() const
GtpExtension & operator=(const GtpExtension &other)
uint8_t getExtensionType() const
GtpExtension(const GtpExtension &other)
size_t getContentLength() const
size_t getTotalLength() const
uint8_t * getContent() const
GtpExtension getNextExtension() const
Definition: GtpLayer.h:214
bool isGTPCMessage() const
void computeCalculateFields()
bool getSequenceNumber(uint16_t &seqNumber) const
bool isGTPUMessage() const
GtpV1Layer(GtpV1MessageType messageType, uint32_t teid)
bool setNpduNumber(const uint8_t npduNum)
std::string toString() const
GtpV1MessageType getMessageType() const
GtpExtension addExtension(uint8_t extensionType, uint16_t extensionContent)
GtpV1Layer(GtpV1MessageType messageType, uint32_t teid, bool setSeqNum, uint16_t seqNum, bool setNpduNum, uint8_t npduNum)
GtpExtension getNextExtension() const
gtpv1_header * getHeader() const
Definition: GtpLayer.h:358
size_t getHeaderLen() const
bool getNextExtensionHeaderType(uint8_t &nextExtType) const
static bool isGTPv1Port(uint16_t port)
Definition: GtpLayer.h:447
bool setSequenceNumber(const uint16_t seqNumber)
OsiModelLayer getOsiModelLayer() const
Definition: GtpLayer.h:475
static bool isGTPv1(const uint8_t *data, size_t dataSize)
GtpV1Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GtpLayer.h:319
std::string getMessageTypeAsString() const
bool getNpduNumber(uint8_t &npduNum) const
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelTransportLayer
Definition: ProtocolType.h:362
const ProtocolType GTPv1
Definition: ProtocolType.h:218
GtpV1MessageType
Definition: GtpLayer.h:68
@ GtpV1_MessageTypeUnknown
Definition: GtpLayer.h:70
@ GtpV1_MBMSNotificationResponse
Definition: GtpLayer.h:158
@ GtpV1_DeletePDPContextResponse
Definition: GtpLayer.h:94
@ GtpV1_InitiatePDPContextActivationResponse
Definition: GtpLayer.h:98
@ GtpV1_RANInformationRelay
Definition: GtpLayer.h:154
@ GtpV1_MBMSSessionStopRequest
Definition: GtpLayer.h:188
@ GtpV1_MBMSSessionUpdateRequest
Definition: GtpLayer.h:192
@ GtpV1_SupportedExtensionsHeaderNotification
Definition: GtpLayer.h:110
@ GtpV1_PDUNotificationRejectRequest
Definition: GtpLayer.h:106
@ GtpV1_GPDU
Definition: GtpLayer.h:206
@ GtpV1_MBMSSessionUpdateResponse
Definition: GtpLayer.h:194
@ GtpV1_DeletePDPContextRequest
Definition: GtpLayer.h:92
@ GtpV1_InitiatePDPContextActivationRequest
Definition: GtpLayer.h:96
@ GtpV1_PDUNotificationRequest
Definition: GtpLayer.h:102
@ GtpV1_EchoRequest
Definition: GtpLayer.h:72
@ GtpV1_ForwardRelocationComplete
Definition: GtpLayer.h:138
@ GtpV1_MBMSRegistrationRequest
Definition: GtpLayer.h:176
@ GtpV1_MBMSNotificationRejectRequest
Definition: GtpLayer.h:160
@ GtpV1_SGSNContextAcknowledge
Definition: GtpLayer.h:132
@ GtpV1_MBMSSessionStartRequest
Definition: GtpLayer.h:184
@ GtpV1_DeleteMBMSNotificationRequest
Definition: GtpLayer.h:172
@ GtpV1_ForwardRelocationResponse
Definition: GtpLayer.h:136
@ GtpV1_NodeAliveResponse
Definition: GtpLayer.h:80
@ GtpV1_UERegistrationRequest
Definition: GtpLayer.h:150
@ GtpV1_ForwardSRNSContextAcknowledge
Definition: GtpLayer.h:148
@ GtpV1_MBMSNotificationRejectResponse
Definition: GtpLayer.h:162
@ GtpV1_UERegistrationResponse
Definition: GtpLayer.h:152
@ GtpV1_CreatePDPContextResponse
Definition: GtpLayer.h:86
@ GtpV1_FailureReportResponse
Definition: GtpLayer.h:118
@ GtpV1_NoteMSPresentResponse
Definition: GtpLayer.h:122
@ GtpV1_IdentificationRequest
Definition: GtpLayer.h:124
@ GtpV1_MBMSDeRegistrationResponse
Definition: GtpLayer.h:182
@ GtpV1_MSInfoChangeResponse
Definition: GtpLayer.h:198
@ GtpV1_ForwardRelocationCompleteAcknowledge
Definition: GtpLayer.h:146
@ GtpV1_UpdatePDPContextRequest
Definition: GtpLayer.h:88
@ GtpV1_SendRoutingforGPRSRequest
Definition: GtpLayer.h:112
@ GtpV1_PDUNotificationRejectResponse
Definition: GtpLayer.h:108
@ GtpV1_UpdatePDPContextResponse
Definition: GtpLayer.h:90
@ GtpV1_SendRoutingforGPRSResponse
Definition: GtpLayer.h:114
@ GtpV1_VersionNotSupported
Definition: GtpLayer.h:76
@ GtpV1_MSInfoChangeRequest
Definition: GtpLayer.h:196
@ GtpV1_ErrorIndication
Definition: GtpLayer.h:100
@ GtpV1_UpdateMBMSNotificationResponse
Definition: GtpLayer.h:170
@ GtpV1_RelocationCancelResponse
Definition: GtpLayer.h:142
@ GtpV1_DataRecordTransferRequest
Definition: GtpLayer.h:200
@ GtpV1_MBMSNotificationRequest
Definition: GtpLayer.h:156
@ GtpV1_MBMSSessionStartResponse
Definition: GtpLayer.h:186
@ GtpV1_FailureReportRequest
Definition: GtpLayer.h:116
@ GtpV1_CreateMBMSNotificationResponse
Definition: GtpLayer.h:166
@ GtpV1_MBMSDeRegistrationRequest
Definition: GtpLayer.h:180
@ GtpV1_CreateMBMSNotificationRequest
Definition: GtpLayer.h:164
@ GtpV1_DataRecordTransferResponse
Definition: GtpLayer.h:202
@ GtpV1_MBMSSessionStopResponse
Definition: GtpLayer.h:190
@ GtpV1_UpdateMBMSNotificationRequest
Definition: GtpLayer.h:168
@ GtpV1_SGSNContextRequest
Definition: GtpLayer.h:128
@ GtpV1_RedirectionRequest
Definition: GtpLayer.h:82
@ GtpV1_EndMarker
Definition: GtpLayer.h:204
@ GtpV1_IdentificationResponse
Definition: GtpLayer.h:126
@ GtpV1_EchoResponse
Definition: GtpLayer.h:74
@ GtpV1_RelocationCancelRequest
Definition: GtpLayer.h:140
@ GtpV1_NodeAliveRequest
Definition: GtpLayer.h:78
@ GtpV1_SGSNContextResponse
Definition: GtpLayer.h:130
@ GtpV1_ForwardRelocationRequest
Definition: GtpLayer.h:134
@ GtpV1_NoteMSPresentRequest
Definition: GtpLayer.h:120
@ GtpV1_MBMSRegistrationResponse
Definition: GtpLayer.h:178
@ GtpV1_DeleteMBMSNotificationResponse
Definition: GtpLayer.h:174
@ GtpV1_CreatePDPContextRequest
Definition: GtpLayer.h:84
@ GtpV1_ForwardSRNSContext
Definition: GtpLayer.h:144
@ GtpV1_PDUNotificationResponse
Definition: GtpLayer.h:104