aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/column-utils.c293
-rw-r--r--epan/column-utils.h30
-rw-r--r--epan/epan.c6
-rw-r--r--epan/epan.h6
-rw-r--r--epan/frame_data.h33
-rw-r--r--epan/packet.c16
-rw-r--r--epan/packet.h4
-rw-r--r--epan/packet_info.h3
-rw-r--r--file.c43
-rw-r--r--gtk/packet_win.c4
-rw-r--r--packet-aarp.c20
-rw-r--r--packet-afs.c22
-rw-r--r--packet-aim.c142
-rw-r--r--packet-arp.c52
-rw-r--r--packet-ascend.c18
-rw-r--r--packet-atalk.c74
-rw-r--r--packet-atm.c40
-rw-r--r--packet-auto_rp.c14
-rw-r--r--packet-bacapp.c14
-rw-r--r--packet-bacnet.c10
-rw-r--r--packet-beep.c10
-rw-r--r--packet-bgp.c16
-rw-r--r--packet-bootp.c26
-rw-r--r--packet-bpdu.c24
-rw-r--r--packet-bvlc.c10
-rw-r--r--packet-cdp.c10
-rw-r--r--packet-cgmp.c10
-rw-r--r--packet-chdlc.c42
-rw-r--r--packet-clip.c18
-rw-r--r--packet-clnp.c100
-rw-r--r--packet-cops.c14
-rw-r--r--packet-cups.c14
-rw-r--r--packet-dcerpc.c44
-rw-r--r--packet-ddtp.c38
-rw-r--r--packet-dec-bpdu.c16
-rw-r--r--packet-diameter.c20
-rw-r--r--packet-dns.c108
-rw-r--r--packet-dsi.c14
-rw-r--r--packet-dvmrp.c18
-rw-r--r--packet-eap.c10
-rw-r--r--packet-eapol.c10
-rw-r--r--packet-eigrp.c14
-rw-r--r--packet-esis.c14
-rw-r--r--packet-eth.c14
-rw-r--r--packet-ethertype.c14
-rw-r--r--packet-fddi.c10
-rw-r--r--packet-fr.c34
-rw-r--r--packet-frame.c19
-rw-r--r--packet-ftp.c18
-rw-r--r--packet-giop.c70
-rw-r--r--packet-gmrp.c8
-rw-r--r--packet-gnutella.c18
-rw-r--r--packet-gre.c10
-rw-r--r--packet-gtp.c72
-rw-r--r--packet-gvrp.c10
-rw-r--r--packet-h1.c26
-rw-r--r--packet-h261.c10
-rw-r--r--packet-hsrp.c14
-rw-r--r--packet-http.c12
-rw-r--r--packet-icap.c10
-rw-r--r--packet-icmpv6.c18
-rw-r--r--packet-icp.c14
-rw-r--r--packet-icq.c50
-rw-r--r--packet-ieee80211.c37
-rw-r--r--packet-igmp.c24
-rw-r--r--packet-igrp.c18
-rw-r--r--packet-imap.c10
-rw-r--r--packet-ip.c58
-rw-r--r--packet-ip.h6
-rw-r--r--packet-ipp.c12
-rw-r--r--packet-ipsec.c42
-rw-r--r--packet-ipv6.c30
-rw-r--r--packet-ipx.c60
-rw-r--r--packet-irc.c10
-rw-r--r--packet-isakmp.c24
-rw-r--r--packet-iscsi.c24
-rw-r--r--packet-isis.c18
-rw-r--r--packet-isl.c14
-rw-r--r--packet-isup.c16
-rw-r--r--packet-iua.c12
-rw-r--r--packet-kerberos.c34
-rw-r--r--packet-l2tp.c18
-rw-r--r--packet-lapb.c30
-rw-r--r--packet-lapbether.c10
-rw-r--r--packet-lapd.c26
-rw-r--r--packet-ldap.c22
-rw-r--r--packet-ldp.c20
-rw-r--r--packet-llc.c18
-rw-r--r--packet-lmi.c6
-rw-r--r--packet-lpd.c18
-rw-r--r--packet-m2pa.c12
-rw-r--r--packet-m3ua.c12
-rw-r--r--packet-mapi.c10
-rw-r--r--packet-mbtcp.c18
-rw-r--r--packet-mip.c18
-rw-r--r--packet-mmse.c12
-rw-r--r--packet-mpeg1.c10
-rw-r--r--packet-mpls.c10
-rw-r--r--packet-mrdisc.c14
-rw-r--r--packet-msdp.c12
-rw-r--r--packet-msnip.c14
-rw-r--r--packet-msproxy.c24
-rw-r--r--packet-mtp3.c10
-rw-r--r--packet-nbipx.c54
-rw-r--r--packet-nbns.c91
-rw-r--r--packet-ncp.c14
-rw-r--r--packet-ncp2222.inc14
-rw-r--r--packet-netbios.c18
-rw-r--r--packet-nntp.c10
-rw-r--r--packet-ntp.c10
-rw-r--r--packet-null.c18
-rw-r--r--packet-osi.c18
-rw-r--r--packet-ospf.c14
-rw-r--r--packet-pgm.c26
-rw-r--r--packet-pim.c34
-rw-r--r--packet-pop.c12
-rw-r--r--packet-portmap.c8
-rw-r--r--packet-ppp.c178
-rw-r--r--packet-pppoe.c26
-rw-r--r--packet-pptp.c14
-rw-r--r--packet-prism.c14
-rw-r--r--packet-q2931.c10
-rw-r--r--packet-q931.c10
-rw-r--r--packet-qllc.c22
-rw-r--r--packet-quake.c18
-rw-r--r--packet-quake2.c18
-rw-r--r--packet-quake3.c18
-rw-r--r--packet-quakeworld.c22
-rw-r--r--packet-radius.c14
-rw-r--r--packet-ranap.c14
-rw-r--r--packet-raw.c18
-rw-r--r--packet-rip.c18
-rw-r--r--packet-ripng.c18
-rw-r--r--packet-rlogin.c16
-rw-r--r--packet-rpc.c42
-rw-r--r--packet-rsh.c10
-rw-r--r--packet-rsvp.c14
-rw-r--r--packet-rtcp.c24
-rw-r--r--packet-rtp.c18
-rw-r--r--packet-rtsp.c22
-rw-r--r--packet-rx.c26
-rw-r--r--packet-sap.c14
-rw-r--r--packet-sctp.c72
-rw-r--r--packet-sdp.c15
-rw-r--r--packet-sip.c10
-rw-r--r--packet-skinny.c14
-rw-r--r--packet-sll.c14
-rw-r--r--packet-smb-browse.c38
-rw-r--r--packet-smb-logon.c14
-rw-r--r--packet-smb-mailslot.c16
-rw-r--r--packet-smb-pipe.c34
-rw-r--r--packet-smb.c196
-rw-r--r--packet-smpp.c18
-rw-r--r--packet-smtp.c16
-rw-r--r--packet-sna.c14
-rw-r--r--packet-snmp.c46
-rw-r--r--packet-socks.c74
-rw-r--r--packet-srvloc.c14
-rw-r--r--packet-sscop.c10
-rw-r--r--packet-ssl.c78
-rw-r--r--packet-sua.c22
-rw-r--r--packet-syslog.c16
-rw-r--r--packet-tacacs.c26
-rw-r--r--packet-tcp.c76
-rw-r--r--packet-telnet.c10
-rw-r--r--packet-tftp.c42
-rw-r--r--packet-time.c10
-rw-r--r--packet-tns.c50
-rw-r--r--packet-tpkt.c10
-rw-r--r--packet-tr.c10
-rw-r--r--packet-trmac.c17
-rw-r--r--packet-ucp.c16
-rw-r--r--packet-udp.c14
-rw-r--r--packet-v120.c34
-rw-r--r--packet-vines.c98
-rw-r--r--packet-vlan.c14
-rw-r--r--packet-vrrp.c14
-rw-r--r--packet-vtp.c10
-rw-r--r--packet-wccp.c14
-rw-r--r--packet-wcp.c16
-rw-r--r--packet-who.c14
-rw-r--r--packet-wsp.c31
-rw-r--r--packet-wtls.c13
-rw-r--r--packet-wtp.c36
-rw-r--r--packet-x11.c14
-rw-r--r--packet-x25.c114
-rw-r--r--packet-xot.c14
-rw-r--r--packet-yhoo.c10
-rw-r--r--packet-zebra.c10
-rw-r--r--plugins/giop/packet-coseventcomm.c4
-rw-r--r--plugins/giop/packet-cosnaming.c4
-rw-r--r--plugins/gryphon/packet-gryphon.c16
-rw-r--r--plugins/mgcp/packet-mgcp.c22
-rw-r--r--proto_hier_stats.c11
-rw-r--r--tethereal.c17
-rw-r--r--xdlc.c17
196 files changed, 2585 insertions, 2621 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c
index 31baabe866..4e57baaa42 100644
--- a/epan/column-utils.c
+++ b/epan/column-utils.c
@@ -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)
}
}
}
-
-
-
-
-
-
diff --git a/epan/column-utils.h b/epan/column-utils.h
index e16cc926f1..69154c5d47 100644
--- a/epan/column-utils.h
+++ b/epan/column-utils.h
@@ -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__ */
-
-
-
diff --git a/epan/epan.c b/epan/epan.c
index f9c7099066..96e2b6bf8f 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -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;
}
diff --git a/epan/epan.h b/epan/epan.h
index 7741a2598f..d2e786cd85 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -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);
diff --git a/epan/frame_data.h b/epan/frame_data.h
index 75e216b6c8..8999586d92 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -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
@@ -28,27 +27,25 @@
#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...) */
diff --git a/epan/packet.c b/epan/packet.c
index a4c70dbe47..b6f299a0a1 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -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");
diff --git a/epan/packet.h b/epan/packet.h
index 324fcc543c..812e653cbf 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -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,
diff --git a/epan/packet_info.h b/epan/packet_info.h
index d8a5df5e94..e6200f0339 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -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 b66a36de0e..97c60ffd5f 100644
--- 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.
diff --git a/gtk/packet_win.c b/gtk/packet_win.c
index 061ad0f36e..bbbaf4a6de 100644
--- a/gtk/packet_win.c
+++ b/gtk/packet_win.c
@@ -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;
diff --git a/packet-aarp.c b/packet-aarp.c
index b97947b49d..e10a31a5ed 100644
--- a/packet-aarp.c
+++ b/packet-aarp.c
@@ -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;
}
}
diff --git a/packet-afs.c b/packet-afs.c
index 7e7709dd64..68679eaa83 100644
--- a/packet-afs.c
+++ b/packet-afs.c
@@ -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"
);
diff --git a/packet-aim.c b/packet-aim.c
index 1235003c4c..e62065fb7b 100644
--- a/packet-aim.c
+++ b/packet-aim.c
@@ -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;
}
diff --git a/packet-arp.c b/packet-arp.c
index a68090fbfc..5c1100b4a8 100644
--- a/packet-arp.c
+++ b/packet-arp.c
@@ -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;
}
}
diff --git a/packet-ascend.c b/packet-ascend.c
index dfa4269129..cadcf3f44c 100644
--- a/packet-ascend.c
+++ b/packet-ascend.c
@@ -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) */
diff --git a/packet-atalk.c b/packet-atalk.c
index 458d4928fb..d080b70706 100644
--- a/packet-atalk.c
+++ b/packet-atalk.c
@@ -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)
diff --git a/packet-atm.c b/packet-atm.c
index d97e93cf03..0b3e26071c 100644
--- a/packet-atm.c
+++ b/packet-atm.c
@@ -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)"));
}
}
diff --git a/packet-auto_rp.c b/packet-auto_rp.c
index 305b0971f5..6081b04a50 100644
--- a/packet-auto_rp.c
+++ b/packet-auto_rp.c
@@ -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"));
diff --git a/packet-bacapp.c b/packet-bacapp.c
index 33f85276d9..21938945c4 100644
--- a/packet-bacapp.c
+++ b/packet-bacapp.c
@@ -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);
diff --git a/packet-bacnet.c b/packet-bacnet.c
index 6403636e95..9bdba5964f 100644
--- a/packet-bacnet.c
+++ b/packet-bacnet.c
@@ -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);
diff --git a/packet-beep.c b/packet-beep.c
index 967aed9804..919939a6b1 100644
--- a/packet-beep.c
+++ b/packet-beep.c
@@ -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)));
}
diff --git a/packet-bgp.c b/packet-bgp.c
index 5e40e96cc4..a156cd085a 100644
--- a/packet-bgp.c
+++ b/packet-bgp.c
@@ -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;
diff --git a/packet-bootp.c b/packet-bootp.c
index dd345e4d2d..3d9d40118b 100644
--- a/packet-bootp.c
+++ b/packet-bootp.c
@@ -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,
diff --git a/packet-bpdu.c b/packet-bpdu.c
index ec6f63da60..6c57b066cc 100644
--- a/packet-bpdu.c
+++ b/packet-bpdu.c
@@ -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) {
diff --git a/packet-bvlc.c b/packet-bvlc.c
index e74d27b9a8..d361f97ead 100644
--- a/packet-bvlc.c
+++ b/packet-bvlc.c
@@ -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;
diff --git a/packet-cdp.c b/packet-cdp.c
index 1905ddadef..51e1e4de6c 100644
--- a/packet-cdp.c
+++ b/packet-cdp.c
@@ -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,
diff --git a/packet-cgmp.c b/packet-cgmp.c
index 0601ba12e6..2581eb1847 100644
--- a/packet-cgmp.c
+++ b/packet-cgmp.c
@@ -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,
diff --git a/packet-chdlc.c b/packet-chdlc.c
index 60919a49b6..90705e5acd 100644
--- a/packet-chdlc.c
+++ b/packet-chdlc.c
@@ -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);
diff --git a/packet-clip.c b/packet-clip.c
index ab3510abe6..1b8af50893 100644
--- a/packet-clip.c
+++ b/packet-clip.c
@@ -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)
diff --git a/packet-clnp.c b/packet-clnp.c
index 9274a7ce49..4d128b94ab 100644
--- a/packet-clnp.c
+++ b/packet-clnp.c
@@ -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 */
diff --git a/packet-cops.c b/packet-cops.c
index 926a711299..541c9584e0 100644
--- a/packet-cops.c
+++ b/packet-cops.c
@@ -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) {
diff --git a/packet-cups.c b/packet-cups.c
index 509c021b0f..32032ddd61 100644
--- a/packet-cups.c
+++ b/packet-cups.c
@@ -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"));
diff --git a/packet-dcerpc.c b/packet-dcerpc.c
index 5ede69e934..a1a9ed481c 100644
--- a/packet-dcerpc.c
+++ b/packet-dcerpc.c
@@ -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++);
diff --git a/packet-ddtp.c b/packet-ddtp.c
index 803d1ab580..87786a6413 100644
--- a/packet-ddtp.c
+++ b/packet-ddtp.c
@@ -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");
}
}
diff --git a/packet-dec-bpdu.c b/packet-dec-bpdu.c
index b6c5013aac..14b2bcb0d5 100644
--- a/packet-dec-bpdu.c
+++ b/packet-dec-bpdu.c
@@ -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);
diff --git a/packet-diameter.c b/packet-diameter.c
index a4028be99a..6fbad7677a 100644
--- a/packet-diameter.c
+++ b/packet-diameter.c
@@ -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;
diff --git a/packet-dns.c b/packet-dns.c
index a2c2460349..3552897697 100644
--- a/packet-dns.c
+++ b/packet-dns.c
@@ -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"));
}
diff --git a/packet-dsi.c b/packet-dsi.c
index 376b2b0aa1..38c99bc045 100644
--- a/packet-dsi.c
+++ b/packet-dsi.c
@@ -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);
}
diff --git a/packet-dvmrp.c b/packet-dvmrp.c
index 6e0028a32b..663f646d48 100644
--- a/packet-dvmrp.c
+++ b/packet-dvmrp.c
@@ -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);
}
diff --git a/packet-eap.c b/packet-eap.c
index 27759713d2..de92869db4 100644
--- a/packet-eap.c
+++ b/packet-eap.c
@@ -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);
diff --git a/packet-eapol.c b/packet-eapol.c
index 38c3b4c49d..f5c08b6d24 100644
--- a/packet-eapol.c
+++ b/packet-eapol.c
@@ -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);
diff --git a/packet-eigrp.c b/packet-eigrp.c
index 7ac54565bd..d3be9058ca 100644
--- a/packet-eigrp.c
+++ b/packet-eigrp.c
@@ -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)"));
diff --git a/packet-esis.c b/packet-esis.c
index 6db393e2ac..bafe84c663 100644
--- a/packet-esis.c
+++ b/packet-esis.c
@@ -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)" ) );
}
diff --git a/packet-eth.c b/packet-eth.c
index 43e181373a..19ad37440b 100644
--- a/packet-eth.c
+++ b/packet-eth.c
@@ -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");
diff --git a/packet-ethertype.c b/packet-ethertype.c
index 644094f4eb..5fefb16ffd 100644
--- a/packet-ethertype.c
+++ b/packet-ethertype.c
@@ -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);
}
}
diff --git a/packet-fddi.c b/packet-fddi.c
index d3bedb6b55..1c5a970972 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -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,
diff --git a/packet-fr.c b/packet-fr.c
index e830c2f40e..93d5e48764 100644
--- a/packet-fr.c
+++ b/packet-fr.c
@@ -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");
diff --git a/packet-frame.c b/packet-frame.c
index f3fee8f4b4..8265a6b3cf 100644
--- a/packet-frame.c
+++ b/packet-frame.c
@@ -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 );
}
diff --git a/packet-ftp.c b/packet-ftp.c
index f41d8afac1..e5e615fa9a 100644
--- a/packet-ftp.c
+++ b/packet-ftp.c
@@ -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));
}
diff --git a/packet-giop.c b/packet-giop.c
index e4d76ef8ee..3d0aad6fd7 100644
--- a/packet-giop.c
+++ b/packet-giop.c
@@ -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));
}
diff --git a/packet-gmrp.c b/packet-gmrp.c
index d4794fc2b7..66d5e351ff 100644
--- a/packet-gmrp.c
+++ b/packet-gmrp.c
@@ -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)
{
diff --git a/packet-gnutella.c b/packet-gnutella.c
index 05f52e6516..d0b64bdad4 100644
--- a/packet-gnutella.c
+++ b/packet-gnutella.c
@@ -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);
}
diff --git a/packet-gre.c b/packet-gre.c
index 230cd4f913..df13dd5cb7 100644
--- a/packet-gre.c
+++ b/packet-gre.c
@@ -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)"));
}
diff --git a/packet-gtp.c b/packet-gtp.c
index f914a93224..397d134bd3 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -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");
}
}
diff --git a/packet-gvrp.c b/packet-gvrp.c
index 302200fdb4..4204c0ec51 100644
--- a/packet-gvrp.c
+++ b/packet-gvrp.c
@@ -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)
{
diff --git a/packet-h1.c b/packet-h1.c
index 18835afbbb..7e009595c6 100644
--- a/packet-h1.c
+++ b/packet-h1.c
@@ -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"));
}
diff --git a/packet-h261.c b/packet-h261.c
index 453159b341..87724c566c 100644
--- a/packet-h261.c
+++ b/packet-h261.c
@@ -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 ) {
diff --git a/packet-hsrp.c b/packet-hsrp.c
index 3a42d515c0..80ea29066f 100644
--- a/packet-hsrp.c
+++ b/packet-hsrp.c
@@ -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"));
}
diff --git a/packet-http.c b/packet-http.c
index 03724fc97b..5c0f7010f2 100644
--- a/packet-http.c
+++ b/packet-http.c
@@ -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) {
diff --git a/packet-icap.c b/packet-icap.c
index fe3b106d18..54fe489ca9 100644
--- a/packet-icap.c
+++ b/packet-icap.c
@@ -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) {
diff --git a/packet-icmpv6.c b/packet-icmpv6.c
index d7f50d43a6..a7c58b3d83 100644
--- a/packet-icmpv6.c
+++ b/packet-icmpv6.c
@@ -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);
}
}
diff --git a/packet-icp.c b/packet-icp.c
index 4036fe8295..f2b8f7422e 100644
--- a/packet-icp.c
+++ b/packet-icp.c
@@ -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);
}
diff --git a/packet-icq.c b/packet-icq.c
index 063421b73a..e550bd940f 100644
--- a/packet-icq.c
+++ b/packet-icq.c
@@ -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);
diff --git a/packet-ieee80211.c b/packet-ieee80211.c
index 435309b704..d24fcdd90f 100644
--- a/packet-ieee80211.c
+++ b/packet-ieee80211.c
@@ -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>
@@ -89,10 +89,6 @@
#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)
diff --git a/packet-igmp.c b/packet-igmp.c
index 914b1872bb..d9525ee72f 100644
--- a/packet-igmp.c
+++ b/packet-igmp.c
@@ -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);
}
diff --git a/packet-igrp.c b/packet-igrp.c
index 2fbf1060e6..7bf8dc5daa 100644
--- a/packet-igrp.c
+++ b/packet-igrp.c
@@ -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");
}
}
diff --git a/packet-imap.c b/packet-imap.c
index e200caf86b..74c0c13a3e 100644
--- a/packet-imap.c
+++ b/packet-imap.c
@@ -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));
}
diff --git a/packet-ip.c b/packet-ip.c
index b7b72eeb72..f0d63657d9 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -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
diff --git a/packet-ip.h b/packet-ip.h
index aa9265bfd3..3132373d75 100644
--- a/packet-ip.h
+++ b/packet-ip.h
@@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
- * $Id: packet-ip.h,v 1.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;
diff --git a/packet-ipp.c b/packet-ipp.c
index bf30d44ef0..35b334f26c 100644
--- a/packet-ipp.c
+++ b/packet-ipp.c
@@ -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) {
diff --git a/packet-ipsec.c b/packet-ipsec.c
index 0a74e0c15a..761e7fefa6 100644
--- a/packet-ipsec.c
+++ b/packet-ipsec.c
@@ -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);
}
/*
diff --git a/packet-ipv6.c b/packet-ipv6.c
index a95f9e0839..96385bab20 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -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? */
}
diff --git a/packet-ipx.c b/packet-ipx.c
index 7e8d73d340..a605438ee5 100644
--- a/packet-ipx.c
+++ b/packet-ipx.c
@@ -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 (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "SPX");
if (tree) {
ti = proto_tree_add_item(tree, proto_spx, tvb, 0, SPX_HEADER_LEN, FALSE);
@@ -379,16 +379,16 @@ dissect_ipxmsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
guint8 conn_number, sig_char;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "IPX MSG");
- 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 MSG");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
conn_number = tvb_get_guint8(tvb, 0);
sig_char = tvb_get_guint8(tvb, 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,
"%s, Connection %d",
val_to_str(sig_char, ipxmsg_sigchar_vals, "Unknown Signature Char"), conn_number);
}
@@ -418,16 +418,16 @@ dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *rip_type[3] = { "Request", "Response", "Unknown" };
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "IPX RIP");
- 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 RIP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
operation = tvb_get_ntohs(tvb, 0) - 1;
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/* rip_types 0 and 1 are valid, anything else becomes 2 or "Unknown" */
- col_add_str(pinfo->fd, COL_INFO, rip_type[MIN(operation, 2)]);
+ col_add_str(pinfo->cinfo, COL_INFO, rip_type[MIN(operation, 2)]);
}
if (tree) {
@@ -744,20 +744,20 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *sap_type[4] = { "General Query", "General Response",
"Nearest Query", "Nearest Response" };
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "IPX SAP");
- 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 SAP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
query.query_type = tvb_get_ntohs(tvb, 0);
query.server_type = tvb_get_ntohs(tvb, 2);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (query.query_type >= 1 && query.query_type <= 4) {
- col_add_str(pinfo->fd, COL_INFO, sap_type[query.query_type - 1]);
+ col_add_str(pinfo->cinfo, COL_INFO, sap_type[query.query_type - 1]);
}
else {
- col_set_str(pinfo->fd, COL_INFO, "Unknown Packet Type");
+ col_set_str(pinfo->cinfo, COL_INFO, "Unknown Packet Type");
}
}
diff --git a/packet-irc.c b/packet-irc.c
index 2d1f4f35ab..982c261cac 100644
--- a/packet-irc.c
+++ b/packet-irc.c
@@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for IRC packet dissection
*
- * $Id: packet-irc.c,v 1.15 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-irc.c,v 1.16 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -81,12 +81,12 @@ dissect_irc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint next_offset;
int linelen;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "IRC");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "IRC");
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_set_str(pinfo->fd, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
(pinfo->match_port == pinfo->destport) ? "Request" : "Response");
}
diff --git a/packet-isakmp.c b/packet-isakmp.c
index 900f56345c..d78545a2f0 100644
--- a/packet-isakmp.c
+++ b/packet-isakmp.c
@@ -4,7 +4,7 @@
* for ISAKMP (RFC 2407)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-isakmp.c,v 1.50 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-isakmp.c,v 1.51 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -323,10 +323,10 @@ dissect_isakmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static const guint8 non_ike_marker[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
tvbuff_t * next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "ISAKMP");
- 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, "ISAKMP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
hdr = (struct isakmp_hdr *)tvb_get_ptr(tvb, 0, sizeof (struct isakmp_hdr));
len = pntohl(&hdr->length);
@@ -339,16 +339,16 @@ dissect_isakmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
encap_hdr = (struct udp_encap_hdr *)tvb_get_ptr(tvb, 0, sizeof(struct udp_encap_hdr));
if (encap_hdr->non_ike_marker[0] == 0xFF) {
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, "UDP encapsulated IPSec - NAT Keepalive");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, "UDP encapsulated IPSec - NAT Keepalive");
return;
}
if (memcmp(encap_hdr->non_ike_marker,non_ike_marker,8) == 0) {
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (encap_hdr->esp_SPI != 0)
- col_add_str(pinfo->fd, COL_INFO, "UDP encapsulated IPSec - ESP");
+ col_add_str(pinfo->cinfo, COL_INFO, "UDP encapsulated IPSec - ESP");
else
- col_add_str(pinfo->fd, COL_INFO, "UDP encapsulated IPSec - AH");
+ col_add_str(pinfo->cinfo, COL_INFO, "UDP encapsulated IPSec - AH");
}
if (tree)
proto_tree_add_text(isakmp_tree, tvb, offset,
@@ -390,8 +390,8 @@ dissect_isakmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, exchtype2str(hdr->exch_type));
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, exchtype2str(hdr->exch_type));
if (tree) {
proto_tree_add_text(isakmp_tree, tvb, offset, sizeof(hdr->icookie),
diff --git a/packet-iscsi.c b/packet-iscsi.c
index f6f86c419e..2908976780 100644
--- a/packet-iscsi.c
+++ b/packet-iscsi.c
@@ -4,7 +4,7 @@
*
* Conforms to the protocol described in: draft-ietf-ips-iscsi-08.txt
*
- * $Id: packet-iscsi.c,v 1.17 2001/11/04 02:50:19 guy Exp $
+ * $Id: packet-iscsi.c,v 1.18 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -685,12 +685,12 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
guint end_offset = offset + tvb_length_remaining(tvb, offset);
/* 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, "iSCSI");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "iSCSI");
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, (char *)opcode_str);
+ col_append_str(pinfo->cinfo, COL_INFO, (char *)opcode_str);
if((opcode & ~(X_BIT | I_BIT)) == ISCSI_OPCODE_SCSI_COMMAND) {
/* SCSI Command */
@@ -700,16 +700,16 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* READ_6 and WRITE_6 */
guint lba = tvb_get_ntohl(tvb, cdb_offset) & 0x1fffff;
guint len = tvb_get_guint8(tvb, cdb_offset + 4);
- col_append_fstr(pinfo->fd, COL_INFO, " (%s LBA 0x%06x len 0x%02x)", scsi_command_name, lba, len);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s LBA 0x%06x len 0x%02x)", scsi_command_name, lba, len);
}
else if(cdb0 == 0x28 || cdb0 == 0x2a) {
/* READ_10 and WRITE_10 */
guint lba = tvb_get_ntohl(tvb, cdb_offset + 2);
guint len = tvb_get_ntohs(tvb, cdb_offset + 7);
- col_append_fstr(pinfo->fd, COL_INFO, " (%s LBA 0x%08x len 0x%04x)", scsi_command_name, lba, len);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s LBA 0x%08x len 0x%04x)", scsi_command_name, lba, len);
}
else if(scsi_command_name != NULL)
- col_append_fstr(pinfo->fd, COL_INFO, " (%s)", scsi_command_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", scsi_command_name);
}
else if(opcode == ISCSI_OPCODE_SCSI_RESPONSE) {
/* SCSI Command Response */
@@ -722,7 +722,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
else
blurb = "Target Failure";
if(blurb != NULL)
- col_append_fstr(pinfo->fd, COL_INFO, " (%s)", blurb);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", blurb);
}
}
@@ -1228,11 +1228,11 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
}
- if(check_col(pinfo->fd, COL_INFO)) {
+ if(check_col(pinfo->cinfo, COL_INFO)) {
if(iSCSIPdusDissected == 0)
- col_set_str(pinfo->fd, COL_INFO, "");
+ col_set_str(pinfo->cinfo, COL_INFO, "");
else
- col_append_str(pinfo->fd, COL_INFO, ", ");
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
}
dissect_iscsi_pdu(tvb, pinfo, tree, offset, opcode, opcode_str, data_segment_len);
diff --git a/packet-isis.c b/packet-isis.c
index d7f1f65f09..51ad2b2c92 100644
--- a/packet-isis.c
+++ b/packet-isis.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
- * $Id: packet-isis.c,v 1.26 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-isis.c,v 1.27 2001/12/10 00:25:29 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -127,15 +127,15 @@ dissect_isis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 isis_type;
guint8 isis_system_id_len;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "ISIS");
- 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, "ISIS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
isis_version = tvb_get_guint8(tvb, 2);
if (isis_version != ISIS_REQUIRED_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,
"Unknown ISIS version (%u vs %u)",
isis_version, ISIS_REQUIRED_VERSION );
}
@@ -179,8 +179,8 @@ dissect_isis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
isis_type_reserved = tvb_get_guint8(tvb, 4);
isis_type = isis_type_reserved & ISIS_TYPE_MASK;
- 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 ( isis_type, isis_vals, "Unknown (0x%x)" ) );
}
if (tree) {
diff --git a/packet-isl.c b/packet-isl.c
index 1258968b06..bb7ca2da83 100644
--- a/packet-isl.c
+++ b/packet-isl.c
@@ -1,7 +1,7 @@
/* packet-isl.c
* Routines for Cisco ISL Ethernet header disassembly
*
- * $Id: packet-isl.c,v 1.28 2001/11/25 22:51:13 hagbard Exp $
+ * $Id: packet-isl.c,v 1.29 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -152,10 +152,10 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint captured_length;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "ISL");
- 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, "ISL");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
type = (tvb_get_guint8(tvb, 5) >> 4)&0x0F;
@@ -194,8 +194,8 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
field (which is, admittedly, an OUI). */
proto_tree_add_item(fh_tree, hf_isl_hsa, tvb, 17, 3, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "VLAN ID: 0x%04X",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "VLAN ID: 0x%04X",
tvb_get_ntohs(tvb, 20) >> 1);
if (tree) {
proto_tree_add_item(fh_tree, hf_isl_vlan_id, tvb, 20, 2, FALSE);
diff --git a/packet-isup.c b/packet-isup.c
index 741ecb71fc..28633270e8 100644
--- a/packet-isup.c
+++ b/packet-isup.c
@@ -2,7 +2,7 @@
* Routines for ISUP dissection
* Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de>
*
- * $Id: packet-isup.c,v 1.6 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-isup.c,v 1.7 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3690,9 +3690,9 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
/* Extract message type field */
message_type = tvb_get_guint8(message_tvb,0);
- if (check_col(pinfo->fd, COL_INFO)){
- col_append_str(pinfo->fd, COL_INFO, val_to_str(message_type, isup_message_type_value, "reserved"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)){
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_type, isup_message_type_value, "reserved"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
}
proto_tree_add_uint_format(isup_tree, hf_isup_message_type, message_tvb, 0, MESSAGE_TYPE_LENGTH, message_type, "Message type: %s (%u)", val_to_str(message_type, isup_message_type_value, "reserved"), message_type);
@@ -3908,11 +3908,11 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 cic;
/* 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, "ISUP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISUP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, "ISUP message: ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, "ISUP message: ");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-iua.c b/packet-iua.c
index ba27ab637e..e9184157d9 100644
--- a/packet-iua.c
+++ b/packet-iua.c
@@ -8,7 +8,7 @@
*
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-iua.c,v 1.9 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-iua.c,v 1.10 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -423,9 +423,9 @@ dissect_iua_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, proto
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
message_length = tvb_get_ntohl (common_header_tvb, MESSAGE_LENGTH_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, val_to_str(message_class * 256 + message_type, iua_message_class_type_acro_values, "UNKNOWN"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, iua_message_class_type_acro_values, "UNKNOWN"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
};
if (iua_tree) {
@@ -844,8 +844,8 @@ dissect_iua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *iua_tree;
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "IUA");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "IUA");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-kerberos.c b/packet-kerberos.c
index b7021687be..cd3323b5bb 100644
--- a/packet-kerberos.c
+++ b/packet-kerberos.c
@@ -3,7 +3,7 @@
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
- * $Id: packet-kerberos.c,v 1.18 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-kerberos.c,v 1.19 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -395,14 +395,14 @@ krb_proto_tree_add_time(proto_tree *tree, tvbuff_t *tvb, int offset,
start = asn1p->offset; \
ret = asn1_header_decode (asn1p, &cls, &con, &tag, &def, &item_len); \
if (ret != ASN1_ERR_NOERROR) {\
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "ERROR: Problem at %s: %s", \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ERROR: Problem at %s: %s", \
token, to_error_str(ret)); \
return -1; \
} \
if (!def) {\
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "not definite: %s", token); \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "not definite: %s", token); \
fprintf(stderr,"not definite: %s\n", token); \
return -1; \
} \
@@ -424,8 +424,8 @@ krb_proto_tree_add_time(proto_tree *tree, tvbuff_t *tvb, int offset,
#define DIE_WITH_BAD_TYPE(token, expected_tag) \
{ \
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "ERROR: Problem at %s: %s (tag=%d exp=%d)", \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ERROR: Problem at %s: %s (tag=%d exp=%d)", \
token, to_error_str(ASN1_ERR_WRONG_TYPE), tag, expected_tag); \
return -1; \
}
@@ -441,8 +441,8 @@ krb_proto_tree_add_time(proto_tree *tree, tvbuff_t *tvb, int offset,
#define KRB_SEQ_HEAD_DECODE_OR_DIE(token) \
ret = asn1_sequence_decode (asn1p, &item_len, &header_len); \
if (ret != ASN1_ERR_NOERROR) {\
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "ERROR: Problem at %s: %s", \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ERROR: Problem at %s: %s", \
token, to_error_str(ret)); \
return -1; \
} \
@@ -451,8 +451,8 @@ krb_proto_tree_add_time(proto_tree *tree, tvbuff_t *tvb, int offset,
#define KRB_DECODE_OR_DIE(token, fn, val) \
ret = fn (asn1p, &val, &length); \
if (ret != ASN1_ERR_NOERROR) { \
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "ERROR: Problem at %s: %s", \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ERROR: Problem at %s: %s", \
token, to_error_str(ret)); \
return -1; \
} \
@@ -463,8 +463,8 @@ krb_proto_tree_add_time(proto_tree *tree, tvbuff_t *tvb, int offset,
#define KRB_DECODE_STRING_OR_DIE(token, expected_tag, val, val_len, item_len) \
ret = asn1_string_decode (asn1p, &val, &val_len, &item_len, expected_tag); \
if (ret != ASN1_ERR_NOERROR) { \
- if (check_col(pinfo->fd, COL_INFO)) \
- col_add_fstr(pinfo->fd, COL_INFO, "ERROR: Problem at %s: %s", \
+ if (check_col(pinfo->cinfo, COL_INFO)) \
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ERROR: Problem at %s: %s", \
token, to_error_str(ret)); \
return -1; \
}
@@ -607,8 +607,8 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset += length;
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, val_to_str(msg_type, krb5_msg_types,
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str(msg_type, krb5_msg_types,
"Unknown msg type %#x"));
/* is preauthentication present? */
@@ -1025,8 +1025,8 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_kerberos(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "KRB5");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "KRB5");
dissect_kerberos_main(tvb, pinfo, tree);
}
diff --git a/packet-l2tp.c b/packet-l2tp.c
index 9db3f74fba..f2912cbae4 100644
--- a/packet-l2tp.c
+++ b/packet-l2tp.c
@@ -7,7 +7,7 @@
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
- * $Id: packet-l2tp.c,v 1.28 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-l2tp.c,v 1.29 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -334,16 +334,16 @@ dissect_l2tp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 control;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL)) /* build output for closed L2tp frame displayed */
- col_set_str(pinfo->fd, COL_PROTOCOL, "L2TP");
- if (check_col(pinfo->fd, COL_INFO))
- col_clear(pinfo->fd, COL_INFO);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) /* build output for closed L2tp frame displayed */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "L2TP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
control = tvb_get_ntohs(tvb, 0);
if (L2TP_VERSION(control) != 2) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "L2TP Version %u", L2TP_VERSION(control) );
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "L2TP Version %u", L2TP_VERSION(control) );
}
return;
}
@@ -361,7 +361,7 @@ dissect_l2tp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
index += 2;
cid = tvb_get_ntohs(tvb, index);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (CONTROL_BIT(control)) {
/* CONTROL MESSAGE */
tmp_index = index;
@@ -406,7 +406,7 @@ dissect_l2tp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sprintf(textbuffer,"%s (tunnel id=%d, session id=%d)",
data_msg, tid ,cid);
}
- col_add_fstr(pinfo->fd,COL_INFO,textbuffer);
+ col_add_fstr(pinfo->cinfo,COL_INFO,textbuffer);
}
if (LENGTH_BIT(control)) {
diff --git a/packet-lapb.c b/packet-lapb.c
index b0ad0e9a6e..2a07db7ea0 100644
--- a/packet-lapb.c
+++ b/packet-lapb.c
@@ -2,7 +2,7 @@
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapb.c,v 1.31 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-lapb.c,v 1.32 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -56,30 +56,30 @@ dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 byte0;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LAPB");
- 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, "LAPB");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
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");
}
byte0 = tvb_get_guint8(tvb, 0);
if (byte0 != 0x01 && byte0 != 0x03) /* invalid LAPB frame */
{
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Invalid LAPB frame");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Invalid LAPB frame");
if (tree)
ti = proto_tree_add_protocol_format(tree, proto_lapb, tvb, 0,
tvb_length(tvb), "Invalid LAPB frame");
diff --git a/packet-lapbether.c b/packet-lapbether.c
index ab695089a7..623e42189f 100644
--- a/packet-lapbether.c
+++ b/packet-lapbether.c
@@ -3,7 +3,7 @@
* Richard Sharpe <rsharpe@ns.aus.com> based on the lapb module by
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapbether.c,v 1.7 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-lapbether.c,v 1.8 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -53,10 +53,10 @@ dissect_lapbether(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int len;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LAPBETHER");
- 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, "LAPBETHER");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
len = tvb_get_guint8(tvb, 0) + tvb_get_guint8(tvb, 1) * 256;
diff --git a/packet-lapd.c b/packet-lapd.c
index 059c0d470a..b8aaa13079 100644
--- a/packet-lapd.c
+++ b/packet-lapd.c
@@ -2,7 +2,7 @@
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lapd.c,v 1.26 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-lapd.c,v 1.27 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -94,10 +94,10 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean is_response;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LAPD");
- 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, "LAPD");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
address = tvb_get_ntohs(tvb, 0);
cr = address & LAPD_CR;
@@ -106,17 +106,17 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pinfo->pseudo_header->p2p.sent) {
is_response = cr ? TRUE : FALSE;
- if(check_col(pinfo->fd, COL_RES_DL_DST))
- col_set_str(pinfo->fd, COL_RES_DL_DST, "Network");
- if(check_col(pinfo->fd, COL_RES_DL_SRC))
- col_set_str(pinfo->fd, COL_RES_DL_SRC, "User");
+ if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+ col_set_str(pinfo->cinfo, COL_RES_DL_DST, "Network");
+ if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+ col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "User");
}
else {
is_response = cr ? FALSE : TRUE;
- if(check_col(pinfo->fd, COL_RES_DL_DST))
- col_set_str(pinfo->fd, COL_RES_DL_DST, "User");
- if(check_col(pinfo->fd, COL_RES_DL_SRC))
- col_set_str(pinfo->fd, COL_RES_DL_SRC, "Network");
+ if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+ col_set_str(pinfo->cinfo, COL_RES_DL_DST, "User");
+ if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+ col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "Network");
}
if (tree) {
diff --git a/packet-ldap.c b/packet-ldap.c
index 60a9e20434..c778d64d38 100644
--- a/packet-ldap.c
+++ b/packet-ldap.c
@@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
- * $Id: packet-ldap.c,v 1.29 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-ldap.c,v 1.30 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -885,10 +885,10 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int first_time = 1;
int ret;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LDAP");
- 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, "LDAP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree)
{
@@ -908,8 +908,8 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_start = a.offset;
if (read_sequence(&a, &messageLength))
{
- if (first_time && check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Invalid LDAP packet");
+ if (first_time && check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Invalid LDAP packet");
if (ldap_tree)
proto_tree_add_text(ldap_tree, tvb, offset, 1, "Invalid LDAP packet");
break;
@@ -918,8 +918,8 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_id_start = a.offset;
if (read_integer(&a, 0, -1, 0, &messageId, ASN1_INT))
{
- if (first_time && check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Invalid LDAP packet (No Message ID)");
+ if (first_time && check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Invalid LDAP packet (No Message ID)");
if (ldap_tree)
proto_tree_add_text(ldap_tree, tvb, message_id_start, 1,
"Invalid LDAP packet (No Message ID)");
@@ -936,8 +936,8 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (first_time)
{
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "MsgId=%u MsgType=%s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "MsgId=%u MsgType=%s",
messageId, typestr);
first_time = 0;
if (!tree)
diff --git a/packet-ldp.c b/packet-ldp.c
index 8a37020f45..e28cd018ca 100644
--- a/packet-ldp.c
+++ b/packet-ldp.c
@@ -1,7 +1,7 @@
/* packet-ldp.c
* Routines for LDP (RFC 3036) packet disassembly
*
- * $Id: packet-ldp.c,v 1.22 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-ldp.c,v 1.23 2001/12/10 00:25:30 guy Exp $
*
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -556,8 +556,8 @@ dissect_ldp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
guint16 ldp_message = 0;
guint pdu_len;
- 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);
if (tree) { /* Build the tree info ..., this is wrong! FIXME */
@@ -621,13 +621,13 @@ dissect_ldp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
msg_len = tvb_get_ntohs(tvb, offset + 2);
- if (check_col(pinfo->fd, COL_INFO)) { /* Check the type ... */
+ if (check_col(pinfo->cinfo, COL_INFO)) { /* Check the type ... */
if (msg_cnt > 0)
- col_append_fstr(pinfo->fd, COL_INFO, ", %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
val_to_str(ldp_message, ldp_message_types, "Unknown Message (0x%04X)"));
else
- col_add_fstr(pinfo->fd, COL_INFO, "%s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(ldp_message, ldp_message_types, "Unknown Message (0x%04X)"));
}
@@ -754,8 +754,8 @@ next:
static void
dissect_ldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "LDP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "LDP");
dissect_ldp_pdu(tvb, 0, pinfo, tree);
}
@@ -765,8 +765,8 @@ dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "LDP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "LDP");
while (tvb_reported_length_remaining(tvb, offset) > 0) /* Dissect LDP PDUs */
offset = dissect_ldp_pdu(tvb, offset, pinfo, tree);
diff --git a/packet-llc.c b/packet-llc.c
index c7c87b8ee4..98670b0abe 100644
--- a/packet-llc.c
+++ b/packet-llc.c
@@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-llc.c,v 1.92 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-llc.c,v 1.93 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -280,11 +280,11 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 dsap, ssap;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "LLC");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLC");
}
- 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);
}
dsap = tvb_get_guint8(tvb, 0);
@@ -331,8 +331,8 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hf_llc_oui, hf_llc_type, hf_llc_pid, 2);
}
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,
"; DSAP %s %s, SSAP %s %s",
val_to_str(dsap & SAP_MASK, sap_vals, "%02x"),
dsap & DSAP_GI_BIT ?
@@ -372,8 +372,8 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
oui = tvb_get_ntoh24(tvb, offset);
etype = tvb_get_ntohs(tvb, offset+3);
- 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,
"; SNAP, OUI 0x%06X (%s), PID 0x%04X",
oui, val_to_str(oui, oui_vals, "Unknown"), etype);
}
diff --git a/packet-lmi.c b/packet-lmi.c
index 181d2de432..5de5fb1fb2 100644
--- a/packet-lmi.c
+++ b/packet-lmi.c
@@ -2,7 +2,7 @@
* Routines for Frame Relay Local Management Interface (LMI) disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-lmi.c,v 1.7 2001/12/03 03:59:36 guy Exp $
+ * $Id: packet-lmi.c,v 1.8 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -148,8 +148,8 @@ dissect_lmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 2, len;
guint8 ele_id;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LMI");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LMI");
if (tree) {
ti = proto_tree_add_item(tree, proto_lmi, tvb, 0, 3, FALSE);
diff --git a/packet-lpd.c b/packet-lpd.c
index 04002bc07f..542a57ec56 100644
--- a/packet-lpd.c
+++ b/packet-lpd.c
@@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lpd.c,v 1.31 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-lpd.c,v 1.32 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -80,10 +80,10 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Bad job format, do not retry"
};
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "LPD");
- 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, "LPD");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* rfc1179 states that all responses are 1 byte long */
code = tvb_get_guint8(tvb, 0);
@@ -97,15 +97,15 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
lpr_packet_type = unknown;
}
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (lpr_packet_type == request) {
- col_add_str(pinfo->fd, COL_INFO, lpd_client_code[code]);
+ col_add_str(pinfo->cinfo, COL_INFO, lpd_client_code[code]);
}
else if (lpr_packet_type == response) {
- col_set_str(pinfo->fd, COL_INFO, "LPD response");
+ col_set_str(pinfo->cinfo, COL_INFO, "LPD response");
}
else {
- col_set_str(pinfo->fd, COL_INFO, "LPD continuation");
+ col_set_str(pinfo->cinfo, COL_INFO, "LPD continuation");
}
}
diff --git a/packet-m2pa.c b/packet-m2pa.c
index 6b562f77b7..46faf8edb9 100644
--- a/packet-m2pa.c
+++ b/packet-m2pa.c
@@ -6,7 +6,7 @@
* Copyright 2001, Jeff Morriss <jeff.morriss[AT]ulticom.com>,
* updated by Michael Tuexen <michael.tuexen[AT]icn.siemens.de>
*
- * $Id: packet-m2pa.c,v 1.3 2001/12/03 20:35:14 guy Exp $
+ * $Id: packet-m2pa.c,v 1.4 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -228,9 +228,9 @@ dissect_m2pa_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, prot
type = tvb_get_guint8(common_header_tvb, TYPE_OFFSET);
length = tvb_get_ntohl(common_header_tvb, LENGTH_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, val_to_str(type, m2pa_message_type_values, "Invalid"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(type, m2pa_message_type_values, "Invalid"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
};
if (m2pa_tree) {
@@ -289,8 +289,8 @@ dissect_m2pa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *m2pa_tree;
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "M2PA");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "M2PA");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-m3ua.c b/packet-m3ua.c
index fe2922789b..2390935895 100644
--- a/packet-m3ua.c
+++ b/packet-m3ua.c
@@ -8,7 +8,7 @@
*
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-m3ua.c,v 1.9 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-m3ua.c,v 1.10 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -416,9 +416,9 @@ dissect_m3ua_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, prot
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
message_length = tvb_get_ntohl (common_header_tvb, MESSAGE_LENGTH_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, val_to_str(message_class * 256 + message_type, m3ua_message_class_type_acro_values, "reserved"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, m3ua_message_class_type_acro_values, "reserved"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
};
if (m3ua_tree) {
@@ -822,8 +822,8 @@ dissect_m3ua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *m3ua_tree;
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "M3UA");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "M3UA");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-mapi.c b/packet-mapi.c
index e3a291eace..fa2c37a386 100644
--- a/packet-mapi.c
+++ b/packet-mapi.c
@@ -1,7 +1,7 @@
/* packet-mapi.c
* Routines for MSX mapi packet dissection
*
- * $Id: packet-mapi.c,v 1.17 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-mapi.c,v 1.18 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -55,12 +55,12 @@ dissect_mapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *mapi_tree, *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "MAPI");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAPI");
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_add_fstr(pinfo->fd, COL_INFO, "%s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
(pinfo->match_port == pinfo->destport) ? "Request" : "Response");
}
diff --git a/packet-mbtcp.c b/packet-mbtcp.c
index cbb79b55f2..968bb687ba 100644
--- a/packet-mbtcp.c
+++ b/packet-mbtcp.c
@@ -10,7 +10,7 @@
*
* for information on Modbus/TCP.
*
- * $Id: packet-mbtcp.c,v 1.6 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-mbtcp.c,v 1.7 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -230,11 +230,11 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 exception_code = 0, exception_returned = 0;
/* Make entries in Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Modbus/TCP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Modbus/TCP");
- 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);
/* Make entries in Info column on summary display (updated after building proto tree) */
tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr));
@@ -246,7 +246,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
exception_returned = 1;
}
func_string = function_string(mh.mdbs_hdr.function_code);
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
packet_type = classify_packet(pinfo);
switch ( packet_type ) {
@@ -262,7 +262,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if ( exception_returned )
strcpy(err_str, "Exception returned ");
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"%8s [%2u pkt(s)]: trans: %5u; unit: %3u, func: %3u: %s. %s",
pkt_type_str, 1, mh.transaction_id, (unsigned char) mh.mdbs_hdr.unit_id,
(unsigned char) mh.mdbs_hdr.function_code, func_string, err_str);
@@ -327,7 +327,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Update entries in Info column on summary display */
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
switch ( packet_type ) {
case query_packet : strcpy(pkt_type_str, "query");
@@ -342,7 +342,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if ( exception_returned )
strcpy(err_str, "Exception returned ");
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"%8s [%2u pkt(s)]: trans: %5u; unit: %3u, func: %3u: %s. %s",
pkt_type_str, packet_num, mh.transaction_id, (unsigned char) mh.mdbs_hdr.unit_id,
(unsigned char) mh.mdbs_hdr.function_code, func_string, err_str);
diff --git a/packet-mip.c b/packet-mip.c
index 6d15070e25..505061407c 100644
--- a/packet-mip.c
+++ b/packet-mip.c
@@ -2,7 +2,7 @@
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <sraab@cisco.com>
*
- * $Id: packet-mip.c,v 1.23 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-mip.c,v 1.24 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -295,16 +295,16 @@ dissect_mip( 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, "MobileIP");
- 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, "MobileIP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
type = tvb_get_guint8(tvb, offset);
switch (type) {
case REGISTRATION_REQUEST:
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Reg Request: HAddr=%s COA=%s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: HAddr=%s COA=%s",
ip_to_str(tvb_get_ptr(tvb, 4, 4)),
ip_to_str(tvb_get_ptr(tvb,12,4)));
@@ -355,8 +355,8 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
break;
case REGISTRATION_REPLY:
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Reg Reply: HAddr=%s, Code=%u",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Reply: HAddr=%s, Code=%u",
ip_to_str(tvb_get_ptr(tvb,4,4)), tvb_get_guint8(tvb,1));
if (tree) {
diff --git a/packet-mmse.c b/packet-mmse.c
index 651f2c3abf..429e1f8c61 100644
--- a/packet-mmse.c
+++ b/packet-mmse.c
@@ -2,7 +2,7 @@
* Routines for MMS Message Encapsulation dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-mmse.c,v 1.3 2001/12/07 11:10:52 guy Exp $
+ * $Id: packet-mmse.c,v 1.4 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -361,12 +361,12 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pdut = tvb_get_guint8(tvb, 1);
/* 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, "MMSE");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MMSE");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_clear(pinfo->fd, COL_INFO);
- col_add_fstr(pinfo->fd, COL_INFO, "MMS %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_clear(pinfo->cinfo, COL_INFO);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "MMS %s",
match_strval(pdut, vals_message_type));
}
diff --git a/packet-mpeg1.c b/packet-mpeg1.c
index 3aaf8eabd1..6f6bedc561 100644
--- a/packet-mpeg1.c
+++ b/packet-mpeg1.c
@@ -2,7 +2,7 @@
*
* Routines for RFC 2250 MPEG-1 dissection
*
- * $Id: packet-mpeg1.c,v 1.3 2001/07/16 05:16:57 guy Exp $
+ * $Id: packet-mpeg1.c,v 1.4 2001/12/10 00:25:30 guy Exp $
*
* Copyright 2001,
* Francisco Javier Cabello Torres, <fjcabello@vtools.es>
@@ -133,14 +133,14 @@ dissect_mpeg1( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
guint16 mpg_ffv;
guint16 mpg_ffc;
- if ( check_col( pinfo->fd, COL_PROTOCOL ) )
+ if ( check_col( pinfo->cinfo, COL_PROTOCOL ) )
{
- col_set_str( pinfo->fd, COL_PROTOCOL, "MPEG-1" );
+ col_set_str( pinfo->cinfo, COL_PROTOCOL, "MPEG-1" );
}
- if ( check_col( pinfo->fd, COL_INFO) )
+ if ( check_col( pinfo->cinfo, COL_INFO) )
{
- col_set_str( pinfo->fd, COL_INFO, "MPEG-1 message");
+ col_set_str( pinfo->cinfo, COL_INFO, "MPEG-1 message");
}
/* Get MPEG-1 fields */
diff --git a/packet-mpls.c b/packet-mpls.c
index dbb1b1d174..035914f3b3 100644
--- a/packet-mpls.c
+++ b/packet-mpls.c
@@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-mpls.c,v 1.23 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-mpls.c,v 1.24 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -144,12 +144,12 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd,COL_PROTOCOL, "MPLS");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo,COL_PROTOCOL, "MPLS");
}
- if (check_col(pinfo->fd,COL_INFO)) {
- col_add_fstr(pinfo->fd,COL_INFO,"MPLS Label Switched Packet");
+ if (check_col(pinfo->cinfo,COL_INFO)) {
+ col_add_fstr(pinfo->cinfo,COL_INFO,"MPLS Label Switched Packet");
}
/* Start Decoding Here. */
diff --git a/packet-mrdisc.c b/packet-mrdisc.c
index a2ea14bb7e..3312fc8198 100644
--- a/packet-mrdisc.c
+++ b/packet-mrdisc.c
@@ -1,7 +1,7 @@
/* packet-mrdisc.c 2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
* Routines for IGMP/MRDISC packet disassembly
*
- * $Id: packet-mrdisc.c,v 1.2 2001/07/16 05:16:57 guy Exp $
+ * $Id: packet-mrdisc.c,v 1.3 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -225,17 +225,17 @@ dissect_mrdisc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int o
tree = proto_item_add_subtree(item, ett_mrdisc);
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "MRDISC");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MRDISC");
}
- 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);
}
type = tvb_get_guint8(tvb, offset);
- 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",val_to_str(type, mrdisc_types,
"Unknown Type:0x%02x"));
}
diff --git a/packet-msdp.c b/packet-msdp.c
index 3510f75dcc..a73f0a696d 100644
--- a/packet-msdp.c
+++ b/packet-msdp.c
@@ -4,7 +4,7 @@
*
* Copyright 2001, Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-msdp.c,v 1.3 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-msdp.c,v 1.4 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -188,11 +188,11 @@ dissect_msdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *msdp_tree;
int offset;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "MSDP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSDP");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, val_to_str(tvb_get_guint8(tvb, 0),
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(tvb_get_guint8(tvb, 0),
msdp_types,
"<Unknown MSDP message type>"));
@@ -300,7 +300,7 @@ static void dissect_msdp_sa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* reflect the MSDP packet rather than the
* encapsulated packet.
*/
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
call_dissector(ip_handle, next_tvb, pinfo, enc_tree);
}
*offset += tvb_length_remaining(tvb, *offset);
diff --git a/packet-msnip.c b/packet-msnip.c
index 95b9fb9126..6bf4d32477 100644
--- a/packet-msnip.c
+++ b/packet-msnip.c
@@ -1,7 +1,7 @@
/* packet-msnip.c 2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
* Routines for IGMP/MSNIP packet disassembly
*
- * $Id: packet-msnip.c,v 1.1 2001/06/29 18:55:49 guy Exp $
+ * $Id: packet-msnip.c,v 1.2 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -260,17 +260,17 @@ dissect_msnip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int of
tree = proto_item_add_subtree(item, ett_msnip);
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "MSNIP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSNIP");
}
- 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);
}
type = tvb_get_guint8(tvb, offset);
- 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",val_to_str(type, msnip_types,
"Unknown Type:0x%02x"));
}
diff --git a/packet-msproxy.c b/packet-msproxy.c
index 31860bdbbe..55f15abbd7 100644
--- a/packet-msproxy.c
+++ b/packet-msproxy.c
@@ -2,7 +2,7 @@
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-msproxy.c,v 1.24 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-msproxy.c,v 1.25 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -226,11 +226,11 @@ static void msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo,
redirect_info = conversation_get_proto_data(conversation,
proto_msproxy);
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "MS Proxy");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MS Proxy");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO,
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO,
(( redirect_info->proto == PT_TCP) ? "TCP stream" :
"UDP packets"));
@@ -1112,10 +1112,10 @@ static void dissect_msproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hash_entry_t *hash_info;
conversation_t *conversation;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "MSproxy");
- 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, "MSproxy");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
conversation = find_conversation( &pinfo->src, &pinfo->dst,
pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
@@ -1131,15 +1131,15 @@ static void dissect_msproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hash_info);
}
- if (check_col(pinfo->fd, COL_INFO)){
+ if (check_col(pinfo->cinfo, COL_INFO)){
cmd = tvb_get_ntohs( tvb, 36);
if ( pinfo->srcport == UDP_PORT_MSPROXY)
- col_add_fstr( pinfo->fd, COL_INFO, "Server message: %s",
+ col_add_fstr( pinfo->cinfo, COL_INFO, "Server message: %s",
get_msproxy_cmd_name( cmd, FROM_SERVER));
else
- col_add_fstr(pinfo->fd, COL_INFO, "Client message: %s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Client message: %s",
get_msproxy_cmd_name( cmd, FROM_CLIENT));
}
diff --git a/packet-mtp3.c b/packet-mtp3.c
index eb7194a4dc..c198da4400 100644
--- a/packet-mtp3.c
+++ b/packet-mtp3.c
@@ -2,7 +2,7 @@
* Routines for Message Transfer Part Level 3 dissection
* Copyright 2001, Michael Tuexen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-mtp3.c,v 1.6 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-mtp3.c,v 1.7 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -300,10 +300,10 @@ dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *mtp3_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, "MTP3");
- 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, "MTP3");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-nbipx.c b/packet-nbipx.c
index 479224ec73..4e7a917879 100644
--- a/packet-nbipx.c
+++ b/packet-nbipx.c
@@ -2,7 +2,7 @@
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-nbipx.c,v 1.43 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-nbipx.c,v 1.44 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -223,10 +223,10 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean has_payload;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NBIPX");
- 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, "NBIPX");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (pinfo->ipxptype == IPX_PACKET_TYPE_WANBCAST) {
/*
@@ -288,8 +288,8 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case NBIPX_DEREGISTER_NAME:
name_type_flag = tvb_get_guint8(tvb, offset);
name_type = get_netbios_name(tvb, offset+2, name);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s %s<%02x>",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s<%02x>",
val_to_str(packet_type, nbipx_data_stream_type_vals, "Unknown"),
name, name_type);
}
@@ -337,8 +337,8 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case NBIPX_SESSION_DATA:
case NBIPX_SESSION_END:
case NBIPX_SESSION_END_ACK:
- 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(packet_type, nbipx_data_stream_type_vals, "Unknown"));
}
dissect_conn_control(tvb, offset, nbipx_tree);
@@ -410,8 +410,8 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case NBIPX_DIRECTED_DATAGRAM:
- 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(packet_type, nbipx_data_stream_type_vals, "Unknown"));
}
dissect_conn_control(tvb, offset, nbipx_tree);
@@ -437,8 +437,8 @@ dissect_nbipx(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, "%s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(packet_type, nbipx_data_stream_type_vals, "Unknown"));
}
@@ -678,10 +678,10 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int node_name_type = 0;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NMPI");
- 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, "NMPI");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_nmpi, tvb, offset, 68,
@@ -700,51 +700,51 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
name_type = get_netbios_name(tvb, offset+4, name);
node_name_type = get_netbios_name(tvb, offset+20, node_name);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
switch (opcode) {
case INAME_CLAIM:
- col_add_fstr(pinfo->fd, COL_INFO, "Claim name %s<%02x>",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Claim name %s<%02x>",
name, name_type);
break;
case INAME_DELETE:
- col_add_fstr(pinfo->fd, COL_INFO, "Delete name %s<%02x>",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Delete name %s<%02x>",
name, name_type);
break;
case INAME_QUERY:
- col_add_fstr(pinfo->fd, COL_INFO, "Query name %s<%02x>",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Query name %s<%02x>",
name, name_type);
break;
case INAME_FOUND:
- col_add_fstr(pinfo->fd, COL_INFO, "Name %s<%02x> found",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Name %s<%02x> found",
name, name_type);
break;
case IMSG_HANGUP:
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Messenger hangup on %s<%02x>", name, name_type);
break;
case IMSLOT_SEND:
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Mailslot write to %s<%02x>", name, name_type);
break;
case IMSLOT_FIND:
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Find mailslot name %s<%02x>", name, name_type);
break;
case IMSLOT_NAME:
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Mailslot name %s<%02x> found", name, name_type);
break;
default:
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Unknown NMPI op 0x%02x: name %s<%02x>",
opcode, name, name_type);
break;
diff --git a/packet-nbns.c b/packet-nbns.c
index b64d3bc3cc..9060de7ac7 100644
--- a/packet-nbns.c
+++ b/packet-nbns.c
@@ -3,7 +3,7 @@
* to when it had only NBNS)
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nbns.c,v 1.66 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-nbns.c,v 1.67 2001/12/10 00:25:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -331,7 +331,7 @@ add_name_and_type(proto_tree *tree, tvbuff_t *tvb, int offset, int len,
static int
dissect_nbns_query(tvbuff_t *tvb, int offset, int nbns_data_offset,
- frame_data *fd, proto_tree *nbns_tree)
+ column_info *cinfo, proto_tree *nbns_tree)
{
int len;
char name[(NETBIOS_NAME_LEN - 1)*4 + MAXDNAME];
@@ -355,8 +355,8 @@ dissect_nbns_query(tvbuff_t *tvb, int offset, int nbns_data_offset,
type_name = nbns_type_name(type);
class_name = dns_class_name(class);
- 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 (nbns_tree != NULL) {
tq = proto_tree_add_text(nbns_tree, tvb, offset, len,
"%s: type %s, class %s", name, type_name, class_name);
@@ -550,7 +550,7 @@ nbns_add_name_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset,
static int
dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
- frame_data *fd, proto_tree *nbns_tree, int opcode)
+ column_info *cinfo, proto_tree *nbns_tree, int opcode)
{
int len;
char name[(NETBIOS_NAME_LEN - 1)*4 + MAXDNAME + 64];
@@ -594,9 +594,9 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
switch (type) {
case T_NB: /* "NB" record */
- if (fd != NULL) {
+ if (cinfo != NULL) {
if (opcode != OPCODE_WACK) {
- col_append_fstr(fd, COL_INFO, " %s %s",
+ col_append_fstr(cinfo, COL_INFO, " %s %s",
type_name,
ip_to_str(tvb_get_ptr(tvb, data_offset+2, 4)));
}
@@ -654,8 +654,8 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
break;
case T_NBSTAT: /* "NBSTAT" record */
- 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 (nbns_tree == NULL)
break;
trr = proto_tree_add_text(nbns_tree, tvb, offset,
@@ -898,8 +898,8 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
break;
default:
- 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 (nbns_tree == NULL)
break;
trr = proto_tree_add_text(nbns_tree, tvb, offset,
@@ -918,7 +918,7 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
static int
dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
- int count, frame_data *fd, proto_tree *nbns_tree)
+ int count, column_info *cinfo, proto_tree *nbns_tree)
{
int start_off, add_off;
proto_tree *qatree = NULL;
@@ -931,7 +931,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
}
while (count-- > 0) {
add_off = dissect_nbns_query(tvb, cur_off, nbns_data_offset,
- fd, qatree);
+ cinfo, qatree);
if (add_off <= 0) {
/* We ran past the end of the captured data in the
packet. */
@@ -949,7 +949,8 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
static int
dissect_answer_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
- int count, frame_data *fd, proto_tree *nbns_tree, int opcode, char *name)
+ int count, column_info *cinfo, proto_tree *nbns_tree, int opcode,
+ char *name)
{
int start_off, add_off;
proto_tree *qatree = NULL;
@@ -962,7 +963,7 @@ dissect_answer_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
}
while (count-- > 0) {
add_off = dissect_nbns_answer(tvb, cur_off, nbns_data_offset,
- fd, qatree, opcode);
+ cinfo, qatree, opcode);
if (add_off <= 0) {
/* We ran past the end of the captured data in the
packet. */
@@ -980,7 +981,7 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
int nbns_data_offset;
- frame_data *fd;
+ column_info *cinfo;
proto_tree *nbns_tree = NULL;
proto_item *ti;
guint16 id, flags, quest, ans, auth, add;
@@ -988,28 +989,28 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
nbns_data_offset = offset;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NBNS");
- 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, "NBNS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* To do: check for runts, errs, etc. */
id = tvb_get_ntohs(tvb, offset + NBNS_ID);
flags = tvb_get_ntohs(tvb, offset + NBNS_FLAGS);
- 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",
val_to_str(flags & F_OPCODE, opcode_vals,
"Unknown operation (%x)"),
(flags & F_RESPONSE) ? " response" : "");
- fd = pinfo->fd;
+ cinfo = pinfo->cinfo;
} else {
- /* Set "fd" to NULL; we pass a NULL "fd" 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)" is more expensive than a check
- that a pointer isn't NULL). */
- fd = NULL;
+ /* 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(cinfo, COL_INFO)" is more expensive than
+ a check that a pointer isn't NULL). */
+ cinfo = NULL;
}
if (tree) {
@@ -1060,7 +1061,7 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
answers. */
cur_off += dissect_query_records(tvb, cur_off,
nbns_data_offset, quest,
- (!(flags & F_RESPONSE) ? fd : NULL), nbns_tree);
+ (!(flags & F_RESPONSE) ? cinfo : NULL), nbns_tree);
}
if (ans > 0) {
@@ -1069,7 +1070,7 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
queries. */
cur_off += dissect_answer_records(tvb, cur_off,
nbns_data_offset, ans,
- ((flags & F_RESPONSE) ? fd : NULL), nbns_tree,
+ ((flags & F_RESPONSE) ? cinfo : NULL), nbns_tree,
flags & F_OPCODE, "Answers");
}
@@ -1169,10 +1170,10 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int name_type;
int len;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NBDS");
- 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, "NBDS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
header.msg_type = tvb_get_guint8(tvb, offset);
@@ -1204,8 +1205,8 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_index = 0;
}
- 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(header.msg_type, nbds_msgtype_vals,
"Unknown message type (0x%02X)"));
}
@@ -1515,10 +1516,10 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *nbss_tree;
proto_item *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NBSS");
- 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, "NBSS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
max_data = tvb_length(tvb);
@@ -1663,8 +1664,8 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
- 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,
val_to_str(msg_type, message_types, "Unknown (%02x)"));
}
@@ -1681,8 +1682,8 @@ continuation:
/*
* It looks like a continuation.
*/
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "NBSS Continuation Message");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "NBSS Continuation Message");
if (tree) {
ti = proto_tree_add_item(tree, proto_nbss, tvb, 0,
diff --git a/packet-ncp.c b/packet-ncp.c
index 9bae92463b..af242f8024 100644
--- a/packet-ncp.c
+++ b/packet-ncp.c
@@ -3,7 +3,7 @@
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
- * $Id: packet-ncp.c,v 1.51 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-ncp.c,v 1.52 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -260,10 +260,10 @@ dissect_ncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int commhdr;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NCP");
- 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, "NCP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if ( pinfo->ptype == PT_TCP || pinfo->ptype == PT_UDP ) {
ncpiph.signature = tvb_get_ntohl(tvb, 0);
@@ -320,8 +320,8 @@ dissect_ncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
header.type == 0x7777 ||
header.type == 0x9999 ) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "Type 0x%04x", header.type);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Type 0x%04x", header.type);
}
if (tree) {
diff --git a/packet-ncp2222.inc b/packet-ncp2222.inc
index e61e86e1c7..b97ee7a150 100644
--- a/packet-ncp2222.inc
+++ b/packet-ncp2222.inc
@@ -7,7 +7,7 @@
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-ncp2222.inc,v 1.5 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-ncp2222.inc,v 1.6 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -153,18 +153,18 @@ dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo,
}
/* Fill in the INFO column. */
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (ncp_rec) {
- col_add_fstr(pinfo->fd, COL_INFO, "C %s", ncp_rec->name);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "C %s", ncp_rec->name);
}
else {
if (requires_subfunc) {
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"C Unknown Function 0x%02X/0x%02x (%d %d)",
func, subfunc, func, subfunc);
}
else {
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"C Unknown Function 0x%02x (%d)",
func, func);
}
@@ -280,8 +280,8 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
error_string = "Not OK";
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "R %s", error_string);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "R %s", error_string);
}
if (ncp_tree) {
diff --git a/packet-netbios.c b/packet-netbios.c
index e347207229..1217fb0807 100644
--- a/packet-netbios.c
+++ b/packet-netbios.c
@@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.c,v 1.42 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-netbios.c,v 1.43 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -983,8 +983,8 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 0;
/* load the display labels */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NetBIOS");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "NetBIOS");
/* Find NetBIOS marker EFFF, this is done because I have seen an extra LLC */
@@ -994,8 +994,8 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
++offset;
if ( 0xefff != tvb_get_letohs(tvb, 3)){
- if (check_col( pinfo->fd, COL_INFO)) /* print bad packet */
- col_set_str( pinfo->fd, COL_INFO, "Bad packet, no 0xEFFF marker");
+ if (check_col( pinfo->cinfo, COL_INFO)) /* print bad packet */
+ col_set_str( pinfo->cinfo, COL_INFO, "Bad packet, no 0xEFFF marker");
return; /* this is an unknow packet, no marker */
}
@@ -1007,11 +1007,11 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* limit command so no table overflows */
command = MIN( command, sizeof( dissect_netb)/ sizeof(void *));
- if (check_col( pinfo->fd, COL_INFO)) { /* print command name */
+ if (check_col( pinfo->cinfo, COL_INFO)) { /* print command name */
switch ( command ) {
case NB_NAME_QUERY:
name_type = get_netbios_name( tvb, offset + 12, name);
- col_add_fstr( pinfo->fd, COL_INFO, "%s for %s<%02x>",
+ col_add_fstr( pinfo->cinfo, COL_INFO, "%s for %s<%02x>",
CommandName[ command], name, name_type);
break;
@@ -1019,12 +1019,12 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case NB_ADD_NAME:
case NB_ADD_GROUP:
name_type = get_netbios_name( tvb, offset + 28, name);
- col_add_fstr( pinfo->fd, COL_INFO, "%s - %s<%02x>",
+ col_add_fstr( pinfo->cinfo, COL_INFO, "%s - %s<%02x>",
CommandName[ command], name, name_type);
break;
default:
- col_add_fstr( pinfo->fd, COL_INFO, "%s", CommandName[ command]);
+ col_add_fstr( pinfo->cinfo, COL_INFO, "%s", CommandName[ command]);
break;
}
}
diff --git a/packet-nntp.c b/packet-nntp.c
index 50284707dc..5de375d78f 100644
--- a/packet-nntp.c
+++ b/packet-nntp.c
@@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-nntp.c,v 1.21 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-nntp.c,v 1.22 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -65,10 +65,10 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
type = "Response";
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NNTP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "NNTP");
- 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).
@@ -78,7 +78,7 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* "tvb_get_ptr()" call won't throw an exception.
*/
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset);
- col_add_fstr(pinfo->fd, COL_INFO, "%s: %s", type,
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", type,
tvb_format_text(tvb, offset, linelen));
}
diff --git a/packet-ntp.c b/packet-ntp.c
index 6751d5a5e2..69b33f4ae5 100644
--- a/packet-ntp.c
+++ b/packet-ntp.c
@@ -2,7 +2,7 @@
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-ntp.c,v 1.31 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-ntp.c,v 1.32 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -272,11 +272,11 @@ dissect_ntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gchar buff[NTP_TS_SIZE];
int i;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NTP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "NTP");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "NTP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "NTP");
if (tree) {
/* Adding NTP item and subtree */
diff --git a/packet-null.c b/packet-null.c
index 2b78444e62..c36d983080 100644
--- a/packet-null.c
+++ b/packet-null.c
@@ -1,7 +1,7 @@
/* packet-null.c
* Routines for null packet disassembly
*
- * $Id: packet-null.c,v 1.50 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-null.c,v 1.51 2001/12/10 00:25:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -235,14 +235,14 @@ dissect_null(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, "Null/Loopback" );
+ 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, "Null/Loopback" );
/*
* Treat it as a normal DLT_NULL header.
diff --git a/packet-osi.c b/packet-osi.c
index 92840d9c96..19ba6144fb 100644
--- a/packet-osi.c
+++ b/packet-osi.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: packet-osi.c,v 1.51 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-osi.c,v 1.52 2001/12/10 00:25:31 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -152,23 +152,23 @@ static void dissect_osi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* ESIS (X.25) is not currently decoded */
case NLPID_ISO9542X25_ESIS:
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ESIS (X.25)");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESIS (X.25)");
}
call_dissector(data_handle,tvb, pinfo, tree);
break;
case NLPID_ISO10747_IDRP:
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "IDRP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "IDRP");
}
call_dissector(data_handle,tvb, pinfo, tree);
break;
default:
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ISO");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISO");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "Unknown ISO protocol (%02x)", nlpid);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ISO protocol (%02x)", nlpid);
}
call_dissector(data_handle,tvb, pinfo, tree);
break;
diff --git a/packet-ospf.c b/packet-ospf.c
index b393ff4d66..f5cc57eee2 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.52 2001/12/05 20:16:41 guy Exp $
+ * $Id: packet-ospf.c,v 1.53 2001/12/10 00:25:31 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -251,10 +251,10 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 areaid;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "OSPF");
- 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, "OSPF");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
version = tvb_get_guint8(tvb, 0);
switch (version) {
@@ -270,8 +270,8 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
packet_type = tvb_get_guint8(tvb, 1);
- 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(packet_type, pt_vals, "Unknown (%u)"));
}
diff --git a/packet-pgm.c b/packet-pgm.c
index 5b642e6889..85e0b2ab04 100644
--- a/packet-pgm.c
+++ b/packet-pgm.c
@@ -1,7 +1,7 @@
/* packet-pgm.c
* Routines for pgm packet disassembly
*
- * $Id: packet-pgm.c,v 1.11 2001/12/08 06:41:41 guy Exp $
+ * $Id: packet-pgm.c,v 1.12 2001/12/10 00:25:31 guy Exp $
*
* Copyright (c) 2000 by Talarian Corp
*
@@ -625,12 +625,12 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *gsi;
int isdata = 0;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "PGM");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "PGM");
/* Clear out the Info column. */
- 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);
tvb_memcpy(tvb, (guint8 *)&pgmhdr, offset, sizeof(pgm_type));
hlen = sizeof(pgm_type);
@@ -646,8 +646,8 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
plen = sizeof(pgm_spm_t);
tvb_memcpy(tvb, (guint8 *)&spm, sizeof(pgm_type), plen);
spm_ntoh(&spm);
- 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,
"%-5s sqn 0x%x gsi %s", pktname, spm.sqn, gsi);
}
break;
@@ -657,8 +657,8 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
plen = sizeof(pgm_data_t);
tvb_memcpy(tvb, (guint8 *)&data, sizeof(pgm_type), plen);
data_ntoh(&data);
- 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,
"%-5s sqn 0x%x gsi %s tsdulen %d", pktname, data.sqn, gsi,
pgmhdr.tsdulen);
}
@@ -671,8 +671,8 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
plen = sizeof(pgm_nak_t);
tvb_memcpy(tvb, (guint8 *)&nak, sizeof(pgm_type), plen);
nak_ntoh(&nak);
- 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,
"%-5s sqn 0x%x gsi %s", pktname, nak.sqn, gsi);
}
break;
@@ -680,8 +680,8 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
plen = sizeof(pgm_ack_t);
tvb_memcpy(tvb, (guint8 *)&ack, sizeof(pgm_type), plen);
ack_ntoh(&ack);
- 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,
"%-5s sqn 0x%x gsi %s", pktname, ack.rx_max_sqn, gsi);
}
break;
diff --git a/packet-pim.c b/packet-pim.c
index 750cdeb16b..3758fbb7e4 100644
--- a/packet-pim.c
+++ b/packet-pim.c
@@ -2,7 +2,7 @@
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-pim.c,v 1.35 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-pim.c,v 1.36 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -129,10 +129,10 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return offset+tvb_length_remaining(tvb, offset);
}
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "PIMv1");
- 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, "PIMv1");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_pim, tvb, offset,
@@ -146,8 +146,8 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 1;
pim_type = tvb_get_guint8(tvb, offset);
- 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(pim_type, type1vals, "Unknown (%u)"));
if (tree) {
@@ -185,7 +185,7 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* this register will overwrite the PIM info in the columns.
*/
pim_length = 8;
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
} else {
/*
* Other message - checksum the entire packet.
@@ -625,10 +625,10 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *pimopt_tree = NULL;
proto_item *tiopt;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "PIM");
- 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, "PIM");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
pim_typever = tvb_get_guint8(tvb, 0);
@@ -642,12 +642,12 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
break;
}
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_add_fstr(pinfo->fd, COL_PROTOCOL, "PIMv%d",
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "PIMv%d",
PIM_VER(pim_typever));
}
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, typestr);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, typestr);
if (tree) {
ti = proto_tree_add_item(tree, proto_pim, tvb, offset,
@@ -675,7 +675,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
* this register will overwrite the PIM info in the columns.
*/
pim_length = 8;
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
} else {
/*
* Other message - checksum the entire packet.
diff --git a/packet-pop.c b/packet-pop.c
index 737cf1a784..f27a77e142 100644
--- a/packet-pop.c
+++ b/packet-pop.c
@@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-pop.c,v 1.27 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-pop.c,v 1.28 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -70,8 +70,8 @@ dissect_pop(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, "POP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "POP");
/*
* Find the end of the first line.
@@ -91,7 +91,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
is_continuation = response_is_continuation(line);
}
- 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 a POP request or reply (but leave out the
@@ -99,9 +99,9 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Otherwise, just call it a continuation.
*/
if (is_continuation)
- col_set_str(pinfo->fd, COL_INFO, "Continuation");
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
else
- 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));
}
diff --git a/packet-portmap.c b/packet-portmap.c
index 4cfe351972..286d3d8f14 100644
--- a/packet-portmap.c
+++ b/packet-portmap.c
@@ -1,7 +1,7 @@
/* packet-portmap.c
* Routines for portmap dissection
*
- * $Id: packet-portmap.c,v 1.31 2001/06/18 02:17:50 guy Exp $
+ * $Id: packet-portmap.c,v 1.32 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -239,7 +239,7 @@ int dissect_callit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Dissect the arguments for this procedure.
Make the columns non-writable, so the dissector won't change
them out from under us. */
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
offset = dissect_rpc_indir_call(tvb, pinfo, tree, offset,
hf_portmap_args, prog, vers, proc);
@@ -260,7 +260,7 @@ int dissect_callit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Dissect the result of this procedure.
Make the columns non-writable, so the dissector won't change
them out from under us. */
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
offset = dissect_rpc_indir_reply(tvb, pinfo, tree, offset,
hf_portmap_result, hf_portmap_prog, hf_portmap_version,
hf_portmap_proc);
@@ -381,7 +381,7 @@ int dissect_rpcb_rmtcallres(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Dissect the result of this procedure.
Make the columns non-writable, so the dissector won't change
them out from under us. */
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
offset = dissect_rpc_indir_reply(tvb, pinfo, tree, offset,
hf_portmap_result, hf_portmap_prog, hf_portmap_version,
hf_portmap_proc);
diff --git a/packet-ppp.c b/packet-ppp.c
index e6e11ca7f6..3a21f0fe11 100644
--- a/packet-ppp.c
+++ b/packet-ppp.c
@@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
- * $Id: packet-ppp.c,v 1.80 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-ppp.c,v 1.81 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -493,44 +493,44 @@ static const value_string lzsdcp_processmode_vals[] = {
#define CI_SDL_ON_SONET_SDH 29 /* Simple Data Link on SONET/SDH */
static void dissect_lcp_mru_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_lcp_protocol_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_lcp_magicnumber_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_numbered_mode_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_self_describing_pad_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_lcp_multilink_mrru_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_bap_link_discriminator_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_lcp_internationalization_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb, int offset, guint length,
- frame_data *fd, proto_tree *tree);
+ packet_info *pinfo, proto_tree *tree);
static void dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static const ip_tcp_opt lcp_opts[] = {
@@ -758,10 +758,10 @@ static const value_string chap_alg_vals[] = {
#define CI_MS_WINS2 132 /* Secondary WINS value (RFC 1877) */
static void dissect_ipcp_addrs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_ipcp_addr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static const ip_tcp_opt ipcp_opts[] = {
@@ -863,15 +863,15 @@ static const ip_tcp_opt ipcp_opts[] = {
#define MPPE_SUPPORTED_BITS_H 0x01000000 /* stateless mode */
static void dissect_ccp_stac_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_ccp_mppc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_ccp_lzsdcp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static const ip_tcp_opt ccp_opts[] = {
@@ -917,11 +917,11 @@ static const ip_tcp_opt ccp_opts[] = {
#define CI_CBCP_CB_ANY 4 /* Callback to any of a list of numbers */
static void dissect_cbcp_no_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_cbcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static const ip_tcp_opt cbcp_opts[] = {
@@ -968,7 +968,7 @@ static const ip_tcp_opt cbcp_opts[] = {
#define CI_BACP_FAVORED_PEER 1 /* Favored-Peer */
static void dissect_bacp_favored_peer_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static const ip_tcp_opt bacp_opts[] = {
@@ -995,23 +995,23 @@ static const ip_tcp_opt bacp_opts[] = {
#define CI_BAP_CALL_STATUS 6 /* Call Status */
static void dissect_bap_link_type_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_bap_phone_delta_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_bap_link_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_bap_reason_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static void dissect_bap_call_status_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree);
static const ip_tcp_opt bap_opts[] = {
@@ -1276,7 +1276,7 @@ capture_ppp_hdlc( const u_char *pd, int offset, int len, packet_counts *ld ) {
static void
dissect_lcp_mru_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
- guint length, frame_data *fd, proto_tree *tree)
+ guint length, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "MRU: %u",
tvb_get_ntohs(tvb, offset + 2));
@@ -1284,7 +1284,7 @@ dissect_lcp_mru_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
- guint length, frame_data *fd, proto_tree *tree)
+ guint length, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "Async characters to map: 0x%08x",
tvb_get_ntohl(tvb, offset + 2));
@@ -1292,7 +1292,7 @@ dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_lcp_protocol_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
- guint length, frame_data *fd, proto_tree *tree)
+ guint length, packet_info *pinfo, proto_tree *tree)
{
guint16 protocol;
proto_item *tf;
@@ -1315,7 +1315,7 @@ dissect_lcp_protocol_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
- guint length, frame_data *fd, proto_tree *tree)
+ guint length, packet_info *pinfo, proto_tree *tree)
{
guint16 protocol;
guint8 algorithm;
@@ -1349,7 +1349,7 @@ dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_lcp_magicnumber_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "Magic number: 0x%08x",
@@ -1358,7 +1358,7 @@ dissect_lcp_magicnumber_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1383,7 +1383,7 @@ dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_lcp_self_describing_pad_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length,
@@ -1393,7 +1393,7 @@ dissect_lcp_self_describing_pad_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_lcp_numbered_mode_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1426,7 +1426,7 @@ static const value_string callback_op_vals[] = {
static void
dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
- guint length, frame_data *fd, proto_tree *tree)
+ guint length, packet_info *pinfo, proto_tree *tree)
{
proto_item *tf;
proto_tree *field_tree = NULL;
@@ -1450,7 +1450,7 @@ dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_lcp_multilink_mrru_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "Multilink MRRU: %u",
@@ -1476,7 +1476,7 @@ static const value_string multilink_ep_disc_class_vals[] = {
static void
dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1573,7 +1573,7 @@ dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_lcp_bap_link_discriminator_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length,
@@ -1589,7 +1589,7 @@ static const value_string charset_num_vals[] = {
static void
dissect_lcp_internationalization_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1616,7 +1616,7 @@ dissect_lcp_internationalization_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_ipcp_addrs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1638,7 +1638,7 @@ dissect_ipcp_addrs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
}
static void dissect_ipcp_addr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "%s: %s", optp->name,
@@ -1647,7 +1647,7 @@ static void dissect_ipcp_addr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_ccp_stac_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1672,7 +1672,7 @@ dissect_ccp_stac_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_ccp_mppc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1705,7 +1705,7 @@ dissect_ccp_mppc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_ccp_lzsdcp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1726,7 +1726,7 @@ dissect_ccp_lzsdcp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_cbcp_no_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
@@ -1734,7 +1734,7 @@ dissect_cbcp_no_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_cbcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1769,7 +1769,7 @@ dissect_cbcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bacp_favored_peer_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1782,7 +1782,7 @@ dissect_bacp_favored_peer_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bap_link_type_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1800,7 +1800,7 @@ dissect_bap_link_type_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bap_phone_delta_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *ti;
@@ -1857,7 +1857,7 @@ dissect_bap_phone_delta_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bap_reason_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
guint8 link_type;
@@ -1871,7 +1871,7 @@ dissect_bap_reason_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bap_link_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
guint8 link_type;
@@ -1882,7 +1882,7 @@ dissect_bap_link_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_bap_call_status_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, frame_data *fd,
+ int offset, guint length, packet_info *pinfo,
proto_tree *tree)
{
proto_item *tf;
@@ -1920,12 +1920,12 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
- if(check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(proto_id));
- 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",
proto_get_protocol_short_name(proto_id),
val_to_str(code, proto_vals, "Unknown"));
@@ -1953,7 +1953,7 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
"Options: (%d byte%s)", length, plurality(length, "", "s"));
field_tree = proto_item_add_subtree(tf, options_subtree_index);
dissect_ip_tcp_options(tvb, offset, length, opts, nopts, -1,
- pinfo->fd, field_tree);
+ pinfo, field_tree);
}
}
break;
@@ -2063,10 +2063,10 @@ dissect_ppp_common( tvbuff_t *tvb, int offset, packet_info *pinfo,
/* do lookup with the subdissector table */
if (!dissector_try_port(subdissector_table, ppp_prot, next_tvb, pinfo, tree)) {
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x", ppp_prot);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "PPP %s (0x%04x)",
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", ppp_prot);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PPP %s (0x%04x)",
val_to_str(ppp_prot, ppp_vals, "Unknown"), ppp_prot);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
@@ -2125,12 +2125,12 @@ dissect_bap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
- if(check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(proto_bap));
- 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",
proto_get_protocol_short_name(proto_bap),
val_to_str(type, bap_vals, "Unknown"));
@@ -2162,7 +2162,7 @@ dissect_bap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Data (%d byte%s)", length, plurality(length, "", "s"));
field_tree = proto_item_add_subtree(tf, ett_bap_options);
dissect_ip_tcp_options(tvb, offset, length, bap_opts, N_BAP_OPTS, -1,
- pinfo->fd, field_tree);
+ pinfo, field_tree);
}
}
}
@@ -2173,12 +2173,12 @@ dissect_comp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *comp_data_tree;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(proto_comp_data));
- 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",
proto_get_protocol_short_name(proto_comp_data),
val_to_str(PPP_COMP, ppp_vals, "Unknown"));
@@ -2213,11 +2213,11 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gchar *flag_str;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "PPP MP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP MP");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "PPP Multilink");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "PPP Multilink");
flags = tvb_get_guint8(tvb, 0);
@@ -2307,12 +2307,12 @@ dissect_ppp_hdlc( 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, "PPP" );
+ 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, "PPP" );
if(tree) {
ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, proto_offset, FALSE);
@@ -2374,12 +2374,12 @@ dissect_pap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
- if(check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(proto_pap));
- 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",
proto_get_protocol_short_name(proto_pap),
val_to_str(code, pap_vals, "Unknown"));
@@ -2474,12 +2474,12 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
- if(check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(proto_chap));
- 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",
proto_get_protocol_short_name(proto_chap),
val_to_str(code, chap_vals, "Unknown"));
diff --git a/packet-pppoe.c b/packet-pppoe.c
index f386983321..8500bcae2b 100644
--- a/packet-pppoe.c
+++ b/packet-pppoe.c
@@ -1,7 +1,7 @@
/* packet-pppoe.c
* Routines for PPP Over Ethernet (PPPoE) packet disassembly (RFC2516)
*
- * $Id: packet-pppoe.c,v 1.19 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-pppoe.c,v 1.20 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -162,11 +162,11 @@ dissect_pppoed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *pppoe_tree;
proto_item *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd,COL_PROTOCOL, "PPPoED");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo,COL_PROTOCOL, "PPPoED");
}
- 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);
}
/* Start Decoding Here. */
@@ -175,8 +175,8 @@ dissect_pppoed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
pppoe_type = pppoe_ver_type & 0x0f;
pppoe_code = tvb_get_guint8(tvb, 1);
- if (check_col(pinfo->fd,COL_INFO)) {
- col_add_fstr(pinfo->fd,COL_INFO,pppoecode_to_str(pppoe_code,"Unknown code (0x%02x)"));
+ if (check_col(pinfo->cinfo,COL_INFO)) {
+ col_add_fstr(pinfo->cinfo,COL_INFO,pppoecode_to_str(pppoe_code,"Unknown code (0x%02x)"));
}
pppoe_session_id = tvb_get_ntohs(tvb, 2);
@@ -236,11 +236,11 @@ dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_item *ti;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd,COL_PROTOCOL, "PPPoES");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo,COL_PROTOCOL, "PPPoES");
}
- 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);
}
/* Start Decoding Here. */
@@ -249,8 +249,8 @@ dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
pppoe_type = pppoe_ver_type & 0x0f;
pppoe_code = tvb_get_guint8(tvb, 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,
pppoecode_to_str(pppoe_code,"Unknown code (0x%02x)"));
}
diff --git a/packet-pptp.c b/packet-pptp.c
index de72d43ed5..6aff17465e 100644
--- a/packet-pptp.c
+++ b/packet-pptp.c
@@ -2,7 +2,7 @@
* Routines for the Point-to-Point Tunnelling Protocol (PPTP) (RFC 2637)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-pptp.c,v 1.21 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-pptp.c,v 1.22 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -243,16 +243,16 @@ dissect_pptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 len;
guint16 cntrl_type;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "PPTP");
- 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, "PPTP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
len = tvb_get_ntohs(tvb, offset);
cntrl_type = tvb_get_ntohs(tvb, offset + 8);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "%s", cntrltype2str(cntrl_type));
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s", cntrltype2str(cntrl_type));
if (tree) {
guint32 cookie;
diff --git a/packet-prism.c b/packet-prism.c
index 4fc9885f70..a3ef4907cb 100644
--- a/packet-prism.c
+++ b/packet-prism.c
@@ -9,7 +9,7 @@
*
* By Tim Newsham
*
- * $Id: packet-prism.c,v 1.4 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-prism.c,v 1.5 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -124,16 +124,16 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
int offset;
- if(check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Prism");
- 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, "Prism");
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
offset = 0;
tvb_memcpy(tvb, (guint8 *)&hdr, offset, sizeof hdr);
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Device: %.16s "
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %.16s "
"Message 0x%x, Length %d", hdr.devname,
hdr.msgcode, hdr.msglen);
diff --git a/packet-q2931.c b/packet-q2931.c
index 40948b98cd..a862cec441 100644
--- a/packet-q2931.c
+++ b/packet-q2931.c
@@ -2,7 +2,7 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q2931.c,v 1.19 2001/09/14 07:10:05 guy Exp $
+ * $Id: packet-q2931.c,v 1.20 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1987,8 +1987,8 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int codeset;
gboolean non_locking_shift;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Q.2931");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.2931");
if (tree) {
ti = proto_tree_add_item(tree, proto_q2931, tvb, offset,
@@ -2010,8 +2010,8 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
- 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(message_type, q2931_message_type_vals,
"Unknown message type (0x%02X)"));
}
diff --git a/packet-q931.c b/packet-q931.c
index b126931b10..511216afc7 100644
--- a/packet-q931.c
+++ b/packet-q931.c
@@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.32 2001/09/14 07:10:05 guy Exp $
+ * $Id: packet-q931.c,v 1.33 2001/12/10 00:25:32 guy Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
@@ -2222,8 +2222,8 @@ q931_dissector(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, "Q.931");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.931");
if (tree) {
ti = proto_tree_add_item(tree, proto_q931, tvb, offset,
@@ -2245,8 +2245,8 @@ q931_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
- 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(message_type, q931_message_type_vals,
"Unknown message type (0x%02X)"));
}
diff --git a/packet-qllc.c b/packet-qllc.c
index 6ce6d9f8d9..42b207b40b 100644
--- a/packet-qllc.c
+++ b/packet-qllc.c
@@ -2,7 +2,7 @@
* Routines for QLLC protocol - Qualified? LLC
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-qllc.c,v 1.2 2001/11/15 21:32:18 guy Exp $
+ * $Id: packet-qllc.c,v 1.3 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -85,10 +85,10 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean command = FALSE;
/* Summary information */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "QLLC");
- 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, "QLLC");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
qllc_ti = proto_tree_add_item(tree, proto_qllc, tvb, 0,
@@ -116,8 +116,8 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* a COMMAND or RESPONSE. */
if (ctrl == QRD_QDISC_VALUE) {
if (command) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, QDISC_TEXT);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, QDISC_TEXT);
}
if (tree) {
proto_tree_add_text(qllc_tree, tvb,
@@ -125,8 +125,8 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
else {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, QRD_TEXT);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, QRD_TEXT);
}
if (tree) {
proto_tree_add_text(qllc_tree, tvb,
@@ -142,8 +142,8 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else {
/* Non-ambiguous control field value */
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO,
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO,
val_to_str(ctrl, qllc_control_vals,
"Control Field: 0x%02x (unknown)"));
}
diff --git a/packet-quake.c b/packet-quake.c
index 6ca9d82fec..3e780d8abb 100644
--- a/packet-quake.c
+++ b/packet-quake.c
@@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quake.c,v 1.22 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-quake.c,v 1.23 2001/12/10 00:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -445,8 +445,8 @@ dissect_quake_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
command = tvb_get_guint8(tvb, 0);
direction = (command & 0x80) ? CCREP : CCREQ;
- 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",
val_to_str(command,names_control_command, "%u"),
val_to_str(direction,names_control_direction,"%u"));
}
@@ -520,10 +520,10 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint rest_length;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "QUAKE");
- 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, "QUAKE");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
length = tvb_get_ntohl(tvb, 0);
flags = length & (~NETFLAG_LENGTH_MASK);
@@ -578,8 +578,8 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
sequence = tvb_get_ntohl(tvb, 4);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "seq 0x%x", sequence);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "seq 0x%x", sequence);
}
if (quake_tree) {
proto_tree_add_uint(quake_tree, hf_quake_header_sequence,
diff --git a/packet-quake2.c b/packet-quake2.c
index 2308bccf69..3ec964a8ff 100644
--- a/packet-quake2.c
+++ b/packet-quake2.c
@@ -7,7 +7,7 @@
* http://www.dgs.monash.edu.au/~timf/bottim/
* http://www.opt-sci.Arizona.EDU/Pandora/default.asp
*
- * $Id: packet-quake2.c,v 1.6 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-quake2.c,v 1.7 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -273,10 +273,10 @@ dissect_quake2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
direction = (pinfo->destport == gbl_quake2ServerPort) ?
DIR_C2S : DIR_S2C;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "QUAKE2");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, val_to_str(direction,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "QUAKE2");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(direction,
names_direction, "%u"));
if (tree) {
@@ -296,8 +296,8 @@ dissect_quake2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (tvb_get_ntohl(tvb, 0) == 0xffffffff) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, " Connectionless");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, " Connectionless");
}
if (quake2_tree)
proto_tree_add_uint_format(quake2_tree,
@@ -308,8 +308,8 @@ dissect_quake2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, pinfo, quake2_tree, direction);
}
else {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, " Game");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, " Game");
}
if (quake2_tree)
proto_tree_add_uint_format(quake2_tree,
diff --git a/packet-quake3.c b/packet-quake3.c
index df632b131f..1e6adecb26 100644
--- a/packet-quake3.c
+++ b/packet-quake3.c
@@ -3,7 +3,7 @@
*
* Uwe Girlich <uwe@planetquake.com>
*
- * $Id: packet-quake3.c,v 1.7 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-quake3.c,v 1.8 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -495,8 +495,8 @@ dissect_quake3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
direction = DIR_UNKNOWN;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "QUAKE3");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "QUAKE3");
if (tree) {
quake3_item = proto_tree_add_item(tree, proto_quake3,
@@ -516,8 +516,8 @@ dissect_quake3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (tvb_get_ntohl(tvb, 0) == 0xffffffff) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, "Connectionless ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "Connectionless ");
}
if (quake3_tree)
proto_tree_add_uint_format(quake3_tree,
@@ -528,8 +528,8 @@ dissect_quake3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, pinfo, quake3_tree, &direction);
}
else {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, "Game ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "Game ");
}
if (quake3_tree)
proto_tree_add_uint_format(quake3_tree,
@@ -545,8 +545,8 @@ dissect_quake3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
val_to_str(direction,
names_direction, "%u"));
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, val_to_str(direction,
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(direction,
names_direction, "%u"));
}
diff --git a/packet-quakeworld.c b/packet-quakeworld.c
index f5a6acfebe..850d3ae2f7 100644
--- a/packet-quakeworld.c
+++ b/packet-quakeworld.c
@@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quakeworld.c,v 1.8 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-quakeworld.c,v 1.9 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -560,8 +560,8 @@ dissect_quakeworld_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo,
}
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, " %s", command);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", command);
}
if (text_tree && !command_finished) {
@@ -723,10 +723,10 @@ dissect_quakeworld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
direction = (pinfo->destport == gbl_quakeworldServerPort) ?
DIR_C2S : DIR_S2C;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "QUAKEWORLD");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, val_to_str(direction,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "QUAKEWORLD");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(direction,
names_direction, "%u"));
if (tree) {
@@ -746,8 +746,8 @@ dissect_quakeworld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (tvb_get_ntohl(tvb, 0) == 0xffffffff) {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, " Connectionless");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, " Connectionless");
}
if (quakeworld_tree)
proto_tree_add_uint_format(quakeworld_tree,
@@ -758,8 +758,8 @@ dissect_quakeworld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, pinfo, quakeworld_tree, direction);
}
else {
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, " Game");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, " Game");
}
if (quakeworld_tree)
proto_tree_add_uint_format(quakeworld_tree,
diff --git a/packet-radius.c b/packet-radius.c
index 9f1997488f..8e89947d80 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -2,7 +2,7 @@
* Routines for RADIUS packet disassembly
* Copyright 1999 Johan Feyaerts
*
- * $Id: packet-radius.c,v 1.39 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-radius.c,v 1.40 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -891,10 +891,10 @@ static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gchar *codestrval;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RADIUS");
- 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, "RADIUS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb,(guint8 *)&rh,0,sizeof(e_radiushdr));
@@ -906,9 +906,9 @@ static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
codestrval="Unknown Packet";
}
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_add_fstr(pinfo->fd,COL_INFO,"%s(%d) (id=%d, l=%d)",
+ col_add_fstr(pinfo->cinfo,COL_INFO,"%s(%d) (id=%d, l=%d)",
codestrval, rhcode, rhident, rhlength);
}
diff --git a/packet-ranap.c b/packet-ranap.c
index 1d21bc040e..1766e45166 100644
--- a/packet-ranap.c
+++ b/packet-ranap.c
@@ -3,7 +3,7 @@
* Based on 3GPP TS 25.413 V3.4.0
* Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
*
- * $Id: packet-ranap.c,v 1.8 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-ranap.c,v 1.9 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3996,8 +3996,8 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RANAP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
/* extract header fields which are needed even if no tree exists */
@@ -4008,7 +4008,7 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* extended choice */
/* decoding is not supported */
- col_append_str(pinfo->fd, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
+ col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
return;
}
@@ -4022,14 +4022,14 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tmp_offset += 1;
/* add Procedure Code to Info Column */
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
if (procedure_code <= PC_max)
{
- col_append_str(pinfo->fd, COL_INFO,
+ col_append_str(pinfo->cinfo, COL_INFO,
val_to_str(pdu_index, ranap_message_names[procedure_code],
"unknown message"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
}
}
diff --git a/packet-raw.c b/packet-raw.c
index 0fd4047748..993b3de060 100644
--- a/packet-raw.c
+++ b/packet-raw.c
@@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.28 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-raw.c,v 1.29 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -88,14 +88,14 @@ dissect_raw(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, "Raw packet data" );
+ 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, "Raw packet data" );
/* populate a tree in the second pane with the status of the link
layer (ie none) */
diff --git a/packet-rip.c b/packet-rip.c
index 42a0c24c3a..79fc1e4c4c 100644
--- a/packet-rip.c
+++ b/packet-rip.c
@@ -2,7 +2,7 @@
* Routines for RIPv1 and RIPv2 packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-rip.c,v 1.27 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-rip.c,v 1.28 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -96,19 +96,19 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 version;
guint16 family;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RIP");
- 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, "RIP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
command = tvb_get_guint8(tvb, 0);
version = tvb_get_guint8(tvb, 1);
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL,
val_to_str(version, version_vals, "RIP"));
- 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(command, command_vals, "Unknown command (%u)"));
if (tree) {
diff --git a/packet-ripng.c b/packet-ripng.c
index 51431ae469..0baba5b6c4 100644
--- a/packet-ripng.c
+++ b/packet-ripng.c
@@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
- * $Id: packet-ripng.c,v 1.22 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-ripng.c,v 1.23 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -67,18 +67,18 @@ dissect_ripng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *subtree = NULL;
proto_item *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RIPng");
- 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, "RIPng");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* avoid alignment problem */
tvb_memcpy(tvb, (guint8 *)&rip6, offset, sizeof(rip6));
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_fstr(pinfo->fd, COL_PROTOCOL, "RIPng version %u", rip6.rip6_vers);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "RIPng version %u", rip6.rip6_vers);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(rip6.rip6_cmd, cmdvals, "Unknown command (%u)"));
if (tree) {
diff --git a/packet-rlogin.c b/packet-rlogin.c
index 7049d80fe8..0073623c00 100644
--- a/packet-rlogin.c
+++ b/packet-rlogin.c
@@ -2,7 +2,7 @@
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-rlogin.c,v 1.23 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-rlogin.c,v 1.24 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -171,8 +171,8 @@ rlogin_state_machine( rlogin_hash_entry_t *hash_info, tvbuff_t *tvb,
tvb_memcpy(tvb, (guint8 *)hash_info->name, 0, stringlen);
hash_info->name[stringlen] = '\0';
- if (check_col(pinfo->fd, COL_INFO)) /* update summary */
- col_append_str(pinfo->fd, COL_INFO,
+ if (check_col(pinfo->cinfo, COL_INFO)) /* update summary */
+ col_append_str(pinfo->cinfo, COL_INFO,
", User information");
}
}
@@ -365,14 +365,14 @@ dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hash_info);
}
- if (check_col(pinfo->fd, COL_PROTOCOL)) /* update protocol */
- col_set_str(pinfo->fd, COL_PROTOCOL, "Rlogin");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) /* update protocol */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Rlogin");
- if (check_col(pinfo->fd, COL_INFO)){ /* display packet info*/
+ if (check_col(pinfo->cinfo, COL_INFO)){ /* display packet info*/
char temp[1000];
- col_clear(pinfo->fd, COL_INFO);
+ col_clear(pinfo->cinfo, COL_INFO);
if ( hash_info->name[0]) {
strcpy( temp, "User name: ");
strcat( temp, hash_info->name);
@@ -411,7 +411,7 @@ dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
- col_add_str(pinfo->fd, COL_INFO, temp);
+ col_add_str(pinfo->cinfo, COL_INFO, temp);
}
rlogin_state_machine( hash_info, tvb, pinfo);
diff --git a/packet-rpc.c b/packet-rpc.c
index fe79535c2d..2f95331849 100644
--- a/packet-rpc.c
+++ b/packet-rpc.c
@@ -2,7 +2,7 @@
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-rpc.c,v 1.76 2001/11/27 07:13:26 guy Exp $
+ * $Id: packet-rpc.c,v 1.77 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1372,10 +1372,10 @@ dissect_rpc_continuation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *rpc_item;
proto_tree *rpc_tree;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RPC");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Continuation");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RPC");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
if (tree) {
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0,
@@ -1528,10 +1528,10 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
return FALSE;
}
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RPC");
- 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, "RPC");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0,
@@ -1585,10 +1585,10 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
"Program: %s (%u)", progname, prog);
}
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
/* Set the protocol name to the underlying
program name. */
- col_set_str(pinfo->fd, COL_PROTOCOL, progname);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, progname);
}
vers = tvb_get_ntohl(tvb, offset+8);
@@ -1623,8 +1623,8 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
"Procedure: %s (%u)", procname, proc);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO,"V%u %s %s XID 0x%x",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,"V%u %s %s XID 0x%x",
vers,
procname,
msg_type_name,
@@ -1728,8 +1728,8 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (pinfo->fd->num != rpc_call->req_num) {
/* No, so it's a duplicate request.
Mark it as such. */
- 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,
" dup XID 0x%x", xid);
if (rpc_tree) {
proto_tree_add_uint_hidden(rpc_tree,
@@ -1816,15 +1816,15 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
ett = rpc_prog->ett;
progname = rpc_prog->progname;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
/* Set the protocol name to the underlying
program name. */
- col_set_str(pinfo->fd, COL_PROTOCOL, progname);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, progname);
}
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO,"V%u %s %s XID 0x%x",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,"V%u %s %s XID 0x%x",
vers,
procname,
msg_type_name,
@@ -1853,8 +1853,8 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (rpc_call->rep_num != pinfo->fd->num) {
/* No, so it's a duplicate reply.
Mark it as such. */
- 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,
" dup XID 0x%x", xid);
if (rpc_tree) {
proto_tree_add_uint_hidden(rpc_tree,
diff --git a/packet-rsh.c b/packet-rsh.c
index 428793b73a..16169402c1 100644
--- a/packet-rsh.c
+++ b/packet-rsh.c
@@ -4,7 +4,7 @@
* Robert Tsai <rtsai@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rsh.c,v 1.13 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-rsh.c,v 1.14 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -53,9 +53,9 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint next_offset;
int linelen;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RSH");
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSH");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/* Put the first line from the buffer into the summary. */
tvb_find_line_end(tvb, offset, -1, &next_offset);
linelen = next_offset - offset; /* include the line terminator */
@@ -67,7 +67,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (linelen > (int) tvb_length(tvb))
linelen = tvb_length(tvb);
- col_add_str(pinfo->fd, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
tvb_format_text(tvb, offset, linelen));
}
if (tree) {
diff --git a/packet-rsvp.c b/packet-rsvp.c
index 77fb185481..a79dba9d3f 100644
--- a/packet-rsvp.c
+++ b/packet-rsvp.c
@@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-rsvp.c,v 1.48 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-rsvp.c,v 1.49 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -665,15 +665,15 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset2;
char *objtype;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RSVP");
- 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, "RSVP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
ver_flags = tvb_get_guint8(tvb, offset+0);
message_type = tvb_get_guint8(tvb, offset+1);
- 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(message_type, message_type_vals, "Unknown (%u)"));
}
diff --git a/packet-rtcp.c b/packet-rtcp.c
index 685793625c..1f8770e452 100644
--- a/packet-rtcp.c
+++ b/packet-rtcp.c
@@ -1,6 +1,6 @@
/* packet-rtcp.c
*
- * $Id: packet-rtcp.c,v 1.26 2001/12/03 08:47:27 guy Exp $
+ * $Id: packet-rtcp.c,v 1.27 2001/12/10 00:25:33 guy Exp $
*
* Routines for RTCP dissection
* RTCP = Real-time Transport Control Protocol
@@ -635,37 +635,37 @@ dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
unsigned int offset = 0;
guint16 packet_length = 0;
- if ( check_col( pinfo->fd, COL_PROTOCOL ) ) {
- col_set_str( pinfo->fd, COL_PROTOCOL, "RTCP" );
+ if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
+ col_set_str( pinfo->cinfo, COL_PROTOCOL, "RTCP" );
}
- if ( check_col( pinfo->fd, COL_INFO) ) {
+ if ( check_col( pinfo->cinfo, COL_INFO) ) {
/* The second octet contains the packet type */
/* switch ( pd[ offset + 1 ] ) { */
switch ( tvb_get_guint8( tvb, 1 ) ) {
case RTCP_SR:
- col_set_str( pinfo->fd, COL_INFO, "Sender Report");
+ col_set_str( pinfo->cinfo, COL_INFO, "Sender Report");
break;
case RTCP_RR:
- col_set_str( pinfo->fd, COL_INFO, "Receiver Report");
+ col_set_str( pinfo->cinfo, COL_INFO, "Receiver Report");
break;
case RTCP_SDES:
- col_set_str( pinfo->fd, COL_INFO, "Source Description");
+ col_set_str( pinfo->cinfo, COL_INFO, "Source Description");
break;
case RTCP_BYE:
- col_set_str( pinfo->fd, COL_INFO, "Goodbye");
+ col_set_str( pinfo->cinfo, COL_INFO, "Goodbye");
break;
case RTCP_APP:
- col_set_str( pinfo->fd, COL_INFO, "Application defined");
+ col_set_str( pinfo->cinfo, COL_INFO, "Application defined");
break;
case RTCP_FIR:
- col_set_str( pinfo->fd, COL_INFO, "Full Intra-frame Request (H.261)");
+ col_set_str( pinfo->cinfo, COL_INFO, "Full Intra-frame Request (H.261)");
break;
case RTCP_NACK:
- col_set_str( pinfo->fd, COL_INFO, "Negative Acknowledgement (H.261)");
+ col_set_str( pinfo->cinfo, COL_INFO, "Negative Acknowledgement (H.261)");
break;
default:
- col_set_str( pinfo->fd, COL_INFO, "Unknown packet type");
+ col_set_str( pinfo->cinfo, COL_INFO, "Unknown packet type");
break;
}
}
diff --git a/packet-rtp.c b/packet-rtp.c
index cdd3d5f368..d04e3e38de 100644
--- a/packet-rtp.c
+++ b/packet-rtp.c
@@ -6,7 +6,7 @@
* Copyright 2000, Philips Electronics N.V.
* Written by Andreas Sikkema <andreas.sikkema@philips.com>
*
- * $Id: packet-rtp.c,v 1.30 2001/12/03 08:47:27 guy Exp $
+ * $Id: packet-rtp.c,v 1.31 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -355,12 +355,12 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
/*
* Unknown or unsupported version.
*/
- if ( check_col( pinfo->fd, COL_PROTOCOL ) ) {
- col_set_str( pinfo->fd, COL_PROTOCOL, "RTP" );
+ if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
+ col_set_str( pinfo->cinfo, COL_PROTOCOL, "RTP" );
}
- 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 RTP version %u", version);
}
@@ -388,12 +388,12 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
timestamp = tvb_get_ntohl( tvb, offset + 4 );
sync_src = tvb_get_ntohl( tvb, offset + 8 );
- if ( check_col( pinfo->fd, COL_PROTOCOL ) ) {
- col_set_str( pinfo->fd, COL_PROTOCOL, "RTP" );
+ if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
+ col_set_str( pinfo->cinfo, COL_PROTOCOL, "RTP" );
}
- 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,
"Payload type=%s, SSRC=%u, Seq=%u, Time=%u%s",
val_to_str( payload_type, rtp_payload_type_vals,
"Unknown (%u)" ),
diff --git a/packet-rtsp.c b/packet-rtsp.c
index 20425bfa23..be90c99e1d 100644
--- a/packet-rtsp.c
+++ b/packet-rtsp.c
@@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rtsp.c,v 1.44 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-rtsp.c,v 1.45 2001/12/10 00:25:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -106,8 +106,8 @@ dissect_rtspinterleaved(tvbuff_t *tvb, int offset, packet_info *pinfo,
rf_chan = tvb_get_guint8(tvb, offset+1);
rf_len = tvb_get_ntohs(tvb, offset+2);
- 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,
"Interleaved channel 0x%02x, %u bytes",
rf_chan, rf_len);
@@ -418,7 +418,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
rtsp_tree = proto_item_add_subtree(ti, ett_rtsp);
}
- 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 RTSP request or reply (but leave out the
@@ -431,12 +431,12 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
case RTSP_REQUEST:
case RTSP_REPLY:
- col_add_str(pinfo->fd, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
format_text(line, linelen));
break;
default:
- col_set_str(pinfo->fd, COL_INFO, "Continuation");
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
break;
}
}
@@ -764,10 +764,10 @@ dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 0;
int len;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RTSP");
- 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, "RTSP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
while (tvb_offset_exists(tvb, offset)) {
len = (tvb_get_guint8(tvb, offset) == RTSP_FRAMEHDR)
@@ -782,7 +782,7 @@ dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* first RTSP message; make the columns non-writable,
* so that we don't change it for subsequent RTSP messages.
*/
- col_set_writable(pinfo->fd, FALSE);
+ col_set_writable(pinfo->cinfo, FALSE);
}
}
diff --git a/packet-rx.c b/packet-rx.c
index 9ea2e5aa94..3c16782e3d 100644
--- a/packet-rx.c
+++ b/packet-rx.c
@@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.28 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-rx.c,v 1.29 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -205,8 +205,8 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
guint32 version, tl;
int old_offset=offset;
- 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,
"RESPONSE "
"Seq: %lu "
"Call: %lu "
@@ -260,8 +260,8 @@ dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
guint32 version;
int old_offset=offset;
- 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,
"CHALLENGE "
"Seq: %lu "
"Call: %lu "
@@ -302,8 +302,8 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
guint8 num;
int old_offset = offset;
- 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,
"ACK "
"Seq: %lu "
"Call: %lu "
@@ -433,10 +433,10 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint32 seq, callnumber;
guint16 serviceid;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RX");
- 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, "RX");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
item = proto_tree_add_protocol_format(parent_tree, proto_rx, tvb,
offset, 28, "RX Protocol");
@@ -520,8 +520,8 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case RX_PACKET_TYPE_ACKALL:
/* does not contain any payload */
- 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,
"ACKALL "
"Seq: %lu "
"Call: %lu "
diff --git a/packet-sap.c b/packet-sap.c
index dfc3a14c46..530474013e 100644
--- a/packet-sap.c
+++ b/packet-sap.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-sap.c,v 1.24 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-sap.c,v 1.25 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -142,10 +142,10 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *si, *sif;
proto_tree *sap_tree, *sap_flags_tree;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SAP");
- 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, "SAP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
vers_flags = tvb_get_guint8(tvb, offset);
is_ipv6 = vers_flags&MCAST_SAP_BIT_A;
@@ -156,8 +156,8 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sap_version = (vers_flags&MCAST_SAP_VERSION_MASK)>>MCAST_SAP_VERSION_SHIFT;
addr_len = (is_ipv6) ? sizeof(struct e_in6_addr) : 4;
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s (v%u)",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s (v%u)",
(is_del) ? "Deletion" : "Announcement", sap_version);
}
diff --git a/packet-sctp.c b/packet-sctp.c
index 2d9a3612ae..ed8b22078d 100644
--- a/packet-sctp.c
+++ b/packet-sctp.c
@@ -2,7 +2,7 @@
* Routines for Stream Control Transmission Protocol dissection
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-sctp.c,v 1.23 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-sctp.c,v 1.24 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -991,8 +991,8 @@ dissect_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree,
return TRUE;
}
else {
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "DATA ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "DATA ");
proto_tree_add_text(chunk_tree, payload_tvb, 0, payload_length,
"Payload (%u byte%s)",
payload_length, plurality(payload_length, "", "s"));
@@ -1070,11 +1070,11 @@ dissect_init_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
type = tvb_get_guint8(chunk_tvb, CHUNK_TYPE_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (type == SCTP_INIT_CHUNK_ID) {
- col_append_str(pinfo->fd, COL_INFO, "INIT ");
+ col_append_str(pinfo->cinfo, COL_INFO, "INIT ");
} else {
- col_append_str(pinfo->fd, COL_INFO, "INIT_ACK ");
+ col_append_str(pinfo->cinfo, COL_INFO, "INIT_ACK ");
};
};
@@ -1137,8 +1137,8 @@ dissect_sack_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
proto_item *block_item;
proto_tree *block_tree;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "SACK ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "SACK ");
if (chunk_tree) {
cumulative_tsn_ack = tvb_get_ntohl(chunk_tvb, SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
@@ -1211,8 +1211,8 @@ dissect_heartbeat_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tre
tvbuff_t *parameter_tvb;
guint chunk_length, info_length, padding_length, total_length;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "HEARTBEAT ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "HEARTBEAT ");
if (chunk_tree) {
chunk_length = tvb_get_ntohs(chunk_tvb, CHUNK_LENGTH_OFFSET);
@@ -1234,8 +1234,8 @@ dissect_heartbeat_ack_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree
tvbuff_t *parameter_tvb;
guint chunk_length, info_length, padding_length, total_length;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "HEARTBEAT_ACK ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "HEARTBEAT_ACK ");
if (chunk_tree) {
chunk_length = tvb_get_ntohs(chunk_tvb, CHUNK_LENGTH_OFFSET);
@@ -1259,8 +1259,8 @@ dissect_abort_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
guint16 length, padding_length, total_length;
tvbuff_t *cause_tvb;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "ABORT ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "ABORT ");
if (chunk_tree) {
number_of_causes = 0;
@@ -1288,8 +1288,8 @@ dissect_shutdown_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree
{
guint32 cumulative_tsn_ack;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "SHUTDOWN ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "SHUTDOWN ");
if (chunk_tree) {
cumulative_tsn_ack = tvb_get_ntohl(chunk_tvb, SHUTDOWN_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
@@ -1308,8 +1308,8 @@ static void
dissect_shutdown_ack_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *chunk_tree, proto_item *chunk_item, proto_item *flags_item)
{
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "SHUTDOWN_ACK ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "SHUTDOWN_ACK ");
if (chunk_tree) {
proto_item_set_text(chunk_item, "SHUTDOWN ACK chunk");
@@ -1324,8 +1324,8 @@ dissect_error_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
guint16 length, padding_length, total_length;
tvbuff_t *cause_tvb;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "ERROR ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "ERROR ");
if (chunk_tree) {
number_of_causes = 0;
@@ -1357,8 +1357,8 @@ dissect_cookie_echo_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *t
padding_length = nr_of_padding_bytes(length);
cookie_length = length - CHUNK_HEADER_LENGTH;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "COOKIE_ECHO ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "COOKIE_ECHO ");
if (chunk_tree) {
proto_tree_add_text(chunk_tree, chunk_tvb, COOKIE_ECHO_CHUNK_COOKIE_OFFSET, cookie_length,
@@ -1378,8 +1378,8 @@ static void
dissect_cookie_ack_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *chunk_tree, proto_item *chunk_item, proto_item *flags_item)
{
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "COOKIE_ACK ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "COOKIE_ACK ");
if (chunk_tree) {
proto_item_set_text(chunk_item, "COOKIE ACK chunk");
@@ -1392,8 +1392,8 @@ dissect_ecne_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
{
guint32 lowest_tsn;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "ECNE ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "ECNE ");
if (chunk_tree) {
lowest_tsn = tvb_get_ntohl(chunk_tvb, ECNE_CHUNK_LOWEST_TSN_OFFSET);
@@ -1412,8 +1412,8 @@ dissect_cwr_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
{
guint32 lowest_tsn;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "CWR ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "CWR ");
if (chunk_tree) {
lowest_tsn = tvb_get_ntohl(chunk_tvb, CWR_CHUNK_LOWEST_TSN_OFFSET);
@@ -1434,8 +1434,8 @@ dissect_shutdown_complete_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_t
guint16 length;
proto_tree *flag_tree;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "SHUTDOWN_COMPLETE ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "SHUTDOWN_COMPLETE ");
if (chunk_tree) {
flags = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET);
@@ -1456,8 +1456,8 @@ dissect_unknown_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
guint length, chunk_value_length, padding_length;
guint8 type;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "UNKNOWN ");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "UNKNOWN ");
if (chunk_tree) {
length = tvb_get_ntohs(chunk_tvb, CHUNK_LENGTH_OFFSET);
@@ -1641,12 +1641,12 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->destport = destination_port;
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SCTP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SCTP");
/* Clear entries in Info column on summary display */
- 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, "");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
diff --git a/packet-sdp.c b/packet-sdp.c
index b76019c05b..99240dd013 100644
--- a/packet-sdp.c
+++ b/packet-sdp.c
@@ -4,12 +4,11 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sdp.c,v 1.20 2001/01/25 06:14:14 guy Exp $
+ * $Id: packet-sdp.c,v 1.21 2001/12/10 00:25:34 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
@@ -24,8 +23,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *
*/
#include "config.h"
@@ -75,12 +72,12 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* what the protocol inside which the SDP stuff resides
* put there.
*/
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_append_str(pinfo->fd, COL_PROTOCOL, "/SDP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_append_str(pinfo->cinfo, COL_PROTOCOL, "/SDP");
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/* XXX: Needs description. */
- col_append_str(pinfo->fd, COL_INFO, ", with session description");
+ col_append_str(pinfo->cinfo, COL_INFO, ", with session description");
}
if (!tree)
diff --git a/packet-sip.c b/packet-sip.c
index 9a71a1a0b0..04f9395dd9 100644
--- a/packet-sip.c
+++ b/packet-sip.c
@@ -15,7 +15,7 @@
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
* Copyright 2001, Jean-Francois Mule <jfm@clarent.com>
*
- * $Id: packet-sip.c,v 1.19 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-sip.c,v 1.20 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -106,12 +106,12 @@ static void dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tvb_strneql(tvb, 0, SIP2_HDR, SIP2_HDR_LEN) != 0 && ! is_request)
goto bad;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SIP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIP");
- 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_request ? "Request" : "Status",
is_request ?
tvb_format_text(tvb, 0, eol - SIP2_HDR_LEN) :
diff --git a/packet-skinny.c b/packet-skinny.c
index 7665196860..c1969178aa 100644
--- a/packet-skinny.c
+++ b/packet-skinny.c
@@ -7,7 +7,7 @@
* This file is based on packet-aim.c, which is
* Copyright 2000, Ralf Hoelzer <ralf@well.com>
*
- * $Id: packet-skinny.c,v 1.6 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-skinny.c,v 1.7 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -211,11 +211,11 @@ static void dissect_skinny(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, "SKINNY");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, "Skinny Client Control Protocol");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, "Skinny Client Control Protocol");
/* In the interest of speed, if "tree" is NULL, don't do any work not
* necessary to generate protocol tree items. */
@@ -229,8 +229,8 @@ static void dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4, 4, hdr_reserved);
}
messageid_str = val_to_str(data_messageid, message_id, "0x%08X (Unknown)");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_str(pinfo->fd, COL_INFO, messageid_str);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_str(pinfo->cinfo, COL_INFO, messageid_str);
}
if (tree) {
proto_tree_add_uint(skinny_tree, hf_skinny_messageid, tvb,
diff --git a/packet-sll.c b/packet-sll.c
index abb558404c..cf1cd78383 100644
--- a/packet-sll.c
+++ b/packet-sll.c
@@ -1,7 +1,7 @@
/* packet-sll.c
* Routines for disassembly of packets from Linux "cooked mode" captures
*
- * $Id: packet-sll.c,v 1.14 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-sll.c,v 1.15 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -143,15 +143,15 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
proto_tree *fh_tree = NULL;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SLL");
- 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, "SLL");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
pkttype = tvb_get_ntohs(tvb, 0);
- 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(pkttype, packet_type_vals, "Unknown (%u)"));
if (tree) {
diff --git a/packet-smb-browse.c b/packet-smb-browse.c
index b4ae94904f..d33ff94832 100644
--- a/packet-smb-browse.c
+++ b/packet-smb-browse.c
@@ -2,7 +2,7 @@
* Routines for SMB Browser packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-browse.c,v 1.18 2001/11/19 10:23:38 guy Exp $
+ * $Id: packet-smb-browse.c,v 1.19 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -460,10 +460,10 @@ dissect_smb_server_type_flags(tvbuff_t *tvb, packet_info *pinfo,
if (infoflag) {
/* Append the type(s) of the system to the COL_INFO line ... */
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
for (i = 0; i < 32; i++) {
if (flags & (1<<i)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
val_to_str(i, server_types,
"Unknown server type:%d"));
}
@@ -543,18 +543,18 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
pinfo->current_proto = "BROWSER";
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "BROWSER");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "BROWSER");
}
- 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);
}
cmd = tvb_get_guint8(tvb, offset);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/* Put in something, and replace it later */
- col_set_str(pinfo->fd, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
}
@@ -586,8 +586,8 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
/* server name */
tvb_get_nstringz0(tvb, offset, 16, host_name);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, " %s", host_name);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
}
proto_tree_add_string_format(tree, hf_server_name,
tvb, offset, 16,
@@ -770,18 +770,18 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
pinfo->current_proto = "BROWSER";
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "BROWSER");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "BROWSER");
}
- 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);
}
cmd = tvb_get_guint8(tvb, offset);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/* Put in something, and replace it later */
- col_set_str(pinfo->fd, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
}
@@ -827,8 +827,8 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
/* server name */
namelen = tvb_strsize(tvb, offset);
host_name = tvb_get_ptr(tvb, offset, namelen);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, " %s", host_name);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
}
proto_tree_add_item(tree, hf_server_name,
tvb, offset, namelen, TRUE);
diff --git a/packet-smb-logon.c b/packet-smb-logon.c
index 25d1781bff..d3a3e32599 100644
--- a/packet-smb-logon.c
+++ b/packet-smb-logon.c
@@ -2,7 +2,7 @@
* Routines for SMB net logon packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-logon.c,v 1.20 2001/11/19 10:23:38 guy Exp $
+ * $Id: packet-smb-logon.c,v 1.21 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -804,16 +804,16 @@ dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->current_proto = "NETLOGON";
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "NETLOGON");
- 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, "NETLOGON");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* get the Command field */
cmd = tvb_get_guint8(tvb, offset);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, val_to_str(cmd, commands, "Unknown Command:%02x") );
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown Command:%02x") );
if (tree) {
item = proto_tree_add_item(tree, proto_smb_logon, tvb,
diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c
index 7ebdedb8f9..ac6f8bd530 100644
--- a/packet-smb-mailslot.c
+++ b/packet-smb-mailslot.c
@@ -2,7 +2,7 @@
* Routines for SMB mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-mailslot.c,v 1.28 2001/11/28 11:33:54 guy Exp $
+ * $Id: packet-smb-mailslot.c,v 1.29 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -89,18 +89,18 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
}
pinfo->current_proto = "SMB Mailslot";
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "SMB Mailslot");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMB Mailslot");
}
if ((tvb==NULL) || (tvb_reported_length(tvb)==0)) {
/* Interim reply */
- col_set_str(pinfo->fd, COL_INFO, "Interim reply");
+ col_set_str(pinfo->cinfo, COL_INFO, "Interim reply");
return TRUE;
}
- 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);
}
smb_info = pinfo->private_data;
@@ -143,8 +143,8 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
/* do the opcode field */
opcode = tvb_get_letohs(setup_tvb, offset);
- 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, opcode_vals, "Unknown opcode: 0x%04x"));
}
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c
index 66070b13c2..f454179dad 100644
--- a/packet-smb-pipe.c
+++ b/packet-smb-pipe.c
@@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
* Guy Harris 2001
*
- * $Id: packet-smb-pipe.c,v 1.60 2001/12/09 00:07:37 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.61 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1996,8 +1996,8 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
}
pinfo->current_proto = "LANMAN";
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "LANMAN");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LANMAN");
}
if (parent_tree) {
@@ -2009,8 +2009,8 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
if (smb_info->request) { /* this is a request */
/* function code */
cmd = tvb_get_letohs(p_tvb, offset);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s Request", val_to_str(cmd, commands, "Unknown Command:0x%02x"));
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s Request", val_to_str(cmd, commands, "Unknown Command:0x%02x"));
}
proto_tree_add_uint(tree, hf_function_code, p_tvb, offset, 2,
cmd);
@@ -2149,8 +2149,8 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
if( ( (p_tvb==NULL) || (tvb_reported_length(p_tvb)==0) )
&& ( (d_tvb==NULL) || (tvb_reported_length(d_tvb)==0) ) ){
/* command */
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s Interim Response",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s Interim Response",
val_to_str(trp->lanman_cmd, commands, "Unknown Command (0x%02x)"));
}
proto_tree_add_uint(tree, hf_function_code, p_tvb, 0, 0, trp->lanman_cmd);
@@ -2158,8 +2158,8 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
}
/* command */
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s Response",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s Response",
val_to_str(trp->lanman_cmd, commands, "Unknown Command (0x%02x)"));
}
proto_tree_add_uint(tree, hf_function_code, p_tvb, 0, 0,
@@ -2692,11 +2692,11 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
/*
* Set the columns.
*/
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "SMB Pipe");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMB Pipe");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO,
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO,
smb_info->request ? "Request" : "Response");
}
@@ -2731,8 +2731,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
proto_tree_add_uint(pipe_tree, hf_pipe_function, s_tvb,
offset, 2, function);
offset += 2;
- 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",
val_to_str(function, functions, "Unknown function (0x%04x)"),
smb_info->request ? "Request" : "Response");
}
@@ -2791,8 +2791,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
function = tri->function;
proto_tree_add_uint(pipe_tree, hf_pipe_function, NULL,
0, 0, function);
- 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",
val_to_str(function, functions, "Unknown function (0x%04x)"),
smb_info->request ? "Request" : "Response");
}
diff --git a/packet-smb.c b/packet-smb.c
index d888c801ee..daab483c94 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb.c,v 1.184 2001/12/07 05:52:23 guy Exp $
+ * $Id: packet-smb.c,v 1.185 2001/12/10 00:25:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2151,8 +2151,8 @@ dissect_old_dir_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
dn);
COUNT_BYTES(dn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Directory: %s", dn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Directory: %s", dn);
}
END_OF_SMB
@@ -2252,8 +2252,8 @@ dissect_tree_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset, an_len, an);
COUNT_BYTES(an_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", an);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", an);
}
/* buffer format */
@@ -2426,8 +2426,8 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
fn_len, fn, "Old File Name: %s", fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Old Name: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s", fn);
}
/* buffer format */
@@ -2444,8 +2444,8 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
fn_len, fn, "New File Name: %s", fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", New Name: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s", fn);
}
END_OF_SMB
@@ -2520,8 +2520,8 @@ dissect_open_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -2534,8 +2534,8 @@ add_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
int len, guint16 fid)
{
proto_tree_add_uint(tree, hf_smb_fid, tvb, offset, len, fid);
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, ", FID: 0x%04x", fid);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", FID: 0x%04x", fid);
}
static int
@@ -2625,8 +2625,8 @@ dissect_create_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -2685,8 +2685,8 @@ dissect_delete_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -2723,8 +2723,8 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Old Name: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s", fn);
}
/* buffer format */
@@ -2741,8 +2741,8 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", New Name: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s", fn);
}
END_OF_SMB
@@ -2776,8 +2776,8 @@ dissect_query_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -2850,8 +2850,8 @@ dissect_set_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -3116,8 +3116,8 @@ dissect_create_temporary_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -3892,8 +3892,8 @@ dissect_search_dir_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", File: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s", fn);
}
/* buffer format */
@@ -4404,8 +4404,8 @@ dissect_open_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -5148,8 +5148,8 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset, dn_len, dn);
COUNT_BYTES(dn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", User: %s@%s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", User: %s@%s",
an,dn);
}
@@ -5432,8 +5432,8 @@ dissect_tree_connect_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset, an_len, an);
COUNT_BYTES(an_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", an);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", an);
}
/*
@@ -6629,8 +6629,8 @@ dissect_nt_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* primary request */
subcmd = tvb_get_letohs(tvb, offset);
proto_tree_add_uint(tree, hf_smb_nt_trans_subcmd, tvb, offset, 2, subcmd);
- 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(subcmd, nt_cmd_vals, "<unknown>"));
}
ntd.subcmd = subcmd;
@@ -6647,8 +6647,8 @@ dissect_nt_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
} else {
/* secondary request */
- if(check_col(pinfo->fd, COL_INFO)){
- col_append_fstr(pinfo->fd, COL_INFO, " (secondary request)");
+ if(check_col(pinfo->cinfo, COL_INFO)){
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (secondary request)");
}
}
offset += 2;
@@ -7004,15 +7004,15 @@ dissect_nt_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* primary request */
if(nti != NULL){
proto_tree_add_uint(tree, hf_smb_nt_trans_subcmd, tvb, 0, 0, nti->subcmd);
- 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(nti->subcmd, nt_cmd_vals, "<unknown (%u)>"));
}
} else {
proto_tree_add_text(tree, tvb, offset, 0,
"Function: <unknown function - could not find matching request>");
- if(check_col(pinfo->fd, COL_INFO)){
- col_append_fstr(pinfo->fd, COL_INFO, ", <unknown>");
+ if(check_col(pinfo->cinfo, COL_INFO)){
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", <unknown>");
}
}
@@ -7409,8 +7409,8 @@ dissect_nt_create_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
fn);
COUNT_BYTES(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s", fn);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", fn);
}
END_OF_SMB
@@ -7846,8 +7846,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
fn);
}
@@ -7889,8 +7889,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Pattern: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Pattern: %s",
fn);
}
@@ -7933,8 +7933,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Continue: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Continue: %s",
fn);
}
@@ -7970,8 +7970,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
fn);
}
@@ -7997,8 +7997,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Path: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
fn);
}
@@ -8060,8 +8060,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Dir: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Dir: %s",
fn);
}
@@ -8083,8 +8083,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", File: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
fn);
}
@@ -8097,8 +8097,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
fn);
COUNT_BYTES_TRANS(fn_len);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", File: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
fn);
}
@@ -9226,8 +9226,8 @@ dissect_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
subcmd = tvb_get_letohs(tvb, offset);
proto_tree_add_uint(tree, hf_smb_trans2_subcmd,
tvb, offset, 2, subcmd);
- 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(subcmd, trans2_cmd_vals,
"Unknown (0x%02x)"));
}
@@ -9443,8 +9443,8 @@ dissect_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pinfo, tree);
}
} else {
- 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,
"[transact continuation]");
}
}
@@ -9525,8 +9525,8 @@ dissect_4_3_4_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -9610,8 +9610,8 @@ dissect_4_3_4_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -9706,8 +9706,8 @@ dissect_4_3_4_4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -9822,8 +9822,8 @@ dissect_4_3_4_5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -9956,8 +9956,8 @@ dissect_4_3_4_6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -10028,8 +10028,8 @@ dissect_4_3_4_7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fn);
COUNT_BYTES_SUBR(fn_len);
- 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",
fn);
}
@@ -10394,8 +10394,8 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
/* returned data */
count = si->info_count;
- if (count && check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO,
+ if (count && check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
", Files:");
}
@@ -10410,8 +10410,8 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
/* returned data */
count = si->info_count;
- if (count && check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO,
+ if (count && check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
", Files:");
}
@@ -10701,8 +10701,8 @@ dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*/
proto_tree_add_text(tree, tvb, 0, 0,
"Subcommand: <UNKNOWN> since request packet wasn't seen");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, "<unknown>");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "<unknown>");
}
} else {
si->info_level = t2i->info_level;
@@ -10715,13 +10715,13 @@ dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*/
proto_tree_add_text(tree, tvb, 0, 0,
"Subcommand: <UNKNOWN> since transaction code wasn't found in request packet");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, "<unknown>");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "<unknown>");
}
} else {
proto_tree_add_uint(tree, hf_smb_trans2_subcmd, tvb, 0, 0, t2i->subcmd);
- 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(t2i->subcmd,
trans2_cmd_vals,
"<unknown (0x%02x)>"));
@@ -10986,8 +10986,8 @@ dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
if( (p_tvb==0) && (d_tvb==0) ){
- 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,
"[transact continuation]");
}
}
@@ -11313,8 +11313,8 @@ dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, int
proto_tree *cmd_tree;
int (*dissector)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_tree *smb_tree);
- 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",
decode_smb_name(cmd),
(si->request)? "Request" : "Response");
}
@@ -13020,11 +13020,11 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
return FALSE;
}
- if (check_col(pinfo->fd, COL_PROTOCOL)){
- col_set_str(pinfo->fd, COL_PROTOCOL, "SMB");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)){
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMB");
}
- 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);
}
/* start off using the local variable, we will allocate a new one if we
@@ -13371,7 +13371,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
dissect_smb_command(tvb, pinfo, parent_tree, offset, tree, si.cmd);
/* Append error info from this packet to info string. */
- if (!si.request && check_col(pinfo->fd, COL_INFO)) {
+ if (!si.request && check_col(pinfo->cinfo, COL_INFO)) {
if (flags2 & 0x4000) {
/*
* The status is an NT status code; was there
@@ -13382,7 +13382,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
* Yes.
*/
col_append_fstr(
- pinfo->fd, COL_INFO, ", Error: %s",
+ pinfo->cinfo, COL_INFO, ", Error: %s",
val_to_str(nt_status, NT_errors, "%s"));
}
} else {
@@ -13395,7 +13395,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
* Yes.
*/
col_append_fstr(
- pinfo->fd, COL_INFO, ", Error: %s",
+ pinfo->cinfo, COL_INFO, ", Error: %s",
decode_smb_error(errclass, errcode));
}
}
diff --git a/packet-smpp.c b/packet-smpp.c
index 8b1547d4a7..c6e57cce59 100644
--- a/packet-smpp.c
+++ b/packet-smpp.c
@@ -2,7 +2,7 @@
* Routines for Short Message Peer to Peer dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-smpp.c,v 1.2 2001/12/04 06:35:51 guy Exp $
+ * $Id: packet-smpp.c,v 1.3 2001/12/10 00:25:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1355,22 +1355,22 @@ dissect_smpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sequence_number = tvb_get_ntohl(tvb, offset);
offset += 4;
/* 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, "SMPP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMPP");
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_clear(pinfo->fd, COL_INFO);
- col_add_fstr(pinfo->fd, COL_INFO, "SMPP %s",
+ col_clear(pinfo->cinfo, COL_INFO);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "SMPP %s",
val_to_str(command_id,vals_command_id,"unknown operation"));
if (command_id & 0x80000000)
- col_append_fstr(pinfo->fd, COL_INFO, ": \"%s\"",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"",
val_to_str(command_status, vals_command_status,
"reserved error"));
if (command_length > tvb_reported_length(tvb))
- col_append_str(pinfo->fd, COL_INFO, " [short packet]");
+ col_append_str(pinfo->cinfo, COL_INFO, " [short packet]");
if (command_length < tvb_reported_length(tvb))
- col_append_str(pinfo->fd, COL_INFO, " [trailing data]");
+ col_append_str(pinfo->cinfo, COL_INFO, " [trailing data]");
}
/* In the interest of speed, if "tree" is NULL, don't do any work not
diff --git a/packet-smtp.c b/packet-smtp.c
index a242785258..fd443b61f3 100644
--- a/packet-smtp.c
+++ b/packet-smtp.c
@@ -1,7 +1,7 @@
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.22 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-smtp.c,v 1.23 2001/12/10 00:25:36 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -307,10 +307,10 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* fields ...
*/
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SMTP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMTP");
- if (check_col(pinfo->fd, COL_INFO)) { /* Add the appropriate type here */
+ if (check_col(pinfo->cinfo, COL_INFO)) { /* Add the appropriate type here */
/*
* If it is a request, we have to look things up, otherwise, just
@@ -324,18 +324,18 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (frame_data->pdu_type) {
case SMTP_PDU_MESSAGE:
- col_set_str(pinfo->fd, COL_INFO, "Message Body");
+ col_set_str(pinfo->cinfo, COL_INFO, "Message Body");
break;
case SMTP_PDU_EOM:
- col_add_fstr(pinfo->fd, COL_INFO, "EOM: %s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "EOM: %s",
format_text(line, linelen));
break;
case SMTP_PDU_CMD:
- col_add_fstr(pinfo->fd, COL_INFO, "Command: %s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Command: %s",
format_text(line, linelen));
break;
@@ -344,7 +344,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else {
- col_add_fstr(pinfo->fd, COL_INFO, "Response: %s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Response: %s",
format_text(line, linelen));
}
diff --git a/packet-sna.c b/packet-sna.c
index 2535da4a23..9738f4d9b1 100644
--- a/packet-sna.c
+++ b/packet-sna.c
@@ -2,7 +2,7 @@
* Routines for SNA
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-sna.c,v 1.35 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-sna.c,v 1.36 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -328,10 +328,10 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int sna_header_len = 0, th_header_len = 0;
int offset;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SNA");
- 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, "SNA");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* SNA data should be printed in EBCDIC, not ASCII */
pinfo->fd->flags.encoding = CHAR_EBCDIC;
@@ -340,8 +340,8 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
th_fid = hi_nibble(tvb_get_guint8(tvb, 0));
/* Summary information */
- 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(th_fid, sna_th_fid_vals, "Unknown FID: %01x"));
if (tree) {
diff --git a/packet-snmp.c b/packet-snmp.c
index d0b5b7ea46..f5d9503888 100644
--- a/packet-snmp.c
+++ b/packet-snmp.c
@@ -8,7 +8,7 @@
*
* See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u.
*
- * $Id: packet-snmp.c,v 1.75 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-snmp.c,v 1.76 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -554,8 +554,8 @@ dissect_snmp_parse_error(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
}
- 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,
"ERROR: Couldn't parse %s: %s", field_name, errstr);
}
if (tree != NULL) {
@@ -569,8 +569,8 @@ static void
dissect_snmp_error(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char *message)
{
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, message);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, message);
if (tree != NULL) {
proto_tree_add_text(tree, tvb, offset, 0, "%s", message);
@@ -1000,8 +1000,8 @@ dissect_common_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
pdu_type_string = val_to_str(pdu_type, pdu_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(tree, tvb, offset, length,
@@ -1476,8 +1476,8 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
int ret;
guint cls, con, tag;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, proto_name);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, proto_name);
if (tree) {
item = proto_tree_add_item(tree, proto, tvb, offset,
@@ -1766,8 +1766,8 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_text(snmp_tree, tvb, offset, length,
"Encrypted PDU (%d bytes)", length);
g_free(cryptpdu);
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Encrypted PDU");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Encrypted PDU");
return;
}
ret = asn1_sequence_decode(&asn1, &global_length, &length);
@@ -1863,8 +1863,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
int ret;
guint cls, con;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SMUX");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMUX");
if (tree) {
item = proto_tree_add_item(tree, proto, tvb, offset,
@@ -1891,8 +1891,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (cls == ASN1_APL && con == ASN1_CON && pdu_type == SMUX_MSG_OPEN) {
pdu_type_string = val_to_str(pdu_type, smux_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(smux_tree, tvb, offset, length,
@@ -1960,8 +1960,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (cls == ASN1_APL && con == ASN1_PRI && pdu_type == SMUX_MSG_CLOSE) {
pdu_type_string = val_to_str(pdu_type, smux_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(smux_tree, tvb, offset, length,
@@ -1986,8 +1986,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (cls == ASN1_APL && con == ASN1_CON && pdu_type == SMUX_MSG_RREQ) {
pdu_type_string = val_to_str(pdu_type, smux_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(smux_tree, tvb, offset, length,
@@ -2039,8 +2039,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (cls == ASN1_APL && con == ASN1_PRI && pdu_type == SMUX_MSG_RRSP) {
pdu_type_string = val_to_str(pdu_type, smux_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(smux_tree, tvb, offset, length,
@@ -2065,8 +2065,8 @@ dissect_smux_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (cls == ASN1_APL && con == ASN1_PRI && pdu_type == SMUX_MSG_SOUT) {
pdu_type_string = val_to_str(pdu_type, smux_types,
"Unknown PDU type %#x");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, pdu_type_string);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, pdu_type_string);
length = asn1.offset - start;
if (tree) {
proto_tree_add_text(smux_tree, tvb, offset, length,
diff --git a/packet-socks.c b/packet-socks.c
index 60f2670040..446e1d4caf 100644
--- a/packet-socks.c
+++ b/packet-socks.c
@@ -2,7 +2,7 @@
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-socks.c,v 1.31 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-socks.c,v 1.32 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -367,11 +367,11 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
hash_info = conversation_get_proto_data(conversation, proto_socks);
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Socks");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Socks");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Version: 5, UDP Associated packet");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Version: 5, UDP Associated packet");
if ( tree) {
ti = proto_tree_add_protocol_format( tree, proto_socks, tvb, offset,
@@ -637,8 +637,8 @@ state_machine_v4( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
if ( hash_info->state == None) { /* new connection */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Connect to server request");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Connect to server request");
hash_info->state = Connecting; /* change state */
@@ -677,8 +677,8 @@ state_machine_v4( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
/* waiting for V4 user name */
}else if ( hash_info->state == V4UserNameWait){
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Connect Request (User name)");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Connect Request (User name)");
hash_info->v4_user_name_row = get_packet_ptr;
/*XXX may need to check for domain name here */
@@ -693,8 +693,8 @@ state_machine_v4( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
}
else if ( hash_info->state == Connecting){
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Connect Response");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Connect Response");
/* save packet pointer */
hash_info->cmd_reply_row = get_packet_ptr;
@@ -721,8 +721,8 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
if ( hash_info->state == None) {
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Connect to server request");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Connect to server request");
hash_info->state = Connecting; /* change state */
hash_info->connect_row = get_packet_ptr;
@@ -735,8 +735,8 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
guint AuthMethod = tvb_get_guint8(tvb, offset + 1);
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Connect to server response");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Connect to server response");
hash_info->auth_method_row = get_packet_ptr;
@@ -760,8 +760,8 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
hash_info->command = tvb_get_guint8(tvb, offset + 1); /* get command */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, " Command Request - %s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Command Request - %s",
get_command_name(hash_info->command));
hash_info->state = V5Reply;
@@ -782,8 +782,8 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
else if ( hash_info->state == V5Reply) { /* V5 Command Reply */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, " Command Response - %s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Command Response - %s",
get_command_name(hash_info->command));
hash_info->cmd_reply_row = get_packet_ptr;
@@ -812,15 +812,15 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
}
else if ( hash_info->state == V5BindReply) { /* V5 Bind Second Reply */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " Command Response: Bind remote host info");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " Command Response: Bind remote host info");
hash_info->bind_reply_row = get_packet_ptr;
hash_info->state = Done;
}
else if ( hash_info->state == UserNameAuth) { /* Handle V5 User Auth*/
- 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,
" User authentication response");
hash_info->user_name_auth_row = get_packet_ptr;
@@ -829,8 +829,8 @@ state_machine_v5( socks_hash_entry_t *hash_info, tvbuff_t *tvb,
}
else if ( hash_info->state == AuthReply){ /* V5 User Auth reply */
hash_info->cmd_reply_row = get_packet_ptr;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, " User authentication reply");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, " User authentication reply");
hash_info->state = V5Command;
}
}
@@ -849,8 +849,8 @@ display_ping_and_tracert(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/* handle the end command */
if ( pinfo->destport == TCP_PORT_SOCKS){
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, ", Terminate Request");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, ", Terminate Request");
if ( tree)
proto_tree_add_text(tree, tvb, offset, 1,
@@ -859,8 +859,8 @@ display_ping_and_tracert(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
"Traceroute: End command");
}
else{ /* display the PING or Traceroute results */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, ", Results");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, ", Results");
if ( tree){
proto_tree_add_text(tree, tvb, offset,
@@ -960,26 +960,26 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/* display summary window information */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Socks");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Socks");
- if (check_col(pinfo->fd, COL_INFO)){
+ if (check_col(pinfo->cinfo, COL_INFO)){
if (( hash_info->version == 4) || ( hash_info->version == 5)){
- col_add_fstr(pinfo->fd, COL_INFO, "Version: %d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Version: %d",
hash_info->version);
}
else /* unknown version display error */
- col_set_str(pinfo->fd, COL_INFO, "Unknown");
+ col_set_str(pinfo->cinfo, COL_INFO, "Unknown");
if ( hash_info->command == PING_COMMAND)
- col_append_str(pinfo->fd, COL_INFO, ", Ping Req");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Ping Req");
if ( hash_info->command == TRACERT_COMMAND)
- col_append_str(pinfo->fd, COL_INFO, ", Traceroute Req");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Traceroute Req");
/*XXX if ( hash_info->port != -1) */
if ( hash_info->port != 0)
- col_append_fstr(pinfo->fd, COL_INFO, ", Remote Port: %d",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Remote Port: %d",
hash_info->port);
}
diff --git a/packet-srvloc.c b/packet-srvloc.c
index 29ed88833f..6a9abda8c6 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.26 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-srvloc.c,v 1.27 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -230,17 +230,17 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 flags;
guint32 count;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SRVLOC");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SRVLOC");
- 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_guint8(tvb, offset);
function = tvb_get_guint8(tvb, offset + 1);
- 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(function, srvloc_functions, "Unknown Function (%u)"));
if (tree) {
diff --git a/packet-sscop.c b/packet-sscop.c
index 38d5b5152b..3f5066493e 100644
--- a/packet-sscop.c
+++ b/packet-sscop.c
@@ -2,7 +2,7 @@
* Routines for SSCOP (Q.2110, Q.SAAL) frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sscop.c,v 1.16 2001/11/25 22:19:25 hagbard Exp $
+ * $Id: packet-sscop.c,v 1.17 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -149,10 +149,10 @@ dissect_sscop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
reported_length = tvb_reported_length(tvb); /* frame length */
sscop_pdu_type = tvb_get_guint8(tvb, SSCOP_PDU_TYPE);
pdu_type = sscop_pdu_type & SSCOP_TYPE_MASK;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SSCOP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, val_to_str(pdu_type, sscop_type_vals,
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSCOP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str(pdu_type, sscop_type_vals,
"Unknown PDU type (0x%02x)"));
/*
diff --git a/packet-ssl.c b/packet-ssl.c
index f8d6b61ab8..f320af04b7 100644
--- a/packet-ssl.c
+++ b/packet-ssl.c
@@ -2,7 +2,7 @@
* Routines for ssl dissection
* Copyright (c) 2000-2001, Scott Renfro <scott@renfro.org>
*
- * $Id: packet-ssl.c,v 1.10 2001/12/03 03:59:39 guy Exp $
+ * $Id: packet-ssl.c,v 1.11 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -562,14 +562,14 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Initialize the protocol column; we'll set it later when we
* figure out what flavor of SSL it is (assuming we don't
* throw an exception before we get the chance to do so). */
- if (check_col(pinfo->fd, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
- col_set_str(pinfo->fd, COL_PROTOCOL, "SSL");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSL");
}
/* clear the the info column */
- 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);
/* TCP packets and SSL records are orthogonal.
* A tcp packet may contain multiple ssl records and an ssl
@@ -600,9 +600,9 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* add a delimiter on info column
*/
if (!first_record_in_frame
- && check_col(pinfo->fd, COL_INFO))
+ && check_col(pinfo->cinfo, COL_INFO))
{
- col_append_str(pinfo->fd, COL_INFO, ", ");
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
}
/* first try to dispatch off the cached version
@@ -656,14 +656,14 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* continuation data
*/
offset = tvb_length(tvb);
- 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,
"Continuation Data");
/* Set the protocol column */
- if (check_col(pinfo->fd, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
ssl_version_short_names[conv_version]);
}
}
@@ -733,13 +733,13 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
*/
if (!ssl_is_valid_content_type(content_type))
{
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Continuation Data");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Continuation Data");
/* Set the protocol column */
- if (check_col(pinfo->fd, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
ssl_version_short_names[*conv_version]);
}
return offset + 5 + record_length;
@@ -802,21 +802,21 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
ssl_set_conv_version(pinfo, *conv_version);
}
}
- if (check_col(pinfo->fd, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
if (version == 0x0300)
{
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
ssl_version_short_names[SSL_VER_SSLv3]);
}
else if (version == 0x0301)
{
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
ssl_version_short_names[SSL_VER_TLS]);
}
else
{
- col_set_str(pinfo->fd, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
ssl_version_short_names[*conv_version]);
}
}
@@ -826,8 +826,8 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
*/
switch (content_type) {
case SSL_ID_CHG_CIPHER_SPEC:
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Change Cipher Spec");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Change Cipher Spec");
dissect_ssl3_change_cipher_spec(tvb, pinfo, ssl_record_tree,
offset, conv_version);
break;
@@ -840,8 +840,8 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
record_length, conv_version);
break;
case SSL_ID_APP_DATA:
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Application Data");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Application Data");
if (ssl_record_tree)
{
proto_item_set_text(ssl_record_tree,
@@ -854,8 +854,8 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
default:
/* shouldn't get here since we check above for valid types */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Bad SSLv3 Content Type");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Bad SSLv3 Content Type");
break;
}
offset += record_length; /* skip to end of record */
@@ -922,15 +922,15 @@ dissect_ssl3_alert(tvbuff_t *tvb, packet_info *pinfo,
/* now set the text in the record layer line */
if (level && desc)
{
- 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,
"Alert (Level: %s, Description: %s)",
level, desc);
}
else
{
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Encrypted Alert");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Encrypted Alert");
}
if (tree)
@@ -1017,15 +1017,15 @@ dissect_ssl3_handshake(tvbuff_t *tvb, packet_info *pinfo,
/* on second and later iterations, add comma to info col */
if (!first_iteration)
{
- 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, ", ");
}
/*
* Update our info string
*/
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, "%s", (msg_type_str != NULL)
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s", (msg_type_str != NULL)
? msg_type_str : "Encrypted Handshake Message");
if (tree)
@@ -1522,9 +1522,9 @@ dissect_ssl2_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree
* conversation, then set a version for just this frame
* (e.g., on a client hello)
*/
- if (check_col(pinfo->fd, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
- col_set_str(pinfo->fd, COL_PROTOCOL, "SSLv2");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSLv2");
}
/* pull first byte; if high bit is set, then record
@@ -1582,14 +1582,14 @@ dissect_ssl2_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_item_set_text(ssl_record_tree, "SSLv2 Record Layer: %s",
"Encrypted Data");
}
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, "Encrypted Data");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "Encrypted Data");
return initial_offset + record_length_length + record_length;
}
else
{
- if (check_col(pinfo->fd, COL_INFO))
- col_append_str(pinfo->fd, COL_INFO, msg_type_str);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, msg_type_str);
if (ssl_record_tree)
{
diff --git a/packet-sua.c b/packet-sua.c
index 8d049f5ed4..8aa6172def 100644
--- a/packet-sua.c
+++ b/packet-sua.c
@@ -6,7 +6,7 @@
*
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-sua.c,v 1.3 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-sua.c,v 1.4 2001/12/10 00:25:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -478,9 +478,9 @@ dissect_sua_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, proto
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
message_length = tvb_get_ntohl (common_header_tvb, MESSAGE_LENGTH_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, val_to_str(message_class * 256 + message_type, sua_message_class_type_acro_values, "reserved"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, sua_message_class_type_acro_values, "reserved"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
};
if (sua_tree) {
@@ -2058,9 +2058,9 @@ dissect_sua_light_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo,
spare_2 = tvb_get_ntohs(common_header_tvb, SUAL_SPARE_2_OFFSET);
message_length = tvb_get_ntohl(common_header_tvb, SUAL_MESSAGE_LENGTH_OFFSET);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_str(pinfo->fd, COL_INFO, val_to_str(message_type, sua_light_message_type_acro_values, "Unknown"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_type, sua_light_message_type_acro_values, "Unknown"));
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
};
if (sual_tree) {
@@ -2130,12 +2130,12 @@ dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
/* make entry in the Protocol column on summary display */
switch(sua_version) {
case IETF_VERSION08:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SUA");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SUA");
break;
case SIEMENS_VERSION:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "SUA-Light");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "SUA-Light");
break;
}
diff --git a/packet-syslog.c b/packet-syslog.c
index 223c28a3f6..eae06abfc2 100644
--- a/packet-syslog.c
+++ b/packet-syslog.c
@@ -3,7 +3,7 @@
*
* Copyright 2000, Gerald Combs <gerald@ethereal.com>
*
- * $Id: packet-syslog.c,v 1.12 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-syslog.c,v 1.13 2001/12/10 00:25:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -144,10 +144,10 @@ static void dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *syslog_tree;
gchar msg_str[COL_INFO_LEN];
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Syslog");
- 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, "Syslog");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
msg_len = tvb_length(tvb);
@@ -175,13 +175,13 @@ static void dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_str[msg_len] = '\0';
}
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (pri >= 0) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s.%s: %s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s.%s: %s",
val_to_str(fac, short_fac, "UNKNOWN"),
val_to_str(lev, short_lev, "UNKNOWN"), msg_str);
} else {
- col_add_fstr(pinfo->fd, COL_INFO, "%s", msg_str);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s", msg_str);
}
}
diff --git a/packet-tacacs.c b/packet-tacacs.c
index 22ea4370de..5f4b1bb607 100644
--- a/packet-tacacs.c
+++ b/packet-tacacs.c
@@ -2,7 +2,7 @@
* Routines for cisco tacacs/xtacacs/tacacs+ packet dissection
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-tacacs.c,v 1.17 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-tacacs.c,v 1.18 2001/12/10 00:25:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -132,20 +132,20 @@ dissect_tacacs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
guint8 txt_buff[256],version,type,userlen,passlen;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TACACS");
- 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, "TACACS");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
version = tvb_get_guint8(tvb,0);
if (version != 0) {
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "XTACACS");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "XTACACS");
}
type = tvb_get_guint8(tvb,1);
- 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, tacacs_type_vals, "Unknown (0x%02x)"));
if (tree)
@@ -341,12 +341,12 @@ dissect_tacplus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 len;
gboolean request=(pinfo->match_port == pinfo->destport);
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TACACS+");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TACACS+");
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_add_str(pinfo->fd, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
request ? "Request" : "Response");
}
diff --git a/packet-tcp.c b/packet-tcp.c
index ce62e63037..ccb5aac324 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.122 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-tcp.c,v 1.123 2001/12/10 00:25:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -526,11 +526,11 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
* of the payload, and that's 0).
* Just mark this as TCP.
*/
- if (check_col(pinfo->fd, COL_PROTOCOL)){
- col_set_str(pinfo->fd, COL_PROTOCOL, "TCP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)){
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCP");
}
- if (check_col(pinfo->fd, COL_INFO)){
- col_set_str(pinfo->fd, COL_INFO, "[Desegmented TCP]");
+ if (check_col(pinfo->cinfo, COL_INFO)){
+ col_set_str(pinfo->cinfo, COL_INFO, "[Desegmented TCP]");
}
}
@@ -548,39 +548,39 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
static void
-tcp_info_append_uint(frame_data *fd, const char *abbrev, guint32 val)
+tcp_info_append_uint(packet_info *pinfo, const char *abbrev, guint32 val)
{
- if (check_col(fd, COL_INFO))
- col_append_fstr(fd, COL_INFO, " %s=%u", abbrev, val);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s=%u", abbrev, val);
}
static void
dissect_tcpopt_maxseg(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)
{
guint16 mss;
mss = tvb_get_ntohs(tvb, offset + 2);
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: %u bytes", optp->name, mss);
- tcp_info_append_uint(fd, "MSS", mss);
+ tcp_info_append_uint(pinfo, "MSS", mss);
}
static void
dissect_tcpopt_wscale(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)
{
guint8 ws;
ws = tvb_get_guint8(tvb, offset + 2);
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: %u bytes", optp->name, ws);
- tcp_info_append_uint(fd, "WS", ws);
+ tcp_info_append_uint(pinfo, "WS", ws);
}
static void
dissect_tcpopt_sack(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;
@@ -611,27 +611,27 @@ dissect_tcpopt_sack(const ip_tcp_opt *optp, tvbuff_t *tvb,
optlen -= 4;
proto_tree_add_text(field_tree, tvb, offset, 8,
"left edge = %u, right edge = %u", leftedge, rightedge);
- tcp_info_append_uint(fd, "SLE", leftedge);
- tcp_info_append_uint(fd, "SRE", rightedge);
+ tcp_info_append_uint(pinfo, "SLE", leftedge);
+ tcp_info_append_uint(pinfo, "SRE", rightedge);
offset += 8;
}
}
static void
dissect_tcpopt_echo(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)
{
guint32 echo;
echo = tvb_get_ntohl(tvb, offset + 2);
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: %u", optp->name, echo);
- tcp_info_append_uint(fd, "ECHO", echo);
+ tcp_info_append_uint(pinfo, "ECHO", echo);
}
static void
dissect_tcpopt_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)
{
guint32 tsv, tser;
@@ -639,20 +639,20 @@ dissect_tcpopt_timestamp(const ip_tcp_opt *optp, tvbuff_t *tvb,
tser = tvb_get_ntohl(tvb, offset + 6);
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: tsval %u, tsecr %u", optp->name, tsv, tser);
- tcp_info_append_uint(fd, "TSV", tsv);
- tcp_info_append_uint(fd, "TSER", tser);
+ tcp_info_append_uint(pinfo, "TSV", tsv);
+ tcp_info_append_uint(pinfo, "TSER", tser);
}
static void
dissect_tcpopt_cc(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)
{
guint32 cc;
cc = tvb_get_ntohl(tvb, offset + 2);
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: %u", optp->name, cc);
- tcp_info_append_uint(fd, "CC", cc);
+ tcp_info_append_uint(pinfo, "CC", cc);
}
static const ip_tcp_opt tcpopts[] = {
@@ -835,17 +835,17 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint length_remaining;
struct tcpinfo tcpinfo;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TCP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCP");
/* Clear out the Info column. */
- 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);
th_sport = tvb_get_ntohs(tvb, offset);
th_dport = tvb_get_ntohs(tvb, offset + 2);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, "%s > %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s > %s",
get_tcp_port(th_sport), get_tcp_port(th_dport));
}
@@ -876,7 +876,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
th_flags = tvb_get_guint8(tvb, offset + 13);
th_win = tvb_get_ntohs(tvb, offset + 14);
- if (check_col(pinfo->fd, COL_INFO) || tree) {
+ if (check_col(pinfo->cinfo, COL_INFO) || tree) {
for (i = 0; i < 8; i++) {
bpos = 1 << i;
if (th_flags & bpos) {
@@ -891,8 +891,8 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flags[fpos] = '\0';
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, " [%s] Seq=%u Ack=%u Win=%u",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " [%s] Seq=%u Ack=%u Win=%u",
flags, th_seq, th_ack, th_win);
}
@@ -909,8 +909,8 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
the tree, before fetching the header length, so that they'll
show up if this is in the failing packet in an ICMP error packet,
but it's now time to give up if the header length is bogus. */
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, ", bogus TCP header length (%u, must be at least %u)",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", bogus TCP header length (%u, must be at least %u)",
hlen, TCPH_MIN_LEN);
if (tree) {
proto_tree_add_uint_format(tcp_tree, hf_tcp_hdr_len, tvb, offset + 12, 1, hlen,
@@ -1033,15 +1033,15 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rlogin. */
tcpinfo.urgent = TRUE;
tcpinfo.urgent_pointer = th_urp;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, " Urg=%u", th_urp);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Urg=%u", th_urp);
if (tcp_tree != NULL)
proto_tree_add_uint(tcp_tree, hf_tcp_urgent_pointer, tvb, offset + 18, 2, th_urp);
} else
tcpinfo.urgent = FALSE;
- if (check_col(pinfo->fd, COL_INFO))
- col_append_fstr(pinfo->fd, COL_INFO, " Len=%d", seglen);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Len=%d", seglen);
/* Decode TCP options, if any. */
if (tree && hlen > TCPH_MIN_LEN) {
@@ -1052,7 +1052,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Options: (%d bytes)", optlen);
field_tree = proto_item_add_subtree(tf, ett_tcp_options);
dissect_ip_tcp_options(tvb, offset + 20, optlen,
- tcpopts, N_TCP_OPTS, TCPOPT_EOL, pinfo->fd, field_tree);
+ tcpopts, N_TCP_OPTS, TCPOPT_EOL, pinfo, field_tree);
}
/* Skip over header + options */
diff --git a/packet-telnet.c b/packet-telnet.c
index 81d58840d0..219fdea564 100644
--- a/packet-telnet.c
+++ b/packet-telnet.c
@@ -2,7 +2,7 @@
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-telnet.c,v 1.26 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-telnet.c,v 1.27 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -365,11 +365,11 @@ dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *telnet_tree, *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TELNET");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TELNET");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Telnet Data ...");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Telnet Data ...");
if (tree) {
gint offset = 0;
diff --git a/packet-tftp.c b/packet-tftp.c
index 5aec3d5bdf..ad8d84dd77 100644
--- a/packet-tftp.c
+++ b/packet-tftp.c
@@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
- * $Id: packet-tftp.c,v 1.33 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-tftp.c,v 1.34 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -129,14 +129,14 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TFTP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TFTP");
opcode = tvb_get_ntohs(tvb, offset);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(opcode, tftp_opcode_vals, "Unknown (0x%04x)"));
}
@@ -160,8 +160,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tftp_tree, hf_tftp_source_file,
tvb, offset, i1, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", File: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
tvb_get_ptr(tvb, offset, i1));
}
offset += i1;
@@ -171,8 +171,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tftp_tree, hf_tftp_transfer_type,
tvb, offset, i1, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Transfer type: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
tvb_get_ptr(tvb, offset, i1));
}
offset += i1;
@@ -187,8 +187,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tftp_tree, hf_tftp_destination_file,
tvb, offset, i1, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", File: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
tvb_get_ptr(tvb, offset, i1));
}
offset += i1;
@@ -198,8 +198,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tftp_tree, hf_tftp_transfer_type,
tvb, offset, i1, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Transfer type: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
tvb_get_ptr(tvb, offset, i1));
}
offset += i1;
@@ -213,8 +213,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tftp_tree, hf_tftp_blocknum, tvb, offset, 2,
FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Block: %i",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Block: %i",
tvb_get_ntohs(tvb, offset));
}
offset += 2;
@@ -230,8 +230,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tftp_tree, hf_tftp_blocknum, tvb, offset, 2,
FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Block: %i",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Block: %i",
tvb_get_ntohs(tvb, offset));
}
break;
@@ -242,8 +242,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(tftp_tree, hf_tftp_error_code, tvb, offset, 2,
error);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Code: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Code: %s",
val_to_str(error, tftp_error_code_vals, "Unknown (%u)"));
}
offset += 2;
@@ -253,8 +253,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tftp_tree, hf_tftp_error_string, tvb, offset,
i1, FALSE);
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_append_fstr(pinfo->fd, COL_INFO, ", Message: %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Message: %s",
tvb_get_ptr(tvb, offset, i1));
}
break;
diff --git a/packet-time.c b/packet-time.c
index 29e1f6bb92..4e6f0daafb 100644
--- a/packet-time.c
+++ b/packet-time.c
@@ -3,7 +3,7 @@
*
* Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-time.c,v 1.15 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-time.c,v 1.16 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -45,11 +45,11 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *time_tree;
proto_item *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TIME");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TIME");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "TIME %s",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "TIME %s",
pinfo->srcport == pinfo->match_port ? "Response":"Request");
}
diff --git a/packet-tns.c b/packet-tns.c
index 6d5e669a2f..9d2e7baa1d 100644
--- a/packet-tns.c
+++ b/packet-tns.c
@@ -1,7 +1,7 @@
/* packet-tns.c
* Routines for Oracle TNS packet dissection
*
- * $Id: packet-tns.c,v 1.23 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-tns.c,v 1.24 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -210,15 +210,15 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
offset += 2;
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
if ( is_sns )
{
- col_append_fstr(pinfo->fd, COL_INFO, ", SNS");
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", SNS");
}
else
{
- col_append_fstr(pinfo->fd, COL_INFO, ", Data");
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Data");
}
}
@@ -248,9 +248,9 @@ static void dissect_tns_connect(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Connect");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Connect");
}
if ( connect_tree )
@@ -396,9 +396,9 @@ static void dissect_tns_accept(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Accept");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Accept");
}
if ( accept_tree )
@@ -492,9 +492,9 @@ static void dissect_tns_refuse(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Refuse");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Refuse");
}
if ( refuse_tree )
@@ -543,9 +543,9 @@ static void dissect_tns_abort(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Abort");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Abort");
}
if ( abort_tree )
@@ -595,15 +595,15 @@ static void dissect_tns_marker(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
if ( is_attention )
{
- col_append_str(pinfo->fd, COL_INFO, ", Marker");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Marker");
}
else
{
- col_append_str(pinfo->fd, COL_INFO, ", Attention");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Attention");
}
}
@@ -646,9 +646,9 @@ static void dissect_tns_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Redirect");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Redirect");
}
if ( redirect_tree )
@@ -682,9 +682,9 @@ static void dissect_tns_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
0, 0, TRUE);
}
- if ( check_col(pinfo->fd, COL_INFO) )
+ if ( check_col(pinfo->cinfo, COL_INFO) )
{
- col_append_str(pinfo->fd, COL_INFO, ", Control");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Control");
}
if ( control_tree )
@@ -713,12 +713,12 @@ dissect_tns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 length;
guint16 type;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TNS");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TNS");
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_add_str(pinfo->fd, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
(pinfo->match_port == pinfo->destport) ? "Request" : "Response");
}
@@ -763,9 +763,9 @@ dissect_tns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset += 1;
- if ( check_col(pinfo->fd, COL_INFO))
+ if ( check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(pinfo->fd, COL_INFO, ", %s (%u)",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)",
val_to_str(type, tns_type_vals, "Unknown"), type);
}
diff --git a/packet-tpkt.c b/packet-tpkt.c
index 35a4ca0faa..e38528387e 100644
--- a/packet-tpkt.c
+++ b/packet-tpkt.c
@@ -7,7 +7,7 @@
* Routine to dissect RFC 1006 TPKT packet containing OSI TP PDU
* Copyright 2001, Martin Thomas <Martin_A_Thomas@yahoo.com>
*
- * $Id: packet-tpkt.c,v 1.8 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-tpkt.c,v 1.9 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -108,14 +108,14 @@ dissect_tpkt_header( tvbuff_t *tvb, unsigned int* offset, packet_info *pinfo, pr
pinfo->current_proto = "TPKT";
- if ( check_col( pinfo->fd, COL_PROTOCOL ) ) {
- col_set_str( pinfo->fd, COL_PROTOCOL, "TPKT" );
+ if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
+ col_set_str( pinfo->cinfo, COL_PROTOCOL, "TPKT" );
}
data_len = tvb_get_ntohs( tvb, (*offset) + 2 );
- if ( check_col( pinfo->fd, COL_INFO) ) {
- col_add_fstr( pinfo->fd, COL_INFO, "TPKT Data length = %u",
+ if ( check_col( pinfo->cinfo, COL_INFO) ) {
+ col_add_fstr( pinfo->cinfo, COL_INFO, "TPKT Data length = %u",
data_len );
}
diff --git a/packet-tr.c b/packet-tr.c
index 6415ad7ab1..94a045edc5 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-tr.c,v 1.67 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-tr.c,v 1.68 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -326,8 +326,8 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Token-Ring Strings */
char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" };
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TR");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TR");
if ((x = check_for_old_linux_tvb((tvbuff_t*) tvb))) {
/* Actually packet starts x bytes into what we have got but with all
@@ -348,8 +348,8 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
trn_shost_nonsr[0] &= 127;
frame_type = (trn_fc & 192) >> 6;
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Token-Ring %s", fc[frame_type]);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Token-Ring %s", fc[frame_type]);
/* if the high bit on the first byte of src hwaddr is 1, then
this packet is source-routed */
diff --git a/packet-trmac.c b/packet-trmac.c
index 62aaf22c1b..7bd7fb67d8 100644
--- a/packet-trmac.c
+++ b/packet-trmac.c
@@ -2,12 +2,11 @@
* Routines for Token-Ring Media Access Control
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-trmac.c,v 1.33 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-trmac.c,v 1.34 2001/12/10 00:25:40 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
@@ -280,18 +279,18 @@ dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 mv_val;
char *mv_text;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "TR MAC");
- 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, "TR MAC");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
mv_val = tvb_get_guint8(tvb, 3);
/* Interpret the major vector */
mv_text = val_to_str(mv_val, major_vector_vs, "Unknown Major Vector: %d\n");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, mv_text);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, mv_text);
if (tree) {
mv_length = tvb_get_ntohs(tvb, 0);
diff --git a/packet-ucp.c b/packet-ucp.c
index e4ab13cb0d..c6b7f13d09 100644
--- a/packet-ucp.c
+++ b/packet-ucp.c
@@ -2,7 +2,7 @@
* Routines for Universal Computer Protocol dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-ucp.c,v 1.7 2001/12/03 08:47:28 guy Exp $
+ * $Id: packet-ucp.c,v 1.8 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1596,18 +1596,18 @@ dissect_ucp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
OT = 10 * OT + (tvb_get_guint8(tvb, UCP_OT_OFFSET + 1) - '0');
/* 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, "UCP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "UCP");
- if (check_col(pinfo->fd, COL_INFO)) {
- col_clear(pinfo->fd, COL_INFO);
- col_append_fstr(pinfo->fd, COL_INFO, "%s (%s)",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_clear(pinfo->cinfo, COL_INFO);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
val_to_str(OT, vals_hdr_OT, "unknown operation"),
match_strval(O_R, vals_hdr_O_R));
if (result == UCP_SHORTENED)
- col_append_str(pinfo->fd, COL_INFO, " [short packet]");
+ col_append_str(pinfo->cinfo, COL_INFO, " [short packet]");
else if (result == UCP_INV_CHK)
- col_append_str(pinfo->fd, COL_INFO, " [checksum invalid]");
+ col_append_str(pinfo->cinfo, COL_INFO, " [checksum invalid]");
}
/* In the interest of speed, if "tree" is NULL, don't do any work not
diff --git a/packet-udp.c b/packet-udp.c
index 4bb5657121..d7c30ab324 100644
--- a/packet-udp.c
+++ b/packet-udp.c
@@ -1,7 +1,7 @@
/* packet-udp.c
* Routines for UDP packet disassembly
*
- * $Id: packet-udp.c,v 1.99 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-udp.c,v 1.100 2001/12/10 00:25:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -125,10 +125,10 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 computed_cksum;
int offset = 0;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "UDP");
- 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, "UDP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&uh, offset, sizeof(e_udphdr));
@@ -137,8 +137,8 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
uh_ulen = ntohs(uh.uh_ulen);
uh_sum = ntohs(uh.uh_sum);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Source port: %s Destination port: %s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Source port: %s Destination port: %s",
get_udp_port(uh_sport), get_udp_port(uh_dport));
if (tree) {
diff --git a/packet-v120.c b/packet-v120.c
index 10d3e11393..e805634866 100644
--- a/packet-v120.c
+++ b/packet-v120.c
@@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
- * $Id: packet-v120.c,v 1.21 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-v120.c,v 1.22 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -66,22 +66,22 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 control;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "V.120");
- 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, "V.120");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
byte0 = tvb_get_guint8(tvb, 0);
- if(check_col(pinfo->fd, COL_RES_DL_SRC))
- col_add_fstr(pinfo->fd, COL_RES_DL_SRC, "0x%02X", byte0);
+ if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+ col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "0x%02X", byte0);
byte1 = tvb_get_guint8(tvb, 1);
if ((byte0 & 0x01) != 0x00 && (byte1 && 0x01) != 0x01)
{
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Invalid V.120 frame");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Invalid V.120 frame");
if (tree)
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, tvb_length(tvb),
"Invalid V.120 frame");
@@ -89,16 +89,16 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
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");
}
if (((pinfo->pseudo_header->x25.flags & FROM_DCE) && byte0 & 0x02) ||
diff --git a/packet-vines.c b/packet-vines.c
index 144dfc1672..a7c3a7632e 100644
--- a/packet-vines.c
+++ b/packet-vines.c
@@ -1,7 +1,7 @@
/* packet-vines.c
* Routines for Banyan VINES protocol packet disassembly
*
- * $Id: packet-vines.c,v 1.37 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-vines.c,v 1.38 2001/12/10 00:25:41 guy Exp $
*
* Don Lafontaine <lafont02@cn.ca>
*
@@ -93,10 +93,10 @@ dissect_vines_frp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gchar frp_flags_str[32];
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines FRP");
- 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, "Vines FRP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_vines_frp, tvb, 0, 2,
@@ -188,10 +188,10 @@ dissect_vines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int hops = 0;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines");
- 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, "Vines");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* To do: check for runts, errs, etc. */
@@ -207,40 +207,40 @@ dissect_vines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (viph.vip_proto) {
case VIP_PROTO_IPC:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines IPC");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "IPC (%02x)", viph.vip_proto);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines IPC");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "IPC (%02x)", viph.vip_proto);
break;
case VIP_PROTO_SPP:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines SPP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "SPP (%02x)", viph.vip_proto);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines SPP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "SPP (%02x)", viph.vip_proto);
break;
case VIP_PROTO_ARP:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines ARP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "ARP (%02x)", viph.vip_proto);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines ARP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ARP (%02x)", viph.vip_proto);
break;
case VIP_PROTO_RTP:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines RTP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "RTP (%02x)", viph.vip_proto);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines RTP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "RTP (%02x)", viph.vip_proto);
break;
case VIP_PROTO_ICP:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines ICP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "ICP (%02x)", viph.vip_proto);
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines ICP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ICP (%02x)", viph.vip_proto);
break;
default:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Vines IP");
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Unknown VIP protocol (%02x)",
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines IP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown VIP protocol (%02x)",
viph.vip_proto);
}
@@ -359,10 +359,10 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *vspp_tree;
proto_item *ti;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP");
- 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, "VSPP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/* To do: check for runts, errs, etc. */
@@ -376,28 +376,28 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (viph.vspp_pkttype) {
case VSPP_PKTTYPE_DATA:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP Data");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VSPP Data");
break;
case VSPP_PKTTYPE_DISC:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP Disconnect");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VSPP Disconnect");
break;
case VSPP_PKTTYPE_PROBE:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP Probe");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VSPP Probe");
break;
case VSPP_PKTTYPE_ACK:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP Ack");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VSPP Ack");
break;
default:
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VSPP Unknown");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VSPP Unknown");
}
- 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,
"NS=%04x NR=%04x Window=%04x RID=%04x LID=%04x D=%04x S=%04x",
viph.vspp_seqno, viph.vspp_ack, viph.vspp_win,
viph.vspp_rmtid, viph.vspp_lclid, viph.vspp_dport,
diff --git a/packet-vlan.c b/packet-vlan.c
index b4521f6194..15a3b67ed2 100644
--- a/packet-vlan.c
+++ b/packet-vlan.c
@@ -1,7 +1,7 @@
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
- * $Id: packet-vlan.c,v 1.36 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-vlan.c,v 1.37 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -79,15 +79,15 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
volatile gboolean is_802_2;
proto_tree *volatile vlan_tree;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VLAN");
- 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, "VLAN");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
tci = tvb_get_ntohs( tvb, 0 );
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "PRI: %d CFI: %d ID: %d",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PRI: %d CFI: %d ID: %d",
(tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF));
}
diff --git a/packet-vrrp.c b/packet-vrrp.c
index 225ba50694..ac5cca5ae2 100644
--- a/packet-vrrp.c
+++ b/packet-vrrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-vrrp.c,v 1.18 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-vrrp.c,v 1.19 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -97,14 +97,14 @@ dissect_vrrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 ver_type;
vec_t cksum_vec[1];
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VRRP");
- 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, "VRRP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
ver_type = tvb_get_guint8(tvb, 0);
- if (check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s (v%u)",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s (v%u)",
"Announcement", hi_nibble(ver_type));
}
diff --git a/packet-vtp.c b/packet-vtp.c
index dd6e12a6ae..06407ae18f 100644
--- a/packet-vtp.c
+++ b/packet-vtp.c
@@ -1,7 +1,7 @@
/* packet-vtp.c
* Routines for the disassembly of Cisco's Virtual Trunking Protocol
*
- * $Id: packet-vtp.c,v 1.16 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-vtp.c,v 1.17 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -101,10 +101,10 @@ dissect_vtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *upd_timestamp;
int vlan_info_len;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "VTP");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Virtual Trunking Protocol");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "VTP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Virtual Trunking Protocol");
if (tree) {
ti = proto_tree_add_item(tree, proto_vtp, tvb, offset,
diff --git a/packet-wccp.c b/packet-wccp.c
index 43a534c642..25986ecf5e 100644
--- a/packet-wccp.c
+++ b/packet-wccp.c
@@ -2,7 +2,7 @@
* Routines for Web Cache Coordination Protocol dissection
* Jerry Talkington <jerryt@netapp.com>
*
- * $Id: packet-wccp.c,v 1.24 2001/12/03 03:59:40 guy Exp $
+ * $Id: packet-wccp.c,v 1.25 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -202,17 +202,17 @@ dissect_wccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 cache_count;
guint i;
- if(check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "WCCP");
+ if(check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "WCCP");
}
- 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);
}
wccp_message_type = tvb_get_ntohl(tvb, offset);
- if(check_col(pinfo->fd, COL_INFO)) {
- col_add_str(pinfo->fd, COL_INFO, val_to_str(wccp_message_type,
+ if(check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str(wccp_message_type,
wccp_type_vals, "Unknown WCCP message (%u)"));
}
diff --git a/packet-wcp.c b/packet-wcp.c
index 781884463a..6ea2011c8a 100644
--- a/packet-wcp.c
+++ b/packet-wcp.c
@@ -2,7 +2,7 @@
* Routines for Wellfleet Compression frame disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-wcp.c,v 1.18 2001/12/03 03:59:42 guy Exp $
+ * $Id: packet-wcp.c,v 1.19 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -308,10 +308,10 @@ static void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
guint16 temp, cmd, ext_cmd, seq;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "WCP");
- 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, "WCP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
temp =tvb_get_ntohs(tvb, 0);
@@ -327,10 +327,10 @@ static void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/*XXX should test seq to be sure it the last + 1 !! */
- if (check_col(pinfo->fd, COL_INFO)){
- col_add_str(pinfo->fd, COL_INFO, val_to_str(cmd, cmd_string, "Unknown"));
+ if (check_col(pinfo->cinfo, COL_INFO)){
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, cmd_string, "Unknown"));
if ( cmd == 0xf)
- col_append_fstr(pinfo->fd, COL_INFO, ", %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
val_to_str(ext_cmd, ext_cmd_string, "Unknown"));
}
diff --git a/packet-who.c b/packet-who.c
index fec42e52e2..e6d9ec0196 100644
--- a/packet-who.c
+++ b/packet-who.c
@@ -2,7 +2,7 @@
* Routines for who protocol (see man rwhod)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-who.c,v 1.20 2001/12/03 03:59:42 guy Exp $
+ * $Id: packet-who.c,v 1.21 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -104,10 +104,10 @@ dissect_who(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
nstime_t ts;
/* Summary information */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "WHO");
- 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, "WHO");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
ts.nsecs = 0;
@@ -167,8 +167,8 @@ dissect_who(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
/* Summary information */
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "%s: %.02f %.02f %.02f",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %.02f %.02f %.02f",
server_name, loadav_5, loadav_10, loadav_15);
if (tree) {
diff --git a/packet-wsp.c b/packet-wsp.c
index 522e610606..cf1126a04a 100644
--- a/packet-wsp.c
+++ b/packet-wsp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WSP component of WAP traffic.
*
- * $Id: packet-wsp.c,v 1.49 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-wsp.c,v 1.50 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -757,7 +757,7 @@ typedef enum {
static dissector_table_t wsp_dissector_table;
static heur_dissector_list_t heur_subdissector_list;
-static void add_uri (proto_tree *, frame_data *, tvbuff_t *, guint, guint);
+static void add_uri (proto_tree *, packet_info *, tvbuff_t *, guint, guint);
static void add_headers (proto_tree *, tvbuff_t *);
static int add_well_known_header (proto_tree *, tvbuff_t *, int, guint8);
static int add_unknown_header (proto_tree *, tvbuff_t *, int, guint8);
@@ -993,7 +993,6 @@ static void
dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
dissector_handle_t dissector_handle, gboolean is_connectionless)
{
- frame_data *fdata = pinfo->fd;
int offset = 0;
guint8 pdut;
@@ -1031,9 +1030,9 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pdut = tvb_get_guint8 (tvb, offset);
/* Develop the string to put in the Info column */
- if (check_col(fdata, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(fdata, COL_INFO, "WSP %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, "WSP %s",
val_to_str (pdut, vals_pdu_type, "Unknown PDU type (0x%02x)"));
};
@@ -1141,7 +1140,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Length of URI and size of URILen field */
value = tvb_get_guintvar (tvb, offset, &count);
nextOffset = offset + count;
- add_uri (wsp_tree, fdata, tvb, offset, nextOffset);
+ add_uri (wsp_tree, pinfo, tvb, offset, nextOffset);
if (tree) {
offset += (value+count); /* VERIFY */
tmp_tvb = tvb_new_subset (tvb, offset, -1, -1);
@@ -1158,7 +1157,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
headersLength = tvb_get_guintvar (tvb, headerStart, &count);
offset = headerStart + count;
- add_uri (wsp_tree, fdata, tvb, uriStart, offset);
+ add_uri (wsp_tree, pinfo, tvb, uriStart, offset);
if (tree) {
offset += uriLength;
@@ -1290,10 +1289,10 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_wsp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "WSP" );
- 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, "WSP" );
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
dissect_wsp_common(tvb, pinfo, tree, wsp_fromudp_handle, TRUE);
}
@@ -1323,15 +1322,15 @@ dissect_wsp_fromwap_cl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* XXX - what about WTLS->WSP?
*/
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_clear(pinfo->fd, COL_INFO);
+ col_clear(pinfo->cinfo, COL_INFO);
}
dissect_wsp_common(tvb, pinfo, tree, wtp_fromudp_handle, TRUE);
}
static void
-add_uri (proto_tree *tree, frame_data *fdata, tvbuff_t *tvb, guint URILenOffset, guint URIOffset)
+add_uri (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint URILenOffset, guint URIOffset)
{
proto_item *ti;
char *newBuffer;
@@ -1348,8 +1347,8 @@ add_uri (proto_tree *tree, frame_data *fdata, tvbuff_t *tvb, guint URILenOffset,
newBuffer[uriLen+1] = 0;
if (tree)
ti = proto_tree_add_string (tree, hf_wsp_header_uri,tvb,URIOffset,uriLen,newBuffer+1);
- if (check_col(fdata, COL_INFO)) {
- col_append_str(fdata, COL_INFO, newBuffer);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str(pinfo->cinfo, COL_INFO, newBuffer);
};
g_free (newBuffer);
}
diff --git a/packet-wtls.c b/packet-wtls.c
index 393956d725..4949fe926e 100644
--- a/packet-wtls.c
+++ b/packet-wtls.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WTLS component of WAP traffic.
*
- * $Id: packet-wtls.c,v 1.15 2001/12/03 03:59:43 guy Exp $
+ * $Id: packet-wtls.c,v 1.16 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -331,7 +331,6 @@ static void dissect_wtls_handshake (proto_tree *, tvbuff_t *, guint, guint);
static void
dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- frame_data *fdata = pinfo->fd;
int offset = 0;
char pdut;
@@ -345,22 +344,22 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *wtls_rec_tree;
proto_tree *wtls_msg_type_tree;
- if (check_col(fdata, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
switch ( pinfo->match_port )
{
case UDP_PORT_WTLS_WSP:
- col_set_str(fdata, COL_PROTOCOL, "WTLS+WSP" );
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WSP" );
break;
case UDP_PORT_WTLS_WTP_WSP:
- col_set_str(fdata, COL_PROTOCOL, "WTLS+WTP+WSP" );
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WTP+WSP" );
break;
}
}
/* Develop the string to put in the Info column */
- if (check_col(fdata, COL_INFO)) {
- col_set_str(fdata, COL_INFO, "WTLS" );
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "WTLS" );
};
/* In the interest of speed, if "tree" is NULL, don't do any work not
diff --git a/packet-wtp.c b/packet-wtp.c
index c7fd282289..c06074935e 100644
--- a/packet-wtp.c
+++ b/packet-wtp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WTP component of WAP traffic.
*
- * $Id: packet-wtp.c,v 1.22 2001/12/03 03:59:43 guy Exp $
+ * $Id: packet-wtp.c,v 1.23 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -190,8 +190,6 @@ static char retransmission_indicator(unsigned char octet);
static void
dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- frame_data *fdata = pinfo->fd;
-
char szInfo[ 50 ];
int offCur = 0; /* current offset from start of WTP data */
@@ -221,10 +219,6 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int i;
tvbuff_t *wsp_tvb = NULL;
-#ifdef DEBUG
- fprintf( stderr, "dissect_wtp: (Entering) Frame data at %p\n", fdata );
- fprintf( stderr, "dissect_wtp: tvb length is %d\n", tvb_reported_length( tvb ) );
-#endif
b0 = tvb_get_guint8 (tvb, offCur + 0);
/* Discover Concatenated PDUs */
if (b0 == 0) {
@@ -246,8 +240,8 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
proto_tree_add_item(wtp_tree, hf_wtp_header_sub_pdu_size, tvb, offCur, vHeader, bo_big_endian);
}
- if (i > 1 && check_col(fdata, COL_INFO)) {
- col_append_str (fdata, COL_INFO, ", ");
+ if (i > 1 && check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_str (pinfo->cinfo, COL_INFO, ", ");
}
wsp_tvb = tvb_new_subset(tvb,
offCur + vHeader, -1, cbHeader);
@@ -316,12 +310,12 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* This field shows up as the "Info" column in the display; you should make
it, if possible, summarize what's in the packet, so that a user looking
at the list of packets can tell what type of packet it is. */
- if (check_col(fdata, COL_INFO) &&
+ if (check_col(pinfo->cinfo, COL_INFO) &&
tvb_reported_length (tvb) <= cbHeader + vHeader) {
#ifdef DEBUG
fprintf( stderr, "dissect_wtp: (6) About to set info_col header to %s\n", szInfo );
#endif
- col_append_str(fdata, COL_INFO, szInfo );
+ col_append_str(pinfo->cinfo, COL_INFO, szInfo );
};
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
@@ -471,10 +465,6 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_reported_length (tvb)-cbHeader-vHeader);
call_dissector(wsp_handle, wsp_tvb, pinfo, tree);
}
-
-#ifdef DEBUG
- fprintf( stderr, "dissect_wtp: (leaving) fdata->cinfo is %p\n", fdata->cinfo );
-#endif
}
/*
@@ -484,10 +474,10 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "WTP+WSP" );
- 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, "WTP+WSP" );
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_clear(pinfo->cinfo, COL_INFO);
}
dissect_wtp_common(tvb, pinfo, tree);
@@ -505,10 +495,10 @@ dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_wtp_fromwap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "WTLS+WTP+WSP" );
- 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, "WTLS+WTP+WSP" );
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_clear(pinfo->cinfo, COL_INFO);
}
dissect_wtp_common(tvb, pinfo, tree);
diff --git a/packet-x11.c b/packet-x11.c
index d338abe66a..22acff5f45 100644
--- a/packet-x11.c
+++ b/packet-x11.c
@@ -2,7 +2,7 @@
* Routines for X11 dissection
* Copyright 2000, Christophe Tronche <ch.tronche@computer.org>
*
- * $Id: packet-x11.c,v 1.26 2001/12/03 03:59:43 guy Exp $
+ * $Id: packet-x11.c,v 1.27 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2847,8 +2847,8 @@ dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* This field shows up as the "Info" column in the display; you should make
it, if possible, summarize what's in the packet, so that a user looking
at the list of packets can tell what type of packet it is. */
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "X11 request");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "X11 request");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
@@ -2874,8 +2874,8 @@ dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* This field shows up as the "Info" column in the display; you should make
it, if possible, summarize what's in the packet, so that a user looking
at the list of packets can tell what type of packet it is. */
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "X11 event");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "X11 event");
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
@@ -2893,8 +2893,8 @@ dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_x11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "X11");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "X11");
if (pinfo->match_port == pinfo->destport)
dissect_x11_request(tvb, pinfo, tree);
diff --git a/packet-x25.c b/packet-x25.c
index eff0233efe..646eecfce2 100644
--- a/packet-x25.c
+++ b/packet-x25.c
@@ -2,7 +2,7 @@
* Routines for x25 packet disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-x25.c,v 1.61 2001/12/08 06:41:42 guy Exp $
+ * $Id: packet-x25.c,v 1.62 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1294,7 +1294,7 @@ dump_facilities(proto_tree *tree, int *offset, tvbuff_t *tvb)
static void
x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
- frame_data *fd, gboolean toa)
+ packet_info *pinfo, gboolean toa)
{
int len1, len2;
int i;
@@ -1348,12 +1348,12 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
if (len1) {
if (toa) {
- if (check_col(fd, COL_RES_DL_DST))
- col_add_str(fd, COL_RES_DL_DST, addr1);
+ if (check_col(pinfo->cinfo, COL_RES_DL_DST))
+ col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr1);
}
else {
- if(check_col(fd, COL_RES_DL_SRC))
- col_add_str(fd, COL_RES_DL_SRC, addr1);
+ if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
+ col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr1);
}
if (tree)
proto_tree_add_text(tree, tvb, *offset,
@@ -1364,12 +1364,12 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
}
if (len2) {
if (toa) {
- if (check_col(fd, COL_RES_DL_SRC))
- col_add_str(fd, COL_RES_DL_SRC, addr2);
+ if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
+ col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr2);
}
else {
- if(check_col(fd, COL_RES_DL_DST))
- col_add_str(fd, COL_RES_DL_DST, addr2);
+ if(check_col(pinfo->cinfo, COL_RES_DL_DST))
+ col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr2);
}
if (tree)
proto_tree_add_text(tree, tvb, *offset + len1/2,
@@ -1497,8 +1497,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
gboolean q_bit_set = FALSE;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "X.25");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "X.25");
bytes0_1 = tvb_get_ntohs(tvb, 0);
@@ -1511,8 +1511,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
x25_pkt_len = get_x25_pkt_len(tvb);
if (x25_pkt_len < 3) /* packet too short */
{
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Invalid/short X.25 packet");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Invalid/short X.25 packet");
if (tree)
proto_tree_add_protocol_format(tree, proto_x25, tvb, 0,
tvb_length(tvb), "Invalid/short X.25 packet");
@@ -1552,8 +1552,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (pkt_type) {
case X25_CALL_REQUEST:
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "%s VC:%d",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s VC:%d",
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? "Inc. call"
: "Call req." ,
vc);
@@ -1567,7 +1567,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
localoffset = 3;
if (localoffset < x25_pkt_len) /* calling/called addresses */
- x25_ntoa(x25_tree, &localoffset, tvb, pinfo->fd, toa);
+ x25_ntoa(x25_tree, &localoffset, tvb, pinfo, toa);
if (localoffset < x25_pkt_len) /* facilities */
dump_facilities(x25_tree, &localoffset, tvb);
@@ -1790,8 +1790,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
break;
case X25_CALL_ACCEPTED:
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "%s VC:%d",
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s VC:%d",
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? "Call conn."
: "Call acc." ,
vc);
@@ -1804,7 +1804,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
localoffset = 3;
if (localoffset < x25_pkt_len) /* calling/called addresses */
- x25_ntoa(x25_tree, &localoffset, tvb, pinfo->fd, toa);
+ x25_ntoa(x25_tree, &localoffset, tvb, pinfo, toa);
if (localoffset < x25_pkt_len) /* facilities */
dump_facilities(x25_tree, &localoffset, tvb);
@@ -1817,8 +1817,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
break;
case X25_CLEAR_REQUEST:
- if(check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s VC:%d %s - %s",
+ if(check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s VC:%d %s - %s",
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? "Clear ind."
: "Clear req." ,
vc, clear_code(tvb_get_guint8(tvb, 3)),
@@ -1839,8 +1839,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_CLEAR_CONFIRMATION:
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Clear Conf. VC:%d", vc);
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Clear Conf. VC:%d", vc);
if (x25_tree) {
proto_tree_add_uint(x25_tree, hf_x25_lcn, tvb, 0, 2, bytes0_1);
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
@@ -1849,14 +1849,14 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
if (localoffset < tvb_reported_length(tvb)) /* extended clear conf format */
- x25_ntoa(x25_tree, &localoffset, tvb, pinfo->fd, toa);
+ x25_ntoa(x25_tree, &localoffset, tvb, pinfo, toa);
if (localoffset < tvb_reported_length(tvb)) /* facilities */
dump_facilities(x25_tree, &localoffset, tvb);
break;
case X25_DIAGNOSTIC:
- if(check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "Diag. %d",
+ if(check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Diag. %d",
(int)tvb_get_guint8(tvb, 3));
}
if (x25_tree) {
@@ -1868,8 +1868,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_INTERRUPT:
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Interrupt VC:%d", vc);
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Interrupt VC:%d", vc);
if (x25_tree) {
proto_tree_add_uint(x25_tree, hf_x25_lcn, tvb, 0, 2, bytes0_1);
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
@@ -1878,8 +1878,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_INTERRUPT_CONFIRMATION:
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Interrupt Conf. VC:%d", vc);
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Interrupt Conf. VC:%d", vc);
if (x25_tree) {
proto_tree_add_uint(x25_tree, hf_x25_lcn, tvb, 0, 2, bytes0_1);
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
@@ -1888,8 +1888,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_RESET_REQUEST:
- if(check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s VC:%d %s - Diag.:%d",
+ if(check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s VC:%d %s - Diag.:%d",
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? "Reset ind."
: "Reset req.",
vc, reset_code(tvb_get_guint8(tvb, 3)),
@@ -1910,8 +1910,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_RESET_CONFIRMATION:
- if(check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "Reset conf. VC:%d", vc);
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reset conf. VC:%d", vc);
if (x25_tree) {
proto_tree_add_uint(x25_tree, hf_x25_lcn, tvb, 0, 2, bytes0_1);
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
@@ -1920,8 +1920,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_RESTART_REQUEST:
- if(check_col(pinfo->fd, COL_INFO)) {
- col_add_fstr(pinfo->fd, COL_INFO, "%s %s - Diag.:%d",
+ if(check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s - Diag.:%d",
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? "Restart ind."
: "Restart req.",
restart_code(tvb_get_guint8(tvb, 3)),
@@ -1940,22 +1940,22 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = x25_pkt_len;
break;
case X25_RESTART_CONFIRMATION:
- if(check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Restart conf.");
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Restart conf.");
if (x25_tree)
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
X25_RESTART_CONFIRMATION);
localoffset = x25_pkt_len;
break;
case X25_REGISTRATION_REQUEST:
- if(check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Registration req.");
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Registration req.");
if (x25_tree)
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
X25_REGISTRATION_REQUEST);
localoffset = 3;
if (localoffset < x25_pkt_len)
- x25_ntoa(x25_tree, &localoffset, tvb, pinfo->fd, FALSE);
+ x25_ntoa(x25_tree, &localoffset, tvb, pinfo, FALSE);
if (x25_tree) {
if (localoffset < x25_pkt_len)
@@ -1970,8 +1970,8 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = tvb_reported_length(tvb);
break;
case X25_REGISTRATION_CONFIRMATION:
- if(check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "Registration conf.");
+ if(check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Registration conf.");
if (x25_tree) {
proto_tree_add_uint(x25_tree, hf_x25_type, tvb, 2, 1,
X25_REGISTRATION_CONFIRMATION);
@@ -1982,7 +1982,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
localoffset = 5;
if (localoffset < x25_pkt_len)
- x25_ntoa(x25_tree, &localoffset, tvb, pinfo->fd, TRUE);
+ x25_ntoa(x25_tree, &localoffset, tvb, pinfo, TRUE);
if (x25_tree) {
if (localoffset < x25_pkt_len)
@@ -2000,15 +2000,15 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localoffset = 2;
if ((pkt_type & 0x01) == X25_DATA)
{
- if(check_col(pinfo->fd, COL_INFO)) {
+ if(check_col(pinfo->cinfo, COL_INFO)) {
if (modulo == 8)
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Data VC:%d P(S):%d P(R):%d %s", vc,
(pkt_type >> 1) & 0x07,
(pkt_type >> 5) & 0x07,
((pkt_type >> 4) & 0x01) ? " M" : "");
else
- col_add_fstr(pinfo->fd, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO,
"Data VC:%d P(S):%d P(R):%d %s", vc,
tvb_get_guint8(tvb, localoffset+1) >> 1,
pkt_type >> 1,
@@ -2049,12 +2049,12 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (pkt_type & 0x1F)
{
case X25_RR:
- if(check_col(pinfo->fd, COL_INFO)) {
+ if(check_col(pinfo->cinfo, COL_INFO)) {
if (modulo == 8)
- col_add_fstr(pinfo->fd, COL_INFO, "RR VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "RR VC:%d P(R):%d",
vc, (pkt_type >> 5) & 0x07);
else
- col_add_fstr(pinfo->fd, COL_INFO, "RR VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "RR VC:%d P(R):%d",
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
@@ -2076,12 +2076,12 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case X25_RNR:
- if(check_col(pinfo->fd, COL_INFO)) {
+ if(check_col(pinfo->cinfo, COL_INFO)) {
if (modulo == 8)
- col_add_fstr(pinfo->fd, COL_INFO, "RNR VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "RNR VC:%d P(R):%d",
vc, (pkt_type >> 5) & 0x07);
else
- col_add_fstr(pinfo->fd, COL_INFO, "RNR VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "RNR VC:%d P(R):%d",
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
@@ -2103,12 +2103,12 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case X25_REJ:
- if(check_col(pinfo->fd, COL_INFO)) {
+ if(check_col(pinfo->cinfo, COL_INFO)) {
if (modulo == 8)
- col_add_fstr(pinfo->fd, COL_INFO, "REJ VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "REJ VC:%d P(R):%d",
vc, (pkt_type >> 5) & 0x07);
else
- col_add_fstr(pinfo->fd, COL_INFO, "REJ VC:%d P(R):%d",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "REJ VC:%d P(R):%d",
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
diff --git a/packet-xot.c b/packet-xot.c
index 3cdb4af628..0b90a1c5e0 100644
--- a/packet-xot.c
+++ b/packet-xot.c
@@ -3,7 +3,7 @@
*
* Copyright 2000, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-xot.c,v 1.7 2001/12/03 03:59:43 guy Exp $
+ * $Id: packet-xot.c,v 1.8 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -53,16 +53,16 @@ static void dissect_xot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 version,len;
tvbuff_t *next_tvb;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "XOT");
- 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, "XOT");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
version = tvb_get_ntohs(tvb,0);
len = tvb_get_ntohs(tvb,2);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "XOT Version = %u, size = %u",version,len );
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "XOT Version = %u, size = %u",version,len );
if (tree) {
diff --git a/packet-yhoo.c b/packet-yhoo.c
index 91b24b6ce0..dacde6bd47 100644
--- a/packet-yhoo.c
+++ b/packet-yhoo.c
@@ -2,7 +2,7 @@
* Routines for yahoo messenger packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-yhoo.c,v 1.18 2001/07/16 06:09:02 guy Exp $
+ * $Id: packet-yhoo.c,v 1.19 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -136,12 +136,12 @@ dissect_yhoo(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, "YHOO");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "YHOO");
offset = 0;
- 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",
( strncmp(tvb_get_ptr(tvb, offset + 0, 4), "YPNS", 4) == 0 ) ? "Request" : "Response",
val_to_str(tvb_get_letohl(tvb, offset + 12),
diff --git a/packet-zebra.c b/packet-zebra.c
index 0dae661953..a57d7dfd5f 100644
--- a/packet-zebra.c
+++ b/packet-zebra.c
@@ -3,7 +3,7 @@
*
* Jochen Friedrich <jochen@scram.de>
*
- * $Id: packet-zebra.c,v 1.16 2001/12/03 03:59:43 guy Exp $
+ * $Id: packet-zebra.c,v 1.17 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -471,15 +471,15 @@ dissect_zebra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean request;
int left, offset;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "ZEBRA");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZEBRA");
request = (pinfo->destport == pinfo->match_port);
left = tvb_reported_length(tvb);
offset = 0;
- 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,
request? "ZEBRA Request" : "ZEBRA Reply");
}
if (tree) {
diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c
index da88c46bbc..c983cd40df 100644
--- a/plugins/giop/packet-coseventcomm.c
+++ b/plugins/giop/packet-coseventcomm.c
@@ -650,8 +650,8 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
pinfo->current_proto = "COSEVENTCOMM";
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "COSEVENTCOMM");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "COSEVENTCOMM");
if (ptree) {
ti = proto_tree_add_item(ptree, proto_coseventcomm, tvb, *offset, tvb_length(tvb) - *offset, FALSE);
diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c
index cc76a50c63..b4326ecbab 100644
--- a/plugins/giop/packet-cosnaming.c
+++ b/plugins/giop/packet-cosnaming.c
@@ -1685,8 +1685,8 @@ static gboolean dissect_cosnaming(tvbuff_t *tvb, packet_info *pinfo, proto_tree
pinfo->current_proto = "COSNAMING";
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "COSNAMING");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "COSNAMING");
if (ptree) {
ti = proto_tree_add_item(ptree, proto_cosnaming, tvb, *offset, tvb_length(tvb) - *offset, FALSE);
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index 48eee98004..fdc451179c 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -3,7 +3,7 @@
* By Steve Limkemann <stevelim@dgtech.com>
* Copyright 1998 Steve Limkemann
*
- * $Id: packet-gryphon.c,v 1.25 2001/12/03 04:00:24 guy Exp $
+ * $Id: packet-gryphon.c,v 1.26 2001/12/10 00:26:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -157,24 +157,24 @@ dissect_gryphon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *gryphon_tree;
guint8 frmtyp;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "Gryphon");
- 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, "Gryphon");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
ti = proto_tree_add_item(tree, proto_gryphon, tvb, 0,
tvb_length(tvb), FALSE);
gryphon_tree = proto_item_add_subtree(ti, ett_gryphon);
- if (check_col(pinfo->fd, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* Indicate what kind of message the first message is.
*/
frmtyp = tvb_get_guint8(tvb, 6) & ~RESPONSE_FLAGS;
if (frmtyp >= SIZEOF (frame_type))
- col_set_str(pinfo->fd, COL_INFO, "- Invalid -");
+ col_set_str(pinfo->cinfo, COL_INFO, "- Invalid -");
else
- col_set_str(pinfo->fd, COL_INFO, frame_type[frmtyp]);
+ col_set_str(pinfo->cinfo, COL_INFO, frame_type[frmtyp]);
}
if (tree) {
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c
index 21b14036e5..bec38eb26c 100644
--- a/plugins/mgcp/packet-mgcp.c
+++ b/plugins/mgcp/packet-mgcp.c
@@ -2,7 +2,7 @@
* Routines for mgcp packet disassembly
* RFC 2705
*
- * $Id: packet-mgcp.c,v 1.28 2001/12/03 04:00:26 guy Exp $
+ * $Id: packet-mgcp.c,v 1.29 2001/12/10 00:26:21 guy Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
@@ -217,10 +217,10 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Set the columns now, so that they'll be set correctly if we throw
* an exception. We can set them later as well....
*/
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_add_str(pinfo->fd, COL_PROTOCOL, "MGCP");
- 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, "MGCP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
/*
* Check to see whether we're really dealing with MGCP by looking
@@ -266,24 +266,24 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* in order to prevent the column info changing to reflect the SDP.
*/
tvb_sectionbegin = 0;
- if (check_col(pinfo->fd, COL_PROTOCOL)){
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)){
if( global_mgcp_message_count == TRUE ){
if(num_messages > 1){
- col_add_fstr(pinfo->fd, COL_PROTOCOL, "MGCP (%i messages)",num_messages);
+ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "MGCP (%i messages)",num_messages);
}
else {
- col_add_fstr(pinfo->fd, COL_PROTOCOL, "MGCP (%i message)",num_messages);
+ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "MGCP (%i message)",num_messages);
}
}
else {
- col_add_str(pinfo->fd, COL_PROTOCOL, "MGCP");
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");
}
}
- if (check_col(pinfo->fd, COL_INFO) ){
+ if (check_col(pinfo->cinfo, COL_INFO) ){
sectionlen = tvb_find_line_end(tvb, tvb_sectionbegin,-1,
&tvb_sectionend);
- col_add_fstr(pinfo->fd,COL_INFO, "%s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
tvb_format_text(tvb,tvb_sectionbegin,sectionlen));
}
}
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index 744beb706e..3a6057ad7e 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -1,13 +1,12 @@
/* proto_hier_stats.c
* Routines for calculating statistics based on protocol.
*
- * $Id: proto_hier_stats.c,v 1.5 2001/12/06 04:25:07 gram Exp $
+ * $Id: proto_hier_stats.c,v 1.6 2001/12/10 00:25:41 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
* as published by the Free Software Foundation; either version 2
@@ -119,7 +118,7 @@ process_tree(proto_tree *protocol_tree, ph_stats_t* ps, guint pkt_len)
}
static void
-process_frame(frame_data *frame, ph_stats_t* ps)
+process_frame(frame_data *frame, column_info *cinfo, ph_stats_t* ps)
{
epan_dissect_t *edt;
union wtap_pseudo_header phdr;
@@ -130,7 +129,7 @@ process_frame(frame_data *frame, ph_stats_t* ps)
pd, frame->cap_len);
/* Dissect the frame */
- edt = epan_dissect_new(&phdr, pd, frame, TRUE);
+ edt = epan_dissect_new(&phdr, pd, frame, TRUE, cinfo);
/* Get stats from this protocol tree */
process_tree(edt->tree, ps, frame->pkt_len);
@@ -205,7 +204,7 @@ ph_stats_new(void)
probably do so for other loops (see "file.c") that
look only at those packets. */
if (frame->flags.passed_dfilter) {
- process_frame(frame, ps);
+ process_frame(frame, &cfile.cinfo, ps);
tot_packets++;
tot_bytes += frame->pkt_len;
diff --git a/tethereal.c b/tethereal.c
index b182bc2652..378e60a479 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.103 2001/12/06 04:25:07 gram Exp $
+ * $Id: tethereal.c,v 1.104 2001/12/10 00:25:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1168,7 +1168,6 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
fdata->pkt_len = phdr->len;
fdata->cap_len = phdr->caplen;
fdata->file_off = offset;
- fdata->cinfo = NULL;
fdata->lnk_t = phdr->pkt_encap;
fdata->abs_secs = phdr->ts.tv_sec;
fdata->abs_usecs = phdr->ts.tv_usec;
@@ -1213,12 +1212,6 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
fdata->abs_secs, fdata->abs_usecs, prevsec, prevusec);
prevsec = fdata->abs_secs;
prevusec = 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];
- }
}
/* Free up all data attached to a "frame_data" structure. */
@@ -1246,7 +1239,7 @@ wtap_dispatch_cb_write(u_char *user, const struct wtap_pkthdr *phdr,
cf->count++;
if (cf->rfcode) {
fill_in_fdata(&fdata, cf, phdr, pseudo_header, offset);
- edt = epan_dissect_new(pseudo_header, buf, &fdata, TRUE);
+ edt = epan_dissect_new(pseudo_header, buf, &fdata, TRUE, &cf->cinfo);
passed = dfilter_apply_edt(cf->rfcode, edt);
} else {
passed = TRUE;
@@ -1349,7 +1342,8 @@ wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr,
create_proto_tree = TRUE;
else
create_proto_tree = FALSE;
- 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 (cf->rfcode)
passed = dfilter_apply_edt(cf->rfcode, edt);
if (passed) {
@@ -1372,7 +1366,7 @@ wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr,
}
} else {
/* Just fill in the columns. */
- fill_in_columns(&fdata, &edt->pi);
+ fill_in_columns(&edt->pi);
/* Now print them. */
for (i = 0; i < cf->cinfo.num_cols; i++) {
@@ -1557,7 +1551,6 @@ wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr,
print_hex_data(stdout, print_args.format, &fdata);
putchar('\n');
}
- fdata.cinfo = NULL;
}
/* The ANSI C standard does not appear to *require* that a line-buffered
diff --git a/xdlc.c b/xdlc.c
index e2c3d733f2..ec0ca1ac69 100644
--- a/xdlc.c
+++ b/xdlc.c
@@ -2,12 +2,11 @@
* Routines for use by various SDLC-derived protocols, such as HDLC
* and its derivatives LAPB, IEEE 802.2 LLC, etc..
*
- * $Id: xdlc.c,v 1.15 2000/05/31 03:58:55 gram Exp $
+ * $Id: xdlc.c,v 1.16 2001/12/10 00:25:42 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
@@ -245,8 +244,8 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
""),
(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT);
}
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, info);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, info);
if (xdlc_tree) {
if (is_extended) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
@@ -320,8 +319,8 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
(is_response ? " F" : " P") :
""),
modifier);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, info);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, info);
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
offset, 1,
@@ -363,8 +362,8 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT,
(control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT);
}
- if (check_col(pinfo->fd, COL_INFO))
- col_add_str(pinfo->fd, COL_INFO, info);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_str(pinfo->cinfo, COL_INFO, info);
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
offset, (is_extended) ? 2 : 1,