attr_dissector_fn_t
[wireshark-sm.git] / wiretap / secrets-types.c
blobcaae63271724697701a84fec6a69f531dbf57a74
1 /* wtap_opttypes.c
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 2001 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 #include "config.h"
11 #include "secrets-types.h"
13 const char* secrets_type_description(uint32_t type)
15 #if 0
16 /* value_string from file-pcapng.c
17 * XXX: value_string is defined in epan. Perhaps some of the
18 * functions (not the ones that allocate in wmem_packet_scope())
19 * should be moved to wsutil so that other libraries can use them
20 * (capinfos, etc. don't link with libwireshark).
22 static const value_string secrets_types_vals[] = {
23 { SECRETS_TYPE_TLS, "TLS Key Log" },
24 { SECRETS_TYPE_SSH, "SSH Key Log" },
25 { SECRETS_TYPE_WIREGUARD, "WireGuard Key Log" },
26 { SECRETS_TYPE_ZIGBEE_NWK_KEY, "Zigbee NWK Key" },
27 { SECRETS_TYPE_ZIGBEE_APS_KEY, "Zigbee APS Key" },
28 { SECRETS_TYPE_OPCUA, "OPC UA Key Log" },
29 { 0, NULL }
31 return val_to_str_const(type, secrets_types_vals, "Unknown");
32 #endif
33 switch (type) {
34 case SECRETS_TYPE_TLS:
35 return "TLS Key Log";
36 case SECRETS_TYPE_SSH:
37 return "SSH Key Log";
38 case SECRETS_TYPE_WIREGUARD:
39 return "WireGuard Key Log";
40 case SECRETS_TYPE_ZIGBEE_NWK_KEY:
41 return "Zigbee NWK Key";
42 case SECRETS_TYPE_ZIGBEE_APS_KEY:
43 return "Zigbee APS Key";
44 case SECRETS_TYPE_OPCUA:
45 return "OPC UA Key Log";
46 default:
47 return "Unknown";