Add an extra argument to "rpc_init_proc_table()" that can specify an hf_

value for a field to be used for the procedure number for that version
of the protocol; use that field, if specified, instead of just putting
in a generic "rpc.procedure" field.

Have the ypserv dissector register those fields and supply them to
"rpc_init_proc_table()".  Supply -1 for other RPC programs (for now),
meaning "no such field exists".

svn path=/trunk/; revision=6486
This commit is contained in:
Guy Harris 2002-10-23 21:17:03 +00:00
parent 6cfdb3c0ed
commit d5f34ad8b2
24 changed files with 138 additions and 74 deletions

View File

@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
* $Id: packet-bootparams.c,v 1.22 2002/08/28 21:00:08 jmayer Exp $
* $Id: packet-bootparams.c,v 1.23 2002/10/23 21:17:01 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -187,5 +187,5 @@ proto_reg_handoff_bootparams(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_bootparams, BOOTPARAMS_PROGRAM, ett_bootparams);
/* Register the procedure tables */
rpc_init_proc_table(BOOTPARAMS_PROGRAM, 1, bootparams1_proc);
rpc_init_proc_table(BOOTPARAMS_PROGRAM, 1, bootparams1_proc, -1);
}

View File

@ -2,7 +2,7 @@
* Routines for hclnfsd (Hummingbird NFS Daemon) dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
* $Id: packet-hclnfsd.c,v 1.17 2002/08/28 21:00:16 jmayer Exp $
* $Id: packet-hclnfsd.c,v 1.18 2002/10/23 21:17:01 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -851,5 +851,5 @@ proto_reg_handoff_hclnfsd(void)
rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
/* Register the procedure tables */
rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc);
rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-klm.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for klm dissection
*
* $Id: packet-klm.c,v 1.10 2002/08/28 21:00:19 jmayer Exp $
* $Id: packet-klm.c,v 1.11 2002/10/23 21:17:01 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -252,5 +252,5 @@ proto_reg_handoff_klm(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_klm, KLM_PROGRAM, ett_klm);
/* Register the procedure tables */
rpc_init_proc_table(KLM_PROGRAM, 1, klm1_proc);
rpc_init_proc_table(KLM_PROGRAM, 1, klm1_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-mount.c
* Routines for mount dissection
*
* $Id: packet-mount.c,v 1.33 2002/08/28 21:00:22 jmayer Exp $
* $Id: packet-mount.c,v 1.34 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -732,7 +732,7 @@ proto_reg_handoff_mount(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_mount, MOUNT_PROGRAM, ett_mount);
/* Register the procedure tables */
rpc_init_proc_table(MOUNT_PROGRAM, 1, mount1_proc);
rpc_init_proc_table(MOUNT_PROGRAM, 2, mount2_proc);
rpc_init_proc_table(MOUNT_PROGRAM, 3, mount3_proc);
rpc_init_proc_table(MOUNT_PROGRAM, 1, mount1_proc, -1);
rpc_init_proc_table(MOUNT_PROGRAM, 2, mount2_proc, -1);
rpc_init_proc_table(MOUNT_PROGRAM, 3, mount3_proc, -1);
}

View File

@ -2,7 +2,7 @@
* Routines for nfs dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
* Copyright 2000-2002, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
* $Id: packet-nfs.c,v 1.81 2002/10/14 17:08:53 guy Exp $
* $Id: packet-nfs.c,v 1.82 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -7659,7 +7659,7 @@ proto_reg_handoff_nfs(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nfs, NFS_PROGRAM, ett_nfs);
/* Register the procedure tables */
rpc_init_proc_table(NFS_PROGRAM, 2, nfs2_proc);
rpc_init_proc_table(NFS_PROGRAM, 3, nfs3_proc);
rpc_init_proc_table(NFS_PROGRAM, 4, nfs4_proc);
rpc_init_proc_table(NFS_PROGRAM, 2, nfs2_proc, -1);
rpc_init_proc_table(NFS_PROGRAM, 3, nfs3_proc, -1);
rpc_init_proc_table(NFS_PROGRAM, 4, nfs4_proc, -1);
}

