|
PcapPlusPlus
20.08
|
Go to the documentation of this file. 1 #ifndef PACKETPP_GTP_LAYER
2 #define PACKETPP_GTP_LAYER
23 #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, uint8_t npduNum);
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);
342 static bool isGTPv1(
const uint8_t* data,
size_t dataSize);
402 GtpExtension
addExtension(uint8_t extensionType, uint16_t extensionContent);
428 static bool isGTPv1Port(uint16_t port) {
return port == 2152 || port == 2123 ; }
458 #endif //PACKETPP_GTP_LAYER
static bool isGTPv1Port(uint16_t port)
Definition: GtpLayer.h:428
static bool isGTPv1(const uint8_t *data, size_t dataSize)
@ GtpV1_MBMSSessionUpdateRequest
Definition: GtpLayer.h:191
@ GtpV1_ForwardRelocationCompleteAcknowledge
Definition: GtpLayer.h:145
@ GtpV1_DeletePDPContextRequest
Definition: GtpLayer.h:91
OsiModelLayer
Definition: ProtocolType.h:233
bool getNpduNumber(uint8_t &npduNum) const
@ GtpV1_InitiatePDPContextActivationResponse
Definition: GtpLayer.h:97
@ GtpV1_ForwardRelocationResponse
Definition: GtpLayer.h:135
@ GtpV1_UpdatePDPContextResponse
Definition: GtpLayer.h:89
@ GtpV1_RANInformationRelay
Definition: GtpLayer.h:153
@ GtpV1_NodeAliveResponse
Definition: GtpLayer.h:79
@ GtpV1_EchoResponse
Definition: GtpLayer.h:73
@ GtpV1_MessageTypeUnknown
Definition: GtpLayer.h:69
@ GtpV1_MSInfoChangeResponse
Definition: GtpLayer.h:197
@ GtpV1_UERegistrationRequest
Definition: GtpLayer.h:149
GtpV1MessageType getMessageType() const
std::string getMessageTypeAsString() const
@ GtpV1_SendRoutingforGPRSRequest
Definition: GtpLayer.h:111
@ GtpV1_DeletePDPContextResponse
Definition: GtpLayer.h:93
@ GtpV1_ForwardRelocationComplete
Definition: GtpLayer.h:137
@ GtpV1_FailureReportResponse
Definition: GtpLayer.h:117
@ GtpV1_RelocationCancelResponse
Definition: GtpLayer.h:141
@ GtpV1_DataRecordTransferResponse
Definition: GtpLayer.h:201
@ GtpV1_MBMSSessionUpdateResponse
Definition: GtpLayer.h:193
@ GtpV1_MBMSNotificationRejectRequest
Definition: GtpLayer.h:159
@ GtpV1_MBMSSessionStartRequest
Definition: GtpLayer.h:183
@ GtpV1_MBMSNotificationRequest
Definition: GtpLayer.h:155
GtpExtension & operator=(const GtpExtension &other)
@ GtpV1_SGSNContextRequest
Definition: GtpLayer.h:127
@ GtpV1_CreateMBMSNotificationResponse
Definition: GtpLayer.h:165
@ GtpV1_DataRecordTransferRequest
Definition: GtpLayer.h:199
GtpExtension addExtension(uint8_t extensionType, uint16_t extensionContent)
@ GtpV1_PDUNotificationRejectRequest
Definition: GtpLayer.h:105
@ GtpV1_UpdateMBMSNotificationRequest
Definition: GtpLayer.h:167
@ GtpV1_MBMSRegistrationRequest
Definition: GtpLayer.h:175
@ GtpV1_CreatePDPContextResponse
Definition: GtpLayer.h:85
size_t getContentLength() const
@ GtpV1_EndMarker
Definition: GtpLayer.h:203
uint8_t getExtensionType() const
@ GtpV1_VersionNotSupported
Definition: GtpLayer.h:75
@ GtpV1_RedirectionRequest
Definition: GtpLayer.h:81
@ GtpV1_DeleteMBMSNotificationResponse
Definition: GtpLayer.h:173
@ GtpV1_ErrorIndication
Definition: GtpLayer.h:99
@ GtpV1_MBMSSessionStopRequest
Definition: GtpLayer.h:187
@ GtpV1_CreateMBMSNotificationRequest
Definition: GtpLayer.h:163
GtpV1Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GtpLayer.h:316
bool setSequenceNumber(const uint16_t seqNumber)
@ GtpV1_IdentificationRequest
Definition: GtpLayer.h:123
@ GtpV1_MBMSSessionStopResponse
Definition: GtpLayer.h:189
const ProtocolType GTPv1
Definition: ProtocolType.h:213
@ GtpV1_GPDU
Definition: GtpLayer.h:205
bool getNextExtensionHeaderType(uint8_t &nextExtType) const
GtpV1MessageType
Definition: GtpLayer.h:66
@ GtpV1_FailureReportRequest
Definition: GtpLayer.h:115
@ GtpV1_PDUNotificationResponse
Definition: GtpLayer.h:103
size_t getHeaderLen() const
OsiModelLayer getOsiModelLayer() const
Definition: GtpLayer.h:454
@ GtpV1_ForwardSRNSContextAcknowledge
Definition: GtpLayer.h:147
@ GtpV1_UERegistrationResponse
Definition: GtpLayer.h:151
@ GtpV1_SupportedExtensionsHeaderNotification
Definition: GtpLayer.h:109
@ GtpV1_MBMSDeRegistrationResponse
Definition: GtpLayer.h:181
uint8_t getNextExtensionHeaderType() const
bool setNpduNumber(const uint8_t npduNum)
@ GtpV1_UpdateMBMSNotificationResponse
Definition: GtpLayer.h:169
@ GtpV1_NoteMSPresentRequest
Definition: GtpLayer.h:119
@ GtpV1_RelocationCancelRequest
Definition: GtpLayer.h:139
size_t getTotalLength() const
@ GtpV1_MBMSNotificationResponse
Definition: GtpLayer.h:157
@ OsiModelTransportLayer
Definition: ProtocolType.h:242
@ GtpV1_DeleteMBMSNotificationRequest
Definition: GtpLayer.h:171
Definition: GtpLayer.h:213
@ GtpV1_NodeAliveRequest
Definition: GtpLayer.h:77
@ GtpV1_MSInfoChangeRequest
Definition: GtpLayer.h:195
@ GtpV1_MBMSSessionStartResponse
Definition: GtpLayer.h:185
@ GtpV1_UpdatePDPContextRequest
Definition: GtpLayer.h:87
GtpExtension getNextExtension() const
The main namespace for the PcapPlusPlus lib.
@ GtpV1_PDUNotificationRejectResponse
Definition: GtpLayer.h:107
bool isGTPUMessage() const
@ GtpV1_MBMSDeRegistrationRequest
Definition: GtpLayer.h:179
@ GtpV1_PDUNotificationRequest
Definition: GtpLayer.h:101
@ GtpV1_InitiatePDPContextActivationRequest
Definition: GtpLayer.h:95
std::string toString() const
@ GtpV1_SGSNContextResponse
Definition: GtpLayer.h:129
GtpExtension getNextExtension() const
@ GtpV1_CreatePDPContextRequest
Definition: GtpLayer.h:83
@ GtpV1_MBMSNotificationRejectResponse
Definition: GtpLayer.h:161
@ GtpV1_MBMSRegistrationResponse
Definition: GtpLayer.h:177
bool isGTPCMessage() const
bool getSequenceNumber(uint16_t &seqNumber) const
void computeCalculateFields()
uint8_t * getContent() const
@ GtpV1_SendRoutingforGPRSResponse
Definition: GtpLayer.h:113
@ GtpV1_IdentificationResponse
Definition: GtpLayer.h:125
gtpv1_header * getHeader() const
Definition: GtpLayer.h:347
@ GtpV1_SGSNContextAcknowledge
Definition: GtpLayer.h:131
@ GtpV1_ForwardSRNSContext
Definition: GtpLayer.h:143
@ GtpV1_NoteMSPresentResponse
Definition: GtpLayer.h:121
Definition: GtpLayer.h:233
@ GtpV1_ForwardRelocationRequest
Definition: GtpLayer.h:133
@ GtpV1_EchoRequest
Definition: GtpLayer.h:71