Move the pointer to the "column_info" structure in the "frame_data"

structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

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

svn path=/trunk/; revision=4370
This commit is contained in:
Guy Harris 2001-12-10 00:26:21 +00:00
parent a81a607ed5
commit 23319ff023
196 changed files with 2585 additions and 2621 deletions

View File

@ -1,12 +1,11 @@
/* column-utils.c
* Routines for column utilities.
*
* $Id: column-utils.c,v 1.7 2001/11/21 23:16:23 gram Exp $
* $Id: column-utils.c,v 1.8 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -67,41 +66,33 @@ col_init(column_info *col_info, gint num_cols)
col_info->col_buf = (gchar **) g_malloc(sizeof(gchar *) * num_cols);
}
#if 0
/*
* This function does not appear to be used anywhere...
*/
gboolean
col_get_writable(frame_data *fd)
col_get_writable(column_info *cinfo)
{
if (fd) {
return (fd->cinfo ? fd->cinfo->writable : FALSE);
}
return FALSE;
return (cinfo ? cinfo->writable : FALSE);
}
*/
#endif
void
col_set_writable(frame_data *fd, gboolean writable)
col_set_writable(column_info *cinfo, gboolean writable)
{
if (fd->cinfo) {
fd->cinfo->writable = writable;
}
if (cinfo)
cinfo->writable = writable;
}
/* Checks to see if a particular packet information element is needed for
the packet list */
gint
check_col(frame_data *fd, gint el) {
check_col(column_info *cinfo, gint el) {
int i;
if (fd->cinfo && fd->cinfo->writable) {
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el])
if (cinfo && cinfo->writable) {
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el])
return TRUE;
}
}
@ -117,13 +108,13 @@ check_col(frame_data *fd, gint el) {
later append to it, as the later append will cause a string
copy to be done. */
void
col_clear(frame_data *fd, gint el) {
col_clear(column_info *cinfo, gint el) {
int i;
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
fd->cinfo->col_buf[i][0] = 0;
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
cinfo->col_buf[i][0] = 0;
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
@ -131,18 +122,18 @@ col_clear(frame_data *fd, gint el) {
/* Use this if "str" points to something that will stay around (and thus
needn't be copied). */
void
col_set_str(frame_data *fd, gint el, gchar* str) {
col_set_str(column_info *cinfo, gint el, gchar* str) {
int i;
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el])
fd->cinfo->col_data[i] = str;
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el])
cinfo->col_data[i] = str;
}
}
/* Adds a vararg list to a packet info string. */
void
col_add_fstr(frame_data *fd, gint el, gchar *format, ...) {
col_add_fstr(column_info *cinfo, gint el, gchar *format, ...) {
va_list ap;
int i;
size_t max_len;
@ -153,17 +144,17 @@ col_add_fstr(frame_data *fd, gint el, gchar *format, ...) {
max_len = COL_MAX_LEN;
va_start(ap, format);
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
vsnprintf(fd->cinfo->col_buf[i], max_len, format, ap);
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
vsnprintf(cinfo->col_buf[i], max_len, format, ap);
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
/* Appends a vararg list to a packet info string. */
void
col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
col_append_fstr(column_info *cinfo, gint el, gchar *format, ...) {
va_list ap;
int i;
size_t len, max_len;
@ -174,17 +165,17 @@ col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
max_len = COL_MAX_LEN;
va_start(ap, format);
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
if (cinfo->col_data[i] != cinfo->col_buf[i]) {
/* This was set with "col_set_str()"; copy the string they
set it to into the buffer, so we can append to it. */
strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
fd->cinfo->col_buf[i][max_len - 1] = '\0';
strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
cinfo->col_buf[i][max_len - 1] = '\0';
}
len = strlen(fd->cinfo->col_buf[i]);
vsnprintf(&fd->cinfo->col_buf[i][len], max_len - len, format, ap);
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
len = strlen(cinfo->col_buf[i]);
vsnprintf(&cinfo->col_buf[i][len], max_len - len, format, ap);
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
@ -192,7 +183,7 @@ col_append_fstr(frame_data *fd, gint el, gchar *format, ...) {
/* Use this if "str" points to something that won't stay around (and
must thus be copied). */
void
col_add_str(frame_data *fd, gint el, const gchar* str) {
col_add_str(column_info *cinfo, gint el, const gchar* str) {
int i;
size_t max_len;
@ -201,17 +192,17 @@ col_add_str(frame_data *fd, gint el, const gchar* str) {
else
max_len = COL_MAX_LEN;
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
strncpy(fd->cinfo->col_buf[i], str, max_len);
fd->cinfo->col_buf[i][max_len - 1] = 0;
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
strncpy(cinfo->col_buf[i], str, max_len);
cinfo->col_buf[i][max_len - 1] = 0;
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
void
col_append_str(frame_data *fd, gint el, gchar* str) {
col_append_str(column_info *cinfo, gint el, gchar* str) {
int i;
size_t len, max_len;
@ -220,24 +211,24 @@ col_append_str(frame_data *fd, gint el, gchar* str) {
else
max_len = COL_MAX_LEN;
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
if (cinfo->col_data[i] != cinfo->col_buf[i]) {
/* This was set with "col_set_str()"; copy the string they
set it to into the buffer, so we can append to it. */
strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
fd->cinfo->col_buf[i][max_len - 1] = '\0';
strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
cinfo->col_buf[i][max_len - 1] = '\0';
}
len = strlen(fd->cinfo->col_buf[i]);
strncat(fd->cinfo->col_buf[i], str, max_len - len);
fd->cinfo->col_buf[i][max_len - 1] = 0;
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
len = strlen(cinfo->col_buf[i]);
strncat(cinfo->col_buf[i], str, max_len - len);
cinfo->col_buf[i][max_len - 1] = 0;
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
static void
col_set_abs_date_time(frame_data *fd, int col)
col_set_abs_date_time(frame_data *fd, column_info *cinfo, int col)
{
struct tm *tmp;
time_t then;
@ -245,7 +236,7 @@ col_set_abs_date_time(frame_data *fd, int col)
then = fd->abs_secs;
tmp = localtime(&then);
if (tmp != NULL) {
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN,
snprintf(cinfo->col_buf[col], COL_MAX_LEN,
"%04d-%02d-%02d %02d:%02d:%02d.%04ld",
tmp->tm_year + 1900,
tmp->tm_mon + 1,
@ -255,31 +246,31 @@ col_set_abs_date_time(frame_data *fd, int col)
tmp->tm_sec,
(long)fd->abs_usecs/100);
} else {
fd->cinfo->col_buf[col][0] = '\0';
cinfo->col_buf[col][0] = '\0';
}
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
cinfo->col_data[col] = cinfo->col_buf[col];
}
static void
col_set_rel_time(frame_data *fd, int col)
col_set_rel_time(frame_data *fd, column_info *cinfo, int col)
{
display_signed_time(fd->cinfo->col_buf[col], COL_MAX_LEN,
display_signed_time(cinfo->col_buf[col], COL_MAX_LEN,
fd->rel_secs, fd->rel_usecs, USECS);
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
cinfo->col_data[col] = cinfo->col_buf[col];
}
static void
col_set_delta_time(frame_data *fd, int col)
col_set_delta_time(frame_data *fd, column_info *cinfo, int col)
{
display_signed_time(fd->cinfo->col_buf[col], COL_MAX_LEN,
display_signed_time(cinfo->col_buf[col], COL_MAX_LEN,
fd->del_secs, fd->del_usecs, USECS);
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
cinfo->col_data[col] = cinfo->col_buf[col];
}
/* To do: Add check_col checks to the col_add* routines */
static void
col_set_abs_time(frame_data *fd, int col)
col_set_abs_time(frame_data *fd, column_info *cinfo, int col)
{
struct tm *tmp;
time_t then;
@ -287,15 +278,15 @@ col_set_abs_time(frame_data *fd, int col)
then = fd->abs_secs;
tmp = localtime(&then);
if (tmp != NULL) {
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%02d:%02d:%02d.%04ld",
snprintf(cinfo->col_buf[col], COL_MAX_LEN, "%02d:%02d:%02d.%04ld",
tmp->tm_hour,
tmp->tm_min,
tmp->tm_sec,
(long)fd->abs_usecs/100);
} else {
fd->cinfo->col_buf[col][0] = '\0';
cinfo->col_buf[col][0] = '\0';
}
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
cinfo->col_data[col] = cinfo->col_buf[col];
}
/* Add "command-line-specified" time.
@ -306,29 +297,29 @@ col_set_abs_time(frame_data *fd, int col)
requiring us to stuff the text into the widget from outside, we
might be able to clean this up. */
void
col_set_cls_time(frame_data *fd, int col)
col_set_cls_time(frame_data *fd, column_info *cinfo, int col)
{
switch (timestamp_type) {
case ABSOLUTE:
col_set_abs_time(fd, col);
col_set_abs_time(fd, cinfo, col);
break;
case ABSOLUTE_WITH_DATE:
col_set_abs_date_time(fd, col);
col_set_abs_date_time(fd, cinfo, col);
break;
case RELATIVE:
col_set_rel_time(fd, col);
col_set_rel_time(fd, cinfo, col);
break;
case DELTA:
col_set_delta_time(fd, col);
col_set_delta_time(fd, cinfo, col);
break;
}
}
static void
col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
col_set_addr(packet_info *pinfo, int col, address *addr, gboolean is_res)
{
guint32 ipv4_addr;
struct e_in6_addr ipv6_addr;
@ -339,82 +330,82 @@ col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
case AT_ETHER:
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_ether_name(addr->data), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_ether_name(addr->data), COL_MAX_LEN);
else
strncpy(fd->cinfo->col_buf[col], ether_to_str(addr->data), COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
strncpy(pinfo->cinfo->col_buf[col], ether_to_str(addr->data), COL_MAX_LEN);
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_IPv4:
memcpy(&ipv4_addr, addr->data, sizeof ipv4_addr);
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_hostname(ipv4_addr), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_hostname(ipv4_addr), COL_MAX_LEN);
else
strncpy(fd->cinfo->col_buf[col], ip_to_str(addr->data), COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
strncpy(pinfo->cinfo->col_buf[col], ip_to_str(addr->data), COL_MAX_LEN);
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_IPv6:
memcpy(&ipv6_addr.s6_addr, addr->data, sizeof ipv6_addr.s6_addr);
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_hostname6(&ipv6_addr), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_hostname6(&ipv6_addr), COL_MAX_LEN);
else
strncpy(fd->cinfo->col_buf[col], ip6_to_str(&ipv6_addr), COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
strncpy(pinfo->cinfo->col_buf[col], ip6_to_str(&ipv6_addr), COL_MAX_LEN);
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_IPX:
strncpy(fd->cinfo->col_buf[col],
strncpy(pinfo->cinfo->col_buf[col],
ipx_addr_to_str(pntohl(&addr->data[0]), &addr->data[4]), COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_SNA:
switch (addr->len) {
case 1:
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%04X", addr->data[0]);
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%04X", addr->data[0]);
break;
case 2:
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%04X",
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%04X",
pntohs(&addr->data[0]));
break;
case SNA_FID_TYPE_4_ADDR_LEN:
memcpy(&sna_fid_type_4_addr, addr->data, SNA_FID_TYPE_4_ADDR_LEN);
strncpy(fd->cinfo->col_buf[col],
strncpy(pinfo->cinfo->col_buf[col],
sna_fid_type_4_addr_to_str(&sna_fid_type_4_addr), COL_MAX_LEN);
break;
}
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_ATALK:
memcpy(&ddp_addr, addr->data, sizeof ddp_addr);
strncpy(fd->cinfo->col_buf[col], atalk_addr_to_str(&ddp_addr),
strncpy(pinfo->cinfo->col_buf[col], atalk_addr_to_str(&ddp_addr),
COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_VINES:
strncpy(fd->cinfo->col_buf[col], vines_addr_to_str(&addr->data[0]),
strncpy(pinfo->cinfo->col_buf[col], vines_addr_to_str(&addr->data[0]),
COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
case AT_OSI:
strncpy(fd->cinfo->col_buf[col], print_nsap_net(addr->data, addr->len),
strncpy(pinfo->cinfo->col_buf[col], print_nsap_net(addr->data, addr->len),
COL_MAX_LEN);
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
break;
default:
@ -423,142 +414,142 @@ col_set_addr(frame_data *fd, int col, address *addr, gboolean is_res)
}
static void
col_set_port(frame_data *fd, int col, port_type ptype, guint32 port,
col_set_port(packet_info *pinfo, int col, port_type ptype, guint32 port,
gboolean is_res)
{
switch (ptype) {
case PT_SCTP:
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_sctp_port(port), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_sctp_port(port), COL_MAX_LEN);
else
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
break;
case PT_TCP:
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);
else
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
break;
case PT_UDP:
if (is_res)
strncpy(fd->cinfo->col_buf[col], get_udp_port(port), COL_MAX_LEN);
strncpy(pinfo->cinfo->col_buf[col], get_udp_port(port), COL_MAX_LEN);
else
snprintf(fd->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
break;
default:
break;
}
fd->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
fd->cinfo->col_data[col] = fd->cinfo->col_buf[col];
pinfo->cinfo->col_buf[col][COL_MAX_LEN - 1] = '\0';
pinfo->cinfo->col_data[col] = pinfo->cinfo->col_buf[col];
}
void
fill_in_columns(frame_data *fd, packet_info *pinfo)
fill_in_columns(packet_info *pinfo)
{
int i;
for (i = 0; i < fd->cinfo->num_cols; i++) {
switch (fd->cinfo->col_fmt[i]) {
for (i = 0; i < pinfo->cinfo->num_cols; i++) {
switch (pinfo->cinfo->col_fmt[i]) {
case COL_NUMBER:
snprintf(fd->cinfo->col_buf[i], COL_MAX_LEN, "%u", fd->num);
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%u", pinfo->fd->num);
pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i];
break;
case COL_CLS_TIME:
col_set_cls_time(fd, i);
col_set_cls_time(pinfo->fd, pinfo->cinfo, i);
break;
case COL_ABS_TIME:
col_set_abs_time(fd, i);
col_set_abs_time(pinfo->fd, pinfo->cinfo, i);
break;
case COL_ABS_DATE_TIME:
col_set_abs_date_time(fd, i);
col_set_abs_date_time(pinfo->fd, pinfo->cinfo, i);
break;
case COL_REL_TIME:
col_set_rel_time(fd, i);
col_set_rel_time(pinfo->fd, pinfo->cinfo, i);
break;
case COL_DELTA_TIME:
col_set_delta_time(fd, i);
col_set_delta_time(pinfo->fd, pinfo->cinfo, i);
break;
case COL_DEF_SRC:
case COL_RES_SRC: /* COL_DEF_SRC is currently just like COL_RES_SRC */
col_set_addr(fd, i, &pinfo->src, TRUE);
col_set_addr(pinfo, i, &pinfo->src, TRUE);
break;
case COL_UNRES_SRC:
col_set_addr(fd, i, &pinfo->src, FALSE);
col_set_addr(pinfo, i, &pinfo->src, FALSE);
break;
case COL_DEF_DL_SRC:
case COL_RES_DL_SRC:
col_set_addr(fd, i, &pinfo->dl_src, TRUE);
col_set_addr(pinfo, i, &pinfo->dl_src, TRUE);
break;
case COL_UNRES_DL_SRC:
col_set_addr(fd, i, &pinfo->dl_src, FALSE);
col_set_addr(pinfo, i, &pinfo->dl_src, FALSE);
break;
case COL_DEF_NET_SRC:
case COL_RES_NET_SRC:
col_set_addr(fd, i, &pinfo->net_src, TRUE);
col_set_addr(pinfo, i, &pinfo->net_src, TRUE);
break;
case COL_UNRES_NET_SRC:
col_set_addr(fd, i, &pinfo->net_src, FALSE);
col_set_addr(pinfo, i, &pinfo->net_src, FALSE);
break;
case COL_DEF_DST:
case COL_RES_DST: /* COL_DEF_DST is currently just like COL_RES_DST */
col_set_addr(fd, i, &pinfo->dst, TRUE);
col_set_addr(pinfo, i, &pinfo->dst, TRUE);
break;
case COL_UNRES_DST:
col_set_addr(fd, i, &pinfo->dst, FALSE);
col_set_addr(pinfo, i, &pinfo->dst, FALSE);
break;
case COL_DEF_DL_DST:
case COL_RES_DL_DST:
col_set_addr(fd, i, &pinfo->dl_dst, TRUE);
col_set_addr(pinfo, i, &pinfo->dl_dst, TRUE);
break;
case COL_UNRES_DL_DST:
col_set_addr(fd, i, &pinfo->dl_dst, FALSE);
col_set_addr(pinfo, i, &pinfo->dl_dst, FALSE);
break;
case COL_DEF_NET_DST:
case COL_RES_NET_DST:
col_set_addr(fd, i, &pinfo->net_dst, TRUE);
col_set_addr(pinfo, i, &pinfo->net_dst, TRUE);
break;
case COL_UNRES_NET_DST:
col_set_addr(fd, i, &pinfo->net_dst, FALSE);
col_set_addr(pinfo, i, &pinfo->net_dst, FALSE);
break;
case COL_DEF_SRC_PORT:
case COL_RES_SRC_PORT: /* COL_DEF_SRC_PORT is currently just like COL_RES_SRC_PORT */
col_set_port(fd, i, pinfo->ptype, pinfo->srcport, TRUE);
col_set_port(pinfo, i, pinfo->ptype, pinfo->srcport, TRUE);
break;
case COL_UNRES_SRC_PORT:
col_set_port(fd, i, pinfo->ptype, pinfo->srcport, FALSE);
col_set_port(pinfo, i, pinfo->ptype, pinfo->srcport, FALSE);
break;
case COL_DEF_DST_PORT:
case COL_RES_DST_PORT: /* COL_DEF_DST_PORT is currently just like COL_RES_DST_PORT */
col_set_port(fd, i, pinfo->ptype, pinfo->destport, TRUE);
col_set_port(pinfo, i, pinfo->ptype, pinfo->destport, TRUE);
break;
case COL_UNRES_DST_PORT:
col_set_port(fd, i, pinfo->ptype, pinfo->destport, FALSE);
col_set_port(pinfo, i, pinfo->ptype, pinfo->destport, FALSE);
break;
case COL_PROTOCOL: /* currently done by dissectors */
@ -566,8 +557,8 @@ fill_in_columns(frame_data *fd, packet_info *pinfo)
break;
case COL_PACKET_LENGTH:
snprintf(fd->cinfo->col_buf[i], COL_MAX_LEN, "%d", fd->pkt_len);
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
snprintf(pinfo->cinfo->col_buf[i], COL_MAX_LEN, "%d", pinfo->fd->pkt_len);
pinfo->cinfo->col_data[i] = pinfo->cinfo->col_buf[i];
break;
case NUM_COL_FMTS: /* keep compiler happy - shouldn't get here */
@ -575,9 +566,3 @@ fill_in_columns(frame_data *fd, packet_info *pinfo)
}
}
}

View File

@ -1,7 +1,7 @@
/* column-utils.h
* Definitions for column utility structures and routines
*
* $Id: column-utils.h,v 1.4 2001/11/21 23:16:23 gram Exp $
* $Id: column-utils.h,v 1.5 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,7 +31,6 @@
#define COL_MAX_INFO_LEN 4096
#include "column_info.h"
#include "frame_data.h"
#include "packet_info.h"
/* Allocate all the data structures for constructing column data, given
@ -40,25 +39,22 @@ extern void col_init(column_info *, gint);
/* Utility routines used by packet*.c */
extern void col_set_writable(frame_data *fd, gboolean writable);
extern gint check_col(frame_data *, gint);
extern void col_clear(frame_data *, gint);
extern void col_set_str(frame_data *, gint, gchar *);
extern void col_set_writable(column_info *, gboolean);
extern gint check_col(column_info *, gint);
extern void col_clear(column_info *, gint);
extern void col_set_str(column_info *, gint, gchar *);
#if __GNUC__ >= 2
extern void col_add_fstr(frame_data *, gint, gchar *, ...)
extern void col_add_fstr(column_info *, gint, gchar *, ...)
__attribute__((format (printf, 3, 4)));
extern void col_append_fstr(frame_data *, gint, gchar *, ...)
extern void col_append_fstr(column_info *, gint, gchar *, ...)
__attribute__((format (printf, 3, 4)));
#else
extern void col_add_fstr(frame_data *, gint, gchar *, ...);
extern void col_append_fstr(frame_data *, gint, gchar *, ...);
extern void col_add_fstr(column_info *, gint, gchar *, ...);
extern void col_append_fstr(column_info *, gint, gchar *, ...);
#endif
extern void col_add_str(frame_data *, gint, const gchar *);
extern void col_append_str(frame_data *, gint, gchar *);
extern void col_set_cls_time(frame_data *, int);
extern void fill_in_columns(frame_data *, packet_info *);
extern void col_add_str(column_info *, gint, const gchar *);
extern void col_append_str(column_info *, gint, gchar *);
extern void col_set_cls_time(frame_data *, column_info *, int);
extern void fill_in_columns(packet_info *);
#endif /* __COLUMN_UTILS_H__ */

View File

@ -1,6 +1,6 @@
/* epan.h
*
* $Id: epan.c,v 1.12 2001/12/06 04:25:08 gram Exp $
* $Id: epan.c,v 1.13 2001/12/10 00:26:16 guy Exp $
*
* Ethereal Protocol Analyzer Library
*
@ -75,7 +75,7 @@ epan_conversation_init(void)
epan_dissect_t*
epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
gboolean create_proto_tree)
gboolean create_proto_tree, column_info *cinfo)
{
epan_dissect_t *edt;
@ -93,7 +93,7 @@ epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
edt->tree = NULL;
}
dissect_packet(edt, pseudo_header, data, fd);
dissect_packet(edt, pseudo_header, data, fd, cinfo);
return edt;
}

View File

@ -1,6 +1,6 @@
/* epan.h
*
* $Id: epan.h,v 1.9 2001/12/06 04:25:08 gram Exp $
* $Id: epan.h,v 1.10 2001/12/10 00:26:16 guy Exp $
*
* Ethereal Protocol Analyzer Library
*
@ -51,12 +51,12 @@ epan_free(epan_t*);
typedef struct _epan_dissect_t {
tvbuff_t *tvb;
proto_tree *tree;
packet_info pi;
packet_info pi;
} epan_dissect_t;
epan_dissect_t*
epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
gboolean create_proto_tree);
gboolean create_proto_tree, column_info *cinfo);
void
epan_dissect_free(epan_dissect_t* edt);

View File

@ -1,12 +1,11 @@
/* frame_data.h
* Definitions for frame_data structures and routines
*
* $Id: frame_data.h,v 1.1 2001/04/01 04:11:50 hagbard Exp $
* $Id: frame_data.h,v 1.2 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -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...) */

View File

@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
* $Id: packet.c,v 1.53 2001/12/08 21:00:42 guy Exp $
* $Id: packet.c,v 1.54 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -152,8 +152,10 @@ init_all_protocols(void)
/* Creates the top-most tvbuff and calls dissect_frame() */
void
dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
const u_char *pd, frame_data *fd)
const u_char *pd, frame_data *fd, column_info *cinfo)
{
int i;
edt->pi.dl_src.type = AT_NONE;
edt->pi.dl_dst.type = AT_NONE;
edt->pi.net_src.type = AT_NONE;
@ -174,7 +176,15 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
edt->pi.fd = fd;
edt->pi.pseudo_header = pseudo_header;
col_set_writable(fd, TRUE);
edt->pi.cinfo = cinfo;
if (cinfo != NULL) {
for (i = 0; i < cinfo->num_cols; i++) {
cinfo->col_buf[i][0] = '\0';
cinfo->col_data[i] = cinfo->col_buf[i];
}
col_set_writable(cinfo, TRUE);
}
TRY {
edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");

View File

@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
* $Id: packet.h,v 1.46 2001/12/08 06:41:47 guy Exp $
* $Id: packet.h,v 1.47 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -228,7 +228,7 @@ extern void init_all_protocols(void);
*/
extern void dissect_packet(struct _epan_dissect_t *edt,
union wtap_pseudo_header *pseudo_header, const u_char *pd,
frame_data *fd);
frame_data *fd, column_info *cinfo);
/* These functions are in packet-ethertype.c */
extern void capture_ethertype(guint16 etype, const u_char *pd, int offset,

View File

@ -1,7 +1,7 @@
/* packet_info.h
* Definitions for packet info structures and routines
*
* $Id: packet_info.h,v 1.12 2001/11/29 09:05:25 guy Exp $
* $Id: packet_info.h,v 1.13 2001/12/10 00:26:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -89,6 +89,7 @@ typedef enum {
typedef struct _packet_info {
const char *current_proto; /* name of protocol currently being dissected */
column_info *cinfo; /* Column formatting information */
frame_data *fd;
union wtap_pseudo_header *pseudo_header;
address dl_src; /* link-layer source address */

43
file.c
View File

@ -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.

View File

@ -3,7 +3,7 @@
*
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet_win.c,v 1.27 2001/12/06 04:25:09 gram Exp $
* $Id: packet_win.c,v 1.28 2001/12/10 00:26:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -168,7 +168,7 @@ create_new_window(char *Title, gint tv_size, gint bv_size)
memcpy(DataPtr->pd, cfile.pd, DataPtr->frame->cap_len);
proto_tree_is_visible = TRUE;
DataPtr->edt = epan_dissect_new(&DataPtr->pseudo_header, DataPtr->pd, DataPtr->frame,
TRUE);
TRUE, &cfile.cinfo);
proto_tree_is_visible = FALSE;
DataPtr->main = main_w;
DataPtr->tv_scrollw = tv_scrollw;

View File

@ -1,7 +1,7 @@
/* packet-aarp.c
* Routines for Appletalk ARP packet disassembly
*
* $Id: packet-aarp.c,v 1.32 2001/12/03 03:59:33 guy Exp $
* $Id: packet-aarp.c,v 1.33 2001/12/10 00:25:25 guy Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -145,10 +145,10 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
const guint8 *sha_val, *spa_val, *tha_val, *tpa_val;
gchar *sha_str, *spa_str, *tha_str, *tpa_str;
if(check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "AARP");
if(check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if(check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AARP");
if(check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
ar_hrd = tvb_get_ntohs(tvb, AR_HRD);
ar_pro = tvb_get_ntohs(tvb, AR_PRO);
@ -173,22 +173,22 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_pln);
tpa_str = aarpproaddr_to_str(tpa_val, ar_pln, ar_pro);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (ar_op) {
case AARP_REQUEST:
case AARP_REQUEST_SWAPPED:
col_add_fstr(pinfo->fd, COL_INFO, "Who has %s? Tell %s", tpa_str, spa_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", tpa_str, spa_str);
break;
case AARP_REPLY:
case AARP_REPLY_SWAPPED:
col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", spa_str, sha_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", spa_str, sha_str);
break;
case AARP_PROBE:
case AARP_PROBE_SWAPPED:
col_add_fstr(pinfo->fd, COL_INFO, "Is there a %s", tpa_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "Is there a %s", tpa_str);
break;
default:
col_add_fstr(pinfo->fd, COL_INFO, "Unknown AARP opcode 0x%04x", ar_op);
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown AARP opcode 0x%04x", ar_op);
break;
}
}

View File

@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
* $Id: packet-afs.c,v 1.35 2001/11/03 00:58:49 guy Exp $
* $Id: packet-afs.c,v 1.36 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -196,11 +196,11 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void (*dissector)(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode);
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "AFS (RX)");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AFS (RX)");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}
reply = (rxinfo->flags & RX_CLIENT_INITIATED) == 0;
@ -334,23 +334,23 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( VALID_OPCODE(opcode) ) {
if ( vals ) {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s%s %s: %s (%d)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: %s (%d)",
typenode == hf_afs_ubik ? "UBIK-" : "",
val_to_str(port, port_types_short, "Unknown(%d)"),
reply ? "Reply" : "Request",
val_to_str(opcode, vals, "Unknown(%d)"), opcode);
} else {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s%s %s: Unknown(%d)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: Unknown(%d)",
typenode == hf_afs_ubik ? "UBIK-" : "",
val_to_str(port, port_types_short, "Unknown(%d)"),
reply ? "Reply" : "Request",
opcode);
}
} else {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Encrypted %s %s",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Encrypted %s %s",
val_to_str(port, port_types_short, "Unknown(%d)"),
reply ? "Reply" : "Request"
);

View File

@ -2,7 +2,7 @@
* Routines for AIM Instant Messenger (OSCAR) dissection
* Copyright 2000, Ralf Hoelzer <ralf@well.com>
*
* $Id: packet-aim.c,v 1.10 2001/12/03 03:59:33 guy Exp $
* $Id: packet-aim.c,v 1.11 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -127,11 +127,11 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "AIM");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIM");
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "AOL Instant Messenger");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, "AOL Instant Messenger");
/* get relevant header information */
@ -158,7 +158,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* New connection request */
case CHANNEL_NEW_CONN:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "New Connection");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "New Connection");
break;
/* SNAC channel. Most packets are of this type, such as messages or buddy list
@ -168,8 +168,8 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
family = tvb_get_ntohs(tvb, 6);
subtype = tvb_get_ntohs(tvb, 8);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "SNAC data");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "SNAC data");
}
if( tree )
{
@ -181,7 +181,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Family: %d - Subtype: %d (unknown)", family, subtype);
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Family: %d - Subtype: %d (unknown)", family, subtype);
switch(family)
{
@ -191,9 +191,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 0x0002:
buddyname_length = get_buddyname( buddyname, tvb, 19, 20 );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Login");
col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Login");
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
}
if( tree )
@ -203,14 +203,14 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Login information reply");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Login information reply");
break;
case 0x0006:
buddyname_length = get_buddyname( buddyname, tvb, 19, 20 );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Sign-on");
col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Sign-on");
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
}
if( tree )
@ -220,7 +220,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case 0x0007:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Sign-on reply");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Sign-on reply");
break;
}
break;
@ -229,28 +229,28 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(subtype)
{
case 0x0002:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Client is now online and ready for normal function");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Client is now online and ready for normal function");
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Server is now ready for normal functions");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Server is now ready for normal functions");
break;
case 0x0004:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request for new service (server will redirect client)");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request for new service (server will redirect client)");
break;
case 0x0005:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Redirect response");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Redirect response");
break;
case 0x0006:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rate Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rate Information");
break;
case 0x0007:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rate information response");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rate information response");
break;
case 0x0008:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rate Information Response Ack");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rate Information Response Ack");
break;
case 0x0016:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "No-op");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "No-op");
break;
}
break;
@ -259,31 +259,31 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(subtype)
{
case 0x0001:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Buddylist - Error");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Buddylist - Error");
break;
case 0x0002:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rights information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rights information");
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rights information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rights information");
break;
case 0x0004:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Add to Buddylist");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Add to Buddylist");
break;
case 0x0005:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Remove from Buddylist");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Remove from Buddylist");
break;
case 0x000b:
buddyname_length = get_buddyname( buddyname, tvb, 16, 17 );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Oncoming Buddy");
col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Oncoming Buddy");
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
}
if( tree )
@ -297,9 +297,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
buddyname_length = get_buddyname( buddyname, tvb, 16, 17 );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Offgoing Buddy");
col_append_fstr(pinfo->fd, COL_INFO, ": %s", buddyname);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Offgoing Buddy");
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", buddyname);
}
if( tree )
@ -316,28 +316,28 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(subtype)
{
case 0x0001:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Location - Error");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Location - Error");
break;
case 0x0002:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request Rights Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request Rights Information");
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Rights Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Rights Information");
break;
case 0x0004:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Set User Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Set User Information");
break;
case 0x0005:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Request User Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Request User Information");
break;
case 0x0006:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "User Information");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "User Information");
break;
case 0x0007:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Watcher Subrequest");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Watcher Subrequest");
break;
case 0x0008:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Watcher Notification");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Watcher Notification");
break;
}
break;
@ -346,13 +346,13 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(subtype)
{
case 0x0001:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisements - Error");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisements - Error");
break;
case 0x0002:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisement Request");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisement Request");
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Advertisement data (GIF)");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Advertisement data (GIF)");
break;
}
break;
@ -361,13 +361,13 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(subtype)
{
case 0x0001:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Search - Error (could be: not found)");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Search - Error (could be: not found)");
break;
case 0x0002:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Search for Screen Name by e-mail");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Search for Screen Name by e-mail");
break;
case 0x0003:
if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Screen Name Search Result");
if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Screen Name Search Result");
break;
}
break;
@ -379,9 +379,9 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* channel message from client */
get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb) - 40 - buddyname_length );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Chat Message ");
col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Chat Message ");
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
}
break;
@ -390,10 +390,10 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
buddyname_length = get_buddyname( buddyname, tvb, 30, 31 );
get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Chat Message ");
col_append_fstr(pinfo->fd, COL_INFO, "from: %s", buddyname);
col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Chat Message ");
col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
}
if( tree )
@ -413,10 +413,10 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length );
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Message ");
col_append_fstr(pinfo->fd, COL_INFO, "to: %s", buddyname);
col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Message ");
col_append_fstr(pinfo->cinfo, COL_INFO, "to: %s", buddyname);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
}
if( tree )
@ -431,11 +431,11 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Message");
col_append_fstr(pinfo->fd, COL_INFO, " from: %s", buddyname);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Message");
col_append_fstr(pinfo->cinfo, COL_INFO, " from: %s", buddyname);
col_append_fstr(pinfo->fd, COL_INFO, " -> %s", msg);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
}
if( tree )
@ -453,20 +453,20 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case CHANNEL_FLAP_ERR:
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "FLAP error");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "FLAP error");
}
break;
case CHANNEL_CLOSE_CONN:
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Close Connection");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Close Connection");
}
break;
default:
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Unknown Channel: %d", hdr_channel );
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown Channel: %d", hdr_channel );
}
break;
}

View File

@ -1,7 +1,7 @@
/* packet-arp.c
* Routines for ARP packet disassembly
*
* $Id: packet-arp.c,v 1.47 2001/12/03 03:59:33 guy Exp $
* $Id: packet-arp.c,v 1.48 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -481,41 +481,41 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_tpln);
tpa_str = arpproaddr_to_str(tpa_val, ar_tpln, ar_pro);
if (check_col(pinfo->fd, COL_PROTOCOL)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
switch (ar_op) {
case ARPOP_REQUEST:
case ARPOP_REPLY:
case ATMARPOP_NAK:
default:
col_set_str(pinfo->fd, COL_PROTOCOL, "ATMARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP");
break;
case ARPOP_RREQUEST:
case ARPOP_RREPLY:
col_set_str(pinfo->fd, COL_PROTOCOL, "ATMRARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP");
break;
case ARPOP_IREQUEST:
case ARPOP_IREPLY:
col_set_str(pinfo->fd, COL_PROTOCOL, "Inverse ATMARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP");
break;
}
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (ar_op) {
case ARPOP_REQUEST:
col_add_fstr(pinfo->fd, COL_INFO, "Who has %s? Tell %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s",
tpa_str, spa_str);
break;
case ARPOP_REPLY:
col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s%s%s", spa_str, sha_str,
col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s%s%s", spa_str, sha_str,
((ssa_str != NULL) ? "," : ""),
((ssa_str != NULL) ? ssa_str : ""));
break;
case ARPOP_IREQUEST:
col_add_fstr(pinfo->fd, COL_INFO, "Who is %s%s%s? Tell %s%s%s",
col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s%s%s? Tell %s%s%s",
tha_str,
((tsa_str != NULL) ? "," : ""),
((tsa_str != NULL) ? tsa_str : ""),
@ -524,17 +524,17 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
((ssa_str != NULL) ? ssa_str : ""));
break;
case ARPOP_IREPLY:
col_add_fstr(pinfo->fd, COL_INFO, "%s%s%s is at %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s is at %s",
sha_str,
((ssa_str != NULL) ? "," : ""),
((ssa_str != NULL) ? ssa_str : ""),
spa_str);
break;
case ATMARPOP_NAK:
col_add_fstr(pinfo->fd, COL_INFO, "I don't know where %s is", spa_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "I don't know where %s is", spa_str);
break;
default:
col_add_fstr(pinfo->fd, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op);
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op);
break;
}
}
@ -655,10 +655,10 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Clear the Info column so that, if we throw an exception, it
shows up as a short or malformed ARP frame. */
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ARP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
ar_hrd = tvb_get_ntohs(tvb, AR_HRD);
if (ar_hrd == ARPHRD_ATM2225) {
@ -694,45 +694,45 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_pln);
tpa_str = arpproaddr_to_str(tpa_val, ar_pln, ar_pro);
if (check_col(pinfo->fd, COL_PROTOCOL)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
switch (ar_op) {
case ARPOP_REQUEST:
case ARPOP_REPLY:
default:
col_set_str(pinfo->fd, COL_PROTOCOL, "ARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP");
break;
case ARPOP_RREQUEST:
case ARPOP_RREPLY:
col_set_str(pinfo->fd, COL_PROTOCOL, "RARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP");
break;
case ARPOP_IREQUEST:
case ARPOP_IREPLY:
col_set_str(pinfo->fd, COL_PROTOCOL, "Inverse ARP");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP");
break;
}
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (ar_op) {
case ARPOP_REQUEST:
col_add_fstr(pinfo->fd, COL_INFO, "Who has %s? Tell %s", tpa_str, spa_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", tpa_str, spa_str);
break;
case ARPOP_REPLY:
col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", spa_str, sha_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", spa_str, sha_str);
break;
case ARPOP_RREQUEST:
case ARPOP_IREQUEST:
col_add_fstr(pinfo->fd, COL_INFO, "Who is %s? Tell %s", tha_str, sha_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s? Tell %s", tha_str, sha_str);
break;
case ARPOP_RREPLY:
case ARPOP_IREPLY:
col_add_fstr(pinfo->fd, COL_INFO, "%s is at %s", sha_str, spa_str);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", sha_str, spa_str);
break;
default:
col_add_fstr(pinfo->fd, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op);
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op);
break;
}
}

View File

@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
* $Id: packet-ascend.c,v 1.27 2001/12/03 03:59:33 guy Exp $
* $Id: packet-ascend.c,v 1.28 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -61,14 +61,14 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* load the top pane info. This should be overwritten by
the next protocol in the stack */
if(check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A" );
if(check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A" );
if(check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "N/A" );
if(check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Lucent/Ascend packet trace" );
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A" );
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A" );
if(check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "N/A" );
if(check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Lucent/Ascend packet trace" );
/* populate a tree in the second pane with the status of the link
layer (ie none) */

View File

@ -1,7 +1,7 @@
/* packet-atalk.c
* Routines for Appletalk packet disassembly (DDP, currently).
*
* $Id: packet-atalk.c,v 1.59 2001/12/08 06:41:41 guy Exp $
* $Id: packet-atalk.c,v 1.60 2001/12/10 00:25:26 guy Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -195,15 +195,15 @@ dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_item *ti;
guint8 function;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "RTMP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTMP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
function = tvb_get_guint8(tvb, 0);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(function, rtmp_function_vals, "Unknown function (%02)"));
if (tree) {
@ -224,10 +224,10 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
guint16 node; /* might be more than 8 bits */
int i;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "RTMP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTMP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
net = tvb_get_ntohs(tvb, offset);
nodelen_bits = tvb_get_guint8(tvb, offset+2);
@ -239,8 +239,8 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
nodelen = 2;
}
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Net: %u Node Len: %u Node: %u",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Net: %u Node Len: %u Node: %u",
net, nodelen_bits, node);
if (tree) {
@ -312,17 +312,17 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
guint op, count;
unsigned int i;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "NBP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NBP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
info = tvb_get_guint8(tvb, offset);
op = info >> 4;
count = info & 0x0F;
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Op: %s Count: %u",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Op: %s Count: %u",
val_to_str(op, nbp_op_vals, "Unknown (0x%01x)"), count);
if (tree) {
@ -382,10 +382,10 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
static struct atalk_ddp_addr src, dst;
tvbuff_t *new_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "DDP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DDP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_SHORT_HEADER_SIZE,
@ -414,8 +414,8 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, op_vals, "Unknown DDP protocol (%02x)"));
}
if (tree)
@ -436,10 +436,10 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static struct atalk_ddp_addr src, dst;
tvbuff_t *new_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "DDP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DDP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ddp, 0, sizeof(e_ddp));
ddp.dnet=ntohs(ddp.dnet);
@ -458,8 +458,8 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&pinfo->net_dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
SET_ADDRESS(&pinfo->dst, AT_ATALK, sizeof dst, (guint8 *)&dst);
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
if (tree) {
@ -520,10 +520,10 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
tvbuff_t *new_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "LLAP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLAP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_llap, tvb, 0, 3, FALSE);
@ -537,8 +537,8 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
proto_tree_add_uint(llap_tree, hf_llap_src, tvb, 1, 1, snode);
type = tvb_get_guint8(tvb, 2);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, llap_type_vals, "Unknown LLAP type (%02x)"));
}
if (tree)

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.38 2001/12/03 03:59:33 guy Exp $
* $Id: packet-atm.c,v 1.39 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -262,8 +262,8 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 tlv_type;
guint8 tlv_length;
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "LE Control");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "LE Control");
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_atm_lane, tvb, offset, 108, "ATM LANE");
@ -380,10 +380,10 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
tvbuff_t *next_tvb_le_client;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ATM LANE");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "ATM LANE");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM LANE");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "ATM LANE");
/* Is it LE Control, 802.3, 802.5, or "none of the above"? */
switch (pinfo->pseudo_header->ngsniffer_atm.AppHLType) {
@ -603,35 +603,35 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ATM");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM");
switch (pinfo->pseudo_header->ngsniffer_atm.channel) {
case 0:
/* Traffic from DCE to DTE. */
if (check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "DTE");
if (check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "DCE");
if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
break;
case 1:
/* Traffic from DTE to DCE. */
if (check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "DCE");
if (check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "DTE");
if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
break;
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
if (aal_type == ATT_AAL5) {
col_add_fstr(pinfo->fd, COL_INFO, "AAL5 %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "AAL5 %s",
val_to_str(hl_type, aal5_hltype_vals,
"Unknown traffic type (%x)"));
} else {
col_add_str(pinfo->fd, COL_INFO,
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(aal_type, aal_vals, "Unknown AAL (%x)"));
}
}

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-auto_rp.c,v 1.15 2001/12/03 03:59:33 guy Exp $
* $Id: packet-auto_rp.c,v 1.16 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -123,15 +123,15 @@ static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 ver_type, rp_count;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "Auto-RP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Auto-RP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
ver_type = tvb_get_guint8(tvb, 0);
rp_count = tvb_get_guint8(tvb, 1);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s (v%s) for %u RP%s",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (v%s) for %u RP%s",
val_to_str(lo_nibble(ver_type), auto_rp_type_vals, "Unknown"),
val_to_str(hi_nibble(ver_type), auto_rp_ver_vals, "Unknown"),
rp_count, plurality(rp_count, "", "s"));

