2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * Copied from packet-ypserv.c
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 #include "packet-rpc.h"
33 #include "packet-nfs.h"
34 #include "packet-hclnfsd.h"
36 #include <epan/wmem/wmem.h>
38 static int proto_hclnfsd = -1;
39 static int hf_hclnfsd_procedure_v1 = -1;
40 static int hf_hclnfsd_request_type = -1;
41 static int hf_hclnfsd_device = -1;
42 /* static int hf_hclnfsd_login = -1; */
43 static int hf_hclnfsd_lockname = -1;
44 static int hf_hclnfsd_unknown_data = -1;
45 static int hf_hclnfsd_lockowner = -1;
46 static int hf_hclnfsd_printername = -1;
47 static int hf_hclnfsd_filename = -1;
48 static int hf_hclnfsd_fileext = -1;
49 static int hf_hclnfsd_grpname = -1;
50 static int hf_hclnfsd_hostname = -1;
51 static int hf_hclnfsd_username = -1;
52 static int hf_hclnfsd_queuename = -1;
53 static int hf_hclnfsd_queuecomment = -1;
54 static int hf_hclnfsd_queuestatus = -1;
55 static int hf_hclnfsd_numphysicalprinters = -1;
56 static int hf_hclnfsd_printqueuenumber = -1;
57 static int hf_hclnfsd_printparams = -1;
58 static int hf_hclnfsd_status = -1;
59 static int hf_hclnfsd_sequence = -1;
60 static int hf_hclnfsd_server_ip = -1;
61 static int hf_hclnfsd_host_ip = -1;
62 static int hf_hclnfsd_gid = -1;
63 static int hf_hclnfsd_uid = -1;
64 static int hf_hclnfsd_cookie = -1;
65 static int hf_hclnfsd_mode = -1;
66 static int hf_hclnfsd_access = -1;
67 static int hf_hclnfsd_exclusive = -1;
68 static int hf_hclnfsd_offset = -1;
69 static int hf_hclnfsd_length = -1;
70 static int hf_hclnfsd_jobstatus = -1;
71 static int hf_hclnfsd_timesubmitted = -1;
72 static int hf_hclnfsd_size = -1;
73 static int hf_hclnfsd_copies = -1;
74 static int hf_hclnfsd_auth_ident_obscure = -1;
76 static gint ett_hclnfsd = -1;
77 static gint ett_hclnfsd_gids = -1;
78 static gint ett_hclnfsd_groups = -1;
79 static gint ett_hclnfsd_uids = -1;
80 static gint ett_hclnfsd_usernames = -1;
81 static gint ett_hclnfsd_printqueues = -1;
82 static gint ett_hclnfsd_printjob = -1;
83 static gint ett_hclnfsd_auth_ident = -1;
86 dissect_hclnfsd_gids(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
88 guint32 ngids, ngids_i, gid;
89 proto_tree *gidtree = NULL;
90 proto_item *giditem = NULL;
93 ngids = tvb_get_ntohl(tvb, offset);
96 giditem = proto_tree_add_text(tree, tvb, offset, 4, "GIDs: %d",
99 gidtree = proto_item_add_subtree(giditem, ett_hclnfsd_gids);
105 for (ngids_i = 0; ngids_i < ngids; ngids_i++)
107 gid = tvb_get_ntohl(tvb, offset + (4 * ngids_i));
108 proto_tree_add_text(gidtree, tvb, offset + (4 * ngids_i), 4,
118 dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
120 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
122 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "spool filehandle", NULL);
129 dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
131 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_printername, offset, NULL);
133 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_filename, offset, NULL);
135 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_fileext, offset);
141 static const value_string names_request_type[] = {
142 #define HCLNFSD_DISK_REQUEST 4
143 { HCLNFSD_DISK_REQUEST, "DISK" },
144 #define HCLNFSD_PRINT_REQUEST 3
145 { HCLNFSD_PRINT_REQUEST, "PRINTER" },
150 hclnfsd_decode_obscure(const char *ident, int ident_len)
152 char *ident_decoded, *ident_out;
155 ident_decoded = (char *)wmem_alloc(wmem_packet_scope(), ident_len);
156 ident_out = ident_decoded;
157 for (x = -1, j = 0; j < ident_len; j++)
166 return ident_decoded;
171 dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
173 guint32 request_type;
174 const char *ident = NULL;
176 char *username = NULL;
177 char *password = NULL;
180 proto_item *ident_item = NULL;
181 proto_tree *ident_tree = NULL;
183 proto_tree_add_item(tree, hf_hclnfsd_server_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
186 request_type = tvb_get_ntohl(tvb, offset);
188 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
192 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_device, offset,
197 ident_item = proto_tree_add_text(tree, tvb, offset, -1,
198 "Authentication Ident");
202 ident_tree = proto_item_add_subtree(ident_item,
203 ett_hclnfsd_auth_ident);
207 newoffset = dissect_rpc_string(tvb, ident_tree,
208 hf_hclnfsd_auth_ident_obscure, offset, &ident);
212 ident_len = (int)strlen(ident);
214 proto_item_set_len(ident_item, ident_len);
216 ident_decoded = hclnfsd_decode_obscure(ident, ident_len);
218 username = ident_decoded + 2;
219 password = username + strlen(username) + 1;
221 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
222 "Username: %s", username);
224 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
225 "Password: %s", password);
240 dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
244 status = tvb_get_ntohl(tvb, offset);
252 proto_tree_add_uint(tree, hf_hclnfsd_status, tvb, offset, 4, status);
254 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
256 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
258 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
264 dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
266 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset, NULL);
272 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
274 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
281 dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
284 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
291 dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
293 return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset,
299 dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
301 proto_tree_add_item(tree, hf_hclnfsd_host_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
309 dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
311 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_hostname, offset, NULL);
318 dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
320 guint32 nuids, nuids_i;
321 proto_tree *uidtree = NULL;
322 proto_item *uiditem = NULL;
324 nuids = tvb_get_ntohl(tvb, offset);
327 uiditem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
331 uidtree = proto_item_add_subtree(uiditem, ett_hclnfsd_uids);
338 for (nuids_i = 0; nuids_i < nuids; nuids_i++)
339 offset = dissect_rpc_uint32(tvb, uidtree, hf_hclnfsd_uid, offset);
346 dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
348 guint32 nusers, nusers_i;
349 proto_tree *usertree = NULL;
350 proto_item *useritem = NULL;
352 nusers = tvb_get_ntohl(tvb, offset);
355 useritem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
359 usertree = proto_item_add_subtree(useritem, ett_hclnfsd_usernames);
366 for (nusers_i = 0; nusers_i < nusers; nusers_i++)
367 offset = dissect_rpc_string(tvb, usertree,
368 hf_hclnfsd_username, offset, NULL);
375 dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
377 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
384 dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
386 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
393 dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
395 guint32 request_type;
397 request_type = tvb_get_ntohl(tvb, offset);
399 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
403 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
405 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
407 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
409 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
411 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_mode, offset);
413 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_access, offset);
415 offset += 4; /* skip last 4 UNUSED bytes */
422 dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
424 guint32 request_type;
426 request_type = tvb_get_ntohl(tvb, offset);
428 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
432 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
433 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
434 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_sequence, offset);
441 dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
443 return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree);
448 dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
450 return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree);
455 dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
457 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
458 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
459 offset += 4; /* skip unused uint */
461 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_exclusive, offset);
463 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
465 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
467 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_lockowner, offset);
469 offset += 4; /* unused, skip */
471 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
473 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
480 dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
484 request_type = tvb_get_ntohl(tvb, offset);
486 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
490 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
491 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
498 dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
500 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
502 offset += 4; /* skip unused */
509 dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
511 offset += 4; /* skip unused */
513 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
515 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
517 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
519 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
521 offset += 4; /* skip unused */
523 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
524 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
531 dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
533 return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree);
538 dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
540 guint nqueues, nqueues_i;
541 proto_item *queuesitem = NULL;
542 proto_tree *queuestree = NULL;
544 nqueues = tvb_get_ntohl(tvb, offset);
547 queuesitem = proto_tree_add_text(tree, tvb, offset, 4,
548 "Print Queues: %d", nqueues);
551 queuestree = proto_item_add_subtree(queuesitem,
552 ett_hclnfsd_printqueues);
559 for (nqueues_i = 0; nqueues_i < nqueues; nqueues_i++)
561 /* create new item for print queue */
562 offset = dissect_rpc_string(tvb, tree,
563 hf_hclnfsd_queuename, offset, NULL);
565 /* create subtree on new item with print queue comment */
566 offset = dissect_rpc_string(tvb, tree,
567 hf_hclnfsd_queuecomment, offset, NULL);
575 dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
577 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuename, offset, NULL);
579 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
586 dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
588 guint datafollows, jobid;
589 proto_item *queueitem = NULL;
590 proto_tree *queuetree = NULL;
594 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_printqueuenumber, offset);
596 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuecomment, offset, NULL);
598 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_queuestatus, offset);
600 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_numphysicalprinters, offset);
602 datafollows = tvb_get_ntohl(tvb, offset);
605 queueitem = proto_tree_add_text(tree, tvb, offset, 4,
606 "Print Jobs: %d", datafollows);
608 queuetree = proto_item_add_subtree(queueitem, ett_hclnfsd_printqueues);
617 jobid = tvb_get_ntohl(tvb, offset);
618 jobitem = proto_tree_add_text(queuetree, tvb, offset, 4, "Job ID: %d",
622 jobtree = proto_item_add_subtree(jobitem, ett_hclnfsd_printjob);
624 offset = dissect_rpc_string(tvb, jobtree,
625 hf_hclnfsd_username, offset, NULL);
627 offset = dissect_rpc_string(tvb, jobtree,
628 hf_hclnfsd_printparams, offset, NULL);
630 offset = dissect_rpc_uint32(tvb, jobtree, hf_hclnfsd_queuestatus, offset);
632 offset = dissect_rpc_uint32(tvb, jobtree, hf_hclnfsd_jobstatus, offset);
633 offset = dissect_rpc_uint32(tvb, jobtree, hf_hclnfsd_timesubmitted, offset);
634 offset = dissect_rpc_uint32(tvb, jobtree, hf_hclnfsd_size, offset);
635 offset = dissect_rpc_uint32(tvb, jobtree, hf_hclnfsd_copies, offset);
636 offset = dissect_rpc_string(tvb, jobtree,
637 hf_hclnfsd_queuecomment, offset, NULL);
639 datafollows = tvb_get_ntohl(tvb, offset);
647 /* proc number, "proc name", dissect_request, dissect_reply */
648 /* NULL as function pointer means: take the generic one. */
650 static const vsff hclnfsd1_proc[] = {
651 { HCLNFSDPROC_NULL, "NULL",
653 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE",
654 dissect_hclnfsd_spool_inquire_call, NULL },
655 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE",
656 dissect_hclnfsd_spool_file_call, NULL },
657 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE",
658 dissect_hclnfsd_authorize_call, dissect_hclnfsd_authorize_reply },
659 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB",
660 dissect_hclnfsd_grp_name_to_numb_call, dissect_hclnfsd_grp_name_to_numb_reply },
661 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER",
662 dissect_hclnfsd_grp_to_number_call, dissect_hclnfsd_grp_to_number_reply },
663 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST",
664 dissect_hclnfsd_return_host_call, dissect_hclnfsd_return_host_reply },
665 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME",
666 dissect_hclnfsd_uid_to_name_call, dissect_hclnfsd_uid_to_name_reply },
667 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID",
668 dissect_hclnfsd_name_to_uid_call, dissect_hclnfsd_name_to_uid_reply },
669 { HCLNFSDPROC_SHARE, "SHARE",
670 dissect_hclnfsd_share_call, dissect_hclnfsd_share_reply },
671 { HCLNFSDPROC_UNSHARE, "UNSHARE",
672 dissect_hclnfsd_unshare_call, dissect_hclnfsd_unshare_reply },
673 { HCLNFSDPROC_LOCK, "LOCK",
674 dissect_hclnfsd_lock_call, dissect_hclnfsd_lock_reply },
675 { HCLNFSDPROC_REMOVE, "REMOVE",
676 dissect_hclnfsd_remove_call, NULL },
677 { HCLNFSDPROC_UNLOCK, "UNLOCK",
678 dissect_hclnfsd_unlock_call, dissect_hclnfsd_unlock_reply },
679 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS",
680 NULL, dissect_hclnfsd_get_printers_reply },
681 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ",
682 dissect_hclnfsd_get_printq_call, dissect_hclnfsd_get_printq_reply },
683 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB",
685 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS",
687 { 0, NULL, NULL, NULL }
689 static const value_string hclnfsd1_proc_vals[] = {
690 { HCLNFSDPROC_NULL, "NULL" },
691 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE" },
692 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE" },
693 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE" },
694 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB" },
695 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER" },
696 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST" },
697 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME" },
698 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID" },
699 { HCLNFSDPROC_SHARE, "SHARE" },
700 { HCLNFSDPROC_UNSHARE, "UNSHARE" },
701 { HCLNFSDPROC_LOCK, "LOCK" },
702 { HCLNFSDPROC_REMOVE, "REMOVE" },
703 { HCLNFSDPROC_UNLOCK, "UNLOCK" },
704 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS" },
705 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ" },
706 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB" },
707 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS" },
710 /* end of hclnfsd version 1 */
714 proto_register_hclnfsd(void)
716 static hf_register_info hf[] = {
717 { &hf_hclnfsd_procedure_v1, {
718 "V1 Procedure", "hclnfsd.procedure_v1", FT_UINT32, BASE_DEC,
719 VALS(hclnfsd1_proc_vals), 0, NULL, HFILL }},
720 { &hf_hclnfsd_request_type, {
721 "Request Type", "hclnfsd.request_type", FT_UINT32, BASE_DEC,
722 VALS(names_request_type), 0, NULL, HFILL }},
724 { &hf_hclnfsd_device, {
725 "Device", "hclnfsd.device", FT_STRING, BASE_NONE,
726 NULL, 0, NULL, HFILL }},
729 { &hf_hclnfsd_login, {
730 "Login Text", "hclnfsd.logintext", FT_STRING, BASE_NONE,
731 NULL, 0, NULL, HFILL }},
734 { &hf_hclnfsd_lockname, {
735 "Lockname", "hclnfsd.lockname", FT_STRING, BASE_NONE,
736 NULL, 0, NULL, HFILL }},
738 { &hf_hclnfsd_unknown_data, {
739 "Unknown", "hclnfsd.unknown_data", FT_BYTES, BASE_NONE,
740 NULL, 0, "Data", HFILL }},
742 { &hf_hclnfsd_lockowner, {
743 "Lockowner", "hclnfsd.lockowner", FT_BYTES, BASE_NONE,
744 NULL, 0, NULL, HFILL }},
746 { &hf_hclnfsd_printername, {
747 "Printer Name", "hclnfsd.printername", FT_STRING, BASE_NONE,
748 NULL, 0, NULL, HFILL }},
750 { &hf_hclnfsd_filename, {
751 "Filename", "hclnfsd.filename", FT_STRING, BASE_NONE,
752 NULL, 0, NULL, HFILL }},
754 { &hf_hclnfsd_fileext, {
755 "File Extension", "hclnfsd.fileext", FT_UINT32, BASE_DEC,
756 NULL, 0, NULL, HFILL }},
758 { &hf_hclnfsd_grpname, {
759 "Group", "hclnfsd.group", FT_STRING, BASE_NONE,
760 NULL, 0, NULL, HFILL }},
762 { &hf_hclnfsd_hostname, {
763 "Hostname", "hclnfsd.hostname", FT_STRING, BASE_NONE,
764 NULL, 0, NULL, HFILL }},
766 { &hf_hclnfsd_username, {
767 "Username", "hclnfsd.username", FT_STRING, BASE_NONE,
768 NULL, 0, NULL, HFILL }},
770 { &hf_hclnfsd_queuename, {
771 "Name", "hclnfsd.printqueuename", FT_STRING, BASE_NONE,
772 NULL, 0, "Print Queue Name", HFILL }},
774 { &hf_hclnfsd_queuecomment, {
775 "Comment", "hclnfsd.printqueuecomment", FT_STRING, BASE_NONE,
776 NULL, 0, "Print Queue Comment", HFILL }},
778 { &hf_hclnfsd_printparams, {
779 "Print Parameters", "hclnfsd.printparameters", FT_STRING, BASE_NONE,
780 NULL, 0, NULL, HFILL }},
782 { &hf_hclnfsd_status, {
783 "Status", "hclnfsd.status", FT_UINT32, BASE_DEC,
784 NULL, 0, NULL, HFILL }},
787 "UID", "hclnfsd.uid", FT_UINT32, BASE_DEC,
788 NULL, 0, "User ID", HFILL }},
790 { &hf_hclnfsd_sequence, {
791 "Sequence", "hclnfsd.sequence", FT_UINT32, BASE_HEX,
792 NULL, 0, NULL, HFILL }},
794 { &hf_hclnfsd_cookie, {
795 "Cookie", "hclnfsd.cookie", FT_UINT32, BASE_HEX,
796 NULL, 0, NULL, HFILL }},
798 { &hf_hclnfsd_mode, {
799 "Mode", "hclnfsd.mode", FT_UINT32, BASE_DEC,
800 NULL, 0, NULL, HFILL }},
802 { &hf_hclnfsd_access, {
803 "Access", "hclnfsd.access", FT_UINT32, BASE_DEC,
804 NULL, 0, NULL, HFILL }},
806 { &hf_hclnfsd_exclusive, {
807 "Exclusive", "hclnfsd.exclusive", FT_UINT32, BASE_DEC,
808 NULL, 0, NULL, HFILL }},
810 { &hf_hclnfsd_offset, {
811 "Offset", "hclnfsd.offset", FT_UINT32, BASE_DEC,
812 NULL, 0, NULL, HFILL }},
814 { &hf_hclnfsd_length, {
815 "Length", "hclnfsd.length", FT_UINT32, BASE_DEC,
816 NULL, 0, NULL, HFILL }},
818 { &hf_hclnfsd_queuestatus, {
819 "Queue Status", "hclnfsd.queuestatus", FT_UINT32, BASE_DEC,
820 NULL, 0, NULL, HFILL }},
822 { &hf_hclnfsd_printqueuenumber, {
823 "Print Queue Number", "hclnfsd.pqn", FT_UINT32, BASE_DEC,
824 NULL, 0, NULL, HFILL }},
826 { &hf_hclnfsd_numphysicalprinters, {
827 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32, BASE_DEC,
828 NULL, 0, NULL, HFILL }},
830 { &hf_hclnfsd_jobstatus, {
831 "Job Status", "hclnfsd.jobstatus", FT_UINT32, BASE_DEC,
832 NULL, 0, NULL, HFILL }},
834 { &hf_hclnfsd_timesubmitted, {
835 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32, BASE_DEC,
836 NULL, 0, NULL, HFILL }},
838 { &hf_hclnfsd_size, {
839 "Size", "hclnfsd.size", FT_UINT32, BASE_DEC,
840 NULL, 0, NULL, HFILL }},
842 { &hf_hclnfsd_copies, {
843 "Copies", "hclnfsd.copies", FT_UINT32, BASE_DEC,
844 NULL, 0, NULL, HFILL }},
847 "GID", "hclnfsd.gid", FT_UINT32, BASE_DEC,
848 NULL, 0, "Group ID", HFILL }},
850 { &hf_hclnfsd_server_ip, {
851 "Server IP", "hclnfsd.server_ip", FT_IPv4, BASE_NONE,
852 NULL, 0, NULL, HFILL }},
854 { &hf_hclnfsd_host_ip, {
855 "Host IP", "hclnfsd.host_ip", FT_IPv4, BASE_NONE,
856 NULL, 0, NULL, HFILL }},
858 { &hf_hclnfsd_auth_ident_obscure, {
859 "Obscure Ident", "hclnfsd.authorize.ident.obscure", FT_STRING,
860 BASE_NONE , NULL, 0, "Authentication Obscure Ident", HFILL }},
862 static gint *ett[] = {
867 &ett_hclnfsd_usernames,
868 &ett_hclnfsd_printqueues,
869 &ett_hclnfsd_printjob,
870 &ett_hclnfsd_auth_ident
873 proto_hclnfsd = proto_register_protocol("Hummingbird NFS Daemon",
874 "HCLNFSD", "hclnfsd");
875 proto_register_field_array(proto_hclnfsd, hf, array_length(hf));
876 proto_register_subtree_array(ett, array_length(ett));
880 proto_reg_handoff_hclnfsd(void)
882 /* Register the protocol as RPC */
883 rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
885 /* Register the procedure tables */
886 rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc, hf_hclnfsd_procedure_v1);