Make tvb_get_ptr() return 'const guint8*', and clean up all the
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Mar 2001 21:34:28 +0000 (21:34 +0000)
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Mar 2001 21:34:28 +0000 (21:34 +0000)
usages of tvb_get_ptr(). packet-ieee80211.c still has one bad usage,
in which it *does* modify the tvbuff's data.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3128 f5534014-38df-0310-8fa8-9805f1628bb7

24 files changed:
epan/ftypes/ftype-tvbuff.c
epan/tvbuff.c
epan/tvbuff.h
packet-aarp.c
packet-arp.c
packet-arp.h
packet-bootp.c
packet-bpdu.c
packet-clnp.c
packet-cups.c
packet-eth.c
packet-ieee80211.c
packet-ipx.c
packet-ntp.c
packet-radius.c
packet-rip.c
packet-sap.c
packet-sll.c
packet-smtp.c
packet-sna.c
packet-tr.c
packet-vines.c
packet-vtp.c
packet-zebra.c

index 1df9ef8f71cbec732f421ccfcd115370f00b1999..97e3fa7ed23f466386396bd6b0715d2231f94b30 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ftype-tvbuff.c,v 1.4 2001/03/02 17:17:56 gram Exp $
+ * $Id: ftype-tvbuff.c,v 1.5 2001/03/13 21:34:28 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -60,7 +60,7 @@ len(fvalue_t *fv)
 static void
 slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
 {
-       guint8* data;
+       const guint8* data;
 
        if (fv->value.tvb) {
                TRY {
index 07104dd121f36eb15daaeeadc3abc45b0c2f9766..d2152bc679ed5785f88385bf935349d998c117f3 100644 (file)
@@ -9,7 +9,7 @@
  *             the data of a backing tvbuff, or can be a composite of
  *             other tvbuffs.
  *
- * $Id: tvbuff.c,v 1.14 2000/12/27 12:48:27 guy Exp $
+ * $Id: tvbuff.c,v 1.15 2001/03/13 21:34:27 gram Exp $
  *
  * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
  *
@@ -936,7 +936,7 @@ tvb_memdup(tvbuff_t *tvb, gint offset, gint length)
 
 
        
-guint8*
+const guint8*
 tvb_get_ptr(tvbuff_t *tvb, gint offset, gint length)
 {
        return ensure_contiguous(tvb, offset, length);
index e205e1a6c4d1cabdbd4f768ce09f76cc92214f05..21f224fbb4ca2eaf0a47c97d9a6a5dfa37b13b48 100644 (file)
@@ -9,7 +9,7 @@
  *             the data of a backing tvbuff, or can be a composite of
  *             other tvbuffs.
  *
- * $Id: tvbuff.h,v 1.10 2000/12/27 12:48:27 guy Exp $
+ * $Id: tvbuff.h,v 1.11 2001/03/13 21:34:27 gram Exp $
  *
  * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
  *
@@ -268,7 +268,7 @@ guint8* tvb_memdup(tvbuff_t*, gint offset, gint length);
  * and the pointer to the newly-contiguous data is returned. This dynamically-
  * allocated memory will be freed when the tvbuff is freed, after the
  * tvbuff_free_cb_t() is called, if any. */
-guint8* tvb_get_ptr(tvbuff_t*, gint offset, gint length);
+const guint8* tvb_get_ptr(tvbuff_t*, gint offset, gint length);
 
 /* Find first occurence of any of the needles in tvbuff, starting at offset.
  * Searches at most maxlength number of bytes; if maxlength is -1, searches
index 2a66320116c494c816ff4a1d986ed9758ad1b7e6..6935e869aa1abcf83ebafdf609f50503cb7dcee4 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-aarp.c
  * Routines for Appletalk ARP packet disassembly
  *
- * $Id: packet-aarp.c,v 1.28 2001/01/22 00:20:29 guy Exp $
+ * $Id: packet-aarp.c,v 1.29 2001/03/13 21:34:23 gram Exp $
  *
  * Simon Wilkinson <sxw@dcs.ed.ac.uk>
  *
@@ -101,7 +101,7 @@ atalkid_to_str(const guint8 *ad) {
 }
 
 static gchar *
-aarphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type) {
+aarphrdaddr_to_str(const guint8 *ad, int ad_len, guint16 type) {
   if ((type == AARPHRD_ETHER || type == AARPHRD_TR) && ad_len == 6) {
     /* Ethernet address (or Token Ring address, which is the same type
        of address). */
@@ -111,7 +111,7 @@ aarphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type) {
 }
 
 static gchar *
-aarpproaddr_to_str(guint8 *ad, int ad_len, guint16 type) {
+aarpproaddr_to_str(const guint8 *ad, int ad_len, guint16 type) {
   if (type == ETHERTYPE_ATALK && ad_len == 4) {
     /* IP address.  */
     return atalkid_to_str(ad);
@@ -138,7 +138,7 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   proto_item  *ti;
   gchar       *op_str;
   int         sha_offset, spa_offset, tha_offset, tpa_offset;
-  guint8      *sha_val, *spa_val, *tha_val, *tpa_val;
+  const guint8      *sha_val, *spa_val, *tha_val, *tpa_val;
   gchar       *sha_str, *spa_str, *tha_str, *tpa_str;
 
   if(check_col(pinfo->fd, COL_PROTOCOL))
index 2d975c19b04d9775cfc85998d42a0b3e3b3346da..e95a76d25cab883bdf328a8712c0b21bba348316 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-arp.c
  * Routines for ARP packet disassembly
  *
- * $Id: packet-arp.c,v 1.42 2001/01/09 06:31:33 guy Exp $
+ * $Id: packet-arp.c,v 1.43 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -151,7 +151,7 @@ static const value_string atmop_vals[] = {
 #define        ATMARP_LEN_MASK 0x3F    /* length of {sub}address in type/length */
 
 gchar *
-arphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type)
+arphrdaddr_to_str(const guint8 *ad, int ad_len, guint16 type)
 {
   if (ad_len == 0)
     return "<No address>";
@@ -165,7 +165,7 @@ arphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type)
 }
 
 static gchar *
-arpproaddr_to_str(guint8 *ad, int ad_len, guint16 type)
+arpproaddr_to_str(const guint8 *ad, int ad_len, guint16 type)
 {
   if (ad_len == 0)
     return "<No address>";
@@ -180,7 +180,7 @@ arpproaddr_to_str(guint8 *ad, int ad_len, guint16 type)
 #define        MAX_E164_STR_LEN                20
 
 static gchar *
-atmarpnum_to_str(guint8 *ad, int ad_tl)
+atmarpnum_to_str(const guint8 *ad, int ad_tl)
 {
   int           ad_len = ad_tl & ATMARP_LEN_MASK;
   static gchar  str[N_ATMARPNUM_TO_STR_STRINGS][MAX_E164_STR_LEN+3+1];
@@ -218,7 +218,7 @@ atmarpnum_to_str(guint8 *ad, int ad_tl)
 }
 
 static gchar *
-atmarpsubaddr_to_str(guint8 *ad, int ad_tl)
+atmarpsubaddr_to_str(const guint8 *ad, int ad_tl)
 {
   int           ad_len = ad_tl & ATMARP_LEN_MASK;
 
@@ -403,8 +403,8 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   gchar       *op_str;
   int         sha_offset, ssa_offset, spa_offset;
   int         tha_offset, tsa_offset, tpa_offset;
-  guint8      *sha_val, *ssa_val, *spa_val;
-  guint8      *tha_val, *tsa_val, *tpa_val;
+  const guint8      *sha_val, *ssa_val, *spa_val;
+  const guint8      *tha_val, *tsa_val, *tpa_val;
   gchar       *sha_str, *ssa_str, *spa_str;
   gchar       *tha_str, *tsa_str, *tpa_str;
   proto_tree  *tl_tree;
@@ -647,7 +647,7 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_item  *ti;
   gchar       *op_str;
   int         sha_offset, spa_offset, tha_offset, tpa_offset;
-  guint8      *sha_val, *spa_val, *tha_val, *tpa_val;
+  const guint8      *sha_val, *spa_val, *tha_val, *tpa_val;
   gchar       *sha_str, *spa_str, *tha_str, *tpa_str;
 
   CHECK_DISPLAY_AS_DATA(proto_arp, tvb, pinfo, tree);
@@ -748,7 +748,7 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     /* inform resolv.c module of the new discovered addresses */
 
     u_int ip;
-    guint8 *mac;
+    const guint8 *mac;
 
     /* add sender address in all cases */
 
index ce44a2c7a2fd46c2af31d940561eac8884e415fc..6e93f52d6561ea6a4730bd105b0a4ceda1bb8505 100644 (file)
@@ -2,7 +2,7 @@
  * Definitions of routines for ARP packet disassembly that are used
  * elsewhere
  *
- * $Id: packet-arp.h,v 1.4 2000/11/13 07:18:40 guy Exp $
+ * $Id: packet-arp.h,v 1.5 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -27,7 +27,7 @@
 #ifndef __PACKET_ARP_H__
 #define __PACKET_ARP_H__
 
-gchar *arphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type);
+gchar *arphrdaddr_to_str(const guint8 *ad, int ad_len, guint16 type);
 gchar *arphrdtype_to_str(guint16 hwtype, const char *fmt);
 
 void dissect_atm_nsap(tvbuff_t *tvb, int offset, int len, proto_tree *tree);
index 8e83d5b1519178f5c08b5adb798c6b44b8604a95..b30bd8d919d59b74a6d9f63a5ae9cf2e3f601829 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BOOTP/DHCP packet disassembly
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-bootp.c,v 1.47 2001/02/13 00:01:07 guy Exp $
+ * $Id: packet-bootp.c,v 1.48 2001/03/13 21:34:23 gram Exp $
  *
  * The information used comes from:
  * RFC  951: Bootstrap Protocol
@@ -688,7 +688,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_item      *ti;
        guint8          op;
        guint8          htype, hlen;
-       guint8          *haddr;
+       const guint8    *haddr;
        int             voff, eoff; /* vender offset, end offset */
        guint32         ip_addr;
        gboolean        is_dhcp = FALSE;
index 4849d503b7f152de4c61acc1a280f6124567bca4..b2b20816298700b29e5e4a1b3922caab7fd8f230 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-bpdu.c
  * Routines for BPDU (Spanning Tree Protocol) disassembly
  *
- * $Id: packet-bpdu.c,v 1.23 2001/02/08 07:32:11 guy Exp $
+ * $Id: packet-bpdu.c,v 1.24 2001/03/13 21:34:23 gram Exp $
  *
  * Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
  * 
@@ -86,11 +86,11 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
       guint8  bpdu_type;
       guint8  flags;
       guint16 root_identifier_bridge_priority;
-      guint8  *root_identifier_mac;
+      const guint8  *root_identifier_mac;
       gchar   *root_identifier_mac_str;
       guint32 root_path_cost;
       guint16 bridge_identifier_bridge_priority;
-      guint8  *bridge_identifier_mac;
+      const guint8  *bridge_identifier_mac;
       gchar   *bridge_identifier_mac_str;
       guint16 port_identifier;
       double message_age;
index 8e385813505c1c2f8a334ac95ac17844ccfb181b..22157aa32be118a1821601b0adf4a09e723bc125 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-clnp.c
  * Routines for ISO/OSI network and transport protocol packet disassembly
  *
- * $Id: packet-clnp.c,v 1.24 2001/01/22 08:03:44 guy Exp $
+ * $Id: packet-clnp.c,v 1.25 2001/03/13 21:34:23 gram Exp $
  * Laurent Deniel <deniel@worldnet.fr>
  * Ralf Schneider <Ralf.Schneider@t-online.de>
  *
@@ -1565,7 +1565,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint16     cnf_cksum;
   int         offset;
   u_char      src_len, dst_len, nsel, opt_len = 0;
-  guint8     *dst_addr, *src_addr;
+  const guint8     *dst_addr, *src_addr;
   guint       len;
   guint       next_length;
   proto_tree *discpdu_tree;
index e8bf42ca5d024c9d46b9de28340452c13b6b03bb..bf9c4638c94b1b37f505766231cf9457cb5de3a4 100644 (file)
@@ -5,7 +5,7 @@
 * Charles Levert <charles@comm.polymtl.ca>
 * Copyright 2001 Charles Levert
 *
-* $Id: packet-cups.c,v 1.1 2001/03/11 02:08:30 guy Exp $
+* $Id: packet-cups.c,v 1.2 2001/03/13 21:34:23 gram Exp $
 *
 * 
 * This program is free software; you can redistribute it and/or
@@ -136,9 +136,9 @@ static guint get_hex_uint(tvbuff_t *tvb, gint offset,
     gint *next_offset);
 static void get_space(tvbuff_t *tvb, gint offset,
     gint *next_offset);
-static guint8* get_quoted_string(tvbuff_t *tvb, gint offset,
+static const guint8* get_quoted_string(tvbuff_t *tvb, gint offset,
     gint *next_offset, guint *len);
-static guint8* get_unquoted_string(tvbuff_t *tvb, gint offset,
+static const guint8* get_unquoted_string(tvbuff_t *tvb, gint offset,
     gint *next_offset, guint *len);
 
 /**********************************************************************/
@@ -153,7 +153,7 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        gint            next_offset;
        guint           len;
        unsigned int    u;
-       guint8          *str;
+       const guint8    *str;
        cups_ptype_t    ptype;
        unsigned int    state;
 
@@ -287,11 +287,11 @@ get_space(tvbuff_t *tvb, gint offset, gint *next_offset)
        return;
 }
 
-static guint8*
+static const guint8*
 get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len)
 {
        int c;
-       guint8* s = 0;
+       const guint8* s = NULL;
        guint l = 0;
        gint o;
 
@@ -312,10 +312,10 @@ get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len)
        return s;
 }
 
-static guint8*
+static const guint8*
 get_unquoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len)
 {
-       guint8* s = 0;
+       const guint8* s = NULL;
        guint l = 0;
        gint o;
 
index 5e1e34e064f7fb7a8c959f53b388c4b26792a711..61fa7b9c650e1553aee83c5e709f57d7a7592275 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-eth.c
  * Routines for ethernet packet disassembly
  *
- * $Id: packet-eth.c,v 1.60 2001/02/08 07:08:05 guy Exp $
+ * $Id: packet-eth.c,v 1.61 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -146,7 +146,7 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
   int                  orig_captured_len;
   proto_item           *ti;
-  guint8               *dst, *src;
+  const guint8         *dst, *src;
   const guint8         *pd;
 
   guint16              etype;
index 9d1dcdac9fb21ecc1705436b14a628d9d24552c0..af59e22f0e59bde557b938d75a542fb25e88c140 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2000, Axis Communications AB 
  * Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
  *
- * $Id: packet-ieee80211.c,v 1.13 2001/02/01 06:20:25 guy Exp $
+ * $Id: packet-ieee80211.c,v 1.14 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@unicom.net>
@@ -376,7 +376,7 @@ get_tagged_parameter_tree (proto_tree * tree, tvbuff_t *tvb, int start, int size
 static void
 add_fixed_field (proto_tree * tree, tvbuff_t * tvb, int offset, int lfcode)
 {
-  guint8 *dataptr;
+  const guint8 *dataptr;
   char out_buff[SHORT_STR];
   guint16 *temp16;
   proto_item *cap_item;
@@ -518,8 +518,8 @@ add_fixed_field (proto_tree * tree, tvbuff_t * tvb, int offset, int lfcode)
 static int
 add_tagged_field (proto_tree * tree, tvbuff_t * tvb, int offset)
 {
-  guint8 *tag_info_ptr;
-  guint8 *tag_data_ptr;
+  const guint8 *tag_info_ptr;
+  const guint8 *tag_data_ptr;
   guint32 tag_no, tag_len;
   int i, n;
   char out_buff[SHORT_STR];
@@ -727,7 +727,7 @@ static void
 dissect_ieee80211 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 {
   guint16 fcf, flags;
-  guint8 *src = NULL, *dst = NULL;
+  const guint8 *src = NULL, *dst = NULL;
   proto_item *ti;
   proto_item *flag_item;
   proto_item *fc_item;
index 712fc58a3b032b1828ac0470dd9c984411813b53..79b1540313683c92208c0532352593aa259517a5 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for NetWare's IPX
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-ipx.c,v 1.78 2001/02/27 07:28:47 guy Exp $
+ * $Id: packet-ipx.c,v 1.79 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -284,7 +284,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *ipx_tree;
        proto_item      *ti;
 
-       guint8          *src_net_node, *dst_net_node;
+       const guint8    *src_net_node, *dst_net_node;
 
        guint8          ipx_type, ipx_hops;
        guint16         ipx_length;
index 387cc938cd81f3a8617ea021afd389ed1d1a81a0..03e723edcdc5c9350dc9f358f975dde6a534ec1e 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for NTP packet dissection
  * Copyright 1999, Nathan Neulinger <nneul@umr.edu>
  *
- * $Id: packet-ntp.c,v 1.25 2001/01/22 08:03:45 guy Exp $
+ * $Id: packet-ntp.c,v 1.26 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -221,7 +221,7 @@ static gint ett_ntp_flags = -1;
  * returns pointer to filled buffer.
  */
 static char *
-ntp_fmt_ts(guint8 *reftime, char* buff)
+ntp_fmt_ts(const guint8 *reftime, char* buff)
 {
        guint32 tempstmp, tempfrac;
        time_t temptime;
@@ -260,11 +260,11 @@ dissect_ntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        gint8           precision;
        double          rootdelay;
        double          rootdispersion;
-       guint8          *refid;
-       guint8          *reftime;
-       guint8          *org;
-       guint8          *rec;
-       guint8          *xmt;
+       const guint8    *refid;
+       const guint8    *reftime;
+       const guint8    *org;
+       const guint8    *rec;
+       const guint8    *xmt;
        gchar           buff[NTP_TS_SIZE];
        int             i;
 
index 60bec9b7694aeea22ca3c217a20fcd1cedb12fbb..8dc4ea1ce78746d49ac2bae1c71d0ca0252eebcb 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for RADIUS packet disassembly
  * Copyright 1999 Johan Feyaerts
  *
- * $Id: packet-radius.c,v 1.27 2001/02/20 08:10:14 guy Exp $
+ * $Id: packet-radius.c,v 1.28 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -486,7 +486,7 @@ gchar *rdconvertbufftostr(gchar *dest, tvbuff_t *tvb, int offset, int length)
 /*converts the raw buffer into printable text */
        guint32 i;
        guint32 totlen=0;
-       guint8 *pd = tvb_get_ptr(tvb, offset, length);
+       const guint8 *pd = tvb_get_ptr(tvb, offset, length);
 
         dest[0]='"';
         dest[1]=0;
@@ -519,7 +519,7 @@ gchar *rd_value_to_str(e_avphdr *avph, tvbuff_t *tvb, int offset)
   gchar *cont;
   value_string *valstrarr;
   guint32 intval;
-  guint8 *pd;
+  const guint8 *pd;
   guint8 tag;
 
 /* prints the values of the attribute value pairs into a text buffer */
index 38ce10a98847a3adaad94b4de7c1e2ad94ecc777..7723a09828bddf53dab986b665ba2db12245c510 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for RIPv1 and RIPv2 packet disassembly
  * (c) Copyright Hannes R. Boehm <hannes@boehm.org>
  *
- * $Id: packet-rip.c,v 1.23 2001/01/22 08:03:45 guy Exp $
+ * $Id: packet-rip.c,v 1.24 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -140,7 +140,7 @@ dissect_ip_rip_vektor(tvbuff_t *tvb, int offset, guint8 version,
 {
     proto_item *ti;
     proto_tree *rip_vektor_tree;
-    guint8 *ip;
+    const guint8 *ip;
     guint32 metric;
 
     ip = tvb_get_ptr(tvb, offset+4, 4);
index 8485a667bc4e0eb46d0965a9c921b8aee527eafe..ec32bc0b1bf5c606007215fa3fb23bea6b7c1362 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Heikki Vatiainen <hessu@cs.tut.fi>
  *
- * $Id: packet-sap.c,v 1.19 2001/01/25 06:14:14 guy Exp $
+ * $Id: packet-sap.c,v 1.20 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -135,7 +135,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         guint8 vers_flags;
         guint8 auth_len;
         guint16 tmp1;
-        guint8 *addr;
+        const guint8 *addr;
         guint8 auth_flags;
         tvbuff_t *next_tvb;
 
index 1dbf75b2ef532e897382226955146428ad81c160..62ba3fab7c14e72a6e1b5477bce2de51648fc81e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-sll.c
  * Routines for disassembly of packets from Linux "cooked mode" captures
  *
- * $Id: packet-sll.c,v 1.7 2001/01/21 22:51:46 guy Exp $
+ * $Id: packet-sll.c,v 1.8 2001/03/13 21:34:23 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -136,7 +136,7 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint16 pkttype;
        guint16 protocol;
        guint16 hatype, halen;
-       guint8 *src;
+       const guint8 *src;
        proto_item *ti;
        tvbuff_t *next_tvb;
        proto_tree *fh_tree = NULL;
index 3ad8e2be848ec8289c2b637c01566c89d79ae03b..781ee12dfac72d061c596413f2c1407335727086 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-smtp.c
  * Routines for SMTP packet disassembly
  *
- * $Id: packet-smtp.c,v 1.15 2001/01/25 06:14:14 guy Exp $
+ * $Id: packet-smtp.c,v 1.16 2001/03/13 21:34:23 gram Exp $
  *
  * Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
  *
@@ -167,7 +167,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     conversation_t          *conversation;
     struct smtp_request_key request_key, *new_request_key;
     struct smtp_request_val *request_val;
-    char                    *line;
+    const char              *line;
     int                     linelen;
     gboolean                eom_seen = FALSE;
     gint                    next_offset;
index b36f0e96644eaef572fb64bacaf2f0736bf1469f..5aa5ea89266630d88e1f9291de85e0b475572b8a 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SNA
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-sna.c,v 1.25 2001/01/25 06:14:14 guy Exp $
+ * $Id: packet-sna.c,v 1.26 2001/03/13 21:34:24 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -416,7 +416,7 @@ dissect_fid0_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *bf_tree;
        proto_item      *bf_item;
        guint8          th_0;
-       guint8          *ptr;
+       const guint8    *ptr;
 
        const int bytes_in_header = 10;
 
@@ -471,7 +471,7 @@ dissect_fid2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *bf_tree;
        proto_item      *bf_item;
        guint8          th_0=0, daf=0, oaf=0;
-       guint8          *ptr;
+       const guint8    *ptr;
 
        const int bytes_in_header = 6;
 
index 8486c2b3f732118cae4a6c83ab6cb0d746c92e24..de256211c2739a5b5f5ad4a74d0fdaa115d38a47 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for Token-Ring packet disassembly
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-tr.c,v 1.60 2001/02/23 17:19:52 gram Exp $
+ * $Id: packet-tr.c,v 1.61 2001/03/13 21:34:24 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -141,8 +141,8 @@ static dissector_handle_t llc_handle;
  */
 int check_for_old_linux_tvb(tvbuff_t *tvb)
 {
-       guint8  *data;
-       int     x, bytes;
+       const guint8    *data;
+       int             x, bytes;
 
        /* Restrict our looping to the boundaries of the frame */
        bytes = tvb_length(tvb);
index ecf41060395f35fcb2cf00b5d687056bfc422dfc..31dc1fa5f5994bc3df07390152b21412c8da5d17 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-vines.c
  * Routines for Banyan VINES protocol packet disassembly
  *
- * $Id: packet-vines.c,v 1.24 2001/02/04 10:29:49 guy Exp $
+ * $Id: packet-vines.c,v 1.25 2001/03/13 21:34:24 gram Exp $
  *
  * Don Lafontaine <lafont02@cn.ca>
  *
@@ -199,7 +199,7 @@ dissect_vines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree *vip_tree;
        proto_item *ti;
 /*     gchar      tos_str[32]; */
-       guint8     *dst_addr, *src_addr;
+       const guint8     *dst_addr, *src_addr;
        int  is_broadcast = 0;
        int  hops = 0;
        tvbuff_t *next_tvb;
index 460698b0f358a443c30526fd7b4105afbea925f9..a7b1fc4c25dc4bbcae5b2990148b4b891f940e22 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-vtp.c
  * Routines for the disassembly of Cisco's Virtual Trunking Protocol
  *
- * $Id: packet-vtp.c,v 1.12 2001/02/05 02:47:31 guy Exp $
+ * $Id: packet-vtp.c,v 1.13 2001/03/13 21:34:24 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -99,7 +99,7 @@ dissect_vtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        int offset = 0;
        guint8 code;
        guint8 md_len;
-       guint8 *upd_timestamp;
+       const guint8 *upd_timestamp;
        int vlan_info_len;
 
        if (check_col(pinfo->fd, COL_PROTOCOL))
index 424e761c6898c32225603521c5e09dbb94b38dfb..33b194ea8562479e45d725e7f49780d2c5fe445b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Jochen Friedrich <jochen@scram.de>
  *
- * $Id: packet-zebra.c,v 1.9 2001/01/22 08:03:46 guy Exp $
+ * $Id: packet-zebra.c,v 1.10 2001/03/13 21:34:24 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -198,7 +198,7 @@ dissect_zebra_request(proto_tree *tree, gboolean request, tvbuff_t *tvb,
        guint32 prefix4;
        guint16 i;
        guint8  buffer6[16], prefixlen, message;
-       guint8 *prefix;
+       const guint8 *prefix;
        proto_item *ti;
        proto_tree *msg_tree;