View File

@ -2,7 +2,7 @@
* Routines for BACnet (APDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bacapp.c,v 1.7 2001/12/08 06:41:41 guy Exp $
* $Id: packet-bacapp.c,v 1.8 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -80,16 +80,16 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 bacapp_type;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BACnet-APDU");
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "BACnet APDU ");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BACnet-APDU");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, "BACnet APDU ");
offset = 0;
bacapp_type = (tvb_get_guint8(tvb, offset) >> 4) & 0x0f;
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "(%s)",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "(%s)",
bacapp_type_name(bacapp_type));
if (tree) {
ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, tvb_length(tvb), FALSE);

View File

@ -2,7 +2,7 @@
* Routines for BACnet (NPDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bacnet.c,v 1.7 2001/12/08 06:41:41 guy Exp $
* $Id: packet-bacnet.c,v 1.8 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -197,11 +197,11 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 j;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BACnet-NPDU");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BACnet-NPDU");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Building Automation and Control Network NPDU");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Building Automation and Control Network NPDU");
offset = 0;
bacnet_version = tvb_get_guint8(tvb, offset);

View File

@ -1,7 +1,7 @@
/* packet-beep.c
* Routines for BEEP packet disassembly
*
* $Id: packet-beep.c,v 1.1 2001/12/08 01:45:35 guy Exp $
* $Id: packet-beep.c,v 1.2 2001/12/10 00:25:26 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
* Modified 2001 Darren New <dnew@invisible.net> for BEEP.
@ -906,14 +906,14 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BEEP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BEEP");
if (check_col(pinfo->fd, COL_INFO)) { /* Check the type ... */
if (check_col(pinfo->cinfo, COL_INFO)) { /* Check the type ... */
/* "tvb_format_text()" is passed a value that won't go past the end
* of the packet, so it won't throw an exception. */
col_add_str(pinfo->fd, COL_INFO, tvb_format_text(tvb, offset, tvb_length_remaining(tvb, offset)));
col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(tvb, offset, tvb_length_remaining(tvb, offset)));
}

