Move the pointer to the "column_info" structure in the "frame_data"
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 Dec 2001 00:26:21 +0000 (00:26 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 Dec 2001 00:26:21 +0000 (00:26 +0000)
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

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

196 files changed:
epan/column-utils.c
epan/column-utils.h
epan/epan.c
epan/epan.h
epan/frame_data.h
epan/packet.c
epan/packet.h
epan/packet_info.h
file.c
gtk/packet_win.c
packet-aarp.c
packet-afs.c
packet-aim.c
packet-arp.c
packet-ascend.c
packet-atalk.c
packet-atm.c
packet-auto_rp.c
packet-bacapp.c
packet-bacnet.c
packet-beep.c
packet-bgp.c
packet-bootp.c
packet-bpdu.c
packet-bvlc.c
packet-cdp.c
packet-cgmp.c
packet-chdlc.c
packet-clip.c
packet-clnp.c
packet-cops.c
packet-cups.c
packet-dcerpc.c
packet-ddtp.c
packet-dec-bpdu.c
packet-diameter.c
packet-dns.c
packet-dsi.c
packet-dvmrp.c
packet-eap.c
packet-eapol.c
packet-eigrp.c
packet-esis.c
packet-eth.c
packet-ethertype.c
packet-fddi.c
packet-fr.c
packet-frame.c
packet-ftp.c
packet-giop.c
packet-gmrp.c
packet-gnutella.c
packet-gre.c
packet-gtp.c
packet-gvrp.c
packet-h1.c
packet-h261.c
packet-hsrp.c
packet-http.c
packet-icap.c
packet-icmpv6.c
packet-icp.c
packet-icq.c
packet-ieee80211.c
packet-igmp.c
packet-igrp.c
packet-imap.c
packet-ip.c
packet-ip.h
packet-ipp.c
packet-ipsec.c
packet-ipv6.c
packet-ipx.c
packet-irc.c
packet-isakmp.c
packet-iscsi.c
packet-isis.c
packet-isl.c
packet-isup.c
packet-iua.c
packet-kerberos.c
packet-l2tp.c
packet-lapb.c
packet-lapbether.c
packet-lapd.c
packet-ldap.c
packet-ldp.c
packet-llc.c
packet-lmi.c
packet-lpd.c
packet-m2pa.c
packet-m3ua.c
packet-mapi.c
packet-mbtcp.c
packet-mip.c
packet-mmse.c
packet-mpeg1.c
packet-mpls.c
packet-mrdisc.c
packet-msdp.c
packet-msnip.c
packet-msproxy.c
packet-mtp3.c
packet-nbipx.c
packet-nbns.c
packet-ncp.c
packet-ncp2222.inc
packet-netbios.c
packet-nntp.c
packet-ntp.c
packet-null.c
packet-osi.c
packet-ospf.c
packet-pgm.c
packet-pim.c
packet-pop.c
packet-portmap.c
packet-ppp.c
packet-pppoe.c
packet-pptp.c
packet-prism.c
packet-q2931.c
packet-q931.c
packet-qllc.c
packet-quake.c
packet-quake2.c
packet-quake3.c
packet-quakeworld.c
packet-radius.c
packet-ranap.c
packet-raw.c
packet-rip.c
packet-ripng.c
packet-rlogin.c
packet-rpc.c
packet-rsh.c
packet-rsvp.c
packet-rtcp.c
packet-rtp.c
packet-rtsp.c
packet-rx.c
packet-sap.c
packet-sctp.c
packet-sdp.c
packet-sip.c
packet-skinny.c
packet-sll.c
packet-smb-browse.c
packet-smb-logon.c
packet-smb-mailslot.c
packet-smb-pipe.c
packet-smb.c
packet-smpp.c
packet-smtp.c
packet-sna.c
packet-snmp.c
packet-socks.c
packet-srvloc.c
packet-sscop.c
packet-ssl.c
packet-sua.c
packet-syslog.c
packet-tacacs.c
packet-tcp.c
packet-telnet.c
packet-tftp.c
packet-time.c
packet-tns.c
packet-tpkt.c
packet-tr.c
packet-trmac.c
packet-ucp.c
packet-udp.c
packet-v120.c
packet-vines.c
packet-vlan.c
packet-vrrp.c
packet-vtp.c
packet-wccp.c
packet-wcp.c
packet-who.c
packet-wsp.c
packet-wtls.c
packet-wtp.c
packet-x11.c
packet-x25.c
packet-xot.c
packet-yhoo.c
packet-zebra.c
plugins/giop/packet-coseventcomm.c
plugins/giop/packet-cosnaming.c
plugins/gryphon/packet-gryphon.c
plugins/mgcp/packet-mgcp.c
proto_hier_stats.c
tethereal.c
xdlc.c

index 31baabe866b0699e78ac27176119e041029fb8ff..4e57baaa429183f275ffce0bc4725f82f9dd8c1f 100644 (file)
@@ -1,12 +1,11 @@
 /* column-utils.c
  * Routines for column utilities.
  *
- * $Id: column-utils.c,v 1.7 2001/11/21 23:16:23 gram Exp $
+ * $Id: column-utils.c,v 1.8 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- *
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -67,41 +66,33 @@ col_init(column_info *col_info, gint num_cols)
   col_info->col_buf    = (gchar **) g_malloc(sizeof(gchar *) * num_cols);
 }
 
+#if 0
 /*
  * This function does not appear to be used anywhere...  
-
+ */
 gboolean
-col_get_writable(frame_data *fd)
+col_get_writable(column_info *cinfo)
 {
-  if (fd) {
-
-    return (fd->cinfo ? fd->cinfo->writable : FALSE);
-
-  }
-
-  return FALSE;
-
+       return (cinfo ? cinfo->writable : FALSE);
 }
-
-*/
+#endif
 
 void
-col_set_writable(frame_data *fd, gboolean writable)
+col_set_writable(column_info *cinfo, gboolean writable)
 {
-       if (fd->cinfo) {
-               fd->cinfo->writable = writable;
-       }
+       if (cinfo)
+               cinfo->writable = writable;
 }
 
 /* Checks to see if a particular packet information element is needed for
    the packet list */
 gint
-check_col(frame_data *fd, gint el) {
+check_col(column_info *cinfo, gint el) {
   int i;
 
-  if (fd->cinfo && fd->cinfo->writable) {
-    for (i = 0; i < fd->cinfo->num_cols; i++) {
-      if (fd->cinfo->fmt_matx[i][el])
+  if (cinfo && cinfo->writable) {
+    for (i = 0; i < cinfo->num_cols; i++) {
+      if (cinfo->fmt_matx[i][el])
         return TRUE;
     }
   }
@@ -117,13 +108,13 @@ check_col(frame_data *fd, gint el) {
    later append to it, as the later append will cause a string
    copy to be done. */
 void
-col_clear(frame_data *fd, gint el) {
+col_clear(column_info *cinfo, gint el) {
   int    i;
 
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el]) {
-      fd->cinfo->col_buf[i][0] = 0;
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el]) {
+      cinfo->col_buf[i][0] = 0;
+      cinfo->col_data[i] = cinfo->col_buf[i];
     }
   }
 }
@@ -131,18 +122,18 @@ col_clear(frame_data *fd, gint el) {
 /* Use this if "str" points to something that will stay around (and thus
    needn't be copied). */
 void
-col_set_str(frame_data *fd, gint el, gchar* str) {
+col_set_str(column_info *cinfo, gint el, gchar* str) {
   int i;
   
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el])
-      fd->cinfo->col_data[i] = str;
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el])
+      cinfo->col_data[i] = str;
   }
 }
 
 /* Adds a vararg list to a packet info string. */
 void
-col_add_fstr(frame_data *fd, gint el, gchar *format, ...) {
+col_add_fstr(column_info *cinfo, gint el, gchar *format, ...) {
   va_list ap;
   int     i;
   size_t  max_len;
@@ -153,17 +144,17 @@ col_add_fstr(frame_data *fd, gint el, gchar *format, ...) {
        max_len = COL_MAX_LEN;
   
   va_start(ap, format);
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el]) {
-      vsnprintf(fd->cinfo->col_buf[i], max_len, format, ap);
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el]) {
+      vsnprintf(cinfo->col_buf[i], max_len, format, ap);
+      cinfo->col_data[i] = cinfo->col_buf[i];
     }
   }
 }
 
 /* Appends a vararg list to a packet info string. */
 void
-col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
+col_append_fstr(column_info *cinfo, gint el, gchar *format, ...) {
   va_list ap;
   int     i;
   size_t  len, max_len;
@@ -174,17 +165,17 @@ col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
        max_len = COL_MAX_LEN;
   
   va_start(ap, format);
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el]) {
-      if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el]) {
+      if (cinfo->col_data[i] != cinfo->col_buf[i]) {
        /* This was set with "col_set_str()"; copy the string they
           set it to into the buffer, so we can append to it. */
-       strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
-       fd->cinfo->col_buf[i][max_len - 1] = '\0';
+       strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
+       cinfo->col_buf[i][max_len - 1] = '\0';
       }
-      len = strlen(fd->cinfo->col_buf[i]);
-      vsnprintf(&fd->cinfo->col_buf[i][len], max_len - len, format, ap);
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+      len = strlen(cinfo->col_buf[i]);
+      vsnprintf(&cinfo->col_buf[i][len], max_len - len, format, ap);
+      cinfo->col_data[i] = cinfo->col_buf[i];
     }
   }
 }
@@ -192,7 +183,7 @@ col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
 /* Use this if "str" points to something that won't stay around (and
    must thus be copied). */
 void
-col_add_str(frame_data *fd, gint el, const gchar* str) {
+col_add_str(column_info *cinfo, gint el, const gchar* str) {
   int    i;
   size_t max_len;
 
@@ -201,17 +192,17 @@ col_add_str(frame_data *fd, gint el, const gchar* str) {
   else
        max_len = COL_MAX_LEN;
   
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el]) {
-      strncpy(fd->cinfo->col_buf[i], str, max_len);
-      fd->cinfo->col_buf[i][max_len - 1] = 0;
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el]) {
+      strncpy(cinfo->col_buf[i], str, max_len);
+      cinfo->col_buf[i][max_len - 1] = 0;
+      cinfo->col_data[i] = cinfo->col_buf[i];
     }
   }
 }
 
 void
