corrected cut and paste errors, makefile was unchanged copied from rtnet
[obnox/wireshark/wip.git] / packet-cups.c
index 509c021b0f63517784b5e36429b2dd89b3034bf4..6bd56fa39187b84ec4599449efb283b39db98b18 100644 (file)
@@ -5,18 +5,18 @@
 * 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.12 2002/08/28 21:00:08 jmayer Exp $
+*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
-* 
+*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
-* 
+*
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
 #include <glib.h>
-#include "packet.h"
-#include "strutil.h"
+#include <epan/packet.h>
+#include <epan/strutil.h>
 
 /**********************************************************************/
 
@@ -164,14 +160,14 @@ 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,
-                   tvb_length_remaining(tvb, offset), FALSE);
+               ti = proto_tree_add_item(tree, proto_cups, tvb, offset, -1,
+                   FALSE);
                cups_tree = proto_item_add_subtree(ti, ett_cups);
        }
 
@@ -222,8 +218,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"));