View File

@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-bgp.c,v 1.49 2001/12/03 03:59:33 guy Exp $
* $Id: packet-bgp.c,v 1.50 2001/12/10 00:25:26 guy Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@ -1661,10 +1661,10 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int hlen; /* BGP header length */
char *typ; /* BGP message type */
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BGP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BGP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
l = tvb_length(tvb);
i = 0;
@ -1685,11 +1685,11 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hlen = ntohs(bgp.bgp_len);
typ = val_to_str(bgp.bgp_type, bgptypevals, "Unknown Message");
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
if (found == 0)
col_add_fstr(pinfo->fd, COL_INFO, "%s", typ);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", typ);
else
col_append_fstr(pinfo->fd, COL_INFO, ", %s", typ);
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", typ);
}
i += hlen;

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: packet-bootp.c,v 1.58 2001/12/03 03:59:33 guy Exp $
* $Id: packet-bootp.c,v 1.59 2001/12/10 00:25:26 guy Exp $
*
* The information used comes from:
* RFC 951: Bootstrap Protocol
@ -1068,33 +1068,33 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const char *dhcp_type = NULL;
const guint8 *vendor_class_id = NULL;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BOOTP");
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP");
if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* In case we throw an exception fetching the opcode, etc.
*/
col_clear(pinfo->fd, COL_INFO);
col_clear(pinfo->cinfo, COL_INFO);
}
op = tvb_get_guint8(tvb, 0);
htype = tvb_get_guint8(tvb, 1);
hlen = tvb_get_guint8(tvb, 2);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (op) {
case BOOTREQUEST:
col_add_fstr(pinfo->fd, COL_INFO, "Boot Request from %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s",
arphrdaddr_to_str(tvb_get_ptr(tvb, 28, hlen),
hlen, htype));
break;
case BOOTREPLY:
col_set_str(pinfo->fd, COL_INFO, "Boot Reply");
col_set_str(pinfo->cinfo, COL_INFO, "Boot Reply");
break;
default:
col_add_fstr(pinfo->fd, COL_INFO, "Unknown BOOTP message type (%u)",
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)",
op);
break;
}
@ -1207,10 +1207,10 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Yes, this is a DHCP packet, and "dhcp_type" is the
* packet type.
*/
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "DHCP");
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "DHCP %-8s - Transaction ID 0x%x",
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "DHCP %-8s - Transaction ID 0x%x",
dhcp_type, tvb_get_ntohl(tvb, 4));
if (tree)
proto_tree_add_boolean_hidden(bp_tree, hf_bootp_dhcp,

View File

@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
* $Id: packet-bpdu.c,v 1.29 2001/12/03 03:59:33 guy Exp $
* $Id: packet-bpdu.c,v 1.30 2001/12/10 00:25:26 guy Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@ -133,13 +133,13 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
pinfo->current_proto = "GARP";
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "GARP");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GARP");
/* Generic Attribute Registration Protocol */
}
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"Unknown GARP application (0x%02X)",
pinfo->dl_dst.data[5]);
}
@ -147,11 +147,11 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
return;
}
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}
bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
@ -173,14 +173,14 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
port_identifier = 0;
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
if (bpdu_type == 0)
col_add_fstr(pinfo->fd, COL_INFO, "Conf. %sRoot = %d/%s Cost = %d Port = 0x%04x",
col_add_fstr(pinfo->cinfo, COL_INFO, "Conf. %sRoot = %d/%s Cost = %d Port = 0x%04x",
flags & 0x1 ? "TC + " : "",
root_identifier_bridge_priority, root_identifier_mac_str, root_path_cost,
port_identifier);
else if (bpdu_type == 0x80)
col_add_fstr(pinfo->fd, COL_INFO, "Topology Change Notification");
col_add_fstr(pinfo->cinfo, COL_INFO, "Topology Change Notification");
}
if (tree) {

View File

@ -2,7 +2,7 @@
* Routines for BACnet/IP (BVLL, BVLC) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bvlc.c,v 1.7 2001/12/08 06:41:41 guy Exp $
* $Id: packet-bvlc.c,v 1.8 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -128,11 +128,11 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 bvlc_result;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "BVLC");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BVLC");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "BACnet Virtual Link Control");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "BACnet Virtual Link Control");
offset = 0;

