aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-11-18 10:38:33 +0000
committerGuy Harris <guy@alum.mit.edu>2000-11-18 10:38:33 +0000
commitc8196a1d1ca5a5021388cfc1bcbb64cdda5e9dc3 (patch)
tree5e117f446c6e233d14b642596d67c985e685f328 /packet-ip.h
parent56a0c40c18271046d22bffcc5db10cfb16a2bf6c (diff)
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors. Register the IP dissector and have dissectors that call it directly (rather than through a port table) call it through a handle. Add a routine "tvb_set_reported_length()" which a dissector can use if it was handed a tvbuff that contains more data than is actually in its part of the packet - for example, handing a padded Ethernet frame to IP; the routine sets the reported length of the tvbuff (and also adjusts the actual length, as appropriate). Then use it in IP. Given that, "ethertype()" can determine how much of the Ethernet frame was actually part of an IP datagram (and can do the same for other protocols under Ethernet that use "tvb_set_reported_length()"; have it return the actual length, and have "dissect_eth()" and "dissect_vlan()" use that to mark trailer data in Ethernet II frames as well as in 802.3 frames. svn path=/trunk/; revision=2658
Diffstat (limited to 'packet-ip.h')
-rw-r--r--packet-ip.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-ip.h b/packet-ip.h
index ac4485f4b9..aa6324d055 100644
--- a/packet-ip.h
+++ b/packet-ip.h
@@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
- * $Id: packet-ip.h,v 1.14 2000/05/26 21:54:50 guy Exp $
+ * $Id: packet-ip.h,v 1.15 2000/11/18 10:38:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -28,7 +28,7 @@
#define __PACKET_IP_H__
void capture_ip(const u_char *, int, packet_counts *);
-void dissect_ip(const u_char *, int, frame_data *, proto_tree *);
+void dissect_ip(tvbuff_t *, packet_info *, proto_tree *);
#define IP_PROTO_IP 0 /* dummy for IP */
#define IP_PROTO_HOPOPTS 0 /* IP6 hop-by-hop options */
@@ -76,12 +76,12 @@ typedef struct ip_tcp_opt {
int *subtree_index; /* pointer to subtree index for option */
opt_len_type len_type; /* type of option length field */
int optlen; /* value length should be (minimum if VARIABLE) */
- void (*dissect)(const struct ip_tcp_opt *, const u_char *, int, guint, proto_tree *);
+ void (*dissect)(const struct ip_tcp_opt *, tvbuff_t *, int, guint, proto_tree *);
/* routine to dissect option */
} ip_tcp_opt;
/* Routine to dissect IP or TCP options. */
-void dissect_ip_tcp_options(const u_char *, int, guint,
+void dissect_ip_tcp_options(tvbuff_t *, int, guint,
const ip_tcp_opt *, int, int, proto_tree *);
/* Dissector table for "ip.proto"; used by IPv6 as well as IPv4 */