diff options
author | Jun-ichiro itojun Hagino <itojun@itojun.org> | 1999-10-15 05:46:18 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@itojun.org> | 1999-10-15 05:46:18 +0000 |
commit | fa965d7582b75a40acf08fafdf80a741782be2ec (patch) | |
tree | 32a96940a7acb70bb96a24aa23b319cc13fd2432 /packet-ipsec.c | |
parent | 33d11fff97631cf0663dcb47788f1b24d3dc5316 (diff) |
add ipcomp.flags to filter notation.
fix hexadecimal matching in lexer ("0x[a-fA-F0-9]+"), need more improvement.
svn path=/trunk/; revision=839
Diffstat (limited to 'packet-ipsec.c')
-rw-r--r-- | packet-ipsec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packet-ipsec.c b/packet-ipsec.c index e6654e0a09..0259e118cd 100644 --- a/packet-ipsec.c +++ b/packet-ipsec.c @@ -1,7 +1,7 @@ /* packet-ipsec.c * Routines for IPsec/IPComp packet disassembly * - * $Id: packet-ipsec.c,v 1.7 1999/10/15 05:30:40 itojun Exp $ + * $Id: packet-ipsec.c,v 1.8 1999/10/15 05:46:18 itojun Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -48,6 +48,7 @@ static int proto_esp = -1; static int hf_esp_spi = -1; static int hf_esp_sequence = -1; static int proto_ipcomp = -1; +static int hf_ipcomp_flags = -1; static int hf_ipcomp_cpi = -1; struct newah { @@ -217,9 +218,9 @@ dissect_ipcomp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) offset + offsetof(struct ipcomp, comp_nxt), 1, "Next Header: %s (0x%02x)", ipprotostr(ipcomp.comp_nxt), ipcomp.comp_nxt); - proto_tree_add_text(ipcomp_tree, + proto_tree_add_item(ipcomp_tree, hf_ipcomp_flags, offset + offsetof(struct ipcomp, comp_flags), 1, - "Flags: 0x%02x", ipcomp.comp_flags); + ipcomp.comp_flags); p = val_to_str(ntohs(ipcomp.comp_cpi), cpi2val, ""); if (p[0] == '\0') { proto_tree_add_item(ipcomp_tree, hf_ipcomp_cpi, @@ -259,6 +260,9 @@ proto_register_ipsec(void) }; static hf_register_info hf_ipcomp[] = { + { &hf_ipcomp_flags, + { "Flags", "ipcomp.flags", FT_UINT8, BASE_HEX, NULL, 0x0, + "" }}, { &hf_ipcomp_cpi, { "CPI", "ipcomp.cpi", FT_UINT16, BASE_HEX, NULL, 0x0, "" }}, |