View File

@ -2,7 +2,7 @@
* Routines for the disassembly of the "Cisco Discovery Protocol"
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-cdp.c,v 1.41 2001/12/03 03:59:33 guy Exp $
* $Id: packet-cdp.c,v 1.42 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -111,10 +111,10 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 naddresses;
int addr_length;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "CDP");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Cisco Discovery Protocol");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CDP");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Cisco Discovery Protocol");
if (tree){
ti = proto_tree_add_item(tree, proto_cdp, tvb, offset,

View File

@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
* $Id: packet-cgmp.c,v 1.11 2001/12/03 03:59:33 guy Exp $
* $Id: packet-cgmp.c,v 1.12 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -65,10 +65,10 @@ dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 0;
guint8 count;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "CGMP");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Cisco Group Management Protocol");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CGMP");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Cisco Group Management Protocol");
if (tree) {
ti = proto_tree_add_item(tree, proto_cgmp, tvb, offset,

View File

@ -1,7 +1,7 @@
/* packet-chdlc.c
* Routines for Cisco HDLC packet disassembly
*
* $Id: packet-chdlc.c,v 1.8 2001/12/08 06:41:41 guy Exp $
* $Id: packet-chdlc.c,v 1.9 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -133,8 +133,8 @@ chdlctype(guint16 chdlctype, tvbuff_t *tvb, int offset_after_chdlctype,
/* do lookup with the subdissector table */
if (!dissector_try_port(subdissector_table, chdlctype, next_tvb, pinfo, tree)) {
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x", chdlctype);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", chdlctype);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
}
@ -147,14 +147,14 @@ dissect_chdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 addr;
guint16 proto;
if (check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A");
if (check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A");
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "CHDLC");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A");
if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CHDLC");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
addr = tvb_get_guint8(tvb, 0);
proto = tvb_get_ntohs(tvb, 2);
@ -225,10 +225,10 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 mysequence;
guint32 yoursequence;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "SLARP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SLARP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
code = tvb_get_ntohl(tvb, 0);
@ -241,8 +241,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case SLARP_REQUEST:
case SLARP_REPLY:
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "%s, from %s, mask %s",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
match_strval(code, slarp_ptype_vals),
get_hostname(htonl(tvb_get_ntohl(tvb, 4))),
ip_to_str(tvb_get_ptr(tvb, 8, 4)));
@ -258,8 +258,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case SLARP_LINECHECK:
mysequence = tvb_get_ntohl(tvb, 4);
yoursequence = tvb_get_ntohl(tvb, 8);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"%s, outgoing sequence %u, returned sequence %u",
match_strval(code, slarp_ptype_vals),
mysequence, yoursequence);
@ -274,8 +274,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
default:
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Unknown packet type 0x%08X", code);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown packet type 0x%08X", code);
if (tree) {
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
call_dissector(data_handle,tvb_new_subset(tvb, 4,-1,tvb_reported_length_remaining(tvb,4)), pinfo, slarp_tree);

View File

@ -1,7 +1,7 @@
/* packet-clip.c
* Routines for clip packet disassembly
*
* $Id: packet-clip.c,v 1.17 2001/12/03 03:59:33 guy Exp $
* $Id: packet-clip.c,v 1.18 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -58,14 +58,14 @@ dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* load the top pane info. This should be overwritten by
the next protocol in the stack */
if(check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "N/A" );
if(check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "N/A" );
if(check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "CLIP" );
if(check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Classical IP frame" );
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A" );
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A" );
if(check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CLIP" );
if(check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Classical IP frame" );
/* populate a tree in the second pane with the status of the link
layer (ie none)

View File

@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
* $Id: packet-clnp.c,v 1.42 2001/12/04 04:26:44 guy Exp $
* $Id: packet-clnp.c,v 1.43 2001/12/10 00:25:26 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@ -693,8 +693,8 @@ static int osi_decode_DR(tvbuff_t *tvb, int offset,
break;
}
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
"DR TPDU src-ref: 0x%04x dst-ref: 0x%04x",
src_ref, dst_ref);
@ -788,8 +788,8 @@ static int osi_decode_DT(tvbuff_t *tvb, int offset,
break;
}
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "DT TPDU (%u) dst-ref: 0x%04x %s",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "DT TPDU (%u) dst-ref: 0x%04x %s",
tpdu_nr,
dst_ref,
(fragment)? "(fragment)" : "");
@ -911,8 +911,8 @@ static int osi_decode_ED(tvbuff_t *tvb, int offset,
break;
} /* li */
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "ED TPDU (%u) dst-ref: 0x%04x",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "ED TPDU (%u) dst-ref: 0x%04x",
tpdu_nr, dst_ref);
if (tree) {
@ -989,8 +989,8 @@ static int osi_decode_RJ(tvbuff_t *tvb, int offset,
break;
}
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "RJ TPDU (%u) dst-ref: 0x%04x",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "RJ TPDU (%u) dst-ref: 0x%04x",
tpdu_nr, dst_ref);
if (tree) {
@ -1038,8 +1038,8 @@ static int osi_decode_CC(tvbuff_t *tvb, int offset,
if (class_option > 4)
return -1;
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
"%s TPDU src-ref: 0x%04x dst-ref: 0x%04x",
(tpdu == CR_TPDU) ? "CR" : "CC",
src_ref,
@ -1107,8 +1107,8 @@ static int osi_decode_DC(tvbuff_t *tvb, int offset,
src_ref = tvb_get_ntohs(tvb, offset + P_SRC_REF);
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
"DC TPDU src-ref: 0x%04x dst-ref: 0x%04x",
src_ref,
dst_ref);
@ -1165,8 +1165,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
tpdu_nr = tvb_get_guint8(tvb, offset + P_TPDU_NR_234);
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x",
tpdu_nr, dst_ref);
if (tree) {
@ -1209,8 +1209,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
tpdu_nr = tvb_get_ntohl(tvb, offset + P_TPDU_NR_234);
cdt_in_ak = tvb_get_ntohs(tvb, offset + P_CDT_IN_AK);
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x",
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "AK TPDU (%u) dst-ref: 0x%04x",
tpdu_nr, dst_ref);
if (tree) {
@ -1303,8 +1303,8 @@ static int osi_decode_EA(tvbuff_t *tvb, int offset,
break;
} /* li */
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
"EA TPDU (%u) dst-ref: 0x%04x", tpdu_nr, dst_ref);
if (tree) {
@ -1382,8 +1382,8 @@ static int osi_decode_ER(tvbuff_t *tvb, int offset,
break;
}
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, tvb, offset, li + 1, FALSE);
@ -1412,8 +1412,8 @@ static int osi_decode_UD(tvbuff_t *tvb, int offset,
proto_tree *cltp_tree = NULL;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_INFO))
col_append_str(pinfo->fd, COL_INFO, "UD TPDU");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "UD TPDU");
if (tree) {
ti = proto_tree_add_item(tree, proto_cltp, tvb, offset, li + 1, FALSE);
@ -1469,17 +1469,17 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
/* Initialize the COL_INFO field; each of the TPDUs will have its
information appended. */
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, "");
while (tvb_offset_exists(tvb, offset)) {
if (!first_tpdu) {
if (check_col(pinfo->fd, COL_INFO))
col_append_str(pinfo->fd, COL_INFO, ", ");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, ", ");
}
if ((li = tvb_get_guint8(tvb, offset + P_LI)) == 0) {
if (check_col(pinfo->fd, COL_INFO))
col_append_str(pinfo->fd, COL_INFO, "Length indicator is zero");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "Length indicator is zero");
if (!first_tpdu)
call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
return found_ositp;
@ -1527,8 +1527,8 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
is_cltp = TRUE;
break;
default :
if (first_tpdu && check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO, "Unknown TPDU type (0x%x)", tpdu);
if (first_tpdu && check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown TPDU type (0x%x)", tpdu);
new_offset = -1; /* bad PDU type */
break;
}
@ -1542,8 +1542,8 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
if (first_tpdu) {
/* Well, we found at least one valid COTP or CLTP PDU, so I guess this
is either COTP or CLTP. */
if (!subdissector_found && check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, is_cltp ? "CLTP" : "COTP");
if (!subdissector_found && check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, is_cltp ? "CLTP" : "COTP");
found_ositp = TRUE;
}
@ -1598,15 +1598,15 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *volatile next_tvb;
gboolean update_col_info = TRUE;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "CLNP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CLNP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
cnf_proto_id = tvb_get_guint8(tvb, P_CLNP_PROTO_ID);
if (cnf_proto_id == NLPID_NULL) {
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Inactive subset");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Inactive subset");
if (tree) {
ti = proto_tree_add_item(tree, proto_clnp, tvb, P_CLNP_PROTO_ID, 1, FALSE);
clnp_tree = proto_item_add_subtree(ti, ett_clnp);
@ -1687,8 +1687,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
we set it otherwise. */
if (!tvb_bytes_exist(tvb, 0, cnf_hdr_len)) {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
}
segment_length = tvb_get_ntohs(tvb, P_CLNP_SEGLEN);
@ -1903,8 +1903,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (fd_head->flags & (FD_OVERLAPCONFLICT
|FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "[Illegal segments]");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "[Illegal segments]");
update_col_info = FALSE;
}
}
@ -1955,8 +1955,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (next_tvb == NULL) {
/* Just show this as a segment. */
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Fragmented %s NPDU %s(off=%u)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Fragmented %s NPDU %s(off=%u)",
pdu_type_string, flag_string, segment_offset);
/* As we haven't reassembled anything, we haven't changed "pi", so
@ -1984,8 +1984,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* The payload is the header and "none, some, or all of the data
part of the discarded PDU", i.e. it's like an ICMP error;
dissect it as a CLNP PDU. */
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
if (tree) {
next_length = tvb_length_remaining(tvb, offset);
if (next_length != 0) {
@ -1993,7 +1993,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Make the columns non-writable, so the packet isn't shown
in the summary based on what the discarded PDU's contents
are. */
col_set_writable(pinfo->fd, FALSE);
col_set_writable(pinfo->cinfo, FALSE);
/* Also, save the current values of the addresses, and restore
them when we're finished dissecting the contained packet, so
@ -2051,8 +2051,8 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
call_dissector(data_handle,next_tvb, pinfo, tree);
} /* dissect_clnp */

View File

@ -4,7 +4,7 @@
*
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-cops.c,v 1.14 2001/12/03 03:59:33 guy Exp $
* $Id: packet-cops.c,v 1.15 2001/12/10 00:25:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -265,14 +265,14 @@ static void dissect_cops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 op_code;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "COPS");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "COPS");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
op_code = tvb_get_guint8(tvb, 1);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "COPS %s",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "COPS %s",
val_to_str(op_code, cops_op_code_vals, "Unknown Op Code"));
if (tree) {

View File

@ -5,7 +5,7 @@
* Charles Levert <charles@comm.polymtl.ca>
* Copyright 2001 Charles Levert
*
* $Id: packet-cups.c,v 1.7 2001/12/03 03:59:34 guy Exp $
* $Id: packet-cups.c,v 1.8 2001/12/10 00:25:27 guy Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -164,10 +164,10 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cups_ptype_t ptype;
unsigned int state;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, PROTO_TAG_CUPS);
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CUPS);
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_cups, tvb, offset,
@ -222,8 +222,8 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(cups_tree, tvb, offset, len,
"URI: %.*s",
(guint16) len, str);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO,
"%.*s (%s)",
(guint16) len, str,
val_to_str(state, cups_state_values, "0x%x"));

View File

