2001-11-06 13:42:04 +00:00
|
|
|
/* packet-pcnfsd.c
|
|
|
|
* Routines for PCNFSD dissection
|
|
|
|
*
|
2002-11-01 00:48:39 +00:00
|
|
|
* $Id: packet-pcnfsd.c,v 1.12 2002/11/01 00:48:38 sahlberg Exp $
|
2001-11-06 13:42:04 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff". This can be used if
1) the item covers the entire packet or the remaining payload in
the packet
or
2) the item's length won't be known until it's dissected, and
will be then set with "proto_item_set_len()" - if an
exception is thrown in the dissection, it means the item ran
*past* the end of the tvbuff, so saying it runs to the end of
the tvbuff is reasonable.
Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).
In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).
Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.
Fix some indentation.
svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
2001-11-06 13:42:04 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* Copied from packet-ypbind.c
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Protocol information comes from the book
|
|
|
|
"NFS Illustrated" by Brent Callaghan, ISBN 0-201-32570-5
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2001-11-06 13:42:04 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2002-01-30 23:08:27 +00:00
|
|
|
#include <string.h>
|
2001-11-06 13:42:04 +00:00
|
|
|
|
|
|
|
#include "packet-rpc.h"
|
|
|
|
#include "packet-pcnfsd.h"
|
|
|
|
|
|
|
|
static int proto_pcnfsd = -1;
|
2002-11-01 00:48:39 +00:00
|
|
|
static int hf_pcnfsd_procedure_v1 = -1;
|
|
|
|
static int hf_pcnfsd_procedure_v2 = -1;
|
2001-11-07 07:05:58 +00:00
|
|
|
static int hf_pcnfsd_auth_client = -1;
|
|
|
|
static int hf_pcnfsd_auth_ident_obscure = -1;
|
|
|
|
static int hf_pcnfsd_auth_ident_clear = -1;
|
|
|
|
static int hf_pcnfsd_auth_password_obscure = -1;
|
|
|
|
static int hf_pcnfsd_auth_password_clear = -1;
|
|
|
|
static int hf_pcnfsd_comment = -1;
|
|
|
|
static int hf_pcnfsd_status = -1;
|
|
|
|
static int hf_pcnfsd_uid = -1;
|
|
|
|
static int hf_pcnfsd_gid = -1;
|
|
|
|
static int hf_pcnfsd_gids_count = -1;
|
|
|
|
static int hf_pcnfsd_homedir = -1;
|
|
|
|
static int hf_pcnfsd_def_umask = -1;
|
2002-05-14 21:22:39 +00:00
|
|
|
static int hf_pcnfsd_username = -1;
|
2001-11-07 07:05:58 +00:00
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
|
2001-11-06 13:42:04 +00:00
|
|
|
static gint ett_pcnfsd = -1;
|
2001-11-06 18:32:30 +00:00
|
|
|
static gint ett_pcnfsd_auth_ident = -1;
|
|
|
|
static gint ett_pcnfsd_auth_password = -1;
|
2001-11-07 07:05:58 +00:00
|
|
|
static gint ett_pcnfsd_gids = -1;
|
2001-11-06 18:32:30 +00:00
|
|
|
|
2002-05-14 21:22:39 +00:00
|
|
|
int
|
|
|
|
dissect_pcnfsd_username(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|
|
|
{
|
|
|
|
return dissect_rpc_string(tvb, tree, hf_pcnfsd_username, offset, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MAP_REQ_UID 0
|
|
|
|
#define MAP_REQ_GID 1
|
|
|
|
#define MAP_REQ_UNAME 2
|
|
|
|
#define MAP_REQ_GNAME 3
|
|
|
|
|
|
|
|
static const value_string names_mapreq[] =
|
|
|
|
{
|
|
|
|
{ MAP_REQ_UID, "MAP_REQ_UID" },
|
|
|
|
{ MAP_REQ_GID, "MAP_REQ_GID" },
|
|
|
|
{ MAP_REQ_UNAME, "MAP_REQ_UNAME" },
|
|
|
|
{ MAP_REQ_GNAME, "MAP_REQ_GNAME" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_pcnfsd_mapreq(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|
|
|
{
|
|
|
|
guint32 mapreq;
|
|
|
|
|
|
|
|
mapreq = tvb_get_ntohl(tvb, offset + 0);
|
|
|
|
|
|
|
|
if (tree)
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 4, "Request: %s (%u)",
|
2002-05-14 21:22:39 +00:00
|
|
|
val_to_str(mapreq, names_mapreq, "%u"), mapreq);
|
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2002-08-28 21:04:11 +00:00
|
|
|
dissect_pcnfsd2_dissect_mapreq_arg_item(tvbuff_t *tvb, int offset,
|
2002-05-14 21:22:39 +00:00
|
|
|
packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
|
|
|
offset = dissect_pcnfsd_mapreq(tvb, offset, tree);
|
|
|
|
|
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
|
|
|
|
|
|
|
|
offset = dissect_pcnfsd_username(tvb, offset, tree);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_pcnfsd2_mapid_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree)
|
|
|
|
{
|
|
|
|
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
|
2002-05-14 21:22:39 +00:00
|
|
|
dissect_pcnfsd2_dissect_mapreq_arg_item);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MAP_RES_OK 0
|
|
|
|
#define MAP_RES_UNKNOWN 1
|
|
|
|
#define MAP_RES_DENIED 2
|
|
|
|
|
|
|
|
static const value_string names_maprstat[] =
|
|
|
|
{
|
|
|
|
{ MAP_RES_OK, "MAP_RES_OK" },
|
|
|
|
{ MAP_RES_UNKNOWN, "MAP_RES_UNKNOWN" },
|
|
|
|
{ MAP_RES_DENIED, "MAP_RES_DENIED" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_pcnfsd2_dissect_mapreq_res_item(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
|
|
|
guint32 maprstat;
|
|
|
|
|
|
|
|
offset = dissect_pcnfsd_mapreq(tvb, offset, tree);
|
|
|
|
|
|
|
|
maprstat = tvb_get_ntohl(tvb, offset + 0);
|
|
|
|
|
|
|
|
if (tree)
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree_add_text(tree, tvb, offset, 4, "Status: %s (%u)",
|
2002-05-14 21:22:39 +00:00
|
|
|
val_to_str(maprstat, names_maprstat, "%u"), maprstat);
|
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
|
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
|
|
|
|
|
|
|
|
offset = dissect_pcnfsd_username(tvb, offset, tree);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_pcnfsd2_mapid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree)
|
|
|
|
{
|
|
|
|
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
|
|
|
|
|
|
|
|
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
|
|
|
|
dissect_pcnfsd2_dissect_mapreq_res_item);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
/* "NFS Illustrated 14.7.13 */
|
2002-04-14 23:04:04 +00:00
|
|
|
static void
|
2001-11-06 18:32:30 +00:00
|
|
|
pcnfsd_decode_obscure(char* data, int len)
|
|
|
|
{
|
|
|
|
for ( ; len>0 ; len--, data++) {
|
|
|
|
*data = (*data ^ 0x5b) & 0x7f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* "NFS Illustrated" 14.7.13 */
|
2002-04-14 23:04:04 +00:00
|
|
|
static int
|
2002-04-03 13:24:13 +00:00
|
|
|
dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
2001-11-06 18:32:30 +00:00
|
|
|
proto_tree *tree)
|
|
|
|
{
|
|
|
|
int newoffset;
|
|
|
|
char *ident = NULL;
|
|
|
|
proto_item *ident_item = NULL;
|
|
|
|
proto_tree *ident_tree = NULL;
|
|
|
|
char *password = NULL;
|
|
|
|
proto_item *password_item = NULL;
|
|
|
|
proto_tree *password_tree = NULL;
|
|
|
|
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_string(tvb, tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_client, offset, NULL);
|
2001-11-06 13:42:04 +00:00
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
if (tree) {
|
|
|
|
ident_item = proto_tree_add_text(tree, tvb,
|
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff". This can be used if
1) the item covers the entire packet or the remaining payload in
the packet
or
2) the item's length won't be known until it's dissected, and
will be then set with "proto_item_set_len()" - if an
exception is thrown in the dissection, it means the item ran
*past* the end of the tvbuff, so saying it runs to the end of
the tvbuff is reasonable.
Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).
In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).
Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.
Fix some indentation.
svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
|
|
|
offset, -1, "Authentication Ident");
|
2001-11-06 18:32:30 +00:00
|
|
|
if (ident_item)
|
|
|
|
ident_tree = proto_item_add_subtree(
|
|
|
|
ident_item, ett_pcnfsd_auth_ident);
|
|
|
|
}
|
2002-04-03 13:24:13 +00:00
|
|
|
newoffset = dissect_rpc_string(tvb, ident_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_ident_obscure, offset, &ident);
|
2001-11-06 18:32:30 +00:00
|
|
|
if (ident_item) {
|
|
|
|
proto_item_set_len(ident_item, newoffset-offset);
|
|
|
|
}
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
if (ident) {
|
|
|
|
pcnfsd_decode_obscure(ident, strlen(ident));
|
|
|
|
if (ident_tree)
|
|
|
|
proto_tree_add_string(ident_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_ident_clear,
|
2001-11-06 18:32:30 +00:00
|
|
|
tvb, offset+4, strlen(ident), ident);
|
|
|
|
}
|
|
|
|
if (ident_item) {
|
|
|
|
proto_item_set_text(ident_item, "Authentication Ident: %s",
|
|
|
|
ident);
|
|
|
|
}
|
|
|
|
if (ident) {
|
|
|
|
g_free(ident);
|
|
|
|
ident = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
offset = newoffset;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
password_item = proto_tree_add_text(tree, tvb,
|
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff". This can be used if
1) the item covers the entire packet or the remaining payload in
the packet
or
2) the item's length won't be known until it's dissected, and
will be then set with "proto_item_set_len()" - if an
exception is thrown in the dissection, it means the item ran
*past* the end of the tvbuff, so saying it runs to the end of
the tvbuff is reasonable.
Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).
In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).
Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.
Fix some indentation.
svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
|
|
|
offset, -1, "Authentication Password");
|
2001-11-06 18:32:30 +00:00
|
|
|
if (password_item)
|
|
|
|
password_tree = proto_item_add_subtree(
|
|
|
|
password_item, ett_pcnfsd_auth_password);
|
|
|
|
}
|
2002-04-03 13:24:13 +00:00
|
|
|
newoffset = dissect_rpc_string(tvb, password_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_password_obscure, offset, &password);
|
2001-11-06 18:32:30 +00:00
|
|
|
if (password_item) {
|
|
|
|
proto_item_set_len(password_item, newoffset-offset);
|
|
|
|
}
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
if (password) {
|
|
|
|
pcnfsd_decode_obscure(password, strlen(password));
|
|
|
|
if (password_tree)
|
|
|
|
proto_tree_add_string(password_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_password_clear,
|
2001-11-06 18:32:30 +00:00
|
|
|
tvb, offset+4, strlen(password), password);
|
|
|
|
}
|
|
|
|
if (password_item) {
|
|
|
|
proto_item_set_text(password_item, "Authentication Password: %s",
|
|
|
|
password);
|
|
|
|
}
|
|
|
|
if (password) {
|
|
|
|
g_free(password);
|
|
|
|
password = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
offset = newoffset;
|
|
|
|
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_string(tvb, tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_comment, offset, NULL);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* "NFS Illustrated" 14.7.13 */
|
2002-04-14 23:04:04 +00:00
|
|
|
static int
|
2002-04-03 13:24:13 +00:00
|
|
|
dissect_pcnfsd2_auth_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
2001-11-07 07:05:58 +00:00
|
|
|
proto_tree *tree)
|
|
|
|
{
|
|
|
|
int gids_count;
|
|
|
|
proto_item *gitem = NULL;
|
|
|
|
proto_tree *gtree = NULL;
|
|
|
|
int gids_i;
|
|
|
|
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_status, offset);
|
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
|
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_gid, offset);
|
2001-11-07 07:05:58 +00:00
|
|
|
gids_count = tvb_get_ntohl(tvb,offset+0);
|
|
|
|
if (tree) {
|
|
|
|
gitem = proto_tree_add_text(tree, tvb,
|
|
|
|
offset, 4+gids_count*4, "Group IDs: %d", gids_count);
|
|
|
|
gtree = proto_item_add_subtree(gitem, ett_pcnfsd_gids);
|
|
|
|
}
|
|
|
|
if (gtree) {
|
|
|
|
proto_tree_add_item(gtree, hf_pcnfsd_gids_count, tvb, offset, 4, FALSE);
|
|
|
|
}
|
|
|
|
offset += 4;
|
|
|
|
for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_uint32(tvb, gtree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_gid, offset);
|
|
|
|
}
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_string(tvb, tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_homedir, offset, NULL);
|
|
|
|
/* should be signed int32 */
|
2002-04-03 13:24:13 +00:00
|
|
|
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_def_umask, offset);
|
|
|
|
offset = dissect_rpc_string(tvb, tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_comment, offset, NULL);
|
2001-11-06 18:32:30 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* "NFS Illustrated", 14.6 */
|
2001-11-06 13:42:04 +00:00
|
|
|
/* proc number, "proc name", dissect_request, dissect_reply */
|
|
|
|
/* NULL as function pointer means: type of arguments is "void". */
|
|
|
|
static const vsff pcnfsd1_proc[] = {
|
|
|
|
{ 0, "NULL", NULL, NULL },
|
|
|
|
{ 1, "AUTH", NULL, NULL },
|
|
|
|
{ 2, "PR_INIT", NULL, NULL },
|
|
|
|
{ 3, "PR_START", NULL, NULL },
|
|
|
|
{ 0, NULL, NULL, NULL }
|
|
|
|
};
|
2002-11-01 00:48:39 +00:00
|
|
|
static const value_string pcnfsd1_proc_vals[] = {
|
|
|
|
{ 0, "NULL" },
|
|
|
|
{ 1, "AUTH" },
|
|
|
|
{ 2, "PR_INIT" },
|
|
|
|
{ 3, "PR_START" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2001-11-06 13:42:04 +00:00
|
|
|
/* end of PCNFS version 1 */
|
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
|
|
|
|
/* "NFS Illustrated", 14.7 */
|
2001-11-06 13:42:04 +00:00
|
|
|
static const vsff pcnfsd2_proc[] = {
|
|
|
|
{ 0, "NULL", NULL, NULL },
|
|
|
|
{ 1, "INFO", NULL, NULL },
|
|
|
|
{ 2, "PR_INIT", NULL, NULL },
|
|
|
|
{ 3, "PR_START", NULL, NULL },
|
|
|
|
{ 4, "PR_LIST", NULL, NULL },
|
|
|
|
{ 5, "PR_QUEUE", NULL, NULL },
|
|
|
|
{ 6, "PR_STATUS", NULL, NULL },
|
|
|
|
{ 7, "PR_CANCEL", NULL, NULL },
|
|
|
|
{ 8, "PR_ADMIN", NULL, NULL },
|
|
|
|
{ 9, "PR_REQUEUE", NULL, NULL },
|
|
|
|
{ 10, "PR_HOLD", NULL, NULL },
|
|
|
|
{ 11, "PR_RELEASE", NULL, NULL },
|
2002-08-28 21:04:11 +00:00
|
|
|
{ 12, "MAPID",
|
2002-05-14 21:22:39 +00:00
|
|
|
dissect_pcnfsd2_mapid_call, dissect_pcnfsd2_mapid_reply },
|
2002-08-28 21:04:11 +00:00
|
|
|
{ 13, "AUTH",
|
2001-11-07 07:05:58 +00:00
|
|
|
dissect_pcnfsd2_auth_call, dissect_pcnfsd2_auth_reply },
|
2001-11-06 13:42:04 +00:00
|
|
|
{ 14, "ALERT", NULL, NULL },
|
|
|
|
{ 0, NULL, NULL, NULL }
|
|
|
|
};
|
2002-11-01 00:48:39 +00:00
|
|
|
static const value_string pcnfsd2_proc_vals[] = {
|
|
|
|
{ 0, "NULL" },
|
|
|
|
{ 1, "INFO" },
|
|
|
|
{ 2, "PR_INIT" },
|
|
|
|
{ 3, "PR_START" },
|
|
|
|
{ 4, "PR_LIST" },
|
|
|
|
{ 5, "PR_QUEUE" },
|
|
|
|
{ 6, "PR_STATUS" },
|
|
|
|
{ 7, "PR_CANCEL" },
|
|
|
|
{ 8, "PR_ADMIN" },
|
|
|
|
{ 9, "PR_REQUEUE" },
|
|
|
|
{ 10, "PR_HOLD" },
|
|
|
|
{ 11, "PR_RELEASE" },
|
|
|
|
{ 12, "MAPID" },
|
|
|
|
{ 13, "AUTH" },
|
|
|
|
{ 14, "ALERT" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2001-11-06 13:42:04 +00:00
|
|
|
/* end of PCNFS version 2 */
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_pcnfsd(void)
|
|
|
|
{
|
2001-11-06 18:32:30 +00:00
|
|
|
static hf_register_info hf[] = {
|
2002-11-01 00:48:39 +00:00
|
|
|
{ &hf_pcnfsd_procedure_v1, {
|
|
|
|
"V1 Procedure", "pcnfsd.procedure_v1", FT_UINT32, BASE_DEC,
|
|
|
|
VALS(pcnfsd1_proc_vals), 0, "V1 Procedure", HFILL }},
|
|
|
|
{ &hf_pcnfsd_procedure_v2, {
|
|
|
|
"V2 Procedure", "pcnfsd.procedure_v2", FT_UINT32, BASE_DEC,
|
|
|
|
VALS(pcnfsd2_proc_vals), 0, "V2 Procedure", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_client, {
|
2001-11-06 18:32:30 +00:00
|
|
|
"Authentication Client", "pcnfsd.auth.client", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Authentication Client", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_ident_obscure, {
|
2001-11-06 18:32:30 +00:00
|
|
|
"Obscure Ident", "pcnfsd.auth.ident.obscure", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Athentication Obscure Ident", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_ident_clear, {
|
2001-11-06 18:32:30 +00:00
|
|
|
"Clear Ident", "pcnfsd.auth.ident.clear", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Authentication Clear Ident", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_password_obscure, {
|
2001-11-06 18:32:30 +00:00
|
|
|
"Obscure Password", "pcnfsd.auth.password.obscure", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Athentication Obscure Password", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_password_clear, {
|
2001-11-06 18:32:30 +00:00
|
|
|
"Clear Password", "pcnfsd.auth.password.clear", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Authentication Clear Password", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_comment, {
|
|
|
|
"Comment", "pcnfsd.comment", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Comment", HFILL }},
|
|
|
|
{ &hf_pcnfsd_status, {
|
|
|
|
"Reply Status", "pcnfsd.status", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0, "Status", HFILL }},
|
|
|
|
{ &hf_pcnfsd_uid, {
|
|
|
|
"User ID", "pcnfsd.uid", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0, "User ID", HFILL }},
|
|
|
|
{ &hf_pcnfsd_gid, {
|
|
|
|
"Group ID", "pcnfsd.gid", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0, "Group ID", HFILL }},
|
|
|
|
{ &hf_pcnfsd_gids_count, {
|
|
|
|
"Group ID Count", "pcnfsd.gids.count", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0, "Group ID Count", HFILL }},
|
|
|
|
{ &hf_pcnfsd_homedir, {
|
|
|
|
"Home Directory", "pcnfsd.homedir", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "Home Directory", HFILL }},
|
|
|
|
{ &hf_pcnfsd_def_umask, {
|
|
|
|
"def_umask", "pcnfsd.def_umask", FT_INT32, BASE_OCT,
|
|
|
|
NULL, 0, "def_umask", HFILL }},
|
2002-05-14 21:22:39 +00:00
|
|
|
{ &hf_pcnfsd_username, {
|
|
|
|
"User name", "pcnfsd.username", FT_STRING, BASE_DEC,
|
|
|
|
NULL, 0, "pcnfsd.username", HFILL }},
|
2001-11-06 18:32:30 +00:00
|
|
|
};
|
|
|
|
|
2001-11-06 13:42:04 +00:00
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_pcnfsd,
|
2001-11-06 18:32:30 +00:00
|
|
|
&ett_pcnfsd_auth_ident,
|
2001-11-07 07:05:58 +00:00
|
|
|
&ett_pcnfsd_auth_password,
|
|
|
|
&ett_pcnfsd_gids
|
2001-11-06 13:42:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
proto_pcnfsd = proto_register_protocol("PC NFS",
|
|
|
|
"PCNFSD", "pcnfsd");
|
2001-11-06 18:32:30 +00:00
|
|
|
proto_register_field_array(proto_pcnfsd, hf, array_length(hf));
|
2001-11-06 13:42:04 +00:00
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_pcnfsd(void)
|
|
|
|
{
|
|
|
|
/* Register the protocol as RPC */
|
|
|
|
rpc_init_prog(proto_pcnfsd, PCNFSD_PROGRAM, ett_pcnfsd);
|
|
|
|
/* Register the procedure tables */
|
2002-11-01 00:48:39 +00:00
|
|
|
rpc_init_proc_table(PCNFSD_PROGRAM, 1, pcnfsd1_proc, hf_pcnfsd_procedure_v1);
|
|
|
|
rpc_init_proc_table(PCNFSD_PROGRAM, 2, pcnfsd2_proc, hf_pcnfsd_procedure_v2);
|
2001-11-06 13:42:04 +00:00
|
|
|
}
|
|
|
|
|