-col_append_str(frame_data *fd, gint el, gchar* str) {
+col_append_str(column_info *cinfo, gint el, gchar* str) {
   int    i;
   size_t len, max_len;
 
@@ -220,24 +211,24 @@ col_append_str(frame_data *fd, gint el, gchar* str) {
   else
        max_len = COL_MAX_LEN;
   
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    if (fd->cinfo->fmt_matx[i][el]) {
-      if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
+  for (i = 0; i < cinfo->num_cols; i++) {
+    if (cinfo->fmt_matx[i][el]) {
+      if (cinfo->col_data[i] != cinfo->col_buf[i]) {
        /* This was set with "col_set_str()"; copy the string they
           set it to into the buffer, so we can append to it. */
-       strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
-       fd->cinfo->col_buf[i][max_len - 1] = '\0';
+       strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
+       cinfo->col_buf[i][max_len - 1] = '\0';
       }
-      len = strlen(fd->cinfo->col_buf[i]);
-      strncat(fd->cinfo->col_buf[i], str, max_len - len);
-      fd->cinfo->col_buf[i][max_len - 1] = 0;
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+      len = strlen(cinfo->col_buf[i]);
+      strncat(cinfo->col_buf[i], str, max_len - len);
+      cinfo->col_buf[i][max_len - 1] = 0;
+      cinfo->col_data[i] = cinfo->col_buf[i];
     }
   }
 }
 
 static void
-col_set_abs_date_time(frame_data *fd, int col)
+col_set_abs_date_time(frame_data *fd, column_info *cinfo, int col)
 {
   struct tm *tmp;
   time_t then;
@@ -245,7 +236,7 @@ col_set_abs_date_time(frame_data *fd, int col)
   then = fd->abs_secs;
   tmp = localtime(&then);
   if (tmp != NULL) {
-    snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN,
+    snprintf(cinfo->col_buf[col], COL_MAX_LEN,
              "%04d-%02d-%02d %02d:%02d:%02d.%04ld",
              tmp->tm_year + 1900,
              tmp->tm_mon + 1,
@@ -255,31 +246,31 @@ col_set_abs_date_time(frame_data *fd, int col)
              tmp->tm_sec,
              (long)fd->abs_usecs/100);
   } else {
-    fd->cinfo->col_buf[col][0] = '\0';
+    cinfo->col_buf[col][0] = '\0';
   }
-  fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+  cinfo->col_data[col] = cinfo->col_buf[col];
 }
 
 static void
-col_set_rel_time(frame_data *fd, int col)
+col_set_rel_time(frame_data *fd, column_info *cinfo, int col)
 {
-  display_signed_time(fd->cinfo->col_buf[col], COL_MAX_LEN,
+  display_signed_time(cinfo->col_buf[col], COL_MAX_LEN,
        fd->rel_secs, fd->rel_usecs, USECS);
-  fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+  cinfo->col_data[col] = cinfo->col_buf[col];
 }
 
 static void
-col_set_delta_time(frame_data *fd, int col)
+col_set_delta_time(frame_data *fd, column_info *cinfo, int col)
 {
-  display_signed_time(fd->cinfo->col_buf[col], COL_MAX_LEN,
+  display_signed_time(cinfo->col_buf[col], COL_MAX_LEN,
        fd->del_secs, fd->del_usecs, USECS);
-  fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+  cinfo->col_data[col] = cinfo->col_buf[col];
 }
 
 /* To do: Add check_col checks to the col_add* routines */
 
 static void
-col_set_abs_time(frame_data *fd, int col)
+col_set_abs_time(frame_data *fd, column_info *cinfo, int col)
 {
   struct tm *tmp;
   time_t then;
@@ -287,15 +278,15 @@ col_set_abs_time(frame_data *fd, int col)
   then = fd->abs_secs;
   tmp = localtime(&then);
   if (tmp != NULL) {
-    snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%02d:%02d:%02d.%04ld",
+    snprintf(cinfo->col_buf[col], COL_MAX_LEN, "%02d:%02d:%02d.%04ld",
              tmp->tm_hour,
              tmp->tm_min,
              tmp->tm_sec,
              (long)fd->abs_usecs/100);
   } else {
-    fd->cinfo->col_buf[col][0] = '\0';
+    cinfo->col_buf[col][0] = '\0';
   }
-  fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+  cinfo->col_data[col] = cinfo->col_buf[col];
 }
 
 /* Add "command-line-specified" time.
@@ -306,29 +297,29 @@ col_set_abs_time(frame_data *fd, int col)
    requiring us to stuff the text into the widget from outside, we
    might be able to clean this up. */
 void
-col_set_cls_time(frame_data *fd, int col)
+col_set_cls_time(frame_data *fd, column_info *cinfo, int col)
 {
   switch (timestamp_type) {
     case ABSOLUTE:
-      col_set_abs_time(fd, col);
+      col_set_abs_time(fd, cinfo, col);
       break;
 
     case ABSOLUTE_WITH_DATE:
-      col_set_abs_date_time(fd, col);
+      col_set_abs_date_time(fd, cinfo, col);
       break;
 
     case RELATIVE:
-      col_set_rel_time(fd, col);
+      col_set_rel_time(fd, cinfo, col);
       break;
 
     case DELTA:
-      col_set_delta_time(fd, col);
+      col_set_delta_time(fd, cinfo, col);
       break;
   }
 }
 
 static void
-col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
+col_set_addr(packet_info *pinfo, int col, address *addr, gboolean is_res)
 {
   guint32 ipv4_addr;
   struct e_in6_addr ipv6_addr;
@@ -339,82 +330,82 @@ col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
 
   case AT_ETHER:
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_ether_name(addr->data), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_ether_name(addr->data), COL_MAX_LEN);
     else
-      strncpy(fd->cinfo->col_buf[col], ether_to_str(addr->data), COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+      strncpy(pinfo->cinfo->col_buf[col], ether_to_str(addr->data), COL_MAX_LEN);
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_IPv4:
     memcpy(&ipv4_addr, addr->data, sizeof ipv4_addr);
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_hostname(ipv4_addr), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_hostname(ipv4_addr), COL_MAX_LEN);
     else
-      strncpy(fd->cinfo->col_buf[col], ip_to_str(addr->data), COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+      strncpy(pinfo->cinfo->col_buf[col], ip_to_str(addr->data), COL_MAX_LEN);
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_IPv6:
     memcpy(&ipv6_addr.s6_addr, addr->data, sizeof ipv6_addr.s6_addr);
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_hostname6(&ipv6_addr), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_hostname6(&ipv6_addr), COL_MAX_LEN);
     else
-      strncpy(fd->cinfo->col_buf[col], ip6_to_str(&ipv6_addr), COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+      strncpy(pinfo->cinfo->col_buf[col], ip6_to_str(&ipv6_addr), COL_MAX_LEN);
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_IPX:
-    strncpy(fd->cinfo->col_buf[col],
+    strncpy(pinfo->cinfo->col_buf[col],
       ipx_addr_to_str(pntohl(&addr->data[0]), &addr->data[4]), COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_SNA:
     switch (addr->len) {
 
     case 1:
-      snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%04X", addr->data[0]);
+      snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%04X", addr->data[0]);
       break;
 
     case 2:
-      snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%04X",
+      snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%04X",
         pntohs(&addr->data[0]));
       break;
 
     case SNA_FID_TYPE_4_ADDR_LEN:
       memcpy(&sna_fid_type_4_addr, addr->data, SNA_FID_TYPE_4_ADDR_LEN);
-      strncpy(fd->cinfo->col_buf[col],
+      strncpy(pinfo->cinfo->col_buf[col],
         sna_fid_type_4_addr_to_str(&sna_fid_type_4_addr), COL_MAX_LEN);
       break;
     }
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_ATALK:
     memcpy(&ddp_addr, addr->data, sizeof ddp_addr);
-    strncpy(fd->cinfo->col_buf[col], atalk_addr_to_str(&ddp_addr),
+    strncpy(pinfo->cinfo->col_buf[col], atalk_addr_to_str(&ddp_addr),
       COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_VINES:
-    strncpy(fd->cinfo->col_buf[col], vines_addr_to_str(&addr->data[0]),
+    strncpy(pinfo->cinfo->col_buf[col], vines_addr_to_str(&addr->data[0]),
       COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   case AT_OSI:
-    strncpy(fd->cinfo->col_buf[col], print_nsap_net(addr->data, addr->len),
+    strncpy(pinfo->cinfo->col_buf[col], print_nsap_net(addr->data, addr->len),
       COL_MAX_LEN);
-    fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-    fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+    pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+    pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
     break;
 
   default:
@@ -423,142 +414,142 @@ col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
 }
 
 static void
-col_set_port(frame_data *fd, int col, port_type ptype, guint32 port,
+col_set_port(packet_info *pinfo, int col, port_type ptype, guint32 port,
                gboolean is_res)
 {
   switch (ptype) {
 
   case PT_SCTP:
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_sctp_port(port), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_sctp_port(port), COL_MAX_LEN);
     else
-      snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
+      snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
     break;
     
   case PT_TCP:
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);
     else
-      snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
+      snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
     break;
 
   case PT_UDP:
     if (is_res)
-      strncpy(fd->cinfo->col_buf[col], get_udp_port(port), COL_MAX_LEN);
+      strncpy(pinfo->cinfo->col_buf[col], get_udp_port(port), COL_MAX_LEN);
     else
-      snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
+      snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
     break;
 
   default:
     break;
   }
-  fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
-  fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
+  pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
+  pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
 }
 
 void
-fill_in_columns(frame_data *fd, packet_info *pinfo)
+fill_in_columns(packet_info *pinfo)
 {
   int i;
 
-  for (i = 0; i < fd->cinfo->num_cols; i++) {
-    switch (fd->cinfo->col_fmt[i]) {
+  for (i = 0; i < pinfo->cinfo->num_cols; i++) {
+    switch (pinfo->cinfo->col_fmt[i]) {
 
     case COL_NUMBER:
-      snprintf(fd->cinfo->col_buf[i], COL_MAX_LEN, "%u", fd->num);
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+      snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%u", pinfo->fd->num);
+      pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i];
       break;
 
     case COL_CLS_TIME:
-      col_set_cls_time(fd, i);
+      col_set_cls_time(pinfo->fd, pinfo->cinfo, i);
       break;
 
     case COL_ABS_TIME:
-      col_set_abs_time(fd, i);
+      col_set_abs_time(pinfo->fd, pinfo->cinfo, i);
       break;
 
     case COL_ABS_DATE_TIME:
-      col_set_abs_date_time(fd, i);
+      col_set_abs_date_time(pinfo->fd, pinfo->cinfo, i);
       break;
 
     case COL_REL_TIME:
-      col_set_rel_time(fd, i);
+      col_set_rel_time(pinfo->fd, pinfo->cinfo, i);
       break;
 
     case COL_DELTA_TIME:
-      col_set_delta_time(fd, i);
+      col_set_delta_time(pinfo->fd, pinfo->cinfo, i);
       break;
 
     case COL_DEF_SRC:
     case COL_RES_SRC:  /* COL_DEF_SRC is currently just like COL_RES_SRC */
-      col_set_addr(fd, i, &pinfo->src, TRUE);
+      col_set_addr(pinfo, i, &pinfo->src, TRUE);
       break;
 
     case COL_UNRES_SRC:
-      col_set_addr(fd, i, &pinfo->src, FALSE);
+      col_set_addr(pinfo, i, &pinfo->src, FALSE);
       break;
 
     case COL_DEF_DL_SRC:
     case COL_RES_DL_SRC:
-      col_set_addr(fd, i, &pinfo->dl_src, TRUE);
+      col_set_addr(pinfo, i, &pinfo->dl_src, TRUE);
       break;
 
     case COL_UNRES_DL_SRC:
-      col_set_addr(fd, i, &pinfo->dl_src, FALSE);
+      col_set_addr(pinfo, i, &pinfo->dl_src, FALSE);
       break;
 
     case COL_DEF_NET_SRC:
     case COL_RES_NET_SRC:
-      col_set_addr(fd, i, &pinfo->net_src, TRUE);
+      col_set_addr(pinfo, i, &pinfo->net_src, TRUE);
       break;
 
     case COL_UNRES_NET_SRC:
-      col_set_addr(fd, i, &pinfo->net_src, FALSE);
+      col_set_addr(pinfo, i, &pinfo->net_src, FALSE);
       break;
 
     case COL_DEF_DST:
     case COL_RES_DST:  /* COL_DEF_DST is currently just like COL_RES_DST */
-      col_set_addr(fd, i, &pinfo->dst, TRUE);
+      col_set_addr(pinfo, i, &pinfo->dst, TRUE);
       break;
 
     case COL_UNRES_DST:
-      col_set_addr(fd, i, &pinfo->dst, FALSE);
+      col_set_addr(pinfo, i, &pinfo->dst, FALSE);
       break;
 
     case COL_DEF_DL_DST:
     case COL_RES_DL_DST:
-      col_set_addr(fd, i, &pinfo->dl_dst, TRUE);
+      col_set_addr(pinfo, i, &pinfo->dl_dst, TRUE);
       break;
 
     case COL_UNRES_DL_DST:
-      col_set_addr(fd, i, &pinfo->dl_dst, FALSE);
+      col_set_addr(pinfo, i, &pinfo->dl_dst, FALSE);
       break;
 
     case COL_DEF_NET_DST:
     case COL_RES_NET_DST:
-      col_set_addr(fd, i, &pinfo->net_dst, TRUE);
+      col_set_addr(pinfo, i, &pinfo->net_dst, TRUE);
       break;
 
     case COL_UNRES_NET_DST:
-      col_set_addr(fd, i, &pinfo->net_dst, FALSE);
+      col_set_addr(pinfo, i, &pinfo->net_dst, FALSE);
       break;
 
     case COL_DEF_SRC_PORT:
     case COL_RES_SRC_PORT:     /* COL_DEF_SRC_PORT is currently just like COL_RES_SRC_PORT */
-      col_set_port(fd, i, pinfo->ptype, pinfo->srcport, TRUE);
+      col_set_port(pinfo, i, pinfo->ptype, pinfo->srcport, TRUE);
       break;
 
     case COL_UNRES_SRC_PORT:
-      col_set_port(fd, i, pinfo->ptype, pinfo->srcport, FALSE);
+      col_set_port(pinfo, i, pinfo->ptype, pinfo->srcport, FALSE);
       break;
 
     case COL_DEF_DST_PORT:
     case COL_RES_DST_PORT:     /* COL_DEF_DST_PORT is currently just like COL_RES_DST_PORT */
-      col_set_port(fd, i, pinfo->ptype, pinfo->destport, TRUE);
+      col_set_port(pinfo, i, pinfo->ptype, pinfo->destport, TRUE);
       break;
 
     case COL_UNRES_DST_PORT:
-      col_set_port(fd, i, pinfo->ptype, pinfo->destport, FALSE);
+      col_set_port(pinfo, i, pinfo->ptype, pinfo->destport, FALSE);
       break;
 
     case COL_PROTOCOL: /* currently done by dissectors */
@@ -566,8 +557,8 @@ fill_in_columns(frame_data *fd, packet_info *pinfo)
       break;
 
     case COL_PACKET_LENGTH:
-      snprintf(fd->cinfo->col_buf[i], COL_MAX_LEN, "%d", fd->pkt_len);
-      fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+      snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%d", pinfo->fd->pkt_len);
+      pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i];
       break;
 
     case NUM_COL_FMTS: /* keep compiler happy - shouldn't get here */
@@ -575,9 +566,3 @@ fill_in_columns(frame_data *fd, packet_info *pinfo)
     }
   }
 }
-       
-
-
-
-
-
index e16cc926f19624a5fa3d2d3931d8a5123ee5f090..69154c5d47c8818bca98aaf2e11bb20bc42d6a69 100644 (file)
@@ -1,7 +1,7 @@
 /* column-utils.h
  * Definitions for column utility structures and routines
  *
- * $Id: column-utils.h,v 1.4 2001/11/21 23:16:23 gram Exp $
+ * $Id: column-utils.h,v 1.5 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -31,7 +31,6 @@
 #define COL_MAX_INFO_LEN 4096
 
 #include "column_info.h"
-#include "frame_data.h"
 #include "packet_info.h"
 
 /* Allocate all the data structures for constructing column data, given
@@ -40,25 +39,22 @@ extern void col_init(column_info *, gint);
 
 /* Utility routines used by packet*.c */
 
-extern void    col_set_writable(frame_data *fd, gboolean writable);
-extern gint    check_col(frame_data *, gint);
-extern void    col_clear(frame_data *, gint);
-extern void    col_set_str(frame_data *, gint, gchar *);
+extern void    col_set_writable(column_info *, gboolean);
+extern gint    check_col(column_info *, gint);
+extern void    col_clear(column_info *, gint);
+extern void    col_set_str(column_info *, gint, gchar *);
 #if __GNUC__ >= 2
-extern void    col_add_fstr(frame_data *, gint, gchar *, ...)
+extern void    col_add_fstr(column_info *, gint, gchar *, ...)
     __attribute__((format (printf, 3, 4)));
-extern void    col_append_fstr(frame_data *, gint, gchar *, ...)
+extern void    col_append_fstr(column_info *, gint, gchar *, ...)
     __attribute__((format (printf, 3, 4)));
 #else
-extern void    col_add_fstr(frame_data *, gint, gchar *, ...);
-extern void    col_append_fstr(frame_data *, gint, gchar *, ...);
+extern void    col_add_fstr(column_info *, gint, gchar *, ...);
+extern void    col_append_fstr(column_info *, gint, gchar *, ...);
 #endif
-extern void    col_add_str(frame_data *, gint, const gchar *);
-extern void    col_append_str(frame_data *, gint, gchar *);
-extern void    col_set_cls_time(frame_data *, int);
-extern void    fill_in_columns(frame_data *, packet_info *);
+extern void    col_add_str(column_info *, gint, const gchar *);
+extern void    col_append_str(column_info *, gint, gchar *);
+extern void    col_set_cls_time(frame_data *, column_info *, int);
+extern void    fill_in_columns(packet_info *);
 
 #endif /* __COLUMN_UTILS_H__ */
-
-
-
index f9c7099066c6fd76d3ae38168f58171cceded724..96e2b6bf8fa626d8de49e2ae22fc6854d1b2ae54 100644 (file)
@@ -1,6 +1,6 @@
 /* epan.h
  *
- * $Id: epan.c,v 1.12 2001/12/06 04:25:08 gram Exp $
+ * $Id: epan.c,v 1.13 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal Protocol Analyzer Library
  *
@@ -75,7 +75,7 @@ epan_conversation_init(void)
 
 epan_dissect_t*
 epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
-               gboolean create_proto_tree)
+               gboolean create_proto_tree, column_info *cinfo)
 {
        epan_dissect_t  *edt;
 
@@ -93,7 +93,7 @@ epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
                edt->tree = NULL;
        }
 
-       dissect_packet(edt, pseudo_header, data, fd);
+       dissect_packet(edt, pseudo_header, data, fd, cinfo);
 
        return edt;
 }
index 7741a2598f6765a4a1a3e15b79ac7449731daebe..d2e786cd85362de71219ead2b88591428a1ed8fa 100644 (file)
@@ -1,6 +1,6 @@
 /* epan.h
  *
- * $Id: epan.h,v 1.9 2001/12/06 04:25:08 gram Exp $
+ * $Id: epan.h,v 1.10 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal Protocol Analyzer Library
  *
@@ -51,12 +51,12 @@ epan_free(epan_t*);
 typedef struct _epan_dissect_t {
        tvbuff_t        *tvb;
        proto_tree      *tree;
-    packet_info pi;
+       packet_info     pi;
 } epan_dissect_t;
 
 epan_dissect_t*
 epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
-               gboolean create_proto_tree);
+               gboolean create_proto_tree, column_info *cinfo);
 
 void
 epan_dissect_free(epan_dissect_t* edt);
index 75e216b6c8a43f2a30d33b46523aa15ab313eb0d..8999586d92de99503de0688adf4384d4479dcb8f 100644 (file)
@@ -1,12 +1,11 @@
 /* frame_data.h
  * Definitions for frame_data structures and routines
  *
- * $Id: frame_data.h,v 1.1 2001/04/01 04:11:50 hagbard Exp $
+ * $Id: frame_data.h,v 1.2 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- *
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 
 #include "column_info.h"
 
-
 /* XXX - some of this stuff is used only while a packet is being dissected;
    should we keep that stuff in the "packet_info" structure, instead, to
    save memory? */
 typedef struct _frame_data {
   struct _frame_data *next; /* Next element in list */
   struct _frame_data *prev; /* Previous element in list */
-  GSList *pfd;              /* Per frame proto data */
-  GSList *data_src;         /* Frame data sources */
-  guint32      num;       /* Frame number */
-  guint32      pkt_len;   /* Packet length */
-  guint32      cap_len;   /* Amount actually captured */
-  gint32       rel_secs;  /* Relative seconds (yes, it can be negative) */
-  gint32       rel_usecs; /* Relative microseconds (yes, it can be negative) */
-  guint32      abs_secs;  /* Absolute seconds */
-  guint32      abs_usecs; /* Absolute microseconds */
-  gint32       del_secs;  /* Delta seconds (yes, it can be negative) */
-  gint32       del_usecs; /* Delta microseconds (yes, it can be negative) */
-  long         file_off;  /* File offset */
-  column_info *cinfo;     /* Column formatting information */
-  int          lnk_t;     /* Per-packet encapsulation/data-link type */
+  GSList      *pfd;         /* Per frame proto data */
+  GSList      *data_src;    /* Frame data sources */
+  guint32      num;         /* Frame number */
+  guint32      pkt_len;     /* Packet length */
+  guint32      cap_len;     /* Amount actually captured */
+  gint32       rel_secs;    /* Relative seconds (yes, it can be negative) */
+  gint32       rel_usecs;   /* Relative microseconds (yes, it can be negative) */
+  guint32      abs_secs;    /* Absolute seconds */
+  guint32      abs_usecs;   /* Absolute microseconds */
+  gint32       del_secs;    /* Delta seconds (yes, it can be negative) */
+  gint32       del_usecs;   /* Delta microseconds (yes, it can be negative) */
+  long         file_off;    /* File offset */
+  int          lnk_t;       /* Per-packet encapsulation/data-link type */
   struct {
        unsigned int passed_dfilter     : 1; /* 1 = display, 0 = no display */
        unsigned int encoding           : 2; /* Character encoding (ASCII, EBCDIC...) */
index a4c70dbe472c9488099a37e929884e65c56dff21..b6f299a0a12015777f1570000b9ebc65da077774 100644 (file)
@@ -1,7 +1,7 @@
 /* packet.c
  * Routines for packet disassembly
  *
- * $Id: packet.c,v 1.53 2001/12/08 21:00:42 guy Exp $
+ * $Id: packet.c,v 1.54 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -152,8 +152,10 @@ init_all_protocols(void)
 /* Creates the top-most tvbuff and calls dissect_frame() */
 void
 dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
-              const u_char *pd, frame_data *fd)
+              const u_char *pd, frame_data *fd, column_info *cinfo)
 {
+       int i;
+
        edt->pi.dl_src.type = AT_NONE;
        edt->pi.dl_dst.type = AT_NONE;
        edt->pi.net_src.type = AT_NONE;
@@ -174,7 +176,15 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
        edt->pi.fd = fd;
        edt->pi.pseudo_header = pseudo_header;
 
-       col_set_writable(fd, TRUE);
+       edt->pi.cinfo = cinfo;
+       if (cinfo != NULL) {
+               for (i = 0; i < cinfo->num_cols; i++) {
+                       cinfo->col_buf[i][0] = '\0';
+                       cinfo->col_data[i] = cinfo->col_buf[i];
+               }
+
+               col_set_writable(cinfo, TRUE);
+       }
 
        TRY {
                edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");
index 324fcc543c305ee336836ce8e817fd1eb42cdaf2..812e653cbf0b94de00cd412eef084c77a657bfb8 100644 (file)
@@ -1,7 +1,7 @@
 /* packet.h
  * Definitions for packet disassembly structures and routines
  *
- * $Id: packet.h,v 1.46 2001/12/08 06:41:47 guy Exp $
+ * $Id: packet.h,v 1.47 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -228,7 +228,7 @@ extern void init_all_protocols(void);
  */
 extern void dissect_packet(struct _epan_dissect_t *edt,
     union wtap_pseudo_header *pseudo_header, const u_char *pd,
-    frame_data *fd);
+    frame_data *fd, column_info *cinfo);
 
 /* These functions are in packet-ethertype.c */
 extern void capture_ethertype(guint16 etype, const u_char *pd, int offset,
index d8a5df5e94f1f240b4e908ee33867be0a9d48f18..e6200f0339256afd3fe0060e642d60f799f3e400 100644 (file)
@@ -1,7 +1,7 @@
 /* packet_info.h
  * Definitions for packet info structures and routines
  *
- * $Id: packet_info.h,v 1.12 2001/11/29 09:05:25 guy Exp $
+ * $Id: packet_info.h,v 1.13 2001/12/10 00:26:16 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -89,6 +89,7 @@ typedef enum {
 
 typedef struct _packet_info {
   const char *current_proto;   /* name of protocol currently being dissected */
+  column_info *cinfo;          /* Column formatting information */
   frame_data *fd;
   union wtap_pseudo_header *pseudo_header;
   address dl_src;              /* link-layer source address */
diff --git a/file.c b/file.c
index b66a36de0ed2f77f76473326ce6c63f5689d7b5c..97c60ffd5fa4937cb8e9bfadbf08f212e64bc65b 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
 /* file.c
  * File I/O routines
  *
- * $Id: file.c,v 1.251 2001/12/06 04:25:07 gram Exp $
+ * $Id: file.c,v 1.252 2001/12/10 00:25:25 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -630,12 +630,6 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
     firstusec = fdata->abs_usecs;
   }
 
-  fdata->cinfo = &cf->cinfo;
-  for (i = 0; i < fdata->cinfo->num_cols; i++) {
-    fdata->cinfo->col_buf[i][0] = '\0';
-    fdata->cinfo->col_data[i] = fdata->cinfo->col_buf[i];
-  }
-
   /* If either
 
        we have a display filter and are re-applying it;
@@ -649,7 +643,8 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
          create_proto_tree = TRUE;
 
   /* Dissect the frame. */
-  edt = epan_dissect_new(pseudo_header, buf, fdata, create_proto_tree);
+  edt = epan_dissect_new(pseudo_header, buf, fdata, create_proto_tree,
+    &cf->cinfo);
 
   /* If we have a display filter, apply it if we're refiltering, otherwise
      leave the "passed_dfilter" flag alone.
@@ -707,7 +702,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
     prevsec = fdata->abs_secs;
     prevusec = fdata->abs_usecs;
 
-    fill_in_columns(fdata, &edt->pi);
+    fill_in_columns(&edt->pi);
 
     /* If we haven't yet seen the first frame, this is it.
 
@@ -728,7 +723,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
     /* This is the last frame we've seen so far. */
     cf->last_displayed = fdata;
 
-    row = gtk_clist_append(GTK_CLIST(packet_list), fdata->cinfo->col_data);
+    row = gtk_clist_append(GTK_CLIST(packet_list), cf->cinfo.col_data);
     gtk_clist_set_row_data(GTK_CLIST(packet_list), row, fdata);
 
     if (fdata->flags.marked) {
@@ -749,7 +744,6 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
     row = -1;
   }
   epan_dissect_free(edt);
-  fdata->cinfo = NULL;
   return row;
 }
 
@@ -780,11 +774,10 @@ read_packet(capture_file *cf, long offset)
   fdata->flags.encoding = CHAR_ASCII;
   fdata->flags.visited = 0;
   fdata->flags.marked = 0;
-  fdata->cinfo = NULL;
 
   passed = TRUE;
   if (cf->rfcode) {
-    edt = epan_dissect_new(pseudo_header, buf, fdata, TRUE);
+    edt = epan_dissect_new(pseudo_header, buf, fdata, TRUE, NULL);
     passed = dfilter_apply_edt(cf->rfcode, edt);
     epan_dissect_free(edt);
   }   
@@ -1183,13 +1176,9 @@ print_packets(capture_file *cf, print_args_t *print_args)
       if (print_args->print_summary) {
         /* Fill in the column information, but don't bother creating
            the logical protocol tree. */
-        fdata->cinfo = &cf->cinfo;
-        for (i = 0; i < fdata->cinfo->num_cols; i++) {
-          fdata->cinfo->col_buf[i][0] = '\0';
-          fdata->cinfo->col_data[i] = fdata->cinfo->col_buf[i];
-        }
-        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, FALSE);
-        fill_in_columns(fdata, &edt->pi);
+        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, FALSE,
+          &cf->cinfo);
+        fill_in_columns(&edt->pi);
         cp = &line_buf[0];
         line_len = 0;
         for (i = 0; i < cf->cinfo.num_cols; i++) {
@@ -1224,7 +1213,8 @@ print_packets(capture_file *cf, print_args_t *print_args)
           print_line(cf->print_fh, print_args->format, "\n");
 
         /* Create the logical protocol tree. */
-        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, TRUE);
+        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, TRUE,
+          NULL);
 
         /* Print the information in that tree. */
         proto_tree_print(FALSE, print_args, (GNode *)edt->tree,
@@ -1334,8 +1324,7 @@ change_time_formats(capture_file *cf)
          the answer isn't going to change from packet to packet, so we should
          simply skip all the "change_time_formats()" work if we're not
          changing anything. */
-      fdata->cinfo = &cf->cinfo;
-      if (check_col(fdata, COL_CLS_TIME)) {
+      if (check_col(&cf->cinfo, COL_CLS_TIME)) {
         /* There are columns that show the time in the "command-line-specified"
            format; update them. */
         for (i = 0; i < cf->cinfo.num_cols; i++) {
@@ -1343,7 +1332,7 @@ change_time_formats(capture_file *cf)
             /* This is one of the columns that shows the time in
                "command-line-specified" format; update it. */
             cf->cinfo.col_buf[i][0] = '\0';
-            col_set_cls_time(fdata, i);
+            col_set_cls_time(fdata, &cf->cinfo, i);
             gtk_clist_set_text(GTK_CLIST(packet_list), row, i,
                          cf->cinfo.col_data[i]);
          }
@@ -1446,7 +1435,8 @@ find_packet(capture_file *cf, dfilter_t *sfcode)
         /* Yes.  Does it match the search filter? */
         wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
                        cf->pd, fdata->cap_len);
-        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, TRUE);
+        edt = epan_dissect_new(&cf->pseudo_header, cf->pd, fdata, TRUE,
+          NULL);
         frame_matched = dfilter_apply_edt(sfcode, edt);
        epan_dissect_free(edt);
         if (frame_matched) {
@@ -1555,7 +1545,8 @@ select_packet(capture_file *cf, int row)
     epan_dissect_free(cf->edt);
     cf->edt = NULL;
   }
-  cf->edt = epan_dissect_new(&cf->pseudo_header, cf->pd, cf->current_frame, TRUE);
+  cf->edt = epan_dissect_new(&cf->pseudo_header, cf->pd, cf->current_frame,
+    TRUE, NULL);
   proto_tree_is_visible = FALSE;
 
   /* Display the GUI protocol tree and hex dump.
index 061ad0f36ec505c7a74acfa6c2ef73a4287f7235..bbbaf4a6de9b476527b8c1b99d54291d68af7f77 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
  *
- * $Id: packet_win.c,v 1.27 2001/12/06 04:25:09 gram Exp $
+ * $Id: packet_win.c,v 1.28 2001/12/10 00:26:17 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -168,7 +168,7 @@ create_new_window(char *Title, gint tv_size, gint bv_size)
   memcpy(DataPtr->pd, cfile.pd, DataPtr->frame->cap_len);
   proto_tree_is_visible = TRUE;
   DataPtr->edt = epan_dissect_new(&DataPtr->pseudo_header, DataPtr->pd, DataPtr->frame,
-               TRUE);
+               TRUE, &cfile.cinfo);
   proto_tree_is_visible = FALSE;
   DataPtr->main = main_w;
   DataPtr->tv_scrollw = tv_scrollw;
index b97947b49d0e51766a7e813a5fc04a885a98e914..e10a31a5ed999143c97734915e6266c94b0dc365 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-aarp.c
  * Routines for Appletalk ARP packet disassembly
  *
- * $Id: packet-aarp.c,v 1.32 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-aarp.c,v 1.33 2001/12/10 00:25:25 guy Exp $
  *
  * Simon Wilkinson <sxw@dcs.ed.ac.uk>
  *
@@ -145,10 +145,10 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   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))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "AARP");
-  if(check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if(check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "AARP");
+  if(check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   ar_hrd = tvb_get_ntohs(tvb, AR_HRD);
   ar_pro = tvb_get_ntohs(tvb, AR_PRO);
@@ -173,22 +173,22 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_pln);
   tpa_str = aarpproaddr_to_str(tpa_val, ar_pln, ar_pro);
   
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     switch (ar_op) {
       case AARP_REQUEST:
       case AARP_REQUEST_SWAPPED:
-        col_add_fstr(pinfo->fd, COL_INFO, "Who has %s?  Tell %s", tpa_str, spa_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s?  Tell %s", tpa_str, spa_str);
         break;
       case AARP_REPLY:
       case AARP_REPLY_SWAPPED:
-        col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", spa_str, sha_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", spa_str, sha_str);
         break;
       case AARP_PROBE:
       case AARP_PROBE_SWAPPED:
-        col_add_fstr(pinfo->fd, COL_INFO, "Is there a %s", tpa_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Is there a %s", tpa_str);
         break;
       default:
-        col_add_fstr(pinfo->fd, COL_INFO, "Unknown AARP opcode 0x%04x", ar_op);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown AARP opcode 0x%04x", ar_op);
         break;
     }
   }
index 7e7709dd649555d58234772647cfbd7af43658c5..68679eaa836aa7854671be9ab11cec3595c530e1 100644 (file)
@@ -8,7 +8,7 @@
  * Portions based on information/specs retrieved from the OpenAFS sources at
  *   www.openafs.org, Copyright IBM. 
  *
- * $Id: packet-afs.c,v 1.35 2001/11/03 00:58:49 guy Exp $
+ * $Id: packet-afs.c,v 1.36 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -196,11 +196,11 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        void (*dissector)(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode);
 
 
-       if (check_col(pinfo->fd, COL_PROTOCOL)) {
-               col_set_str(pinfo->fd, COL_PROTOCOL, "AFS (RX)");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "AFS (RX)");
        }
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_clear(pinfo->cinfo, COL_INFO);
        }
 
        reply = (rxinfo->flags & RX_CLIENT_INITIATED) == 0;
@@ -334,23 +334,23 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        if ( VALID_OPCODE(opcode) ) {
                if ( vals ) {
-                       if (check_col(pinfo->fd, COL_INFO))
-                               col_add_fstr(pinfo->fd, COL_INFO, "%s%s %s: %s (%d)",
+                       if (check_col(pinfo->cinfo, COL_INFO))
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: %s (%d)",
                                typenode == hf_afs_ubik ? "UBIK-" : "",
                                val_to_str(port, port_types_short, "Unknown(%d)"),
                                reply ? "Reply" : "Request",
                                val_to_str(opcode, vals, "Unknown(%d)"), opcode);
                } else {
-                       if (check_col(pinfo->fd, COL_INFO))
-                               col_add_fstr(pinfo->fd, COL_INFO, "%s%s %s: Unknown(%d)",
+                       if (check_col(pinfo->cinfo, COL_INFO))
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: Unknown(%d)",
                                typenode == hf_afs_ubik ? "UBIK-" : "",
                                val_to_str(port, port_types_short, "Unknown(%d)"),
                                reply ? "Reply" : "Request",
                                opcode);
                }
        } else {
-               if (check_col(pinfo->fd, COL_INFO))
-                       col_add_fstr(pinfo->fd, COL_INFO, "Encrypted %s %s",
+               if (check_col(pinfo->cinfo, COL_INFO))
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "Encrypted %s %s",
                        val_to_str(port, port_types_short, "Unknown(%d)"),
                        reply ? "Reply" : "Request"
                        );
index 1235003c4cdea07bc9fbdd310b0c0605838bb288..e62065fb7b548ffd53d4d5739e6a3a99b063fdb9 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for AIM Instant Messenger (OSCAR) dissection
  * Copyright 2000, Ralf Hoelzer <ralf@well.com>
  *
- * $Id: packet-aim.c,v 1.10 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-aim.c,v 1.11 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -127,11 +127,11 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   }
   
 /* Make entries in Protocol column and Info column on summary display */
-  if (check_col(pinfo->fd, COL_PROTOCOL)) 
-    col_set_str(pinfo->fd, COL_PROTOCOL, "AIM");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIM");
     
-  if (check_col(pinfo->fd, COL_INFO)) 
-    col_add_str(pinfo->fd, COL_INFO, "AOL Instant Messenger");
+  if (check_col(pinfo->cinfo, COL_INFO)) 
+    col_add_str(pinfo->cinfo, COL_INFO, "AOL Instant Messenger");
 
 /* get relevant header information */
 
@@ -158,7 +158,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   {
     /* New connection request */
     case CHANNEL_NEW_CONN:
-      if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "New Connection");
+      if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "New Connection");
       break;
      
     /* SNAC channel. Most packets are of this type, such as messages or buddy list
@@ -168,8 +168,8 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       family = tvb_get_ntohs(tvb, 6);     
       subtype = tvb_get_ntohs(tvb, 8);     
 
-      if (check_col(pinfo->fd, COL_INFO)) {
-        col_add_fstr(pinfo->fd, COL_INFO, "SNAC data");
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "SNAC data");
       }        
       if( tree )
       {
@@ -181,7 +181,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 
 
-      if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Family: %d - Subtype: %d (unknown)", family, subtype);
+      if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Family: %d - Subtype: %d (unknown)", family, subtype);
       
         switch(family)
         {
@@ -191,9 +191,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
               case 0x0002:
                 buddyname_length = get_buddyname( buddyname, tvb, 19, 20 );
 
-                if (check_col(pinfo->fd, COL_INFO)) {
-                  col_add_fstr(pinfo->fd, COL_INFO, "Login");
-                  col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
+                if (check_col(pinfo->cinfo, COL_INFO)) {
+                  col_add_fstr(pinfo->cinfo, COL_INFO, "Login");
+                  col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
                 }        
 
                 if( tree  )
@@ -203,14 +203,14 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 break;
               case 0x0003:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Login information reply");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Login information reply");        
                 break;
               case 0x0006:
                 buddyname_length = get_buddyname( buddyname, tvb, 19, 20 );
 
-                if (check_col(pinfo->fd, COL_INFO)) {
-                  col_add_fstr(pinfo->fd, COL_INFO, "Sign-on");
-                  col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
+                if (check_col(pinfo->cinfo, COL_INFO)) {
+                  col_add_fstr(pinfo->cinfo, COL_INFO, "Sign-on");
+                  col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
                 }        
                 
                 if( tree )
@@ -220,7 +220,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 break;
               case 0x0007:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Sign-on reply");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Sign-on reply");        
                 break;
             }
             break;
@@ -229,28 +229,28 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
             switch(subtype)
             {
               case 0x0002:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Client is now online and ready for normal function");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Client is now online and ready for normal function");        
                 break;
               case 0x0003:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Server is now ready for normal functions");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Server is now ready for normal functions");        
                 break;
               case 0x0004:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request for new service (server will redirect client)");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request for new service (server will redirect client)");        
                 break;
               case 0x0005:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Redirect response");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Redirect response");        
                 break;
               case 0x0006:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rate Information");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rate Information");        
                 break;
               case 0x0007:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rate information response");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rate information response");        
                 break;
               case 0x0008:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rate Information Response Ack");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rate Information Response Ack");        
                 break;
               case 0x0016:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "No-op");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "No-op");        
                 break;
             }
             break;
@@ -259,31 +259,31 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
             switch(subtype)
             {
               case 0x0001:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Buddylist - Error");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Buddylist - Error");        
                 break;
 
               case 0x0002:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rights information");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rights information");        
                 break;
 
               case 0x0003:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rights information");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rights information");        
                 break;
 
               case 0x0004:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Add to Buddylist");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Add to Buddylist");        
                 break;
 
               case 0x0005:
-                if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Remove from Buddylist");        
+                if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Remove from Buddylist");        
                 break;
 
               case 0x000b:
                 buddyname_length = get_buddyname( buddyname, tvb, 16, 17 );
 
-                if (check_col(pinfo->fd, COL_INFO)) {
-                  col_add_fstr(pinfo->fd, COL_INFO, "Oncoming Buddy");
-                  col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
+                if (check_col(pinfo->cinfo, COL_INFO)) {
+                  col_add_fstr(pinfo->cinfo, COL_INFO, "Oncoming Buddy");
+                  col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
                 }        
                 
                 if( tree )
@@ -297,9 +297,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 buddyname_length = get_buddyname( buddyname, tvb, 16, 17 );
 
-                if (check_col(pinfo->fd, COL_INFO)) {
-                  col_add_fstr(pinfo->fd, COL_INFO, "Offgoing Buddy");
-                  col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
+                if (check_col(pinfo->cinfo, COL_INFO)) {
+                  col_add_fstr(pinfo->cinfo, COL_INFO, "Offgoing Buddy");
+                  col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
                 }        
                 
                 if( tree )
@@ -316,28 +316,28 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
           switch(subtype)
           {
             case 0x0001:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Location - Error");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Location - Error");        
               break;
             case 0x0002:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rights Information");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rights Information");        
               break;
             case 0x0003:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rights Information");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rights Information");        
               break;
             case 0x0004:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Set User Information");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Set User Information");        
               break;
             case 0x0005:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request User Information");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request User Information");        
               break;
             case 0x0006:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "User Information");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "User Information");        
               break;
             case 0x0007:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Watcher Subrequest");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Watcher Subrequest");        
               break;
             case 0x0008:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Watcher Notification");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Watcher Notification");        
               break;
           }
           break;
@@ -346,13 +346,13 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
           switch(subtype)
           {
             case 0x0001:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisements - Error");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisements - Error");        
               break;
             case 0x0002:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisement Request");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisement Request");        
               break;
             case 0x0003:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisement data (GIF)");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisement data (GIF)");        
               break;
           }
           break;
@@ -361,13 +361,13 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
           switch(subtype)
           {
             case 0x0001:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Search - Error (could be: not found)");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Search - Error (could be: not found)");        
               break;
             case 0x0002:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Search for Screen Name by e-mail");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Search for Screen Name by e-mail");        
               break;
             case 0x0003:
-              if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Screen Name Search Result");        
+              if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Screen Name Search Result");        
               break;
           }
           break;
@@ -379,9 +379,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
               /* channel message from client */
               get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb) - 40 - buddyname_length );
 
-              if (check_col(pinfo->fd, COL_INFO)) {
-                col_add_fstr(pinfo->fd, COL_INFO, "Chat Message ");
-                col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
+              if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Chat Message ");
+                col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
               }        
               break;
             
@@ -390,10 +390,10 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
               buddyname_length = get_buddyname( buddyname, tvb, 30, 31 );
               get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length );
               
-              if (check_col(pinfo->fd, COL_INFO)) {
-                col_add_fstr(pinfo->fd, COL_INFO, "Chat Message ");
-                col_append_fstr(pinfo->fd, COL_INFO, "from: %s", buddyname);
-                col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
+              if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Chat Message ");
+                col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname);
+                col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
               }        
               
               if( tree )
@@ -413,10 +413,10 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
               get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length );
               
-              if (check_col(pinfo->fd, COL_INFO)) {
-                col_add_fstr(pinfo->fd, COL_INFO, "Message ");
-                col_append_fstr(pinfo->fd, COL_INFO, "to: %s", buddyname);
-                col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
+              if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Message ");
+                col_append_fstr(pinfo->cinfo, COL_INFO, "to: %s", buddyname);
+                col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
               }        
 
               if( tree )
@@ -431,11 +431,11 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
               get_message( msg, tvb, 36 + buddyname_length,  tvb_length(tvb) - 36 - buddyname_length);
 
-              if (check_col(pinfo->fd, COL_INFO)) {
-                col_add_fstr(pinfo->fd, COL_INFO, "Message");
-                col_append_fstr(pinfo->fd, COL_INFO, " from: %s", buddyname);
+              if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Message");
+                col_append_fstr(pinfo->cinfo, COL_INFO, " from: %s", buddyname);
 
-                col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
+                col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
               }        
               
               if( tree )
@@ -453,20 +453,20 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       break;
     
     case CHANNEL_FLAP_ERR:
-      if (check_col(pinfo->fd, COL_INFO)) {
-        col_add_fstr(pinfo->fd, COL_INFO, "FLAP error");
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "FLAP error");
       }        
       break;
     
     case CHANNEL_CLOSE_CONN:
-      if (check_col(pinfo->fd, COL_INFO)) {
-        col_add_fstr(pinfo->fd, COL_INFO, "Close Connection");
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Close Connection");
       }        
       break;
     
     default:
-      if (check_col(pinfo->fd, COL_INFO)) {
-        col_add_fstr(pinfo->fd, COL_INFO, "Unknown Channel: %d", hdr_channel );
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown Channel: %d", hdr_channel );
       }        
       break;
   }
index a68090fbfc1c6bed06fee4d0bf4afee9257dc15a..5c1100b4a87920b0bb4088f5a800c0f9943f6250 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-arp.c
  * Routines for ARP packet disassembly
  *
- * $Id: packet-arp.c,v 1.47 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-arp.c,v 1.48 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -481,41 +481,41 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_tpln);
   tpa_str = arpproaddr_to_str(tpa_val, ar_tpln, ar_pro);
 
-  if (check_col(pinfo->fd, COL_PROTOCOL)) {
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
     switch (ar_op) {
 
     case ARPOP_REQUEST:
     case ARPOP_REPLY:
     case ATMARPOP_NAK:
     default:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "ATMARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP");
       break;
 
     case ARPOP_RREQUEST:
     case ARPOP_RREPLY:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "ATMRARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP");
       break;
 
     case ARPOP_IREQUEST:
     case ARPOP_IREPLY:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "Inverse ATMARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP");
       break;
     }
   }
 
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     switch (ar_op) {
       case ARPOP_REQUEST:
-        col_add_fstr(pinfo->fd, COL_INFO, "Who has %s?  Tell %s",
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s?  Tell %s",
                tpa_str, spa_str);
         break;
       case ARPOP_REPLY:
-        col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s%s%s", spa_str, sha_str,
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s%s%s", spa_str, sha_str,
                ((ssa_str != NULL) ? "," : ""),
                ((ssa_str != NULL) ? ssa_str : ""));
         break;
       case ARPOP_IREQUEST:
