aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icq.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-12-10 00:26:21 +0000
committerGuy Harris <guy@alum.mit.edu>2001-12-10 00:26:21 +0000
commit23319ff023bcb144347a1307b958359b5226c699 (patch)
treeb347f1669210e07039ec31051cbb2c5e82422e6b /packet-icq.c
parenta81a607ed5e3d291940ab75dd82d28d72c222b48 (diff)
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
Diffstat (limited to 'packet-icq.c')
-rw-r--r--packet-icq.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/packet-icq.c b/packet-icq.c
index 063421b73a..e550bd940f 100644
--- a/packet-icq.c
+++ b/packet-icq.c
@@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
- * $Id: packet-icq.c,v 1.36 2001/12/03 03:59:35 guy Exp $
+ * $Id: packet-icq.c,v 1.37 2001/12/10 00:25:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -464,11 +464,11 @@ dissect_icqv4(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv4 (UDP)");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv4 (UDP)");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, "ICQ Version 4 protocol");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 4 protocol");
}
}
@@ -478,11 +478,11 @@ dissect_icqv3(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv3 (UDP)");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv3 (UDP)");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, "ICQ Version 3 protocol");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 3 protocol");
}
}
@@ -492,11 +492,11 @@ dissect_icqv2(tvbuff_t *tvb,
proto_tree *tree)
{
/* Not really implemented yet */
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv2 (UDP)");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv2 (UDP)");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_set_str(pinfo->fd, COL_INFO, "ICQ Version 2 protocol");
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_set_str(pinfo->cinfo, COL_INFO, "ICQ Version 2 protocol");
}
}
@@ -1748,8 +1748,8 @@ dissect_icqv5Client(tvbuff_t *tvb,
cmd = tvb_get_letohs(decr_tvb, ICQ5_CL_CMD);
- if (check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findClientCmd(cmd));
if (tree) {
ti = proto_tree_add_protocol_format(tree,
@@ -1908,8 +1908,8 @@ dissect_icqv5Server(tvbuff_t *tvb,
guint16 cmd;
cmd = tvb_get_letohs(tvb, offset + ICQ5_SRV_CMD);
- if (changeCol && check_col(pinfo->fd, COL_INFO))
- col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
+ if (changeCol && check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
if (pktsize == -1)
pktsize = tvb_reported_length(tvb);
@@ -2058,10 +2058,10 @@ static void dissect_icqv5(tvbuff_t *tvb,
{
guint32 unknown;
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "ICQv5 (UDP)");
- if (check_col(pinfo->fd, COL_INFO))
- col_set_str(pinfo->fd, COL_INFO, "ICQv5 packet");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQv5 (UDP)");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "ICQv5 packet");
unknown = tvb_get_letohl(tvb, ICQ5_UNKNOWN);
@@ -2078,11 +2078,11 @@ static void dissect_icq(tvbuff_t *tvb,
{
int version;
- if (check_col(pinfo->fd, COL_PROTOCOL)) {
- col_set_str(pinfo->fd, COL_PROTOCOL, "ICQ");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICQ");
}
- if (check_col(pinfo->fd, COL_INFO)) {
- col_clear(pinfo->fd, COL_INFO);
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_clear(pinfo->cinfo, COL_INFO);
}
version = tvb_get_letohs(tvb, ICQ_VERSION);