View File

@ -4,7 +4,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-nfsacl.c,v 1.3 2002/08/02 23:35:55 jmayer Exp $
* $Id: packet-nfsacl.c,v 1.4 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -106,7 +106,7 @@ proto_reg_handoff_nfsacl(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nfsacl, NFSACL_PROGRAM, ett_nfsacl);
/* Register the procedure tables */
rpc_init_proc_table(NFSACL_PROGRAM, 1, nfsacl1_proc);
rpc_init_proc_table(NFSACL_PROGRAM, 2, nfsacl2_proc);
rpc_init_proc_table(NFSACL_PROGRAM, 3, nfsacl3_proc);
rpc_init_proc_table(NFSACL_PROGRAM, 1, nfsacl1_proc, -1);
rpc_init_proc_table(NFSACL_PROGRAM, 2, nfsacl2_proc, -1);
rpc_init_proc_table(NFSACL_PROGRAM, 3, nfsacl3_proc, -1);
}

View File

@ -3,7 +3,7 @@
*
* Ronnie Sahlberg
*
* $Id: packet-nfsauth.c,v 1.2 2002/08/02 23:35:55 jmayer Exp $
* $Id: packet-nfsauth.c,v 1.3 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -75,5 +75,5 @@ proto_reg_handoff_nfsauth(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nfsauth, NFSAUTH_PROGRAM, ett_nfsauth);
/* Register the procedure tables */
rpc_init_proc_table(NFSAUTH_PROGRAM, 1, nfsauth1_proc);
rpc_init_proc_table(NFSAUTH_PROGRAM, 1, nfsauth1_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-nisplus.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
* $Id: packet-nisplus.c,v 1.13 2002/08/28 21:00:24 jmayer Exp $
* $Id: packet-nisplus.c,v 1.14 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -1823,7 +1823,7 @@ proto_reg_handoff_nis(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nisplus, NIS_PROGRAM, ett_nisplus);
/* Register the procedure tables */
rpc_init_proc_table(NIS_PROGRAM, 3, nisplus3_proc);
rpc_init_proc_table(NIS_PROGRAM, 3, nisplus3_proc, -1);
}
@ -1914,5 +1914,5 @@ proto_reg_handoff_niscb(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nispluscb, CB_PROGRAM, ett_nispluscb);
/* Register the procedure tables */
rpc_init_proc_table(CB_PROGRAM, 1, cb1_proc);
rpc_init_proc_table(CB_PROGRAM, 1, cb1_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-nlm.c
* Routines for nlm dissection
*
* $Id: packet-nlm.c,v 1.29 2002/08/28 21:00:24 jmayer Exp $
* $Id: packet-nlm.c,v 1.30 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -1132,8 +1132,8 @@ proto_reg_handoff_nlm(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_nlm, NLM_PROGRAM, ett_nlm);
/* Register the procedure tables */
rpc_init_proc_table(NLM_PROGRAM, 1, nlm1_proc);
rpc_init_proc_table(NLM_PROGRAM, 2, nlm2_proc);
rpc_init_proc_table(NLM_PROGRAM, 3, nlm3_proc);
rpc_init_proc_table(NLM_PROGRAM, 4, nlm4_proc);
rpc_init_proc_table(NLM_PROGRAM, 1, nlm1_proc, -1);
rpc_init_proc_table(NLM_PROGRAM, 2, nlm2_proc, -1);
rpc_init_proc_table(NLM_PROGRAM, 3, nlm3_proc, -1);
rpc_init_proc_table(NLM_PROGRAM, 4, nlm4_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-pcnfsd.c
* Routines for PCNFSD dissection
*
* $Id: packet-pcnfsd.c,v 1.10 2002/08/28 21:00:25 jmayer Exp $
* $Id: packet-pcnfsd.c,v 1.11 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -404,7 +404,7 @@ proto_reg_handoff_pcnfsd(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_pcnfsd, PCNFSD_PROGRAM, ett_pcnfsd);
/* Register the procedure tables */
rpc_init_proc_table(PCNFSD_PROGRAM, 1, pcnfsd1_proc);
rpc_init_proc_table(PCNFSD_PROGRAM, 2, pcnfsd2_proc);
rpc_init_proc_table(PCNFSD_PROGRAM, 1, pcnfsd1_proc, -1);
rpc_init_proc_table(PCNFSD_PROGRAM, 2, pcnfsd2_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-portmap.c
* Routines for portmap dissection
*
* $Id: packet-portmap.c,v 1.39 2002/08/28 21:00:25 jmayer Exp $
* $Id: packet-portmap.c,v 1.40 2002/10/23 21:17:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -555,10 +555,10 @@ proto_reg_handoff_portmap(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_portmap, PORTMAP_PROGRAM, ett_portmap);
/* Register the procedure tables */
rpc_init_proc_table(PORTMAP_PROGRAM, 1, portmap1_proc);
rpc_init_proc_table(PORTMAP_PROGRAM, 2, portmap2_proc);
rpc_init_proc_table(PORTMAP_PROGRAM, 3, portmap3_proc);
rpc_init_proc_table(PORTMAP_PROGRAM, 4, portmap4_proc);
rpc_init_proc_table(PORTMAP_PROGRAM, 1, portmap1_proc, -1);
rpc_init_proc_table(PORTMAP_PROGRAM, 2, portmap2_proc, -1);
rpc_init_proc_table(PORTMAP_PROGRAM, 3, portmap3_proc, -1);
rpc_init_proc_table(PORTMAP_PROGRAM, 4, portmap4_proc, -1);
rpc_handle = find_dissector("rpc");
rpc_tcp_handle = find_dissector("rpc-tcp");
}

View File

@ -2,7 +2,7 @@
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
* $Id: packet-rpc.c,v 1.104 2002/09/04 09:40:24 sahlberg Exp $
* $Id: packet-rpc.c,v 1.105 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -265,10 +265,24 @@ rpc_proc_hash(gconstpointer k)
/* insert some entries */
void
rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table)
rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table,
int procedure_hf)
{
rpc_prog_info_key rpc_prog_key;
rpc_prog_info_value *rpc_prog;
const vsff *proc;
/*
* Add the operation number hfinfo value for this version of the
* program.
*/
rpc_prog_key.prog = prog;
rpc_prog = g_hash_table_lookup(rpc_progs, &rpc_prog_key);
g_assert(rpc_prog != NULL);
rpc_prog->procedure_hfs = g_array_set_size(rpc_prog->procedure_hfs,
vers);
g_array_insert_val(rpc_prog->procedure_hfs, vers, procedure_hf);
for (proc = proc_table ; proc->strptr!=NULL; proc++) {
rpc_proc_info_key *key;
rpc_proc_info_value *value;
@ -354,6 +368,7 @@ rpc_init_prog(int proto, guint32 prog, int ett)
value->proto = proto;
value->ett = ett;
value->progname = proto_get_protocol_short_name(proto);
value->procedure_hfs = g_array_new(FALSE, TRUE, sizeof (int));
g_hash_table_insert(rpc_progs,key,value);
}
@ -1442,6 +1457,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
unsigned int gss_svc = 0;
int proto = 0;
int ett = 0;
int procedure_hf;
unsigned int reply_state;
unsigned int accept_state;
@ -2084,9 +2100,15 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (ptree) {
proto_tree_add_uint(ptree,
hf_rpc_programversion, tvb, 0, 0, vers);
proto_tree_add_uint_format(ptree,
hf_rpc_procedure, tvb, 0, 0, proc,
"Procedure: %s (%u)", procname, proc);
procedure_hf = g_array_index(rpc_prog->procedure_hfs, int, vers);
if (procedure_hf != 0 && procedure_hf != -1) {
proto_tree_add_uint(ptree,
procedure_hf, tvb, 0, 0, proc);
} else {
proto_tree_add_uint_format(ptree,
hf_rpc_procedure, tvb, 0, 0, proc,
"Procedure: %s (%u)", procname, proc);
}
}
}

