Fix Doxygen comment formatting and typos

This commit is contained in:
Eduardo Almeida
2022-10-16 14:49:21 +01:00
parent 33ff238ccb
commit 85ade4e18d
122 changed files with 1112 additions and 878 deletions

View File

@@ -254,7 +254,7 @@ class PacketMetadata
/**
* \brief Get the metadata serialized size
* \return the seralized size
* \return the serialized size
*/
uint32_t GetSerializedSize() const;
@@ -266,17 +266,17 @@ class PacketMetadata
ItemIterator BeginItem(Buffer buffer) const;
/**
* \brief Serialization to raw uint8_t*
* \param buffer the buffer to serialize to
* \param maxSize the maximum serialization size
* \return 1 on success, 0 on failure
* \brief Serialization to raw uint8_t*
* \param buffer the buffer to serialize to
* \param maxSize the maximum serialization size
* \return 1 on success, 0 on failure
*/
uint32_t Serialize(uint8_t* buffer, uint32_t maxSize) const;
/**
* \brief Deserialization from raw uint8_t*
* \param buffer the buffer to deserialize from
* \param size the size
* \return 1 on success, 0 on failure
* \brief Deserialization from raw uint8_t*
* \param buffer the buffer to deserialize from
* \param size the size
* \return 1 on success, 0 on failure
*/
uint32_t Deserialize(const uint8_t* buffer, uint32_t size);
@@ -424,8 +424,7 @@ class PacketMetadata
uint32_t m_count;
/** size (in bytes) of m_data buffer below */
uint16_t m_size;
/** max of the m_used field over all objects which
* reference this struct Data instance */
/** max of the m_used field over all objects which reference this struct Data instance */
uint16_t m_dirtyEnd;
/** variable-sized buffer of bytes */
uint8_t m_data[PACKET_METADATA_DATA_M_DATA_SIZE];
@@ -443,41 +442,41 @@ class PacketMetadata
struct SmallItem
{
/** offset (in bytes) from start of m_data buffer
to next element in linked list. value is 0xffff
if next element does not exist.
stored as a fixed-size 16 bit integer.
to next element in linked list. value is 0xffff
if next element does not exist.
stored as a fixed-size 16 bit integer.
*/
uint16_t next;
/** offset (in bytes) from start of m_data buffer
to previous element in linked list. value is 0xffff
if previous element does not exist.
stored as a fixed-size 16 bit integer.
to previous element in linked list. value is 0xffff
if previous element does not exist.
stored as a fixed-size 16 bit integer.
*/
uint16_t prev;
/** the high 31 bits of this field identify the
type of the header or trailer represented by
this item: the value zero represents payload.
If the low bit of this uid is one, an ExtraItem
structure follows this SmallItem structure.
stored as a variable-size 32 bit integer.
type of the header or trailer represented by
this item: the value zero represents payload.
If the low bit of this uid is one, an ExtraItem
structure follows this SmallItem structure.
stored as a variable-size 32 bit integer.
*/
uint32_t typeUid;
/** the size (in bytes) of the header or trailer represented
by this element.
stored as a variable-size 32 bit integer.
by this element.
stored as a variable-size 32 bit integer.
*/
uint32_t size;
/** this field tries to uniquely identify each header or
trailer _instance_ while the typeUid field uniquely
identifies each header or trailer _type_. This field
is used to test whether two items are equal in the sense
that they represent the same header or trailer instance.
That equality test is based on the typeUid and chunkUid
fields so, the likelihood that two header instances
share the same chunkUid _and_ typeUid is very small
unless they are really representations of the same header
instance.
stored as a fixed-size 16 bit integer.
trailer _instance_ while the typeUid field uniquely
identifies each header or trailer _type_. This field
is used to test whether two items are equal in the sense
that they represent the same header or trailer instance.
That equality test is based on the typeUid and chunkUid
fields so, the likelihood that two header instances
share the same chunkUid _and_ typeUid is very small
unless they are really representations of the same header
instance.
stored as a fixed-size 16 bit integer.
*/
uint16_t chunkUid;
};
@@ -488,19 +487,19 @@ class PacketMetadata
struct ExtraItem
{
/** offset (in bytes) from start of original header to
the start of the fragment still present.
stored as a variable-size 32 bit integer.
the start of the fragment still present.
stored as a variable-size 32 bit integer.
*/
uint32_t fragmentStart;
/** offset (in bytes) from start of original header to
the end of the fragment still present.
stored as a variable-size 32 bit integer.
the end of the fragment still present.
stored as a variable-size 32 bit integer.
*/
uint32_t fragmentEnd;
/** the packetUid of the packet in which this header or trailer
was first added. It could be different from the m_packetUid
field if the user has aggregated multiple packets into one.
stored as a fixed-size 64 bit integer.
was first added. It could be different from the m_packetUid
field if the user has aggregated multiple packets into one.
stored as a fixed-size 64 bit integer.
*/
uint64_t packetUid;
};