-        col_add_fstr(pinfo->fd, COL_INFO, "Who is %s%s%s?  Tell %s%s%s",
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s%s%s?  Tell %s%s%s",
                tha_str,
                ((tsa_str != NULL) ? "," : ""),
                ((tsa_str != NULL) ? tsa_str : ""),
@@ -524,17 +524,17 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                ((ssa_str != NULL) ? ssa_str : ""));
         break;
       case ARPOP_IREPLY:
-        col_add_fstr(pinfo->fd, COL_INFO, "%s%s%s is at %s",
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s is at %s",
                sha_str,
                ((ssa_str != NULL) ? "," : ""),
                ((ssa_str != NULL) ? ssa_str : ""),
                spa_str);
         break;
       case ATMARPOP_NAK:
-        col_add_fstr(pinfo->fd, COL_INFO, "I don't know where %s is", spa_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "I don't know where %s is", spa_str);
         break;
       default:
-        col_add_fstr(pinfo->fd, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op);
         break;
     }
   }
@@ -655,10 +655,10 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
      Clear the Info column so that, if we throw an exception, it
      shows up as a short or malformed ARP frame. */
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-      col_set_str(pinfo->fd, COL_PROTOCOL, "ARP");
-  if (check_col(pinfo->fd, COL_INFO))
-      col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+      col_clear(pinfo->cinfo, COL_INFO);
 
   ar_hrd = tvb_get_ntohs(tvb, AR_HRD);
   if (ar_hrd == ARPHRD_ATM2225) {
@@ -694,45 +694,45 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_pln);
   tpa_str = arpproaddr_to_str(tpa_val, ar_pln, ar_pro);
   
-  if (check_col(pinfo->fd, COL_PROTOCOL)) {
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
     switch (ar_op) {
 
     case ARPOP_REQUEST:
     case ARPOP_REPLY:
     default:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "ARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP");
       break;
 
     case ARPOP_RREQUEST:
     case ARPOP_RREPLY:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "RARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP");
       break;
 
     case ARPOP_IREQUEST:
     case ARPOP_IREPLY:
-      col_set_str(pinfo->fd, COL_PROTOCOL, "Inverse ARP");
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP");
       break;
     }
   }
 
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     switch (ar_op) {
       case ARPOP_REQUEST:
-        col_add_fstr(pinfo->fd, COL_INFO, "Who has %s?  Tell %s", tpa_str, spa_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s?  Tell %s", tpa_str, spa_str);
         break;
       case ARPOP_REPLY:
-        col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", spa_str, sha_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", spa_str, sha_str);
         break;
       case ARPOP_RREQUEST:
       case ARPOP_IREQUEST:
-        col_add_fstr(pinfo->fd, COL_INFO, "Who is %s?  Tell %s", tha_str, sha_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s?  Tell %s", tha_str, sha_str);
         break;
       case ARPOP_RREPLY:
       case ARPOP_IREPLY:
-        col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", sha_str, spa_str);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", sha_str, spa_str);
         break;
       default:
-        col_add_fstr(pinfo->fd, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op);
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op);
         break;
     }
   }
index dfa4269129cadac76a6e0ab893272ca50787d02c..cadcf3f44c1a531883f81c0cfef5fca0664f34f2 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ascend.c
  * Routines for decoding Lucent/Ascend packet traces
  *
- * $Id: packet-ascend.c,v 1.27 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-ascend.c,v 1.28 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -61,14 +61,14 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   /* load the top pane info. This should be overwritten by
      the next protocol in the stack */
-  if(check_col(pinfo->fd, COL_RES_DL_SRC))
-    col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A" );
-  if(check_col(pinfo->fd, COL_RES_DL_DST))
-    col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A" );
-  if(check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "N/A" );
-  if(check_col(pinfo->fd, COL_INFO))
-    col_set_str(pinfo->fd, COL_INFO, "Lucent/Ascend packet trace" );
+  if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+    col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A" );
+  if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+    col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A" );
+  if(check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "N/A" );
+  if(check_col(pinfo->cinfo, COL_INFO))
+    col_set_str(pinfo->cinfo, COL_INFO, "Lucent/Ascend packet trace" );
 
   /* populate a tree in the second pane with the status of the link
      layer (ie none) */
index 458d4928fb4a8412ef23f5957ca5a94971eb4366..d080b70706c98e876e2f7ee013df383f90d6962e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-atalk.c
  * Routines for Appletalk packet disassembly (DDP, currently).
  *
- * $Id: packet-atalk.c,v 1.59 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-atalk.c,v 1.60 2001/12/10 00:25:26 guy Exp $
  *
  * Simon Wilkinson <sxw@dcs.ed.ac.uk>
  *
@@ -195,15 +195,15 @@ dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   proto_item *ti;
   guint8 function;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "RTMP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTMP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   function = tvb_get_guint8(tvb, 0);
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_fstr(pinfo->fd, COL_INFO, "%s",
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
        val_to_str(function, rtmp_function_vals, "Unknown function (%02)"));
   
   if (tree) {
@@ -224,10 +224,10 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   guint16 node; /* might be more than 8 bits */
   int i;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "RTMP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTMP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   net = tvb_get_ntohs(tvb, offset);
   nodelen_bits = tvb_get_guint8(tvb, offset+2);
@@ -239,8 +239,8 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     nodelen = 2;
   }
   
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_fstr(pinfo->fd, COL_INFO, "Net: %u  Node Len: %u  Node: %u",
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_fstr(pinfo->cinfo, COL_INFO, "Net: %u  Node Len: %u  Node: %u",
                net, nodelen_bits, node);
   
   if (tree) {
@@ -312,17 +312,17 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   guint op, count;
   unsigned int i;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "NBP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "NBP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   info = tvb_get_guint8(tvb, offset);
   op = info >> 4;
   count = info & 0x0F;
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_fstr(pinfo->fd, COL_INFO, "Op: %s  Count: %u",
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_fstr(pinfo->cinfo, COL_INFO, "Op: %s  Count: %u",
       val_to_str(op, nbp_op_vals, "Unknown (0x%01x)"), count);
   
   if (tree) {
@@ -382,10 +382,10 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
   static struct atalk_ddp_addr src, dst;
   tvbuff_t   *new_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "DDP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "DDP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_SHORT_HEADER_SIZE,
@@ -414,8 +414,8 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
   SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
   SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
 
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_add_str(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_add_str(pinfo->cinfo, COL_INFO,
       val_to_str(type, op_vals, "Unknown DDP protocol (%02x)"));
   }
   if (tree)
@@ -436,10 +436,10 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   static struct atalk_ddp_addr src, dst;
   tvbuff_t   *new_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "DDP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "DDP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   tvb_memcpy(tvb, (guint8 *)&ddp, 0, sizeof(e_ddp));
   ddp.dnet=ntohs(ddp.dnet);
@@ -458,8 +458,8 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
   SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_str(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_str(pinfo->cinfo, COL_INFO,
       val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
   
   if (tree) {
@@ -520,10 +520,10 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_item *ti;
   tvbuff_t   *new_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "LLAP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLAP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_llap, tvb, 0, 3, FALSE);
@@ -537,8 +537,8 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   if (tree)
     proto_tree_add_uint(llap_tree, hf_llap_src, tvb, 1, 1, snode);
   type = tvb_get_guint8(tvb, 2);
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_add_str(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_add_str(pinfo->cinfo, COL_INFO,
       val_to_str(type, llap_type_vals, "Unknown LLAP type (%02x)"));
   }
   if (tree)
index d97e93cf036134d9fb624884783af98fac4dcd81..0b3e26071c4dcde6996f1566926aed2579fcecf8 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-atm.c
  * Routines for ATM packet disassembly
  *
- * $Id: packet-atm.c,v 1.38 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-atm.c,v 1.39 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -262,8 +262,8 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint32 tlv_type;
   guint8 tlv_length;
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_set_str(pinfo->fd, COL_INFO, "LE Control");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_set_str(pinfo->cinfo, COL_INFO, "LE Control");
 
   if (tree) {
     ti = proto_tree_add_protocol_format(tree, proto_atm_lane, tvb, offset, 108, "ATM LANE");
@@ -380,10 +380,10 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tvbuff_t     *next_tvb;
   tvbuff_t     *next_tvb_le_client;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "ATM LANE");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_set_str(pinfo->fd, COL_INFO, "ATM LANE");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM LANE");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_set_str(pinfo->cinfo, COL_INFO, "ATM LANE");
 
   /* Is it LE Control, 802.3, 802.5, or "none of the above"? */
   switch (pinfo->pseudo_header->ngsniffer_atm.AppHLType) {
@@ -603,35 +603,35 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     }
   }
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "ATM");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM");
 
   switch (pinfo->pseudo_header->ngsniffer_atm.channel) {
 
   case 0:
     /* Traffic from DCE to DTE. */
-    if (check_col(pinfo->fd, COL_RES_DL_DST))
-      col_set_str(pinfo->fd, COL_RES_DL_DST, "DTE");
-    if (check_col(pinfo->fd, COL_RES_DL_SRC))
-      col_set_str(pinfo->fd, COL_RES_DL_SRC, "DCE");
+    if (check_col(pinfo->cinfo, COL_RES_DL_DST))
+      col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
+    if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
+      col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
     break;
 
   case 1:
     /* Traffic from DTE to DCE. */
-    if (check_col(pinfo->fd, COL_RES_DL_DST))
-      col_set_str(pinfo->fd, COL_RES_DL_DST, "DCE");
-    if (check_col(pinfo->fd, COL_RES_DL_SRC))
-      col_set_str(pinfo->fd, COL_RES_DL_SRC, "DTE");
+    if (check_col(pinfo->cinfo, COL_RES_DL_DST))
+      col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
+    if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
+      col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
     break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     if (aal_type == ATT_AAL5) {
-      col_add_fstr(pinfo->fd, COL_INFO, "AAL5 %s",
+      col_add_fstr(pinfo->cinfo, COL_INFO, "AAL5 %s",
                val_to_str(hl_type, aal5_hltype_vals,
                                "Unknown traffic type (%x)"));
     } else {
-      col_add_str(pinfo->fd, COL_INFO,
+      col_add_str(pinfo->cinfo, COL_INFO,
                val_to_str(aal_type, aal_vals, "Unknown AAL (%x)"));
     }
   }
index 305b0971f523d5b816395dc27e4274bb23c8c5e9..6081b04a50caabcc3ddc3aeabcd5bde23dd2c54e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Heikki Vatiainen <hessu@cs.tut.fi>
  *
- * $Id: packet-auto_rp.c,v 1.15 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-auto_rp.c,v 1.16 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -123,15 +123,15 @@ static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
         guint8 ver_type, rp_count;
 
-        if (check_col(pinfo->fd, COL_PROTOCOL))
-                col_set_str(pinfo->fd, COL_PROTOCOL, "Auto-RP");
-        if (check_col(pinfo->fd, COL_INFO))
-                col_clear(pinfo->fd, COL_INFO);
+        if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                col_set_str(pinfo->cinfo, COL_PROTOCOL, "Auto-RP");
+        if (check_col(pinfo->cinfo, COL_INFO))
+                col_clear(pinfo->cinfo, COL_INFO);
         
         ver_type = tvb_get_guint8(tvb, 0);
         rp_count = tvb_get_guint8(tvb, 1);
-        if (check_col(pinfo->fd, COL_INFO))
-                col_add_fstr(pinfo->fd, COL_INFO, "%s (v%s) for %u RP%s",
+        if (check_col(pinfo->cinfo, COL_INFO))
+                col_add_fstr(pinfo->cinfo, COL_INFO, "%s (v%s) for %u RP%s",
                              val_to_str(lo_nibble(ver_type), auto_rp_type_vals, "Unknown"),
                              val_to_str(hi_nibble(ver_type), auto_rp_ver_vals, "Unknown"),
                              rp_count, plurality(rp_count, "", "s"));
index 33f85276d90cc690d7560332690db6ea056008e4..21938945c43f9057630c6cb7c799446baf76ad76 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet (APDU) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bacapp.c,v 1.7 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-bacapp.c,v 1.8 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -80,16 +80,16 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint8 bacapp_type;
        tvbuff_t *next_tvb;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "BACnet-APDU");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_add_str(pinfo->fd, COL_INFO, "BACnet APDU ");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "BACnet-APDU");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_str(pinfo->cinfo, COL_INFO, "BACnet APDU ");
 
        offset  = 0;
        bacapp_type = (tvb_get_guint8(tvb, offset) >> 4) & 0x0f;
 
-       if (check_col(pinfo->fd, COL_INFO))
-               col_append_fstr(pinfo->fd, COL_INFO, "(%s)",
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_append_fstr(pinfo->cinfo, COL_INFO, "(%s)",
                bacapp_type_name(bacapp_type));
        if (tree) {
                ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, tvb_length(tvb), FALSE);
index 6403636e95631c997f08e753709eddeef37038c9..9bdba5964fea449b241f1cd0ce487392d1ac1a70 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet (NPDU) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bacnet.c,v 1.7 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-bacnet.c,v 1.8 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -197,11 +197,11 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint8 j;
        tvbuff_t *next_tvb;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL)) 
-               col_set_str(pinfo->fd, COL_PROTOCOL, "BACnet-NPDU");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "BACnet-NPDU");
 
-       if (check_col(pinfo->fd, COL_INFO)) 
-               col_set_str(pinfo->fd, COL_INFO, "Building Automation and Control Network NPDU");
+       if (check_col(pinfo->cinfo, COL_INFO)) 
+               col_set_str(pinfo->cinfo, COL_INFO, "Building Automation and Control Network NPDU");
 
        offset = 0;
        bacnet_version = tvb_get_guint8(tvb, offset);
index 967aed98041de65d87f3d123614cb19d29aa47d7..919939a6b12f87a4d8e21d2c7f8faf4612648a56 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-beep.c
  * Routines for BEEP packet disassembly
  *
- * $Id: packet-beep.c,v 1.1 2001/12/08 01:45:35 guy Exp $
+ * $Id: packet-beep.c,v 1.2 2001/12/10 00:25:26 guy Exp $
  *
  * Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
  * Modified 2001 Darren New <dnew@invisible.net> for BEEP.
@@ -906,14 +906,14 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       }
     }
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "BEEP");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "BEEP");
 
-  if (check_col(pinfo->fd, COL_INFO)) {  /* Check the type ... */
+  if (check_col(pinfo->cinfo, COL_INFO)) {  /* Check the type ... */
 
     /* "tvb_format_text()" is passed a value that won't go past the end
      * of the packet, so it won't throw an exception. */
-    col_add_str(pinfo->fd, COL_INFO, tvb_format_text(tvb, offset, tvb_length_remaining(tvb, offset)));
+    col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(tvb, offset, tvb_length_remaining(tvb, offset)));
 
   }
 
index 5e40e96cc4372d0f7856cf5edb29eebc1a1f6844..a156cd085ae6be8b60df9574fca5a448d6fc19e5 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BGP packet dissection.
  * Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
  *
