forked from osmocom/wireshark
OSI network layer over PPP support, fix to P2P ISIS processing, and ISIS
hostname TLV support, from Hannes Gredler. svn path=/trunk/; revision=3271
This commit is contained in:
parent
69a945b5ce
commit
376056336c
6
AUTHORS
6
AUTHORS
|
@ -560,6 +560,12 @@ Michal Melerowicz <Michal.Melerowicz@nokia.com> {
|
|||
GTP support
|
||||
}
|
||||
|
||||
Hannes Gredler <hannes@juniper.net> {
|
||||
OSI network layer over PPP support
|
||||
Fix to P2P ISIS processing
|
||||
ISIS hostname TLV support
|
||||
}
|
||||
|
||||
Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to
|
||||
give his permission to use his version of snprintf.c.
|
||||
|
||||
|
|
|
@ -1085,6 +1085,7 @@ B<http://www.ethereal.com>.
|
|||
Martin Thomas <martin_a_thomas@yahoo.com>
|
||||
Hartmut Mueller <hartmut@wendolene.ping.de>
|
||||
Michal Melerowicz <Michal.Melerowicz@nokia.com>
|
||||
Hannes Gredler <hannes@juniper.net>
|
||||
|
||||
Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to give his
|
||||
permission to use his version of snprintf.c.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-clv.c
|
||||
* Common CLV decode routines.
|
||||
*
|
||||
* $Id: packet-isis-clv.c,v 1.8 2000/08/11 13:35:17 deniel Exp $
|
||||
* $Id: packet-isis-clv.c,v 1.9 2001/04/08 19:32:03 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -172,6 +172,53 @@ isis_dissect_authentication_clv(const u_char *pd, int offset, guint length,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Name: isis_dissect_hostname_clv()
|
||||
*
|
||||
* Description:
|
||||
* dump the hostname information found in TLV 137
|
||||
* pls note that the hostname is not null terminated
|
||||
*
|
||||
* Input:
|
||||
* u_char * : packet data
|
||||
* int : offset into packet data where we are.
|
||||
* guint : length of clv we are decoding
|
||||
* frame_data * : frame data (complete frame)
|
||||
* proto_tree * : protocol display tree to fill out. May be NULL
|
||||
* char * : Password meaning
|
||||
*
|
||||
* Output:
|
||||
* void, but we will add to proto tree if !NULL.
|
||||
*/
|
||||
|
||||
|
||||
void
|
||||
isis_dissect_hostname_clv(const u_char *pd, int offset,
|
||||
guint length, frame_data *fd, proto_tree *tree ) {
|
||||
char sbuf[256*6];
|
||||
char *s = sbuf;
|
||||
int hlen = length;
|
||||
int old_offset = offset;
|
||||
|
||||
|
||||
if ( !tree ) return; /* nothing to do! */
|
||||
|
||||
memcpy ( s, &pd[offset], hlen);
|
||||
sbuf[hlen] = 0; /* don't forget null termination */
|
||||
|
||||
if ( hlen == 0 ) {
|
||||
sprintf ( sbuf, "--none--" );
|
||||
}
|
||||
|
||||
proto_tree_add_text ( tree, NullTVB, old_offset, hlen,
|
||||
"Hostname: %s", sbuf );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Name: isis_dissect_ip_int_clv()
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-clv.h
|
||||
* Declares for common clv decoding functions.
|
||||
*
|
||||
* $Id: packet-isis-clv.h,v 1.2 2000/06/19 08:33:48 guy Exp $
|
||||
* $Id: packet-isis-clv.h,v 1.3 2001/04/08 19:32:03 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -56,4 +56,6 @@ extern void isis_dissect_ip_int_clv(const u_char *pd, int offset,
|
|||
guint length, frame_data *fd, proto_tree *tree, gint tree_id );
|
||||
extern void isis_dissect_nlpid_clv(const u_char *pd, int offset,
|
||||
guint length, frame_data *fd, proto_tree *tree );
|
||||
extern void isis_dissect_hostname_clv(const u_char *pd, int offset,
|
||||
guint length, frame_data *fd, proto_tree *tree );
|
||||
#endif /* _PACKET_ISIS_CLV_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-hello.c
|
||||
* Routines for decoding isis hello packets and their CLVs
|
||||
*
|
||||
* $Id: packet-isis-hello.c,v 1.11 2001/01/03 06:55:29 guy Exp $
|
||||
* $Id: packet-isis-hello.c,v 1.12 2001/04/08 19:32:03 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -479,15 +479,6 @@ isis_dissect_isis_hello(int hello_type, int header_length, int id_length,
|
|||
}
|
||||
offset += 2;
|
||||
|
||||
if (tree) {
|
||||
proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, NullTVB,
|
||||
offset, 1, pd[offset],
|
||||
"Priority : %d, reserved(0x%02x == 0)",
|
||||
pd[offset]&ISIS_HELLO_PRIORITY_MASK,
|
||||
pd[offset]&ISIS_HELLO_P_RESERVED_MASK );
|
||||
}
|
||||
offset += 1;
|
||||
|
||||
if (hello_type == ISIS_TYPE_PTP_HELLO) {
|
||||
if (tree) {
|
||||
proto_tree_add_uint(hello_tree, hf_isis_hello_local_circuit_id, NullTVB,
|
||||
|
@ -495,6 +486,16 @@ isis_dissect_isis_hello(int hello_type, int header_length, int id_length,
|
|||
}
|
||||
offset += 1;
|
||||
} else {
|
||||
|
||||
if (tree) {
|
||||
proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, NullTVB,
|
||||
offset, 1, pd[offset],
|
||||
"Priority : %d, reserved(0x%02x == 0)",
|
||||
pd[offset]&ISIS_HELLO_PRIORITY_MASK,
|
||||
pd[offset]&ISIS_HELLO_P_RESERVED_MASK );
|
||||
}
|
||||
offset += 1;
|
||||
|
||||
if (tree) {
|
||||
proto_tree_add_bytes_format(hello_tree, hf_isis_hello_lan_id, NullTVB,
|
||||
offset, id_length + 1, &pd[offset],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-lsp.c
|
||||
* Routines for decoding isis lsp packets and their CLVs
|
||||
*
|
||||
* $Id: packet-isis-lsp.c,v 1.10 2001/01/03 06:55:29 guy Exp $
|
||||
* $Id: packet-isis-lsp.c,v 1.11 2001/04/08 19:32:03 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -64,6 +64,7 @@ static gint ett_isis_lsp_clv_unknown = -1;
|
|||
static gint ett_isis_lsp_clv_partition_dis = -1;
|
||||
static gint ett_isis_lsp_clv_prefix_neighbors = -1;
|
||||
static gint ett_isis_lsp_clv_nlpid = -1;
|
||||
static gint ett_isis_lsp_clv_hostname = -1;
|
||||
static gint ett_isis_lsp_clv_auth = -1;
|
||||
static gint ett_isis_lsp_clv_ipv4_int_addr = -1;
|
||||
static gint ett_isis_lsp_clv_ip_reachability = -1;
|
||||
|
@ -97,6 +98,8 @@ static void dissect_lsp_ip_reachability_clv(const u_char *pd, int offset,
|
|||
guint length, int id_length, frame_data *fd, proto_tree *tree);
|
||||
static void dissect_lsp_nlpid_clv(const u_char *pd, int offset,
|
||||
guint length, int id_length, frame_data *fd, proto_tree *tree);
|
||||
static void dissect_lsp_hostname_clv(const u_char *pd, int offset,
|
||||
guint length, int id_length, frame_data *fd, proto_tree *tree);
|
||||
static void dissect_lsp_ip_int_addr_clv(const u_char *pd, int offset,
|
||||
guint length, int id_length, frame_data *fd, proto_tree *tree);
|
||||
static void dissect_lsp_l1_auth_clv(const u_char *pd, int offset,
|
||||
|
@ -135,6 +138,12 @@ static const isis_clv_handle_t clv_l1_lsp_opts[] = {
|
|||
&ett_isis_lsp_clv_nlpid,
|
||||
dissect_lsp_nlpid_clv
|
||||
},
|
||||
{
|
||||
ISIS_CLV_L1_LSP_HOSTNAME,
|
||||
"Hostname",
|
||||
&ett_isis_lsp_clv_hostname,
|
||||
dissect_lsp_hostname_clv
|
||||
},
|
||||
{
|
||||
ISIS_CLV_L1_LSP_IP_INTERFACE_ADDR,
|
||||
"IP Interface address(es)",
|
||||
|
@ -198,6 +207,12 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
|
|||
&ett_isis_lsp_clv_nlpid,
|
||||
dissect_lsp_nlpid_clv
|
||||
},
|
||||
{
|
||||
ISIS_CLV_L2_LSP_HOSTNAME,
|
||||
"Hostname",
|
||||
&ett_isis_lsp_clv_hostname,
|
||||
dissect_lsp_hostname_clv
|
||||
},
|
||||
{
|
||||
ISIS_CLV_L2_LSP_IP_EXT_REACHABLE,
|
||||
"IP external reachability",
|
||||
|
@ -358,6 +373,29 @@ dissect_lsp_nlpid_clv(const u_char *pd, int offset,
|
|||
isis_dissect_nlpid_clv(pd, offset, length, fd, tree );
|
||||
}
|
||||
|
||||
/*
|
||||
* Name: dissect_lsp_hostname_clv()
|
||||
*
|
||||
* Description:
|
||||
* Decode for a lsp packets hostname clv. Calls into the
|
||||
* clv common one.
|
||||
*
|
||||
* Input:
|
||||
* u_char * : packet data
|
||||
* int : current offset into packet data
|
||||
* guint : length of this clv
|
||||
* int : length of IDs in packet.
|
||||
* frame_data * : frame data
|
||||
* proto_tree * : proto tree to build on (may be null)
|
||||
*
|
||||
* Output:
|
||||
* void, will modify proto_tree if not null.
|
||||
*/
|
||||
static void
|
||||
dissect_lsp_hostname_clv(const u_char *pd, int offset,
|
||||
guint length, int id_length, frame_data *fd, proto_tree *tree) {
|
||||
isis_dissect_hostname_clv(pd, offset, length, fd, tree );
|
||||
}
|
||||
/*
|
||||
* Name: dissect_lsp_ip_int_addr_clv()
|
||||
*
|
||||
|
@ -946,6 +984,7 @@ proto_register_isis_lsp(void) {
|
|||
&ett_isis_lsp_clv_prefix_neighbors,
|
||||
&ett_isis_lsp_clv_auth,
|
||||
&ett_isis_lsp_clv_nlpid,
|
||||
&ett_isis_lsp_clv_hostname,
|
||||
&ett_isis_lsp_clv_ipv4_int_addr,
|
||||
&ett_isis_lsp_clv_ip_reachability,
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-lsp.h
|
||||
* Defines and such for LSP and their CLV decodes
|
||||
*
|
||||
* $Id: packet-isis-lsp.h,v 1.2 2000/06/19 08:33:49 guy Exp $
|
||||
* $Id: packet-isis-lsp.h,v 1.3 2001/04/08 19:32:03 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -62,6 +62,7 @@
|
|||
#define ISIS_CLV_L1_LSP_IP_INT_REACHABLE 128
|
||||
#define ISIS_CLV_L1_LSP_NLPID 129
|
||||
#define ISIS_CLV_L1_LSP_IP_INTERFACE_ADDR 132
|
||||
#define ISIS_CLV_L1_LSP_HOSTNAME 137
|
||||
/*
|
||||
* Note, the spec say 133, but everyone seems to use 10. Any clue on why
|
||||
* this is would be appreciated!
|
||||
|
@ -81,6 +82,7 @@
|
|||
#define ISIS_CLV_L2_LSP_IP_EXT_REACHABLE 130
|
||||
#define ISIS_CLV_L2_LSP_IDRP_INFO 131
|
||||
#define ISIS_CLV_L2_LSP_IP_INTERFACE_ADDR 132
|
||||
#define ISIS_CLV_L2_LSP_HOSTNAME 137
|
||||
/*
|
||||
* Note, the spec say 133, but everyone seems to use 10. Any clue on why
|
||||
* this is would be appreciated!
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for ISO/OSI network and transport protocol packet disassembly
|
||||
* Main entrance point and common functions
|
||||
*
|
||||
* $Id: packet-osi.c,v 1.42 2001/04/01 05:48:14 hagbard Exp $
|
||||
* $Id: packet-osi.c,v 1.43 2001/04/08 19:32:03 guy Exp $
|
||||
* Laurent Deniel <deniel@worldnet.fr>
|
||||
* Ralf Schneider <Ralf.Schneider@t-online.de>
|
||||
*
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include "llcsaps.h"
|
||||
#include "aftypes.h"
|
||||
#include "nlpid.h"
|
||||
#include "ppptypes.h"
|
||||
#include "packet-osi.h"
|
||||
#include "packet-isis.h"
|
||||
#include "packet-esis.h"
|
||||
|
@ -152,5 +153,6 @@ void
|
|||
proto_reg_handoff_osi(void)
|
||||
{
|
||||
dissector_add("llc.dsap", SAP_OSINL, dissect_osi, -1);
|
||||
dissector_add("ppp.protocol", PPP_OSI, dissect_osi, -1);
|
||||
dissector_add("null.type", BSD_AF_ISO, dissect_osi, -1);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* ppptypes.h
|
||||
* Defines PPP packet types.
|
||||
*
|
||||
* $Id: ppptypes.h,v 1.6 2001/03/15 09:11:01 guy Exp $
|
||||
* $Id: ppptypes.h,v 1.7 2001/04/08 19:32:03 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -32,6 +32,7 @@
|
|||
|
||||
*/
|
||||
#define PPP_IP 0x21 /* Internet Protocol */
|
||||
#define PPP_OSI 0x23
|
||||
#define PPP_AT 0x29 /* AppleTalk Protocol */
|
||||
#define PPP_IPX 0x2b /* IPX protocol */
|
||||
#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
|
||||
|
|
Loading…
Reference in New Issue