/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
- * $Id: packet-isis-hello.c,v 1.27 2002/02/09 23:44:38 guy Exp $
+ * $Id: packet-isis-hello.c,v 1.28 2002/04/07 22:36:55 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
* Predclare dissectors for use in clv dissection.
*/
static void dissect_hello_padding_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_is_neighbors_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_ptp_adj_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_area_address_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_auth_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_ipv6_int_addr_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_ip_int_addr_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_mt_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_nlpid_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static void dissect_hello_restart_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length);
+ proto_tree *tree, int offset, int id_length, int length);
static const isis_clv_handle_t clv_l1_hello_opts[] = {
static void
dissect_hello_restart_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
int restart_options;
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
*/
static void
dissect_hello_nlpid_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_nlpid_clv(tvb, pinfo, tree, offset, length);
+ isis_dissect_nlpid_clv(tvb, tree, offset, length);
}
/*
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
static void
dissect_hello_mt_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_mt_clv(tvb, pinfo, tree, offset, length,
+ isis_dissect_mt_clv(tvb, tree, offset, length,
hf_isis_hello_clv_mt );
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
*/
static void
dissect_hello_ip_int_addr_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_ip_int_clv(tvb, pinfo, tree, offset, length,
+ isis_dissect_ip_int_clv(tvb, tree, offset, length,
hf_isis_hello_clv_ipv4_int_addr );
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
*/
static void
dissect_hello_ipv6_int_addr_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_ipv6_int_clv(tvb, pinfo, tree, offset, length,
+ isis_dissect_ipv6_int_clv(tvb, tree, offset, length,
hf_isis_hello_clv_ipv6_int_addr );
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
*/
static void
dissect_hello_auth_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_authentication_clv(tvb, pinfo, tree, offset,
+ isis_dissect_authentication_clv(tvb, tree, offset,
length, "authentication" );
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
*/
static void
dissect_hello_area_address_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
- isis_dissect_area_address_clv(tvb, pinfo, tree, offset, length);
+ isis_dissect_area_address_clv(tvb, tree, offset, length);
}
static void
dissect_hello_ptp_adj_clv(tvbuff_t *tvb,
- packet_info *pinfo, proto_tree *tree, int offset,
- int id_length, int length)
+ proto_tree *tree, int offset, int id_length, int length)
{
char adj_state[20];
"Neighbor Extended Local circuit ID: 0x%08x", tvb_get_ntohl(tvb, offset+11) );
break;
default:
- isis_dissect_unknown(tvb, pinfo, tree, offset,
+ isis_dissect_unknown(tvb, tree, offset,
"malformed TLV (%d vs 1,5,11,15)", length );
return;
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : protocol display tree to fill out. May be NULL
* int : offset into packet data where we are.
* int : length of IDs in packet.
* void, but we will add to proto tree if !NULL.
*/
static void
-dissect_hello_is_neighbors_clv(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, int offset, int id_length, int length)
+dissect_hello_is_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
+ int id_length, int length)
{
while ( length > 0 ) {
if (length<6) {
- isis_dissect_unknown(tvb, pinfo, tree, offset,
+ isis_dissect_unknown(tvb, tree, offset,
"short is neighbor (%d vs 6)", length );
return;
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
* void
*/
static void
-dissect_hello_padding_clv(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, int offset, int id_length, int length)
+dissect_hello_padding_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
+ int id_length, int length)
{
/* nothing to do here! */
}
*
* Input:
* tvbuff_t * : tvbuffer for packet data
- * packet_info * : info for current packet
* proto_tree * : protocol display tree to add to. May be NULL.
* int offset : our offset into packet data.
* int : hello type, a la packet-isis.h ISIS_TYPE_* values
* void, will modify proto_tree if not NULL.
*/
void
-isis_dissect_isis_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- int offset, int hello_type, int header_length, int id_length)
+isis_dissect_isis_hello(tvbuff_t *tvb, proto_tree *tree, int offset,
+ int hello_type, int header_length, int id_length)
{
proto_item *ti;
proto_tree *hello_tree = NULL;
len = pdu_length;
len -= header_length;
if (len < 0) {
- isis_dissect_unknown(tvb, pinfo, tree, offset,
+ isis_dissect_unknown(tvb, tree, offset,
"Packet header length %d went beyond packet",
header_length );
return;
* our list of valid ones!
*/
if (hello_type == ISIS_TYPE_L1_HELLO){
- isis_dissect_clvs(tvb, pinfo, hello_tree, offset,
+ isis_dissect_clvs(tvb, hello_tree, offset,
clv_l1_hello_opts, len, id_length,
ett_isis_hello_clv_unknown);
} else if (hello_type == ISIS_TYPE_L2_HELLO) {
- isis_dissect_clvs(tvb, pinfo, hello_tree, offset,
+ isis_dissect_clvs(tvb, hello_tree, offset,
clv_l2_hello_opts, len, id_length,
ett_isis_hello_clv_unknown);
} else {
- isis_dissect_clvs(tvb, pinfo, hello_tree, offset,
+ isis_dissect_clvs(tvb, hello_tree, offset,
clv_ptp_hello_opts, len, id_length,
ett_isis_hello_clv_unknown);
}