2 * Routines for Wellfleet BOFL dissection
3 * Wellfleet -> Baynetworks -> Nortel -> Avaya -> Extremenetworks
4 * Protocol is now called Simple Loop Protection Protocol (SLPP)
5 * Author: Endoh Akira (endoh@netmarks.co.jp)
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@unicom.net>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
13 * The following information was copied from
14 * http://web.archive.org/web/20150608035209/http://www.protocols.com/pbook/bridge.htm#WellfleetBOFL
16 * The Wellfleet Breath of Life (BOFL) protocol is used as a line sensing
19 * - Ethernet LANs to detect transmitter jams.
20 * - Synchronous lines running WFLT STD protocols to determine if the line
22 * - Dial backup PPP lines.
24 * The frame format of Wellfleet BOFL is shown following the Ethernet header
25 * in the following illustration:
27 * Destination Source 8102 PDU Sequence Padding
31 /* From the above link:
35 * The Wellfleet Breath of Life (BOFL) protocol is used as a line sensing protocol on:
37 * Ethernet LANs to detect transmitter jams.
38 * Synchronous lines running WFLT STD protocols to determine if the line is up.
39 * Dial backup PPP lines.
40 * The frame format of Wellfleet BOFL is shown following the Ethernet header in the following illustration:
42 * Destination | Source |8102 | PDU | Sequence | Padding
43 * 6 | 6 | 2 | 4 | 4 | n bytes
44 * <-------------------------->
48 * EtherType (0x8102 for Wellfleet BOFL frames).
51 * PDU field normally equals 0x01010000, but may equal 0x01011111 in some new releases on synchronous links.
54 * 4-byte sequence field is an incremental counter.
57 * Padding to fill out the frame to 64 bytes.
62 #include <epan/packet.h>
64 #define ETHER_TYPE_SLPP 0x8102
65 #define BOFL_MIN_LEN 8
67 void proto_register_bofl(void);
68 void proto_reg_handoff_bofl(void);
70 static dissector_handle_t bofl_handle
;
72 /* Initialize the protocol and registered fields */
73 static int proto_bofl
;
74 static int hf_bofl_pdu
;
75 static int hf_bofl_sequence
;
76 static int hf_bofl_padding
;
78 /* Initialize the subtree pointers */
81 /* Code to actually dissect the packets */
83 dissect_bofl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
86 proto_tree
*bofl_tree
;
88 uint32_t pdu
, sequence
;
90 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "BOFL");
92 col_clear(pinfo
->cinfo
, COL_INFO
);
94 ti
= proto_tree_add_item(tree
, proto_bofl
, tvb
, 0, -1, ENC_NA
);
95 bofl_tree
= proto_item_add_subtree(ti
, ett_bofl
);
97 pdu
= tvb_get_ntohl(tvb
, 0);
98 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
100 proto_tree_add_uint(bofl_tree
, hf_bofl_pdu
, tvb
, 0, 4, pdu
);
102 sequence
= tvb_get_ntohl(tvb
, 4);
104 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
105 " Sequence: %u", sequence
);
107 proto_tree_add_uint(bofl_tree
, hf_bofl_sequence
, tvb
, 4, 4, sequence
);
109 len
= tvb_reported_length_remaining(tvb
, 8);
111 proto_tree_add_item(bofl_tree
, hf_bofl_padding
, tvb
, 8, -1, ENC_NA
);
113 return tvb_captured_length(tvb
);
118 proto_register_bofl(void)
120 static hf_register_info hf
[] = {
123 FT_UINT32
, BASE_HEX
, NULL
, 0,
124 "PDU; normally equals 0x01010000 or 0x01011111", HFILL
}
127 { "Sequence", "bofl.sequence",
128 FT_UINT32
, BASE_DEC
, NULL
, 0,
129 "incremental counter", HFILL
}
132 { "Padding", "bofl.padding",
133 FT_BYTES
, BASE_NONE
, NULL
, 0,
138 static int *ett
[] = {
142 proto_bofl
= proto_register_protocol("Wellfleet Breath of Life",
144 proto_register_field_array(proto_bofl
, hf
, array_length(hf
));
145 proto_register_subtree_array(ett
, array_length(ett
));
147 bofl_handle
= register_dissector("bofl", dissect_bofl
, proto_bofl
);
152 proto_reg_handoff_bofl(void)
154 dissector_add_uint("ethertype", ETHER_TYPE_SLPP
, bofl_handle
);
158 * Editor modelines - https://www.wireshark.org/tools/modelines.html
163 * indent-tabs-mode: nil
166 * vi: set shiftwidth=4 tabstop=8 expandtab:
167 * :indentSize=4:tabSize=8:noTabs=true: