Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-mctp.h
1/* packet-mctp.c
2 * Definitions for Management Component Transport Protocol (MCTP) packet
3 * disassembly
4 * Copyright 2022, Jeremy Kerr <jk@codeconstruct.com.au>
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef __PACKET_MCTP_H__
14#define __PACKET_MCTP_H__
15
16#include <epan/expert.h>
17
18/* MCTP type values (DSP0239 1.12.0 Table 1, "MCTP Message Types") */
19
20#define MCTP_TYPE_CONTROL 0
21#define MCTP_TYPE_PLDM 1
22#define MCTP_TYPE_NCSI 2
23#define MCTP_TYPE_ETHERNET 3
24#define MCTP_TYPE_NVME 4
25#define MCTP_TYPE_SPDM 5
26#define MCTP_TYPE_SECURED 6
27#define MCTP_TYPE_CXL_FM 7
28#define MCTP_TYPE_CXL_CCI 8
29#define MCTP_TYPE_PCIE_MI 9
30#define MCTP_TYPE_VDM_PCI 0x7e
31#define MCTP_TYPE_VDM_IANA 0x7f
32
33typedef enum {
34 MCTP_SCOPE_NONE = 0, /* no capture-domain identity */
35 MCTP_SCOPE_I2C_BUS, /* the binding's physical bus (DSP0236 8.3) */
36 MCTP_SCOPE_INTERFACE, /* the pcapng interface */
37} mctp_scope_kind; /* EIDs are unique per network only (DSP0236 3) */
38
39typedef struct {
40 uint32_t kind; /* mctp_scope_kind */
41 uint32_t section; /* pcapng section; interface IDs are per section */
42 uint32_t value; /* bus number or interface ID, per kind */
43 uint32_t interface_id_valid;
44 uint32_t interface_id; /* the record's interface; a bus number refines it */
45} mctp_ingress_scope; /* message and transaction key material */
46
47typedef struct {
48 bool has_ingress_scope;
49 uint32_t ingress_scope_kind;
50 uint32_t ingress_scope_value;
51 bool drop_from_assembly;
52} mctp_dissector_data; /* optional binding-to-MCTP dissector data */
53
54void mctp_ingress_scope_get(const packet_info *pinfo,
55 mctp_ingress_scope *scope);
56
57/* The 7-bit SMBus/I2C slave address packet-mctp-smbus.c put in addr. */
58bool mctp_smbus_slave_addr(const address *addr, uint8_t *slave);
59
60#endif /* __PACKET_MCTP_H__ */
struct _address address
Holds a network or link-layer address of any supported type.
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
Definition packet-mctp.h:47
Definition packet-mctp.h:39