2001-11-06 13:42:04 +00:00
|
|
|
/* packet-pcnfsd.c
|
|
|
|
* Routines for PCNFSD dissection
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2001-11-06 13:42:04 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
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
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-11-06 13:42:04 +00:00
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static int
|
2002-05-14 21:22:39 +00:00
|
|
|
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 }
|
|
|
|
};
|
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static int
|
2002-05-14 21:22:39 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static 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;
|
|
|
|
}
|
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static int
|
2002-05-14 21:22:39 +00:00
|
|
|
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 }
|
|
|
|
};
|
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static int
|
2002-05-14 21:22:39 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2005-08-02 04:31:42 +00:00
|
|
|
static int
|
2002-05-14 21:22:39 +00:00
|
|
|
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) {
|
2009-04-22 17:42:47 +00:00
|
|
|
/* Only attempt to decode the ident if it has been specified */
|
|
|
|
if (strcmp(ident, RPC_STRING_EMPTY))
|
|
|
|
pcnfsd_decode_obscure(ident, (int)strlen(ident));
|
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
if (ident_tree)
|
|
|
|
proto_tree_add_string(ident_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_ident_clear,
|
2009-03-29 18:26:06 +00:00
|
|
|
tvb, offset+4, (gint)strlen(ident), ident);
|
2001-11-06 18:32:30 +00:00
|
|
|
}
|
|
|
|
if (ident_item) {
|
|
|
|
proto_item_set_text(ident_item, "Authentication Ident: %s",
|
|
|
|
ident);
|
|
|
|
}
|
|
|
|
|
|
|
|
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) {
|
2009-04-22 17:42:47 +00:00
|
|
|
/* Only attempt to decode the password if it has been specified */
|
|
|
|
if (strcmp(password, RPC_STRING_EMPTY))
|
|
|
|
pcnfsd_decode_obscure(password, (int)strlen(password));
|
|
|
|
|
2001-11-06 18:32:30 +00:00
|
|
|
if (password_tree)
|
|
|
|
proto_tree_add_string(password_tree,
|
2001-11-07 07:05:58 +00:00
|
|
|
hf_pcnfsd_auth_password_clear,
|
2009-03-29 18:26:06 +00:00
|
|
|
tvb, offset+4, (gint)strlen(password), password);
|
2001-11-06 18:32:30 +00:00
|
|
|
}
|
|
|
|
if (password_item) {
|
|
|
|
proto_item_set_text(password_item, "Authentication Password: %s",
|
|
|
|
password);
|
|
|
|
}
|
|
|
|
|
|
|
|
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) {
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(gtree, hf_pcnfsd_gids_count, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2001-11-07 07:05:58 +00:00
|
|
|
}
|
|
|
|
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,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(pcnfsd1_proc_vals), 0, NULL, HFILL }},
|
2002-11-01 00:48:39 +00:00
|
|
|
{ &hf_pcnfsd_procedure_v2, {
|
|
|
|
"V2 Procedure", "pcnfsd.procedure_v2", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(pcnfsd2_proc_vals), 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_client, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Authentication Client", "pcnfsd.auth.client", FT_STRING, BASE_NONE,
|
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_ident_obscure, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Obscure Ident", "pcnfsd.auth.ident.obscure", FT_STRING, BASE_NONE,
|
2008-12-17 00:08:38 +00:00
|
|
|
NULL, 0, "Authentication Obscure Ident", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_ident_clear, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Clear Ident", "pcnfsd.auth.ident.clear", FT_STRING, BASE_NONE,
|
2001-11-06 18:32:30 +00:00
|
|
|
NULL, 0, "Authentication Clear Ident", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_password_obscure, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Obscure Password", "pcnfsd.auth.password.obscure", FT_STRING, BASE_NONE,
|
2008-12-17 00:08:38 +00:00
|
|
|
NULL, 0, "Authentication Obscure Password", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_auth_password_clear, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Clear Password", "pcnfsd.auth.password.clear", FT_STRING, BASE_NONE,
|
2001-11-06 18:32:30 +00:00
|
|
|
NULL, 0, "Authentication Clear Password", HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_comment, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Comment", "pcnfsd.comment", FT_STRING, BASE_NONE,
|
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &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,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_gid, {
|
|
|
|
"Group ID", "pcnfsd.gid", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_gids_count, {
|
|
|
|
"Group ID Count", "pcnfsd.gids.count", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_homedir, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"Home Directory", "pcnfsd.homedir", FT_STRING, BASE_NONE,
|
|
|
|
NULL, 0, NULL, HFILL }},
|
2001-11-07 07:05:58 +00:00
|
|
|
{ &hf_pcnfsd_def_umask, {
|
2008-03-15 22:41:57 +00:00
|
|
|
"def_umask", "pcnfsd.def_umask", FT_UINT32, BASE_OCT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2002-05-14 21:22:39 +00:00
|
|
|
{ &hf_pcnfsd_username, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"User name", "pcnfsd.username", FT_STRING, BASE_NONE,
|
2002-05-14 21:22:39 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|