diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-07 22:52:57 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-07 22:52:57 +0000 |
commit | 07f42b5b31f9523deeb147226521f77a2c8dd797 (patch) | |
tree | c720d2a42f11c9d14ac1a161eb785b438c2c4b14 /packet-ipsec.c | |
parent | fba49cfe85d4b23ebbffa97fae126a379e913ecd (diff) |
Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.
svn path=/trunk/; revision=342
Diffstat (limited to 'packet-ipsec.c')
-rw-r--r-- | packet-ipsec.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/packet-ipsec.c b/packet-ipsec.c index 5d74f133ad..c4b54e4e5f 100644 --- a/packet-ipsec.c +++ b/packet-ipsec.c @@ -1,7 +1,7 @@ /* packet-ipsec.c * Routines for IPsec packet disassembly * - * $Id: packet-ipsec.c,v 1.1 1999/03/29 02:21:34 gram Exp $ + * $Id: packet-ipsec.c,v 1.2 1999/07/07 22:51:45 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -85,19 +85,18 @@ dissect_ah(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { /* !!! specify length */ - ti = proto_tree_add_item(tree, offset, advance, "Authentication Header"); - ah_tree = proto_tree_new(); - proto_item_add_subtree(ti, ah_tree, ETT_AH); + ti = proto_tree_add_text(tree, offset, advance, "Authentication Header"); + ah_tree = proto_item_add_subtree(ti, ETT_AH); - proto_tree_add_item(ah_tree, offset + offsetof(struct newah, ah_nxt), 1, + proto_tree_add_text(ah_tree, offset + offsetof(struct newah, ah_nxt), 1, "Next Header: %d", ah.ah_nxt); - proto_tree_add_item(ah_tree, offset + offsetof(struct newah, ah_len), 1, + proto_tree_add_text(ah_tree, offset + offsetof(struct newah, ah_len), 1, "Length: %d", ah.ah_len << 2); - proto_tree_add_item(ah_tree, offset + offsetof(struct newah, ah_spi), 4, + proto_tree_add_text(ah_tree, offset + offsetof(struct newah, ah_spi), 4, "SPI: %08x", (guint32)ntohl(ah.ah_spi)); - proto_tree_add_item(ah_tree, offset + offsetof(struct newah, ah_seq), 4, + proto_tree_add_text(ah_tree, offset + offsetof(struct newah, ah_seq), 4, "Sequence?: %08x", (guint32)ntohl(ah.ah_seq)); - proto_tree_add_item(ah_tree, offset + sizeof(ah), (ah.ah_len - 1) << 2, + proto_tree_add_text(ah_tree, offset + sizeof(ah), (ah.ah_len - 1) << 2, "ICV"); } @@ -130,12 +129,11 @@ dissect_esp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) * (ie none) */ if(tree) { - ti = proto_tree_add_item(tree, 0, 0, "Encapsulated Security Payload"); - esp_tree = proto_tree_new(); - proto_item_add_subtree(ti, esp_tree, ETT_ESP); - proto_tree_add_item(esp_tree, offset + offsetof(struct newesp, esp_spi), 4, + ti = proto_tree_add_text(tree, 0, 0, "Encapsulated Security Payload"); + esp_tree = proto_item_add_subtree(ti, ETT_ESP); + proto_tree_add_text(esp_tree, offset + offsetof(struct newesp, esp_spi), 4, "SPI: %08x", (guint32)ntohl(esp.esp_spi)); - proto_tree_add_item(esp_tree, offset + offsetof(struct newesp, esp_seq), 4, + proto_tree_add_text(esp_tree, offset + offsetof(struct newesp, esp_seq), 4, "Sequence?: %08x", (guint32)ntohl(esp.esp_seq)); } } |