Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-bpsec.h
blob735414308f4da1515966059c7ce81eb5a5507438
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
6 * Copyright 2019-2021, Brian Sipos <brian.sipos@gmail.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: LGPL-2.1-or-later
14 #ifndef PACKET_BPSEC_H
15 #define PACKET_BPSEC_H
17 #include <ws_symbol_export.h>
18 #include <epan/tvbuff.h>
19 #include "packet-bpv7.h"
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
26 * BPSec per-context parameter types and result types are registered with the
27 * dissector table "bpsec.param" and "bpsec.result" respectively.
28 * Both use bpsec_id_t* table keys, to identify both the context and the type
29 * code points.
32 /** Abstract Security Block Security Context Flags.
33 * RFC 9172 Section 3.6.
35 typedef enum {
36 /// Security Context Parameters present
37 BPSEC_ASB_HAS_PARAMS = 0x01,
38 } BpsecAsbFlag;
40 /// Parameter/Result dissector lookup
41 typedef struct {
42 /// Security context ID
43 int64_t context_id;
44 /// Parameter/Result ID
45 int64_t type_id;
46 } bpsec_id_t;
48 typedef struct {
49 /// Specific type being dissected
50 bpsec_id_t id;
51 /// Pointer to containing block/bundle context
52 const bp_dissector_data_t *bp;
53 } bpsec_dissector_data_t;
55 /** Construct a new ID.
57 WS_DLL_PUBLIC
58 bpsec_id_t * bpsec_id_new(wmem_allocator_t *alloc, int64_t context_id, int64_t type_id);
60 /** Function to match the GDestroyNotify signature.
62 WS_DLL_PUBLIC
63 void bpsec_id_free(wmem_allocator_t *alloc, void *ptr);
65 /** Function to match the GCompareFunc signature.
67 WS_DLL_PUBLIC
68 gboolean bpsec_id_equal(const void *a, const void *b);
70 /** Function to match the GHashFunc signature.
72 WS_DLL_PUBLIC
73 unsigned bpsec_id_hash(const void *key);
75 #ifdef __cplusplus
77 #endif
79 #endif /* PACKET_BPSEC_H */