2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
5 * $Id: packet-hclnfsd.c,v 1.14 2002/05/10 23:20:38 guy Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #ifdef HAVE_SYS_TYPES_H
33 #include <sys/types.h>
38 #include "packet-rpc.h"
39 #include "packet-nfs.h"
40 #include "packet-hclnfsd.h"
42 static int proto_hclnfsd = -1;
44 static int hf_hclnfsd_request_type = -1;
45 static int hf_hclnfsd_device = -1;
46 static int hf_hclnfsd_login = -1;
47 static int hf_hclnfsd_lockname = -1;
48 static int hf_hclnfsd_unknown_data = -1;
49 static int hf_hclnfsd_lockowner = -1;
50 static int hf_hclnfsd_printername = -1;
51 static int hf_hclnfsd_filename = -1;
52 static int hf_hclnfsd_fileext = -1;
53 static int hf_hclnfsd_grpname = -1;
54 static int hf_hclnfsd_hostname = -1;
55 static int hf_hclnfsd_username = -1;
56 static int hf_hclnfsd_queuename = -1;
57 static int hf_hclnfsd_queuecomment = -1;
58 static int hf_hclnfsd_queuestatus = -1;
59 static int hf_hclnfsd_numphysicalprinters = -1;
60 static int hf_hclnfsd_printqueuenumber = -1;
61 static int hf_hclnfsd_printparams = -1;
62 static int hf_hclnfsd_status = -1;
63 static int hf_hclnfsd_sequence = -1;
64 static int hf_hclnfsd_server_ip = -1;
65 static int hf_hclnfsd_host_ip = -1;
66 static int hf_hclnfsd_gid = -1;
67 static int hf_hclnfsd_uid = -1;
68 static int hf_hclnfsd_cookie = -1;
69 static int hf_hclnfsd_mode = -1;
70 static int hf_hclnfsd_access = -1;
71 static int hf_hclnfsd_exclusive = -1;
72 static int hf_hclnfsd_offset = -1;
73 static int hf_hclnfsd_length = -1;
74 static int hf_hclnfsd_jobstatus = -1;
75 static int hf_hclnfsd_timesubmitted = -1;
76 static int hf_hclnfsd_size = -1;
77 static int hf_hclnfsd_copies = -1;
78 static int hf_hclnfsd_auth_ident_obscure = -1;
80 static gint ett_hclnfsd = -1;
81 static gint ett_hclnfsd_gids = -1;
82 static gint ett_hclnfsd_groups = -1;
83 static gint ett_hclnfsd_uids = -1;
84 static gint ett_hclnfsd_usernames = -1;
85 static gint ett_hclnfsd_printqueues = -1;
86 static gint ett_hclnfsd_printjob = -1;
87 static gint ett_hclnfsd_auth_ident = -1;
90 dissect_hclnfsd_gids(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
92 guint32 ngids, ngids_i, gid;
93 proto_tree *gidtree = NULL;
94 proto_item *giditem = NULL;
97 ngids = tvb_get_ntohl(tvb, offset);
100 giditem = proto_tree_add_text(tree, tvb, offset, 4, "GIDs: %d",
103 gidtree = proto_item_add_subtree(giditem, ett_hclnfsd_gids);
109 for (ngids_i = 0; ngids_i < ngids; ngids_i++)
111 gid = tvb_get_ntohl(tvb, offset + (4 * ngids_i));
112 proto_tree_add_text(gidtree, tvb, offset + (4 * ngids_i), 4,
122 dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
124 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
126 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "spool filehandle");
133 dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
135 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_printername, offset, NULL);
137 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_filename, offset, NULL);
139 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_fileext, offset);
145 static const value_string names_request_type[] = {
146 #define HCLNFSD_DISK_REQUEST 4
147 { HCLNFSD_DISK_REQUEST, "DISK" },
148 #define HCLNFSD_PRINT_REQUEST 3
149 { HCLNFSD_PRINT_REQUEST, "PRINTER" },
154 hclnfsd_decode_obscure(char *ident, int ident_len)
158 for (x = -1, j = 0; j < ident_len; j++)
169 dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
171 guint32 request_type;
173 char *username = NULL;
174 char *password = NULL;
177 proto_item *ident_item = NULL;
178 proto_tree *ident_tree = NULL;
180 proto_tree_add_item(tree, hf_hclnfsd_server_ip, tvb, offset, 4, FALSE);
183 request_type = tvb_get_ntohl(tvb, offset);
185 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
189 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_device, offset,
194 ident_item = proto_tree_add_text(tree, tvb, offset, -1,
195 "Authentication Ident");
199 ident_tree = proto_item_add_subtree(ident_item,
200 ett_hclnfsd_auth_ident);
204 newoffset = dissect_rpc_string(tvb, ident_tree,
205 hf_hclnfsd_auth_ident_obscure, offset, &ident);
207 proto_item_set_len(ident_item, newoffset - offset);
211 ident_len = newoffset - offset;
213 hclnfsd_decode_obscure(ident, ident_len);
215 username = ident + 2;
216 password = username + strlen(username) + 1;
218 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
219 "Username: %s", username);
221 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
222 "Password: %s", password);
238 dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
242 status = tvb_get_ntohl(tvb, offset);
250 proto_tree_add_uint(tree, hf_hclnfsd_status, tvb, offset, 4, status);
252 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
254 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
256 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
262 dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
264 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset, NULL);
270 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
272 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
279 dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
282 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
289 dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
291 return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset,
297 dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
299 proto_tree_add_item(tree, hf_hclnfsd_host_ip, tvb, offset, 4, FALSE);
307 dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
309 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_hostname, offset, NULL);
316 dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
318 guint32 nuids, nuids_i;
319 proto_tree *uidtree = NULL;
320 proto_item *uiditem = NULL;
322 nuids = tvb_get_ntohl(tvb, offset);
325 uiditem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
329 uidtree = proto_item_add_subtree(uiditem, ett_hclnfsd_uids);
336 for (nuids_i = 0; nuids_i < nuids; nuids_i++)
337 offset = dissect_rpc_uint32(tvb, uidtree, hf_hclnfsd_uid, offset);
344 dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
346 guint32 nusers, nusers_i;
347 proto_tree *usertree = NULL;
348 proto_item *useritem = NULL;
350 nusers = tvb_get_ntohl(tvb, offset);
353 useritem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
357 usertree = proto_item_add_subtree(useritem, ett_hclnfsd_usernames);
364 for (nusers_i = 0; nusers_i < nusers; nusers_i++)
365 offset = dissect_rpc_string(tvb, usertree,
366 hf_hclnfsd_username, offset, NULL);
373 dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
375 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
382 dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
384 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
391 dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
393 guint32 request_type;
395 request_type = tvb_get_ntohl(tvb, offset);
397 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
401 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
403 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
405 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
407 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
409 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_mode, offset);
411 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_access, offset);
413 offset += 4; /* skip last 4 UNUSED bytes */
420 dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
422 guint32 request_type;
424 request_type = tvb_get_ntohl(tvb, offset);
426 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
430 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
431 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
432 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_sequence, offset);
439 dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
441 return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree);
446 dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
448 return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree);
453 dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
455 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
456 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
457 offset += 4; /* skip unused uint */
459 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_exclusive, offset);
461 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
463 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
465 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_lockowner, offset);
467 offset += 4; /* unused, skip */
469 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
471 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
478 dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
482 request_type = tvb_get_ntohl(tvb, offset);
484 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
488 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
489 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
496 dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
498 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
500 offset += 4; /* skip unused */
507 dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
509 offset += 4; /* skip unused */
511 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
513 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
515 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
517 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
519 offset += 4; /* skip unused */
521 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
522 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
529 dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
531 return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree);
536 dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
538 guint nqueues, nqueues_i;
539 proto_item *queuesitem = NULL;
540 proto_tree *queuestree = NULL;
542 nqueues = tvb_get_ntohl(tvb, offset);
545 queuesitem = proto_tree_add_text(tree, tvb, offset, 4,
546 "Print Queues: %d", nqueues);
549 queuestree = proto_item_add_subtree(queuesitem,
550 ett_hclnfsd_printqueues);
557 for (nqueues_i = 0; nqueues_i < nqueues; nqueues_i++)
559 /* create new item for print queue */
560 offset = dissect_rpc_string(tvb, tree,
561 hf_hclnfsd_queuename, offset, NULL);
563 /* create subtree on new item with print queue comment */
564 offset = dissect_rpc_string(tvb, tree,
565 hf_hclnfsd_queuecomment, offset, NULL);
573 dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
575 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuename, offset, NULL);
577 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
584 dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
586 guint datafollows, jobid;
587 proto_item *queueitem = NULL;
588 proto_tree *queuetree = NULL;
592 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_printqueuenumber, offset);
594 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuecomment, offset, NULL);
596 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_queuestatus, offset);
598 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_numphysicalprinters, offset);
600 datafollows = tvb_get_ntohl(tvb, offset);
603 queueitem = proto_tree_add_text(tree, tvb, offset, 4,
604 "Print Jobs: %d", datafollows);
606 queuetree = proto_item_add_subtree(queueitem, ett_hclnfsd_printqueues);
615 jobid = tvb_get_ntohl(tvb, offset);
616 jobitem = proto_tree_add_text(queuetree, tvb, offset, 4, "Job ID: %d",
620 jobtree = proto_item_add_subtree(jobitem, ett_hclnfsd_printjob);
622 offset = dissect_rpc_string(tvb, tree,
623 hf_hclnfsd_username, offset, NULL);
625 offset = dissect_rpc_string(tvb, tree,
626 hf_hclnfsd_printparams, offset, NULL);
628 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_queuestatus, offset);
630 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_jobstatus, offset);
631 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_timesubmitted, offset);
632 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_size, offset);
633 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_copies, offset);
634 offset = dissect_rpc_string(tvb, tree,
635 hf_hclnfsd_queuecomment, offset, NULL);
637 datafollows = tvb_get_ntohl(tvb, offset);
645 /* proc number, "proc name", dissect_request, dissect_reply */
646 /* NULL as function pointer means: take the generic one. */
648 static const vsff hclnfsd1_proc[] = {
649 { HCLNFSDPROC_NULL, "NULL",
651 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE",
652 dissect_hclnfsd_spool_inquire_call, NULL },
653 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE",
654 dissect_hclnfsd_spool_file_call, NULL },
655 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE",
656 dissect_hclnfsd_authorize_call, dissect_hclnfsd_authorize_reply },
657 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB",
658 dissect_hclnfsd_grp_name_to_numb_call, dissect_hclnfsd_grp_name_to_numb_reply },
659 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER",
660 dissect_hclnfsd_grp_to_number_call, dissect_hclnfsd_grp_to_number_reply },
661 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST",
662 dissect_hclnfsd_return_host_call, dissect_hclnfsd_return_host_reply },
663 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME",
664 dissect_hclnfsd_uid_to_name_call, dissect_hclnfsd_uid_to_name_reply },
665 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID",
666 dissect_hclnfsd_name_to_uid_call, dissect_hclnfsd_name_to_uid_reply },
667 { HCLNFSDPROC_SHARE, "SHARE",
668 dissect_hclnfsd_share_call, dissect_hclnfsd_share_reply },
669 { HCLNFSDPROC_UNSHARE, "UNSHARE",
670 dissect_hclnfsd_unshare_call, dissect_hclnfsd_unshare_reply },
671 { HCLNFSDPROC_LOCK, "LOCK",
672 dissect_hclnfsd_lock_call, dissect_hclnfsd_lock_reply },
673 { HCLNFSDPROC_REMOVE, "REMOVE",
674 dissect_hclnfsd_remove_call, NULL },
675 { HCLNFSDPROC_UNLOCK, "UNLOCK",
676 dissect_hclnfsd_unlock_call, dissect_hclnfsd_unlock_reply },
677 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS",
678 NULL, dissect_hclnfsd_get_printers_reply },
679 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ",
680 dissect_hclnfsd_get_printq_call, dissect_hclnfsd_get_printq_reply },
681 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB",
683 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS",
685 { 0, NULL, NULL, NULL }
687 /* end of hclnfsd version 1 */
691 proto_register_hclnfsd(void)
693 static hf_register_info hf[] = {
694 { &hf_hclnfsd_request_type, {
695 "Request Type", "hclnfsd.request_type", FT_UINT32, BASE_DEC,
696 VALS(names_request_type), 0, "Request Type", HFILL }},
698 { &hf_hclnfsd_device, {
699 "Device", "hclnfsd.device", FT_STRING, BASE_DEC,
700 NULL, 0, "Device", HFILL }},
702 { &hf_hclnfsd_login, {
703 "Login Text", "hclnfsd.logintext", FT_STRING, BASE_DEC,
704 NULL, 0, "Login Text", HFILL }},
706 { &hf_hclnfsd_lockname, {
707 "Lockname", "hclnfsd.lockname", FT_STRING, BASE_DEC,
708 NULL, 0, "Lockname", HFILL }},
710 { &hf_hclnfsd_unknown_data, {
711 "Unknown", "hclnfsd.unknown_data", FT_BYTES, BASE_DEC,
712 NULL, 0, "Data", HFILL }},
714 { &hf_hclnfsd_lockowner, {
715 "Lockowner", "hclnfsd.lockowner", FT_BYTES, BASE_DEC,
716 NULL, 0, "Lockowner", HFILL }},
718 { &hf_hclnfsd_printername, {
719 "Printer Name", "hclnfsd.printername", FT_STRING, BASE_DEC,
720 NULL, 0, "Printer name", HFILL }},
722 { &hf_hclnfsd_filename, {
723 "Filename", "hclnfsd.filename", FT_STRING, BASE_DEC,
724 NULL, 0, "Filename", HFILL }},
726 { &hf_hclnfsd_fileext, {
727 "File Extension", "hclnfsd.fileext", FT_UINT32, BASE_DEC,
728 NULL, 0, "File Extension", HFILL }},
730 { &hf_hclnfsd_grpname, {
731 "Group", "hclnfsd.group", FT_STRING, BASE_DEC,
732 NULL, 0, "Group", HFILL }},
734 { &hf_hclnfsd_hostname, {
735 "Hostname", "hclnfsd.hostname", FT_STRING, BASE_DEC,
736 NULL, 0, "Hostname", HFILL }},
738 { &hf_hclnfsd_username, {
739 "Username", "hclnfsd.username", FT_STRING, BASE_DEC,
740 NULL, 0, "Username", HFILL }},
742 { &hf_hclnfsd_queuename, {
743 "Name", "hclnfsd.printqueuename", FT_STRING, BASE_DEC,
744 NULL, 0, "Print Queue Name", HFILL }},
746 { &hf_hclnfsd_queuecomment, {
747 "Comment", "hclnfsd.printqueuecomment", FT_STRING, BASE_DEC,
748 NULL, 0, "Print Queue Comment", HFILL }},
750 { &hf_hclnfsd_printparams, {
751 "Print Parameters", "hclnfsd.printparameters", FT_STRING, BASE_DEC,
752 NULL, 0, "Print Parameters", HFILL }},
754 { &hf_hclnfsd_status, {
755 "Status", "hclnfsd.status", FT_UINT32, BASE_DEC,
756 NULL, 0, "Status", HFILL }},
759 "UID", "hclnfsd.uid", FT_UINT32, BASE_DEC,
760 NULL, 0, "User ID", HFILL }},
762 { &hf_hclnfsd_sequence, {
763 "Sequence", "hclnfsd.sequence", FT_UINT32, BASE_HEX,
764 NULL, 0, "Sequence", HFILL }},
766 { &hf_hclnfsd_cookie, {
767 "Cookie", "hclnfsd.cookie", FT_UINT32, BASE_HEX,
768 NULL, 0, "Cookie", HFILL }},
770 { &hf_hclnfsd_mode, {
771 "Mode", "hclnfsd.mode", FT_UINT32, BASE_DEC,
772 NULL, 0, "Mode", HFILL }},
774 { &hf_hclnfsd_access, {
775 "Access", "hclnfsd.access", FT_UINT32, BASE_DEC,
776 NULL, 0, "Access", HFILL }},
778 { &hf_hclnfsd_exclusive, {
779 "Exclusive", "hclnfsd.exclusive", FT_UINT32, BASE_DEC,
780 NULL, 0, "Exclusive", HFILL }},
782 { &hf_hclnfsd_offset, {
783 "Offset", "hclnfsd.offset", FT_UINT32, BASE_DEC,
784 NULL, 0, "Offset", HFILL }},
786 { &hf_hclnfsd_length, {
787 "Length", "hclnfsd.length", FT_UINT32, BASE_DEC,
788 NULL, 0, "Length", HFILL }},
790 { &hf_hclnfsd_queuestatus, {
791 "Queue Status", "hclnfsd.queuestatus", FT_UINT32, BASE_DEC,
792 NULL, 0, "Queue Status", HFILL }},
794 { &hf_hclnfsd_printqueuenumber, {
795 "Print Queue Number", "hclnfsd.pqn", FT_UINT32, BASE_DEC,
796 NULL, 0, "Print Queue Number", HFILL }},
798 { &hf_hclnfsd_numphysicalprinters, {
799 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32, BASE_DEC,
800 NULL, 0, "Number of Physical Printers", HFILL }},
802 { &hf_hclnfsd_jobstatus, {
803 "Job Status", "hclnfsd.jobstatus", FT_UINT32, BASE_DEC,
804 NULL, 0, "Job Status", HFILL }},
806 { &hf_hclnfsd_timesubmitted, {
807 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32, BASE_DEC,
808 NULL, 0, "Time Submitted", HFILL }},
810 { &hf_hclnfsd_size, {
811 "Size", "hclnfsd.size", FT_UINT32, BASE_DEC,
812 NULL, 0, "Size", HFILL }},
814 { &hf_hclnfsd_copies, {
815 "Copies", "hclnfsd.copies", FT_UINT32, BASE_DEC,
816 NULL, 0, "Copies", HFILL }},
819 "GID", "hclnfsd.gid", FT_UINT32, BASE_DEC,
820 NULL, 0, "Group ID", HFILL }},
822 { &hf_hclnfsd_server_ip, {
823 "Server IP", "hclnfsd.server_ip", FT_IPv4, BASE_DEC,
824 NULL, 0, "Server IP", HFILL }},
826 { &hf_hclnfsd_host_ip, {
827 "Host IP", "hclnfsd.host_ip", FT_IPv4, BASE_DEC,
828 NULL, 0, "Host IP", HFILL }},
830 { &hf_hclnfsd_auth_ident_obscure, {
831 "Obscure Ident", "hclnfsd.authorize.ident.obscure", FT_STRING,
832 BASE_DEC , NULL, 0, "Authentication Obscure Ident", HFILL }},
834 static gint *ett[] = {
839 &ett_hclnfsd_usernames,
840 &ett_hclnfsd_printqueues,
841 &ett_hclnfsd_printjob,
842 &ett_hclnfsd_auth_ident
845 proto_hclnfsd = proto_register_protocol("Hummingbird NFS Daemon",
846 "HCLNFSD", "hclnfsd");
847 proto_register_field_array(proto_hclnfsd, hf, array_length(hf));
848 proto_register_subtree_array(ett, array_length(ett));
852 proto_reg_handoff_hclnfsd(void)
854 /* Register the protocol as RPC */
855 rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
857 /* Register the procedure tables */
858 rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc);