1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 21:14:28 +01:00

Added PDU::matches_pdu override on RC4EAPOL and RSNEAPOL.

This commit is contained in:
Matias Fontanini
2011-09-08 15:44:05 -03:00
parent af50d41be1
commit db0e838e6f
3 changed files with 35 additions and 3 deletions

View File

@@ -293,6 +293,21 @@ namespace Tins {
*/
uint32_t header_size() const;
/**
* \brief Getter for the PDU's type.
* \return Returns the PDUType corresponding to the PDU.
*/
PDUType pdu_type() const { return PDU::RC4EAPOL; }
/**
* \brief Check wether this PDU matches the specified flag.
* \param flag The flag to match
* \sa PDU::matches_flag
*/
bool matches_flag(PDUType flag) {
return flag == PDU::RC4EAPOL || EAPOL::matches_flag(flag);
}
/**
* \brief Clones this PDU.
*
@@ -491,6 +506,21 @@ namespace Tins {
*/
void rsn_information(const RSNInformation &rsn);
/**
* \brief Getter for the PDU's type.
* \return Returns the PDUType corresponding to the PDU.
*/
PDUType pdu_type() const { return PDU::RSNEAPOL; }
/**
* \brief Check wether this PDU matches the specified flag.
* \param flag The flag to match
* \sa PDU::matches_flag
*/
bool matches_flag(PDUType flag) {
return flag == PDU::RSNEAPOL || EAPOL::matches_flag(flag);
}
/**
* \brief Clones this PDU.
*

View File

@@ -81,7 +81,9 @@ namespace Tins {
ICMP,
BOOTP,
DHCP,
EAPOL
EAPOL,
RC4EAPOL,
RSNEAPOL
};
/** \brief PDU constructor