Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
packet-bpsec.h
1/* packet-bpsec.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 "packet-bpv7.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*
26 * A human-friendly name for a security context ID can be registered with
27 * the dissector table "bpsec.ctx". This dissector is used only for its
28 * description and not to actually dissect anything.
29 *
30 * BPSec per-context parameter types and result types are registered with the
31 * dissector table "bpsec.param" and "bpsec.result" respectively.
32 * Both use bpsec_id_t* table keys, to identify both the context and the type
33 * code points.
34 */
35
39typedef enum {
41 BPSEC_ASB_HAS_PARAMS = 0x01,
42} BpsecAsbFlag;
43
45typedef struct {
47 int64_t context_id;
49 int64_t type_id;
51
58
61WS_DLL_PUBLIC
62bpsec_id_t * bpsec_id_new(wmem_allocator_t *alloc, int64_t context_id, int64_t type_id);
63
66WS_DLL_PUBLIC
67void bpsec_id_free(wmem_allocator_t *alloc, void *ptr);
68
71WS_DLL_PUBLIC
72gboolean bpsec_id_equal(const void *a, const void *b);
73
76WS_DLL_PUBLIC
77unsigned bpsec_id_hash(const void *key);
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* PACKET_BPSEC_H */
Definition wmem_allocator.h:27
Definition packet-bpv7.h:379
Definition packet-bpsec.h:52
const bp_dissector_data_t * bp
Pointer to containing block/bundle context.
Definition packet-bpsec.h:56
bpsec_id_t id
Specific type being dissected.
Definition packet-bpsec.h:54
Parameter/Result dissector lookup.
Definition packet-bpsec.h:45
int64_t type_id
Parameter/Result ID.
Definition packet-bpsec.h:49
int64_t context_id
Security context ID.
Definition packet-bpsec.h:47