epan: Document the epan, file, and packet scopes.

This commit is contained in:
Gerald Combs 2022-05-18 13:54:40 -07:00 committed by A Wireshark GitLab Utility
parent 3d4dfb829b
commit 1bfa15f7de
1 changed files with 15 additions and 6 deletions

View File

@ -18,14 +18,20 @@
extern "C" {
#endif /* __cplusplus */
/* Epan Scope */
/**
* @brief Fetch the current epan scope.
*
* Allocated memory is freed when wmem_leave_epan_scope() is called, which is normally at program exit.
*/
WS_DLL_PUBLIC
wmem_allocator_t *
wmem_epan_scope(void);
/* Packet Scope */
/**
* @brief Fetch the current packet scope.
*
* Allocated memory is freed when wmem_leave_packet_scope() is called, which is normally at the end of packet dissection.
*/
WS_DLL_PUBLIC
wmem_allocator_t *
wmem_packet_scope(void);
@ -38,8 +44,11 @@ WS_DLL_LOCAL
void
wmem_leave_packet_scope(void);
/* File Scope */
/**
* @brief Fetch the current file scope.
*
* Allocated memory is freed when wmem_leave_file_scope() is called, which is normally when a capture file is closed.
*/
WS_DLL_PUBLIC
wmem_allocator_t *
wmem_file_scope(void);