1999-12-15 04:34:44 +00:00
|
|
|
/* packet-isis-hello.c
|
|
|
|
* Routines for decoding isis hello packets and their CLVs
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
1999-12-15 04:34:44 +00:00
|
|
|
* Stuart Stanley <stuarts@mxmail.net>
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1999-12-15 04:34:44 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-15 04:34:44 +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
|
|
|
*
|
1999-12-15 04:34:44 +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
|
|
|
*
|
1999-12-15 04:34:44 +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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <glib.h>
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2000-04-15 22:11:26 +00:00
|
|
|
#include "packet-osi.h"
|
1999-12-15 04:34:44 +00:00
|
|
|
#include "packet-isis.h"
|
|
|
|
#include "packet-isis-clv.h"
|
|
|
|
#include "packet-isis-hello.h"
|
2009-08-21 20:25:24 +00:00
|
|
|
#include <epan/addr_resolv.h>
|
1999-12-15 04:34:44 +00:00
|
|
|
|
2007-08-24 22:22:34 +00:00
|
|
|
|
|
|
|
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
|
|
|
|
if(flag){ \
|
|
|
|
if(item) \
|
|
|
|
proto_item_append_text(item, string, sep); \
|
|
|
|
sep = cont_sep; \
|
|
|
|
}
|
|
|
|
static const char initial_sep[] = " (";
|
|
|
|
static const char cont_sep[] = ", ";
|
|
|
|
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/* hello packets */
|
2003-12-08 20:40:33 +00:00
|
|
|
static int hf_isis_hello_circuit_reserved = -1;
|
|
|
|
static int hf_isis_hello_source_id = -1;
|
|
|
|
static int hf_isis_hello_holding_timer = -1;
|
|
|
|
static int hf_isis_hello_pdu_length = -1;
|
|
|
|
static int hf_isis_hello_priority_reserved = -1;
|
|
|
|
static int hf_isis_hello_lan_id = -1;
|
|
|
|
static int hf_isis_hello_local_circuit_id = -1;
|
|
|
|
static int hf_isis_hello_clv_ipv4_int_addr = -1;
|
|
|
|
static int hf_isis_hello_clv_ipv6_int_addr = -1;
|
|
|
|
static int hf_isis_hello_clv_ptp_adj = -1;
|
|
|
|
static int hf_isis_hello_clv_mt = -1;
|
2007-08-24 22:22:34 +00:00
|
|
|
static int hf_isis_hello_clv_restart_flags = -1;
|
|
|
|
static int hf_isis_hello_clv_restart_flags_rr = -1;
|
|
|
|
static int hf_isis_hello_clv_restart_flags_ra = -1;
|
|
|
|
static int hf_isis_hello_clv_restart_flags_sa = -1;
|
|
|
|
static int hf_isis_hello_clv_restart_remain_time = -1;
|
|
|
|
static int hf_isis_hello_clv_restart_neighbor = -1;
|
2003-12-08 20:40:33 +00:00
|
|
|
|
|
|
|
static gint ett_isis_hello = -1;
|
|
|
|
static gint ett_isis_hello_clv_area_addr = -1;
|
|
|
|
static gint ett_isis_hello_clv_is_neighbors = -1;
|
|
|
|
static gint ett_isis_hello_clv_padding = -1;
|
|
|
|
static gint ett_isis_hello_clv_unknown = -1;
|
|
|
|
static gint ett_isis_hello_clv_nlpid = -1;
|
|
|
|
static gint ett_isis_hello_clv_authentication = -1;
|
|
|
|
static gint ett_isis_hello_clv_ip_authentication = -1;
|
1999-12-15 04:34:44 +00:00
|
|
|
static gint ett_isis_hello_clv_ipv4_int_addr = -1;
|
2001-05-14 18:40:17 +00:00
|
|
|
static gint ett_isis_hello_clv_ipv6_int_addr = -1;
|
2003-12-08 20:40:33 +00:00
|
|
|
static gint ett_isis_hello_clv_ptp_adj = -1;
|
|
|
|
static gint ett_isis_hello_clv_mt = -1;
|
|
|
|
static gint ett_isis_hello_clv_restart = -1;
|
2007-08-24 22:22:34 +00:00
|
|
|
static gint ett_isis_hello_clv_restart_flags = -1;
|
2003-12-08 20:40:33 +00:00
|
|
|
static gint ett_isis_hello_clv_checksum = -1;
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
static const value_string isis_hello_circuit_type_vals[] = {
|
|
|
|
{ ISIS_HELLO_TYPE_RESERVED, "Reserved 0 (discard PDU)"},
|
|
|
|
{ ISIS_HELLO_TYPE_LEVEL_1, "Level 1 only"},
|
|
|
|
{ ISIS_HELLO_TYPE_LEVEL_2, "Level 2 only"},
|
|
|
|
{ ISIS_HELLO_TYPE_LEVEL_12, "Level 1 and 2"},
|
|
|
|
{ 0, NULL} };
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
/*
|
1999-12-15 04:34:44 +00:00
|
|
|
* Predclare dissectors for use in clv dissection.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_padding_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_is_neighbors_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_ptp_adj_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_area_address_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2003-12-08 20:40:33 +00:00
|
|
|
static void dissect_hello_authentication_clv(tvbuff_t *tvb,
|
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
|
|
|
static void dissect_hello_ip_authentication_clv(tvbuff_t *tvb,
|
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
|
|
|
static void dissect_hello_checksum_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_ipv6_int_addr_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_ip_int_addr_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_mt_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_nlpid_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2002-08-28 21:04:11 +00:00
|
|
|
static void dissect_hello_restart_clv(tvbuff_t *tvb,
|
2002-04-07 22:36:55 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length);
|
2001-06-23 19:45:12 +00:00
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
static const isis_clv_handle_t clv_l1_hello_opts[] = {
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AREA_ADDRESS,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Area address(es)",
|
|
|
|
&ett_isis_hello_clv_area_addr,
|
|
|
|
dissect_hello_area_address_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IS_NEIGHBORS,
|
1999-12-15 04:34:44 +00:00
|
|
|
"IS Neighbor(s)",
|
|
|
|
&ett_isis_hello_clv_is_neighbors,
|
|
|
|
dissect_hello_is_neighbors_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PADDING,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Padding",
|
|
|
|
&ett_isis_hello_clv_padding,
|
|
|
|
dissect_hello_padding_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PROTOCOLS_SUPPORTED,
|
2001-04-16 10:04:33 +00:00
|
|
|
"Protocols Supported",
|
1999-12-15 04:34:44 +00:00
|
|
|
&ett_isis_hello_clv_nlpid,
|
|
|
|
dissect_hello_nlpid_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_ADDR,
|
1999-12-15 04:34:44 +00:00
|
|
|
"IP Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv4_int_addr,
|
|
|
|
dissect_hello_ip_int_addr_clv
|
|
|
|
},
|
2001-05-14 18:40:17 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP6_ADDR,
|
2001-05-14 18:40:17 +00:00
|
|
|
"IPv6 Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv6_int_addr,
|
|
|
|
dissect_hello_ipv6_int_addr_clv
|
|
|
|
},
|
2002-02-09 23:44:38 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_RESTART,
|
2002-02-09 23:44:38 +00:00
|
|
|
"Restart Signaling",
|
|
|
|
&ett_isis_hello_clv_restart,
|
|
|
|
dissect_hello_restart_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AUTHENTICATION,
|
|
|
|
"Authentication",
|
|
|
|
&ett_isis_hello_clv_authentication,
|
|
|
|
dissect_hello_authentication_clv
|
1999-12-15 04:34:44 +00:00
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_AUTHENTICATION,
|
|
|
|
"IP Authentication",
|
|
|
|
&ett_isis_hello_clv_ip_authentication,
|
|
|
|
dissect_hello_ip_authentication_clv
|
1999-12-15 04:34:44 +00:00
|
|
|
},
|
2001-06-23 19:45:12 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_MT_SUPPORTED,
|
2001-06-23 19:45:12 +00:00
|
|
|
"Multi Topology",
|
|
|
|
&ett_isis_hello_clv_mt,
|
|
|
|
dissect_hello_mt_clv
|
|
|
|
},
|
2003-12-08 20:40:33 +00:00
|
|
|
{
|
|
|
|
ISIS_CLV_CHECKSUM,
|
|
|
|
"Checksum",
|
|
|
|
&ett_isis_hello_clv_checksum,
|
|
|
|
dissect_hello_checksum_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
|
|
|
0,
|
|
|
|
"",
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const isis_clv_handle_t clv_l2_hello_opts[] = {
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AREA_ADDRESS,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Area address(es)",
|
|
|
|
&ett_isis_hello_clv_area_addr,
|
|
|
|
dissect_hello_area_address_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IS_NEIGHBORS,
|
1999-12-15 04:34:44 +00:00
|
|
|
"IS Neighbor(s)",
|
|
|
|
&ett_isis_hello_clv_is_neighbors,
|
|
|
|
dissect_hello_is_neighbors_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PADDING,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Padding",
|
|
|
|
&ett_isis_hello_clv_padding,
|
|
|
|
dissect_hello_padding_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PROTOCOLS_SUPPORTED,
|
2001-04-16 10:04:33 +00:00
|
|
|
"Protocols Supported",
|
1999-12-15 04:34:44 +00:00
|
|
|
&ett_isis_hello_clv_nlpid,
|
|
|
|
dissect_hello_nlpid_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_ADDR,
|
1999-12-15 04:34:44 +00:00
|
|
|
"IP Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv4_int_addr,
|
|
|
|
dissect_hello_ip_int_addr_clv
|
|
|
|
},
|
2001-05-14 18:40:17 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP6_ADDR,
|
2001-05-14 18:40:17 +00:00
|
|
|
"IPv6 Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv6_int_addr,
|
|
|
|
dissect_hello_ipv6_int_addr_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AUTHENTICATION,
|
|
|
|
"Authentication",
|
|
|
|
&ett_isis_hello_clv_authentication,
|
|
|
|
dissect_hello_authentication_clv
|
1999-12-15 04:34:44 +00:00
|
|
|
},
|
2002-02-09 23:44:38 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_AUTHENTICATION,
|
|
|
|
"IP Authentication",
|
|
|
|
&ett_isis_hello_clv_ip_authentication,
|
|
|
|
dissect_hello_ip_authentication_clv
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ISIS_CLV_RESTART,
|
2002-02-09 23:44:38 +00:00
|
|
|
"Restart Signaling",
|
|
|
|
&ett_isis_hello_clv_restart,
|
|
|
|
dissect_hello_restart_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_MT_SUPPORTED,
|
2001-06-23 19:45:12 +00:00
|
|
|
"Multi Topology",
|
|
|
|
&ett_isis_hello_clv_mt,
|
|
|
|
dissect_hello_mt_clv
|
|
|
|
},
|
2003-12-08 20:40:33 +00:00
|
|
|
{
|
|
|
|
ISIS_CLV_CHECKSUM,
|
|
|
|
"Checksum",
|
|
|
|
&ett_isis_hello_clv_checksum,
|
|
|
|
dissect_hello_checksum_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
|
|
|
0,
|
|
|
|
"",
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const isis_clv_handle_t clv_ptp_hello_opts[] = {
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AREA_ADDRESS,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Area address(es)",
|
|
|
|
&ett_isis_hello_clv_area_addr,
|
|
|
|
dissect_hello_area_address_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PADDING,
|
1999-12-15 04:34:44 +00:00
|
|
|
"Padding",
|
|
|
|
&ett_isis_hello_clv_padding,
|
|
|
|
dissect_hello_padding_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PROTOCOLS_SUPPORTED,
|
2001-04-16 10:04:33 +00:00
|
|
|
"Protocols Supported",
|
1999-12-15 04:34:44 +00:00
|
|
|
&ett_isis_hello_clv_nlpid,
|
|
|
|
dissect_hello_nlpid_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_ADDR,
|
1999-12-15 04:34:44 +00:00
|
|
|
"IP Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv4_int_addr,
|
|
|
|
dissect_hello_ip_int_addr_clv
|
|
|
|
},
|
2001-05-14 18:40:17 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP6_ADDR,
|
2001-05-14 18:40:17 +00:00
|
|
|
"IPv6 Interface address(es)",
|
|
|
|
&ett_isis_hello_clv_ipv6_int_addr,
|
|
|
|
dissect_hello_ipv6_int_addr_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_AUTHENTICATION,
|
|
|
|
"Authentication",
|
|
|
|
&ett_isis_hello_clv_authentication,
|
|
|
|
dissect_hello_authentication_clv
|
1999-12-15 04:34:44 +00:00
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_IP_AUTHENTICATION,
|
|
|
|
"IP Authentication",
|
|
|
|
&ett_isis_hello_clv_ip_authentication,
|
|
|
|
dissect_hello_ip_authentication_clv
|
1999-12-15 04:34:44 +00:00
|
|
|
},
|
2002-02-09 23:44:38 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_RESTART,
|
2002-02-09 23:44:38 +00:00
|
|
|
"Restart Option",
|
|
|
|
&ett_isis_hello_clv_restart,
|
|
|
|
dissect_hello_restart_clv
|
|
|
|
},
|
2001-06-23 19:45:12 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_PTP_ADJ_STATE,
|
2001-12-20 07:33:21 +00:00
|
|
|
"Point-to-point Adjacency State",
|
2001-06-23 19:45:12 +00:00
|
|
|
&ett_isis_hello_clv_ptp_adj,
|
|
|
|
dissect_hello_ptp_adj_clv
|
|
|
|
},
|
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
ISIS_CLV_MT_SUPPORTED,
|
2001-06-23 19:45:12 +00:00
|
|
|
"Multi Topology",
|
|
|
|
&ett_isis_hello_clv_mt,
|
|
|
|
dissect_hello_mt_clv
|
|
|
|
},
|
2003-12-08 20:40:33 +00:00
|
|
|
{
|
|
|
|
ISIS_CLV_CHECKSUM,
|
|
|
|
"Checksum",
|
|
|
|
&ett_isis_hello_clv_checksum,
|
|
|
|
dissect_hello_checksum_clv
|
|
|
|
},
|
1999-12-15 04:34:44 +00:00
|
|
|
{
|
|
|
|
0,
|
|
|
|
"",
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2002-02-09 23:44:38 +00:00
|
|
|
|
2007-08-24 22:22:34 +00:00
|
|
|
/*
|
|
|
|
* The Restart CLV is documented in RFC 3847 (Restart Signaling for
|
|
|
|
* Intermediate System to Intermediate System). The CLV looks like this
|
|
|
|
*
|
|
|
|
* Type 211
|
|
|
|
* Length # of octets in the value field (1 to (3 + ID Length))
|
|
|
|
* Value
|
|
|
|
*
|
|
|
|
* No. of octets
|
|
|
|
* +-----------------------+
|
|
|
|
* | Flags | 1
|
|
|
|
* +-----------------------+
|
|
|
|
* | Remaining Time | 2
|
|
|
|
* +-----------------------+
|
|
|
|
* | Restarting Neighbor ID| ID Length
|
|
|
|
* +-----------------------+
|
|
|
|
*
|
|
|
|
* Flags (1 octet)
|
|
|
|
*
|
|
|
|
* 0 1 2 3 4 5 6 7
|
|
|
|
* +--+--+--+--+--+--+--+--+
|
|
|
|
* | Reserved |SA|RA|RR|
|
|
|
|
* +--+--+--+--+--+--+--+--+
|
|
|
|
*
|
|
|
|
* RR - Restart Request
|
|
|
|
* RA - Restart Acknowledgement
|
|
|
|
* SA - Suppress adjacency advertisement
|
|
|
|
*
|
|
|
|
* The Remaining Time and Restarting Neighbor ID fields are only required when
|
|
|
|
* the RA flag is set. The Flags field is always required.
|
|
|
|
*
|
|
|
|
*/
|
2002-02-09 23:44:38 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_restart_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a restart clv - only found in IIHs
|
|
|
|
* hence no call in the common clv dissector
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_restart_clv(tvbuff_t *tvb,
|
2007-08-24 22:22:34 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length)
|
2002-02-09 23:44:38 +00:00
|
|
|
{
|
2007-08-24 22:22:34 +00:00
|
|
|
int restart_options=0;
|
|
|
|
proto_tree *flags_tree;
|
|
|
|
proto_item *restart_flags_item;
|
|
|
|
proto_item *hold_time_item;
|
|
|
|
const char *sep;
|
|
|
|
const guint8 *neighbor_id;
|
|
|
|
|
|
|
|
if (length >= 1) {
|
|
|
|
restart_options = tvb_get_guint8(tvb, offset);
|
|
|
|
restart_flags_item = proto_tree_add_uint ( tree, hf_isis_hello_clv_restart_flags,
|
|
|
|
tvb, offset, 1, restart_options);
|
|
|
|
flags_tree = proto_item_add_subtree(restart_flags_item, ett_isis_hello_clv_restart_flags);
|
|
|
|
proto_tree_add_boolean (flags_tree, hf_isis_hello_clv_restart_flags_sa,
|
|
|
|
tvb, offset, 1, restart_options );
|
|
|
|
proto_tree_add_boolean (flags_tree, hf_isis_hello_clv_restart_flags_ra,
|
|
|
|
tvb, offset, 1, restart_options );
|
|
|
|
proto_tree_add_boolean (flags_tree, hf_isis_hello_clv_restart_flags_rr,
|
|
|
|
tvb, offset, 1, restart_options );
|
|
|
|
|
|
|
|
/* Append an indication of which flags are set in the restart
|
|
|
|
* options
|
|
|
|
*/
|
|
|
|
sep = initial_sep;
|
|
|
|
APPEND_BOOLEAN_FLAG(ISIS_MASK_RESTART_SA(restart_options), restart_flags_item, "%sSA");
|
|
|
|
APPEND_BOOLEAN_FLAG(ISIS_MASK_RESTART_RA(restart_options), restart_flags_item, "%sRA");
|
|
|
|
APPEND_BOOLEAN_FLAG(ISIS_MASK_RESTART_RR(restart_options), restart_flags_item, "%sRR");
|
|
|
|
if (sep != initial_sep)
|
|
|
|
{
|
|
|
|
proto_item_append_text (restart_flags_item, ")");
|
|
|
|
}
|
2002-02-09 23:44:38 +00:00
|
|
|
|
2002-05-02 10:13:56 +00:00
|
|
|
}
|
|
|
|
|
2007-08-24 22:22:34 +00:00
|
|
|
/* The Remaining Time field should only be present if the RA flag is
|
|
|
|
* set
|
|
|
|
*/
|
|
|
|
if (length >= 3 && ISIS_MASK_RESTART_RA(restart_options)) {
|
|
|
|
hold_time_item = proto_tree_add_uint ( tree, hf_isis_hello_clv_restart_remain_time,
|
|
|
|
tvb, offset+1, 2, tvb_get_ntohs(tvb, offset+1) );
|
|
|
|
proto_item_append_text( hold_time_item, "s" );
|
|
|
|
}
|
2002-02-09 23:44:38 +00:00
|
|
|
|
2007-08-24 22:22:34 +00:00
|
|
|
/* The Restarting Neighbor ID should only be present if the RA flag is
|
|
|
|
* set.
|
|
|
|
*/
|
|
|
|
if (length >= 3 + id_length && ISIS_MASK_RESTART_RA(restart_options)) {
|
|
|
|
neighbor_id = tvb_get_ptr(tvb, offset+3, id_length);
|
|
|
|
proto_tree_add_bytes_format( tree,
|
|
|
|
hf_isis_hello_clv_restart_neighbor, tvb, offset+3,
|
2008-12-19 17:39:52 +00:00
|
|
|
id_length, neighbor_id, "Restarting Neighbor ID: %s",
|
2007-08-24 22:22:34 +00:00
|
|
|
print_system_id( neighbor_id, id_length ) );
|
|
|
|
}
|
2002-02-09 23:44:38 +00:00
|
|
|
}
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_nlpid_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packets NLPID clv. Calls into the
|
|
|
|
* clv common one.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : current offset into packet data
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_nlpid_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_nlpid_clv(tvb, tree, offset, length);
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-23 19:45:12 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_mt_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packets Multi Topology clv. Calls into the
|
|
|
|
* clv common one.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
2001-06-23 19:45:12 +00:00
|
|
|
* int : current offset into packet data
|
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
2001-06-23 19:45:12 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_mt_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_mt_clv(tvb, tree, offset, length,
|
2001-06-23 19:45:12 +00:00
|
|
|
hf_isis_hello_clv_mt );
|
|
|
|
}
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_ip_int_addr_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packets ip interface addr clv. Calls into the
|
|
|
|
* clv common one.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : current offset into packet data
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_ip_int_addr_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_ip_int_clv(tvb, tree, offset, length,
|
1999-12-15 04:34:44 +00:00
|
|
|
hf_isis_hello_clv_ipv4_int_addr );
|
|
|
|
}
|
|
|
|
|
2001-05-14 18:40:17 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_ipv6_int_addr_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packets ipv6 interface addr clv. Calls into the
|
|
|
|
* clv common one.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
2001-05-14 18:40:17 +00:00
|
|
|
* int : current offset into packet data
|
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
2001-05-14 18:40:17 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_ipv6_int_addr_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_ipv6_int_clv(tvb, tree, offset, length,
|
2001-05-14 18:40:17 +00:00
|
|
|
hf_isis_hello_clv_ipv6_int_addr );
|
|
|
|
}
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
2003-12-08 20:40:33 +00:00
|
|
|
* Name: dissect_hello_authentication_clv()
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Description:
|
2003-12-08 20:40:33 +00:00
|
|
|
* Decode for a hello packets authenticaion clv.
|
|
|
|
* Calls into the CLV common one.
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : current offset into packet data
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
2003-12-08 20:40:33 +00:00
|
|
|
dissect_hello_authentication_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2003-12-08 20:40:33 +00:00
|
|
|
isis_dissect_authentication_clv(tvb, tree, offset, length);
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
|
2003-12-08 20:40:33 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_ip_authentication_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packets IP authenticaion clv.
|
|
|
|
* Calls into the CLV common one.
|
|
|
|
*
|
|
|
|
* Input:
|
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
|
|
|
* int : current offset into packet data
|
|
|
|
* int : length of IDs in packet.
|
|
|
|
* int : length of this clv
|
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
dissect_hello_ip_authentication_clv(tvbuff_t *tvb,
|
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
|
|
|
{
|
|
|
|
isis_dissect_ip_authentication_clv(tvb, tree, offset, length);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: dissect_hello_checksum_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* dump and verify the optional checksum in TLV 12
|
|
|
|
*
|
|
|
|
* Input:
|
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : protocol display tree to fill out. May be NULL
|
|
|
|
* int : offset into packet data where we are.
|
|
|
|
* int : length of clv we are decoding
|
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, but we will add to proto tree if !NULL.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_hello_checksum_clv(tvbuff_t *tvb,
|
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length) {
|
|
|
|
|
|
|
|
guint16 pdu_length,checksum, cacl_checksum=0;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
if ( length != 2 ) {
|
|
|
|
proto_tree_add_text ( tree, tvb, offset, length,
|
|
|
|
"incorrect checksum length (%u), should be (2)", length );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
checksum = tvb_get_ntohs(tvb, offset);
|
|
|
|
|
|
|
|
/* the check_and_get_checksum() function needs to know how big
|
|
|
|
* the packet is. we can either pass through the pdu-len through several layers
|
|
|
|
* of dissectors and wrappers or extract the PDU length field from the PDU specific header
|
|
|
|
* which is offseted 17 bytes in IIHs (relative to the beginning of the IS-IS packet) */
|
|
|
|
|
|
|
|
pdu_length = tvb_get_ntohs(tvb, 17);
|
|
|
|
|
|
|
|
/* unlike the LSP checksum verification which starts at an offset of 12 we start at offset 0*/
|
|
|
|
switch (check_and_get_checksum(tvb, 0, pdu_length, checksum, offset, &cacl_checksum))
|
|
|
|
{
|
|
|
|
|
|
|
|
case NO_CKSUM :
|
|
|
|
proto_tree_add_text ( tree, tvb, offset, length,
|
2005-07-08 22:11:13 +00:00
|
|
|
"Checksum: 0x%04x [unused]", checksum);
|
2003-12-08 20:40:33 +00:00
|
|
|
break;
|
|
|
|
case DATA_MISSING :
|
|
|
|
isis_dissect_unknown(tvb, tree, offset,
|
2005-07-08 22:11:13 +00:00
|
|
|
"[packet length %d went beyond packet]",
|
2007-10-23 05:50:00 +00:00
|
|
|
tvb_length(tvb));
|
2003-12-08 20:40:33 +00:00
|
|
|
break;
|
|
|
|
case CKSUM_NOT_OK :
|
|
|
|
proto_tree_add_text ( tree, tvb, offset, length,
|
2005-07-08 22:11:13 +00:00
|
|
|
"Checksum: 0x%04x [incorrect, should be 0x%04x]",
|
2003-12-08 20:40:33 +00:00
|
|
|
checksum,
|
|
|
|
cacl_checksum);
|
|
|
|
break;
|
|
|
|
case CKSUM_OK :
|
|
|
|
proto_tree_add_text ( tree, tvb, offset, length,
|
2005-07-08 22:11:13 +00:00
|
|
|
"Checksum: 0x%04x [correct]", checksum);
|
2003-12-08 20:40:33 +00:00
|
|
|
break;
|
|
|
|
default :
|
|
|
|
g_message("'check_and_get_checksum' returned an invalid value");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
|
|
|
* Name: dissect_hello_area_address_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
2003-12-08 20:40:33 +00:00
|
|
|
* Decode for a hello packets area address clv.
|
|
|
|
* Calls into the CLV common one.
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : current offset into packet data
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not null.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_area_address_clv(tvbuff_t *tvb,
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree *tree, int offset, int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_area_address_clv(tvb, tree, offset, length);
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-23 19:45:12 +00:00
|
|
|
|
2001-07-02 00:19:34 +00:00
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
|
|
|
dissect_hello_ptp_adj_clv(tvbuff_t *tvb,
|
2007-08-24 22:22:34 +00:00
|
|
|
proto_tree *tree, int offset, int id_length, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
2002-05-02 10:13:56 +00:00
|
|
|
static const value_string adj_state_vals[] = {
|
|
|
|
{ 0, "Up" },
|
|
|
|
{ 1, "Initializing" },
|
|
|
|
{ 2, "Down" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
guint8 adj_state;
|
2005-06-26 19:56:52 +00:00
|
|
|
const char *adj_state_str;
|
2002-05-02 10:13:56 +00:00
|
|
|
|
|
|
|
adj_state = tvb_get_guint8(tvb, offset);
|
|
|
|
adj_state_str = val_to_str(adj_state, adj_state_vals, "Unknown (%u)");
|
2001-06-23 19:45:12 +00:00
|
|
|
switch(length) {
|
|
|
|
case 1:
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset, 1,
|
2002-05-02 10:13:56 +00:00
|
|
|
"Adjacency State: %s", adj_state_str );
|
2001-06-23 19:45:12 +00:00
|
|
|
break;
|
|
|
|
case 5:
|
2002-05-02 10:13:56 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset, 1,
|
2002-08-28 21:04:11 +00:00
|
|
|
"Adjacency State: %s", adj_state_str );
|
|
|
|
proto_tree_add_text ( tree, tvb, offset+1, 4,
|
|
|
|
"Extended Local circuit ID: 0x%08x", tvb_get_ntohl(tvb, offset+1) );
|
2001-06-23 19:45:12 +00:00
|
|
|
break;
|
|
|
|
case 11:
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset, 1,
|
2002-05-02 10:13:56 +00:00
|
|
|
"Adjacency State: %s", adj_state_str );
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset+1, 4,
|
2001-08-22 18:00:40 +00:00
|
|
|
"Extended Local circuit ID: 0x%08x", tvb_get_ntohl(tvb, offset+1) );
|
2007-08-24 22:22:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset+5, id_length,
|
|
|
|
"Neighbor SystemID: %s",
|
|
|
|
print_system_id( tvb_get_ptr(tvb, offset+5, id_length), id_length ) );
|
2001-06-23 19:45:12 +00:00
|
|
|
break;
|
|
|
|
case 15:
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset, 1,
|
2002-05-02 10:13:56 +00:00
|
|
|
"Adjacency State: %s", adj_state_str );
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset+1, 4,
|
2001-08-22 18:00:40 +00:00
|
|
|
"Extended Local circuit ID: 0x%08x", tvb_get_ntohl(tvb, offset+1) );
|
2007-08-24 22:22:34 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset+5, id_length,
|
|
|
|
"Neighbor SystemID: %s",
|
|
|
|
print_system_id( tvb_get_ptr(tvb, offset+5, id_length), id_length ) );
|
|
|
|
proto_tree_add_text ( tree, tvb, offset+5+id_length, 4,
|
|
|
|
"Neighbor Extended Local circuit ID: 0x%08x",
|
|
|
|
tvb_get_ntohl(tvb, offset+5+id_length) );
|
2001-06-23 19:45:12 +00:00
|
|
|
break;
|
|
|
|
default:
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_unknown(tvb, tree, offset,
|
2001-06-23 19:45:12 +00:00
|
|
|
"malformed TLV (%d vs 1,5,11,15)", length );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
|
|
|
* Name: isis_dissect_is_neighbors_clv()
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-15 04:34:44 +00:00
|
|
|
* Description:
|
|
|
|
* Take apart a IS neighbor packet. A neighbor is n 6 byte packets.
|
|
|
|
* (they tend to be an 802.3 MAC address, but its not required).
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : protocol display tree to fill out. May be NULL
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : offset into packet data where we are.
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of clv we are decoding
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-15 04:34:44 +00:00
|
|
|
* Output:
|
|
|
|
* void, but we will add to proto tree if !NULL.
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
2002-04-07 22:36:55 +00:00
|
|
|
dissect_hello_is_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
2002-05-02 10:13:56 +00:00
|
|
|
int id_length _U_, int length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
1999-12-15 04:34:44 +00:00
|
|
|
while ( length > 0 ) {
|
|
|
|
if (length<6) {
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_unknown(tvb, tree, offset,
|
1999-12-15 04:34:44 +00:00
|
|
|
"short is neighbor (%d vs 6)", length );
|
|
|
|
return;
|
|
|
|
}
|
2002-08-28 21:04:11 +00:00
|
|
|
/*
|
1999-12-15 04:34:44 +00:00
|
|
|
* Lets turn the area address into "standard" 0000.0000.etc
|
2002-08-28 21:04:11 +00:00
|
|
|
* format string.
|
1999-12-15 04:34:44 +00:00
|
|
|
*/
|
|
|
|
if ( tree ) {
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree_add_text ( tree, tvb, offset, 6,
|
2001-12-26 21:37:21 +00:00
|
|
|
"IS Neighbor: %s", get_ether_name( tvb_get_ptr(tvb, offset, 6)) );
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
offset += 6;
|
|
|
|
length -= 6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: dissect_hello_padding_clv()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Decode for a hello packet's padding clv. Padding does nothing,
|
|
|
|
* so we just return.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : proto tree to build on (may be null)
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : current offset into packet data
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
2001-07-02 00:19:34 +00:00
|
|
|
* int : length of this clv
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
2002-05-02 10:13:56 +00:00
|
|
|
dissect_hello_padding_clv(tvbuff_t *tvb _U_, proto_tree *tree _U_, int offset _U_,
|
|
|
|
int id_length _U_, int length _U_)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
1999-12-15 04:34:44 +00:00
|
|
|
/* nothing to do here! */
|
|
|
|
}
|
|
|
|
|
2001-07-02 00:19:34 +00:00
|
|
|
|
1999-12-15 04:34:44 +00:00
|
|
|
/*
|
|
|
|
* Name: isis_dissect_isis_hello()
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-15 04:34:44 +00:00
|
|
|
* Description:
|
|
|
|
* This procedure rips apart the various types of ISIS hellos. L1H and
|
2000-06-19 08:33:50 +00:00
|
|
|
* L2H's are identical for the most part, while the PTP hello has
|
1999-12-15 04:34:44 +00:00
|
|
|
* a shorter header.
|
|
|
|
*
|
|
|
|
* Input:
|
2001-07-02 00:19:34 +00:00
|
|
|
* tvbuff_t * : tvbuffer for packet data
|
|
|
|
* proto_tree * : protocol display tree to add to. May be NULL.
|
|
|
|
* int offset : our offset into packet data.
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : hello type, a la packet-isis.h ISIS_TYPE_* values
|
1999-12-15 04:34:44 +00:00
|
|
|
* int : header length of packet.
|
2000-06-19 08:33:50 +00:00
|
|
|
* int : length of IDs in packet.
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void, will modify proto_tree if not NULL.
|
2002-08-28 21:04:11 +00:00
|
|
|
*/
|
|
|
|
void
|
2002-08-29 18:52:54 +00:00
|
|
|
isis_dissect_isis_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
|
2002-04-07 22:36:55 +00:00
|
|
|
int hello_type, int header_length, int id_length)
|
2001-07-02 00:19:34 +00:00
|
|
|
{
|
1999-12-15 04:34:44 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *hello_tree = NULL;
|
|
|
|
int len;
|
2001-07-02 01:41:25 +00:00
|
|
|
guint8 octet;
|
|
|
|
const guint8 *source_id;
|
2000-06-19 08:33:50 +00:00
|
|
|
guint16 pdu_length;
|
2001-07-02 01:41:25 +00:00
|
|
|
const guint8 *lan_id;
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
if (tree) {
|
2002-01-24 09:20:54 +00:00
|
|
|
ti = proto_tree_add_text(tree, tvb, offset, -1, "ISIS HELLO");
|
1999-12-15 04:34:44 +00:00
|
|
|
hello_tree = proto_item_add_subtree(ti, ett_isis_hello);
|
2001-07-02 01:41:25 +00:00
|
|
|
octet = tvb_get_guint8(tvb, offset);
|
2000-06-19 08:33:50 +00:00
|
|
|
proto_tree_add_uint_format(hello_tree,
|
1999-12-15 04:34:44 +00:00
|
|
|
hf_isis_hello_circuit_reserved,
|
2001-07-02 01:41:25 +00:00
|
|
|
tvb, offset, 1, octet,
|
2000-04-15 22:11:26 +00:00
|
|
|
"Circuit type : %s, reserved(0x%02x == 0)",
|
2001-07-02 01:41:25 +00:00
|
|
|
val_to_str(octet&ISIS_HELLO_CTYPE_MASK,
|
1999-12-15 04:34:44 +00:00
|
|
|
isis_hello_circuit_type_vals,
|
|
|
|
"Unknown (0x%x)"),
|
2001-07-02 01:41:25 +00:00
|
|
|
octet&ISIS_HELLO_CT_RESERVED_MASK
|
1999-12-15 04:34:44 +00:00
|
|
|
);
|
2000-06-19 08:33:50 +00:00
|
|
|
}
|
|
|
|
offset += 1;
|
1999-12-15 04:34:44 +00:00
|
|
|
|
2000-06-19 08:33:50 +00:00
|
|
|
if (tree) {
|
2001-07-02 01:41:25 +00:00
|
|
|
source_id = tvb_get_ptr(tvb, offset, id_length);
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_bytes_format(hello_tree, hf_isis_hello_source_id, tvb,
|
2008-12-19 17:39:52 +00:00
|
|
|
offset, id_length, source_id,
|
2002-08-29 18:52:54 +00:00
|
|
|
"System-ID {Sender of PDU} : %s",
|
2001-07-02 01:41:25 +00:00
|
|
|
print_system_id( source_id, id_length ) );
|
2002-08-29 18:52:54 +00:00
|
|
|
}
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", System-ID: %s",
|
|
|
|
print_system_id( tvb_get_ptr(tvb, offset, id_length), id_length ) );
|
|
|
|
}
|
2000-06-19 08:33:50 +00:00
|
|
|
offset += id_length;
|
|
|
|
|
|
|
|
if (tree) {
|
2001-07-02 01:41:25 +00:00
|
|
|
proto_tree_add_item(hello_tree, hf_isis_hello_holding_timer, tvb,
|
|
|
|
offset, 2, FALSE);
|
2000-06-19 08:33:50 +00:00
|
|
|
}
|
|
|
|
offset += 2;
|
|
|
|
|
2001-07-02 00:19:34 +00:00
|
|
|
pdu_length = tvb_get_ntohs(tvb, offset);
|
2000-06-19 08:33:50 +00:00
|
|
|
if (tree) {
|
2001-07-02 00:19:34 +00:00
|
|
|
proto_tree_add_uint(hello_tree, hf_isis_hello_pdu_length, tvb,
|
2000-06-19 08:33:50 +00:00
|
|
|
offset, 2, pdu_length);
|
|
|
|
}
|
|
|
|
offset += 2;
|
|
|
|
|
|
|
|
if (hello_type == ISIS_TYPE_PTP_HELLO) {
|
|
|
|
if (tree) {
|
2001-07-02 01:41:25 +00:00
|
|
|
proto_tree_add_item(hello_tree, hf_isis_hello_local_circuit_id, tvb,
|
|
|
|
offset, 1, FALSE );
|
2000-06-19 08:33:50 +00:00
|
|
|
}
|
|
|
|
offset += 1;
|
2002-08-28 21:04:11 +00:00
|
|
|
} else {
|
2002-08-29 18:52:54 +00:00
|
|
|
if (tree) {
|
|
|
|
octet = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, tvb,
|
|
|
|
offset, 1, octet,
|
|
|
|
"Priority : %d, reserved(0x%02x == 0)",
|
|
|
|
octet&ISIS_HELLO_PRIORITY_MASK,
|
|
|
|
octet&ISIS_HELLO_P_RESERVED_MASK );
|
|
|
|
}
|
|
|
|
offset += 1;
|
2001-04-08 19:32:05 +00:00
|
|
|
|
2000-06-19 08:33:50 +00:00
|
|
|
if (tree) {
|
2001-07-02 01:41:25 +00:00
|
|
|
lan_id = tvb_get_ptr(tvb, offset, id_length+1);
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree_add_bytes_format(hello_tree, hf_isis_hello_lan_id, tvb,
|
2008-12-19 17:39:52 +00:00
|
|
|
offset, id_length + 1, lan_id,
|
2002-08-29 18:52:54 +00:00
|
|
|
"System-ID {Designated IS} : %s",
|
2001-07-02 01:41:25 +00:00
|
|
|
print_system_id( lan_id, id_length + 1 ) );
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
2000-06-19 08:33:50 +00:00
|
|
|
offset += id_length + 1;
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
|
2000-06-19 08:33:50 +00:00
|
|
|
len = pdu_length;
|
1999-12-15 04:34:44 +00:00
|
|
|
len -= header_length;
|
|
|
|
if (len < 0) {
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_unknown(tvb, tree, offset,
|
2002-08-28 21:04:11 +00:00
|
|
|
"Packet header length %d went beyond packet",
|
1999-12-15 04:34:44 +00:00
|
|
|
header_length );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Now, we need to decode our CLVs. We need to pass in
|
|
|
|
* our list of valid ones!
|
|
|
|
*/
|
|
|
|
if (hello_type == ISIS_TYPE_L1_HELLO){
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_clvs(tvb, hello_tree, offset,
|
2001-07-02 00:19:34 +00:00
|
|
|
clv_l1_hello_opts, len, id_length,
|
|
|
|
ett_isis_hello_clv_unknown);
|
1999-12-15 04:34:44 +00:00
|
|
|
} else if (hello_type == ISIS_TYPE_L2_HELLO) {
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_clvs(tvb, hello_tree, offset,
|
2001-07-02 00:19:34 +00:00
|
|
|
clv_l2_hello_opts, len, id_length,
|
|
|
|
ett_isis_hello_clv_unknown);
|
1999-12-15 04:34:44 +00:00
|
|
|
} else {
|
2002-04-07 22:36:55 +00:00
|
|
|
isis_dissect_clvs(tvb, hello_tree, offset,
|
2001-07-02 00:19:34 +00:00
|
|
|
clv_ptp_hello_opts, len, id_length,
|
|
|
|
ett_isis_hello_clv_unknown);
|
1999-12-15 04:34:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2001-12-20 07:33:21 +00:00
|
|
|
* Name: isis_register_hello()
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Register our protocol sub-sets with protocol manager.
|
|
|
|
*
|
2002-08-28 21:04:11 +00:00
|
|
|
* Input:
|
2001-12-20 07:33:21 +00:00
|
|
|
* int : protocol index for the ISIS protocol
|
1999-12-15 04:34:44 +00:00
|
|
|
*
|
|
|
|
* Output:
|
|
|
|
* void
|
|
|
|
*/
|
|
|
|
void
|
2001-12-20 07:33:21 +00:00
|
|
|
isis_register_hello(int proto_isis) {
|
1999-12-15 04:34:44 +00:00
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_isis_hello_circuit_reserved,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Circuit type", "isis.hello.circuit_type",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_source_id,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "SystemID{ Sender of PDU }", "isis.hello.source_id",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_holding_timer,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Holding timer", "isis.hello.holding_timer",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_pdu_length,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "PDU length", "isis.hello.pdu_length",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_priority_reserved,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Priority", "isis.hello.priority",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, ISIS_HELLO_P_RESERVED_MASK, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_lan_id,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "SystemID{ Designated IS }", "isis.hello.lan_id",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_local_circuit_id,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Local circuit ID", "isis.hello.local_circuit_id",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_ipv4_int_addr,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "IPv4 interface address", "isis.hello.clv_ipv4_int_addr",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
1999-12-15 04:34:44 +00:00
|
|
|
|
2001-05-14 18:40:17 +00:00
|
|
|
{ &hf_isis_hello_clv_ipv6_int_addr,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "IPv6 interface address", "isis.hello.clv_ipv6_int_addr",
|
|
|
|
FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2001-05-14 18:40:17 +00:00
|
|
|
|
2001-06-23 19:45:12 +00:00
|
|
|
{ &hf_isis_hello_clv_ptp_adj,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Point-to-point Adjacency", "isis.hello.clv_ptp_adj",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2001-06-23 19:45:12 +00:00
|
|
|
|
2002-04-07 23:39:00 +00:00
|
|
|
{ &hf_isis_hello_clv_mt,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "MT-ID", "isis.hello.clv_mt",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2007-08-24 22:22:34 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_flags,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Restart Signaling Flags", "isis.hello.clv_restart_flags",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2007-08-24 22:22:34 +00:00
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_flags_rr,
|
|
|
|
{ "Restart Request", "isis.hello.clv_restart_flags.rr",
|
2009-04-07 12:20:41 +00:00
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_RR,
|
2007-08-24 22:22:34 +00:00
|
|
|
"When set, the router is beginning a graceful restart", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_flags_ra,
|
|
|
|
{ "Restart Acknowledgment", "isis.hello.clv_restart_flags.ra",
|
2009-04-07 12:20:41 +00:00
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_RA,
|
2007-08-24 22:22:34 +00:00
|
|
|
"When set, the router is willing to enter helper mode", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_flags_sa,
|
|
|
|
{ "Suppress Adjacency", "isis.hello.clv_restart_flags.sa",
|
2009-04-07 12:20:41 +00:00
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_SA,
|
2007-08-24 22:22:34 +00:00
|
|
|
"When set, the router is starting as opposed to restarting", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_remain_time,
|
|
|
|
{ "Remaining holding time", "isis.hello.clv_restart.remain_time",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"How long the helper router will maintain the existing adjacency", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_isis_hello_clv_restart_neighbor,
|
|
|
|
{ "Restarting Neighbor ID", "isis.hello.clv_restart.neighbor",
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
2007-08-24 22:22:34 +00:00
|
|
|
"The System ID of the restarting neighbor", HFILL }}
|
1999-12-15 04:34:44 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_isis_hello,
|
|
|
|
&ett_isis_hello_clv_area_addr,
|
|
|
|
&ett_isis_hello_clv_is_neighbors,
|
|
|
|
&ett_isis_hello_clv_padding,
|
|
|
|
&ett_isis_hello_clv_unknown,
|
|
|
|
&ett_isis_hello_clv_nlpid,
|
2003-12-08 20:40:33 +00:00
|
|
|
&ett_isis_hello_clv_authentication,
|
|
|
|
&ett_isis_hello_clv_ip_authentication,
|
1999-12-15 04:34:44 +00:00
|
|
|
&ett_isis_hello_clv_ipv4_int_addr,
|
2001-06-23 19:45:12 +00:00
|
|
|
&ett_isis_hello_clv_ipv6_int_addr,
|
|
|
|
&ett_isis_hello_clv_ptp_adj,
|
2002-02-09 23:44:38 +00:00
|
|
|
&ett_isis_hello_clv_mt,
|
2003-12-08 20:40:33 +00:00
|
|
|
&ett_isis_hello_clv_restart,
|
2007-08-24 22:22:34 +00:00
|
|
|
&ett_isis_hello_clv_restart_flags,
|
2003-12-08 20:40:33 +00:00
|
|
|
&ett_isis_hello_clv_checksum
|
1999-12-15 04:34:44 +00:00
|
|
|
};
|
|
|
|
|
2001-12-20 07:33:21 +00:00
|
|
|
proto_register_field_array(proto_isis, hf, array_length(hf));
|
1999-12-15 04:34:44 +00:00
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|