@ -2,7 +2,7 @@
* Routines for DCERPC packet disassembly
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc.c,v 1.20 2001/12/05 08:20:28 guy Exp $
* $Id: packet-dcerpc.c,v 1.21 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -480,13 +480,13 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
if (!name)
name = "Unknown?!";
if (check_col (pinfo->fd, COL_INFO)) {
col_add_fstr (pinfo->fd, COL_INFO, "%s %s(...)",
if (check_col (pinfo->cinfo, COL_INFO)) {
col_add_fstr (pinfo->cinfo, COL_INFO, "%s %s(...)",
is_rqst ? "rqst" : "rply", name);
}
if (check_col (pinfo->fd, COL_PROTOCOL)) {
col_set_str (pinfo->fd, COL_PROTOCOL, sub_proto->name);
if (check_col (pinfo->cinfo, COL_PROTOCOL)) {
col_set_str (pinfo->cinfo, COL_PROTOCOL, sub_proto->name);
}
sub_dissect = is_rqst ? proc->dissect_rqst : proc->dissect_resp;
@ -662,8 +662,8 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
g_hash_table_insert (dcerpc_convs, key, value);
if (check_col (pinfo->fd, COL_INFO)) {
col_add_fstr (pinfo->fd, COL_INFO, "%s: UUID %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x ver %d.%d",
if (check_col (pinfo->cinfo, COL_INFO)) {
col_add_fstr (pinfo->cinfo, COL_INFO, "%s: UUID %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x ver %d.%d",
hdr->ptype == PDU_BIND ? "Bind" : "Alter Ctx",
if_id.Data1, if_id.Data2, if_id.Data3,
if_id.Data4[0], if_id.Data4[1],
@ -762,14 +762,14 @@ dissect_dcerpc_cn_bind_ack (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerp
dissect_dcerpc_cn_auth (tvb, pinfo, dcerpc_tree, hdr);
if (check_col (pinfo->fd, COL_INFO)) {
if (check_col (pinfo->cinfo, COL_INFO)) {
if (num_results != 0 && result == 0) {
col_add_fstr (pinfo->fd, COL_INFO, "%s ack: accept max_xmit: %d max_recv: %d",
col_add_fstr (pinfo->cinfo, COL_INFO, "%s ack: accept max_xmit: %d max_recv: %d",
hdr->ptype == PDU_BIND_ACK ? "Bind" : "Alter ctx",
max_xmit, max_recv);
} else {
/* FIXME: should put in reason */
col_add_fstr (pinfo->fd, COL_INFO, "%s ack: %s",
col_add_fstr (pinfo->cinfo, COL_INFO, "%s ack: %s",
hdr->ptype == PDU_BIND_ACK ? "Bind" : "Alter ctx",
result == 1 ? "User reject" :
result == 2 ? "Provider reject" :
@ -798,8 +798,8 @@ dissect_dcerpc_cn_rqst (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep,
hf_dcerpc_opnum, &opnum);
if (check_col (pinfo->fd, COL_INFO)) {
col_add_fstr (pinfo->fd, COL_INFO, "Request: opnum: %d ctx_id:%d",
if (check_col (pinfo->cinfo, COL_INFO)) {
col_add_fstr (pinfo->cinfo, COL_INFO, "Request: opnum: %d ctx_id:%d",
opnum, ctx_id);
}
@ -875,8 +875,8 @@ dissect_dcerpc_cn_resp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *dcerpc_tr
offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep,
hf_dcerpc_cn_ctx_id, &ctx_id);
if (check_col (pinfo->fd, COL_INFO)) {
col_add_fstr (pinfo->fd, COL_INFO, "Response: call_id: %d ctx_id:%d",
if (check_col (pinfo->cinfo, COL_INFO)) {
col_add_fstr (pinfo->cinfo, COL_INFO, "Response: call_id: %d ctx_id:%d",
hdr->call_id, ctx_id);
}
@ -966,10 +966,10 @@ dissect_dcerpc_cn (tvbuff_t *tvb, int offset, packet_info *pinfo,
if (hdr.ptype > 19)
return -1;
if (check_col (pinfo->fd, COL_PROTOCOL))
col_set_str (pinfo->fd, COL_PROTOCOL, "DCERPC");
if (check_col (pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, pckt_vals[hdr.ptype].strptr);
if (check_col (pinfo->cinfo, COL_PROTOCOL))
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCERPC");
if (check_col (pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
hdr.flags = tvb_get_guint8 (tvb, offset++);
tvb_memcpy (tvb, (guint8 *)hdr.drep, offset, sizeof (hdr.drep));
@ -1160,10 +1160,10 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (hdr.ptype > 19)
return FALSE;
if (check_col (pinfo->fd, COL_PROTOCOL))
col_set_str (pinfo->fd, COL_PROTOCOL, "DCERPC");
if (check_col (pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, pckt_vals[hdr.ptype].strptr);
if (check_col (pinfo->cinfo, COL_PROTOCOL))
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCERPC");
if (check_col (pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
hdr.flags1 = tvb_get_guint8 (tvb, offset++);
hdr.flags2 = tvb_get_guint8 (tvb, offset++);

View File

@ -3,7 +3,7 @@
* see http://ddt.sourceforge.net/
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-ddtp.c,v 1.17 2001/12/03 03:59:34 guy Exp $
* $Id: packet-ddtp.c,v 1.18 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -101,13 +101,13 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ddtp_tree = NULL;
proto_item *ti;
if (check_col(pinfo->fd, COL_PROTOCOL)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
/* Indicate what kind of message this is. */
col_set_str (pinfo->fd, COL_PROTOCOL, "DDTP");
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DDTP");
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
/* In case we throw an exception below. */
col_clear (pinfo->fd, COL_INFO);
col_clear (pinfo->cinfo, COL_INFO);
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ddtp, tvb, 0,
@ -123,12 +123,12 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ddtp_tree, hf_ddtp_msgtype, tvb, 12, 4, FALSE);
switch (tvb_get_ntohl(tvb, 12)) {
case DDTP_MESSAGE_ERROR :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Message Error");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Message Error");
break;
case DDTP_UPDATE_QUERY :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Update Query");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Update Query");
if (tree) {
proto_tree_add_item(ddtp_tree, hf_ddtp_opcode, tvb, 16, 4,
FALSE);
@ -137,40 +137,40 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
break;
case DDTP_UPDATE_REPLY :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Update Reply");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Update Reply");
if (tree) {
proto_tree_add_item(ddtp_tree, hf_ddtp_status, tvb, 16, 4,
FALSE);
}
break;
case DDTP_ALIVE_QUERY :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Alive Query");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Alive Query");
if (tree) {
proto_tree_add_text(ddtp_tree, tvb, 16, 4, "Dummy : %u",
tvb_get_ntohl(tvb, 16));
}
break;
case DDTP_ALIVE_REPLY :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Alive Reply");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Alive Reply");
if (tree) {
proto_tree_add_text(ddtp_tree, tvb, 16, 4, "Dummy : %u",
tvb_get_ntohl(tvb, 16));
}
break;
default :
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Unknown type");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Unknown type");
if (tree) {
proto_tree_add_text(ddtp_tree, tvb, 12, 4, "Unknown type : %u",
tvb_get_ntohl(tvb, 12));
}
}
} else {
if (check_col(pinfo->fd, COL_INFO))
col_set_str (pinfo->fd, COL_INFO, "Encrypted payload");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str (pinfo->cinfo, COL_INFO, "Encrypted payload");
}
}

View File

@ -1,7 +1,7 @@
/* packet-dec-bpdu.c
* Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
*
* $Id: packet-dec-bpdu.c,v 1.8 2001/12/03 03:59:34 guy Exp $
* $Id: packet-dec-bpdu.c,v 1.9 2001/12/10 00:25:27 guy Exp $
*
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
*
@ -77,21 +77,21 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *bpdu_tree;
proto_item *ti;
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "DEC_STP");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DEC_STP");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}
bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
flags=tvb_get_guint8(tvb,BPDU_FLAGS);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
if (bpdu_type == 25)
col_add_fstr(pinfo->fd, COL_INFO, "Hello Packet");
col_add_fstr(pinfo->cinfo, COL_INFO, "Hello Packet");
else if (bpdu_type == 0x02)
col_add_fstr(pinfo->fd, COL_INFO, "Topology Change Notification");
col_add_fstr(pinfo->cinfo, COL_INFO, "Topology Change Notification");
}
tvb_set_reported_length(tvb, DEC_BPDU_SIZE);

View File

@ -1,7 +1,7 @@
/* packet-diameter.c
* Routines for Diameter packet disassembly
*
* $Id: packet-diameter.c,v 1.36 2001/12/03 03:59:34 guy Exp $
* $Id: packet-diameter.c,v 1.37 2001/12/10 00:25:27 guy Exp $
*
* Copyright (c) 2001 by David Frascone <dave@frascone.com>
*
@ -972,10 +972,10 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
}
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "Diameter");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_add_str(pinfo->cinfo, COL_PROTOCOL, "Diameter");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/* Copy our header */
tvb_memcpy(tvb, (guint8*) &dh, offset, sizeof(dh));
@ -1002,7 +1002,7 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
commandCode = DIAM_GET_COMMAND(dh);
/* Set up our flags */
if (check_col(pinfo->fd, COL_INFO) || tree) {
if (check_col(pinfo->cinfo, COL_INFO) || tree) {
flagstr[0]=0;
for (i = 0; i < 8; i++) {
bpos = 1 << i;
@ -1040,8 +1040,8 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
BadPacket = TRUE;
}
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"%s%s%s%s%s vendor=%s (hop-id=%d) (end-id=%d) RPE=%d%d%d",
(BadPacket)?"***** Bad Packet!: ":"",
(flags & DIAM_FLAGS_P)?"Proxyable ":"",
@ -1222,7 +1222,7 @@ safe_dissect_mip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* The contained packet is a MIP registration request;
dissect it with the MIP dissector. */
col_set_writable(pinfo->fd, FALSE);
col_set_writable(pinfo->cinfo, FALSE);
/* Also, save the current values of the addresses, and restore
them when we're finished dissecting the contained packet, so
@ -1319,7 +1319,7 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
avpLength = avph.avp_flagsLength & 0x00ffffff;
/* Set up our flags string */
if (check_col(pinfo->fd, COL_INFO) || avp_tree) {
if (check_col(pinfo->cinfo, COL_INFO) || avp_tree) {
flagstr[0]=0;
for (i = 0; i < 8; i++) {
bpos = 1 << i;

View File

@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
* $Id: packet-dns.c,v 1.76 2001/12/03 03:59:34 guy Exp $
* $Id: packet-dns.c,v 1.77 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -619,7 +619,7 @@ rfc1867_angle(tvbuff_t *tvb, int offset, const char *nsew)
static int
dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
frame_data *fd, proto_tree *dns_tree)
column_info *cinfo, proto_tree *dns_tree)
{
int len;
char name[MAXDNAME];
@ -648,8 +648,8 @@ dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
class_name = dns_class_name(class);
long_type_name = dns_long_type_name(type);
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s %s", type_name, name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s %s", type_name, name);
if (dns_tree != NULL) {
tq = proto_tree_add_text(dns_tree, tvb, offset, len, "%s: type %s, class %s",
name, type_name, class_name);
@ -756,7 +756,7 @@ static const value_string cert_vals[] = {
static int
dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
frame_data *fd, proto_tree *dns_tree)
column_info *cinfo, proto_tree *dns_tree)
{
int len;
char name[MAXDNAME];
@ -794,8 +794,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
data_offset += 2;
cur_offset += 2;
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", type_name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", type_name);
if (dns_tree != NULL) {
trr = proto_tree_add_text(dns_tree, tvb, offset,
(data_offset - data_start) + data_len,
@ -818,8 +818,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
guint32 addr_int;
addr = tvb_get_ptr(tvb, cur_offset, 4);
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", ip_to_str(addr));
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(addr));
if (dns_tree != NULL) {
proto_item_append_text(trr, ", addr %s", ip_to_str(addr));
proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s",
@ -838,8 +838,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
int ns_name_len;
ns_name_len = get_dns_name(tvb, cur_offset, dns_data_offset, ns_name, sizeof(ns_name));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", ns_name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", ns_name);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", ns %s", ns_name);
proto_tree_add_text(rr_tree, tvb, cur_offset, ns_name_len, "Name server: %s",
@ -854,8 +854,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
int cname_len;
cname_len = get_dns_name(tvb, cur_offset, dns_data_offset, cname, sizeof(cname));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", cname);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", cname);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", cname %s", cname);
proto_tree_add_text(rr_tree, tvb, cur_offset, cname_len, "Primary name: %s",
@ -877,8 +877,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
guint32 minimum;
mname_len = get_dns_name(tvb, cur_offset, dns_data_offset, mname, sizeof(mname));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", mname);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", mname);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", mname %s", mname);
proto_tree_add_text(rr_tree, tvb, cur_offset, mname_len, "Primary name server: %s",
@ -923,8 +923,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
int pname_len;
pname_len = get_dns_name(tvb, cur_offset, dns_data_offset, pname, sizeof(pname));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", pname);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", pname);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", ptr %s", pname);
proto_tree_add_text(rr_tree, tvb, cur_offset, pname_len, "Domain name: %s",
@ -947,8 +947,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
char portnumstring[10+1];
wks_addr = tvb_get_ptr(tvb, cur_offset, 4);
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", ip_to_str(wks_addr));
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(wks_addr));
if (dns_tree != NULL) {
proto_item_append_text(trr, ", addr %s", ip_to_str(wks_addr));
proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s",
@ -1017,8 +1017,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
os_offset = cpu_offset + 1 + cpu_len;
os_len = tvb_get_guint8(tvb, os_offset);
os = tvb_get_ptr(tvb, os_offset + 1, os_len);
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %.*s %.*s", cpu_len, cpu,
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %.*s %.*s", cpu_len, cpu,
os_len, os);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", CPU %.*s, OS %.*s",
@ -1040,8 +1040,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
preference = tvb_get_ntohs(tvb, cur_offset);
mx_name_len = get_dns_name(tvb, cur_offset + 2, dns_data_offset, mx_name, sizeof(mx_name));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %u %s", preference, mx_name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %u %s", preference, mx_name);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", preference %u, mx %s",
preference, mx_name);
@ -1206,8 +1206,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
const guint8 *addr6;
addr6 = tvb_get_ptr(tvb, cur_offset, 16);
if (fd != NULL) {
col_append_fstr(fd, COL_INFO, " %s",
if (cinfo != NULL) {
col_append_fstr(cinfo, COL_INFO, " %s",
ip6_to_str((struct e_in6_addr *)addr6));
}
if (dns_tree != NULL) {
@ -1252,8 +1252,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
pname_len = 0;
}
if (fd != NULL) {
col_append_fstr(fd, COL_INFO, " %d %s %s",
if (cinfo != NULL) {
col_append_fstr(cinfo, COL_INFO, " %d %s %s",
pre_len,
ip6_to_str((struct e_in6_addr *)&suffix),
pname);
@ -1287,8 +1287,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
dname_len = get_dns_name(tvb, cur_offset, dns_data_offset,
dname, sizeof(dname));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", dname);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", dname);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", dname %s", dname);
proto_tree_add_text(rr_tree, tvb, cur_offset,
@ -1349,8 +1349,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
next_domain_name_len = get_dns_name(tvb, cur_offset, dns_data_offset,
next_domain_name, sizeof(next_domain_name));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", next_domain_name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", next_domain_name);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", next domain name %s",
next_domain_name);
@ -1387,8 +1387,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
preference = tvb_get_ntohs(tvb, cur_offset);
kx_name_len = get_dns_name(tvb, cur_offset + 2, dns_data_offset, kx_name, sizeof(kx_name));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %u %s", preference, kx_name);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %u %s", preference, kx_name);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", preference %u, kx %s",
preference, kx_name);
@ -1657,8 +1657,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
rr_len -= 4;
dname_len = get_dns_name(tvb, cur_offset, dns_data_offset, dname, sizeof(dname));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %s", dname);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", dname);
if (dns_tree != NULL) {
proto_item_append_text(trr, ", name result domain %s", dname);
proto_tree_add_text(rr_tree, tvb, cur_offset, dname_len, "Name result domain: %s",
@ -1680,8 +1680,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
port = tvb_get_ntohs(tvb, cur_offset+4);
target_len = get_dns_name(tvb, cur_offset + 6, dns_data_offset, target, sizeof(target));
if (fd != NULL)
col_append_fstr(fd, COL_INFO, " %u %u %u %s", priority, weight, port, target);
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %u %u %u %s", priority, weight, port, target);
if (dns_tree != NULL) {
proto_item_append_text(trr,
", priority %u, weight %u, port %u, target %s",
@ -1710,7 +1710,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
static int
dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
int count, frame_data *fd, proto_tree *dns_tree, int isupdate)
int count, column_info *cinfo, proto_tree *dns_tree, int isupdate)
{
int start_off, add_off;
proto_tree *qatree = NULL;
@ -1723,7 +1723,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
qatree = proto_item_add_subtree(ti, ett_dns_qry);
}
while (count-- > 0) {
add_off = dissect_dns_query(tvb, cur_off, dns_data_offset, fd, qatree);
add_off = dissect_dns_query(tvb, cur_off, dns_data_offset, cinfo, qatree);
if (add_off <= 0) {
/* We ran past the end of the captured data in the packet. */
break;
@ -1738,7 +1738,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
static int
dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
int count, frame_data *fd, proto_tree *dns_tree, char *name)
int count, column_info *cinfo, proto_tree *dns_tree, char *name)
{
int start_off, add_off;
proto_tree *qatree = NULL;
@ -1750,7 +1750,7 @@ dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
qatree = proto_item_add_subtree(ti, ett_dns_ans);
}
while (count-- > 0) {
add_off = dissect_dns_answer(tvb, cur_off, dns_data_offset, fd, qatree);
add_off = dissect_dns_answer(tvb, cur_off, dns_data_offset, cinfo, qatree);
if (add_off <= 0) {
/* We ran past the end of the captured data in the packet. */
break;
@ -1768,7 +1768,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
proto_tree *tree, gboolean is_tcp)
{
int dns_data_offset;
frame_data *fd;
column_info *cinfo;
proto_tree *dns_tree = NULL, *field_tree;
proto_item *ti, *tf;
guint16 id, flags, quest, ans, auth, add;
@ -1785,16 +1785,16 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
dns_data_offset = offset;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "DNS");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DNS");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/* To do: check for errs, etc. */
id = tvb_get_ntohs(tvb, offset + DNS_ID);
flags = tvb_get_ntohs(tvb, offset + DNS_FLAGS);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown operation (%x)"));
if (flags & F_RESPONSE) {
strcat(buf, " response");
@ -1804,14 +1804,14 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
"Unknown error (%x)"));
}
}
col_add_str(pinfo->fd, COL_INFO, buf);
fd = pinfo->fd;
col_add_str(pinfo->cinfo, COL_INFO, buf);
cinfo = pinfo->cinfo;
} else {
/* Set "fd" to NULL; we pass a NULL "fd" to the query and answer
/* Set "cinfo" to NULL; we pass a NULL "cinfo" to the query and answer
dissectors, as a way of saying that they shouldn't add stuff
to the COL_INFO column (a call to "check_col(fd, COL_INFO)"
to the COL_INFO column (a call to "check_col(cinfo, COL_INFO)"
is more expensive than a check that a pointer isn't NULL). */
fd = NULL;
cinfo = NULL;
}
if ((flags & F_OPCODE) == OPCODE_UPDATE)
isupdate = 1;
@ -1925,7 +1925,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
/* If this is a response, don't add information about the queries
to the summary, just add information about the answers. */
cur_off += dissect_query_records(tvb, cur_off, dns_data_offset, quest,
(!(flags & F_RESPONSE) ? fd : NULL),
(!(flags & F_RESPONSE) ? cinfo : NULL),
dns_tree, isupdate);
}
@ -1933,7 +1933,7 @@ dissect_dns_common(tvbuff_t *tvb, int offset, int msg_len, packet_info *pinfo,
/* If this is a request, don't add information about the answers
to the summary, just add information about the queries. */
cur_off += dissect_answer_records(tvb, cur_off, dns_data_offset, ans,
((flags & F_RESPONSE) ? fd : NULL),
((flags & F_RESPONSE) ? cinfo : NULL),
dns_tree,
(isupdate ? "Prerequisites" : "Answers"));
}

View File

@ -2,7 +2,7 @@
* Routines for dsi packet dissection
* Copyright 2001, Randy McEoin <rmceoin@pe.com>
*
* $Id: packet-dsi.c,v 1.6 2001/12/03 03:59:34 guy Exp $
* $Id: packet-dsi.c,v 1.7 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -313,10 +313,10 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 dsi_length;
guint32 dsi_reserved;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "DSI");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSI");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
conversation = find_conversation(&pinfo->src, &pinfo->dst, PT_TCP,
pinfo->srcport, pinfo->destport, 0);
@ -355,7 +355,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dsi_reserved = hash_info->reserved;
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
if ((func_str = match_strval(dsi_command, func_vals)))
{
flag_str = match_strval(dsi_flags, flag_vals);
@ -369,7 +369,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
cont_str[0]=0;
}
col_add_fstr(pinfo->fd, COL_INFO, "%s %s (%d) %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s (%d) %s",
flag_str,func_str,dsi_requestid,
cont_str);
}

View File

@ -1,7 +1,7 @@
/* packet-dvmrp.c 2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
* Routines for IGMP/DVMRP packet disassembly
*
* $Id: packet-dvmrp.c,v 1.3 2001/10/30 21:31:15 guy Exp $
* $Id: packet-dvmrp.c,v 1.4 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -338,8 +338,8 @@ dissect_dvmrp_v3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
code = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(parent_tree, hf_code_v3, tvb, offset, 1, code);
offset += 1;
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"V%d %s",3 ,val_to_str(code, code_v3,
"Unknown Type:0x%02x"));
}
@ -468,8 +468,8 @@ dissect_dvmrp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
code = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(parent_tree, hf_code_v1, tvb, offset, 1, code);
offset += 1;
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"V%d %s",1 ,val_to_str(code, code_v1,
"Unknown Type:0x%02x"));
}
@ -641,11 +641,11 @@ dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int of
tree = proto_item_add_subtree(item, ett_dvmrp);
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "DVMRP");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DVMRP");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}

View File

@ -1,7 +1,7 @@
/* packet-eap.c
* Routines for EAP Extensible Authentication Protocol header disassembly
*
* $Id: packet-eap.c,v 1.3 2001/12/03 03:59:34 guy Exp $
* $Id: packet-eap.c,v 1.4 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -86,10 +86,10 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ti;
proto_tree *volatile eap_tree;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "EAP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "EAP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&eaph, 0, sizeof(eaph));
eaph.eap_len = ntohs(eaph.eap_len);

View File

@ -1,7 +1,7 @@
/* packet-eapol.c
* Routines for EAPOL 802.1X authentication header disassembly
*
* $Id: packet-eapol.c,v 1.3 2001/12/03 03:59:34 guy Exp $
* $Id: packet-eapol.c,v 1.4 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -77,10 +77,10 @@ dissect_eapol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *volatile eapol_tree;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "EAPOL");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "EAPOL");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&eapolh, 0, sizeof(eapolh));
eapolh.eapol_len = ntohs(eapolh.eapol_len);

View File

@ -2,7 +2,7 @@
* Routines for EIGRP dissection
* Copyright 2000, Paul Ionescu <paul@acorp.ro>
*
* $Id: packet-eigrp.c,v 1.18 2001/12/03 03:59:34 guy Exp $
* $Id: packet-eigrp.c,v 1.19 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -148,17 +148,17 @@ dissect_eigrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
guint16 tlv,size, offset = EIGRP_HEADER_LENGTH;
guint32 ack;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "EIGRP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "EIGRP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
opcode_tmp=opcode=tvb_get_guint8(tvb,1);
ack = tvb_get_ntohl(tvb,12);
if (opcode==EIGRP_HELLO) { if (ack == 0) opcode_tmp=EIGRP_HI; else opcode_tmp=EIGRP_ACK; }
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(opcode_tmp , eigrp_opcode_vals, "Unknown (0x%04x)"));

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI End System to Intermediate System
* Routing Exchange Protocol ISO 9542.
*
* $Id: packet-esis.c,v 1.18 2001/12/03 03:59:34 guy Exp $
* $Id: packet-esis.c,v 1.19 2001/12/10 00:25:27 guy Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@ -291,10 +291,10 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
u_int tmp_uint = 0;
char *cksum_status;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ESIS");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESIS");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ehdr, 0, sizeof ehdr);
@ -368,8 +368,8 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
* here. First, dump the name into info column, and THEN
* dispatch the sub-type.
*/
if (check_col(pinfo->fd, COL_INFO)) {
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str( ehdr.esis_type&OSI_PDU_TYPE_MASK, esis_vals,
"Unknown (0x%x)" ) );
}

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.70 2001/12/03 03:59:34 guy Exp $
* $Id: packet-eth.c,v 1.71 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -146,8 +146,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
volatile gboolean is_802_2;
proto_tree *volatile fh_tree = NULL;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "Ethernet");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Ethernet");
src = tvb_get_ptr(tvb, 6, 6);
dst = tvb_get_ptr(tvb, 0, 6);
@ -191,8 +191,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
ENDTRY;
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "IEEE 802.3 Ethernet %s",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "IEEE 802.3 Ethernet %s",
(is_802_2 ? "" : "Raw "));
}
if (tree) {
@ -212,8 +212,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_802_3(etype, is_802_2, tvb, ETH_HEADER_SIZE, pinfo, tree, fh_tree,
hf_eth_len, hf_eth_trailer);
} else {
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Ethernet II");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Ethernet II");
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_eth, tvb, 0, ETH_HEADER_SIZE,
"Ethernet II");

View File

@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
* $Id: packet-ethertype.c,v 1.23 2001/12/08 06:41:41 guy Exp $
* $Id: packet-ethertype.c,v 1.24 2001/12/10 00:25:27 guy Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@ -185,22 +185,22 @@ ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_etype,
switch (etype) {
case ETHERTYPE_LOOP:
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_add_fstr(pinfo->fd, COL_PROTOCOL, "LOOP");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "LOOP");
}
break;
default:
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x",
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x",
etype);
}
break;
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
description = match_strval(etype, etype_vals);
if (description) {
col_add_fstr(pinfo->fd, COL_INFO, "%s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
description);
}
}

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-fddi.c,v 1.54 2001/12/03 03:59:34 guy Exp $
* $Id: packet-fddi.c,v 1.55 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -267,14 +267,14 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
u_char src_swapped[6], dst_swapped[6];
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FDDI");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FDDI");
fc = (int) tvb_get_guint8(tvb, FDDI_P_FC);
fc_str = fddifc_to_str(fc);
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, fc_str);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, fc_str);
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE,

