1 #ifndef PACKETPP_RADIUS_LAYER 2 #define PACKETPP_RADIUS_LAYER 59 if (m_Data ==
nullptr)
62 return (
size_t)m_Data->recordLen;
67 if (m_Data ==
nullptr)
70 return (
size_t)m_Data->recordLen - 2*
sizeof(uint8_t);
152 TLVRecordBuilder::operator=(other);
174 uint8_t* getAttributesBasePtr()
const {
return m_Data +
sizeof(
radius_header); }
188 Layer(data, dataLen, prevLayer, packet)
211 RadiusLayer(uint8_t code, uint8_t
id,
const std::string &authenticator);
227 std::string getAuthenticatorValue()
const;
233 void setAuthenticatorValue(
const std::string& authValue);
241 static std::string getRadiusMessageString(uint8_t radiusMessageCode);
269 size_t getAttributeCount()
const;
293 bool removeAttribute(uint8_t attrType);
299 bool removeAllAttributes();
307 static bool isDataValid(
const uint8_t* udpData,
size_t udpDataLen);
313 static inline bool isRadiusPort(uint16_t port);
320 size_t getHeaderLen()
const;
330 void computeCalculateFields();
332 std::string toString()
const;
355 #endif // PACKETPP_RADIUS_LAYER
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:333
RadiusAttributeBuilder(uint8_t attrType, uint32_t attrValue)
Definition: RadiusLayer.h:118
RadiusAttributeBuilder(uint8_t attrType, const std::string &attrValue)
Definition: RadiusLayer.h:136
Definition: ProtocolType.h:348
Definition: TLVData.h:376
radius_header * getRadiusHeader() const
Definition: RadiusLayer.h:222
RadiusLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: RadiusLayer.h:187
RadiusAttributeBuilder(uint8_t attrType, const uint8_t *attrValue, uint8_t attrValueLen)
Definition: RadiusLayer.h:91
size_t getTotalSize() const
Definition: RadiusLayer.h:57
Definition: RadiusLayer.h:40
RadiusAttributeBuilder(const RadiusAttributeBuilder &other)
Definition: RadiusLayer.h:143
Definition: TLVData.h:217
RadiusAttributeBuilder & operator=(const RadiusAttributeBuilder &other)
Definition: RadiusLayer.h:150
const ProtocolType Radius
Definition: ProtocolType.h:208
static bool isRadiusPort(uint16_t port)
Definition: RadiusLayer.h:340
~RadiusLayer()
Definition: RadiusLayer.h:216
Definition: IpAddress.h:42
virtual ~RadiusAttribute()
Definition: RadiusLayer.h:53
RadiusAttributeBuilder(uint8_t attrType, uint8_t attrValue)
Definition: RadiusLayer.h:100
RadiusAttributeBuilder(uint8_t attrType, const IPv4Address &attrValue)
Definition: RadiusLayer.h:127
RadiusAttribute(uint8_t *attrRawData)
Definition: RadiusLayer.h:48
OsiModelLayer getOsiModelLayer() const
Definition: RadiusLayer.h:334
Definition: RadiusLayer.h:80
size_t getDataSize() const
Definition: RadiusLayer.h:65
RadiusAttributeBuilder(uint8_t attrType, uint16_t attrValue)
Definition: RadiusLayer.h:109
Definition: RadiusLayer.h:168
void parseNextLayer()
Definition: RadiusLayer.h:325