Note that we could save some overhead if we require the name argument to
[obnox/wireshark/wip.git] / packet-ipx.c
index 7e9277cedcad53612c497026146e47400f54e4cf..f0949bd8612d9df1cdfa5d6cf424eb10954170b1 100644 (file)
@@ -1,13 +1,12 @@
 /* packet-ipx.c
  * Routines for NetWare's IPX
- * Gilbert Ramirez <gram@xiexie.org>
+ * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-ipx.c,v 1.76 2001/01/13 07:47:48 guy Exp $
+ * $Id: packet-ipx.c,v 1.102 2002/02/17 00:51:19 guy Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- *
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
+#include <epan/packet.h>
+#include "packet-ipx.h"
+#include <epan/resolv.h>
 #include "etypes.h"
 #include "ppptypes.h"
 #include "llcsaps.h"
 #include "aftypes.h"
-#include "packet.h"
-#include "packet-ipx.h"
-#include "resolv.h"
-
-#include "packet-snmp.h"
 
 /* The information in this module (IPX, SPX, NCP) comes from:
        NetWare LAN Analysis, Second Edition
@@ -73,8 +70,6 @@ static gint ett_ipx = -1;
 static dissector_table_t ipx_type_dissector_table;
 static dissector_table_t ipx_socket_dissector_table;
 
-static dissector_handle_t nbipx_handle;
-
 static int proto_spx = -1;
 static int hf_spx_connection_control = -1;
 static int hf_spx_datastream_type = -1;
@@ -104,6 +99,8 @@ static int proto_ipxmsg = -1;
 static int hf_msg_conn = -1;
 static int hf_msg_sigchar = -1;
 
+static dissector_handle_t data_handle;
+
 static void
 dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
 
@@ -131,8 +128,11 @@ static const value_string ipx_socket_vals[] = {
        { IPX_SOCKET_NETBIOS,                   "NetBIOS" },
        { IPX_SOCKET_DIAGNOSTIC,                "Diagnostic" },
        { IPX_SOCKET_SERIALIZATION,             "Serialization" },
+       { IPX_SOCKET_NWLINK_SMB_SERVER,         "NWLink SMB Server" },
        { IPX_SOCKET_NWLINK_SMB_NAMEQUERY,      "NWLink SMB Name Query" },
-       { IPX_SOCKET_NWLINK_SMB_DGRAM,          "NWLink SMB Datagram" },
+       { IPX_SOCKET_NWLINK_SMB_REDIR,          "NWLink SMB Redirector" },
+       { IPX_SOCKET_NWLINK_SMB_MAILSLOT,       "NWLink SMB Mailslot Datagram" },
+       { IPX_SOCKET_NWLINK_SMB_MESSENGER,      "NWLink SMB Messenger" },
        { IPX_SOCKET_NWLINK_SMB_BROWSE,         "NWLink SMB Browse" },
        { IPX_SOCKET_ATTACHMATE_GW,             "Attachmate Gateway" },
        { IPX_SOCKET_IPX_MESSAGE,               "IPX Message" },
@@ -145,21 +145,19 @@ static const value_string ipx_socket_vals[] = {
        { IPX_SOCKET_ADSM,                      "ADSM" },
        { IPX_SOCKET_EIGRP,                     "Cisco EIGRP for IPX" },
        { IPX_SOCKET_WIDE_AREA_ROUTER,          "Wide Area Router" },
+       { 0xE885,                               "NT Server-RPC/GW" },
+       { 0x400C,                               "HP LaserJet/QuickSilver" },
+       { 0x907B,                               "SMS Testing and Development" },
+       { 0x8F83,                               "Powerchute UPS Monitoring" },
+       { 0x4006,                               "Netware Directory Server" },
+       { 0x8104,                               "Netware 386" },
        { 0x0000,                               NULL }
 };
 
 static const char*
 socket_text(guint16 socket)
 {
-       const char      *p;
-
-       p = match_strval(socket, ipx_socket_vals);
-       if (p) {
-               return p;
-       }
-       else {
-               return "Unknown";
-       }
+       return val_to_str(socket, ipx_socket_vals, "Unknown");
 }
 
 static const value_string ipx_packet_type_vals[] = {
@@ -193,82 +191,8 @@ static const value_string ipxmsg_sigchar_vals[] = {
        { 0, NULL }
 };
 
-gchar*
-ipxnet_to_string(const guint8 *ad)
-{
-       guint32 addr = pntohl(ad);
-       return ipxnet_to_str_punct(addr, ' ');
-}
-
-/* We use a different representation of hardware addresses
- * than ether_to_str(); we don't put punctuation between the hex
- * digits.
- */
-
-gchar*
-ipx_addr_to_str(guint32 net, const guint8 *ad)
-{
-       static gchar    str[3][8+1+MAXNAMELEN+1]; /* 8 digits, 1 period, NAME, 1 null */
-       static gchar    *cur;
-       char            *name;
-
-       if (cur == &str[0][0]) {
-               cur = &str[1][0];
-       } else if (cur == &str[1][0]) {
-               cur = &str[2][0];
-       } else {
-               cur = &str[0][0];
-       }
-
-       name = get_ether_name_if_known(ad);
-
-       if (name) {
-               sprintf(cur, "%s.%s", get_ipxnet_name(net), name);
-       }
-       else {
-               sprintf(cur, "%s.%s", get_ipxnet_name(net), ether_to_str_punct(ad, '\0'));
-       }
-       return cur;
-}
-
-gchar *
-ipxnet_to_str_punct(const guint32 ad, char punct)
-{
-  static gchar  str[3][12];
-  static gchar *cur;
-  gchar        *p;
-  int          i;
-  guint32      octet;
-  static const gchar hex_digits[16] = "0123456789ABCDEF";
-  static const guint32  octet_mask[4] =
-         { 0xff000000 , 0x00ff0000, 0x0000ff00, 0x000000ff };
-
-  if (cur == &str[0][0]) {
-    cur = &str[1][0];
-  } else if (cur == &str[1][0]) {  
-    cur = &str[2][0];
-  } else {  
-    cur = &str[0][0];
-  }
-  p = &cur[12];
-  *--p = '\0';
-  i = 3;
-  for (;;) {
-    octet = (ad & octet_mask[i]) >> ((3 - i) * 8);
-    *--p = hex_digits[octet&0xF];
-    octet >>= 4;
-    *--p = hex_digits[octet&0xF];
-    if (i == 0)
-      break;
-    if (punct)
-      *--p = punct;
-    i--;
-  }
-  return p;
-}
-
 void
