1 #ifndef PACKETPP_GRE_LAYER 2 #define PACKETPP_GRE_LAYER 23 #if (BYTE_ORDER == LITTLE_ENDIAN) 50 #if (BYTE_ORDER == LITTLE_ENDIAN) 121 static ProtocolType getGREVersion(uint8_t* greData,
size_t greDataLen);
129 bool getSequenceNumber(uint32_t& seqNumber)
const;
138 bool setSequenceNumber(uint32_t seqNumber);
145 bool unsetSequenceNumber();
155 void parseNextLayer();
160 size_t getHeaderLen()
const;
165 GreLayer(uint8_t* data,
size_t dataLen,
Layer* prevLayer,
Packet* packet) :
Layer(data, dataLen, prevLayer, packet) { }
171 GreChecksumOrRouting = 0,
177 uint8_t* getFieldValue(GreField field,
bool returnOffsetEvenIfFieldMissing)
const;
179 void computeCalculateFieldsInner();
225 bool getChecksum(uint16_t& checksum);
236 bool setChecksum(uint16_t checksum);
244 bool unsetChecksum();
253 bool getOffset(uint16_t& offset)
const;
261 bool getKey(uint32_t& key)
const;
270 bool setKey(uint32_t key);
288 void computeCalculateFields();
290 std::string toString()
const;
335 bool getAcknowledgmentNum(uint32_t& ackNum)
const;
344 bool setAcknowledgmentNum(uint32_t ackNum);
351 bool unsetAcknowledgmentNum();
361 void computeCalculateFields();
363 std::string toString()
const;
405 void parseNextLayer();
416 void computeCalculateFields();
418 std::string
toString()
const {
return "PPP for PPTP Layer"; }
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:253
GREv0Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GreLayer.h:199
PPP_PPTPLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GreLayer.h:382
Definition: GreLayer.h:189
gre1_header * getGreHeader() const
Definition: GreLayer.h:327
size_t getHeaderLen() const
Definition: GreLayer.h:410
GREv1Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: GreLayer.h:309
OsiModelLayer getOsiModelLayer() const
Definition: GreLayer.h:420
gre_basic_header * getGreHeader() const
Definition: GreLayer.h:217
Definition: ProtocolType.h:260
uint64_t ProtocolType
Definition: ProtocolType.h:18
Definition: GreLayer.h:372
Definition: GreLayer.h:108
const ProtocolType GREv1
Definition: ProtocolType.h:118
const ProtocolType PPP_PPTP
Definition: ProtocolType.h:128
const ProtocolType GREv0
Definition: ProtocolType.h:113
OsiModelLayer getOsiModelLayer() const
Definition: GreLayer.h:162
Definition: ProtocolType.h:264
Definition: GreLayer.h:299
ppp_pptp_header * getPPP_PPTPHeader() const
Definition: GreLayer.h:397
std::string toString() const
Definition: GreLayer.h:418