Coverage Report

Created: 2025-12-27 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-romon.c
Line
Count
Source
1
/* packet-romon.c
2
 * Routines for Mikrotik RoMON dissection
3
 *
4
 * Wireshark - Network traffic analyzer
5
 * By Gerald Combs <gerald@wireshark.org>
6
 * Copyright 2003 Gerald Combs
7
 *
8
 * SPDX-License-Identifier: GPL-2.0-or-later
9
 */
10
#include "config.h"
11
12
#include <epan/packet.h>
13
14
void proto_register_romon(void);
15
void proto_reg_handoff_romon(void);
16
17
static dissector_handle_t romon_handle;
18
19
/* Initialize the protocol and registered fields */
20
static int proto_romon;
21
22
/* Initialize the subtree pointers */
23
static int ett_romon;
24
25
/* Code to actually dissect the packets */
26
static int
27
dissect_romon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
28
5
{
29
5
  col_set_str(pinfo->cinfo, COL_PROTOCOL, "RoMON");
30
5
  col_clear(pinfo->cinfo, COL_INFO);
31
32
5
  proto_tree_add_item(tree, proto_romon, tvb, 0, -1, ENC_NA);
33
34
5
  return tvb_captured_length(tvb);
35
5
}
36
37
38
void
39
proto_register_romon(void)
40
14
{
41
14
  static int *ett[] = {
42
14
    &ett_romon,
43
14
  };
44
45
14
  proto_romon = proto_register_protocol("Mikrotik RoMON", "RoMON", "romon");
46
14
  proto_register_subtree_array(ett, array_length(ett));
47
48
14
  romon_handle = register_dissector("romon", dissect_romon, proto_romon);
49
14
}
50
51
52
void
53
proto_reg_handoff_romon(void)
54
14
{
55
14
  dissector_add_uint("ethertype", 0x88bf, romon_handle);
56
14
}
57
58
/*
59
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
60
 *
61
 * Local variables:
62
 * c-basic-offset: 8
63
 * tab-width: 8
64
 * indent-tabs-mode: t
65
 * End:
66
 *
67
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
68
 * :indentSize=8:tabSize=8:noTabs=false:
69
 */