- * $Id: packet-bgp.c,v 1.49 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-bgp.c,v 1.50 2001/12/10 00:25:26 guy Exp $
  *
  * Supports:
  * RFC1771 A Border Gateway Protocol 4 (BGP-4)
@@ -1661,10 +1661,10 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     int           hlen;          /* BGP header length                */
     char          *typ;          /* BGP message type                 */
 
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-       col_set_str(pinfo->fd, COL_PROTOCOL, "BGP");
-    if (check_col(pinfo->fd, COL_INFO))
-       col_clear(pinfo->fd, COL_INFO);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "BGP");
+    if (check_col(pinfo->cinfo, COL_INFO))
+       col_clear(pinfo->cinfo, COL_INFO);
 
     l = tvb_length(tvb);
     i = 0;
@@ -1685,11 +1685,11 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        hlen = ntohs(bgp.bgp_len);
        typ = val_to_str(bgp.bgp_type, bgptypevals, "Unknown Message");
 
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
            if (found == 0)
-               col_add_fstr(pinfo->fd, COL_INFO, "%s", typ);
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s", typ);
            else
-               col_append_fstr(pinfo->fd, COL_INFO, ", %s", typ);
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", typ);
        }
 
        i += hlen;
index dd345e4d2d0ed6920f2e0a34410198b49f32afef..3d9d40118b1c153fd9f704c8543ff004707f3b63 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BOOTP/DHCP packet disassembly
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-bootp.c,v 1.58 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-bootp.c,v 1.59 2001/12/10 00:25:26 guy Exp $
  *
  * The information used comes from:
  * RFC  951: Bootstrap Protocol
@@ -1068,33 +1068,33 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        const char      *dhcp_type = NULL;
        const guint8    *vendor_class_id = NULL;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "BOOTP");
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP");
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                /*
                 * In case we throw an exception fetching the opcode, etc.
                 */
-               col_clear(pinfo->fd, COL_INFO);
+               col_clear(pinfo->cinfo, COL_INFO);
        }
 
        op = tvb_get_guint8(tvb, 0);
        htype = tvb_get_guint8(tvb, 1);
        hlen = tvb_get_guint8(tvb, 2);
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                switch (op) {
 
                case BOOTREQUEST:
-                       col_add_fstr(pinfo->fd, COL_INFO, "Boot Request from %s",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s",
                                arphrdaddr_to_str(tvb_get_ptr(tvb, 28, hlen),
                                        hlen, htype));
                        break;
 
                case BOOTREPLY:
-                       col_set_str(pinfo->fd, COL_INFO, "Boot Reply");
+                       col_set_str(pinfo->cinfo, COL_INFO, "Boot Reply");
                        break;
 
                default:
-                       col_add_fstr(pinfo->fd, COL_INFO, "Unknown BOOTP message type (%u)",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)",
                            op);
                        break;
                }
@@ -1207,10 +1207,10 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 * Yes, this is a DHCP packet, and "dhcp_type" is the
                 * packet type.
                 */
-               if (check_col(pinfo->fd, COL_PROTOCOL))
-                       col_set_str(pinfo->fd, COL_PROTOCOL, "DHCP");
-               if (check_col(pinfo->fd, COL_INFO))
-                       col_add_fstr(pinfo->fd, COL_INFO, "DHCP %-8s - Transaction ID 0x%x",
+               if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP");
+               if (check_col(pinfo->cinfo, COL_INFO))
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "DHCP %-8s - Transaction ID 0x%x",
                            dhcp_type, tvb_get_ntohl(tvb, 4));
                if (tree)
                        proto_tree_add_boolean_hidden(bp_tree, hf_bootp_dhcp,
index ec6f63da60a3da6bf127e9084a8db76a7f391340..6c57b066cc12451675a1f624305fc457e888e268 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-bpdu.c
  * Routines for BPDU (Spanning Tree Protocol) disassembly
  *
- * $Id: packet-bpdu.c,v 1.29 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-bpdu.c,v 1.30 2001/12/10 00:25:26 guy Exp $
  *
  * Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
  * 
@@ -133,13 +133,13 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
            pinfo->current_proto = "GARP";
 
-           if (check_col(pinfo->fd, COL_PROTOCOL)) {
-                   col_set_str(pinfo->fd, COL_PROTOCOL, "GARP");
+           if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+                   col_set_str(pinfo->cinfo, COL_PROTOCOL, "GARP");
                    /* Generic Attribute Registration Protocol */
            }
 
-           if (check_col(pinfo->fd, COL_INFO)) {
-                   col_add_fstr(pinfo->fd, COL_INFO,
+           if (check_col(pinfo->cinfo, COL_INFO)) {
+                   col_add_fstr(pinfo->cinfo, COL_INFO,
                        "Unknown GARP application (0x%02X)",
                        pinfo->dl_dst.data[5]);
             }
@@ -147,11 +147,11 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
            return;
       }
 
-      if (check_col(pinfo->fd, COL_PROTOCOL)) {
-           col_set_str(pinfo->fd, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */
+      if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+           col_set_str(pinfo->cinfo, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */
       }
-      if (check_col(pinfo->fd, COL_INFO)) {
-           col_clear(pinfo->fd, COL_INFO);
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+           col_clear(pinfo->cinfo, COL_INFO);
       }
 
       bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
@@ -173,14 +173,14 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
            port_identifier = 0;
       }
 
-      if (check_col(pinfo->fd, COL_INFO)) {
+      if (check_col(pinfo->cinfo, COL_INFO)) {
            if (bpdu_type == 0)
-                 col_add_fstr(pinfo->fd, COL_INFO, "Conf. %sRoot = %d/%s  Cost = %d  Port = 0x%04x", 
+                 col_add_fstr(pinfo->cinfo, COL_INFO, "Conf. %sRoot = %d/%s  Cost = %d  Port = 0x%04x", 
                               flags & 0x1 ? "TC + " : "",
                               root_identifier_bridge_priority, root_identifier_mac_str, root_path_cost,
                               port_identifier);
            else if (bpdu_type == 0x80)
-                 col_add_fstr(pinfo->fd, COL_INFO, "Topology Change Notification");
+                 col_add_fstr(pinfo->cinfo, COL_INFO, "Topology Change Notification");
       }
 
       if (tree) {
index e74d27b9a8815b67f143807af9ce0f74ffa70484..d361f97eadbb9c1636a7822d9034f7e4a11f7dbd 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet/IP (BVLL, BVLC) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bvlc.c,v 1.7 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-bvlc.c,v 1.8 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -128,11 +128,11 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint16 bvlc_result;
        tvbuff_t *next_tvb;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "BVLC");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "BVLC");
 
-       if (check_col(pinfo->fd, COL_INFO))
-               col_set_str(pinfo->fd, COL_INFO, "BACnet Virtual Link Control");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str(pinfo->cinfo, COL_INFO, "BACnet Virtual Link Control");
 
        offset = 0;
 
index 1905ddadef6ca7188a6677309db1de2392a59162..51e1e4de6c1b9d79ae734400069831bb57f89617 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for the disassembly of the "Cisco Discovery Protocol"
  * (c) Copyright Hannes R. Boehm <hannes@boehm.org>
  *
- * $Id: packet-cdp.c,v 1.41 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-cdp.c,v 1.42 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -111,10 +111,10 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint32 naddresses;
     int addr_length;
 
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-        col_set_str(pinfo->fd, COL_PROTOCOL, "CDP");
-    if (check_col(pinfo->fd, COL_INFO))
-        col_set_str(pinfo->fd, COL_INFO, "Cisco Discovery Protocol"); 
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, "CDP");
+    if (check_col(pinfo->cinfo, COL_INFO))
+        col_set_str(pinfo->cinfo, COL_INFO, "Cisco Discovery Protocol"); 
 
     if (tree){
         ti = proto_tree_add_item(tree, proto_cdp, tvb, offset,
index 0601ba12e63fdfbfc8dad33779910e7af8fda988..2581eb184786cfe5e1f0166f553f1d078738c44e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-cgmp.c
  * Routines for the disassembly of the Cisco Group Management Protocol
  *
- * $Id: packet-cgmp.c,v 1.11 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-cgmp.c,v 1.12 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -65,10 +65,10 @@ dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        int offset = 0;
        guint8 count;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "CGMP");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_set_str(pinfo->fd, COL_INFO, "Cisco Group Management Protocol"); 
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "CGMP");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str(pinfo->cinfo, COL_INFO, "Cisco Group Management Protocol"); 
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_cgmp, tvb, offset,
index 60919a49b600aafec7faf0b76c9756f0ccb825cf..90705e5acd46f2fe6c635e00b741754a0d8254bd 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-chdlc.c
  * Routines for Cisco HDLC packet disassembly
  *
- * $Id: packet-chdlc.c,v 1.8 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-chdlc.c,v 1.9 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -133,8 +133,8 @@ chdlctype(guint16 chdlctype, tvbuff_t *tvb, int offset_after_chdlctype,
 
   /* do lookup with the subdissector table */
   if (!dissector_try_port(subdissector_table, chdlctype, next_tvb, pinfo, tree)) {
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-      col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x", chdlctype);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+      col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", chdlctype);
     call_dissector(data_handle,next_tvb, pinfo, tree);
   }
 }
@@ -147,14 +147,14 @@ dissect_chdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint8     addr;
   guint16    proto;
 
-  if (check_col(pinfo->fd, COL_RES_DL_SRC))
-    col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A");
-  if (check_col(pinfo->fd, COL_RES_DL_DST))
-    col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A");
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "CHDLC");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
+    col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A");
+  if (check_col(pinfo->cinfo, COL_RES_DL_DST))
+    col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "CHDLC");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   addr = tvb_get_guint8(tvb, 0);
   proto = tvb_get_ntohs(tvb, 2);
@@ -225,10 +225,10 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint32 mysequence;
   guint32 yoursequence;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "SLARP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "SLARP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   code = tvb_get_ntohl(tvb, 0);
 
@@ -241,8 +241,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   case SLARP_REQUEST:
   case SLARP_REPLY:
