forked from osmocom/wireshark
From Hariharan Ananthakrishnan:
I have added two new display filters to support filtering based on LSP-ID and hostname for ISIS protocol. svn path=/trunk/; revision=24621
This commit is contained in:
parent
f8e75ecd32
commit
106968d7e8
4
AUTHORS
4
AUTHORS
|
@ -2723,6 +2723,10 @@ Holger Pfrommer <hpfrommer [AT] hilscher.com> {
|
|||
Hilscher analyzer protocols dissection
|
||||
}
|
||||
|
||||
Hariharan Ananthakrishnan <hariharan.a [AT] gmail.com> {
|
||||
ISIS LSP-ID and hostname enhancements
|
||||
}
|
||||
|
||||
and by:
|
||||
|
||||
Pavel Roskin <proski [AT] gnu.org>
|
||||
|
|
|
@ -231,6 +231,7 @@ isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
* 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
|
||||
* int : tree id to use for proto tree.
|
||||
*
|
||||
* Output:
|
||||
* void, but we will add to proto tree if !NULL.
|
||||
|
@ -239,7 +240,7 @@ isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
|
||||
void
|
||||
isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
||||
int length)
|
||||
int length, int tree_id)
|
||||
{
|
||||
if ( !tree ) return; /* nothing to do! */
|
||||
|
||||
|
@ -247,9 +248,10 @@ isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
proto_tree_add_text ( tree, tvb, offset, length,
|
||||
"Hostname: --none--" );
|
||||
} else {
|
||||
proto_tree_add_text ( tree, tvb, offset, length,
|
||||
"Hostname: %.*s", length,
|
||||
tvb_get_ptr(tvb, offset, length) );
|
||||
const char* value = tvb_get_ptr(tvb, offset, length);
|
||||
proto_tree_add_string_format ( tree, tree_id,
|
||||
tvb, offset, length,
|
||||
value, "Hostname: %.*s", length, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ extern void isis_dissect_ip_int_clv(tvbuff_t *tvb, proto_tree *tree,
|
|||
extern void isis_dissect_mt_clv(tvbuff_t *tvb, proto_tree *tree,
|
||||
int offset, int length, int tree_id);
|
||||
extern void isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree,
|
||||
int offset, int length);
|
||||
int offset, int length, int tree_id);
|
||||
extern void isis_dissect_authentication_clv(tvbuff_t *tvb, proto_tree *tree,
|
||||
int offset, int length);
|
||||
extern void isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree,
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
static int hf_isis_lsp_pdu_length = -1;
|
||||
static int hf_isis_lsp_remaining_life = -1;
|
||||
static int hf_isis_lsp_sequence_number = -1;
|
||||
static int hf_isis_lsp_lsp_id = -1;
|
||||
static int hf_isis_lsp_hostname = -1;
|
||||
static int hf_isis_lsp_checksum = -1;
|
||||
static int hf_isis_lsp_checksum_bad = -1;
|
||||
static int hf_isis_lsp_checksum_good = -1;
|
||||
|
@ -943,7 +945,8 @@ static void
|
|||
dissect_lsp_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
||||
int id_length _U_, int length)
|
||||
{
|
||||
isis_dissect_hostname_clv(tvb, tree, offset, length);
|
||||
isis_dissect_hostname_clv(tvb, tree, offset, length,
|
||||
hf_isis_lsp_hostname);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1801,9 +1804,11 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
|
|||
offset_checksum = offset;
|
||||
|
||||
if (tree) {
|
||||
proto_tree_add_text(lsp_tree, tvb, offset, id_length + 2,
|
||||
"LSP-ID: %s",
|
||||
print_system_id( tvb_get_ptr(tvb, offset, id_length+2), id_length+2 ) );
|
||||
char* value = print_system_id( tvb_get_ptr(tvb, offset, id_length+2),
|
||||
id_length+2);
|
||||
proto_tree_add_string_format(lsp_tree, hf_isis_lsp_lsp_id,
|
||||
tvb, offset, id_length + 2,
|
||||
value, "LSP-ID: %s", value);
|
||||
}
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
|
@ -1930,6 +1935,14 @@ isis_register_lsp(int proto_isis) {
|
|||
{ "Remaining lifetime", "isis.lsp.remaining_life", FT_UINT16,
|
||||
BASE_DEC, NULL, 0x0, "", HFILL }},
|
||||
|
||||
{ &hf_isis_lsp_lsp_id,
|
||||
{ "LSP-ID", "isis.lsp.lsp_id", FT_STRING,
|
||||
BASE_NONE, NULL, 0x0, "", HFILL }},
|
||||
|
||||
{ &hf_isis_lsp_hostname,
|
||||
{ "Hostname", "isis.lsp.hostname", FT_STRING,
|
||||
BASE_NONE, NULL, 0x0, "", HFILL }},
|
||||
|
||||
{ &hf_isis_lsp_sequence_number,
|
||||
{ "Sequence number", "isis.lsp.sequence_number",
|
||||
FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
|
||||
|
|
Loading…
Reference in New Issue