2 * Routines for the disassembly of the "Nortel Networks / SynOptics Network Management Protocol"
3 * (c) Copyright Giles Scott <giles.scott1 [AT] arubanetworks.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #ifdef HAVE_SYS_TYPES_H
29 #include <sys/types.h>
36 #include <epan/packet.h>
37 #include <epan/nlpid.h>
39 /* Although this protocol is propietary it is documented in the SynOptics MIB's
40 * So I'm not giving anything away :-)
41 * The only thing I have not done is decode the segment identifier;
42 * This changes so much depending on whether the chassis supports
43 * multi-segment autotopology. As the 5000 is now EOL don't see much point.
45 * MIB's s5emt104.mib, s5tcs112.mib, synro199.mib these should be available via
46 * http://www.nortelnetworks.com
51 /* From synro199.mib - SnpxChassisType */
52 static const value_string sonmp_chassis_val[] =
68 {16, "m1032x Ethercell"},
70 {18, "Alcatel Ethernet workgroup conc"},
78 {27, "BayStack100 hub"},
79 {28, "M3000 Fast ethernet"},
82 {32, "Centillion-sixSlot"},
83 {33, "Centillion-twelveSlot"},
84 {34, "Centillion-singleSlot"},
87 {37, "FVC Multimedia Switch"},
92 {42, "Centillion 50"},
93 {43, "Centillion 50tr"},
94 {44, "BayStack 303-304"},
99 {49, "BayStack 303-24T"},
100 {50, "Accelar 1200 L3 switch"},
101 {51, "Accelar 1250 L3 switch"},
102 {52, "Accelar 1100 L3 switch"},
103 {53, "Accelar 1150 L3 switch"},
104 {54, "Accelar 1050 L3 switch"},
105 {55, "Accelar 1051 L3 switch"},
106 {56, "Accelar 8610 L3 switch"},
107 {57, "Accelar 8006"},
108 {58, "Accelar 8010"},
109 {59, "Accelar 8006"},
110 {60, "BayStack 670"},
114 {64, "Business Policy switch 2000"},
115 {65, "Accelar 8110 L2 switch"},
116 {66, "Accelar 8106 L2 switch"},
117 {67, "BayStack 3580"},
118 {68, "Baystack 10 PSU"},
119 {69, "BayStack 420"},
120 {70, "OPTera Metro 1200ESM"},
121 {71, "OPTera 8010co"},
122 {72, "OPTera 8610co L3 switch"},
123 {73, "OPTera 8110co L2 switch"},
125 {75, "OPTera 8603 L3 switch"},
126 {76, "OPTera 8103 L2 switch"},
127 {77, "Baystack 380 10/100/1000 switch"},
128 {78, "Baystack 470 10/100 switch"},
129 {79, "OPTera Metro 1450ESM"},
130 {80, "OPTera Metro 1400ESM"},
131 {81, "Alteon switch family"},
132 {82, "BayStack 460-24T-PWR"},
133 {83, "OPTera Metro 8010 OPM L2 Switch"},
134 {84, "OPTera Metro 8010co OPM L2 Switch"},
135 {85, "OPTera Metro 8006 OPM L2 Switch"},
136 {86, "OPTera Metro 8003 OPM L2 Switch"},
141 {91, "Passport 1424 L3 switch"},
142 {92, "Passport 1648 L3 switch"},
143 {93, "Passport 1612 L3 switch"},
144 {94, "Passport 1624 L3 switch"},
145 {95, "BayStack 380-24F Fiber 1000 switch"},
146 {96, "BayStack 4700 24T switch"},
147 {97, "BayStack 4700 48T switch"},
148 {98, "BayStack 5510 24-port"},
149 {99, "BayStack 2200 Wireless LAN AP"},
150 {100, "Passport RBS 2402 L3 switch"},
151 {101, "Alteon AAS 2424"},
152 {102, "Alteon AAS 2224"},
153 {103, "Alteon AAS 2208"},
154 {104, "Alteon AAS 2216"},
155 {105, "Alteon AAS 3408"},
156 {106, "Alteon AAS 3416"},
157 {107, "WLAN SecuritySwitch 2250"},
158 {108, "BayStack 425 48-port"},
159 {109, "Baystack 425 24-port"},
160 {110, "WLAN AP 2221"},
164 /* from synro179.mib - SnpxBackplaneType */
165 static const value_string sonmp_backplane_val[] =
169 {3, "ethernet and tokenring"},
170 {4, "ethernet and FDDI"},
171 {5, "ethernet, tokenring and FDDI"},
172 {6, "ethernet and tokenring with redundant power"},
173 {7, "ethernet, tokenring, FDDI with redundant power"},
175 {9, "ethernet, tokenring and fast ethernet"},
176 {10, "ethernet and fast ethernet"},
177 {11, "ethernet, tokenring, fast ethernet with redundant power"},
178 {12, "ethernet, fast ethernet and gigabit ethernet"},
182 static const value_string sonmp_nmm_state_val[] =
184 {1, "Topology Change"},
191 /* Offsets in SONMP NMM Hello structure. */
192 #define SONMP_IP_ADDRESS 0
193 #define SONMP_SEGMENT_IDENTIFIER 4
194 #define SONMP_CHASSIS_TYPE 7
195 #define SONMP_BACKPLANE_TYPE 8
196 #define SONMP_NMM_STATE 9
197 #define SONMP_NUMBER_OF_LINKS 10
199 static int proto_sonmp = -1;
200 static int hf_sonmp_ip_address = -1;
201 static int hf_sonmp_segment_identifier = -1;
202 static int hf_sonmp_chassis_type = -1;
203 static int hf_sonmp_backplane_type = -1;
204 static int hf_sonmp_nmm_state = -1;
205 static int hf_sonmp_number_of_links = -1;
207 static gint ett_sonmp = -1;
211 dissect_sonmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
213 const char *hello_type;
214 proto_tree *sonmp_tree = NULL;
217 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SONMP");
219 if (check_col(pinfo->cinfo, COL_INFO)) {
221 if (pinfo->dl_dst.type == AT_ETHER) {
222 const guint8 *dstmac = pinfo->dl_dst.data;
227 hello_type = "Segment ";
231 hello_type = "FlatNet ";
235 col_add_fstr(pinfo->cinfo, COL_INFO, "SONMP - %sHello",
240 ti = proto_tree_add_protocol_format(tree, proto_sonmp, tvb, 0, 11,
241 "Nortel Networks / SynOptics Network Management Protocol");
242 sonmp_tree = proto_item_add_subtree(ti, ett_sonmp);
244 proto_tree_add_item(sonmp_tree, hf_sonmp_ip_address, tvb,
245 SONMP_IP_ADDRESS, 4, FALSE);
248 proto_tree_add_item(sonmp_tree, hf_sonmp_segment_identifier, tvb,
249 SONMP_SEGMENT_IDENTIFIER, 3, FALSE);
252 proto_tree_add_item(sonmp_tree, hf_sonmp_chassis_type, tvb,
253 SONMP_CHASSIS_TYPE, 1, FALSE);
255 proto_tree_add_item(sonmp_tree, hf_sonmp_backplane_type, tvb,
256 SONMP_BACKPLANE_TYPE, 1, FALSE);
259 proto_tree_add_item(sonmp_tree, hf_sonmp_nmm_state, tvb,
260 SONMP_NMM_STATE, 1, FALSE);
262 proto_tree_add_item(sonmp_tree, hf_sonmp_number_of_links, tvb,
263 SONMP_NUMBER_OF_LINKS, 1, FALSE);
272 proto_register_sonmp(void)
274 static hf_register_info hf[] = {
275 { &hf_sonmp_ip_address,
276 { "NMM IP address", "sonmp.ipaddress", FT_IPv4, BASE_NONE, NULL, 0x0,
277 "IP address of the agent (NMM)", HFILL }},
279 { &hf_sonmp_segment_identifier,
280 { "Segment Identifier", "sonmp.segmentident", FT_UINT24, BASE_HEX, NULL, 0x0,
281 "Segment id of the segment from which the agent is sending the topology message", HFILL }},
283 { &hf_sonmp_chassis_type,
284 { "Chassis type", "sonmp.chassis", FT_UINT8, BASE_DEC,
285 VALS(sonmp_chassis_val), 0x0,
286 "Chassis type of the agent sending the topology message", HFILL }},
288 { &hf_sonmp_backplane_type,
289 { "Backplane type", "sonmp.backplane", FT_UINT8, BASE_DEC,
290 VALS(sonmp_backplane_val), 0x0,
291 "Backplane type of the agent sending the topology message", HFILL }},
293 { &hf_sonmp_nmm_state,
294 { "NMM state", "sonmp.nmmstate", FT_UINT8, BASE_DEC,
295 VALS(sonmp_nmm_state_val), 0x0,
296 "Current state of this agent", HFILL }},
298 { &hf_sonmp_number_of_links,
299 { "Number of links", "sonmp.numberoflinks", FT_UINT8, BASE_DEC, NULL, 0x0,
300 "Number of interconnect ports", HFILL }},
303 static gint *ett[] = {
306 proto_sonmp = proto_register_protocol("Nortel SONMP", "SONMP", "sonmp");
307 proto_register_field_array(proto_sonmp, hf, array_length(hf));
308 proto_register_subtree_array(ett, array_length(ett));
310 register_dissector("sonmp", dissect_sonmp, proto_sonmp);
314 proto_reg_handoff_sonmp(void)
316 dissector_handle_t sonmp_handle;
318 sonmp_handle = find_dissector("sonmp");
320 dissector_add("llc.nortel_pid", 0x01a1, sonmp_handle); /* flatnet hello */
321 dissector_add("llc.nortel_pid", 0x01a2, sonmp_handle); /* Segment hello */
322 /* not got round to adding this but its really old, so I'm not sure people will see it */
323 /* it uses a different packet format */
324 /* dissector_add("llc.nortel_pid", 0x01a3, sonmp_handle); */ /* Bridge hello */