View File

@ -3,7 +3,7 @@
*
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
* $Id: packet-fr.c,v 1.26 2001/12/08 06:41:41 guy Exp $
* $Id: packet-fr.c,v 1.27 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -147,20 +147,20 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char buf[32];
guint8 fr_ctrl;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR");
if (pinfo->pseudo_header->x25.flags & FROM_DCE) {
if(check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "DTE");
if(check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "DCE");
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
}
else {
if(check_col(pinfo->fd, COL_RES_DL_DST))
col_set_str(pinfo->fd, COL_RES_DL_DST, "DCE");
if(check_col(pinfo->fd, COL_RES_DL_SRC))
col_set_str(pinfo->fd, COL_RES_DL_SRC, "DTE");
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
}
/*XXX We should check the EA bits and use that to generate the address. */
@ -169,8 +169,8 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
fr_ctrl = tvb_get_guint8( tvb, 2);
address = EXTRACT_DLCI(fr_header);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "DLCI %u", address);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", address);
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_fr, tvb, 0, 3, "Frame Relay");
@ -237,10 +237,10 @@ static void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti = NULL;
proto_tree *fr_tree = NULL;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_fr, tvb, 0, 4, "Frame Relay");

View File

@ -2,7 +2,7 @@
*
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
*
* $Id: packet-frame.c,v 1.14 2001/12/08 21:03:41 guy Exp $
* $Id: packet-frame.c,v 1.15 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -136,22 +136,23 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!dissector_try_port(wtap_encap_dissector_table, pinfo->fd->lnk_t,
tvb, pinfo, tree)) {
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "UNKNOWN");
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "WTAP_ENCAP = %u", pinfo->fd->lnk_t);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %u",
pinfo->fd->lnk_t);
call_dissector(data_handle,tvb, pinfo, tree);
}
}
CATCH(BoundsError) {
if (check_col(pinfo->fd, COL_INFO))
col_append_str(pinfo->fd, COL_INFO, "[Short Frame]");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "[Short Frame]");
proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0,
"[Short Frame: %s]", pinfo->current_proto );
}
CATCH(ReportedBoundsError) {
if (check_col(pinfo->fd, COL_INFO))
col_append_str(pinfo->fd, COL_INFO, "[Malformed Frame]");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "[Malformed Frame]");
proto_tree_add_protocol_format(tree, proto_malformed, tvb, 0, 0,
"[Malformed Frame: %s]", pinfo->current_proto );
}

View File

@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* Copyright 2001, Juan Toledo <toledo@users.sourceforge.net> (Passive FTP)
*
* $Id: packet-ftp.c,v 1.38 2001/12/03 03:59:34 guy Exp $
* $Id: packet-ftp.c,v 1.39 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -225,8 +225,8 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
is_request = FALSE;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FTP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTP");
/*
* Find the end of the first line.
@ -238,12 +238,12 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset);
line = tvb_get_ptr(tvb, offset, linelen);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* Put the first line from the buffer into the summary
* (but leave out the line terminator).
*/
col_add_fstr(pinfo->fd, COL_INFO, "%s: %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s",
is_request ? "Request" : "Response",
format_text(line, linelen));
}
@ -366,11 +366,11 @@ dissect_ftpdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ti, *ftp_data_tree;
int data_length;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FTP-DATA");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTP-DATA");
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "FTP Data: %u bytes",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "FTP Data: %u bytes",
tvb_length(tvb));
}

View File

@ -9,7 +9,7 @@
* Frank Singleton <frank.singleton@ericsson.com>
* Trevor Shepherd <eustrsd@am1.ericsson.se>
*
* $Id: packet-giop.c,v 1.49 2001/11/26 04:52:49 hagbard Exp $
* $Id: packet-giop.c,v 1.50 2001/12/10 00:25:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -3080,8 +3080,8 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO)) {
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (tree) {
@ -3091,8 +3091,8 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
reply_status = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO)) {
col_append_fstr(pinfo->fd, COL_INFO, ": %s",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
val_to_str(reply_status, reply_status_types, "Unknown (%u)"));
}
@ -3156,8 +3156,8 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO)) {
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (tree) {
@ -3167,8 +3167,8 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
reply_status = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO)) {
col_append_fstr(pinfo->fd, COL_INFO, ": %s",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
val_to_str(reply_status, reply_status_types, "Unknown (%u)"));
}
@ -3235,8 +3235,8 @@ static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO)) {
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (tree) {
@ -3308,9 +3308,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (tree)
{
@ -3320,9 +3320,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
response_expected = tvb_get_guint8( tvb, offset );
offset += 1;
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " (%s)",
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
response_expected ? "two-way" : "one-way");
}
if (tree)
@ -3386,9 +3386,9 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
if( len > 0)
{
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, ": %s", operation);
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", operation);
}
if(tree)
{
@ -3518,9 +3518,9 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
}
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (request_tree)
{
@ -3558,9 +3558,9 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
if( len > 0)
{
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, ": %s", operation);
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", operation);
}
if(request_tree)
{
@ -3652,9 +3652,9 @@ dissect_giop_locate_request( tvbuff_t * tvb, packet_info * pinfo,
}
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (locate_request_tree)
{
@ -3721,9 +3721,9 @@ dissect_giop_locate_reply( tvbuff_t * tvb, packet_info * pinfo,
}
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (locate_reply_tree)
{
@ -3795,9 +3795,9 @@ dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
}
request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_fstr(pinfo->fd, COL_INFO, " %u", request_id);
col_append_fstr(pinfo->cinfo, COL_INFO, " %u", request_id);
}
if (fragment_tree )
{
@ -3864,9 +3864,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
return FALSE;
}
if (check_col (pinfo->fd, COL_PROTOCOL))
if (check_col (pinfo->cinfo, COL_PROTOCOL))
{
col_set_str (pinfo->fd, COL_PROTOCOL, "GIOP");
col_set_str (pinfo->cinfo, COL_PROTOCOL, "GIOP");
}
if (header.GIOP_version.major != GIOP_MAJOR ||
@ -3880,9 +3880,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
the "Info" column, *without* setting the "Protocol" column,
and *without* adding anything to the protocol tree. */
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_add_fstr (pinfo->fd, COL_INFO, "Version %u.%u",
col_add_fstr (pinfo->cinfo, COL_INFO, "Version %u.%u",
header.GIOP_version.major, header.GIOP_version.minor);
}
if (tree)
@ -3900,9 +3900,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
return TRUE;
}
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_add_fstr (pinfo->fd, COL_INFO, "GIOP %u.%u %s",
col_add_fstr (pinfo->cinfo, COL_INFO, "GIOP %u.%u %s",
header.GIOP_version.major, header.GIOP_version.minor,
val_to_str(header.message_type, giop_message_types,
"Unknown message type (0x%02x)"));
@ -3957,9 +3957,9 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
} /* tree */
#if 0
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_add_fstr (pinfo->fd, COL_INFO, "GIOP %u.%u %s",
col_add_fstr (pinfo->cinfo, COL_INFO, "GIOP %u.%u %s",
header.GIOP_version.major, header.GIOP_version.minor,
match_strval(header.message_type, giop_message_types));
}

View File

@ -130,11 +130,11 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 attribute_type;
int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GMRP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GMRP");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "GMRP");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "GMRP");
if (tree)
{

View File

@ -2,7 +2,7 @@
* Routines for gnutella dissection
* Copyright 2001, B. Johannessen <bob@havoq.com>
*
* $Id: packet-gnutella.c,v 1.9 2001/12/03 03:59:34 guy Exp $
* $Id: packet-gnutella.c,v 1.10 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -380,23 +380,23 @@ static void dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
unsigned int size;
char *payload_descriptor_text;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "Gnutella");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gnutella");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "Gnutella");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "Gnutella");
snap_len = tvb_length(tvb);
if(snap_len < GNUTELLA_HEADER_LENGTH) {
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
", %i bytes [INCOMPLETE]", snap_len);
return;
}
else {
if (check_col(pinfo->fd, COL_INFO))
col_append_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO,
", %i bytes", snap_len);
}