View File

@ -1,6 +1,6 @@
/* packet-rpc.h
*
* $Id: packet-rpc.h,v 1.38 2002/09/04 09:40:24 sahlberg Exp $
* $Id: packet-rpc.h,v 1.39 2002/10/23 21:17:03 guy Exp $
*
* (c) 1999 Uwe Girlich
*
@ -8,7 +8,6 @@
* 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
* as published by the Free Software Foundation; either version 2
@ -108,7 +107,8 @@ typedef struct _vsff {
extern const value_string rpc_auth_flavor[];
extern void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table);
extern void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table,
int procedure_hf);
extern void rpc_init_prog(int proto, guint32 prog, int ett);
extern char *rpc_prog_name(guint32 prog);
extern char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc);
@ -146,6 +146,7 @@ typedef struct _rpc_prog_info_value {
int proto;
int ett;
char* progname;
GArray *procedure_hfs;
} rpc_prog_info_value;
extern GHashTable *rpc_progs;

View File

@ -2,7 +2,7 @@
* Routines for rquota dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
* $Id: packet-rquota.c,v 1.9 2002/08/28 21:00:29 jmayer Exp $
* $Id: packet-rquota.c,v 1.10 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -236,7 +236,7 @@ proto_reg_handoff_rquota(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_rquota, RQUOTA_PROGRAM, ett_rquota);
/* Register the procedure tables */
rpc_init_proc_table(RQUOTA_PROGRAM, 1, rquota1_proc);
rpc_init_proc_table(RQUOTA_PROGRAM, 1, rquota1_proc, -1);
}

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-rstat.c,v 1.2 2002/08/02 23:35:58 jmayer Exp $
* $Id: packet-rstat.c,v 1.3 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -109,8 +109,8 @@ proto_reg_handoff_rstat(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_rstat, RSTAT_PROGRAM, ett_rstat);
/* Register the procedure tables */
rpc_init_proc_table(RSTAT_PROGRAM, 1, rstat1_proc);
rpc_init_proc_table(RSTAT_PROGRAM, 2, rstat2_proc);
rpc_init_proc_table(RSTAT_PROGRAM, 3, rstat3_proc);
rpc_init_proc_table(RSTAT_PROGRAM, 4, rstat3_proc);
rpc_init_proc_table(RSTAT_PROGRAM, 1, rstat1_proc, -1);
rpc_init_proc_table(RSTAT_PROGRAM, 2, rstat2_proc, -1);
rpc_init_proc_table(RSTAT_PROGRAM, 3, rstat3_proc, -1);
rpc_init_proc_table(RSTAT_PROGRAM, 4, rstat3_proc, -1);
}

