From Ulf Lamping: extend the progress dialog box to give more progress
[obnox/wireshark/wip.git] / packet-ypxfr.c
index 9c61394efa678aef53a836c4460756f9a7d4d7dc..e0af251f864f20dd1e77e4a1a1cd5d5f4de9717e 100644 (file)
@@ -1,10 +1,10 @@
 /* packet-ypxfr.c
  * Routines for ypxfr dissection
  *
- * $Id: packet-ypxfr.c,v 1.1 1999/11/10 17:23:55 nneul Exp $
+ * $Id: packet-ypxfr.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@unicom.net>
+ * By Gerald Combs <gerald@zing.org>
  * Copyright 1998 Gerald Combs
  *
  * Copied from packet-smb.c
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-ypxfr.h"
 
 static int proto_ypxfr = -1;
 
+static gint ett_ypxfr = -1;
+
 /* proc number, "proc name", dissect_request, dissect_reply */
-/* NULL as function pointer means: take the generic one. */
-const vsff ypxfr1_proc[] = {
-       { YPXFRPROC_NULL,       "NULL",         NULL,                           NULL },
-       { YPXFRPROC_GETMAP,     "GETMAP",               NULL,                           NULL },
-       { 0,    NULL,           NULL,                           NULL }
+/* NULL as function pointer means: type of arguments is "void". */
+static const vsff ypxfr1_proc[] = {
+       { YPXFRPROC_NULL,       "NULL",         NULL,           NULL },
+       { YPXFRPROC_GETMAP,     "GETMAP",       NULL,           NULL },
+       { 0,                    NULL,           NULL,           NULL }
 };
 /* end of YPXFR version 1 */
 
 void
 proto_register_ypxfr(void)
 {
-       proto_ypxfr = proto_register_protocol("Yellow Pages Transfer", "ypxfr");
+       static gint *ett[] = {
+               &ett_ypxfr
+       };
+
+       proto_ypxfr = proto_register_protocol("Yellow Pages Transfer",
+           "YPXFR", "ypxfr");
+       proto_register_subtree_array(ett, array_length(ett));
+}
 
+void
+proto_reg_handoff_ypxfr(void)
+{
        /* Register the protocol as RPC */
-       rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ETT_YPXFR);
+       rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ett_ypxfr);
        /* Register the procedure tables */
        rpc_init_proc_table(YPXFR_PROGRAM, 1, ypxfr1_proc);
 }
-