View File

@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-gre.c,v 1.48 2001/12/08 06:41:41 guy Exp $
* $Id: packet-gre.c,v 1.49 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -103,11 +103,11 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flags_and_ver = tvb_get_ntohs(tvb, offset);
type = tvb_get_ntohs(tvb, offset + sizeof(flags_and_ver));
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GRE");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GRE");
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "Encapsulated %s",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Encapsulated %s",
val_to_str(type, typevals, "0x%04X (unknown)"));
}

View File

@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
* $Id: packet-gtp.c,v 1.18 2001/12/03 03:59:34 guy Exp $
* $Id: packet-gtp.c,v 1.19 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -1591,7 +1591,7 @@ struct _stcdr { /* STCDR 79B */
char *yesno[] = { "False", "True" };
static void
col_append_str_gtp(frame_data *fd, gint el, gchar *proto_name) {
col_append_str_gtp(column_info *cinfo, gint el, gchar *proto_name) {
int i;
int max_len;
@ -1599,22 +1599,22 @@ col_append_str_gtp(frame_data *fd, gint el, gchar *proto_name) {
max_len = COL_MAX_LEN;
for (i = 0; i < fd->cinfo->num_cols; i++) {
if (fd->cinfo->fmt_matx[i][el]) {
if (fd->cinfo->col_data[i] != fd->cinfo->col_buf[i]) {
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
if (cinfo->col_data[i] != cinfo->col_buf[i]) {
strncpy(fd->cinfo->col_buf[i], fd->cinfo->col_data[i], max_len);
fd->cinfo->col_buf[i][max_len - 1] = '\0';
strncpy(cinfo->col_buf[i], cinfo->col_data[i], max_len);
cinfo->col_buf[i][max_len - 1] = '\0';
}
_tmp[0] = '\0';
strcat(_tmp, proto_name);
strcat(_tmp, " <");
strcat(_tmp, fd->cinfo->col_buf[i]);
strcat(_tmp, cinfo->col_buf[i]);
strcat(_tmp, ">");
fd->cinfo->col_buf[i][0] = '\0';
strcat(fd->cinfo->col_buf[i], _tmp);
fd->cinfo->col_data[i] = fd->cinfo->col_buf[i];
cinfo->col_buf[i][0] = '\0';
strcat(cinfo->col_buf[i], _tmp);
cinfo->col_data[i] = cinfo->col_buf[i];
}
}
}
@ -3683,13 +3683,14 @@ decode_gtp_proto_conf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
next_tvb = tvb_new_subset(tvb, offset + 5, proto_len + 2, proto_len + 2);
call_dissector(ppp_handle, next_tvb, pinfo, ext_tree_proto);
if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
msg = tvb_get_guint8(tvb, 1);
col_set_str(pinfo->fd, COL_INFO, val_to_str(msg, message_type, "Unknown"));
col_set_str(pinfo->cinfo, COL_INFO, val_to_str(msg, message_type, "Unknown"));
}
}
}
@ -4689,8 +4690,10 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gchar *tid_str;
int offset, length, i, mandatory, checked_field;
if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP");
if (check_col(pinfo->fd, COL_INFO)) col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&gtpv0_hdr, 0, 12);
tid_val = tvb_get_ptr(tvb, 12, 8);
@ -4698,22 +4701,23 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gtp_version = (gtpv0_hdr.flags >> 5) & 0x07;
if (!((gtpv0_hdr.flags >> 4) & 1)) {
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GTP-CDR");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP-CDR");
} else {
switch ((gtpv0_hdr.flags >> 5) & 0x07) {
case 0: if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GTP");
case 0: if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
break;
case 1: if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GTPv1");
default: if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GTPv?");
case 1: if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTPv1");
default: if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTPv?");
break;
}
}
if (check_col(pinfo->fd, COL_INFO)) col_add_str(pinfo->fd, COL_INFO, val_to_str(gtpv0_hdr.message, message_type, "Unknown"));
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtpv0_hdr.message, message_type, "Unknown"));
if (tree) {
@ -4777,7 +4781,8 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ((gtpv0_hdr.message == GTP_MSG_TPDU) && gtp_tpdu) {
next_tvb = tvb_new_subset(tvb, 20, -1, -1);
call_dissector(ip_handle, next_tvb, pinfo, tree);
if (check_col(pinfo->fd, COL_PROTOCOL)) col_append_str_gtp(pinfo->fd, COL_PROTOCOL, "GTP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_append_str_gtp(pinfo->cinfo, COL_PROTOCOL, "GTP");
}
}
@ -4794,13 +4799,16 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
tvbuff_t *next_tvb;
int offset, length, mandatory, checked_field;
if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "GTP-C");
if (check_col(pinfo->fd, COL_INFO)) col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP-C");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&gtpv1_hdr, 0, 8);
gtp_version = (gtpv1_hdr.flags >> 5) & 0x07;
if (check_col(pinfo->fd, COL_INFO)) col_add_str(pinfo->fd, COL_INFO, val_to_str(gtpv1_hdr.message, message_type, "Unknown"));
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtpv1_hdr.message, message_type, "Unknown"));
if (tree) {
@ -4881,7 +4889,8 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
if (gtpv1_hdr.message == GTP_MSG_ERR_IND)
if (check_col(pinfo->fd, COL_PROTOCOL)) col_add_str(pinfo->fd, COL_PROTOCOL, "GTP-U");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_add_str(pinfo->cinfo, COL_PROTOCOL, "GTP-U");
if ((gtpv1_hdr.message == GTP_MSG_TPDU) && gtp_tpdu) {
@ -4901,7 +4910,8 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
next_tvb = tvb_new_subset(tvb, GTPv1_HDR_LENGTH - hdr_offset, -1, -1);
call_dissector(ip_handle, next_tvb, pinfo, tree);
if (check_col(pinfo->fd, COL_PROTOCOL)) col_append_str_gtp(pinfo->fd, COL_PROTOCOL, "GTP-U");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_append_str_gtp(pinfo->cinfo, COL_PROTOCOL, "GTP-U");
}
}

View File