-capture_ipx(const u_char *pd, int offset, packet_counts *ld)
+capture_ipx(const u_char *pd, int offset, int len, packet_counts *ld)
 {
        ld->ipx++;
 }
@@ -277,23 +201,21 @@ static void
 dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
        tvbuff_t        *next_tvb;
-       const guint8    *this_pd;
-       int             this_offset, len;
 
        proto_tree      *ipx_tree;
        proto_item      *ti;
 
-       guint8          *src_net_node, *dst_net_node;
+       const guint8    *src_net_node, *dst_net_node;
 
        guint8          ipx_type, ipx_hops;
        guint16         ipx_length;
-       int             reported_length, available_length;
 
        guint16         ipx_dsocket, ipx_ssocket;
 
-       CHECK_DISPLAY_AS_DATA(proto_ipx, tvb, pinfo, tree);
-
-       pinfo->current_proto = "IPX";
+       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);
@@ -301,28 +223,19 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        ipx_type        = tvb_get_guint8(tvb, 5);
        ipx_length      = tvb_get_ntohs(tvb, 2);
 
-       /* Set the payload and captured-payload lengths to the minima of
-          (the IPX length plus the length of the headers above it) and
-          the frame lengths. XXX - remove once all dissectors use tvbuffs */
-       tvb_compat(tvb, &this_pd, &this_offset);
-       len = ipx_length + this_offset;
-       if (pi.len > len)
-               pi.len = len;
-       if (pi.captured_len > len)
-               pi.captured_len = len;
+       /* Adjust the tvbuff length to include only the IPX datagram. */
+       set_actual_length(tvb, ipx_length);
 
        src_net_node = tvb_get_ptr(tvb, 18, 10);
        dst_net_node = tvb_get_ptr(tvb, 6,  10);
 
-       SET_ADDRESS(&pi.net_src,        AT_IPX, 10, src_net_node);
-       SET_ADDRESS(&pi.src,            AT_IPX, 10, src_net_node);
-       SET_ADDRESS(&pi.net_dst,        AT_IPX, 10, dst_net_node);
-       SET_ADDRESS(&pi.dst,            AT_IPX, 10, dst_net_node);
+       SET_ADDRESS(&pinfo->net_src,    AT_IPX, 10, src_net_node);
+       SET_ADDRESS(&pinfo->src,        AT_IPX, 10, src_net_node);
+       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_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IPX");
-       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) {
@@ -341,44 +254,27 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                /* Destination */
                proto_tree_add_item(ipx_tree, hf_ipx_dnet, tvb, 6, 4, FALSE);
                proto_tree_add_item(ipx_tree, hf_ipx_dnode, tvb, 10, 6, FALSE);
-               proto_tree_add_uint_format(ipx_tree, hf_ipx_dsocket, tvb, 16, 2,
-                       ipx_dsocket, "Destination Socket: %s (0x%04X)",
-                       socket_text(ipx_dsocket), ipx_dsocket);
+               proto_tree_add_uint(ipx_tree, hf_ipx_dsocket, tvb, 16, 2,
+                       ipx_dsocket);
 
                /* Source */
                proto_tree_add_item(ipx_tree, hf_ipx_snet, tvb, 18, 4, FALSE);
                proto_tree_add_item(ipx_tree, hf_ipx_snode, tvb, 22, 6, FALSE);
-               proto_tree_add_uint_format(ipx_tree, hf_ipx_ssocket, tvb, 28, 2,
-                       ipx_ssocket, "Source Socket: %s (0x%04X)", socket_text(ipx_ssocket),
+               proto_tree_add_uint(ipx_tree, hf_ipx_ssocket, tvb, 28, 2,
                        ipx_ssocket);
        }
 
        /* Make the next tvbuff */
-       reported_length = ipx_length - IPX_HEADER_LEN;
-       available_length = tvb_length(tvb) - IPX_HEADER_LEN;
-       next_tvb = tvb_new_subset(tvb, IPX_HEADER_LEN,
-                       MIN(available_length, reported_length),
-                       reported_length);
+       next_tvb = tvb_new_subset(tvb, IPX_HEADER_LEN, -1, -1);
 
        if (dissector_try_port(ipx_type_dissector_table, ipx_type, next_tvb,
            pinfo, tree))
                return;
 
-       switch (ipx_type) {
-               case IPX_PACKET_TYPE_WANBCAST:
-               case IPX_PACKET_TYPE_PEP:
-                       if (ipx_dsocket == IPX_SOCKET_NETBIOS) {
-                               call_dissector(nbipx_handle, next_tvb, pinfo,
-                                   tree);
-                               return;
-                       }
-                       /* else fall through */
-
-               case 0: /* IPX, fall through to default */
-                       /* XXX - should type 0's be dissected as NBIPX
-                          if they're aimed at the NetBIOS socket? */
-                       break;
-       }
+       /*
+        * Let the subdissector know what type of IPX packet this is.
+        */
+       pinfo->ipxptype = ipx_type;
 
        if (dissector_try_port(ipx_socket_dissector_table, ipx_dsocket,
            next_tvb, pinfo, tree))
@@ -386,7 +282,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        if (dissector_try_port(ipx_socket_dissector_table, ipx_ssocket,
            next_tvb, pinfo, tree))
                return;
-       dissect_data(next_tvb, 0, pinfo, tree);
+       call_dissector(data_handle,next_tvb, pinfo, tree);
 }
 
 
