With the tvbuffication of all dissectors, the "packet_info" structure no
longer contains length fields, so there's no need to pass a "packet_info *" argument to "set_actual_length()". svn path=/trunk/; revision=4748
This commit is contained in:
parent
ac5a603cb7
commit
d92a1cd8e1
|
@ -1,7 +1,7 @@
|
|||
/* packet.c
|
||||
* Routines for packet disassembly
|
||||
*
|
||||
* $Id: packet.c,v 1.58 2002/02/11 19:02:56 gram Exp $
|
||||
* $Id: packet.c,v 1.59 2002/02/17 00:51:21 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -100,11 +100,11 @@ packet_cleanup(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Given a tvbuff, a packet_info *, and a length from a packet header,
|
||||
* adjust the length of the tvbuff to reflect the specified length.
|
||||
* Given a tvbuff, and a length from a packet header, adjust the length
|
||||
* of the tvbuff to reflect the specified length.
|
||||
*/
|
||||
void
|
||||
set_actual_length(tvbuff_t *tvb, packet_info *pinfo, guint specified_len)
|
||||
set_actual_length(tvbuff_t *tvb, guint specified_len)
|
||||
{
|
||||
guint payload_len, reported_payload_len;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet.h
|
||||
* Definitions for packet disassembly structures and routines
|
||||
*
|
||||
* $Id: packet.h,v 1.50 2002/02/06 22:19:04 guy Exp $
|
||||
* $Id: packet.h,v 1.51 2002/02/17 00:51:21 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -205,13 +205,10 @@ extern void dissect_init(void);
|
|||
extern void dissect_cleanup(void);
|
||||
|
||||
/*
|
||||
* Given a tvbuff, a packet_info *, and a length from a packet header,
|
||||
* adjust the length of the tvbuff, and the "len" and "captured_len"
|
||||
* members of the "packet_info" structure, to reflect the specified
|
||||
* length.
|
||||
* Given a tvbuff, and a length from a packet header, adjust the length
|
||||
* of the tvbuff to reflect the specified length.
|
||||
*/
|
||||
extern void set_actual_length(tvbuff_t *tvb, packet_info *pinfo,
|
||||
guint specified_len);
|
||||
extern void set_actual_length(tvbuff_t *tvb, guint specified_len);
|
||||
|
||||
/* Allow protocols to register "init" routines, which are called before
|
||||
we make a pass through a capture file and dissect all its packets
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-eap.c
|
||||
* Routines for EAP Extensible Authentication Protocol header disassembly
|
||||
*
|
||||
* $Id: packet-eap.c,v 1.6 2002/02/06 22:45:43 guy Exp $
|
||||
* $Id: packet-eap.c,v 1.7 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -94,7 +94,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
len = eaph.eap_len;
|
||||
|
||||
set_actual_length(tvb, pinfo, len);
|
||||
set_actual_length(tvb, len);
|
||||
|
||||
eap_tree = NULL;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-eapol.c
|
||||
* Routines for EAPOL 802.1X authentication header disassembly
|
||||
*
|
||||
* $Id: packet-eapol.c,v 1.5 2002/01/21 07:36:34 guy Exp $
|
||||
* $Id: packet-eapol.c,v 1.6 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -87,7 +87,7 @@ dissect_eapol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
len = sizeof(eapolh) + eapolh.eapol_len;
|
||||
|
||||
set_actual_length(tvb, pinfo, len);
|
||||
set_actual_length(tvb, len);
|
||||
|
||||
eapol_tree = NULL;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ip.c
|
||||
* Routines for IP and miscellaneous IP protocol packet disassembly
|
||||
*
|
||||
* $Id: packet-ip.c,v 1.160 2002/02/01 12:04:54 guy Exp $
|
||||
* $Id: packet-ip.c,v 1.161 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -846,7 +846,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
len = iph.ip_len;
|
||||
|
||||
/* Adjust the length of this tvbuff to include only the IP datagram. */
|
||||
set_actual_length(tvb, pinfo, len);
|
||||
set_actual_length(tvb, len);
|
||||
|
||||
hlen = lo_nibble(iph.ip_v_hl) * 4; /* IP header length, in bytes */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ipv6.c
|
||||
* Routines for IPv6 packet disassembly
|
||||
*
|
||||
* $Id: packet-ipv6.c,v 1.75 2002/01/21 07:36:35 guy Exp $
|
||||
* $Id: packet-ipv6.c,v 1.76 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -675,7 +675,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
plen = ntohs(ipv6.ip6_plen);
|
||||
|
||||
/* Adjust the length of this tvbuff to include only the IPv6 datagram. */
|
||||
set_actual_length(tvb, pinfo, plen + sizeof (struct ip6_hdr));
|
||||
set_actual_length(tvb, plen + sizeof (struct ip6_hdr));
|
||||
|
||||
SET_ADDRESS(&pinfo->net_src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16));
|
||||
SET_ADDRESS(&pinfo->src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for NetWare's IPX
|
||||
* Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* $Id: packet-ipx.c,v 1.101 2002/01/24 09:20:48 guy Exp $
|
||||
* $Id: packet-ipx.c,v 1.102 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -224,7 +224,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ipx_length = tvb_get_ntohs(tvb, 2);
|
||||
|
||||
/* Adjust the tvbuff length to include only the IPX datagram. */
|
||||
set_actual_length(tvb, pinfo, ipx_length);
|
||||
set_actual_length(tvb, ipx_length);
|
||||
|
||||
src_net_node = tvb_get_ptr(tvb, 18, 10);
|
||||
dst_net_node = tvb_get_ptr(tvb, 6, 10);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-snaeth.c
|
||||
* Routines for SNA-over-Ethernet (Ethernet type 80d5)
|
||||
*
|
||||
* $Id: packet-snaeth.c,v 1.1 2002/02/17 00:16:19 guy Exp $
|
||||
* $Id: packet-snaeth.c,v 1.2 2002/02/17 00:51:19 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -75,7 +75,7 @@ dissect_snaeth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* Adjust the length of this tvbuff to include only the SNA-over-
|
||||
* Ethernet header and data.
|
||||
*/
|
||||
set_actual_length(tvb, pinfo, 3 + len);
|
||||
set_actual_length(tvb, 3 + len);
|
||||
|
||||
/*
|
||||
* Rest of packet starts with an 802.2 LLC header.
|
||||
|
|
Loading…
Reference in New Issue