-    if (check_col(pinfo->fd, COL_INFO)) {
-      col_add_fstr(pinfo->fd, COL_INFO, "%s, from %s, mask %s",
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+      col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
         match_strval(code, slarp_ptype_vals),
         get_hostname(htonl(tvb_get_ntohl(tvb, 4))),
         ip_to_str(tvb_get_ptr(tvb, 8, 4)));
@@ -258,8 +258,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   case SLARP_LINECHECK:
     mysequence = tvb_get_ntohl(tvb, 4);
     yoursequence = tvb_get_ntohl(tvb, 8);
-    if (check_col(pinfo->fd, COL_INFO)) {
-      col_add_fstr(pinfo->fd, COL_INFO,
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+      col_add_fstr(pinfo->cinfo, COL_INFO,
         "%s, outgoing sequence %u, returned sequence %u",
        match_strval(code, slarp_ptype_vals),
         mysequence, yoursequence);
@@ -274,8 +274,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     break;
 
   default:
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "Unknown packet type 0x%08X", code);
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown packet type 0x%08X", code);
     if (tree) {
       proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
       call_dissector(data_handle,tvb_new_subset(tvb, 4,-1,tvb_reported_length_remaining(tvb,4)), pinfo, slarp_tree);
index ab3510abe6afdb6e66e1df32b5869f3b7a54a2a2..1b8af508934b6f07806e801806f1eb67026050b3 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-clip.c
  * Routines for clip packet disassembly
  *
- * $Id: packet-clip.c,v 1.17 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-clip.c,v 1.18 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -58,14 +58,14 @@ dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   /* load the top pane info. This should be overwritten by
      the next protocol in the stack */
-  if(check_col(pinfo->fd, COL_RES_DL_SRC))
-    col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A" );
-  if(check_col(pinfo->fd, COL_RES_DL_DST))
-    col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A" );
-  if(check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "CLIP" );
-  if(check_col(pinfo->fd, COL_INFO))
-    col_set_str(pinfo->fd, COL_INFO, "Classical IP frame" );
+  if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+    col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A" );
+  if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+    col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A" );
+  if(check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "CLIP" );
+  if(check_col(pinfo->cinfo, COL_INFO))
+    col_set_str(pinfo->cinfo, COL_INFO, "Classical IP frame" );
 
   /* populate a tree in the second pane with the status of the link
      layer (ie none)
index 9274a7ce495f20e2795bdd01c61e055498f61701..4d128b94ab95354143fa2a229a2fc483635f5643 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.42 2001/12/04 04:26:44 guy Exp $
+ * $Id: packet-clnp.c,v 1.43 2001/12/10 00:25:26 guy Exp $
  * Laurent Deniel <deniel@worldnet.fr>
  * Ralf Schneider <Ralf.Schneider@t-online.de>
  *
@@ -693,8 +693,8 @@ static int osi_decode_DR(tvbuff_t *tvb, int offset,
       break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO,
                "DR TPDU src-ref: 0x%04x dst-ref: 0x%04x",
                 src_ref, dst_ref);
 
@@ -788,8 +788,8 @@ static int osi_decode_DT(tvbuff_t *tvb, int offset,
       break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO, "DT TPDU (%u) dst-ref: 0x%04x %s", 
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO, "DT TPDU (%u) dst-ref: 0x%04x %s", 
                 tpdu_nr,
                 dst_ref,
                 (fragment)? "(fragment)" : "");
@@ -911,8 +911,8 @@ static int osi_decode_ED(tvbuff_t *tvb, int offset,
       break;
   } /* li */
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO, "ED TPDU (%u) dst-ref: 0x%04x", 
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO, "ED TPDU (%u) dst-ref: 0x%04x", 
                 tpdu_nr, dst_ref);
 
   if (tree) {
@@ -989,8 +989,8 @@ static int osi_decode_RJ(tvbuff_t *tvb, int offset,
       break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO, "RJ TPDU (%u) dst-ref: 0x%04x", 
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO, "RJ TPDU (%u) dst-ref: 0x%04x", 
                 tpdu_nr, dst_ref);
 
   if (tree) {
@@ -1038,8 +1038,8 @@ static int osi_decode_CC(tvbuff_t *tvb, int offset,
   if (class_option > 4)
     return -1;
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO,
                 "%s TPDU src-ref: 0x%04x dst-ref: 0x%04x",
                 (tpdu == CR_TPDU) ? "CR" : "CC",
                 src_ref,
@@ -1107,8 +1107,8 @@ static int osi_decode_DC(tvbuff_t *tvb, int offset,
 
   src_ref = tvb_get_ntohs(tvb, offset + P_SRC_REF);
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO,
                 "DC TPDU src-ref: 0x%04x dst-ref: 0x%04x", 
                 src_ref,
                 dst_ref);
@@ -1165,8 +1165,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
 
     tpdu_nr = tvb_get_guint8(tvb, offset + P_TPDU_NR_234);
 
-    if (check_col(pinfo->fd, COL_INFO))
-      col_append_fstr(pinfo->fd, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x", 
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_append_fstr(pinfo->cinfo, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x", 
                   tpdu_nr, dst_ref);
 
     if (tree) {
@@ -1209,8 +1209,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
     tpdu_nr   = tvb_get_ntohl(tvb, offset + P_TPDU_NR_234);
     cdt_in_ak = tvb_get_ntohs(tvb, offset + P_CDT_IN_AK);
 
-    if (check_col(pinfo->fd, COL_INFO))
-      col_append_fstr(pinfo->fd, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x", 
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_append_fstr(pinfo->cinfo, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x", 
                   tpdu_nr, dst_ref);
     
     if (tree) {
@@ -1303,8 +1303,8 @@ static int osi_decode_EA(tvbuff_t *tvb, int offset,
       break;
   } /* li */
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO, 
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO, 
                 "EA TPDU (%u) dst-ref: 0x%04x", tpdu_nr, dst_ref);
 
   if (tree) {
@@ -1382,8 +1382,8 @@ static int osi_decode_ER(tvbuff_t *tvb, int offset,
       break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_fstr(pinfo->fd, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_fstr(pinfo->cinfo, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_cotp, tvb, offset, li + 1, FALSE);
@@ -1412,8 +1412,8 @@ static int osi_decode_UD(tvbuff_t *tvb, int offset,
   proto_tree *cltp_tree = NULL;
   tvbuff_t   *next_tvb;
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_append_str(pinfo->fd, COL_INFO, "UD TPDU");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_append_str(pinfo->cinfo, COL_INFO, "UD TPDU");
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_cltp, tvb, offset, li + 1, FALSE);
@@ -1469,17 +1469,17 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
 
   /* Initialize the COL_INFO field; each of the TPDUs will have its
      information appended. */
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_str(pinfo->fd, COL_INFO, "");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_str(pinfo->cinfo, COL_INFO, "");
 
   while (tvb_offset_exists(tvb, offset)) {
     if (!first_tpdu) {
-      if (check_col(pinfo->fd, COL_INFO))
-        col_append_str(pinfo->fd, COL_INFO, ", ");
+      if (check_col(pinfo->cinfo, COL_INFO))
+        col_append_str(pinfo->cinfo, COL_INFO, ", ");
     }
     if ((li = tvb_get_guint8(tvb, offset + P_LI)) == 0) {
-      if (check_col(pinfo->fd, COL_INFO))
-        col_append_str(pinfo->fd, COL_INFO, "Length indicator is zero");
+      if (check_col(pinfo->cinfo, COL_INFO))
+        col_append_str(pinfo->cinfo, COL_INFO, "Length indicator is zero");
       if (!first_tpdu)
         call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
       return found_ositp;
@@ -1527,8 +1527,8 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
         is_cltp = TRUE;
         break;
       default      :
-        if (first_tpdu && check_col(pinfo->fd, COL_INFO))
-          col_append_fstr(pinfo->fd, COL_INFO, "Unknown TPDU type (0x%x)", tpdu);
+        if (first_tpdu && check_col(pinfo->cinfo, COL_INFO))
+          col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown TPDU type (0x%x)", tpdu);
         new_offset = -1;       /* bad PDU type */
         break;
     }
@@ -1542,8 +1542,8 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
     if (first_tpdu) {
       /* Well, we found at least one valid COTP or CLTP PDU, so I guess this
          is either COTP or CLTP. */
-      if (!subdissector_found && check_col(pinfo->fd, COL_PROTOCOL))
-        col_set_str(pinfo->fd, COL_PROTOCOL, is_cltp ? "CLTP" : "COTP");
+      if (!subdissector_found && check_col(pinfo->cinfo, COL_PROTOCOL))
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, is_cltp ? "CLTP" : "COTP");
       found_ositp = TRUE;
     }
 
@@ -1598,15 +1598,15 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tvbuff_t   *volatile next_tvb;
   gboolean update_col_info = TRUE;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "CLNP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "CLNP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   cnf_proto_id = tvb_get_guint8(tvb, P_CLNP_PROTO_ID);
   if (cnf_proto_id == NLPID_NULL) {
-    if (check_col(pinfo->fd, COL_INFO))
-      col_set_str(pinfo->fd, COL_INFO, "Inactive subset");
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_set_str(pinfo->cinfo, COL_INFO, "Inactive subset");
     if (tree) {
       ti = proto_tree_add_item(tree, proto_clnp, tvb, P_CLNP_PROTO_ID, 1, FALSE);
       clnp_tree = proto_item_add_subtree(ti, ett_clnp);
@@ -1687,8 +1687,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      we set it otherwise. */
 
   if (!tvb_bytes_exist(tvb, 0, cnf_hdr_len)) {
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
   }
 
   segment_length = tvb_get_ntohs(tvb, P_CLNP_SEGLEN);
@@ -1903,8 +1903,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       }
       if (fd_head->flags & (FD_OVERLAPCONFLICT
                         |FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
-        if (check_col(pinfo->fd, COL_INFO)) {
-          col_set_str(pinfo->fd, COL_INFO, "[Illegal segments]");
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+          col_set_str(pinfo->cinfo, COL_INFO, "[Illegal segments]");
           update_col_info = FALSE;
         }
       }
@@ -1955,8 +1955,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   if (next_tvb == NULL) {
     /* Just show this as a segment. */
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "Fragmented %s NPDU %s(off=%u)",
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "Fragmented %s NPDU %s(off=%u)",
                pdu_type_string, flag_string, segment_offset);
 
     /* As we haven't reassembled anything, we haven't changed "pi", so
@@ -1984,8 +1984,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       /* The payload is the header and "none, some, or all of the data
          part of the discarded PDU", i.e. it's like an ICMP error;
         dissect it as a CLNP PDU. */
-      if (check_col(pinfo->fd, COL_INFO))
-        col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
+      if (check_col(pinfo->cinfo, COL_INFO))
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
       if (tree) {
         next_length = tvb_length_remaining(tvb, offset);
         if (next_length != 0) {
@@ -1993,7 +1993,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
              Make the columns non-writable, so the packet isn't shown
              in the summary based on what the discarded PDU's contents
              are. */
-          col_set_writable(pinfo->fd, FALSE);
+          col_set_writable(pinfo->cinfo, FALSE);
 
           /* Also, save the current values of the addresses, and restore
              them when we're finished dissecting the contained packet, so
@@ -2051,8 +2051,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       break;
     }
   }
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
   call_dissector(data_handle,next_tvb, pinfo, tree);
 
 } /* dissect_clnp */
index 926a711299346e77d3223564cde3718c145d66a0..541c9584e05ad4cb2ba273d975b154b11cd33c1d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
  *
- * $Id: packet-cops.c,v 1.14 2001/12/03 03:59:33 guy Exp $
+ * $Id: packet-cops.c,v 1.15 2001/12/10 00:25:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -265,14 +265,14 @@ static void dissect_cops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
         guint8 op_code;
 
-        if (check_col(pinfo->fd, COL_PROTOCOL)) 
-                col_set_str(pinfo->fd, COL_PROTOCOL, "COPS");
-        if (check_col(pinfo->fd, COL_INFO)) 
-                col_clear(pinfo->fd, COL_INFO);
+        if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+                col_set_str(pinfo->cinfo, COL_PROTOCOL, "COPS");
+        if (check_col(pinfo->cinfo, COL_INFO)) 
+                col_clear(pinfo->cinfo, COL_INFO);
     
         op_code = tvb_get_guint8(tvb, 1);
-        if (check_col(pinfo->fd, COL_INFO))
-                col_add_fstr(pinfo->fd, COL_INFO, "COPS %s",
+        if (check_col(pinfo->cinfo, COL_INFO))
+                col_add_fstr(pinfo->cinfo, COL_INFO, "COPS %s",
                              val_to_str(op_code, cops_op_code_vals, "Unknown Op Code"));
 
         if (tree) {
index 509c021b0f63517784b5e36429b2dd89b3034bf4..32032ddd615d635042746b48ccef9a03b432c0fc 100644 (file)
@@ -5,7 +5,7 @@
 * Charles Levert <charles@comm.polymtl.ca>
 * Copyright 2001 Charles Levert
 *
-* $Id: packet-cups.c,v 1.7 2001/12/03 03:59:34 guy Exp $
+* $Id: packet-cups.c,v 1.8 2001/12/10 00:25:27 guy Exp $
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -164,10 +164,10 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        cups_ptype_t    ptype;
        unsigned int    state;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, PROTO_TAG_CUPS);
-       if (check_col(pinfo->fd, COL_INFO))
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CUPS);
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_cups, tvb, offset,
@@ -222,8 +222,8 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                proto_tree_add_text(cups_tree, tvb, offset, len,
                    "URI: %.*s",
                    (guint16) len, str);
-       if (check_col(pinfo->fd, COL_INFO))
-               col_add_fstr(pinfo->fd, COL_INFO,
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_fstr(pinfo->cinfo, COL_INFO,
                    "%.*s (%s)",
                    (guint16) len, str,
                    val_to_str(state, cups_state_values, "0x%x"));
index 5ede69e9347a8ed381e6c0724d4924355049077f..a1a9ed481c7803c9c1be7eb986821c3c9c09a17d 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC packet disassembly
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc.c,v 1.20 2001/12/05 08:20:28 guy Exp $
+ * $Id: packet-dcerpc.c,v 1.21 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -480,13 +480,13 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
     if (!name)
         name = "Unknown?!";
 
-    if (check_col (pinfo->fd, COL_INFO)) {
-        col_add_fstr (pinfo->fd, COL_INFO, "%s %s(...)",
+    if (check_col (pinfo->cinfo, COL_INFO)) {
+        col_add_fstr (pinfo->cinfo, COL_INFO, "%s %s(...)",
                       is_rqst ? "rqst" : "rply", name);
     }
 
-    if (check_col (pinfo->fd, COL_PROTOCOL)) {
-        col_set_str (pinfo->fd, COL_PROTOCOL, sub_proto->name);
+    if (check_col (pinfo->cinfo, COL_PROTOCOL)) {
+        col_set_str (pinfo->cinfo, COL_PROTOCOL, sub_proto->name);
     }
 
     sub_dissect = is_rqst ? proc->dissect_rqst : proc->dissect_resp;
@@ -662,8 +662,8 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
 
         g_hash_table_insert (dcerpc_convs, key, value);
 
-        if (check_col (pinfo->fd, COL_INFO)) {
-          col_add_fstr (pinfo->fd, COL_INFO, "%s: UUID %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x ver %d.%d",
+        if (check_col (pinfo->cinfo, COL_INFO)) {
+          col_add_fstr (pinfo->cinfo, COL_INFO, "%s: UUID %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x ver %d.%d",
                         hdr->ptype == PDU_BIND ? "Bind" : "Alter Ctx",
                         if_id.Data1, if_id.Data2, if_id.Data3,
                         if_id.Data4[0], if_id.Data4[1],
@@ -762,14 +762,14 @@ dissect_dcerpc_cn_bind_ack (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerp
     
     dissect_dcerpc_cn_auth (tvb, pinfo, dcerpc_tree, hdr);
 
-    if (check_col (pinfo->fd, COL_INFO)) {
+    if (check_col (pinfo->cinfo, COL_INFO)) {
         if (num_results != 0 && result == 0) {
-            col_add_fstr (pinfo->fd, COL_INFO, "%s ack: accept  max_xmit: %d  max_recv: %d",
+            col_add_fstr (pinfo->cinfo, COL_INFO, "%s ack: accept  max_xmit: %d  max_recv: %d",
                           hdr->ptype == PDU_BIND_ACK ? "Bind" : "Alter ctx",
                           max_xmit, max_recv);
         } else {
             /* FIXME: should put in reason */
-            col_add_fstr (pinfo->fd, COL_INFO, "%s ack: %s",
+            col_add_fstr (pinfo->cinfo, COL_INFO, "%s ack: %s",
                           hdr->ptype == PDU_BIND_ACK ? "Bind" : "Alter ctx",
                           result == 1 ? "User reject" :
                           result == 2 ? "Provider reject" :
@@ -798,8 +798,8 @@ dissect_dcerpc_cn_rqst (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
     offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep,
                                     hf_dcerpc_opnum, &opnum);
 
-    if (check_col (pinfo->fd, COL_INFO)) {
-        col_add_fstr (pinfo->fd, COL_INFO, "Request: opnum: %d  ctx_id:%d",
+    if (check_col (pinfo->cinfo, COL_INFO)) {
+        col_add_fstr (pinfo->cinfo, COL_INFO, "Request: opnum: %d  ctx_id:%d",
                          opnum, ctx_id);
     }
 
@@ -875,8 +875,8 @@ dissect_dcerpc_cn_resp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
     offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep,
                                     hf_dcerpc_cn_ctx_id, &ctx_id);
 
-    if (check_col (pinfo->fd, COL_INFO)) {
-        col_add_fstr (pinfo->fd, COL_INFO, "Response: call_id: %d  ctx_id:%d",
+    if (check_col (pinfo->cinfo, COL_INFO)) {
+        col_add_fstr (pinfo->cinfo, COL_INFO, "Response: call_id: %d  ctx_id:%d",
                       hdr->call_id, ctx_id);
     }
 
@@ -966,10 +966,10 @@ dissect_dcerpc_cn (tvbuff_t *tvb, int offset, packet_info *pinfo,
     if (hdr.ptype > 19)
         return -1;
 
-    if (check_col (pinfo->fd, COL_PROTOCOL))
-        col_set_str (pinfo->fd, COL_PROTOCOL, "DCERPC");
-    if (check_col (pinfo->fd, COL_INFO))
-        col_set_str (pinfo->fd, COL_INFO, pckt_vals[hdr.ptype].strptr);
+    if (check_col (pinfo->cinfo, COL_PROTOCOL))
+        col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCERPC");
+    if (check_col (pinfo->cinfo, COL_INFO))
+        col_set_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
 
     hdr.flags = tvb_get_guint8 (tvb, offset++);
     tvb_memcpy (tvb, (guint8 *)hdr.drep, offset, sizeof (hdr.drep));
@@ -1160,10 +1160,10 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     if (hdr.ptype > 19)
         return FALSE;
 
-    if (check_col (pinfo->fd, COL_PROTOCOL))
-        col_set_str (pinfo->fd, COL_PROTOCOL, "DCERPC");
-    if (check_col (pinfo->fd, COL_INFO))
-        col_set_str (pinfo->fd, COL_INFO, pckt_vals[hdr.ptype].strptr);
+    if (check_col (pinfo->cinfo, COL_PROTOCOL))
+        col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCERPC");
+    if (check_col (pinfo->cinfo, COL_INFO))
+        col_set_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
 
     hdr.flags1 = tvb_get_guint8 (tvb, offset++);
     hdr.flags2 = tvb_get_guint8 (tvb, offset++);
index 803d1ab58040f5729b49216c77c4ccf2ed31ea5b..87786a6413d7e8bd9dbe33d0bc07b6f50cff9793 100644 (file)
@@ -3,7 +3,7 @@
  * see http://ddt.sourceforge.net/
  * Olivier Abad <oabad@cybercable.fr>
  *
- * $Id: packet-ddtp.c,v 1.17 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-ddtp.c,v 1.18 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -101,13 +101,13 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_tree *ddtp_tree = NULL;
     proto_item *ti;
 
-    if (check_col(pinfo->fd, COL_PROTOCOL)) {
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
        /* Indicate what kind of message this is. */
-       col_set_str (pinfo->fd, COL_PROTOCOL, "DDTP");
+       col_set_str (pinfo->cinfo, COL_PROTOCOL, "DDTP");
     }
-    if (check_col(pinfo->fd, COL_INFO)) {
+    if (check_col(pinfo->cinfo, COL_INFO)) {
        /* In case we throw an exception below. */
-       col_clear (pinfo->fd, COL_INFO);
+       col_clear (pinfo->cinfo, COL_INFO);
     }
     if (tree) {
        ti = proto_tree_add_item(tree, proto_ddtp, tvb, 0,
@@ -123,12 +123,12 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            proto_tree_add_item(ddtp_tree, hf_ddtp_msgtype, tvb, 12, 4, FALSE);
        switch (tvb_get_ntohl(tvb, 12)) {
        case DDTP_MESSAGE_ERROR :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Message Error");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Message Error");
            break;
        case DDTP_UPDATE_QUERY :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Update Query");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Update Query");
            if (tree) {
                proto_tree_add_item(ddtp_tree, hf_ddtp_opcode, tvb, 16, 4,
                        FALSE);
@@ -137,40 +137,40 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            }
            break;
        case DDTP_UPDATE_REPLY :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Update Reply");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Update Reply");
            if (tree) {
                proto_tree_add_item(ddtp_tree, hf_ddtp_status, tvb, 16, 4,
                        FALSE);
            }
            break;
        case DDTP_ALIVE_QUERY :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Alive Query");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Alive Query");
            if (tree) {
                proto_tree_add_text(ddtp_tree, tvb, 16, 4, "Dummy : %u",
                        tvb_get_ntohl(tvb, 16));
            }
            break;
        case DDTP_ALIVE_REPLY :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Alive Reply");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Alive Reply");
            if (tree) {
                proto_tree_add_text(ddtp_tree, tvb, 16, 4, "Dummy : %u",
                        tvb_get_ntohl(tvb, 16));
            }
            break;
        default :
-           if (check_col(pinfo->fd, COL_INFO))
-               col_set_str (pinfo->fd, COL_INFO, "Unknown type");
+           if (check_col(pinfo->cinfo, COL_INFO))
+               col_set_str (pinfo->cinfo, COL_INFO, "Unknown type");
            if (tree) {
                proto_tree_add_text(ddtp_tree, tvb, 12, 4, "Unknown type : %u",
                        tvb_get_ntohl(tvb, 12));
            }
        }
     } else {
-       if (check_col(pinfo->fd, COL_INFO))
-           col_set_str (pinfo->fd, COL_INFO, "Encrypted payload");
+       if (check_col(pinfo->cinfo, COL_INFO))
+           col_set_str (pinfo->cinfo, COL_INFO, "Encrypted payload");
     }
 }
 
index b6c5013aacff7ab51bcb74ccf36669bb94482263..14b2bcb0d5a1891b099112e7bc0cabcd99be8939 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-dec-bpdu.c
  * Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
  *
- * $Id: packet-dec-bpdu.c,v 1.8 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-dec-bpdu.c,v 1.9 2001/12/10 00:25:27 guy Exp $
  *
  * Copyright 2001 Paul Ionescu <paul@acorp.ro>
  * 
@@ -77,21 +77,21 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
       proto_tree *bpdu_tree;
       proto_item *ti;
 
-      if (check_col(pinfo->fd, COL_PROTOCOL)) {
-           col_set_str(pinfo->fd, COL_PROTOCOL, "DEC_STP");
+      if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+           col_set_str(pinfo->cinfo, COL_PROTOCOL, "DEC_STP");
       }
-      if (check_col(pinfo->fd, COL_INFO)) {
-           col_clear(pinfo->fd, COL_INFO);
+      if (check_col(pinfo->cinfo, COL_INFO)) {
+           col_clear(pinfo->cinfo, COL_INFO);
       }
 
       bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
       flags=tvb_get_guint8(tvb,BPDU_FLAGS);
       
-      if (check_col(pinfo->fd, COL_INFO)) {
+      if (check_col(pinfo->cinfo, COL_INFO)) {
            if (bpdu_type == 25)
-                 col_add_fstr(pinfo->fd, COL_INFO, "Hello Packet");
+                 col_add_fstr(pinfo->cinfo, COL_INFO, "Hello Packet");
            else if (bpdu_type == 0x02)
-                 col_add_fstr(pinfo->fd, COL_INFO, "Topology Change Notification");
+                 col_add_fstr(pinfo->cinfo, COL_INFO, "Topology Change Notification");
       }
       
       tvb_set_reported_length(tvb, DEC_BPDU_SIZE);
index a4028be99ad2dea6567149197e2bb947eb4c2db0..6fbad7677a5f2d113400962532431e2c96f3020e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-diameter.c
  * Routines for Diameter packet disassembly
  *
- * $Id: packet-diameter.c,v 1.36 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-diameter.c,v 1.37 2001/12/10 00:25:27 guy Exp $
  *
  * Copyright (c) 2001 by David Frascone <dave@frascone.com>
  *
@@ -972,10 +972,10 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
   }
        
   /* Make entries in Protocol column and Info column on summary display */
-  if (check_col(pinfo->fd, COL_PROTOCOL)) 
-       col_add_str(pinfo->fd, COL_PROTOCOL, "Diameter");
-  if (check_col(pinfo->fd, COL_INFO)) 
-       col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+       col_add_str(pinfo->cinfo, COL_PROTOCOL, "Diameter");
+  if (check_col(pinfo->cinfo, COL_INFO)) 
+       col_clear(pinfo->cinfo, COL_INFO);
        
   /* Copy our header */
   tvb_memcpy(tvb, (guint8*) &dh, offset, sizeof(dh));
@@ -1002,7 +1002,7 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
   commandCode = DIAM_GET_COMMAND(dh);
 
   /* Set up our flags */
-  if (check_col(pinfo->fd, COL_INFO) || tree) {  
+  if (check_col(pinfo->cinfo, COL_INFO) || tree) {  
        flagstr[0]=0;
        for (i = 0; i < 8; i++) {
          bpos = 1 << i;
@@ -1040,8 +1040,8 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
        BadPacket = TRUE;
   }
 
-  if (check_col(pinfo->fd, COL_INFO)) {
-       col_add_fstr(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_add_fstr(pinfo->cinfo, COL_INFO,
                                 "%s%s%s%s%s vendor=%s (hop-id=%d) (end-id=%d) RPE=%d%d%d",
                                 (BadPacket)?"***** Bad Packet!: ":"",
                                 (flags & DIAM_FLAGS_P)?"Proxyable ":"",
@@ -1222,7 +1222,7 @@ safe_dissect_mip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        
   /* The contained packet is a MIP registration request;
         dissect it with the MIP dissector. */
-  col_set_writable(pinfo->fd, FALSE);
+  col_set_writable(pinfo->cinfo, FALSE);
 
   /* Also, save the current values of the addresses, and restore
         them when we're finished dissecting the contained packet, so
@@ -1319,7 +1319,7 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
        avpLength = avph.avp_flagsLength & 0x00ffffff;
        
        /* Set up our flags string */
-       if (check_col(pinfo->fd, COL_INFO) || avp_tree) {  
+       if (check_col(pinfo->cinfo, COL_INFO) || avp_tree) {  
          flagstr[0]=0;
          for (i = 0; i < 8; i++) {
                bpos = 1 << i;
index a2c2460349828bd3da3750a9b17eb0fabafe2cfe..3552897697db092d8843639395050422a2d51589 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-dns.c
  * Routines for DNS packet disassembly
  *
- * $Id: packet-dns.c,v 1.76 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-dns.c,v 1.77 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -619,7 +619,7 @@ rfc1867_angle(tvbuff_t *tvb, int offset, const char *nsew)
 
 static int
 dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
-  frame_data *fd, proto_tree *dns_tree)
+  column_info *cinfo, proto_tree *dns_tree)
 {
   int len;
   char name[MAXDNAME];
@@ -648,8 +648,8 @@ dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
   class_name = dns_class_name(class);
   long_type_name = dns_long_type_name(type);
 
-  if (fd != NULL)
-    col_append_fstr(fd, COL_INFO, " %s %s", type_name, name);
+  if (cinfo != NULL)
+    col_append_fstr(cinfo, COL_INFO, " %s %s", type_name, name);
   if (dns_tree != NULL) {
     tq = proto_tree_add_text(dns_tree, tvb, offset, len, "%s: type %s, class %s", 
                   name, type_name, class_name);
@@ -756,7 +756,7 @@ static const value_string cert_vals[] = {
 
 static int
 dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
-  frame_data *fd, proto_tree *dns_tree)
+  column_info *cinfo, proto_tree *dns_tree)
 {
   int len;
   char name[MAXDNAME];
@@ -794,8 +794,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
   data_offset += 2;
   cur_offset += 2;
 
-  if (fd != NULL)
-    col_append_fstr(fd, COL_INFO, " %s", type_name);
+  if (cinfo != NULL)
+    col_append_fstr(cinfo, COL_INFO, " %s", type_name);
   if (dns_tree != NULL) {
     trr = proto_tree_add_text(dns_tree, tvb, offset,
                                (data_offset - data_start) + data_len,
@@ -818,8 +818,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       guint32 addr_int;
 
       addr = tvb_get_ptr(tvb, cur_offset, 4);
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", ip_to_str(addr));
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(addr));
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", addr %s", ip_to_str(addr));
        proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s",
@@ -838,8 +838,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       int ns_name_len;
       
       ns_name_len = get_dns_name(tvb, cur_offset, dns_data_offset, ns_name, sizeof(ns_name));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", ns_name);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", ns_name);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", ns %s", ns_name);
        proto_tree_add_text(rr_tree, tvb, cur_offset, ns_name_len, "Name server: %s",
@@ -854,8 +854,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       int cname_len;
       
       cname_len = get_dns_name(tvb, cur_offset, dns_data_offset, cname, sizeof(cname));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", cname);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", cname);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", cname %s", cname);
        proto_tree_add_text(rr_tree, tvb, cur_offset, cname_len, "Primary name: %s",
@@ -877,8 +877,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       guint32 minimum;
 
       mname_len = get_dns_name(tvb, cur_offset, dns_data_offset, mname, sizeof(mname));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", mname);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", mname);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", mname %s", mname);
        proto_tree_add_text(rr_tree, tvb, cur_offset, mname_len, "Primary name server: %s",
@@ -923,8 +923,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       int pname_len;
       
       pname_len = get_dns_name(tvb, cur_offset, dns_data_offset, pname, sizeof(pname));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", pname);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", pname);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", ptr %s", pname);
        proto_tree_add_text(rr_tree, tvb, cur_offset, pname_len, "Domain name: %s",
@@ -947,8 +947,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       char portnumstring[10+1];
       
       wks_addr = tvb_get_ptr(tvb, cur_offset, 4);
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", ip_to_str(wks_addr));
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(wks_addr));
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", addr %s", ip_to_str(wks_addr));
        proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s",
@@ -1017,8 +1017,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       os_offset = cpu_offset + 1 + cpu_len;
       os_len = tvb_get_guint8(tvb, os_offset);
       os = tvb_get_ptr(tvb, os_offset + 1, os_len);
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %.*s %.*s", cpu_len, cpu,
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %.*s %.*s", cpu_len, cpu,
            os_len, os);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", CPU %.*s, OS %.*s",
@@ -1040,8 +1040,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       
       preference = tvb_get_ntohs(tvb, cur_offset);
       mx_name_len = get_dns_name(tvb, cur_offset + 2, dns_data_offset, mx_name, sizeof(mx_name));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %u %s", preference, mx_name);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %u %s", preference, mx_name);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", preference %u, mx %s",
                       preference, mx_name);
@@ -1206,8 +1206,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       const guint8 *addr6;
 
       addr6 = tvb_get_ptr(tvb, cur_offset, 16);
-      if (fd != NULL) {
-       col_append_fstr(fd, COL_INFO, " %s",
+      if (cinfo != NULL) {
+       col_append_fstr(cinfo, COL_INFO, " %s",
                        ip6_to_str((struct e_in6_addr *)addr6));
       }
       if (dns_tree != NULL) {
@@ -1252,8 +1252,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
         pname_len = 0;
       }
 
-      if (fd != NULL) {
-        col_append_fstr(fd, COL_INFO, " %d %s %s", 
+      if (cinfo != NULL) {
+        col_append_fstr(cinfo, COL_INFO, " %d %s %s", 
                         pre_len, 
                         ip6_to_str((struct e_in6_addr *)&suffix), 
                         pname);
@@ -1287,8 +1287,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       
       dname_len = get_dns_name(tvb, cur_offset, dns_data_offset, 
                               dname, sizeof(dname));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", dname);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", dname);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", dname %s", dname);
        proto_tree_add_text(rr_tree, tvb, cur_offset, 
@@ -1349,8 +1349,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
 
       next_domain_name_len = get_dns_name(tvb, cur_offset, dns_data_offset,
                        next_domain_name, sizeof(next_domain_name));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", next_domain_name);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", next_domain_name);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", next domain name %s",
                     next_domain_name);
@@ -1387,8 +1387,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       
       preference = tvb_get_ntohs(tvb, cur_offset);
       kx_name_len = get_dns_name(tvb, cur_offset + 2, dns_data_offset, kx_name, sizeof(kx_name));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %u %s", preference, kx_name);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %u %s", preference, kx_name);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", preference %u, kx %s",
                       preference, kx_name);
@@ -1657,8 +1657,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       rr_len -= 4;
 
       dname_len = get_dns_name(tvb, cur_offset, dns_data_offset, dname, sizeof(dname));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %s", dname);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %s", dname);
       if (dns_tree != NULL) {
        proto_item_append_text(trr, ", name result domain %s", dname);
        proto_tree_add_text(rr_tree, tvb, cur_offset, dname_len, "Name result domain: %s",
@@ -1680,8 +1680,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
       port = tvb_get_ntohs(tvb, cur_offset+4);
 
       target_len = get_dns_name(tvb, cur_offset + 6, dns_data_offset, target, sizeof(target));
-      if (fd != NULL)
-       col_append_fstr(fd, COL_INFO, " %u %u %u %s", priority, weight, port, target);
+      if (cinfo != NULL)
+       col_append_fstr(cinfo, COL_INFO, " %u %u %u %s", priority, weight, port, target);
       if (dns_tree != NULL) {
        proto_item_append_text(trr,
                       ", priority %u, weight %u, port %u, target %s",
@@ -1710,7 +1710,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
 
 static int
 dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
-    int count, frame_data *fd, proto_tree *dns_tree, int isupdate)
+    int count, column_info *cinfo, proto_tree *dns_tree, int isupdate)
 {
   int start_off, add_off;
   proto_tree *qatree = NULL;
@@ -1723,7 +1723,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
     qatree = proto_item_add_subtree(ti, ett_dns_qry);
   }
   while (count-- > 0) {
-    add_off = dissect_dns_query(tvb, cur_off, dns_data_offset, fd, qatree);
+    add_off = dissect_dns_query(tvb, cur_off, dns_data_offset, cinfo, qatree);
     if (add_off <= 0) {
       /* We ran past the end of the captured data in the packet. */
       break;
@@ -1738,7 +1738,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
 
 static int
 dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
-    int count, frame_data *fd, proto_tree *dns_tree, char *name)
+    int count, column_info *cinfo, proto_tree *dns_tree, char *name)
 {
   int start_off, add_off;
   proto_tree *qatree = NULL;
@@ -1750,7 +1750,7 @@ dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
     qatree = proto_item_add_subtree(ti, ett_dns_ans);
   }
   while (count-- > 0) {
-    add_off = dissect_dns_answer(tvb, cur_off, dns_data_offset, fd, qatree);
+    add_off = dissect_dns_answer(tvb, cur_off, dns_data_offset, cinfo, qatree);
     if (add_off <= 0) {
       /* We ran past the end of the captured data in the packet. */
       break;
@@ -1768,7 +1768,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
        proto_tree *tree, gboolean is_tcp)
 {
   int dns_data_offset;
-  frame_data *fd;
+  column_info *cinfo;
   proto_tree *dns_tree = NULL, *field_tree;
   proto_item *ti, *tf;
   guint16    id, flags, quest, ans, auth, add;
@@ -1785,16 +1785,16 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
 
   dns_data_offset = offset;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "DNS");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "DNS");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   /* To do: check for errs, etc. */
   id    = tvb_get_ntohs(tvb, offset + DNS_ID);
   flags = tvb_get_ntohs(tvb, offset + DNS_FLAGS);
 
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown operation (%x)"));
     if (flags & F_RESPONSE) {
       strcat(buf, " response");
@@ -1804,14 +1804,14 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
             "Unknown error (%x)"));
       }
     }
-    col_add_str(pinfo->fd, COL_INFO, buf);
-    fd = pinfo->fd;
+    col_add_str(pinfo->cinfo, COL_INFO, buf);
+    cinfo = pinfo->cinfo;
   } else {
-    /* Set "fd" to NULL; we pass a NULL "fd" to the query and answer
+    /* Set "cinfo" to NULL; we pass a NULL "cinfo" to the query and answer
        dissectors, as a way of saying that they shouldn't add stuff
-       to the COL_INFO column (a call to "check_col(fd, COL_INFO)"
+       to the COL_INFO column (a call to "check_col(cinfo, COL_INFO)"
        is more expensive than a check that a pointer isn't NULL). */
-    fd = NULL;
+    cinfo = NULL;
   }
   if ((flags & F_OPCODE) == OPCODE_UPDATE)
     isupdate = 1;
@@ -1925,7 +1925,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
     /* If this is a response, don't add information about the queries
        to the summary, just add information about the answers. */
     cur_off += dissect_query_records(tvb, cur_off, dns_data_offset, quest,
-                                    (!(flags & F_RESPONSE) ? fd : NULL),
+                                    (!(flags & F_RESPONSE) ? cinfo : NULL),
                                     dns_tree, isupdate);
   }
     
@@ -1933,7 +1933,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
     /* If this is a request, don't add information about the answers
        to the summary, just add information about the queries. */
     cur_off += dissect_answer_records(tvb, cur_off, dns_data_offset, ans,
-                                     ((flags & F_RESPONSE) ? fd : NULL),
+                                     ((flags & F_RESPONSE) ? cinfo : NULL),
                                      dns_tree,
                                      (isupdate ?  "Prerequisites" : "Answers"));
   }
index 376b2b0aa1340331a4f49681b46593cb72a04436..38c99bc04564445400b76e4be96fb409dd5c917a 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for dsi packet dissection
  * Copyright 2001, Randy McEoin <rmceoin@pe.com>
  *
- * $Id: packet-dsi.c,v 1.6 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-dsi.c,v 1.7 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -313,10 +313,10 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint32 dsi_length;
        guint32 dsi_reserved;
  
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "DSI");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSI");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        conversation = find_conversation(&pinfo->src, &pinfo->dst, PT_TCP,
                pinfo->srcport, pinfo->destport, 0);
@@ -355,7 +355,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                dsi_reserved = hash_info->reserved;
        }
 
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                if ((func_str = match_strval(dsi_command, func_vals)))
                {
                        flag_str = match_strval(dsi_flags, flag_vals);
@@ -369,7 +369,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        {
                                cont_str[0]=0;
                        }
-                       col_add_fstr(pinfo->fd, COL_INFO, "%s %s (%d) %s",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s (%d) %s",
                                flag_str,func_str,dsi_requestid,
                                cont_str);
                }
index 6e0028a32b91bc1aa16f968a06110a05ce17826c..663f646d48223f3233a0d5475d25015319864967 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-dvmrp.c   2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
  * Routines for IGMP/DVMRP packet disassembly
  *
- * $Id: packet-dvmrp.c,v 1.3 2001/10/30 21:31:15 guy Exp $
+ * $Id: packet-dvmrp.c,v 1.4 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -338,8 +338,8 @@ dissect_dvmrp_v3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
        code = tvb_get_guint8(tvb, offset);
        proto_tree_add_uint(parent_tree, hf_code_v3, tvb, offset, 1, code);
        offset += 1;
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_add_fstr(pinfo->fd, COL_INFO,
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_add_fstr(pinfo->cinfo, COL_INFO,
                        "V%d %s",3 ,val_to_str(code, code_v3, 
                                "Unknown Type:0x%02x"));
        }
@@ -468,8 +468,8 @@ dissect_dvmrp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
        code = tvb_get_guint8(tvb, offset);
        proto_tree_add_uint(parent_tree, hf_code_v1, tvb, offset, 1, code);
        offset += 1;
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_add_fstr(pinfo->fd, COL_INFO,
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_add_fstr(pinfo->cinfo, COL_INFO,
                        "V%d %s",1 ,val_to_str(code, code_v1, 
                                "Unknown Type:0x%02x"));
        }
@@ -641,11 +641,11 @@ dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int of
        tree = proto_item_add_subtree(item, ett_dvmrp);
 
 
-       if (check_col(pinfo->fd, COL_PROTOCOL)) {
-               col_set_str(pinfo->fd, COL_PROTOCOL, "DVMRP");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "DVMRP");
        }
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_clear(pinfo->cinfo, COL_INFO);
        }
 
 
index 27759713d2ab5b5e356bf2dacfc214354b58da1d..de92869db42c0e3514638b22c9defbdf6e9d6bd4 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-eap.c
  * Routines for EAP Extensible Authentication Protocol header disassembly
  *
- * $Id: packet-eap.c,v 1.3 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-eap.c,v 1.4 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -86,10 +86,10 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *ti;
   proto_tree *volatile eap_tree;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "EAP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "EAP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   tvb_memcpy(tvb, (guint8 *)&eaph, 0, sizeof(eaph));
   eaph.eap_len = ntohs(eaph.eap_len);
index 38c3b4c49d38753b903debaafef32d4718f17838..f5c08b6d24b93a23217d4e203bbfa5639d13f74c 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-eapol.c
  * Routines for EAPOL 802.1X authentication header disassembly
  *
- * $Id: packet-eapol.c,v 1.3 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-eapol.c,v 1.4 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -77,10 +77,10 @@ dissect_eapol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *volatile eapol_tree;
   tvbuff_t   *next_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "EAPOL");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "EAPOL");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   tvb_memcpy(tvb, (guint8 *)&eapolh, 0, sizeof(eapolh));
   eapolh.eapol_len = ntohs(eapolh.eapol_len);
index 7ac54565bd8c55e17cde512f1a2f6a08e3e03ba5..d3be9058cae98c648bd2b6124fd3deb76eb34b09 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for EIGRP dissection
  * Copyright 2000, Paul Ionescu <paul@acorp.ro>
  *
- * $Id: packet-eigrp.c,v 1.18 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-eigrp.c,v 1.19 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -148,17 +148,17 @@ dissect_eigrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   guint16 tlv,size, offset = EIGRP_HEADER_LENGTH;
   guint32 ack;
       
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "EIGRP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "EIGRP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   opcode_tmp=opcode=tvb_get_guint8(tvb,1);
   ack = tvb_get_ntohl(tvb,12);
   if (opcode==EIGRP_HELLO) { if (ack == 0) opcode_tmp=EIGRP_HI; else opcode_tmp=EIGRP_ACK; }
   
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_str(pinfo->fd, COL_INFO,
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_str(pinfo->cinfo, COL_INFO,
        val_to_str(opcode_tmp , eigrp_opcode_vals, "Unknown (0x%04x)"));
 
 
index 6db393e2aca89ef6982cd19c79d37f154dab526f..bafe84c66311cdf1a9b355cdcf773ebe0adfcae7 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for ISO/OSI End System to Intermediate System  
  * Routing Exchange Protocol ISO 9542.
  *
- * $Id: packet-esis.c,v 1.18 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-esis.c,v 1.19 2001/12/10 00:25:27 guy Exp $
  * Ralf Schneider <Ralf.Schneider@t-online.de>
  *
  * Ethereal - Network traffic analyzer
@@ -291,10 +291,10 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
    u_int       tmp_uint     = 0;
    char       *cksum_status;
 
-   if (check_col(pinfo->fd, COL_PROTOCOL))
-     col_set_str(pinfo->fd, COL_PROTOCOL, "ESIS");
-   if (check_col(pinfo->fd, COL_INFO))
-     col_clear(pinfo->fd, COL_INFO);
+   if (check_col(pinfo->cinfo, COL_PROTOCOL))
+     col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESIS");
+   if (check_col(pinfo->cinfo, COL_INFO))
+     col_clear(pinfo->cinfo, COL_INFO);
 
    tvb_memcpy(tvb, (guint8 *)&ehdr, 0, sizeof ehdr);
    
@@ -368,8 +368,8 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     * here.  First, dump the name into info column, and THEN
     * dispatch the sub-type.
     */
-   if (check_col(pinfo->fd, COL_INFO)) {
-     col_add_str(pinfo->fd, COL_INFO, 
+   if (check_col(pinfo->cinfo, COL_INFO)) {
+     col_add_str(pinfo->cinfo, COL_INFO, 
                  val_to_str( ehdr.esis_type&OSI_PDU_TYPE_MASK, esis_vals,
                              "Unknown (0x%x)" ) );
    } 
index 43e181373a5eb9c45afd9e89de7b5850887326ed..19ad37440b30ac9240d3bec76b42deb26f53889f 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-eth.c
  * Routines for ethernet packet disassembly
  *
- * $Id: packet-eth.c,v 1.70 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-eth.c,v 1.71 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -146,8 +146,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   volatile gboolean    is_802_2;
   proto_tree           *volatile fh_tree = NULL;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "Ethernet");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "Ethernet");
 
   src = tvb_get_ptr(tvb, 6, 6);
   dst = tvb_get_ptr(tvb, 0, 6);
@@ -191,8 +191,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     }
     ENDTRY;
 
-    if (check_col(pinfo->fd, COL_INFO)) {
-      col_add_fstr(pinfo->fd, COL_INFO, "IEEE 802.3 Ethernet %s",
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+      col_add_fstr(pinfo->cinfo, COL_INFO, "IEEE 802.3 Ethernet %s",
                (is_802_2 ? "" : "Raw "));
     }
     if (tree) {
@@ -212,8 +212,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     dissect_802_3(etype, is_802_2, tvb, ETH_HEADER_SIZE, pinfo, tree, fh_tree,
                  hf_eth_len, hf_eth_trailer);
   } else {
-    if (check_col(pinfo->fd, COL_INFO))
-      col_set_str(pinfo->fd, COL_INFO, "Ethernet II");
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_set_str(pinfo->cinfo, COL_INFO, "Ethernet II");
     if (tree) {
       ti = proto_tree_add_protocol_format(tree, proto_eth, tvb, 0, ETH_HEADER_SIZE,
                "Ethernet II");
index 644094f4eb271d85925a88efa60f6e5c361a9137..5fefb16ffdf3d8e10e9e05b7a658d7fc40363ae3 100644 (file)
@@ -1,7 +1,7 @@
 /* ethertype.c
  * Routines for calling the right protocol for the ethertype.
  *
- * $Id: packet-ethertype.c,v 1.23 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-ethertype.c,v 1.24 2001/12/10 00:25:27 guy Exp $
  *
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
@@ -185,22 +185,22 @@ ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_etype,
                switch (etype) {
 
                case ETHERTYPE_LOOP:
-                       if (check_col(pinfo->fd, COL_PROTOCOL)) {
-                               col_add_fstr(pinfo->fd, COL_PROTOCOL, "LOOP");
+                       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+                               col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "LOOP");
                        }
                        break;
 
                default:
-                       if (check_col(pinfo->fd, COL_PROTOCOL)) {
-                               col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x",
+                       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+                               col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x",
                                    etype);
                        }
                        break;
                }
-               if (check_col(pinfo->fd, COL_INFO)) {
+               if (check_col(pinfo->cinfo, COL_INFO)) {
                        description = match_strval(etype, etype_vals);
                        if (description) {
-                               col_add_fstr(pinfo->fd, COL_INFO, "%s",
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
                                    description);
                        }
                }
index d3bedb6b552e7e81a4a0ebdbc5bae4464cd06fb1..1c5a970972f43c9455fbc980332e63b360debe99 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Laurent Deniel <deniel@worldnet.fr>
  *
- * $Id: packet-fddi.c,v 1.54 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-fddi.c,v 1.55 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -267,14 +267,14 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
   u_char     src_swapped[6], dst_swapped[6];
   tvbuff_t   *next_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "FDDI");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "FDDI");
 
   fc = (int) tvb_get_guint8(tvb, FDDI_P_FC);
   fc_str = fddifc_to_str(fc);
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_str(pinfo->fd, COL_INFO, fc_str);
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_str(pinfo->cinfo, COL_INFO, fc_str);
 
   if (tree) {
     ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE,
index e830c2f40eedaab50afca7429f1127f1b470d75c..93d5e487641217d398bc811eea24b23825d34439 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2001, Paul Ionescu        <paul@acorp.ro>
  *
- * $Id: packet-fr.c,v 1.26 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-fr.c,v 1.27 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -147,20 +147,20 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   char    buf[32];
   guint8  fr_ctrl;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL)) 
-      col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR");
 
   if (pinfo->pseudo_header->x25.flags & FROM_DCE) {
-        if(check_col(pinfo->fd, COL_RES_DL_DST))
-            col_set_str(pinfo->fd, COL_RES_DL_DST, "DTE");
-        if(check_col(pinfo->fd, COL_RES_DL_SRC))
-            col_set_str(pinfo->fd, COL_RES_DL_SRC, "DCE");
+        if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+            col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
+        if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+            col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
     }
     else {
-        if(check_col(pinfo->fd, COL_RES_DL_DST))
-            col_set_str(pinfo->fd, COL_RES_DL_DST, "DCE");
-        if(check_col(pinfo->fd, COL_RES_DL_SRC))
-            col_set_str(pinfo->fd, COL_RES_DL_SRC, "DTE");
+        if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+            col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
+        if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+            col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
     }
 
 /*XXX We should check the EA bits and use that to generate the address. */
@@ -169,8 +169,8 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   fr_ctrl = tvb_get_guint8( tvb, 2);
   address = EXTRACT_DLCI(fr_header);
 
-  if (check_col(pinfo->fd, COL_INFO)) 
-      col_add_fstr(pinfo->fd, COL_INFO, "DLCI %u", address);
+  if (check_col(pinfo->cinfo, COL_INFO)) 
+      col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", address);
 
   if (tree) {
       ti = proto_tree_add_protocol_format(tree, proto_fr, tvb, 0, 3, "Frame Relay");
@@ -237,10 +237,10 @@ static void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
   proto_item *ti = NULL;
   proto_tree *fr_tree = NULL;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL)) 
-      col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
-  if (check_col(pinfo->fd, COL_INFO)) 
-      col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR");
+  if (check_col(pinfo->cinfo, COL_INFO)) 
+      col_clear(pinfo->cinfo, COL_INFO);
 
   if (tree) {
       ti = proto_tree_add_protocol_format(tree, proto_fr, tvb, 0, 4, "Frame Relay");
index f3fee8f4b49989e9d7b03b8d42e9453f1c34ce4e..8265a6b3cf2df32b24650adb59591ba0daa53ae9 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
  *
- * $Id: packet-frame.c,v 1.14 2001/12/08 21:03:41 guy Exp $
+ * $Id: packet-frame.c,v 1.15 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -136,22 +136,23 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                if (!dissector_try_port(wtap_encap_dissector_table, pinfo->fd->lnk_t,
                                        tvb, pinfo, tree)) {
 
-                       if (check_col(pinfo->fd, COL_PROTOCOL))
-                               col_set_str(pinfo->fd, COL_PROTOCOL, "UNKNOWN");
-                       if (check_col(pinfo->fd, COL_INFO))
-                               col_add_fstr(pinfo->fd, COL_INFO, "WTAP_ENCAP = %u", pinfo->fd->lnk_t);
+                       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
+                       if (check_col(pinfo->cinfo, COL_INFO))
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %u",
+                                   pinfo->fd->lnk_t);
                        call_dissector(data_handle,tvb, pinfo, tree);
                }
        }
        CATCH(BoundsError) {
-               if (check_col(pinfo->fd, COL_INFO))
-                       col_append_str(pinfo->fd, COL_INFO, "[Short Frame]");
+               if (check_col(pinfo->cinfo, COL_INFO))
+                       col_append_str(pinfo->cinfo, COL_INFO, "[Short Frame]");
                proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0,
                                "[Short Frame: %s]", pinfo->current_proto );
        }
        CATCH(ReportedBoundsError) {
-               if (check_col(pinfo->fd, COL_INFO))
-                       col_append_str(pinfo->fd, COL_INFO, "[Malformed Frame]");
+               if (check_col(pinfo->cinfo, COL_INFO))
+                       col_append_str(pinfo->cinfo, COL_INFO, "[Malformed Frame]");
                proto_tree_add_protocol_format(tree, proto_malformed, tvb, 0, 0,
                                "[Malformed Frame: %s]", pinfo->current_proto );
        }
index f41d8afac130fa5b1b0671c12c084c07bc59a651..e5e615fa9a3e6d10fcea2b683a088217e033efd7 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  * Copyright 2001, Juan Toledo <toledo@users.sourceforge.net> (Passive FTP)
  * 
- * $Id: packet-ftp.c,v 1.38 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-ftp.c,v 1.39 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -225,8 +225,8 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        else
                is_request = FALSE;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "FTP");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTP");
 
        /*
         * Find the end of the first line.
@@ -238,12 +238,12 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        linelen = tvb_find_line_end(tvb, offset, -1, &next_offset);
        line = tvb_get_ptr(tvb, offset, linelen);
 
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                /*
                 * Put the first line from the buffer into the summary
                 * (but leave out the line terminator).
                 */
-               col_add_fstr(pinfo->fd, COL_INFO, "%s: %s",
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s",
                    is_request ? "Request" : "Response",
                    format_text(line, linelen));
        }
@@ -366,11 +366,11 @@ dissect_ftpdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         proto_tree      *ti, *ftp_data_tree;
         int            data_length;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "FTP-DATA");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTP-DATA");
 
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_add_fstr(pinfo->fd, COL_INFO, "FTP Data: %u bytes",
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_add_fstr(pinfo->cinfo, COL_INFO, "FTP Data: %u bytes",
                    tvb_length(tvb));
        }
 
index e4d76ef8ee78c2bd0ab6ef322ed4117563fac9f9..3d0aad6fd793f2c08a678f61103227d5b830e07b 100644 (file)
@@ -9,7 +9,7 @@
  * Frank Singleton <frank.singleton@ericsson.com>
  * Trevor Shepherd <eustrsd@am1.ericsson.se>
  *
- * $Id: packet-giop.c,v 1.49 2001/11/26 04:52:49 hagbard Exp $
+ * $Id: packet-giop.c,v 1.50 2001/12/10 00:25:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -3080,8 +3080,8 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
 
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
   }
 
   if (tree) {
@@ -3091,8 +3091,8 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
 
   reply_status = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
 
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_append_fstr(pinfo->fd, COL_INFO, ": %s",
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
                     val_to_str(reply_status, reply_status_types, "Unknown (%u)"));
 
   }
@@ -3156,8 +3156,8 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
   
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
   
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
   }
 
   if (tree) {
@@ -3167,8 +3167,8 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
 
   reply_status = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
   
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_append_fstr(pinfo->fd, COL_INFO, ": %s",
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
                     val_to_str(reply_status, reply_status_types, "Unknown (%u)"));
 
   }
@@ -3235,8 +3235,8 @@ static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
   
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
   }
 
   if (tree) {
@@ -3308,9 +3308,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
 
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+      col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
     }
   if (tree)
     {
@@ -3320,9 +3320,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
 
   response_expected = tvb_get_guint8( tvb, offset );
   offset += 1;
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " (%s)",
+      col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
                response_expected ? "two-way" : "one-way");
     }
   if (tree)
@@ -3386,9 +3386,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
 
   if( len > 0)
   {
-       if (check_col(pinfo->fd, COL_INFO))
+       if (check_col(pinfo->cinfo, COL_INFO))
        {
-         col_append_fstr(pinfo->fd, COL_INFO, ": %s", operation);
+         col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", operation);
        }
        if(tree)
        {
@@ -3518,9 +3518,9 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
     }
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+      col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
     }
   if (request_tree)
     {
@@ -3558,9 +3558,9 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
 
   if( len > 0)
   {
-       if (check_col(pinfo->fd, COL_INFO))
+       if (check_col(pinfo->cinfo, COL_INFO))
        {
-         col_append_fstr(pinfo->fd, COL_INFO, ": %s", operation);
+         col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", operation);
        }
        if(request_tree)
        {
@@ -3652,9 +3652,9 @@ dissect_giop_locate_request( tvbuff_t * tvb, packet_info * pinfo,
     }
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+      col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
     }
   if (locate_request_tree)
     {
@@ -3721,9 +3721,9 @@ dissect_giop_locate_reply( tvbuff_t * tvb, packet_info * pinfo,
     }
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+      col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
     }
   if (locate_reply_tree)
     {
@@ -3795,9 +3795,9 @@ dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
     }
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
     {
-      col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
+      col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
     }
   if (fragment_tree )
     {
@@ -3864,9 +3864,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
       return FALSE;
     }
 
-  if (check_col (pinfo->fd, COL_PROTOCOL))
+  if (check_col (pinfo->cinfo, COL_PROTOCOL))
     {
-      col_set_str (pinfo->fd, COL_PROTOCOL, "GIOP");
+      col_set_str (pinfo->cinfo, COL_PROTOCOL, "GIOP");
     }
 
   if (header.GIOP_version.major != GIOP_MAJOR ||
@@ -3880,9 +3880,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
          the "Info" column, *without* setting the "Protocol" column,
          and *without* adding anything to the protocol tree. */
 
-      if (check_col (pinfo->fd, COL_INFO))
+      if (check_col (pinfo->cinfo, COL_INFO))
        {
-         col_add_fstr (pinfo->fd, COL_INFO, "Version %u.%u",
+         col_add_fstr (pinfo->cinfo, COL_INFO, "Version %u.%u",
                        header.GIOP_version.major, header.GIOP_version.minor);
        }
       if (tree)
@@ -3900,9 +3900,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
       return TRUE;
     }
 
-  if (check_col (pinfo->fd, COL_INFO)) 
+  if (check_col (pinfo->cinfo, COL_INFO)) 
   { 
-      col_add_fstr (pinfo->fd, COL_INFO, "GIOP %u.%u %s",
+      col_add_fstr (pinfo->cinfo, COL_INFO, "GIOP %u.%u %s",
                     header.GIOP_version.major, header.GIOP_version.minor,
                     val_to_str(header.message_type, giop_message_types,
                               "Unknown message type (0x%02x)"));
@@ -3957,9 +3957,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
     }                          /* tree */
 
 #if 0
-  if (check_col (pinfo->fd, COL_INFO)) 
+  if (check_col (pinfo->cinfo, COL_INFO)) 
   { 
-      col_add_fstr (pinfo->fd, COL_INFO, "GIOP %u.%u %s",
+      col_add_fstr (pinfo->cinfo, COL_INFO, "GIOP %u.%u %s",
                     header.GIOP_version.major, header.GIOP_version.minor,
                     match_strval(header.message_type, giop_message_types));
   }
index d4794fc2b70e371782bbbbc9d62b8aa0ed4a97fe..66d5e351ff9af84ec3ddb15467e780e003cde18d 100644 (file)
@@ -130,11 +130,11 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint8               attribute_type;
     int           msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
     
-    if (check_col(pinfo->fd, COL_PROTOCOL)) 
-       col_set_str(pinfo->fd, COL_PROTOCOL, "GMRP");
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "GMRP");
     
-    if (check_col(pinfo->fd, COL_INFO)) 
-       col_set_str(pinfo->fd, COL_INFO, "GMRP");
+    if (check_col(pinfo->cinfo, COL_INFO)) 
+       col_set_str(pinfo->cinfo, COL_INFO, "GMRP");
 
     if (tree)
     {
index 05f52e65164faf693379aa5c9585e46f86cecff5..d0b64bdad420bd3ac574a2b1be70d97de0d3d0de 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for gnutella dissection
  * Copyright 2001, B. Johannessen <bob@havoq.com>
  *
- * $Id: packet-gnutella.c,v 1.9 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-gnutella.c,v 1.10 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -380,23 +380,23 @@ static void dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
        unsigned int size;
        char *payload_descriptor_text;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL)) 
-               col_set_str(pinfo->fd, COL_PROTOCOL, "Gnutella");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gnutella");
     
-       if (check_col(pinfo->fd, COL_INFO)) 
-               col_set_str(pinfo->fd, COL_INFO, "Gnutella");
+       if (check_col(pinfo->cinfo, COL_INFO)) 
+               col_set_str(pinfo->cinfo, COL_INFO, "Gnutella");
 
        snap_len = tvb_length(tvb);
 
        if(snap_len < GNUTELLA_HEADER_LENGTH) {
-               if (check_col(pinfo->fd, COL_INFO)) 
-                       col_append_fstr(pinfo->fd, COL_INFO,
+               if (check_col(pinfo->cinfo, COL_INFO)) 
+                       col_append_fstr(pinfo->cinfo, COL_INFO,
                                        ", %i bytes [INCOMPLETE]", snap_len);
                return;
        }
        else {
-               if (check_col(pinfo->fd, COL_INFO)) 
-                       col_append_fstr(pinfo->fd, COL_INFO,
+               if (check_col(pinfo->cinfo, COL_INFO)) 
+                       col_append_fstr(pinfo->cinfo, COL_INFO,
                                        ", %i bytes", snap_len);
        }
 
index 230cd4f9130ae61b29a94db12a37962f13a13cf9..df13dd5cb7531cffdd1a757d51aeac1cbc8515c4 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for the Generic Routing Encapsulation (GRE) protocol
  * Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
  *
- * $Id: packet-gre.c,v 1.48 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-gre.c,v 1.49 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -103,11 +103,11 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   flags_and_ver = tvb_get_ntohs(tvb, offset);
   type = tvb_get_ntohs(tvb, offset + sizeof(flags_and_ver));
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "GRE");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "GRE");
 
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_add_fstr(pinfo->fd, COL_INFO, "Encapsulated %s",
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_add_fstr(pinfo->cinfo, COL_INFO, "Encapsulated %s",
                 val_to_str(type, typevals, "0x%04X (unknown)"));
   }
 
index f914a93224b16d4837c6f4503fb404bc5c9bd26f..397d134bd304842aaacec905651baa1332616b47 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
  *                 Nicolas Balkota <balkota@mac.com>
  *
- * $Id: packet-gtp.c,v 1.18 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-gtp.c,v 1.19 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -1591,7 +1591,7 @@ struct _stcdr {                                           /* STCDR 79B */
        char            *yesno[] = { "False", "True" };
        
 static void
-col_append_str_gtp(frame_data *fd, gint el, gchar *proto_name) {
+col_append_str_gtp(column_info *cinfo, gint el, gchar *proto_name) {
        
        int     i;
        int     max_len;
@@ -1599,22 +1599,22 @@ col_append_str_gtp(frame_data *fd, gint el, gchar *proto_name) {
 
        max_len = COL_MAX_LEN;
 
-       for (i = 0; i < fd->cinfo->num_cols; i++) {
-               if (fd->cinfo->fmt_matx[i][el]) {
-                       if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
+       for (i = 0; i < cinfo->num_cols; i++) {
+               if (cinfo->fmt_matx[i][el]) {
+                       if (cinfo->col_data[i] != cinfo->col_buf[i]) {
                                
-                               strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
-                               fd->cinfo->col_buf[i][max_len - 1] = '\0';
+                               strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
+                               cinfo->col_buf[i][max_len - 1] = '\0';
                        }
        
                        _tmp[0] = '\0';
                        strcat(_tmp, proto_name);
                        strcat(_tmp, " <");
-                       strcat(_tmp, fd->cinfo->col_buf[i]);
+                       strcat(_tmp, cinfo->col_buf[i]);
                        strcat(_tmp, ">");
-                       fd->cinfo->col_buf[i][0] = '\0';
-                       strcat(fd->cinfo->col_buf[i], _tmp);
-                       fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
+                       cinfo->col_buf[i][0] = '\0';
+                       strcat(cinfo->col_buf[i], _tmp);
+                       cinfo->col_data[i] = cinfo->col_buf[i];
                }
        }
 }
@@ -3683,13 +3683,14 @@ decode_gtp_proto_conf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
                        next_tvb = tvb_new_subset(tvb, offset + 5, proto_len + 2, proto_len + 2); 
                        call_dissector(ppp_handle, next_tvb, pinfo, ext_tree_proto); 
                                
-                       if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP"); 
+                       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP"); 
                                
-                       if (check_col(pinfo->fd, COL_INFO)) { 
+                       if (check_col(pinfo->cinfo, COL_INFO)) { 
                                        
                                msg = tvb_get_guint8(tvb, 1); 
                                                
-                               col_set_str(pinfo->fd, COL_INFO, val_to_str(msg, message_type, "Unknown")); 
+                               col_set_str(pinfo->cinfo, COL_INFO, val_to_str(msg, message_type, "Unknown")); 
                        } 
                } 
        }
@@ -4689,8 +4690,10 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        gchar           *tid_str;
        int             offset, length, i, mandatory, checked_field;
        
-       if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP");
-       if (check_col(pinfo->fd, COL_INFO)) col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        tvb_memcpy(tvb, (guint8 *)&gtpv0_hdr, 0, 12); 
        tid_val = tvb_get_ptr(tvb, 12, 8);
@@ -4698,22 +4701,23 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        gtp_version = (gtpv0_hdr.flags >> 5) & 0x07;
 
        if (!((gtpv0_hdr.flags >> 4) & 1)) {
-               if (check_col(pinfo->fd, COL_PROTOCOL))
-                       col_set_str(pinfo->fd, COL_PROTOCOL, "GTP-CDR");
+               if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP-CDR");
        } else {
                switch ((gtpv0_hdr.flags >> 5) & 0x07) {
-               case 0: if (check_col(pinfo->fd, COL_PROTOCOL))
-                               col_set_str(pinfo->fd, COL_PROTOCOL, "GTP");
+               case 0: if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
                        break;
-               case 1: if (check_col(pinfo->fd, COL_PROTOCOL))
-                               col_set_str(pinfo->fd, COL_PROTOCOL, "GTPv1");
-               default: if (check_col(pinfo->fd, COL_PROTOCOL))
-                               col_set_str(pinfo->fd, COL_PROTOCOL, "GTPv?");
+               case 1: if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTPv1");
+               default: if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTPv?");
                        break;
                }
        }
 
-       if (check_col(pinfo->fd, COL_INFO)) col_add_str(pinfo->fd, COL_INFO, val_to_str(gtpv0_hdr.message, message_type, "Unknown"));
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtpv0_hdr.message, message_type, "Unknown"));
        
        if (tree) {
                        
@@ -4777,7 +4781,8 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        if ((gtpv0_hdr.message == GTP_MSG_TPDU) && gtp_tpdu) {
                next_tvb = tvb_new_subset(tvb, 20, -1, -1);
                call_dissector(ip_handle, next_tvb, pinfo, tree);
-               if (check_col(pinfo->fd, COL_PROTOCOL)) col_append_str_gtp(pinfo->fd, COL_PROTOCOL, "GTP");
+               if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                       col_append_str_gtp(pinfo->cinfo, COL_PROTOCOL, "GTP");
        }
        
 }
@@ -4794,13 +4799,16 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
        tvbuff_t        *next_tvb;
        int             offset, length, mandatory, checked_field;
        
-       if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP-C");
-       if (check_col(pinfo->fd, COL_INFO)) col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP-C");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        tvb_memcpy(tvb, (guint8 *)&gtpv1_hdr, 0, 8);
        gtp_version = (gtpv1_hdr.flags >> 5) & 0x07;
 
-       if (check_col(pinfo->fd, COL_INFO)) col_add_str(pinfo->fd, COL_INFO, val_to_str(gtpv1_hdr.message, message_type, "Unknown"));
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtpv1_hdr.message, message_type, "Unknown"));
 
        if (tree) {
                        
@@ -4881,7 +4889,8 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
        }
 
        if (gtpv1_hdr.message == GTP_MSG_ERR_IND)
-               if (check_col(pinfo->fd, COL_PROTOCOL)) col_add_str(pinfo->fd, COL_PROTOCOL, "GTP-U");
+               if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                       col_add_str(pinfo->cinfo, COL_PROTOCOL, "GTP-U");
 
 
        if ((gtpv1_hdr.message == GTP_MSG_TPDU) && gtp_tpdu) {
@@ -4901,7 +4910,8 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
                
                next_tvb = tvb_new_subset(tvb, GTPv1_HDR_LENGTH - hdr_offset, -1, -1);
                call_dissector(ip_handle, next_tvb, pinfo, tree);
-               if (check_col(pinfo->fd, COL_PROTOCOL)) col_append_str_gtp(pinfo->fd, COL_PROTOCOL, "GTP-U");
+               if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                       col_append_str_gtp(pinfo->cinfo, COL_PROTOCOL, "GTP-U");
        }
 }
 
index 302200fdb431021f87c75d1d4e44b0cbe6572467..4204c0ec5112afa419e91af3491404872dbb1614 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for GVRP (GARP VLAN Registration Protocol) dissection
  * Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
  *
- * $Id: packet-gvrp.c,v 1.7 2001/11/26 04:52:49 hagbard Exp $
+ * $Id: packet-gvrp.c,v 1.8 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -116,11 +116,11 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint8        octet;
     int           msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
 
-    if (check_col(pinfo->fd, COL_PROTOCOL)) 
-       col_set_str(pinfo->fd, COL_PROTOCOL, "GVRP");
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVRP");
     
-    if (check_col(pinfo->fd, COL_INFO)) 
-       col_set_str(pinfo->fd, COL_INFO, "GVRP");
+    if (check_col(pinfo->cinfo, COL_INFO)) 
+       col_set_str(pinfo->cinfo, COL_INFO, "GVRP");
 
     if (tree)
     {
index 18835afbbbe8dcb658d2bbf3b3c6af84c800e30c..7e009595c6342756f13356972ec9dde8364ef142 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for Sinec H1 packet disassembly
  * Gerrit Gehnen <G.Gehnen@atrie.de>
  *
- * $Id: packet-h1.c,v 1.21 2001/11/25 22:51:13 hagbard Exp $
+ * $Id: packet-h1.c,v 1.22 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -126,10 +126,10 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       return FALSE;
     }
 
-  if (check_col (pinfo->fd, COL_PROTOCOL))
-    col_set_str (pinfo->fd, COL_PROTOCOL, "H1");
-  if (check_col (pinfo->fd, COL_INFO))
-    col_add_str (pinfo->fd, COL_INFO, "S5: ");
+  if (check_col (pinfo->cinfo, COL_PROTOCOL))
+    col_set_str (pinfo->cinfo, COL_PROTOCOL, "H1");
+  if (check_col (pinfo->cinfo, COL_INFO))
+    col_add_str (pinfo->cinfo, COL_INFO, "S5: ");
   if (tree)
     {
       ti = proto_tree_add_item (tree, proto_h1, tvb, offset, 16, FALSE);
@@ -159,9 +159,9 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                     offset + position + 2, 1,
                                     tvb_get_guint8(tvb,offset + position + 2));
              }
-           if (check_col (pinfo->fd, COL_INFO))
+           if (check_col (pinfo->cinfo, COL_INFO))
              {
-               col_append_str (pinfo->fd, COL_INFO,
+               col_append_str (pinfo->cinfo, COL_INFO,
                                val_to_str (tvb_get_guint8(tvb,offset + position + 2),
                                            opcode_vals,"Unknown Opcode (0x%2.2x)"));
              }
@@ -190,15 +190,15 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    offset + position + 6, 2,
                                    tvb_get_ntohs(tvb,offset+position+6));
              }
-           if (check_col (pinfo->fd, COL_INFO))
+           if (check_col (pinfo->cinfo, COL_INFO))
              {
-               col_append_fstr (pinfo->fd, COL_INFO, " %s %d",
+               col_append_fstr (pinfo->cinfo, COL_INFO, " %s %d",
                                 val_to_str (tvb_get_guint8(tvb,offset + position + 2),
                                             org_vals,"Unknown Type (0x%2.2x)"),
                                 tvb_get_guint8(tvb,offset + position + 3));
-               col_append_fstr (pinfo->fd, COL_INFO, " DW %d",
+               col_append_fstr (pinfo->cinfo, COL_INFO, " DW %d",
                                 tvb_get_ntohs(tvb,offset+position+4));
-               col_append_fstr (pinfo->fd, COL_INFO, " Count %d",
+               col_append_fstr (pinfo->cinfo, COL_INFO, " Count %d",
                                 tvb_get_ntohs(tvb,offset+position+6));
              }
            break;
@@ -217,9 +217,9 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                     offset + position + 2, 1,
                                     tvb_get_guint8(tvb,offset + position+2));
              }
-           if (check_col (pinfo->fd, COL_INFO))
+           if (check_col (pinfo->cinfo, COL_INFO))
              {
-               col_append_fstr (pinfo->fd, COL_INFO, " %s",
+               col_append_fstr (pinfo->cinfo, COL_INFO, " %s",
                                 val_to_str (tvb_get_guint8(tvb,offset + position + 2),
                                             returncode_vals,"Unknown Returcode (0x%2.2x"));
              }
index 453159b34193a3ed338169ed67bfb876af779f73..87724c566caae0826fa2d0e58e6f3403c3a576e2 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Routines for ITU-T Recommendation H.261 dissection
  *
- * $Id: packet-h261.c,v 1.9 2001/07/16 05:16:57 guy Exp $
+ * $Id: packet-h261.c,v 1.10 2001/12/10 00:25:28 guy Exp $
  * 
  * Copyright 2000, Philips Electronics N.V.
  * Andreas Sikkema <andreas.sikkema@philips.com>
@@ -75,12 +75,12 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
        proto_tree *h261_tree     = NULL;
        unsigned int offset       = 0;
 
-       if ( check_col( pinfo->fd, COL_PROTOCOL ) )   {
-               col_set_str( pinfo->fd, COL_PROTOCOL, "H.261" );
+       if ( check_col( pinfo->cinfo, COL_PROTOCOL ) )   {
+               col_set_str( pinfo->cinfo, COL_PROTOCOL, "H.261" );
        }
        
-       if ( check_col( pinfo->fd, COL_INFO) ) {
-               col_set_str( pinfo->fd, COL_INFO, "H.261 message");
+       if ( check_col( pinfo->cinfo, COL_INFO) ) {
+               col_set_str( pinfo->cinfo, COL_INFO, "H.261 message");
        }
 
        if ( tree ) {
index 3a42d515c06f433ae46351c80ca99f45fb7001b3..80ea29066f30a4e6276a00c4d7a96e7b17430a0b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Heikki Vatiainen <hessu@cs.tut.fi>
  *
- * $Id: packet-hsrp.c,v 1.19 2001/12/03 03:59:34 guy Exp $
+ * $Id: packet-hsrp.c,v 1.20 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -107,15 +107,15 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
         guint8 opcode, state;
 
-        if (check_col(pinfo->fd, COL_PROTOCOL))
-                col_set_str(pinfo->fd, COL_PROTOCOL, "HSRP");
-        if (check_col(pinfo->fd, COL_INFO))
-                col_clear(pinfo->fd, COL_INFO);
+        if (check_col(pinfo->cinfo, COL_PROTOCOL))
+                col_set_str(pinfo->cinfo, COL_PROTOCOL, "HSRP");
+        if (check_col(pinfo->cinfo, COL_INFO))
+                col_clear(pinfo->cinfo, COL_INFO);
         
         opcode = tvb_get_guint8(tvb, 1);
         state = tvb_get_guint8(tvb, 2);
-        if (check_col(pinfo->fd, COL_INFO)) {
-                col_add_fstr(pinfo->fd, COL_INFO, "%s (state %s)",
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_fstr(pinfo->cinfo, COL_INFO, "%s (state %s)",
                              val_to_str(opcode, hsrp_opcode_vals, "Unknown"),
                              val_to_str(state, hsrp_state_vals, "Unknown"));
         }
index 03724fc97bc3b8e682f4316353281f76352c99b2..5c0f7010f20aa23f180b35f234c763921fec8769 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Guy Harris <guy@alum.mit.edu>
  *
- * $Id: packet-http.c,v 1.43 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-http.c,v 1.44 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -111,9 +111,9 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                break;
        }
        
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, proto_tag);
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_tag);
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                /*
                 * Put the first line from the buffer into the summary
                 * if it's an HTTP request or reply (but leave out the
@@ -128,10 +128,10 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                line = tvb_get_ptr(tvb, offset, linelen);
                http_type = HTTP_OTHERS;        /* type not known yet */
                if (is_http_request_or_reply(line, linelen, &http_type))
-                       col_add_str(pinfo->fd, COL_INFO,
+                       col_add_str(pinfo->cinfo, COL_INFO,
                            format_text(line, linelen));
                else
-                       col_set_str(pinfo->fd, COL_INFO, "Continuation");
+                       col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
        }
 
        if (tree) {
index fe3b106d18b4b7ebe8ca412c90373ca2e196b446..54fe489ca951fb57478873f5aa07d929003a2607 100644 (file)
@@ -74,10 +74,10 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        icap_type_t     icap_type;
        int             datalen;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "ICAP");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICAP");
 
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                /*
                 * Put the first line from the buffer into the summary
                 * if it's an ICAP header (but leave out the
@@ -92,10 +92,10 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                line = tvb_get_ptr(tvb, offset, linelen);
                icap_type = ICAP_OTHER; /* type not known yet */
                if (is_icap_message(line, linelen, &icap_type))
-                       col_add_str(pinfo->fd, COL_INFO,
+                       col_add_str(pinfo->cinfo, COL_INFO,
                            format_text(line, linelen));
                else
-                       col_set_str(pinfo->fd, COL_INFO, "Continuation");
+                       col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
        }
 
        if (tree) {
index d7f50d43a6001e9d5242dd8f22bca8d9ea27b157..a7c58b3d8306384c1bd9dcd51ec32dd82dcb4be7 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-icmpv6.c
  * Routines for ICMPv6 packet disassembly
  *
- * $Id: packet-icmpv6.c,v 1.55 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-icmpv6.c,v 1.56 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -128,7 +128,7 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
           Set the columns non-writable, so that the packet list
           shows this as an ICMPv6 packet, not as the type of packet
           for which the ICMPv6 packet was generated. */
-       col_set_writable(pinfo->fd, FALSE);
+       col_set_writable(pinfo->cinfo, FALSE);
 
        /* Also, save the current values of the addresses, and restore
           them when we're finished dissecting the contained packet, so
@@ -980,10 +980,10 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     int offset;
     tvbuff_t *next_tvb;
 
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-       col_set_str(pinfo->fd, COL_PROTOCOL, "ICMPv6");
-    if (check_col(pinfo->fd, COL_INFO))
-       col_clear(pinfo->fd, COL_INFO);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
+    if (check_col(pinfo->cinfo, COL_INFO))
+       col_clear(pinfo->cinfo, COL_INFO);
 
     offset = 0;
     tvb_memcpy(tvb, (guint8 *)&icmp6_hdr, offset, sizeof icmp6_hdr);
@@ -1139,7 +1139,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        break;
     }
 
-    if (check_col(pinfo->fd, COL_INFO)) {
+    if (check_col(pinfo->cinfo, COL_INFO)) {
        char typebuf[256], codebuf[256];
 
        if (coltypename && strcmp(coltypename, "Unknown") == 0) {
@@ -1153,9 +1153,9 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            colcodename = codebuf;
        }
        if (colcodename) {
-           col_add_fstr(pinfo->fd, COL_INFO, "%s (%s)", coltypename, colcodename);
+           col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%s)", coltypename, colcodename);
        } else {
-           col_add_fstr(pinfo->fd, COL_INFO, "%s", coltypename);
+           col_add_fstr(pinfo->cinfo, COL_INFO, "%s", coltypename);
        }
     }
 
index 4036fe8295d310a9d3967e3e1a45eb02de7f57d0..f2b8f7422eeba10c981f8d61a16240ec3ae91f6d 100644 (file)
@@ -4,7 +4,7 @@
  * By Peter Torvals
  * Copyright 1999 Peter Torvals
  *
- * $Id: packet-icp.c,v 1.19 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-icp.c,v 1.20 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -160,18 +160,18 @@ static void dissect_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint32 options;
   guint32 option_data;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-        col_set_str(pinfo->fd, COL_PROTOCOL, "ICP");
-  if (check_col(pinfo->fd, COL_INFO))
-        col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+        col_clear(pinfo->cinfo, COL_INFO);
 
   opcode=tvb_get_guint8(tvb, 0);
   message_length=tvb_get_ntohs(tvb, 2);
   request_number=tvb_get_ntohl(tvb, 4);
 
-  if (check_col(pinfo->fd, COL_INFO))
+  if (check_col(pinfo->cinfo, COL_INFO))
   {
-        col_add_fstr(pinfo->fd,COL_INFO,"Opcode: %s (%u), Req Nr: %u",
+        col_add_fstr(pinfo->cinfo,COL_INFO,"Opcode: %s (%u), Req Nr: %u",
                val_to_str(opcode, opcode_vals, "Unknown"), opcode,
                request_number);
   }
index 063421b73a31c58a37dcd84e422b6336cec4ca58..e550bd940fcfdf19f1bcfad8f84227070e61eb9f 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-icq.c
  * Routines for ICQ packet disassembly
  *
- * $Id: packet-icq.c,v 1.36 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-icq.c,v 1.37 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -464,11 +464,11 @@ dissect_icqv4(tvbuff_t *tvb,
              proto_tree *tree)
 {
     /* Not really implemented yet */
-    if (check_col(pinfo->fd, COL_PROTOCOL)) {
-       col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv4 (UDP)");
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv4 (UDP)");
     }
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_set_str(pinfo->fd, COL_INFO, "ICQ Version 4 protocol");
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 4 protocol");
     }
 }
 
@@ -478,11 +478,11 @@ dissect_icqv3(tvbuff_t *tvb,
              proto_tree *tree)
 {
     /* Not really implemented yet */
-    if (check_col(pinfo->fd, COL_PROTOCOL)) {
-       col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv3 (UDP)");
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv3 (UDP)");
     }
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_set_str(pinfo->fd, COL_INFO, "ICQ Version 3 protocol");
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 3 protocol");
     }
 }
 
@@ -492,11 +492,11 @@ dissect_icqv2(tvbuff_t *tvb,
              proto_tree *tree)
 {
     /* Not really implemented yet */
-    if (check_col(pinfo->fd, COL_PROTOCOL)) {
-       col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv2 (UDP)");
+    if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv2 (UDP)");
     }
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_set_str(pinfo->fd, COL_INFO, "ICQ Version 2 protocol");
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 2 protocol");
     }
 }
 
@@ -1748,8 +1748,8 @@ dissect_icqv5Client(tvbuff_t *tvb,
 
     cmd = tvb_get_letohs(decr_tvb, ICQ5_CL_CMD);
 
-    if (check_col(pinfo->fd, COL_INFO))
-        col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
+    if (check_col(pinfo->cinfo, COL_INFO))
+        col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
     
     if (tree) {
         ti = proto_tree_add_protocol_format(tree,
@@ -1908,8 +1908,8 @@ dissect_icqv5Server(tvbuff_t *tvb,
     guint16 cmd;
     
     cmd = tvb_get_letohs(tvb, offset + ICQ5_SRV_CMD);
-    if (changeCol && check_col(pinfo->fd, COL_INFO))
-       col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
+    if (changeCol && check_col(pinfo->cinfo, COL_INFO))
+       col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
 
     if (pktsize == -1)
        pktsize = tvb_reported_length(tvb);
@@ -2058,10 +2058,10 @@ static void dissect_icqv5(tvbuff_t *tvb,
 {
   guint32 unknown;
   
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-      col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv5 (UDP)");
-  if (check_col(pinfo->fd, COL_INFO))
-      col_set_str(pinfo->fd, COL_INFO, "ICQv5 packet");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv5 (UDP)");
+  if (check_col(pinfo->cinfo, COL_INFO))
+      col_set_str(pinfo->cinfo, COL_INFO, "ICQv5 packet");
 
   unknown = tvb_get_letohl(tvb, ICQ5_UNKNOWN);
 
@@ -2078,11 +2078,11 @@ static void dissect_icq(tvbuff_t *tvb,
 {
   int version;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL)) {
-    col_set_str(pinfo->fd, COL_PROTOCOL, "ICQ");
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQ");
   }
-  if (check_col(pinfo->fd, COL_INFO)) {
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_INFO)) {
+    col_clear(pinfo->cinfo, COL_INFO);
   }
 
   version = tvb_get_letohs(tvb, ICQ_VERSION);
index 435309b704cfa19aaafd920c71c0f816140f3c7a..d24fcdd90fe8c3703e9c0bb40fda5f99cf64de6b 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.45 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-ieee80211.c,v 1.46 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #define COOK_FLAGS(x)           (((x) & 0xFF00) >> 8)
 #define COOK_DS_STATUS(x)       ((x) & 0x3)
 #define COOK_WEP_KEY(x)       (((x) & 0xC0) >> 6)
-#define COL_SHOW_INFO(fd,info) if (check_col(fd,COL_INFO)) \
-                               col_add_str(fd,COL_INFO,info);
-#define COL_SHOW_INFO_CONST(fd,info) if (check_col(fd,COL_INFO)) \
-                               col_set_str(fd,COL_INFO,info);
 
 #define FLAG_TO_DS             0x01
 #define FLAG_FROM_DS           0x02
@@ -1016,22 +1012,22 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t * tvb, packet_info * pinfo,
 static void
 set_src_addr_cols(packet_info *pinfo, const guint8 *addr, char *type)
 {
-  if (check_col(pinfo->fd, COL_RES_DL_SRC))
-    col_add_fstr(pinfo->fd, COL_RES_DL_SRC, "%s (%s)",
+  if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
+    col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "%s (%s)",
                    get_ether_name(addr), type);
-  if (check_col(pinfo->fd, COL_UNRES_DL_SRC))
-    col_add_fstr(pinfo->fd, COL_UNRES_DL_SRC, "%s (%s)",
+  if (check_col(pinfo->cinfo, COL_UNRES_DL_SRC))
+    col_add_fstr(pinfo->cinfo, COL_UNRES_DL_SRC, "%s (%s)",
                     ether_to_str(addr), type);
 }
 
 static void
 set_dst_addr_cols(packet_info *pinfo, const guint8 *addr, char *type)
 {
-  if (check_col(pinfo->fd, COL_RES_DL_DST))
-    col_add_fstr(pinfo->fd, COL_RES_DL_DST, "%s (%s)",
+  if (check_col(pinfo->cinfo, COL_RES_DL_DST))
+    col_add_fstr(pinfo->cinfo, COL_RES_DL_DST, "%s (%s)",
                     get_ether_name(addr), type);
-  if (check_col(pinfo->fd, COL_UNRES_DL_DST))
-    col_add_fstr(pinfo->fd, COL_UNRES_DL_DST, "%s (%s)",
+  if (check_col(pinfo->cinfo, COL_UNRES_DL_DST))
+    col_add_fstr(pinfo->cinfo, COL_UNRES_DL_DST, "%s (%s)",
                     ether_to_str(addr), type);
 }
 
@@ -1054,18 +1050,19 @@ dissect_ieee80211 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   guint32 addr_type;
   volatile gboolean is_802_2;
 
-  if (check_col (pinfo->fd, COL_PROTOCOL))
-    col_set_str (pinfo->fd, COL_PROTOCOL, "IEEE 802.11");
-  if (check_col (pinfo->fd, COL_INFO))
-    col_clear (pinfo->fd, COL_INFO);
+  if (check_col (pinfo->cinfo, COL_PROTOCOL))
+    col_set_str (pinfo->cinfo, COL_PROTOCOL, "IEEE 802.11");
+  if (check_col (pinfo->cinfo, COL_INFO))
+    col_clear (pinfo->cinfo, COL_INFO);
 
   fcf = tvb_get_letohs (tvb, 0);
   hdr_len = find_header_length (fcf);
   frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
 
-  COL_SHOW_INFO_CONST (pinfo->fd,
-      val_to_str(frame_type_subtype, frame_type_subtype_vals,
-          "Unrecognized (Reserved frame)"));
+  if (check_col (pinfo->cinfo, COL_INFO))
+      col_set_str (pinfo->cinfo, COL_INFO,
+          val_to_str(frame_type_subtype, frame_type_subtype_vals,
+              "Unrecognized (Reserved frame)"));
 
   /* Add the FC to the current tree */
   if (tree)
index 914b1872bbb8e100f42c5c78043112fd65fa079b..d9525ee72f31111f39362f7704fbcf1de28c7c50 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-igmp.c   2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
  * Routines for IGMP packet disassembly
  *
- * $Id: packet-igmp.c,v 1.13 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-igmp.c,v 1.14 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -298,8 +298,8 @@ static const value_string mtrace_fwd_code_vals[] = {
 };
 
 #define PRINT_IGMP_VERSION(version)                                    \
-       if (check_col(pinfo->fd, COL_INFO)) {                           \
-               col_add_fstr(pinfo->fd, COL_INFO,                       \
+       if (check_col(pinfo->cinfo, COL_INFO)) {                                \
+               col_add_fstr(pinfo->cinfo, COL_INFO,                    \
                        "V%d %s",version,val_to_str(type, commands,     \
                                "Unknown Type:0x%02x"));                \
        }                                                               \
@@ -357,8 +357,8 @@ dissect_igmp_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int ty
 {
        int len;
 
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_add_str(pinfo->fd, COL_INFO,
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_add_str(pinfo->cinfo, COL_INFO,
                        val_to_str(type, commands, "Unknown Type:0x%02x"));
        }
 
@@ -666,9 +666,9 @@ dissect_igmp_mtrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int typ
        else
                typestr = "Traceroute Request";
 
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_set_str(pinfo->fd, COL_INFO, typestr);
-               if (blocks) col_append_str(pinfo->fd, COL_INFO, blocks);
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_set_str(pinfo->cinfo, COL_INFO, typestr);
+               if (blocks) col_append_str(pinfo->cinfo, COL_INFO, blocks);
        }
 
        proto_tree_add_uint_format(tree, hf_type, tvb, offset, 1, type,
@@ -788,11 +788,11 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        tree = proto_item_add_subtree(item, ett_igmp);
 
 
-       if (check_col(pinfo->fd, COL_PROTOCOL)) {
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IGMP");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "IGMP");
        }
-       if (check_col(pinfo->fd, COL_INFO)) {
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_clear(pinfo->cinfo, COL_INFO);
        }
 
 
index 2fbf1060e68074a36885de3b80ec5537067ed9af..7bf8dc5daa0aa6f50e4a2c1a80972e921705e10f 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for IGRP dissection
  * Copyright 2000, Paul Ionescu <paul@acorp.ro>
  * 
- * $Id: packet-igrp.c,v 1.9 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-igrp.c,v 1.10 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -60,26 +60,26 @@ static void dissect_igrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *igrp_tree, *igrp_vektor_tree;
   tvbuff_t   *next_tvb; 
   
-  if (check_col(pinfo->fd, COL_PROTOCOL)) 
-    col_set_str(pinfo->fd, COL_PROTOCOL, "IGRP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "IGRP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
     
   ver_and_opcode = tvb_get_guint8(tvb,0);
   update        = tvb_get_guint8(tvb,1);
   as            = tvb_get_ntohs(tvb,2);
   
   
-  if (check_col(pinfo->fd, COL_INFO)) {
+  if (check_col(pinfo->cinfo, COL_INFO)) {
     switch (ver_and_opcode) {
     case 0x11:
-       col_add_fstr(pinfo->fd, COL_INFO, "Response" );
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Response" );
        break;
     case 0x12:
-       col_add_fstr(pinfo->fd, COL_INFO, "Request" );
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Request" );
         break;
     default:           
-        col_add_fstr(pinfo->fd, COL_INFO, "Unknown version or opcode"); 
+        col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown version or opcode"); 
     }
   }
 
index e200caf86bb9a4278df2e8721ea5efa8c1791253..74c0c13a3e0b470d0dcd9f62706262599927d4c0 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for imap packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
- * $Id: packet-imap.c,v 1.16 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-imap.c,v 1.17 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -64,8 +64,8 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        int             tokenlen;
        const u_char    *next_token;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IMAP");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "IMAP");
 
        /*
         * Find the end of the first line.
@@ -82,12 +82,12 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        else
                is_request = FALSE;
 
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                /*
                 * Put the first line from the buffer into the summary
                 * (but leave out the line terminator).
                 */
-               col_add_fstr(pinfo->fd, COL_INFO, "%s: %s",
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s",
                    is_request ? "Request" : "Response",
                    format_text(line, linelen));
        }
index b7b72eeb72d89b7097cc4c77df07a10cddebc7a6..f0d63657d950e30f73fe8c53c7c3b4322adc0068 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ip.c
  * Routines for IP and miscellaneous IP protocol packet disassembly
  *
- * $Id: packet-ip.c,v 1.151 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-ip.c,v 1.152 2001/12/10 00:25:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -368,7 +368,7 @@ capture_ip(const u_char *pd, int offset, int len, packet_counts *ld) {
 
 static void
 dissect_ipopt_security(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
-                       guint optlen, frame_data *fd, proto_tree *opt_tree)
+                       guint optlen, packet_info *pinfo, proto_tree *opt_tree)
 {
   proto_tree *field_tree = NULL;
   proto_item *tf;
@@ -420,7 +420,7 @@ dissect_ipopt_security(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
 
 static void
 dissect_ipopt_route(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
-                       guint optlen, frame_data *fd, proto_tree *opt_tree)
+                       guint optlen, packet_info *pinfo, proto_tree *opt_tree)
 {
   proto_tree *field_tree = NULL;
   proto_item *tf;
@@ -465,7 +465,7 @@ dissect_ipopt_route(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
 
 static void
 dissect_ipopt_sid(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
-                       guint optlen, frame_data *fd, proto_tree *opt_tree)
+                       guint optlen, packet_info *pinfo, proto_tree *opt_tree)
 {
   proto_tree_add_text(opt_tree, tvb, offset,      optlen,
     "%s: %u", optp->name, tvb_get_ntohs(tvb, offset + 2));
@@ -474,7 +474,7 @@ dissect_ipopt_sid(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
 
 static void
 dissect_ipopt_timestamp(const ip_tcp_opt *optp, tvbuff_t *tvb,
-    int offset, guint optlen, frame_data *fd, proto_tree *opt_tree)
+    int offset, guint optlen, packet_info *pinfo, proto_tree *opt_tree)
 {
   proto_tree *field_tree = NULL;
   proto_item *tf;
@@ -545,7 +545,7 @@ dissect_ipopt_timestamp(const ip_tcp_opt *optp, tvbuff_t *tvb,
 
 static void
 dissect_ipopt_ra(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
-               guint optlen, frame_data *fd, proto_tree *opt_tree)
+               guint optlen, packet_info *pinfo, proto_tree *opt_tree)
 {
   /* Router-Alert, as defined by RFC2113 */
   int opt = tvb_get_ntohs(tvb, offset + 2);
@@ -640,7 +640,7 @@ static const ip_tcp_opt ipopts[] = {
 void
 dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
                        const ip_tcp_opt *opttab, int nopts, int eol,
-                       frame_data *fd, proto_tree *opt_tree)
+                       packet_info *pinfo, proto_tree *opt_tree)
 {
   u_char            opt;
   const ip_tcp_opt *optp;
@@ -649,7 +649,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
   char             *name;
   char              name_str[7+1+1+2+2+1+1];   /* "Unknown (0x%02x)" */
   void            (*dissect)(const struct ip_tcp_opt *, tvbuff_t *,
-                               int, guint, frame_data *, proto_tree *);
+                               int, guint, packet_info *, proto_tree *);
   guint             len;
 
   while (length > 0) {
@@ -721,7 +721,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
         } else {
           if (dissect != NULL) {
             /* Option has a dissector. */
-            (*dissect)(optp, tvb, offset,          len, fd, opt_tree);
+            (*dissect)(optp, tvb, offset,          len, pinfo, opt_tree);
           } else {
             /* Option has no data, hence no dissector. */
             proto_tree_add_text(opt_tree, tvb, offset,  len, "%s", name);
@@ -824,10 +824,10 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tvbuff_t   *next_tvb;
   gboolean update_col_info = TRUE;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "IP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "IP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   /* Avoids alignment problems on many architectures. */
   tvb_memcpy(tvb, (guint8 *)&iph, offset, sizeof(e_ip));
@@ -862,8 +862,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   }
 
   if (hlen < IPH_MIN_LEN) {
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "Bogus IP header length (%u, must be at least %u)",
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "Bogus IP header length (%u, must be at least %u)",
        hlen, IPH_MIN_LEN);
     if (tree) {
       proto_tree_add_uint_format(ip_tree, hf_ip_hdr_len, tvb, offset, 1, hlen,
@@ -946,7 +946,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         "Options: (%u bytes)", optlen);
       field_tree = proto_item_add_subtree(tf, ett_ip_options);
       dissect_ip_tcp_options(tvb, offset + 20, optlen,
-         ipopts, N_IP_OPTS, IPOPT_END, pinfo->fd, field_tree);
+         ipopts, N_IP_OPTS, IPOPT_END, pinfo, field_tree);
     }
   }
 
@@ -1049,8 +1049,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       }
       if (ipfd_head->flags & (FD_OVERLAPCONFLICT
                         |FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
-        if (check_col(pinfo->fd, COL_INFO)) {
-          col_set_str(pinfo->fd, COL_INFO, "[Illegal fragments]");
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+          col_set_str(pinfo->cinfo, COL_INFO, "[Illegal fragments]");
           update_col_info = FALSE;
         }
       }
@@ -1101,8 +1101,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   if (next_tvb == NULL) {
     /* Just show this as a fragment. */
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "Fragmented IP protocol (proto=%s 0x%02x, off=%u)",
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "Fragmented IP protocol (proto=%s 0x%02x, off=%u)",
        ipprotostr(iph.ip_p), iph.ip_p, (iph.ip_off & IP_OFFSET) * 8);
     call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
     return;
@@ -1118,8 +1118,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   if (!dissector_try_port(ip_dissector_table, nxt, next_tvb, pinfo, tree)) {
     /* Unknown protocol */
     if (update_col_info) {
-      if (check_col(pinfo->fd, COL_INFO))
-        col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
+      if (check_col(pinfo->cinfo, COL_INFO))
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
     }
     call_dissector(data_handle,next_tvb, pinfo, tree);
   }
@@ -1338,10 +1338,10 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   gboolean   save_in_error_pkt;
   tvbuff_t   *next_tvb;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "ICMP");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMP");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   /* To do: check for runts, errs, etc. */
   icmp_type = tvb_get_guint8(tvb, 0);
@@ -1426,8 +1426,8 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       break;
   }
 
-  if (check_col(pinfo->fd, COL_INFO))
-    col_add_str(pinfo->fd, COL_INFO, type_str);
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_add_str(pinfo->cinfo, COL_INFO, type_str);
 
   if (tree) {
     length = tvb_length(tvb);
@@ -1525,7 +1525,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
           Set the columns non-writable, so that the packet list
           shows this as an ICMP packet, not as the type of packet
           for which the ICMP packet was generated. */
-       col_set_writable(pinfo->fd, FALSE);
+       col_set_writable(pinfo->cinfo, FALSE);
 
        /* Also, save the current values of the addresses, and restore
           them when we're finished dissecting the contained packet, so
index aa9265bfd32b03609fbf5a04a6b6c60a632e9442..3132373d75a64c1dfe0c0da4e644fa1c088c1f15 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ip.h
  * Definitions for IP packet disassembly structures and routines
  *
- * $Id: packet-ip.h,v 1.20 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-ip.h,v 1.21 2001/12/10 00:25:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -42,13 +42,13 @@ typedef struct ip_tcp_opt {
   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 *, tvbuff_t *, int, guint,
-                  frame_data *, proto_tree *);
+                  packet_info *, proto_tree *);
                        /* routine to dissect option */
 } ip_tcp_opt;
 
 /* Routine to dissect IP or TCP options. */
 void       dissect_ip_tcp_options(tvbuff_t *, int, guint,
-    const ip_tcp_opt *, int, int, frame_data *, proto_tree *);
+    const ip_tcp_opt *, int, int, packet_info *, proto_tree *);
 
 /* Dissector table for "ip.proto"; used by IPv6 as well as IPv4 */
 extern dissector_table_t ip_dissector_table;
index bf30d44ef040a1b8f986aac086bae67178ac2c5c..35b334f26c94ea1dd45d0597a10895f5635680a4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Guy Harris <guy@alum.mit.edu>
  *
- * $Id: packet-ipp.c,v 1.26 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-ipp.c,v 1.27 2001/12/10 00:25:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -168,13 +168,13 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint16 status_code;
        gchar *status_fmt;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IPP");
-       if (check_col(pinfo->fd, COL_INFO)) {
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPP");
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                if (is_request)
-                       col_set_str(pinfo->fd, COL_INFO, "IPP request");
+                       col_set_str(pinfo->cinfo, COL_INFO, "IPP request");
                else
-                       col_set_str(pinfo->fd, COL_INFO, "IPP response");
+                       col_set_str(pinfo->cinfo, COL_INFO, "IPP response");
        }
 
        if (tree) {
index 0a74e0c15aaf884eecb2d0040edea8b6a8eb6dbb..761e7fefa64a1e6fa7881500850407a1f46a21f6 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ipsec.c
  * Routines for IPsec/IPComp packet disassembly 
  *
- * $Id: packet-ipsec.c,v 1.35 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-ipsec.c,v 1.36 2001/12/10 00:25:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -119,7 +119,7 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     next_tvb = tvb_new_subset(tvb, advance, -1, -1);
 
     if (g_ah_payload_in_subtree) {
-       col_set_writable(pinfo->fd, FALSE);
+       col_set_writable(pinfo->cinfo, FALSE);
     }
 
     /* do lookup with the subdissector table */
@@ -137,16 +137,16 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     struct newah ah;
     int advance;
 
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-       col_set_str(pinfo->fd, COL_PROTOCOL, "AH");
-    if (check_col(pinfo->fd, COL_INFO))
-       col_clear(pinfo->fd, COL_INFO);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "AH");
+    if (check_col(pinfo->cinfo, COL_INFO))
+       col_clear(pinfo->cinfo, COL_INFO);
 
     tvb_memcpy(tvb, (guint8 *)&ah, 0, sizeof(ah)); 
     advance = sizeof(ah) + ((ah.ah_len - 1) << 2);
 
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_add_fstr(pinfo->fd, COL_INFO, "AH (SPI=0x%08x)",
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_add_fstr(pinfo->cinfo, COL_INFO, "AH (SPI=0x%08x)",
            (guint32)ntohl(ah.ah_spi));
     }
 
@@ -204,15 +204,15 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      * load the top pane info. This should be overwritten by
      * the next protocol in the stack
      */
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-       col_set_str(pinfo->fd, COL_PROTOCOL, "ESP");
-    if (check_col(pinfo->fd, COL_INFO))
-       col_clear(pinfo->fd, COL_INFO);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESP");
+    if (check_col(pinfo->cinfo, COL_INFO))
+       col_clear(pinfo->cinfo, COL_INFO);
 
     tvb_memcpy(tvb, (guint8 *)&esp, 0, sizeof(esp)); 
 
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_add_fstr(pinfo->fd, COL_INFO, "ESP (SPI=0x%08x)",
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_add_fstr(pinfo->cinfo, COL_INFO, "ESP (SPI=0x%08x)",
            (guint32)ntohl(esp.esp_spi));
     }
 
@@ -246,20 +246,20 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      * load the top pane info. This should be overwritten by
      * the next protocol in the stack
      */
-    if (check_col(pinfo->fd, COL_PROTOCOL))
-       col_set_str(pinfo->fd, COL_PROTOCOL, "IPComp");
-    if (check_col(pinfo->fd, COL_INFO))
-       col_clear(pinfo->fd, COL_INFO);
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPComp");
+    if (check_col(pinfo->cinfo, COL_INFO))
+       col_clear(pinfo->cinfo, COL_INFO);
 
     tvb_memcpy(tvb, (guint8 *)&ipcomp, 0, sizeof(ipcomp)); 
 
-    if (check_col(pinfo->fd, COL_INFO)) {
+    if (check_col(pinfo->cinfo, COL_INFO)) {
        p = match_strval(ntohs(ipcomp.comp_cpi), cpi2val);
        if (p == NULL) {
-           col_add_fstr(pinfo->fd, COL_INFO, "IPComp (CPI=0x%04x)",
+           col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=0x%04x)",
                ntohs(ipcomp.comp_cpi));
        } else
-           col_add_fstr(pinfo->fd, COL_INFO, "IPComp (CPI=%s)", p);
+           col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=%s)", p);
     }
 
     /*
index a95f9e083930bbc81fbdac24e4286ec42e9d8c56..96385bab203f8a7f19ec79ff049e3e510bf59912 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ipv6.c
  * Routines for IPv6 packet disassembly
  *
- * $Id: packet-ipv6.c,v 1.70 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-ipv6.c,v 1.71 2001/12/10 00:25:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -198,8 +198,8 @@ dissect_frag6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
     frag.ip6f_offlg = ntohs(frag.ip6f_offlg);
     *offlg = frag.ip6f_offlg;
     *ident = frag.ip6f_ident;
-    if (check_col(pinfo->fd, COL_INFO)) {
-       col_add_fstr(pinfo->fd, COL_INFO,
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+       col_add_fstr(pinfo->cinfo, COL_INFO,
            "IPv6 fragment (nxt=%s (0x%02x) off=%u id=0x%x)",
            ipprotostr(frag.ip6f_nxt), frag.ip6f_nxt,
            frag.ip6f_offlg & IP6F_OFF_MASK, frag.ip6f_ident);
@@ -660,10 +660,10 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   struct ip6_hdr ipv6;
 
-  if (check_col(pinfo->fd, COL_PROTOCOL))
-    col_set_str(pinfo->fd, COL_PROTOCOL, "IPv6");
-  if (check_col(pinfo->fd, COL_INFO))
-    col_clear(pinfo->fd, COL_INFO);
+  if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPv6");
+  if (check_col(pinfo->cinfo, COL_INFO))
+    col_clear(pinfo->cinfo, COL_INFO);
 
   offset = 0;
   tvb_memcpy(tvb, (guint8 *)&ipv6, offset, sizeof(ipv6));
@@ -889,8 +889,8 @@ again:
       }
       if (ipfd_head->flags & (FD_OVERLAPCONFLICT
                         |FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
-        if (check_col(pinfo->fd, COL_INFO)) {
-          col_set_str(pinfo->fd, COL_INFO, "[Illegal fragments]");
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+          col_set_str(pinfo->cinfo, COL_INFO, "[Illegal fragments]");
           update_col_info = FALSE;
         }
       }
@@ -952,8 +952,8 @@ again:
   /* do lookup with the subdissector table */
   if (!dissector_try_port(ip_dissector_table, nxt, next_tvb, pinfo, tree)) {
     /* Unknown protocol */
-    if (check_col(pinfo->fd, COL_INFO))
-      col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt);
+    if (check_col(pinfo->cinfo, COL_INFO))
+      col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt);
     call_dissector(data_handle,next_tvb, pinfo, tree);
   }
 }
@@ -962,11 +962,11 @@ static void
 dissect_ipv6_none(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     if (hf_ipv6_mipv6_length != -1) {
-       if (check_col(pinfo->fd, COL_INFO))
-           col_add_fstr(pinfo->fd, COL_INFO, "Mobile IPv6 Destination Option");
+       if (check_col(pinfo->cinfo, COL_INFO))
+           col_add_fstr(pinfo->cinfo, COL_INFO, "Mobile IPv6 Destination Option");
     } else {
-       if (check_col(pinfo->fd, COL_INFO))
-           col_add_fstr(pinfo->fd, COL_INFO, "IPv6 no next header");
+       if (check_col(pinfo->cinfo, COL_INFO))
+           col_add_fstr(pinfo->cinfo, COL_INFO, "IPv6 no next header");
     }
     /* XXX - dissect the payload as padding? */
 }
index 7e8d73d3401552883ad73b061fcbba7fc0ecf207..a605438ee5bd90c3c0852d4804e247feff0bc474 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for NetWare's IPX
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-ipx.c,v 1.97 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-ipx.c,v 1.98 2001/12/10 00:25:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -212,10 +212,10 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        guint16         ipx_dsocket, ipx_ssocket;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IPX");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        /* Calculate here for use in pinfo and in tree */
        ipx_dsocket     = tvb_get_ntohs(tvb, 16);
@@ -234,8 +234,8 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        SET_ADDRESS(&pinfo->net_dst,    AT_IPX, 10, dst_net_node);
        SET_ADDRESS(&pinfo->dst,        AT_IPX, 10, dst_net_node);
 
-       if (check_col(pinfo->fd, COL_INFO))
-               col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%04x)",
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%04x)",
                                socket_text(ipx_dsocket), ipx_dsocket);
 
        if (tree) {
@@ -337,10 +337,10 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint8          conn_ctrl;
        guint8          datastream_type;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "SPX");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_set_str(pinfo->fd, COL_INFO, "SPX");
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPX");
+       if