Skip to content

Commit 1669626

Browse files
committed
doc: add doxygen comment for parse_packet()
1 parent 544f19b commit 1669626

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

input/parser.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ typedef struct parser_opt_s {
6666
int datalink;
6767
} parser_opt_t;
6868

69+
/**
70+
* \brief Parse one packet and update output metadata in `opt`, and statistics in `stats`.
71+
*
72+
* The function updates the metadata (using `opt->pblock->cnt` index) when the
73+
* packet is successfully parsed. On error, the packet metadata at
74+
* `opt->pblock->cnt` index are invalid and the index points to the same place.
75+
* The caller must ensure `opt->pblock->size` is higher the `opt->pblock->cnt`;
76+
* this is checked and in case of no free space, `parse_packet()` returns
77+
* without any action.
78+
79+
* \param [out] opt Pointer to the structure with an output list of parsed packet metadata.
80+
* \param [out] stats Structure with the ipfixprobe statistics counters.
81+
* \param [in] ts Timestamp of the current packet
82+
* \param [in] data Input data, i.e., pointer to beginning of the packet header.
83+
* \param [in] len Original size of the packet to process.
84+
* \param [in] caplen Capture length - actual size of the packet, i.e., number of bytes that are available in data.
85+
*/
6986
void parse_packet(parser_opt_t *opt, ParserStats& stats, struct timeval ts, const uint8_t *data, uint16_t len, uint16_t caplen);
7087

7188
}

0 commit comments

Comments
 (0)