View File

@@ -40,24 +40,24 @@ class FlowIdTag : public Tag
FlowIdTag();
/**
* Constructs a FlowIdTag with the given flow id
* Constructs a FlowIdTag with the given flow id
*
* \param flowId Id to use for the tag
* \param flowId Id to use for the tag
*/
FlowIdTag(uint32_t flowId);
/**
* Sets the flow id for the tag
* \param flowId Id to assign to the tag
* Sets the flow id for the tag
* \param flowId Id to assign to the tag
*/
void SetFlowId(uint32_t flowId);
/**
* Gets the flow id for the tag
* \returns current flow id for this tag
* Gets the flow id for the tag
* \returns current flow id for this tag
*/
uint32_t GetFlowId() const;
/**
* Uses a static variable to generate sequential flow id
* \returns flow id allocated
* Uses a static variable to generate sequential flow id
* \returns flow id allocated
*/
static uint32_t AllocateFlowId();

View File

@@ -551,8 +551,9 @@ class Ipv6Prefix
void SetPrefixLength(uint8_t prefixLength);
/**
* \brief Get the minimum prefix length, i.e., 128 - the length of the largest sequence trailing
* zeroes. \return minimum prefix length
* \brief Get the minimum prefix length, i.e., 128 - the length of the largest sequence
* trailing zeroes.
* \return minimum prefix length
*/
uint8_t GetMinimumPrefixLength() const;

View File

@@ -374,9 +374,9 @@ class LollipopCounter
* be on a circular region, and it is represented by
* the smallest circular distance between two numbers.
*
* Arithmetic operator.
* \param [in] val Counter to compute the difference against
* \return The result of the difference.
* Arithmetic operator.
* \param [in] val Counter to compute the difference against
* \return The result of the difference.
*/
T AbsoluteMagnitudeOfDifference(const LollipopCounter& val) const
{

View File

@@ -274,15 +274,16 @@ class PcapFile
/**
* \brief Compare two PCAP files packet-by-packet
*
* \param f1 First PCAP file name
* \param f2 Second PCAP file name
* \param sec [out] Time stamp of first different packet, seconds. Undefined if files don't
* differ.
* \param usec [out] Time stamp of first different packet, microseconds. Undefined if files
* don't differ.
* \param packets [out] Number of first different packet. Total number of parsed packets if
* files don't differ.
* \param snapLen Snap length (if used)
* \return true if files are different, false otherwise
*
* \param f1 First PCAP file name
* \param f2 Second PCAP file name
* \param sec [out] Time stamp of first different packet, seconds. Undefined if files
* doesn't differ. \param usec [out] Time stamp of first different packet, microseconds.
* Undefined if files doesn't differ. \param packets [out] Number of first different packet.
* Total number of parsed packets if files doesn't differ. \param snapLen Snap length (if
* used)
*/
static bool Diff(const std::string& f1,
const std::string& f2,