@ -2,7 +2,7 @@
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
*
* $Id: packet-gvrp.c,v 1.7 2001/11/26 04:52:49 hagbard Exp $
* $Id: packet-gvrp.c,v 1.8 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -116,11 +116,11 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 octet;
int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GVRP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVRP");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "GVRP");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "GVRP");
if (tree)
{

View File

@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
* $Id: packet-h1.c,v 1.21 2001/11/25 22:51:13 hagbard Exp $
* $Id: packet-h1.c,v 1.22 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -126,10 +126,10 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
}
if (check_col (pinfo->fd, COL_PROTOCOL))
col_set_str (pinfo->fd, COL_PROTOCOL, "H1");
if (check_col (pinfo->fd, COL_INFO))
col_add_str (pinfo->fd, COL_INFO, "S5: ");
if (check_col (pinfo->cinfo, COL_PROTOCOL))
col_set_str (pinfo->cinfo, COL_PROTOCOL, "H1");
if (check_col (pinfo->cinfo, COL_INFO))
col_add_str (pinfo->cinfo, COL_INFO, "S5: ");
if (tree)
{
ti = proto_tree_add_item (tree, proto_h1, tvb, offset, 16, FALSE);
@ -159,9 +159,9 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset + position + 2, 1,
tvb_get_guint8(tvb,offset + position + 2));
}
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_append_str (pinfo->fd, COL_INFO,
col_append_str (pinfo->cinfo, COL_INFO,
val_to_str (tvb_get_guint8(tvb,offset + position + 2),
opcode_vals,"Unknown Opcode (0x%2.2x)"));
}
@ -190,15 +190,15 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset + position + 6, 2,
tvb_get_ntohs(tvb,offset+position+6));
}
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_append_fstr (pinfo->fd, COL_INFO, " %s %d",
col_append_fstr (pinfo->cinfo, COL_INFO, " %s %d",
val_to_str (tvb_get_guint8(tvb,offset + position + 2),
org_vals,"Unknown Type (0x%2.2x)"),
tvb_get_guint8(tvb,offset + position + 3));
col_append_fstr (pinfo->fd, COL_INFO, " DW %d",
col_append_fstr (pinfo->cinfo, COL_INFO, " DW %d",
tvb_get_ntohs(tvb,offset+position+4));
col_append_fstr (pinfo->fd, COL_INFO, " Count %d",
col_append_fstr (pinfo->cinfo, COL_INFO, " Count %d",
tvb_get_ntohs(tvb,offset+position+6));
}
break;
@ -217,9 +217,9 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset + position + 2, 1,
tvb_get_guint8(tvb,offset + position+2));
}
if (check_col (pinfo->fd, COL_INFO))
if (check_col (pinfo->cinfo, COL_INFO))
{
col_append_fstr (pinfo->fd, COL_INFO, " %s",
col_append_fstr (pinfo->cinfo, COL_INFO, " %s",
val_to_str (tvb_get_guint8(tvb,offset + position + 2),
returncode_vals,"Unknown Returcode (0x%2.2x"));
}

View File

@ -2,7 +2,7 @@
*
* Routines for ITU-T Recommendation H.261 dissection
*
* $Id: packet-h261.c,v 1.9 2001/07/16 05:16:57 guy Exp $
* $Id: packet-h261.c,v 1.10 2001/12/10 00:25:28 guy Exp $
*
* Copyright 2000, Philips Electronics N.V.
* Andreas Sikkema <andreas.sikkema@philips.com>
@ -75,12 +75,12 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
proto_tree *h261_tree = NULL;
unsigned int offset = 0;
if ( check_col( pinfo->fd, COL_PROTOCOL ) ) {
col_set_str( pinfo->fd, COL_PROTOCOL, "H.261" );
if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
col_set_str( pinfo->cinfo, COL_PROTOCOL, "H.261" );
}
if ( check_col( pinfo->fd, COL_INFO) ) {
col_set_str( pinfo->fd, COL_INFO, "H.261 message");
if ( check_col( pinfo->cinfo, COL_INFO) ) {
col_set_str( pinfo->cinfo, COL_INFO, "H.261 message");
}
if ( tree ) {

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-hsrp.c,v 1.19 2001/12/03 03:59:34 guy Exp $
* $Id: packet-hsrp.c,v 1.20 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -107,15 +107,15 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 opcode, state;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "HSRP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "HSRP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
opcode = tvb_get_guint8(tvb, 1);
state = tvb_get_guint8(tvb, 2);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "%s (state %s)",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (state %s)",
val_to_str(opcode, hsrp_opcode_vals, "Unknown"),
val_to_str(state, hsrp_state_vals, "Unknown"));
}

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-http.c,v 1.43 2001/12/08 06:41:41 guy Exp $
* $Id: packet-http.c,v 1.44 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -111,9 +111,9 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, proto_tag);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_tag);
if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* Put the first line from the buffer into the summary
* if it's an HTTP request or reply (but leave out the
@ -128,10 +128,10 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
line = tvb_get_ptr(tvb, offset, linelen);
http_type = HTTP_OTHERS; /* type not known yet */
if (is_http_request_or_reply(line, linelen, &http_type))
col_add_str(pinfo->fd, COL_INFO,
col_add_str(pinfo->cinfo, COL_INFO,
format_text(line, linelen));
else
col_set_str(pinfo->fd, COL_INFO, "Continuation");
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
}
if (tree) {

View File

@ -74,10 +74,10 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
icap_type_t icap_type;
int datalen;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ICAP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICAP");
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* Put the first line from the buffer into the summary
* if it's an ICAP header (but leave out the
@ -92,10 +92,10 @@ dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
line = tvb_get_ptr(tvb, offset, linelen);
icap_type = ICAP_OTHER; /* type not known yet */
if (is_icap_message(line, linelen, &icap_type))
col_add_str(pinfo->fd, COL_INFO,
col_add_str(pinfo->cinfo, COL_INFO,
format_text(line, linelen));
else
col_set_str(pinfo->fd, COL_INFO, "Continuation");
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
}
if (tree) {

View File

@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
* $Id: packet-icmpv6.c,v 1.55 2001/12/03 03:59:35 guy Exp $
* $Id: packet-icmpv6.c,v 1.56 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -128,7 +128,7 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
Set the columns non-writable, so that the packet list
shows this as an ICMPv6 packet, not as the type of packet
for which the ICMPv6 packet was generated. */
col_set_writable(pinfo->fd, FALSE);
col_set_writable(pinfo->cinfo, FALSE);
/* Also, save the current values of the addresses, and restore
them when we're finished dissecting the contained packet, so
@ -980,10 +980,10 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ICMPv6");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
offset = 0;
tvb_memcpy(tvb, (guint8 *)&icmp6_hdr, offset, sizeof icmp6_hdr);
@ -1139,7 +1139,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
char typebuf[256], codebuf[256];
if (coltypename && strcmp(coltypename, "Unknown") == 0) {
@ -1153,9 +1153,9 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
colcodename = codebuf;
}
if (colcodename) {
col_add_fstr(pinfo->fd, COL_INFO, "%s (%s)", coltypename, colcodename);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%s)", coltypename, colcodename);
} else {
col_add_fstr(pinfo->fd, COL_INFO, "%s", coltypename);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", coltypename);
}
}

View File

@ -4,7 +4,7 @@
* By Peter Torvals
* Copyright 1999 Peter Torvals
*
* $Id: packet-icp.c,v 1.19 2001/12/03 03:59:35 guy Exp $
* $Id: packet-icp.c,v 1.20 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -160,18 +160,18 @@ static void dissect_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 options;
guint32 option_data;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ICP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
opcode=tvb_get_guint8(tvb, 0);
message_length=tvb_get_ntohs(tvb, 2);
request_number=tvb_get_ntohl(tvb, 4);
if (check_col(pinfo->fd, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
{
col_add_fstr(pinfo->fd,COL_INFO,"Opcode: %s (%u), Req Nr: %u",
col_add_fstr(pinfo->cinfo,COL_INFO,"Opcode: %s (%u), Req Nr: %u",
val_to_str(opcode, opcode_vals, "Unknown"), opcode,
request_number);
}

View File

@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
* $Id: packet-icq.c,v 1.36 2001/12/03 03:59:35 guy Exp $
* $Id: packet-icq.c,v 1.37 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -464,11 +464,11 @@ dissect_icqv4(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv4 (UDP)");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv4 (UDP)");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "ICQ Version 4 protocol");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 4 protocol");
}
}
@ -478,11 +478,11 @@ dissect_icqv3(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv3 (UDP)");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv3 (UDP)");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "ICQ Version 3 protocol");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 3 protocol");
}
}
@ -492,11 +492,11 @@ dissect_icqv2(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv2 (UDP)");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv2 (UDP)");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "ICQ Version 2 protocol");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 2 protocol");
}
}
@ -1748,8 +1748,8 @@ dissect_icqv5Client(tvbuff_t *tvb,
cmd = tvb_get_letohs(decr_tvb, ICQ5_CL_CMD);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
if (tree) {
ti = proto_tree_add_protocol_format(tree,
@ -1908,8 +1908,8 @@ dissect_icqv5Server(tvbuff_t *tvb,
guint16 cmd;
cmd = tvb_get_letohs(tvb, offset + ICQ5_SRV_CMD);
if (changeCol && check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
if (changeCol && check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
if (pktsize == -1)
pktsize = tvb_reported_length(tvb);
@ -2058,10 +2058,10 @@ static void dissect_icqv5(tvbuff_t *tvb,
{
guint32 unknown;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv5 (UDP)");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "ICQv5 packet");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv5 (UDP)");
if (check_col(pinfo->cinfo, COL_INFO))
col_set_str(pinfo->cinfo, COL_INFO, "ICQv5 packet");
unknown = tvb_get_letohl(tvb, ICQ5_UNKNOWN);
@ -2078,11 +2078,11 @@ static void dissect_icq(tvbuff_t *tvb,
{
int version;
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "ICQ");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQ");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}
version = tvb_get_letohs(tvb, ICQ_VERSION);

View File

@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
* $Id: packet-ieee80211.c,v 1.45 2001/12/03 03:59:35 guy Exp $
* $Id: packet-ieee80211.c,v 1.46 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -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)

View File

@ -1,7 +1,7 @@
/* packet-igmp.c 2001 Ronnie Sahlberg <rsahlber@bigpond.net.au>
* Routines for IGMP packet disassembly
*
* $Id: packet-igmp.c,v 1.13 2001/12/03 03:59:35 guy Exp $
* $Id: packet-igmp.c,v 1.14 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -298,8 +298,8 @@ static const value_string mtrace_fwd_code_vals[] = {
};
#define PRINT_IGMP_VERSION(version) \
if (check_col(pinfo->fd, COL_INFO)) { \
col_add_fstr(pinfo->fd, COL_INFO, \
if (check_col(pinfo->cinfo, COL_INFO)) { \
col_add_fstr(pinfo->cinfo, COL_INFO, \
"V%d %s",version,val_to_str(type, commands, \
"Unknown Type:0x%02x")); \
} \
@ -357,8 +357,8 @@ dissect_igmp_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int ty
{
int len;
if (check_col(pinfo->fd, COL_INFO)) {
col_add_str(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, commands, "Unknown Type:0x%02x"));
}
@ -666,9 +666,9 @@ dissect_igmp_mtrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int typ
else
typestr = "Traceroute Request";
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, typestr);
if (blocks) col_append_str(pinfo->fd, COL_INFO, blocks);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, typestr);
if (blocks) col_append_str(pinfo->cinfo, COL_INFO, blocks);
}
proto_tree_add_uint_format(tree, hf_type, tvb, offset, 1, type,
@ -788,11 +788,11 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
tree = proto_item_add_subtree(item, ett_igmp);
if (check_col(pinfo->fd, COL_PROTOCOL)) {
col_set_str(pinfo->fd, COL_PROTOCOL, "IGMP");
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IGMP");
}
if (check_col(pinfo->fd, COL_INFO)) {
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
}

View File

@ -2,7 +2,7 @@
* Routines for IGRP dissection
* Copyright 2000, Paul Ionescu <paul@acorp.ro>
*
* $Id: packet-igrp.c,v 1.9 2001/12/03 03:59:35 guy Exp $
* $Id: packet-igrp.c,v 1.10 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -60,26 +60,26 @@ static void dissect_igrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *igrp_tree, *igrp_vektor_tree;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IGRP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IGRP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
ver_and_opcode = tvb_get_guint8(tvb,0);
update = tvb_get_guint8(tvb,1);
as = tvb_get_ntohs(tvb,2);
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (ver_and_opcode) {
case 0x11:
col_add_fstr(pinfo->fd, COL_INFO, "Response" );
col_add_fstr(pinfo->cinfo, COL_INFO, "Response" );
break;
case 0x12:
col_add_fstr(pinfo->fd, COL_INFO, "Request" );
col_add_fstr(pinfo->cinfo, COL_INFO, "Request" );
break;
default:
col_add_fstr(pinfo->fd, COL_INFO, "Unknown version or opcode");
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown version or opcode");
}
}

View File

@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-imap.c,v 1.16 2001/12/03 03:59:35 guy Exp $
* $Id: packet-imap.c,v 1.17 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -64,8 +64,8 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int tokenlen;
const u_char *next_token;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IMAP");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IMAP");
/*
* Find the end of the first line.
@ -82,12 +82,12 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
is_request = FALSE;
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
/*
* Put the first line from the buffer into the summary
* (but leave out the line terminator).
*/
col_add_fstr(pinfo->fd, COL_INFO, "%s: %s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s",
is_request ? "Request" : "Response",
format_text(line, linelen));
}

View File

@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
* $Id: packet-ip.c,v 1.151 2001/12/08 06:41:41 guy Exp $
* $Id: packet-ip.c,v 1.152 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -368,7 +368,7 @@ capture_ip(const u_char *pd, int offset, int len, packet_counts *ld) {
static void
dissect_ipopt_security(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint optlen, frame_data *fd, proto_tree *opt_tree)
guint optlen, packet_info *pinfo, proto_tree *opt_tree)
{
proto_tree *field_tree = NULL;
proto_item *tf;
@ -420,7 +420,7 @@ dissect_ipopt_security(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_ipopt_route(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint optlen, frame_data *fd, proto_tree *opt_tree)
guint optlen, packet_info *pinfo, proto_tree *opt_tree)
{
proto_tree *field_tree = NULL;
proto_item *tf;
@ -465,7 +465,7 @@ dissect_ipopt_route(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_ipopt_sid(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint optlen, frame_data *fd, proto_tree *opt_tree)
guint optlen, packet_info *pinfo, proto_tree *opt_tree)
{
proto_tree_add_text(opt_tree, tvb, offset, optlen,
"%s: %u", optp->name, tvb_get_ntohs(tvb, offset + 2));
@ -474,7 +474,7 @@ dissect_ipopt_sid(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
static void
dissect_ipopt_timestamp(const ip_tcp_opt *optp, tvbuff_t *tvb,
int offset, guint optlen, frame_data *fd, proto_tree *opt_tree)
int offset, guint optlen, packet_info *pinfo, proto_tree *opt_tree)
{
proto_tree *field_tree = NULL;
proto_item *tf;
@ -545,7 +545,7 @@ dissect_ipopt_timestamp(const ip_tcp_opt *optp, tvbuff_t *tvb,
static void
dissect_ipopt_ra(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint optlen, frame_data *fd, proto_tree *opt_tree)
guint optlen, packet_info *pinfo, proto_tree *opt_tree)
{
/* Router-Alert, as defined by RFC2113 */
int opt = tvb_get_ntohs(tvb, offset + 2);
@ -640,7 +640,7 @@ static const ip_tcp_opt ipopts[] = {
void
dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
const ip_tcp_opt *opttab, int nopts, int eol,
frame_data *fd, proto_tree *opt_tree)
packet_info *pinfo, proto_tree *opt_tree)
{
u_char opt;
const ip_tcp_opt *optp;
@ -649,7 +649,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
char *name;
char name_str[7+1+1+2+2+1+1]; /* "Unknown (0x%02x)" */
void (*dissect)(const struct ip_tcp_opt *, tvbuff_t *,
int, guint, frame_data *, proto_tree *);
int, guint, packet_info *, proto_tree *);
guint len;
while (length > 0) {
@ -721,7 +721,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
} else {
if (dissect != NULL) {
/* Option has a dissector. */
(*dissect)(optp, tvb, offset, len, fd, opt_tree);
(*dissect)(optp, tvb, offset, len, pinfo, opt_tree);
} else {
/* Option has no data, hence no dissector. */
proto_tree_add_text(opt_tree, tvb, offset, len, "%s", name);
@ -824,10 +824,10 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
gboolean update_col_info = TRUE;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&iph, offset, sizeof(e_ip));
@ -862,8 +862,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (hlen < IPH_MIN_LEN) {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Bogus IP header length (%u, must be at least %u)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Bogus IP header length (%u, must be at least %u)",
hlen, IPH_MIN_LEN);
if (tree) {
proto_tree_add_uint_format(ip_tree, hf_ip_hdr_len, tvb, offset, 1, hlen,
@ -946,7 +946,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Options: (%u bytes)", optlen);
field_tree = proto_item_add_subtree(tf, ett_ip_options);
dissect_ip_tcp_options(tvb, offset + 20, optlen,
ipopts, N_IP_OPTS, IPOPT_END, pinfo->fd, field_tree);
ipopts, N_IP_OPTS, IPOPT_END, pinfo, field_tree);
}
}
@ -1049,8 +1049,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (ipfd_head->flags & (FD_OVERLAPCONFLICT
|FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "[Illegal fragments]");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "[Illegal fragments]");
update_col_info = FALSE;
}
}
@ -1101,8 +1101,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (next_tvb == NULL) {
/* Just show this as a fragment. */
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Fragmented IP protocol (proto=%s 0x%02x, off=%u)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Fragmented IP protocol (proto=%s 0x%02x, off=%u)",
ipprotostr(iph.ip_p), iph.ip_p, (iph.ip_off & IP_OFFSET) * 8);
call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
return;
@ -1118,8 +1118,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!dissector_try_port(ip_dissector_table, nxt, next_tvb, pinfo, tree)) {
/* Unknown protocol */
if (update_col_info) {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
}
call_dissector(data_handle,next_tvb, pinfo, tree);
}
@ -1338,10 +1338,10 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean save_in_error_pkt;
tvbuff_t *next_tvb;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ICMP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/* To do: check for runts, errs, etc. */
icmp_type = tvb_get_guint8(tvb, 0);
@ -1426,8 +1426,8 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
if (check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, type_str);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, type_str);
if (tree) {
length = tvb_length(tvb);
@ -1525,7 +1525,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
Set the columns non-writable, so that the packet list
shows this as an ICMP packet, not as the type of packet
for which the ICMP packet was generated. */
col_set_writable(pinfo->fd, FALSE);
col_set_writable(pinfo->cinfo, FALSE);
/* Also, save the current values of the addresses, and restore
them when we're finished dissecting the contained packet, so

View File

@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
* $Id: packet-ip.h,v 1.20 2001/11/20 21:59:12 guy Exp $
* $Id: packet-ip.h,v 1.21 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -42,13 +42,13 @@ typedef struct ip_tcp_opt {
opt_len_type len_type; /* type of option length field */
int optlen; /* value length should be (minimum if VARIABLE) */
void (*dissect)(const struct ip_tcp_opt *, tvbuff_t *, int, guint,
frame_data *, proto_tree *);
packet_info *, proto_tree *);
/* routine to dissect option */
} ip_tcp_opt;
/* Routine to dissect IP or TCP options. */
void dissect_ip_tcp_options(tvbuff_t *, int, guint,
const ip_tcp_opt *, int, int, frame_data *, proto_tree *);
const ip_tcp_opt *, int, int, packet_info *, proto_tree *);
/* Dissector table for "ip.proto"; used by IPv6 as well as IPv4 */
extern dissector_table_t ip_dissector_table;

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-ipp.c,v 1.26 2001/12/03 03:59:35 guy Exp $
* $Id: packet-ipp.c,v 1.27 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -168,13 +168,13 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 status_code;
gchar *status_fmt;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IPP");
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPP");
if (check_col(pinfo->cinfo, COL_INFO)) {
if (is_request)
col_set_str(pinfo->fd, COL_INFO, "IPP request");
col_set_str(pinfo->cinfo, COL_INFO, "IPP request");
else
col_set_str(pinfo->fd, COL_INFO, "IPP response");
col_set_str(pinfo->cinfo, COL_INFO, "IPP response");
}
if (tree) {

View File

@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
* $Id: packet-ipsec.c,v 1.35 2001/12/03 03:59:35 guy Exp $
* $Id: packet-ipsec.c,v 1.36 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -119,7 +119,7 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset(tvb, advance, -1, -1);
if (g_ah_payload_in_subtree) {
col_set_writable(pinfo->fd, FALSE);
col_set_writable(pinfo->cinfo, FALSE);
}
/* do lookup with the subdissector table */
@ -137,16 +137,16 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
struct newah ah;
int advance;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "AH");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AH");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ah, 0, sizeof(ah));
advance = sizeof(ah) + ((ah.ah_len - 1) << 2);
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "AH (SPI=0x%08x)",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "AH (SPI=0x%08x)",
(guint32)ntohl(ah.ah_spi));
}
@ -204,15 +204,15 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* load the top pane info. This should be overwritten by
* the next protocol in the stack
*/
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "ESP");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&esp, 0, sizeof(esp));
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO, "ESP (SPI=0x%08x)",
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "ESP (SPI=0x%08x)",
(guint32)ntohl(esp.esp_spi));
}
@ -246,20 +246,20 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* load the top pane info. This should be overwritten by
* the next protocol in the stack
*/
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IPComp");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPComp");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ipcomp, 0, sizeof(ipcomp));
if (check_col(pinfo->fd, COL_INFO)) {
if (check_col(pinfo->cinfo, COL_INFO)) {
p = match_strval(ntohs(ipcomp.comp_cpi), cpi2val);
if (p == NULL) {
col_add_fstr(pinfo->fd, COL_INFO, "IPComp (CPI=0x%04x)",
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=0x%04x)",
ntohs(ipcomp.comp_cpi));
} else
col_add_fstr(pinfo->fd, COL_INFO, "IPComp (CPI=%s)", p);
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=%s)", p);
}
/*

View File

@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
* $Id: packet-ipv6.c,v 1.70 2001/12/03 03:59:35 guy Exp $
* $Id: packet-ipv6.c,v 1.71 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -198,8 +198,8 @@ dissect_frag6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
frag.ip6f_offlg = ntohs(frag.ip6f_offlg);
*offlg = frag.ip6f_offlg;
*ident = frag.ip6f_ident;
if (check_col(pinfo->fd, COL_INFO)) {
col_add_fstr(pinfo->fd, COL_INFO,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"IPv6 fragment (nxt=%s (0x%02x) off=%u id=0x%x)",
ipprotostr(frag.ip6f_nxt), frag.ip6f_nxt,
frag.ip6f_offlg & IP6F_OFF_MASK, frag.ip6f_ident);
@ -660,10 +660,10 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
struct ip6_hdr ipv6;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IPv6");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPv6");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
offset = 0;
tvb_memcpy(tvb, (guint8 *)&ipv6, offset, sizeof(ipv6));
@ -889,8 +889,8 @@ again:
}
if (ipfd_head->flags & (FD_OVERLAPCONFLICT
|FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
if (check_col(pinfo->fd, COL_INFO)) {
col_set_str(pinfo->fd, COL_INFO, "[Illegal fragments]");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_set_str(pinfo->cinfo, COL_INFO, "[Illegal fragments]");
update_col_info = FALSE;
}
}
@ -952,8 +952,8 @@ again:
/* do lookup with the subdissector table */
if (!dissector_try_port(ip_dissector_table, nxt, next_tvb, pinfo, tree)) {
/* Unknown protocol */
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
}
@ -962,11 +962,11 @@ static void
dissect_ipv6_none(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
if (hf_ipv6_mipv6_length != -1) {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Mobile IPv6 Destination Option");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Mobile IPv6 Destination Option");
} else {
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "IPv6 no next header");
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "IPv6 no next header");
}
/* XXX - dissect the payload as padding? */
}

View File

@ -2,7 +2,7 @@
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: packet-ipx.c,v 1.97 2001/12/08 06:41:41 guy Exp $
* $Id: packet-ipx.c,v 1.98 2001/12/10 00:25:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -212,10 +212,10 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 ipx_dsocket, ipx_ssocket;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "IPX");
if (check_col(pinfo->fd, COL_INFO))
col_clear(pinfo->fd, COL_INFO);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPX");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/* Calculate here for use in pinfo and in tree */
ipx_dsocket = tvb_get_ntohs(tvb, 16);
@ -234,8 +234,8 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&pinfo->net_dst, AT_IPX, 10, dst_net_node);
SET_ADDRESS(&pinfo->dst, AT_IPX, 10, dst_net_node);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%04x)",
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%04x)",
socket_text(ipx_dsocket), ipx_dsocket);
if (tree) {
@ -337,10 +337,10 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 conn_ctrl;
guint8 datastream_type;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "SPX");
if (check_col(pinfo->fd, COL_INFO))
col_set_str(pinfo->fd, COL_INFO, "SPX");
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPX");
if (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");
}
}

View File

@ -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");
}

View File

@ -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),

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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. */

View File

@ -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. */

View File

@ -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);
}

View File

@ -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)) {

View File

@ -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");

View File

@ -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;

View File

@ -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) {

View File

@ -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)

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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");
}
}

View File

@ -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. */

View File

@ -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. */

View File

@ -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");
}

View File

@ -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);

View File

@ -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) {

View File

@ -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));
}

View File

@ -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 */

View File

@ -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. */

View File

@ -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"));
}

View File

@ -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);

Some files were not shown because too many files have changed in this diff Show More