@@ -441,13 +337,10 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint8          conn_ctrl;
        guint8          datastream_type;
 
-       CHECK_DISPLAY_AS_DATA(proto_spx, tvb, pinfo, tree);
-
-       pinfo->current_proto = "SPX";
-       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);
@@ -472,7 +365,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                proto_tree_add_item(spx_tree, hf_spx_all_nr, tvb, 10, 2, FALSE);
 
                next_tvb = tvb_new_subset(tvb, SPX_HEADER_LEN, -1, -1);
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
        }
 }
 
@@ -486,24 +379,22 @@ dissect_ipxmsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_item      *ti;
        guint8          conn_number, sig_char;
 
-       CHECK_DISPLAY_AS_DATA(proto_ipxmsg, tvb, pinfo, tree);
-
-       pinfo->current_proto = "IPX MSG";
-
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-        col_set_str(pinfo->fd, COL_PROTOCOL, "IPX MSG");
+       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);
        }
 
        if (tree) {
-               ti = proto_tree_add_item(tree, proto_ipxmsg, tvb, 0, tvb_length(tvb), FALSE);
+               ti = proto_tree_add_item(tree, proto_ipxmsg, tvb, 0, -1, FALSE);
                msg_tree = proto_item_add_subtree(ti, ett_ipxmsg);
 
                proto_tree_add_uint(msg_tree, hf_msg_conn, tvb, 0, 1, conn_number);
@@ -525,23 +416,22 @@ dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        int             cursor;
        int             available_length;
 
-       char            *rip_type[3] = { "Request", "Response", "Unknown" };
+       static char     *rip_type[3] = { "Request", "Response", "Unknown" };
 
-       CHECK_DISPLAY_AS_DATA(proto_ipxrip, tvb, pinfo, tree);
-
-       pinfo->current_proto = "IPX RIP";
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-        col_set_str(pinfo->fd, COL_PROTOCOL, "IPX RIP");
+       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_set_str(pinfo->cinfo, COL_INFO, rip_type[MIN(operation, 2)]);
        }
 
        if (tree) {
-               ti = proto_tree_add_item(tree, proto_ipxrip, tvb, 0, tvb_length(tvb), FALSE);
+               ti = proto_tree_add_item(tree, proto_ipxrip, tvb, 0, -1, FALSE);
                rip_tree = proto_item_add_subtree(ti, ett_ipxrip);
 
                if (operation < 2) {
@@ -563,9 +453,9 @@ dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        proto_tree_add_text(rip_tree, tvb, 0, 2, "Unknown RIP packet type");
                }
 
-               available_length = tvb_length(tvb);
+               available_length = tvb_reported_length(tvb);
                for (cursor =  2; cursor < available_length; cursor += 8) {
-                       memcpy(&route.network, tvb_get_ptr(tvb, cursor, 4), 4);
+                       tvb_memcpy(tvb, (guint8 *)&route.network, cursor, 4);
                        route.hops = tvb_get_ntohs(tvb, cursor+4);
                        route.ticks = tvb_get_ntohs(tvb, cursor+6);
 
@@ -598,59 +488,238 @@ server_type(guint16 type)
 {
        const char *p;
 
-       /* some of these are from ncpfs, others are from the book */
+       /*
+        * Some of these are from ncpfs, others are from the book,
+        * others are from the page at
+        *
+        *      http://www.iana.org/assignments/novell-sap-numbers
+        *
+        * and some from the page at
+        *
+        *      http://www.rware.demon.co.uk/ipxsap.htm
+        *
+        * (see also the page at
+        *
+        *      http://developer.novell.com/research/appnotes/1998/february/03/06.htm
+        *
+        * which has a huge list - but many of the entries list only the
+        * organization owning the SAP type, not what the type is for).
+        */
        static const value_string server_vals[] = {
+               { 0x0000,       "Unknown" },
                { 0x0001,       "User" },
                { 0x0002,       "User Group" },
-               { 0x0003,       "Print Queue" },
-               { 0x0004,       "File server" },
-               { 0x0005,       "Job server" },
-               { 0x0007,       "Print server" },
-               { 0x0008,       "Archive server" },
-               { 0x0009,       "Archive server" },
-               { 0x000a,       "Job queue" },
+               { 0x0003,       "Print Queue or Print Group" },
+               { 0x0004,       "File Server (SLIST source)" },
+               { 0x0005,       "Job Server" },
+               { 0x0006,       "Gateway" },
+               { 0x0007,       "Print Server or Silent Print Server" },
+               { 0x0008,       "Archive Queue" },
+               { 0x0009,       "Archive Server" },
+               { 0x000a,       "Job Queue" },
                { 0x000b,       "Administration" },
-               { 0x0021,       "NAS SNA gateway" },
-               { 0x0024,       "Remote bridge" },
-               { 0x0026,       "Bridge server" },
-               { 0x0027,       "TCP/IP gateway" },
-               { 0x002d,       "Time Synchronization VAP" },
-               { 0x002e,       "Archive Server Dynamic SAP" },
-               { 0x0047,       "Advertising print server" },
-               { 0x004b,       "Btrieve VAP 5.0" },
-               { 0x004c,       "SQL VAP" },
-               { 0x0050,       "Btrieve VAP" },
-               { 0x0053,       "Print Queue VAP" },
-               { 0x007a,       "TES NetWare for VMS" },
-               { 0x0098,       "NetWare access server" },
-               { 0x009a,       "Named Pipes server" },
-               { 0x009e,       "Portable NetWare Unix" },
-               { 0x0107,       "NetWare 386" },
-               { 0x0111,       "Test server" },
-               { 0x0133,       "NetWare Name Service" },
-               { 0x0166,       "NetWare management" },
+               { 0x000F,       "Novell TI-RPC" },
+               { 0x0017,       "Diagnostics" },
+               { 0x0020,       "NetBIOS" },
+               { 0x0021,       "NAS SNA Gateway" },
+               { 0x0023,       "NACS Async Gateway or Asynchronous Gateway" },
+               { 0x0024,       "Remote Bridge or Routing Service" },
+               { 0x0026,       "Bridge Server or Asynchronous Bridge Server" },
+               { 0x0027,       "TCP/IP Gateway Server" },
+               { 0x0028,       "Point to Point (Eicon) X.25 Bridge Server" },
+               { 0x0029,       "Eicon 3270 Gateway" },
+               { 0x002a,       "CHI Corp" },
+               { 0x002c,       "PC Chalkboard" },
+               { 0x002d,       "Time Synchronization Server or Asynchronous Timer" },
+               { 0x002e,       "ARCserve 5.0 / Palindrome Backup Director 4.x (PDB4)" },
+               { 0x0045,       "DI3270 Gateway" },
+               { 0x0047,       "Advertising Print Server" },
+               { 0x004a,       "NetBlazer Modems" },
+               { 0x004b,       "Btrieve VAP/NLM 5.0" },
+               { 0x004c,       "Netware SQL VAP/NLM Server" },
+               { 0x004d,       "Xtree Network Version/Netware XTree" },
+               { 0x0050,       "Btrieve VAP 4.11" },
+               { 0x0052,       "QuickLink (Cubix)" },
+               { 0x0053,       "Print Queue User" },
+               { 0x0058,       "Multipoint X.25 Eicon Router" },
+               { 0x0060,       "STLB/NLM" },
+               { 0x0064,       "ARCserve" },
+               { 0x0066,       "ARCserve 3.0" },
+               { 0x0072,       "WAN Copy Utility" },
+               { 0x007a,       "TES-Netware for VMS" },
+               { 0x0092,       "WATCOM Debugger or Emerald Tape Backup Server" },
+               { 0x0095,       "DDA OBGYN" },
+               { 0x0098,       "Netware Access Server (Asynchronous gateway)" },
+               { 0x009a,       "Netware for VMS II or Named Pipe Server" },
+               { 0x009b,       "Netware Access Server" },
+               { 0x009e,       "Portable Netware Server or SunLink NVT" },
+               { 0x00a1,       "Powerchute APC UPS NLM" },
+               { 0x00aa,       "LAWserve" },
+               { 0x00ac,       "Compaq IDA Status Monitor" },
+               { 0x0100,       "PIPE STAIL" },
+               { 0x0102,       "LAN Protect Bindery" },
+               { 0x0103,       "Oracle DataBase Server" },
+               { 0x0107,       "Netware 386 or RSPX Remote Console" },
+               { 0x010f,       "Novell SNA Gateway" },
+               { 0x0111,       "Test Server" },
+               { 0x0112,       "Print Server (HP)" },
+               { 0x0114,       "CSA MUX (f/Communications Executive)" },
+               { 0x0115,       "CSA LCA (f/Communications Executive)" },
+               { 0x0116,       "CSA CM (f/Communications Executive)" },
+               { 0x0117,       "CSA SMA (f/Communications Executive)" },
+               { 0x0118,       "CSA DBA (f/Communications Executive)" },
+               { 0x0119,       "CSA NMA (f/Communications Executive)" },
+               { 0x011a,       "CSA SSA (f/Communications Executive)" },
+               { 0x011b,       "CSA STATUS (f/Communications Executive)" },
+               { 0x011e,       "CSA APPC (f/Communications Executive)" },
+               { 0x0126,       "SNA TEST SSA Profile" },
+               { 0x012a,       "CSA TRACE (f/Communications Executive)" },
+               { 0x012b,       "Netware for SAA" },
+               { 0x012e,       "IKARUS virus scan utility" },
+               { 0x0130,       "Communications Executive" },
+               { 0x0133,       "NNS Domain Server or Netware Naming Services Domain" },
+               { 0x0135,       "Netware Naming Services Profile" },
+               { 0x0137,       "Netware 386 Print Queue or NNS Print Queue" },
+               { 0x0141,       "LAN Spool Server (Vap, Intel)" },
+               { 0x0152,       "IRMALAN Gateway" },
+               { 0x0154,       "Named Pipe Server" },
+               { 0x0166,       "NetWare Management" },
+               { 0x0168,       "Intel PICKIT Comm Server or Intel CAS Talk Server" },
+               { 0x0173,       "Compaq" },
+               { 0x0174,       "Compaq SNMP Agent" },
+               { 0x0175,       "Compaq" },
+               { 0x0180,       "XTree Server or XTree Tools" },
+               { 0x018A,       "NASI services broadcast server (Novell)" },
+               { 0x01b0,       "GARP Gateway (net research)" },
+               { 0x01b1,       "Binfview (Lan Support Group)" },
+               { 0x01bf,       "Intel LanDesk Manager" },
+               { 0x01ca,       "AXTEC" },
+               { 0x01cb,       "Shiva NetModem/E" },
+               { 0x01cc,       "Shiva LanRover/E" },
+               { 0x01cd,       "Shiva LanRover/T" },
+               { 0x01ce,       "Shiva Universal" },
+               { 0x01d8,       "Castelle FAXPress Server" },
+               { 0x01da,       "Castelle LANPress Print Server" },
+               { 0x01dc,       "Castelle FAX/Xerox 7033 Fax Server/Excel Lan Fax" },
+               { 0x01f0,       "LEGATO" },
+               { 0x01f5,       "LEGATO" },
+               { 0x0233,       "NMS Agent or Netware Management Agent" },
+               { 0x0237,       "NMS IPX Discovery or LANtern Read/Write Channel" },
+               { 0x0238,       "NMS IP Discovery or LANtern Trap/Alarm Channel" },
+               { 0x023a,       "LANtern" },
+               { 0x023c,       "MAVERICK" },
                { 0x023f,       "SMS Testing and Development" },
-               { 0x026a,       "NetWare management" },
-               { 0x026b,       "Time synchronization" },
-               { 0x027b,       "NetWare Management Agent" },
-               { 0x0278,       "NetWare Directory server" },
-               { 0x030c,       "HP LaserJet / Quick Silver" },
-               { 0x0355,       "Arcada Software" },
+               { 0x024e,       "Netware Connect" },
+               { 0x024f,       "NASI server broadcast (Cisco)" },
+               { 0x026a,       "Network Management (NMS) Service Console" },
+               { 0x026b,       "Time Synchronization Server (Netware 4.x)" },
+               { 0x0278,       "Directory Server (Netware 4.x)" },
+               { 0x027b,       "Netware Management Agent" },
+               { 0x0280,       "Novell File and Printer Sharing Service for PC" },
+               { 0x0304,       "Novell SAA Gateway" },
+               { 0x0308,       "COM or VERMED 1" },
+               { 0x030a,       "Galacticomm's Worldgroup Server" },
+               { 0x030c,       "Intel Netport 2 or HP JetDirect or HP Quicksilver" },
+               { 0x0320,       "Attachmate Gateway" },
+               { 0x0327,       "Microsoft Diagnostics" },
+               { 0x0328,       "WATCOM SQL server" },
+               { 0x0335,       "MultiTech Systems Multisynch Comm Server" },
+               { 0x0343,       "Xylogics Remote Access Server or LAN Modem" },
+               { 0x0355,       "Arcada Backup Exec" },
+               { 0x0358,       "MSLCD1" },
                { 0x0361,       "NETINELO" },
                { 0x037e,       "Powerchute UPS Monitoring" },
-               { 0x03e1,       "UnixWare Application Server" },
-               { 0x044c,       "Archive" },
+               { 0x037f,       "ViruSafe Notify" },
+               { 0x0386,       "HP Bridge" },
+               { 0x0387,       "HP Hub" },
+               { 0x0394,       "NetWare SAA Gateway" },
+               { 0x039b,       "Lotus Notes" },
+               { 0x03b7,       "Certus Anti Virus NLM" },
+               { 0x03c4,       "ARCserve 4.0 (Cheyenne)" },
+               { 0x03c7,       "LANspool 3.5 (Intel)" },
+               { 0x03d7,       "Lexmark printer server (type 4033-011)" },
+               { 0x03d8,       "Lexmark XLE printer server (type 4033-301)" },
+               { 0x03dd,       "Banyan ENS for Netware Client NLM" },
+               { 0x03de,       "Gupta Sequel Base Server or NetWare SQL" },
+               { 0x03e1,       "Univel Unixware" },
+               { 0x03e4,       "Univel Unixware" },
+               { 0x03fc,       "Intel Netport" },
+               { 0x03fd,       "Intel Print Server Queue" },
+               { 0x040A,       "ipnServer" },
+               { 0x040D,       "LVERRMAN" },
+               { 0x040E,       "LVLIC" },
+               { 0x0414,       "NET Silicon (DPI)/Kyocera" },
+               { 0x0429,       "Site Lock Virus (Brightworks)" },
+               { 0x0432,       "UFHELP R" },
+               { 0x0433,       "Synoptics 281x Advanced SNMP Agent" },
+               { 0x0444,       "Microsoft NT SNA Server" },
+               { 0x0448,       "Oracle" },
+               { 0x044c,       "ARCserve 5.01" },
+               { 0x0457,       "Canon GP55 Running on a Canon GP55 network printer" },
+               { 0x045a,       "QMS Printers" },
+               { 0x045b,       "Dell SCSI Array (DSA) Monitor" },
+               { 0x0491,       "NetBlazer Modems" },
+               { 0x04ac,       "On-Time Scheduler NLM" },
+               { 0x04b0,       "CD-Net (Meridian)" },
+               { 0x0513,       "Emulex NQA" },
+               { 0x0520,       "Site Lock Checks" },
+               { 0x0529,       "Site Lock Checks (Brightworks)" },
+               { 0x052d,       "Citrix OS/2 App Server" },
+               { 0x0535,       "Tektronix" },
+               { 0x0536,       "Milan" },
                { 0x055d,       "Attachmate SNA gateway" },
+               { 0x056b,       "IBM 8235 modem server" },
+               { 0x056c,       "Shiva LanRover/E PLUS" },
+               { 0x056d,       "Shiva LanRover/T PLUS" },
+               { 0x0580,       "McAfee's NetShield anti-virus" },
+               { 0x05B8,       "NLM to workstation communication (Revelation Software)" },
+               { 0x05BA,       "Compatible Systems Routers" },
+               { 0x05BE,       "Cheyenne Hierarchical Storage Manager" },
+               { 0x0606,       "JCWatermark Imaging" },
+               { 0x060c,       "AXIS Network Printer" },
                { 0x0610,       "Adaptec SCSI Management" },
-               { 0x0640,       "NT Server-RPC/GW for NW/Win95 User Level Sec" },
-               { 0x064e,       "NT Server-IIS" },
+               { 0x0621,       "IBM AntiVirus NLM" },
+               { 0x0640,       "Microsoft Gateway Services for NetWare" },
+/*             { 0x0640,       "NT Server-RPC/GW for NW/Win95 User Level Sec" }, */
+               { 0x064e,       "Microsoft Internet Information Server" },
+               { 0x067b,       "Microsoft Win95/98 File and Print Sharing for NetWare" },
+               { 0x067c,       "Microsoft Win95/98 File and Print Sharing for NetWare" },
+               { 0x076C,       "Xerox" },
+               { 0x079b,       "Shiva LanRover/E 115" },
+               { 0x079c,       "Shiva LanRover/T 115" },
+               { 0x07B4,       "Cubix WorldDesk" },
+               { 0x07c2,       "Quarterdeck IWare Connect V2.x NLM" },
+               { 0x07c1,       "Quarterdeck IWare Connect V3.x NLM" },
                { 0x0810,       "ELAN License Server Demo" },
-               { 0x8002,       "Intel NetPort Print Server" },
-
-/* For any unidentified ones, I found a really big list of them at: */
-/*    http://www.inpnet.org/cnpweb/saplist.txt */
-/*    http://www.isi.edu/in-notes/iana/assignments/novell-sap-numbers */
-
+               { 0x0824,       "Shiva LanRover Access Switch/E" },
+               { 0x086a,       "ISSC collector NLMs" },
+               { 0x087f,       "ISSC DAS agent for AIX" },
+               { 0x0880,       "Intel Netport PRO" },
+               { 0x0881,       "Intel Netport PRO" },
+               { 0x0b29,       "Site Lock" },
+               { 0x0c29,       "Site Lock Applications" },
+               { 0x0c2c,       "Licensing Server" },
+               { 0x2101,       "Performance Technology Instant Internet" },
+               { 0x2380,       "LAI Site Lock" },
+               { 0x238c,       "Meeting Maker" },
+               { 0x4808,       "Site Lock Server or Site Lock Metering VAP/NLM" },
+               { 0x5555,       "Site Lock User" },
+               { 0x6312,       "Tapeware" },
+               { 0x6f00,       "Rabbit Gateway (3270)" },
+               { 0x7703,       "MODEM" },
+               { 0x8002,       "NetPort Printers (Intel) or LANport" },
+               { 0x8008,       "WordPerfect Network Version" },
+               { 0x85BE,       "Cisco Enhanced Interior Routing Protocol (EIGRP)" },
+               { 0x8888,       "WordPerfect Network Version or Quick Network Management" },
+               { 0x9000,       "McAfee's NetShield anti-virus" },
+               { 0x9604,       "CSA-NT_MON" },
+               { 0xb6a8,       "Ocean Isle Reachout Remote Control" },
+               { 0xf11f,       "Site Lock Metering VAP/NLM" },
+               { 0xf1ff,       "Site Lock" },
+               { 0xf503,       "Microsoft SQL Server" },
+               { 0xf905,       "IBM Time and Place/2 application" },
+               { 0xfbfb,       "TopCall III fax server" },
+               { 0xffff,       "Any Service or Wildcard" },
                { 0x0000,       NULL }
        };
 
@@ -672,29 +741,28 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        struct sap_query query;
        struct sap_server_ident server;
 
-       char            *sap_type[4] = { "General Query", "General Response",
+       static char     *sap_type[4] = { "General Query", "General Response",
                "Nearest Query", "Nearest Response" };
 
-       CHECK_DISPLAY_AS_DATA(proto_sap, tvb, pinfo, tree);
-
-       pinfo->current_proto = "IPX SAP";
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "IPX SAP");
+       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_set_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");
                }
        }
 
        if (tree) {
-               ti = proto_tree_add_item(tree, proto_sap, tvb, 0, tvb_length(tvb), FALSE);
+               ti = proto_tree_add_item(tree, proto_sap, tvb, 0, -1, FALSE);
                sap_tree = proto_item_add_subtree(ti, ett_ipxsap);
 
                if (query.query_type >= 1 && query.query_type <= 4) {
@@ -717,12 +785,15 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                if (query.query_type == IPX_SAP_GENERAL_RESPONSE ||
                                query.query_type == IPX_SAP_NEAREST_RESPONSE) { /* responses */
 
-                       int available_length = tvb_length(tvb);
+                       int available_length = tvb_reported_length(tvb);
                        for (cursor =  2; (cursor + 64) <= available_length; cursor += 64) {
                                server.server_type = tvb_get_ntohs(tvb, cursor);
-                               memcpy(server.server_name, tvb_get_ptr(tvb, cursor+2, 48), 48);
-                               memcpy(&server.server_network, tvb_get_ptr(tvb, cursor+50, 4), 4);
-                               memcpy(&server.server_node, tvb_get_ptr(tvb, cursor+54, 6), 6);
+                               tvb_memcpy(tvb, (guint8 *)server.server_name,
+                                   cursor+2, 48);
+                               tvb_memcpy(tvb, (guint8 *)&server.server_network,
+                                   cursor+50, 4);
+                               tvb_memcpy(tvb, (guint8 *)&server.server_node,
+                                   cursor+54, 6);
                                server.server_port = tvb_get_ntohs(tvb, cursor+60);
                                server.intermediate_network = tvb_get_ntohs(tvb, cursor+62);
 
@@ -736,7 +807,7 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                                ipxnet_to_string((guint8*)tvb_get_ptr(tvb, cursor+50, 4)));
                                proto_tree_add_text(s_tree, tvb, cursor+54, 6, "Node: %s",
                                                ether_to_str((guint8*)tvb_get_ptr(tvb, cursor+54, 6)));
-                               proto_tree_add_text(s_tree, tvb, cursor+60, 2, "Socket: %s (0x%04X)",
+                               proto_tree_add_text(s_tree, tvb, cursor+60, 2, "Socket: %s (0x%04x)",
                                                socket_text(server.server_port), server.server_port);
                                proto_tree_add_text(s_tree, tvb, cursor+62, 2,
                                                "Intermediate Networks: %d",
@@ -756,117 +827,119 @@ proto_register_ipx(void)
        static hf_register_info hf_ipx[] = {
                { &hf_ipx_checksum,
                { "Checksum",           "ipx.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_len,
                { "Length",             "ipx.len", FT_UINT16, BASE_DEC, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_hops,
                { "Transport Control (Hops)", "ipx.hops", FT_UINT8, BASE_DEC, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_packet_type,
                { "Packet Type",        "ipx.packet_type", FT_UINT8, BASE_HEX, VALS(ipx_packet_type_vals),
                        0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_dnet,
                { "Destination Network","ipx.dst.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_dnode,
                { "Destination Node",   "ipx.dst.node", FT_ETHER, BASE_NONE, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_dsocket,
-               { "Destination Socket", "ipx.dst.socket", FT_UINT16, BASE_HEX, NULL, 0x0,
-                       "" }},
+               { "Destination Socket", "ipx.dst.socket", FT_UINT16, BASE_HEX,
+                       VALS(ipx_socket_vals), 0x0,
+                       "", HFILL }},
 
                { &hf_ipx_snet,
                { "Source Network","ipx.src.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_snode,
                { "Source Node",        "ipx.src.node", FT_ETHER, BASE_NONE, NULL, 0x0,
-                       "" }},
+                       "", HFILL }},
 
                { &hf_ipx_ssocket,
-               { "Source Socket",      "ipx.src.socket", FT_UINT16, BASE_HEX, NULL, 0x0,
-                       "" }},
+               { "Source Socket",      "ipx.src.socket", FT_UINT16, BASE_HEX,
+                       VALS(ipx_socket_vals), 0x0,
+                       "", HFILL }},
        };
 
        static hf_register_info hf_spx[] = {
                { &hf_spx_connection_control,
                { "Connection Control",         "spx.ctl", 
                  FT_UINT8,     BASE_HEX,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_datastream_type,
                { "Datastream type",            "spx.type", 
                  FT_UINT8,     BASE_HEX,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_src_id,
                { "Source Connection ID",       "spx.src", 
                  FT_UINT16,    BASE_DEC,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_dst_id,
                { "Destination Connection ID",  "spx.dst", 
                  FT_UINT16,    BASE_DEC,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_seq_nr,
                { "Sequence Number",            "spx.seq", 
                  FT_UINT16,    BASE_DEC,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_ack_nr,
                { "Acknowledgment Number",      "spx.ack", 
                  FT_UINT16,    BASE_DEC,       NULL,   0x0,
-                 "" }},
+                 "", HFILL }},
 
                { &hf_spx_all_nr,
                { "Allocation Number",          "spx.alloc", 
                  FT_UINT16,    BASE_DEC,       NULL,   0x0,
-                 "" }}
+                 "", HFILL }}
        };
 
        static hf_register_info hf_ipxrip[] = {
                { &hf_ipxrip_request,
                { "Request",                    "ipxrip.request", 
                  FT_BOOLEAN,   BASE_NONE,      NULL,   0x0,
-                 "TRUE if IPX RIP request" }},
+                 "TRUE if IPX RIP request", HFILL }},
 
                { &hf_ipxrip_response,
                { "Response",                   "ipxrip.response", 
                  FT_BOOLEAN,   BASE_NONE,      NULL,   0x0,
-                 "TRUE if IPX RIP response" }}
+                 "TRUE if IPX RIP response", HFILL }}
        };
 
        static hf_register_info hf_sap[] = {
                { &hf_sap_request,
                { "Request",                    "ipxsap.request", 
                  FT_BOOLEAN,   BASE_NONE,      NULL,   0x0,
-                 "TRUE if SAP request" }},
+                 "TRUE if SAP request", HFILL }},
 
                { &hf_sap_response,
                { "Response",                   "ipxsap.response", 
                  FT_BOOLEAN,   BASE_NONE,      NULL,   0x0,
-                 "TRUE if SAP response" }}
+                 "TRUE if SAP response", HFILL }}
        };
 
        static hf_register_info hf_ipxmsg[] = {
                { &hf_msg_conn,
                { "Connection Number",                  "ipxmsg.conn", 
-                 FT_UINT8,     BASE_NONE,      NULL,   0x0,
-                 "Connection Number" }},
+                 FT_UINT8,     BASE_DEC,       NULL,   0x0,
+                 "Connection Number", HFILL }},
 
                { &hf_msg_sigchar,
                { "Signature Char",                     "ipxmsg.sigchar", 
-                 FT_UINT8,     BASE_NONE,      VALS(ipxmsg_sigchar_vals),      0x0,
-                 "Signature Char" }}
+                 FT_UINT8,     BASE_DEC,       VALS(ipxmsg_sigchar_vals),      0x0,
+                 "Signature Char", HFILL }}
        };
 
        static gint *ett[] = {
@@ -898,35 +971,40 @@ proto_register_ipx(void)
 
        proto_sap = proto_register_protocol("Service Advertisement Protocol",
            "IPX SAP", "ipxsap");
+       register_dissector("ipxsap", dissect_ipxsap, proto_sap);
+
        proto_register_field_array(proto_sap, hf_sap, array_length(hf_sap));
 
        proto_register_subtree_array(ett, array_length(ett));
 
-       ipx_type_dissector_table = register_dissector_table("ipx.packet_type");
-       ipx_socket_dissector_table = register_dissector_table("ipx.socket");
+       ipx_type_dissector_table = register_dissector_table("ipx.packet_type",
+           "IPX packet type", FT_UINT8, BASE_HEX);
+       ipx_socket_dissector_table = register_dissector_table("ipx.socket",
+           "IPX socket", FT_UINT16, BASE_HEX);
 }
 
 void
 proto_reg_handoff_ipx(void)
 {
-       /*
-        * Get handle for the NBIPX dissector.
-        */
-       nbipx_handle = find_dissector("nbipx");
-
-       dissector_add("udp.port", UDP_PORT_IPX, dissect_ipx, proto_ipx);
-       dissector_add("ethertype", ETHERTYPE_IPX, dissect_ipx, proto_ipx);
-       dissector_add("fr.cisco", ETHERTYPE_IPX, dissect_ipx, proto_ipx);
-       dissector_add("ppp.protocol", PPP_IPX, dissect_ipx, proto_ipx);
-       dissector_add("llc.dsap", SAP_NETWARE, dissect_ipx, proto_ipx);
-       dissector_add("null.type", BSD_AF_IPX, dissect_ipx, proto_ipx);
-       dissector_add("gre.proto", ETHERTYPE_IPX, dissect_ipx, proto_ipx);
-       dissector_add("ipx.packet_type", IPX_PACKET_TYPE_SPX, dissect_spx,
-           proto_spx);
-       dissector_add("ipx.socket", IPX_SOCKET_SAP, dissect_ipxsap,
-           proto_sap);
-       dissector_add("ipx.socket", IPX_SOCKET_IPXRIP, dissect_ipxrip,
-           proto_sap);
-       dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE, dissect_ipxmsg,
-           proto_ipxmsg);
+       dissector_handle_t ipx_handle, spx_handle;
+       dissector_handle_t ipxsap_handle, ipxrip_handle;
+       dissector_handle_t ipxmsg_handle;
+
+       ipx_handle = find_dissector("ipx");
+       dissector_add("udp.port", UDP_PORT_IPX, ipx_handle);
+       dissector_add("ethertype", ETHERTYPE_IPX, ipx_handle);
+       dissector_add("chdlctype", ETHERTYPE_IPX, ipx_handle);
+       dissector_add("ppp.protocol", PPP_IPX, ipx_handle);
+       dissector_add("llc.dsap", SAP_NETWARE, ipx_handle);
+       dissector_add("null.type", BSD_AF_IPX, ipx_handle);
+       dissector_add("gre.proto", ETHERTYPE_IPX, ipx_handle);
+       spx_handle = create_dissector_handle(dissect_spx, proto_spx);
+       dissector_add("ipx.packet_type", IPX_PACKET_TYPE_SPX, spx_handle);
+       ipxsap_handle = find_dissector("ipxsap");
+       dissector_add("ipx.socket", IPX_SOCKET_SAP, ipxsap_handle);
+       ipxrip_handle = create_dissector_handle(dissect_ipxrip, proto_ipxrip);
+       dissector_add("ipx.socket", IPX_SOCKET_IPXRIP, ipxrip_handle);
+       ipxmsg_handle = create_dissector_handle(dissect_ipxmsg, proto_ipxmsg);
+       dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE, ipxmsg_handle);
+       data_handle = find_dissector("data");
 }