Wireshark
2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
epan
wmem
wmem_stack.h
1
/* wmem_stack.h
2
* Definitions for the Wireshark Memory Manager Stack
3
* Copyright 2012, Evan Huus <eapache@gmail.com>
4
*
5
* Wireshark - Network traffic analyzer
6
* By Gerald Combs <gerald@wireshark.org>
7
* Copyright 1998 Gerald Combs
8
*
9
* SPDX-License-Identifier: GPL-2.0-or-later
10
*/
11
12
#ifndef __WMEM_STACK_H__
13
#define __WMEM_STACK_H__
14
15
#include <string.h>
16
#include <glib.h>
17
18
#include "wmem_core.h"
19
#include "wmem_list.h"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
/* __cplusplus */
24
34
/* Wmem stack is implemented as a simple wrapper over Wmem list */
35
typedef
wmem_list_t
wmem_stack_t
;
36
37
#define wmem_stack_count(X) wmem_list_count(X)
38
39
WS_DLL_PUBLIC
40
void
*
41
wmem_stack_peek(
const
wmem_stack_t *stack);
42
43
WS_DLL_PUBLIC
44
void
*
45
wmem_stack_pop(wmem_stack_t *stack);
46
47
#define wmem_stack_push(STACK, DATA) wmem_list_prepend((STACK), (DATA))
48
49
#define wmem_stack_new(ALLOCATOR) wmem_list_new(ALLOCATOR)
50
51
#define wmem_destroy_stack(STACK) wmem_destroy_list(STACK)
52
56
#ifdef __cplusplus
57
}
58
#endif
/* __cplusplus */
59
60
#endif
/* __WMEM_STACK_H__ */
61
62
/*
63
* Editor modelines - http://www.wireshark.org/tools/modelines.html
64
*
65
* Local variables:
66
* c-basic-offset: 4
67
* tab-width: 8
68
* indent-tabs-mode: nil
69
* End:
70
*
71
* vi: set shiftwidth=4 tabstop=8 expandtab:
72
* :indentSize=4:tabSize=8:noTabs=true:
73
*/
_wmem_list_t
Definition:
wmem_list.c:23
Generated by
1.8.11