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;
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);
274 uint8_t getExtensionType()
const;
280 size_t getTotalLength()
const;
286 size_t getContentLength()
const;
292 uint8_t* getContent()
const;
298 uint8_t getNextExtensionHeaderType()
const;
342 static bool isGTPv1(
const uint8_t* data,
size_t dataSize);
355 bool getSequenceNumber(uint16_t& seqNumber)
const;
362 bool setSequenceNumber(
const uint16_t seqNumber);
370 bool getNpduNumber(uint8_t& npduNum)
const;
377 bool setNpduNumber(
const uint8_t npduNum);
385 bool getNextExtensionHeaderType(uint8_t& nextExtType)
const;
402 GtpExtension addExtension(uint8_t extensionType, uint16_t extensionContent);
412 std::string getMessageTypeAsString()
const;
417 bool isGTPUMessage()
const;
422 bool isGTPCMessage()
const;
428 static bool isGTPv1Port(uint16_t port) {
return port == 2152 || port == 2123 ; }
436 void parseNextLayer();
444 size_t getHeaderLen()
const;
450 void computeCalculateFields();
452 std::string toString()
const;
458 #endif //PACKETPP_GTP_LAYER The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:253
Definition: GtpLayer.h:153
Definition: GtpLayer.h:79
Definition: GtpLayer.h:111
OsiModelLayer getOsiModelLayer() const
Definition: GtpLayer.h:454
Definition: GtpLayer.h:91
Definition: GtpLayer.h:97
Definition: GtpLayer.h:135
Definition: GtpLayer.h:89
Definition: GtpLayer.h:117
Definition: GtpLayer.h:141
Definition: GtpLayer.h:73
Definition: GtpLayer.h:69
Definition: GtpLayer.h:201
Definition: GtpLayer.h:197
Definition: GtpLayer.h:149
Definition: GtpLayer.h:93
Definition: GtpLayer.h:137
Definition: GtpLayer.h:127
Definition: GtpLayer.h:105
Definition: GtpLayer.h:193
Definition: GtpLayer.h:167
Definition: GtpLayer.h:159
Definition: GtpLayer.h:85
Definition: GtpLayer.h:183
Definition: GtpLayer.h:155
Definition: GtpLayer.h:165
Definition: GtpLayer.h:199
GtpV1Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GtpLayer.h:316
Definition: GtpLayer.h:75
Definition: GtpLayer.h:187
Definition: GtpLayer.h:175
Definition: GtpLayer.h:203
Definition: GtpLayer.h:123
Definition: GtpLayer.h:81
Definition: GtpLayer.h:173
Definition: GtpLayer.h:99
Definition: GtpLayer.h:103
Definition: GtpLayer.h:147
Definition: GtpLayer.h:163
const ProtocolType GTPv1
Definition: ProtocolType.h:213
Definition: GtpLayer.h:151
GtpV1MessageType
Definition: GtpLayer.h:66
Definition: GtpLayer.h:189
Definition: GtpLayer.h:205
Definition: GtpLayer.h:109
Definition: GtpLayer.h:115
static bool isGTPv1Port(uint16_t port)
Definition: GtpLayer.h:428
Definition: ProtocolType.h:262
Definition: GtpLayer.h:213
Definition: GtpLayer.h:185
Definition: GtpLayer.h:107
Definition: GtpLayer.h:179
Definition: GtpLayer.h:181
Definition: GtpLayer.h:169
Definition: GtpLayer.h:101
Definition: GtpLayer.h:119
Definition: GtpLayer.h:139
Definition: GtpLayer.h:157
Definition: GtpLayer.h:171
Definition: GtpLayer.h:77
Definition: GtpLayer.h:195
Definition: GtpLayer.h:87
Definition: GtpLayer.h:83
Definition: GtpLayer.h:95
gtpv1_header * getHeader() const
Definition: GtpLayer.h:347
Definition: GtpLayer.h:129
Definition: GtpLayer.h:113
Definition: GtpLayer.h:125
Definition: GtpLayer.h:161
Definition: GtpLayer.h:177
Definition: GtpLayer.h:121
Definition: GtpLayer.h:133
Definition: GtpLayer.h:71
Definition: GtpLayer.h:131
Definition: GtpLayer.h:191
Definition: GtpLayer.h:143
Definition: GtpLayer.h:145
Definition: GtpLayer.h:233