View File

@ -1,6 +1,6 @@
/* packet-rwall.c
*
* $Id: packet-rwall.c,v 1.7 2002/08/28 21:00:30 jmayer Exp $
* $Id: packet-rwall.c,v 1.8 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -75,7 +75,7 @@ proto_reg_handoff_rwall(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_rwall, RWALL_PROGRAM, ett_rwall);
/* Register the procedure tables */
rpc_init_proc_table(RWALL_PROGRAM, 1, rwall_proc);
rpc_init_proc_table(RWALL_PROGRAM, 1, rwall_proc, -1);
}

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-sadmind.c,v 1.2 2002/08/02 23:36:00 jmayer Exp $
* $Id: packet-sadmind.c,v 1.3 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -85,7 +85,7 @@ proto_reg_handoff_sadmind(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_sadmind, SADMIND_PROGRAM, ett_sadmind);
/* Register the procedure tables */
rpc_init_proc_table(SADMIND_PROGRAM, 1, sadmind1_proc);
rpc_init_proc_table(SADMIND_PROGRAM, 2, sadmind2_proc);
rpc_init_proc_table(SADMIND_PROGRAM, 3, sadmind3_proc);
rpc_init_proc_table(SADMIND_PROGRAM, 1, sadmind1_proc, -1);
rpc_init_proc_table(SADMIND_PROGRAM, 2, sadmind2_proc, -1);
rpc_init_proc_table(SADMIND_PROGRAM, 3, sadmind3_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-spray.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
* $Id: packet-spray.c,v 1.10 2002/08/28 21:00:35 jmayer Exp $
* $Id: packet-spray.c,v 1.11 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -131,6 +131,6 @@ proto_reg_handoff_spray(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_spray, SPRAY_PROGRAM, ett_spray);
/* Register the procedure tables */
rpc_init_proc_table(SPRAY_PROGRAM, 1, spray1_proc);
rpc_init_proc_table(SPRAY_PROGRAM, 1, spray1_proc, -1);
}

