2000-04-15 22:11:26 +00:00
|
|
|
/* packet-esis.c
|
|
|
|
* Routines for ISO/OSI End System to Intermediate System
|
2001-08-13 00:56:18 +00:00
|
|
|
* Routing Exchange Protocol ISO 9542.
|
2000-04-15 22:11:26 +00:00
|
|
|
*
|
2001-08-13 00:56:18 +00:00
|
|
|
* $Id: packet-esis.c,v 1.17 2001/08/13 00:56:18 sharpe Exp $
|
2000-04-15 22:11:26 +00:00
|
|
|
* Ralf Schneider <Ralf.Schneider@t-online.de>
|
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
2001-06-05 09:06:19 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
2000-04-15 22:11:26 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <glib.h>
|
|
|
|
#include "packet.h"
|
|
|
|
#include "nlpid.h"
|
|
|
|
#include "packet-osi.h"
|
|
|
|
#include "packet-osi-options.h"
|
|
|
|
#include "packet-esis.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* esis base header */
|
|
|
|
static int proto_esis = -1;
|
|
|
|
|
|
|
|
static int hf_esis_nlpi = -1;
|
|
|
|
static int hf_esis_length = -1;
|
|
|
|
static int hf_esis_version = -1;
|
|
|
|
static int hf_esis_reserved = -1;
|
|
|
|
static int hf_esis_type = -1;
|
|
|
|
static int hf_esis_holdtime = -1;
|
|
|
|
static int hf_esis_checksum = -1;
|
|
|
|
|
|
|
|
static gint ett_esis = -1;
|
|
|
|
static gint ett_esis_area_addr = -1;
|
|
|
|
|
|
|
|
static const value_string esis_vals[] = {
|
|
|
|
{ ESIS_ESH_PDU, "ES HELLO"},
|
|
|
|
{ ESIS_ISH_PDU, "IS HELLO"},
|
|
|
|
{ ESIS_RD_PDU, "RD REQUEST"},
|
|
|
|
{ 0, NULL} };
|
|
|
|
|
|
|
|
/* internal prototypes */
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
static void esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb,
|
|
|
|
packet_info *pinfo, proto_tree *treepd);
|
|
|
|
static void esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb,
|
|
|
|
packet_info *pinfo, proto_tree *tree);
|
|
|
|
static void esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb,
|
|
|
|
packet_info *pinfo, proto_tree *tree);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
/* ################## Descriptions ###########################################*/
|
|
|
|
/* Parameters for the ESH PDU
|
|
|
|
* Source Address Parameter:
|
|
|
|
*
|
|
|
|
* Octet: Length: Parameter Type:
|
|
|
|
* 10 1 Number of Source Adresses ( NSAPs served by this Network
|
|
|
|
* 11 1 Source Address Length Indicator ( SAL ) # Entity )
|
|
|
|
* 12-m-1 variable Source Address ( NSAP )
|
|
|
|
* m Options, dissected in osi.c
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Parameter for the ISH PDU:
|
|
|
|
* Network Entity Title Parameter:
|
|
|
|
*
|
|
|
|
* Octet: Length: Parameter Type:
|
|
|
|
* 10 1 Network Entity Title Length Indicator ( NETL )
|
|
|
|
* 11-m-1 variable Network Entity Title ( NET )
|
|
|
|
* m Options, dissected in osi.c
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Parameter for the RD PDU:
|
|
|
|
* When re-directed to an IS:
|
|
|
|
*
|
|
|
|
* Octet: Length: Parameter Type:
|
|
|
|
* 10 1 Destination Address Length Indicator ( DAL )
|
|
|
|
* 11>m-1 variable Destination Address ( DA )
|
|
|
|
* m 1 Subnetwork Address Length Indicator ( BSNPAL )
|
|
|
|
* m+1>n-1 variable Subnetwork Address ( BSNPA )
|
|
|
|
* n 1 Network Entity Title Length Indicator ( NETL )
|
|
|
|
* n+1>p-1 variable Network Entity Title ( NET )
|
|
|
|
* p Options, dissected in osi.c
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Parameter for the RD PDU:
|
|
|
|
* When re-directed to an ES:
|
|
|
|
*
|
|
|
|
* Octet: Length: Parameter Type:
|
|
|
|
* 10 1 Destination Address Length Indicator ( DAL )
|
|
|
|
* 11>m-1 variable Destination Address ( DA )
|
|
|
|
* m 1 Subnetwork Address Length Indicator ( BSNPAL )
|
|
|
|
* m+1>n-1 variable Subnetwork Address ( BSNPA )
|
|
|
|
* n 1 Network Entity Title Length Indicator ( NETL ) == 0
|
|
|
|
* n+1 Options, dissected in osi.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ############################ Tool Functions ############################## */
|
|
|
|
|
|
|
|
|
|
|
|
/* ############################## Dissection Functions ###################### */
|
|
|
|
/*
|
|
|
|
* Name: dissect_esis_unknown()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* There was some error in the protocol and we are in unknown space
|
|
|
|
* here. Add a tree item to cover the error and go on. Note
|
|
|
|
* that we make sure we don't go off the end of the bleedin packet here!
|
|
|
|
*
|
|
|
|
* This is just a copy of isis.c and isis.h, so I keep the stuff also
|
|
|
|
* and adapt the names to cover possible protocol errors! Ive really no
|
|
|
|
* idea wether I need this or not.
|
|
|
|
*
|
|
|
|
* Input
|
|
|
|
* int offset : Current offset into packet data.
|
|
|
|
* int len : length of to dump.
|
|
|
|
* proto_tree * : tree of display data. May be NULL.
|
|
|
|
* frame_data * fd : frame data
|
|
|
|
* char * : format text
|
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void (may modify proto tree)
|
|
|
|
*/
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
static void
|
|
|
|
esis_dissect_unknown( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *fmat, ...){
|
2000-04-15 22:11:26 +00:00
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmat);
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text_valist(tree, tvb, 0, tvb_length(tvb), fmat, ap);
|
2000-04-15 22:11:26 +00:00
|
|
|
va_end(ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
static void
|
|
|
|
esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *tree) {
|
2000-04-15 22:11:26 +00:00
|
|
|
proto_tree *esis_area_tree;
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
int offset = 0;
|
2000-04-15 22:11:26 +00:00
|
|
|
int no_sa = 0;
|
|
|
|
int sal = 0;
|
|
|
|
|
|
|
|
proto_item *ti;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
offset += ESIS_HDR_FIXED_LENGTH;
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
no_sa = tvb_get_guint8(tvb, offset);
|
2000-04-15 22:11:26 +00:00
|
|
|
len -= 1;
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
ti = proto_tree_add_text( tree, tvb, offset, tvb_length_remaining(tvb, offset),
|
2000-04-15 22:11:26 +00:00
|
|
|
"Number of Source Addresses (SA, Format: NSAP) : %u", no_sa );
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
offset++;
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
esis_area_tree = proto_item_add_subtree( ti, ett_esis_area_addr );
|
|
|
|
while ( no_sa-- > 0 ) {
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
sal = (int) tvb_get_guint8(tvb, offset);
|
|
|
|
offset++;
|
|
|
|
proto_tree_add_text(esis_area_tree, tvb, offset, 1, "SAL: %2u Octets", sal);
|
|
|
|
proto_tree_add_text(esis_area_tree, tvb, offset + 1, sal,
|
|
|
|
" SA: %s",
|
|
|
|
print_nsap_net( tvb_get_ptr(tvb, offset, sal), sal ) );
|
2000-04-15 22:11:26 +00:00
|
|
|
offset += sal;
|
|
|
|
len -= ( sal + 1 );
|
|
|
|
}
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
dissect_osi_options( PDU_TYPE_ESIS_ESH, len, tvb, offset, pinfo, tree );
|
2000-04-15 22:11:26 +00:00
|
|
|
}
|
|
|
|
} /* esis_dissect_esh_pdu */ ;
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
static void
|
|
|
|
esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *tree) {
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
int offset = 0;
|
2000-04-15 22:11:26 +00:00
|
|
|
int netl = 0;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
offset += ESIS_HDR_FIXED_LENGTH;
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
netl = (int) tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_text( tree, tvb, offset, netl + 1,
|
2000-04-15 22:11:26 +00:00
|
|
|
"### Network Entity Titel Section ###");
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset++, 1, "NETL: %2u Octets", netl);
|
|
|
|
proto_tree_add_text( tree, tvb, offset, netl,
|
|
|
|
" NET: %s",
|
|
|
|
print_nsap_net( tvb_get_ptr(tvb, offset, netl), netl ) );
|
2000-04-15 22:11:26 +00:00
|
|
|
offset += netl;
|
|
|
|
len -= ( netl + 1 );
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
dissect_osi_options( PDU_TYPE_ESIS_ISH, len, tvb, offset, pinfo, tree );
|
2000-04-15 22:11:26 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
static void
|
|
|
|
esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *tree) {
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
int offset = 0;
|
2000-04-15 22:11:26 +00:00
|
|
|
int tmpl = 0;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
offset += ESIS_HDR_FIXED_LENGTH;
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tmpl = (int) tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_text( tree, tvb, offset, tmpl + 1,
|
2000-04-15 22:11:26 +00:00
|
|
|
"### Destination Address Section ###" );
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset++, 1, "DAL: %2u Octets", tmpl);
|
|
|
|
proto_tree_add_text( tree, tvb, offset, tmpl,
|
|
|
|
" DA : %s",
|
|
|
|
print_nsap_net( tvb_get_ptr(tvb, offset, tmpl), tmpl ) );
|
2000-04-15 22:11:26 +00:00
|
|
|
offset += tmpl;
|
|
|
|
len -= ( tmpl + 1 );
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tmpl = (int) tvb_get_guint8(tvb, offset);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset, tmpl + 1,
|
2000-04-15 22:11:26 +00:00
|
|
|
"### Subnetwork Address Section ###");
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset++, 1, "BSNPAL: %2u Octets", tmpl);
|
|
|
|
proto_tree_add_text( tree, tvb, offset, tmpl,
|
|
|
|
" BSNPA: %s",
|
|
|
|
print_system_id( tvb_get_ptr(tvb, offset, tmpl), tmpl ) );
|
2000-04-15 22:11:26 +00:00
|
|
|
offset += tmpl;
|
|
|
|
len -= ( tmpl + 1 );
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tmpl = (int) tvb_get_guint8(tvb, offset);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
if ( 0 == tmpl ) {
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset, 1,
|
2000-04-15 22:11:26 +00:00
|
|
|
"### No Network Entity Title Section ###" );
|
|
|
|
offset++;
|
|
|
|
len--;
|
|
|
|
}
|
|
|
|
else {
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset, 1,
|
2000-04-15 22:11:26 +00:00
|
|
|
"### Network Entity Title Section ###" );
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_text( tree, tvb, offset++, 1, "NETL: %2u Octets", tmpl );
|
|
|
|
proto_tree_add_text( tree, tvb, offset, tmpl,
|
|
|
|
" NET: %s",
|
|
|
|
print_nsap_net( tvb_get_ptr(tvb, offset, tmpl), tmpl ) );
|
2000-04-15 22:11:26 +00:00
|
|
|
offset += tmpl;
|
|
|
|
len -= ( tmpl + 1 );
|
|
|
|
}
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
dissect_osi_options( PDU_TYPE_ESIS_RD, len, tvb, offset, pinfo, tree );
|
2000-04-15 22:11:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: dissect_esis()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Main entry area for esis de-mangling. This will build the
|
|
|
|
* main esis tree data and call the sub-protocols as needed.
|
|
|
|
*
|
|
|
|
* Input:
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
* tvbuff * : tvbuff referring to packet data
|
2000-04-15 22:11:26 +00:00
|
|
|
* frame_data * : frame data (whole packet with extra info)
|
|
|
|
* proto_tree * : tree of display data. May be NULL.
|
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, but we will add to the proto_tree if it is not NULL.
|
|
|
|
*/
|
2000-04-17 01:36:31 +00:00
|
|
|
static void
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
2000-04-15 22:11:26 +00:00
|
|
|
char *pdu_type_string = NULL;
|
|
|
|
char *pdu_type_format_string = "PDU Type : %s (R:%s%s%s)";
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
esis_hdr_t ehdr;
|
2000-04-15 22:11:26 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *esis_tree = NULL;
|
|
|
|
int variable_len = 0;
|
|
|
|
u_int tmp_uint = 0;
|
2001-06-05 09:06:19 +00:00
|
|
|
char *cksum_status;
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
if (check_col(pinfo->fd, COL_PROTOCOL))
|
2000-11-19 08:54:37 +00:00
|
|
|
col_set_str(pinfo->fd, COL_PROTOCOL, "ESIS");
|
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.
Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.
Don't use
col_add_fstr(..., "%s", string);
Use
col_add_str(..., string);
as it does the same thing, but doesn't drag all the heavy *printf
machinery in.
Fix the DDTP dissector to set the Info column regardless of whether
we're building a protocol tree or not, and to set it to "Encrypted
payload" if the payload is encrypted. Also fix a typo in a field name.
Register the FTP data dissector as being associated with the FTP data
protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()"
call checked "proto_ftp_data", and the removed "pinfo->current_proto ="
line set it to "FTP-DATA", so it should be associated with
"proto_ftp_data").
Make the H1 dissector check whether the frame has at least 2 bytes in it
before checking the first two bytes; heuristic dissectors must not throw
exceptions until they've accepted the packet as one of theirs.
Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()"
in some dissectors where the result of "tvb_get_ptr()" is used only in
the "format_text()" call.
In the Quake dissector, don't check whether there are at least 4 bytes
in the packet - if we return, the packet won't be dissected at all (it's
not as if some other dissector will get to handle it), and, if we don't
return, we'll throw an exception if there aren't at least 4 bytes in the
packet, so the packet will be marked as short or malformed, as
appropriate.
In the RIPng dissector, associate the table of strings for the command
field with the command field, so that the dissector doesn't have to
format the string for the protocol tree entry itself, and so that the
filter construction dialog box can let you select "Request" or
"Response" from a list rather than requiring you to know the values for
"Request" and "Response".
Make "dissect_rpc()" static, as it's called only through a heuristic
dissector list.
Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols;
the string used is from a table provided by the dissector, and is a
string constant.
Don't format the Info column for WSP into a buffer and then format that
buffer into the column with "%s" - "col_add_fstr()" can do the
formatting for you, without having to allocate your own buffer (or run
through the *printf machinery twice).
Don't fetch fields from the WTP packet until you're ready to use them,
so that you don't throw an exception before you even set the Protocol
column or clear the Info column.
Use "pinfo->destport", not "pi.destport", in the Zebra dissector when
checking whether the packet is a request or reply, and do the check by
comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that
if the dissector is ever registered on another port, it still correctly
determines whether the packet is a request or reply - the Network
Monitor HTTP dissector has port 80 wired into its brain, which is a bit
irritating if you're trying to get it to dissect HTTP proxy traffic on
port 3128 or proxy administration UI traffic on port 3132).
svn path=/trunk/; revision=2931
2001-01-22 08:03:46 +00:00
|
|
|
if (check_col(pinfo->fd, COL_INFO))
|
|
|
|
col_clear(pinfo->fd, COL_INFO);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tvb_memcpy(tvb, (guint8 *)&ehdr, 0, sizeof ehdr);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
if (tree) {
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_esis, tvb, 0, tvb_length(tvb), FALSE);
|
2000-04-15 22:11:26 +00:00
|
|
|
esis_tree = proto_item_add_subtree(ti, ett_esis);
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
if (ehdr.esis_version != ESIS_REQUIRED_VERSION){
|
|
|
|
esis_dissect_unknown(tvb, pinfo, esis_tree,
|
|
|
|
"Unknown ESIS version (%u vs %u)",
|
|
|
|
ehdr.esis_version, ESIS_REQUIRED_VERSION );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_uint( esis_tree, hf_esis_nlpi, tvb, 0, 1, ehdr.esis_nlpi );
|
|
|
|
proto_tree_add_uint( esis_tree, hf_esis_length, tvb,
|
|
|
|
1, 1, ehdr.esis_length );
|
|
|
|
proto_tree_add_uint( esis_tree, hf_esis_version, tvb, 2, 1,
|
|
|
|
ehdr.esis_version );
|
|
|
|
proto_tree_add_uint( esis_tree, hf_esis_reserved, tvb, 3, 1,
|
|
|
|
ehdr.esis_reserved );
|
|
|
|
|
|
|
|
pdu_type_string = val_to_str(ehdr.esis_type&OSI_PDU_TYPE_MASK,
|
2000-04-15 22:11:26 +00:00
|
|
|
esis_vals, "Unknown (0x%x)");
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_uint_format( esis_tree, hf_esis_type, tvb, 4, 1,
|
|
|
|
ehdr.esis_type,
|
2000-04-15 22:11:26 +00:00
|
|
|
pdu_type_format_string,
|
|
|
|
pdu_type_string,
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
(ehdr.esis_type&BIT_8) ? "1" : "0",
|
|
|
|
(ehdr.esis_type&BIT_7) ? "1" : "0",
|
|
|
|
(ehdr.esis_type&BIT_6) ? "1" : "0");
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tmp_uint = pntohs( ehdr.esis_holdtime );
|
|
|
|
proto_tree_add_uint_format(esis_tree, hf_esis_holdtime, tvb, 5, 2,
|
2000-04-15 22:11:26 +00:00
|
|
|
tmp_uint, "Holding Time : %u seconds",
|
|
|
|
tmp_uint );
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
tmp_uint = pntohs( ehdr.esis_checksum );
|
2000-04-15 22:11:26 +00:00
|
|
|
|
2001-06-05 09:06:19 +00:00
|
|
|
switch (calc_checksum( tvb, 0, ehdr.esis_length, tmp_uint )) {
|
|
|
|
|
|
|
|
case NO_CKSUM:
|
|
|
|
cksum_status = "Not Used";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DATA_MISSING:
|
|
|
|
cksum_status = "Not checkable - not all of packet was captured";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CKSUM_OK:
|
|
|
|
cksum_status = "Is good";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CKSUM_NOT_OK:
|
|
|
|
cksum_status = "Is wrong";
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
cksum_status = NULL;
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
proto_tree_add_uint_format( esis_tree, hf_esis_checksum, tvb, 7, 2,
|
2000-04-15 22:11:26 +00:00
|
|
|
tmp_uint, "Checksum : 0x%x ( %s )",
|
2001-06-05 09:06:19 +00:00
|
|
|
tmp_uint, cksum_status );
|
2000-04-15 22:11:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Let us make sure we use the same names for all our decodes
|
|
|
|
* here. First, dump the name into info column, and THEN
|
|
|
|
* dispatch the sub-type.
|
|
|
|
*/
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
if (check_col(pinfo->fd, COL_INFO)) {
|
|
|
|
col_add_str(pinfo->fd, COL_INFO,
|
|
|
|
val_to_str( ehdr.esis_type&OSI_PDU_TYPE_MASK, esis_vals,
|
2000-04-15 22:11:26 +00:00
|
|
|
"Unknown (0x%x)" ) );
|
|
|
|
}
|
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
variable_len = ehdr.esis_length - ESIS_HDR_FIXED_LENGTH;
|
2000-04-15 22:11:26 +00:00
|
|
|
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
switch (ehdr.esis_type & OSI_PDU_TYPE_MASK) {
|
2000-04-15 22:11:26 +00:00
|
|
|
case ESIS_ESH_PDU:
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
esis_dissect_esh_pdu( variable_len, tvb, pinfo, esis_tree);
|
2000-04-15 22:11:26 +00:00
|
|
|
break;
|
|
|
|
case ESIS_ISH_PDU:
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
esis_dissect_ish_pdu( variable_len, tvb, pinfo, esis_tree);
|
2000-04-15 22:11:26 +00:00
|
|
|
break;
|
|
|
|
case ESIS_RD_PDU:
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
esis_dissect_redirect_pdu( variable_len, tvb, pinfo,
|
2000-04-15 22:11:26 +00:00
|
|
|
esis_tree);
|
|
|
|
break;
|
|
|
|
default:
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
esis_dissect_unknown(tvb, pinfo, esis_tree,
|
|
|
|
"Unknown ESIS packet type 0x%x",
|
|
|
|
ehdr.esis_type & OSI_PDU_TYPE_MASK );
|
2000-04-15 22:11:26 +00:00
|
|
|
}
|
|
|
|
} /* dissect_esis */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors.
Register the IP dissector and have dissectors that call it directly
(rather than through a port table) call it through a handle.
Add a routine "tvb_set_reported_length()" which a dissector can use if
it was handed a tvbuff that contains more data than is actually in its
part of the packet - for example, handing a padded Ethernet frame to IP;
the routine sets the reported length of the tvbuff (and also adjusts the
actual length, as appropriate). Then use it in IP.
Given that, "ethertype()" can determine how much of the Ethernet frame
was actually part of an IP datagram (and can do the same for other
protocols under Ethernet that use "tvb_set_reported_length()"; have it
return the actual length, and have "dissect_eth()" and "dissect_vlan()"
use that to mark trailer data in Ethernet II frames as well as in 802.3
frames.
svn path=/trunk/; revision=2658
2000-11-18 10:38:33 +00:00
|
|
|
* Name: proto_register_esis()
|
2000-04-15 22:11:26 +00:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* main register for esis protocol set. We register some display
|
|
|
|
* formats and the protocol module variables.
|
|
|
|
*
|
|
|
|
* NOTE: this procedure to autolinked by the makefile process that
|
|
|
|
* builds register.c
|
|
|
|
*
|
|
|
|
* Input:
|
|
|
|
* void
|
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
proto_register_esis(void) {
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_esis_nlpi,
|
|
|
|
{ "Network Layer Protocol Identifier", "esis.nlpi",
|
2001-06-18 02:18:27 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0, "", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_length,
|
2001-06-18 02:18:27 +00:00
|
|
|
{ "PDU Length ", "esis.length", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_version,
|
2001-06-18 02:18:27 +00:00
|
|
|
{ "Version (==1) ", "esis.ver", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_reserved,
|
2001-06-18 02:18:27 +00:00
|
|
|
{ "Reserved(==0) ", "esis.res", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_type,
|
|
|
|
{ "PDU Type ", "esis.type", FT_UINT8, BASE_DEC, VALS(esis_vals),
|
2001-06-18 02:18:27 +00:00
|
|
|
0xff, "", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_holdtime,
|
2001-06-18 02:18:27 +00:00
|
|
|
{ "Holding Time ", "esis.htime", FT_UINT16, BASE_DEC, NULL, 0x0, " s", HFILL }},
|
2000-04-15 22:11:26 +00:00
|
|
|
{ &hf_esis_checksum,
|
2001-06-18 02:18:27 +00:00
|
|
|
{ "Checksum ", "esis.chksum", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }}
|
2000-04-15 22:11:26 +00:00
|
|
|
};
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_esis,
|
|
|
|
&ett_esis_area_addr,
|
|
|
|
};
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_esis = proto_register_protocol( PROTO_STRING_ESIS, "ESIS", "esis");
|
2000-04-15 22:11:26 +00:00
|
|
|
proto_register_field_array(proto_esis, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
};
|
2000-04-17 01:36:31 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_esis(void)
|
|
|
|
{
|
2001-01-09 06:32:10 +00:00
|
|
|
dissector_add("osinl", NLPID_ISO9542_ESIS, dissect_esis, proto_esis);
|
2000-04-17 01:36:31 +00:00
|
|
|
}
|