2000-01-24 18:46:45 +00:00
|
|
|
/* packet-isl.c
|
|
|
|
* Routines for Cisco ISL Ethernet header disassembly
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2000-01-24 18:46:45 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-01-24 18:46:45 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-01-24 18:46:45 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-01-24 18:46:45 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-01-24 18:46:45 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2013-11-10 15:59:37 +00:00
|
|
|
#include <epan/exceptions.h>
|
Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
|
|
|
#include <epan/show_exception.h>
|
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
#include "packet-isl.h"
|
2000-02-15 21:06:58 +00:00
|
|
|
#include "packet-eth.h"
|
|
|
|
#include "packet-tr.h"
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2013-12-15 23:44:12 +00:00
|
|
|
void proto_register_isl(void);
|
|
|
|
void proto_reg_handoff_isl(void);
|
|
|
|
|
2000-01-24 18:46:45 +00:00
|
|
|
/*
|
|
|
|
* See
|
|
|
|
*
|
2010-01-05 08:17:09 +00:00
|
|
|
* http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094665.shtml
|
2000-01-24 18:46:45 +00:00
|
|
|
*
|
|
|
|
* and
|
|
|
|
*
|
2010-01-05 08:17:09 +00:00
|
|
|
* http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
|
2004-11-03 20:18:30 +00:00
|
|
|
*
|
2000-01-24 18:46:45 +00:00
|
|
|
* for information on ISL.
|
|
|
|
*/
|
|
|
|
static int proto_isl = -1;
|
|
|
|
static int hf_isl_dst = -1;
|
|
|
|
static int hf_isl_type = -1;
|
|
|
|
static int hf_isl_user_eth = -1;
|
|
|
|
static int hf_isl_user = -1;
|
|
|
|
static int hf_isl_src = -1;
|
2000-03-20 22:22:45 +00:00
|
|
|
static int hf_isl_addr = -1;
|
2000-01-24 18:46:45 +00:00
|
|
|
static int hf_isl_len = -1;
|
|
|
|
static int hf_isl_hsa = -1;
|
2014-08-09 17:43:44 +00:00
|
|
|
static int hf_isl_dsap = -1;
|
|
|
|
static int hf_isl_ssap = -1;
|
|
|
|
static int hf_isl_control = -1;
|
2000-01-24 18:46:45 +00:00
|
|
|
static int hf_isl_vlan_id = -1;
|
|
|
|
static int hf_isl_bpdu = -1;
|
|
|
|
static int hf_isl_index = -1;
|
2013-01-31 17:55:31 +00:00
|
|
|
/* static int hf_isl_crc = -1; */
|
2000-01-24 18:46:45 +00:00
|
|
|
static int hf_isl_src_vlan_id = -1;
|
|
|
|
static int hf_isl_explorer = -1;
|
|
|
|
static int hf_isl_dst_route_descriptor = -1;
|
|
|
|
static int hf_isl_src_route_descriptor = -1;
|
|
|
|
static int hf_isl_fcs_not_incl = -1;
|
|
|
|
static int hf_isl_esize = -1;
|
2004-11-24 09:13:52 +00:00
|
|
|
static int hf_isl_trailer = -1;
|
2000-01-24 18:46:45 +00:00
|
|
|
|
|
|
|
static gint ett_isl = -1;
|
2010-01-05 10:15:11 +00:00
|
|
|
static gint ett_isl_dst = -1;
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2014-10-05 19:57:05 +00:00
|
|
|
#define ISL_HEADER_SIZE 26
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2014-10-05 19:57:05 +00:00
|
|
|
#define TYPE_ETHER 0x0
|
|
|
|
#define TYPE_TR 0x1
|
|
|
|
#define TYPE_FDDI 0x2
|
|
|
|
#define TYPE_ATM 0x3
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2014-10-05 19:57:05 +00:00
|
|
|
#define USER_PRIORITY_NORMAL 0x0
|
|
|
|
#define USER_PRIORITY_1 0x1
|
|
|
|
#define USER_PRIORITY_2 0x2
|
|
|
|
#define USER_PRIORITY_HIGHEST 0x3
|
2010-01-05 10:15:11 +00:00
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
static dissector_handle_t eth_withfcs_handle;
|
2001-01-21 20:16:01 +00:00
|
|
|
static dissector_handle_t tr_handle;
|
2001-11-25 22:51:14 +00:00
|
|
|
static dissector_handle_t data_handle;
|
2001-01-21 20:16:01 +00:00
|
|
|
|
2000-01-24 18:46:45 +00:00
|
|
|
void
|
2002-08-02 23:36:07 +00:00
|
|
|
capture_isl(const guchar *pd, int offset, int len, packet_counts *ld)
|
2000-01-24 18:46:45 +00:00
|
|
|
{
|
|
|
|
guint8 type;
|
|
|
|
|
2001-11-20 21:59:18 +00:00
|
|
|
if (!BYTES_ARE_IN_FRAME(offset, len, ISL_HEADER_SIZE)) {
|
2000-01-24 18:46:45 +00:00
|
|
|
ld->other++;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
type = (pd[offset+5] >> 4)&0x0F;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
|
|
|
case TYPE_ETHER:
|
2014-10-05 19:57:05 +00:00
|
|
|
offset += 14+12; /* skip the header */
|
2001-11-20 21:59:18 +00:00
|
|
|
capture_eth(pd, offset, len, ld);
|
2000-01-24 18:46:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case TYPE_TR:
|
2014-10-05 19:57:05 +00:00
|
|
|
offset += 14+17; /* skip the header */
|
2001-11-20 21:59:18 +00:00
|
|
|
capture_tr(pd, offset, len, ld);
|
2000-01-24 18:46:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
ld->other++;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static const value_string type_vals[] = {
|
2014-10-05 19:57:05 +00:00
|
|
|
{TYPE_ETHER, "Ethernet"},
|
|
|
|
{TYPE_TR, "Token-Ring"},
|
|
|
|
{TYPE_FDDI, "FDDI"},
|
|
|
|
{TYPE_ATM, "ATM"},
|
|
|
|
{0, NULL}
|
2000-01-24 18:46:45 +00:00
|
|
|
};
|
|
|
|
|
2010-01-05 10:15:11 +00:00
|
|
|
static const value_string user_vals[] = {
|
2014-10-05 19:57:05 +00:00
|
|
|
{USER_PRIORITY_NORMAL, "Normal Priority"},
|
|
|
|
{USER_PRIORITY_1, "Priority 1"},
|
|
|
|
{USER_PRIORITY_2, "Priority 2"},
|
|
|
|
{USER_PRIORITY_HIGHEST, "Highest Priority"},
|
|
|
|
{0, NULL}
|
2000-01-24 18:46:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const true_false_string explorer_tfs = {
|
2014-10-05 19:57:05 +00:00
|
|
|
"Explorer frame",
|
|
|
|
"Data frame"
|
2000-01-24 18:46:45 +00:00
|
|
|
};
|
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
void
|
|
|
|
dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len)
|
2000-01-24 18:46:45 +00:00
|
|
|
{
|
2004-11-24 09:13:52 +00:00
|
|
|
proto_tree *volatile fh_tree = NULL;
|
2010-01-05 10:15:11 +00:00
|
|
|
proto_tree *dst_tree;
|
2008-05-15 01:44:53 +00:00
|
|
|
proto_item *ti, *hidden_item;
|
2008-11-22 15:55:01 +00:00
|
|
|
volatile guint8 type;
|
2004-11-24 09:13:52 +00:00
|
|
|
volatile guint16 length;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
gint captured_length;
|
2005-05-30 21:00:05 +00:00
|
|
|
tvbuff_t *volatile payload_tvb = NULL;
|
2004-11-24 09:13:52 +00:00
|
|
|
tvbuff_t *volatile next_tvb;
|
2005-05-30 21:00:05 +00:00
|
|
|
tvbuff_t *volatile trailer_tvb = NULL;
|
2004-11-24 09:13:52 +00:00
|
|
|
const char *saved_proto;
|
Add the "Edit:Protocols..." feature which currently only implements
the following:
It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.
Disabling a protocol could be interesting:
- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)
Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)
I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).
Two functions are added in proto.c :
gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);
and two MACROs which can be used in dissectors:
OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)
See also the XXX in proto_dlg.c and proto.c around the new functions.
svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISL");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2000-01-24 19:26:09 +00:00
|
|
|
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
type = (tvb_get_guint8(tvb, 5) >> 4)&0x0F;
|
2000-01-24 18:46:45 +00:00
|
|
|
|
|
|
|
if (tree) {
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
ti = proto_tree_add_protocol_format(tree, proto_isl, tvb, 0, ISL_HEADER_SIZE,
|
2014-10-05 19:57:05 +00:00
|
|
|
"ISL");
|
2000-01-24 18:46:45 +00:00
|
|
|
fh_tree = proto_item_add_subtree(ti, ett_isl);
|
2010-01-05 10:15:11 +00:00
|
|
|
|
2011-10-20 14:07:54 +00:00
|
|
|
ti = proto_tree_add_item(fh_tree, hf_isl_dst, tvb, 0, 6, ENC_NA);
|
|
|
|
hidden_item = proto_tree_add_item(fh_tree, hf_isl_addr, tvb, 0, 6, ENC_NA);
|
2008-05-15 01:44:53 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
2010-01-05 10:15:11 +00:00
|
|
|
dst_tree = proto_item_add_subtree(ti, ett_isl_dst);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(dst_tree, hf_isl_type, tvb, 5, 1, ENC_BIG_ENDIAN);
|
2010-01-05 10:15:11 +00:00
|
|
|
|
2000-01-24 18:46:45 +00:00
|
|
|
switch (type) {
|
|
|
|
|
|
|
|
case TYPE_ETHER:
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(dst_tree, hf_isl_user_eth, tvb, 5, 1, ENC_BIG_ENDIAN);
|
2000-01-24 18:46:45 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* XXX - the spec appears to indicate that the "User" field is
|
|
|
|
used for TYPE_TR to distinguish between types of packets. */
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(dst_tree, hf_isl_user, tvb, 5, 1, ENC_BIG_ENDIAN);
|
2000-01-24 18:46:45 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-10-20 14:07:54 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_src, tvb, 6, 6, ENC_NA);
|
|
|
|
hidden_item = proto_tree_add_item(fh_tree, hf_isl_addr, tvb, 6, 6, ENC_NA);
|
2008-05-15 01:44:53 +00:00
|
|
|
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|
|
|
|
length = tvb_get_ntohs(tvb, 12);
|
2004-11-24 09:13:52 +00:00
|
|
|
if (tree)
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
proto_tree_add_uint(fh_tree, hf_isl_len, tvb, 12, 2, length);
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
if (length != 0) {
|
|
|
|
/* The length field was set; it's like an 802.3 length field, so
|
|
|
|
treat it similarly, by constructing a tvbuff containing only
|
|
|
|
the data specified by the length field. */
|
|
|
|
|
|
|
|
TRY {
|
2014-06-06 14:35:50 +00:00
|
|
|
payload_tvb = tvb_new_subset_length(tvb, 14, length);
|
2009-08-16 12:36:22 +00:00
|
|
|
trailer_tvb = tvb_new_subset_remaining(tvb, 14 + length);
|
2004-11-24 09:13:52 +00:00
|
|
|
}
|
Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
|
|
|
CATCH_BOUNDS_ERRORS {
|
2004-11-24 09:13:52 +00:00
|
|
|
/* Either:
|
|
|
|
|
2014-10-05 19:57:05 +00:00
|
|
|
the packet doesn't have "length" bytes worth of
|
|
|
|
captured data left in it - or it may not even have
|
|
|
|
"length" bytes worth of data in it, period -
|
|
|
|
so the "tvb_new_subset()" creating "payload_tvb"
|
|
|
|
threw an exception
|
2004-11-24 09:13:52 +00:00
|
|
|
|
|
|
|
or
|
|
|
|
|
2014-10-05 19:57:05 +00:00
|
|
|
the packet has exactly "length" bytes worth of
|
|
|
|
captured data left in it, so the "tvb_new_subset_remaining()"
|
|
|
|
creating "trailer_tvb" threw an exception.
|
2004-11-24 09:13:52 +00:00
|
|
|
|
|
|
|
In either case, this means that all the data in the frame
|
|
|
|
is within the length value, so we give all the data to the
|
|
|
|
next protocol and have no trailer. */
|
|
|
|
payload_tvb = tvb_new_subset(tvb, 14, -1, length);
|
|
|
|
trailer_tvb = NULL;
|
|
|
|
}
|
|
|
|
ENDTRY;
|
|
|
|
} else {
|
|
|
|
/* The length field is 0; make it the length remaining in the packet
|
|
|
|
after the first 14 bytes. */
|
|
|
|
length = tvb_reported_length_remaining(tvb, 14);
|
2009-08-16 12:36:22 +00:00
|
|
|
payload_tvb = tvb_new_subset_remaining(tvb, 14);
|
2004-11-24 09:13:52 +00:00
|
|
|
trailer_tvb = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
2000-01-24 18:46:45 +00:00
|
|
|
/* This part looks sort of like a SNAP-encapsulated LLC header... */
|
2014-12-13 17:52:20 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_dsap, payload_tvb, 0, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(fh_tree, hf_isl_ssap, payload_tvb, 1, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(fh_tree, hf_isl_control, payload_tvb, 2, 1, ENC_BIG_ENDIAN);
|
2000-01-24 18:46:45 +00:00
|
|
|
|
|
|
|
/* ...but this is the manufacturer's ID portion of the source address
|
|
|
|
field (which is, admittedly, an OUI). */
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_hsa, payload_tvb, 3, 3, ENC_BIG_ENDIAN);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|
2010-10-08 17:48:22 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "VLAN ID: %u",
|
2014-10-05 19:57:05 +00:00
|
|
|
tvb_get_ntohs(tvb, 20) >> 1);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (tree) {
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_vlan_id, payload_tvb, 6, 2, ENC_BIG_ENDIAN);
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_bpdu, payload_tvb, 6, 2, ENC_BIG_ENDIAN);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_index, payload_tvb, 8, 2, ENC_BIG_ENDIAN);
|
2000-01-24 19:26:09 +00:00
|
|
|
}
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2000-01-24 19:26:09 +00:00
|
|
|
switch (type) {
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2000-01-24 19:26:09 +00:00
|
|
|
case TYPE_ETHER:
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
/* The length of the encapsulated frame is the length from the
|
|
|
|
header, minus 12 bytes for the part of the ISL header that
|
2004-11-24 09:13:52 +00:00
|
|
|
follows the length. */
|
|
|
|
if (length >= 12) {
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
/* Well, we at least had that much data in the frame. Try
|
|
|
|
dissecting what's left as an Ethernet frame. */
|
2004-11-24 09:13:52 +00:00
|
|
|
length -= 12;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
|
|
|
|
/* Trim the captured length. */
|
2014-06-19 17:18:16 +00:00
|
|
|
captured_length = tvb_length_remaining(payload_tvb, 12);
|
2004-11-24 09:13:52 +00:00
|
|
|
|
|
|
|
/* Make sure it's not bigger than the actual length. */
|
|
|
|
if (captured_length > length)
|
|
|
|
captured_length = length;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
next_tvb = tvb_new_subset(payload_tvb, 12, captured_length, length);
|
2000-12-29 00:51:52 +00:00
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
/* Dissect the payload as an Etherner frame.
|
2000-12-29 00:51:52 +00:00
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
Catch BoundsError and ReportedBoundsError, so that if the
|
|
|
|
reported length of "next_tvb" was reduced by some dissector
|
|
|
|
before an exception was thrown, we can still put in an item
|
|
|
|
for the trailer. */
|
|
|
|
saved_proto = pinfo->current_proto;
|
|
|
|
TRY {
|
|
|
|
/* Frames encapsulated in ISL include an FCS. */
|
|
|
|
call_dissector(eth_withfcs_handle, next_tvb, pinfo, tree);
|
|
|
|
}
|
Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
|
|
|
CATCH_NONFATAL_ERRORS {
|
|
|
|
/* Somebody threw an exception that indicates a problem with
|
|
|
|
the payload, but doesn't indicate anything that would
|
|
|
|
keep us from dissecting the trailer.
|
|
|
|
|
2004-11-24 09:13:52 +00:00
|
|
|
Show the exception, and then drive on to show the trailer,
|
|
|
|
restoring the protocol value that was in effect before we
|
Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
|
|
|
called the subdissector.
|
2014-11-22 21:15:17 +00:00
|
|
|
*/
|
2010-10-08 17:48:22 +00:00
|
|
|
|
2005-01-16 16:06:15 +00:00
|
|
|
show_exception(next_tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
|
2004-11-24 09:13:52 +00:00
|
|
|
pinfo->current_proto = saved_proto;
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|
2004-11-24 09:13:52 +00:00
|
|
|
ENDTRY;
|
|
|
|
|
|
|
|
/* Now add the Ethernet trailer and FCS.
|
|
|
|
XXX - do this only if we're encapsulated in Ethernet? */
|
2010-06-19 01:16:29 +00:00
|
|
|
add_ethernet_trailer(pinfo, tree, fh_tree, hf_isl_trailer, tvb, trailer_tvb, fcs_len);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|
2000-01-24 19:26:09 +00:00
|
|
|
break;
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2000-01-24 19:26:09 +00:00
|
|
|
case TYPE_TR:
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
if (tree) {
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_src_vlan_id, payload_tvb, 10, 2, ENC_BIG_ENDIAN);
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_explorer, payload_tvb, 10, 2, ENC_BIG_ENDIAN);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_dst_route_descriptor, payload_tvb, 12, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(fh_tree, hf_isl_src_route_descriptor, payload_tvb, 14, 2, ENC_BIG_ENDIAN);
|
2004-11-24 09:13:52 +00:00
|
|
|
/* This doesn't appear to be present in at least one capture I've seen. */
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_fcs_not_incl, payload_tvb, 16, 1, ENC_BIG_ENDIAN);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(fh_tree, hf_isl_esize, payload_tvb, 16, 1, ENC_BIG_ENDIAN);
|
Tvbuffify the CDP, CGMP, ISL, and VTP dissectors.
Add a new subdissector table in the LLC dissector for protocol IDs with
a Cisco OUI, and register the CDP, CGMP, and VTMP dissectors in that
table, rather than calling them via a switch statement.
Register the ISL dissector by name, and have the Ethernet dissector call
it via a handle.
Fix the handling of the checksum field in the CDP dissector.
The strings in CDP are counted, not null-terminated; treat them as such.
Fix the handling of the encapsulated frame CRC, and the encapsulated
frame, in the ISL dissector, at least for Ethernet frames; it may not be
correct for encapsulated Token Ring frames.
svn path=/trunk/; revision=2792
2000-12-28 09:49:09 +00:00
|
|
|
}
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(payload_tvb, 17);
|
2001-01-21 20:16:01 +00:00
|
|
|
call_dissector(tr_handle, next_tvb, pinfo, tree);
|
2000-01-24 19:26:09 +00:00
|
|
|
break;
|
2000-01-24 18:46:45 +00:00
|
|
|
|
2000-01-24 19:26:09 +00:00
|
|
|
default:
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(payload_tvb, 12);
|
2004-11-24 09:13:52 +00:00
|
|
|
call_dissector(data_handle, next_tvb, pinfo, tree);
|
2000-01-24 19:26:09 +00:00
|
|
|
break;
|
2000-01-24 18:46:45 +00:00
|
|
|
}
|
|
|
|
}
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2000-01-24 18:46:45 +00:00
|
|
|
void
|
|
|
|
proto_register_isl(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
2014-10-05 19:57:05 +00:00
|
|
|
{ &hf_isl_dst,
|
|
|
|
{ "Destination", "isl.dst", FT_ETHER, BASE_NONE, NULL, 0x0,
|
|
|
|
"Destination Address", HFILL }},
|
|
|
|
{ &hf_isl_type,
|
|
|
|
{ "Type", "isl.type", FT_UINT8, BASE_DEC,
|
|
|
|
VALS(type_vals), 0xF0, NULL, HFILL }},
|
|
|
|
{ &hf_isl_user_eth,
|
|
|
|
{ "User", "isl.user_eth", FT_UINT8, BASE_DEC,
|
|
|
|
VALS(user_vals), 0x03, "Priority while passing through switch", HFILL }},
|
|
|
|
{ &hf_isl_user,
|
|
|
|
{ "User", "isl.user", FT_UINT8, BASE_HEX, NULL, 0x0F,
|
|
|
|
"User-defined bits", HFILL }},
|
|
|
|
{ &hf_isl_src,
|
|
|
|
{ "Source", "isl.src", FT_ETHER, BASE_NONE, NULL, 0x0,
|
|
|
|
"Source Hardware Address", HFILL }},
|
|
|
|
{ &hf_isl_addr,
|
|
|
|
{ "Source or Destination Address", "isl.addr", FT_ETHER, BASE_NONE, NULL, 0x0,
|
|
|
|
"Source or Destination Hardware Address", HFILL }},
|
|
|
|
{ &hf_isl_len,
|
|
|
|
{ "Length", "isl.len", FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
{ &hf_isl_hsa,
|
|
|
|
{ "HSA", "isl.hsa", FT_UINT24, BASE_HEX, NULL, 0x0,
|
|
|
|
"High bits of source address", HFILL }},
|
|
|
|
{ &hf_isl_dsap,
|
|
|
|
{ "DSAP", "isl.dsap", FT_UINT8, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
{ &hf_isl_ssap,
|
|
|
|
{ "SSAP", "isl.ssap", FT_UINT8, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
{ &hf_isl_control,
|
|
|
|
{ "Control", "isl.control", FT_UINT8, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
{ &hf_isl_vlan_id,
|
|
|
|
{ "VLAN ID", "isl.vlan_id", FT_UINT16, BASE_DEC, NULL,
|
|
|
|
0xFFFE, "Virtual LAN ID (Color)", HFILL }},
|
|
|
|
{ &hf_isl_bpdu,
|
|
|
|
{ "BPDU/CDP/VTP", "isl.bpdu", FT_BOOLEAN, 16,
|
|
|
|
TFS(&tfs_yes_no), 0x0001, "BPDU/CDP/VTP indicator", HFILL }},
|
|
|
|
{ &hf_isl_index,
|
|
|
|
{ "Index", "isl.index", FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"Port index of packet source", HFILL }},
|
2013-01-31 17:55:31 +00:00
|
|
|
#if 0
|
2014-10-05 19:57:05 +00:00
|
|
|
{ &hf_isl_crc,
|
|
|
|
{ "CRC", "isl.crc", FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
"CRC field of encapsulated frame", HFILL }},
|
2013-01-31 17:55:31 +00:00
|
|
|
#endif
|
2014-10-05 19:57:05 +00:00
|
|
|
{ &hf_isl_src_vlan_id,
|
|
|
|
{ "Source VLAN ID", "isl.src_vlan_id", FT_UINT16, BASE_DEC, NULL,
|
|
|
|
0xFFFE, "Source Virtual LAN ID (Color)", HFILL }},
|
|
|
|
{ &hf_isl_explorer,
|
|
|
|
{ "Explorer", "isl.explorer", FT_BOOLEAN, 16,
|
|
|
|
TFS(&explorer_tfs), 0x0001, NULL, HFILL }},
|
|
|
|
{ &hf_isl_dst_route_descriptor,
|
|
|
|
{ "Destination route descriptor", "isl.dst_route_desc",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, 0x0,
|
|
|
|
"Route descriptor to be used for forwarding", HFILL }},
|
|
|
|
{ &hf_isl_src_route_descriptor,
|
|
|
|
{ "Source-route descriptor", "isl.src_route_desc",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, 0x0,
|
|
|
|
"Route descriptor to be used for source learning", HFILL }},
|
|
|
|
{ &hf_isl_fcs_not_incl,
|
|
|
|
{ "FCS Not Included", "isl.fcs_not_incl", FT_BOOLEAN, 9,
|
|
|
|
NULL, 0x40, NULL, HFILL }},
|
|
|
|
{ &hf_isl_esize,
|
|
|
|
{ "Esize", "isl.esize", FT_UINT8, BASE_DEC, NULL,
|
|
|
|
0x3F, "Frame size for frames less than 64 bytes", HFILL }},
|
|
|
|
{ &hf_isl_trailer,
|
|
|
|
{ "Trailer", "isl.trailer", FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"Ethernet Trailer or Checksum", HFILL }},
|
2000-01-24 18:46:45 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
2014-10-05 19:57:05 +00:00
|
|
|
&ett_isl,
|
|
|
|
&ett_isl_dst,
|
2000-01-24 18:46:45 +00:00
|
|
|
};
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_isl = proto_register_protocol("Cisco ISL", "ISL", "isl");
|
2000-01-24 18:46:45 +00:00
|
|
|
proto_register_field_array(proto_isl, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
2001-01-21 20:16:01 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_isl(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Get handles for the Ethernet and Token Ring dissectors.
|
|
|
|
*/
|
2004-11-24 09:13:52 +00:00
|
|
|
eth_withfcs_handle = find_dissector("eth_withfcs");
|
2001-01-21 20:16:01 +00:00
|
|
|
tr_handle = find_dissector("tr");
|
2001-11-25 22:51:14 +00:00
|
|
|
data_handle = find_dissector("data");
|
2001-01-21 20:16:01 +00:00
|
|
|
}
|
2014-10-05 19:57:05 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 2
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=2 tabstop=8 expandtab:
|
|
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
|
|
|
*/
|