View File

@ -2,7 +2,7 @@
* Routines for async NSM stat callback dissection
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
* $Id: packet-stat-notify.c,v 1.11 2002/08/28 21:00:35 jmayer Exp $
* $Id: packet-stat-notify.c,v 1.12 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -95,5 +95,5 @@ proto_reg_handoff_statnotify(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_statnotify, STATNOTIFY_PROGRAM, ett_statnotify);
/* Register the procedure tables */
rpc_init_proc_table(STATNOTIFY_PROGRAM, 1, statnotify_proc);
rpc_init_proc_table(STATNOTIFY_PROGRAM, 1, statnotify_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-stat.c
* Routines for stat dissection
*
* $Id: packet-stat.c,v 1.17 2002/08/28 21:00:35 jmayer Exp $
* $Id: packet-stat.c,v 1.18 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -333,5 +333,5 @@ proto_reg_handoff_stat(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_stat, STAT_PROGRAM, ett_stat);
/* Register the procedure tables */
rpc_init_proc_table(STAT_PROGRAM, 1, stat_proc);
rpc_init_proc_table(STAT_PROGRAM, 1, stat_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-ypbind.c
* Routines for ypbind dissection
*
* $Id: packet-ypbind.c,v 1.13 2002/08/28 21:00:40 jmayer Exp $
* $Id: packet-ypbind.c,v 1.14 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -197,6 +197,6 @@ proto_reg_handoff_ypbind(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_ypbind, YPBIND_PROGRAM, ett_ypbind);
/* Register the procedure tables */
rpc_init_proc_table(YPBIND_PROGRAM, 1, ypbind1_proc);
rpc_init_proc_table(YPBIND_PROGRAM, 2, ypbind2_proc);
rpc_init_proc_table(YPBIND_PROGRAM, 1, ypbind1_proc, -1);
rpc_init_proc_table(YPBIND_PROGRAM, 2, ypbind2_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-yppasswd.c
* Routines for yppasswd dissection
*
* $Id: packet-yppasswd.c,v 1.8 2002/08/28 21:00:40 jmayer Exp $
* $Id: packet-yppasswd.c,v 1.9 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -157,6 +157,6 @@ proto_reg_handoff_yppasswd(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_yppasswd, YPPASSWD_PROGRAM, ett_yppasswd);
/* Register the procedure tables */
rpc_init_proc_table(YPPASSWD_PROGRAM, 1, yppasswd1_proc);
rpc_init_proc_table(YPPASSWD_PROGRAM, 1, yppasswd1_proc, -1);
}

View File

@ -1,7 +1,7 @@
/* packet-ypserv.c
* Routines for ypserv dissection
*
* $Id: packet-ypserv.c,v 1.24 2002/08/28 21:00:40 jmayer Exp $
* $Id: packet-ypserv.c,v 1.25 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -37,6 +37,8 @@
#include "packet-ypserv.h"
static int proto_ypserv = -1;
static int hf_ypserv_procedure_v1 = -1;
static int hf_ypserv_procedure_v2 = -1;
static int hf_ypserv_domain = -1;
static int hf_ypserv_servesdomain = -1;
static int hf_ypserv_map = -1;
@ -319,6 +321,22 @@ dissect_ypresp_maplist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_
/* NULL as function pointer means: type of arguments is "void". */
/* someone please get me a version 1 trace */
static const value_string ypserv1_proc_vals[] = {
{ YPPROC_DOMAIN, "DOMAIN" },
{ YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK" },
{ YPPROC_MATCH, "MATCH" },
{ YPPROC_FIRST, "FIRST" },
{ YPPROC_NEXT, "NEXT" },
{ YPPROC_XFR, "XFR" },
{ YPPROC_CLEAR, "CLEAR" },
{ YPPROC_ALL, "ALL" },
{ YPPROC_MASTER, "MASTER" },
{ YPPROC_ORDER, "ORDER" },
{ YPPROC_MAPLIST, "MAPLIST" },
{ 0, NULL }
};
static const vsff ypserv1_proc[] = {
{ 0, "NULL", NULL, NULL },
{ YPPROC_DOMAIN, "DOMAIN",
@ -345,7 +363,22 @@ static const vsff ypserv1_proc[] = {
NULL, NULL },
{ 0, NULL, NULL, NULL }
};
/* end of YPServ version 2 */
/* end of YPServ version 1 */
static const value_string ypserv2_proc_vals[] = {
{ YPPROC_DOMAIN, "DOMAIN" },
{ YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK" },
{ YPPROC_MATCH, "MATCH" },
{ YPPROC_FIRST, "FIRST" },
{ YPPROC_NEXT, "NEXT" },
{ YPPROC_XFR, "XFR" },
{ YPPROC_CLEAR, "CLEAR" },
{ YPPROC_ALL, "ALL" },
{ YPPROC_MASTER, "MASTER" },
{ YPPROC_ORDER, "ORDER" },
{ YPPROC_MAPLIST, "MAPLIST" },
{ 0, NULL }
};
static const vsff ypserv2_proc[] = {
{ 0, "NULL", NULL, NULL },
@ -383,6 +416,12 @@ proto_register_ypserv(void)
static struct true_false_string yesno = { "Yes", "No" };
static hf_register_info hf[] = {
{ &hf_ypserv_procedure_v1, {
"V1 Procedure", "ypserv.procedure_v1", FT_UINT32, BASE_DEC,
VALS(ypserv1_proc_vals), 0, "V1 Procedure", HFILL }},
{ &hf_ypserv_procedure_v2, {
"V2 Procedure", "ypserv.procedure_v2", FT_UINT32, BASE_DEC,
VALS(ypserv2_proc_vals), 0, "V2 Procedure", HFILL }},
{ &hf_ypserv_domain, {
"Domain", "ypserv.domain", FT_STRING, BASE_DEC,
NULL, 0, "Domain", HFILL }},
@ -443,6 +482,8 @@ proto_reg_handoff_ypserv(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_ypserv, YPSERV_PROGRAM, ett_ypserv);
/* Register the procedure tables */
rpc_init_proc_table(YPSERV_PROGRAM, 1, ypserv1_proc);
rpc_init_proc_table(YPSERV_PROGRAM, 2, ypserv2_proc);
rpc_init_proc_table(YPSERV_PROGRAM, 1, ypserv1_proc,
hf_ypserv_procedure_v1);
rpc_init_proc_table(YPSERV_PROGRAM, 2, ypserv2_proc,
hf_ypserv_procedure_v2);
}

View File

@ -1,7 +1,7 @@
/* packet-ypxfr.c
* Routines for ypxfr dissection
*
* $Id: packet-ypxfr.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
* $Id: packet-ypxfr.c,v 1.8 2002/10/23 21:17:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -64,5 +64,5 @@ proto_reg_handoff_ypxfr(void)
/* Register the protocol as RPC */
rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ett_ypxfr);
/* Register the procedure tables */
rpc_init_proc_table(YPXFR_PROGRAM, 1, ypxfr1_proc);
rpc_init_proc_table(YPXFR_PROGRAM, 1, ypxfr1_proc, -1);
}