/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.29 2000/03/12 04:47:40 gram Exp $
+ * $Id: packet-ipv6.c,v 1.30 2000/03/14 06:03:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
proto_tree_add_ipv6_format(ipv6_tree, hf_ipv6_src,
offset + offsetof(struct ip6_hdr, ip6_src), 16,
- &ipv6.ip6_src,
+ (guint8 *)&ipv6.ip6_src,
#ifdef INET6
"Source address: %s (%s)",
get_hostname6(&ipv6.ip6_src),
proto_tree_add_ipv6_format(ipv6_tree, hf_ipv6_dst,
offset + offsetof(struct ip6_hdr, ip6_dst), 16,
- &ipv6.ip6_dst,
+ (guint8 *)&ipv6.ip6_dst,
#ifdef INET6
"Destination address: %s (%s)",
get_hostname6(&ipv6.ip6_dst),
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
- * $Id: packet-l2tp.c,v 1.4 2000/03/12 04:47:41 gram Exp $
+ * $Id: packet-l2tp.c,v 1.5 2000/03/14 06:03:23 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
memcpy(&long_type,(tmp_ptr+=8),sizeof(unsigned long));
long_type = htonl(long_type);
proto_tree_add_uint_format(l2tp_avp_tree,hf_l2tp_code, offset + 6, 1,
- rhcode, " TIE_BREAKER %l 0x%x", long_type,long_type );
+ rhcode, " TIE_BREAKER %lu 0x%lx", long_type,long_type );
break;
case FIRMWARE_REVISION:
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.20 2000/03/09 18:31:51 ashokn Exp $
+ * $Id: packet-ospf.c,v 1.21 2000/03/14 06:03:23 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
case MPLS_LINK_MAX_BW:
case MPLS_LINK_MAX_RES_BW:
ti = proto_tree_add_text(tlv_tree, offset+link_len, stlv_len+4,
- "%s: %d", stlv_name,
+ "%s: %ld", stlv_name,
pieee_to_long(pd + offset + link_len + 4));
stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
proto_tree_add_text(stlv_tree, offset+link_len, 2,
"TLV Type: %d: %s", stlv_type, stlv_name);
proto_tree_add_text(stlv_tree, offset+link_len+2, 2, "TLV Length: %d", stlv_len);
- proto_tree_add_text(stlv_tree, offset+link_len+4, 4, "%s: %d", stlv_name,
+ proto_tree_add_text(stlv_tree, offset+link_len+4, 4, "%s: %ld", stlv_name,
pieee_to_long(pd + offset + link_len + 4));
break;
proto_tree_add_text(stlv_tree, offset+link_len+2, 2, "TLV Length: %d", stlv_len);
for (i=0; i<8; i++)
proto_tree_add_text(stlv_tree, offset+link_len+4+(i*4), 4,
- "Pri %d: %d", i,
+ "Pri %d: %ld", i,
pieee_to_long(pd + offset + link_len + 4 + i*4));
break;
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-rsvp.c,v 1.17 2000/03/13 05:19:50 ashokn Exp $
+ * $Id: packet-rsvp.c,v 1.18 2000/03/14 06:03:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
memcpy(&ip_addr, pd+offset2+8, 4);
proto_tree_add_text(rsvp_object_tree, offset2+8, 4,
- "Extended Tunnel ID: %d (%s)",
- ntohl(ip_addr), ip_to_str(pd+offset2+8));
+ "Extended Tunnel ID: %lu (%s)",
+ (unsigned long)ntohl(ip_addr),
+ ip_to_str(pd+offset2+8));
proto_tree_add_item_hidden(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
offset2+8, 4, ip_addr);
break;
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.55 2000/03/12 04:47:54 gram Exp $
+ * $Id: proto.c,v 1.56 2000/03/14 06:03:25 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
static void
proto_tree_set_value(field_info *fi, gint length, va_list ap);
static void
-proto_tree_set_bytes(field_info *fi, guint8* start_ptr, gint length);
+proto_tree_set_bytes(field_info *fi, const guint8* start_ptr, gint length);
static void
proto_tree_set_time(field_info *fi, struct timeval *value_ptr);
static void
-proto_tree_set_string(field_info *fi, char* value);
+proto_tree_set_string(field_info *fi, const char* value);
static void
proto_tree_set_ether(field_info *fi, guint8* value);
static void
/* Add a FT_BYTES to a proto_tree */
proto_item *
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, gint start, gint length,
- guint8 *start_ptr, const char *format, ...)
+ const guint8 *start_ptr, const char *format, ...)
{
proto_item *pi;
va_list ap;
/* Set the FT_BYTES value */
static void
-proto_tree_set_bytes(field_info *fi, guint8* start_ptr, gint length)
+proto_tree_set_bytes(field_info *fi, const guint8* start_ptr, gint length)
{
/* This g_malloc'ed memory is freed in
/* Add a FT_STRING to a proto_tree */
proto_item *
proto_tree_add_string_format(proto_tree *tree, int hfindex, gint start, gint length,
- char* value, const char *format, ...)
+ const char* value, const char *format, ...)
{
proto_item *pi;
va_list ap;
/* Set the FT_STRING value */
static void
-proto_tree_set_string(field_info *fi, char* value)
+proto_tree_set_string(field_info *fi, const char* value)
{
/* This g_strdup'ed memory is freed in proto_tree_free_node() */
fi->value.string = g_strdup(value);
proto_tree_add_uint_format(proto_tree *tree, int hfindex, gint start, gint length,
guint32 value, const char *format, ...)
{
- proto_item *pi;
+ proto_item *pi = NULL;
va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.24 2000/03/12 04:47:54 gram Exp $
+ * $Id: proto.h,v 1.25 2000/03/14 06:03:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#if __GNUC__ == 2
proto_item *
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, gint start,
- gint length, guint8* start_ptr, const char *format, ...)
+ gint length, const guint8* start_ptr, const char *format, ...)
__attribute__((format (printf, 6, 7)));
#else
proto_item *
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, gint start,
- gint length, guint8* start_ptr, const char *format, ...);
+ gint length, const guint8* start_ptr, const char *format, ...);
#endif
#if __GNUC__ == 2
#if __GNUC__ == 2
proto_item *
proto_tree_add_string_format(proto_tree *tree, int hfindex, gint start,
- gint length, char* value, const char *format, ...)
+ gint length, const char* value, const char *format, ...)
__attribute__((format (printf, 6, 7)));
#else
proto_item *
proto_tree_add_string_format(proto_tree *tree, int hfindex, gint start,
- gint length, char* value, const char *format, ...);
+ gint length, const char* value, const char *format, ...);
#endif
#if __GNUC__ == 2
* Routines for use by various SDLC-derived protocols, such as HDLC
* and its derivatives LAPB, IEEE 802.2 LLC, etc..
*
- * $Id: xdlc.c,v 1.12 2000/03/12 04:47:55 gram Exp $
+ * $Id: xdlc.c,v 1.13 2000/03/14 06:03:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
if (is_extended) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 2,
- frame_type,
+ control,
"Control field: %s (0x%04X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
proto_tree_add_text(control_tree, offset, 2,
} else {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 1,
- frame_type,
+ control,
"Control field: %s (0x%02X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
proto_tree_add_text(control_tree, offset, 1,
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 1,
- frame_type,
+ control,
"Control field: %s (0x%02X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
if (control & XDLC_P_F) {
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, (is_extended) ? 2 : 1,
- frame_type,
+ control,
(is_extended) ? "Control field: %s (0x%04X)"
: "Control field: %s (0x%02X)",
info, control);