wifi: No need for WifiInformationElement::GetInformationFieldSize() to be public

GetSerializedSize() shall be used instead.
This commit is contained in:
Stefano Avallone
2022-07-13 15:03:25 +02:00
parent 92ffa0a52d
commit 20faf97e9c
2 changed files with 11 additions and 11 deletions

View File

@@ -146,7 +146,7 @@ WifiInformationElementVector::End ()
bool
WifiInformationElementVector::AddInformationElement (Ptr<WifiInformationElement> element)
{
if (element->GetInformationFieldSize () + 2 + GetSize () > m_maxSize)
if (element->GetSerializedSize () + GetSize () > m_maxSize)
{
return false;
}
@@ -173,7 +173,7 @@ WifiInformationElementVector::GetSize () const
uint32_t size = 0;
for (IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i++)
{
size += ((*i)->GetInformationFieldSize () + 2);
size += (*i)->GetSerializedSize ();
}
return size;
}

View File

@@ -291,15 +291,6 @@ public:
* \returns the wifi information element ID
*/
virtual WifiInformationElementId ElementId () const = 0;
/**
* Length of serialized information (i.e., the length of the body
* of the IE, not including the Element ID and length octets. This
* is the value that will appear in the second octet of the entire
* IE - the length field)
*
* \return the length of serialized information
*/
virtual uint8_t GetInformationFieldSize () const = 0;
/**
* Get the wifi information element ID extension
@@ -337,6 +328,15 @@ private:
* \return an iterator
*/
Buffer::Iterator DeserializeIfPresent (Buffer::Iterator i);
/**
* Length of serialized information (i.e., the length of the body
* of the IE, not including the Element ID and length octets. This
* is the value that will appear in the second octet of the entire
* IE - the length field)
*
* \return the length of serialized information
*/
virtual uint8_t GetInformationFieldSize () const = 0;
/**
* Serialize information (i.e., the body of the IE, not including
* the Element ID and length octets)