Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-bpsec.h
1 /* packet-bpv7.h
2  * Definitions for Bundle Protocol Version 7 Security (BPSec) dissection
3  * References:
4  * RFC 9172: https://www.rfc-editor.org/rfc/rfc9172.html
5  *
6  * Copyright 2019-2021, Brian Sipos <brian.sipos@gmail.com>
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * SPDX-License-Identifier: LGPL-2.1-or-later
13  */
14 #ifndef PACKET_BPSEC_H
15 #define PACKET_BPSEC_H
16 
17 #include <ws_symbol_export.h>
18 #include <epan/tvbuff.h>
19 #include <epan/proto.h>
20 #include <epan/expert.h>
21 #include <glib.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*
28  * BPSec per-context parameter types and result types are registered with the
29  * dissector table "bpsec.param" and "bpsec.result" respectively.
30  * Both use bpsec_id_t* table keys, to identify both the context and the type
31  * code points.
32  */
33 
37 typedef enum {
39  BPSEC_ASB_HAS_PARAMS = 0x01,
40 } BpsecAsbFlag;
41 
43 typedef struct {
45  gint64 context_id;
47  gint64 type_id;
48 } bpsec_id_t;
49 
52 WS_DLL_PUBLIC
53 bpsec_id_t * bpsec_id_new(wmem_allocator_t *alloc, gint64 context_id, gint64 type_id);
54 
57 WS_DLL_PUBLIC
58 void bpsec_id_free(wmem_allocator_t *alloc, gpointer ptr);
59 
62 WS_DLL_PUBLIC
63 gboolean bpsec_id_equal(gconstpointer a, gconstpointer b);
64 
67 WS_DLL_PUBLIC
68 guint bpsec_id_hash(gconstpointer key);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* PACKET_BPSEC_H */
Definition: wmem_allocator.h:27
Parameter/Result dissector lookup.
Definition: packet-bpsec.h:43
gint64 context_id
Security context ID.
Definition: packet-bpsec.h:45
gint64 type_id
Parameter/Result ID.
Definition: packet-bpsec.h:47