Coverage Report

Created: 2025-08-04 07:15

/src/wireshark/epan/dissectors/packet-cisco-oui.c
Line
Count
Source
1
/* packet-cisco-oui.c
2
 * Register an LLC dissector table for Cisco's OUI 00:00:0c
3
 *
4
 * Wireshark - Network traffic analyzer
5
 * By Gerald Combs <gerald@wireshark.org>
6
 * Copyright 1998 Gerald Combs
7
 *
8
 * SPDX-License-Identifier: GPL-2.0-or-later
9
 */
10
11
#include "config.h"
12
13
#include <epan/packet.h>
14
#include "packet-llc.h"
15
#include <epan/oui.h>
16
#include <epan/cisco_pid.h>
17
18
void proto_register_cisco_pid(void);
19
20
static int hf_llc_cisco_pid;
21
22
/*
23
 * See various Cisco documents, including
24
 *
25
 *  http://docstore.mik.ua/univercd/cc/td/doc/product/lan/trsrb/vlan.htm
26
 *
27
 *  http://docstore.mik.ua/univercd/cc/td/doc/product/lan/trsrb/frames.htm
28
 *
29
 *  http://web.archive.org/web/20110407152854/http://www.cisco.com/en/US/products/hw/switches/ps663/products_tech_note09186a0080094713.shtml
30
 *
31
 * for various PID values - and for a DRIP frame format.
32
 */
33
static const value_string cisco_pid_vals[] = {
34
  { CISCO_PID_DRIP,   "DRIP" },
35
  { CISCO_PID_PAGP,   "PAgP" },       /* Port Aggregation Protocol */
36
  { CISCO_PID_MLS_HELLO,    "MLS Hello" },  /* from a mail message found on the Web */
37
  { CISCO_PID_RLQ_REQ,    "RLQ BPDUs (request)" }, /* Root Link Query, see Bug: 12772 */
38
  { CISCO_PID_RLQ_RESP,   "RLQ BPDUs (response)" }, /* Root Link Query, see Bug: 12772 */
39
  { CISCO_PID_PVSTPP,   "PVSTP+" },     /* Per-VLAN Spanning Tree Protocol */
40
  { CISCO_PID_VLAN_BRIDGE,  "VLAN Bridge" },
41
  { CISCO_PID_UDLD,   "UDLD" },       /* Unidirectional Link Detection */
42
  { CISCO_PID_MCP,    "MCP" },        /* MisCabling Protocol */
43
  { CISCO_PID_CDP,    "CDP" },
44
  { CISCO_PID_CGMP,   "CGMP" },
45
  { CISCO_PID_VTP,    "VTP" },
46
  { CISCO_PID_DTP,    "DTP" },        /* Dynamic Trunking Protocol */
47
  { CISCO_PID_STP_UL_FAST,  "STP Uplink Fast" },
48
49
  { 0,    NULL }
50
};
51
52
/*
53
 * NOTE: there's no dissector here, just registration routines to set
54
 * up the dissector table for the Cisco OUI.
55
 */
56
void
57
proto_register_cisco_pid(void)
58
14
{
59
14
  static hf_register_info hf[] = {
60
14
    { &hf_llc_cisco_pid,
61
14
    { "PID",  "llc.cisco_pid",  FT_UINT16, BASE_HEX,
62
14
      VALS(cisco_pid_vals), 0x0, "Protocol ID", HFILL }
63
14
    }
64
14
  };
65
66
14
  llc_add_oui(OUI_CISCO, "llc.cisco_pid", "LLC Cisco OUI PID", hf, -1);
67
14
}
68
69
/*
70
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
71
 *
72
 * Local variables:
73
 * c-basic-offset: 8
74
 * tab-width: 8
75
 * indent-tabs-mode: t
76
 * End:
77
 *
78
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
79
 * :indentSize=8:tabSize=8:noTabs=false:
80
 */