2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
5 * $Id: packet-hclnfsd.c,v 1.8 2002/01/12 10:24:46 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.
33 #ifdef HAVE_SYS_TYPES_H
34 #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;
79 static gint ett_hclnfsd = -1;
80 static gint ett_hclnfsd_gids = -1;
81 static gint ett_hclnfsd_groups = -1;
82 static gint ett_hclnfsd_uids = -1;
83 static gint ett_hclnfsd_usernames = -1;
84 static gint ett_hclnfsd_printqueues = -1;
85 static gint ett_hclnfsd_printjob = -1;
89 dissect_hclnfsd_gids(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
91 guint32 ngids, ngids_i, gid;
92 proto_tree *gidtree = NULL;
93 proto_item *giditem = NULL;
96 ngids = tvb_get_ntohl(tvb, offset);
99 giditem = proto_tree_add_text(tree, tvb, offset, 4, "GIDs: %d",
102 gidtree = proto_item_add_subtree(giditem, ett_hclnfsd_gids);
108 for (ngids_i = 0; ngids_i < ngids; ngids_i++)
110 gid = tvb_get_ntohl(tvb, offset + (4 * ngids_i));
111 proto_tree_add_text(gidtree, tvb, offset + (4 * ngids_i), 4,
121 dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
123 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_status, offset);
125 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "spool filehandle");
132 dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
134 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_printername, offset, NULL);
136 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_filename, offset, NULL);
138 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_fileext, offset);
144 static const value_string names_request_type[] = {
145 #define HCLNFSD_DISK_REQUEST 4
146 { HCLNFSD_DISK_REQUEST, "DISK" },
147 #define HCLNFSD_PRINT_REQUEST 3
148 { HCLNFSD_PRINT_REQUEST, "PRINTER" },
154 dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
156 guint32 request_type;
159 ip = tvb_get_ntohl(tvb, offset);
160 ip=((ip&0x000000ff)<<24)|((ip&0x0000ff00)<<8)|((ip&0x00ff0000)>>8)|((ip&0xff000000)>>24);
161 proto_tree_add_ipv4(tree, hf_hclnfsd_server_ip, tvb, offset, 4, ip);
164 request_type = tvb_get_ntohl(tvb, offset);
166 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
170 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_device, offset, NULL);
172 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_login, offset, NULL);
179 dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
183 status = tvb_get_ntohl(tvb, offset);
191 proto_tree_add_uint(tree, hf_hclnfsd_status, tvb, offset, 4, status);
193 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_uid, offset);
195 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_gid, offset);
197 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
203 dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
205 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_grpname, offset, NULL);
211 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
213 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_gid, offset);
220 dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
223 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
230 dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
232 guint32 ngrpnames, ngrpnames_i;
233 proto_tree *grptree = NULL;
234 proto_item *grpitem = NULL;
236 ngrpnames = tvb_get_ntohl(tvb, offset);
239 grpitem = proto_tree_add_text(tree, tvb, offset, 4, "Groups: %d",
243 grptree = proto_item_add_subtree(grpitem, ett_hclnfsd_groups);
250 for (ngrpnames_i = 0; ngrpnames_i < ngrpnames ; ngrpnames_i++)
251 offset = dissect_rpc_string(tvb, pinfo, grptree,
252 hf_hclnfsd_grpname, offset, NULL);
259 dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
263 ip = tvb_get_ntohl(tvb, offset);
264 ip=((ip&0x000000ff)<<24)|((ip&0x0000ff00)<<8)|((ip&0x00ff0000)>>8)|((ip&0xff000000)>>24);
265 proto_tree_add_ipv4(tree, hf_hclnfsd_host_ip, tvb, offset, 4, ip);
273 dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
275 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_hostname, offset, NULL);
282 dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
284 guint32 nuids, nuids_i;
285 proto_tree *uidtree = NULL;
286 proto_item *uiditem = NULL;
288 nuids = tvb_get_ntohl(tvb, offset);
291 uiditem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
295 uidtree = proto_item_add_subtree(uiditem, ett_hclnfsd_uids);
302 for (nuids_i = 0; nuids_i < nuids; nuids_i++)
303 offset = dissect_rpc_uint32(tvb, pinfo, uidtree, hf_hclnfsd_uid, offset);
310 dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
312 guint32 nusers, nusers_i;
313 proto_tree *usertree = NULL;
314 proto_item *useritem = NULL;
316 nusers = tvb_get_ntohl(tvb, offset);
319 useritem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
323 usertree = proto_item_add_subtree(useritem, ett_hclnfsd_usernames);
330 for (nusers_i = 0; nusers_i < nusers; nusers_i++)
331 offset = dissect_rpc_string(tvb, pinfo, usertree,
332 hf_hclnfsd_username, offset, NULL);
339 dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
341 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_username, offset, NULL);
348 dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
350 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_uid, offset);
357 dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
359 guint32 request_type;
361 request_type = tvb_get_ntohl(tvb, offset);
363 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
367 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
369 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
371 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
373 offset = dissect_rpc_data(tvb, pinfo, tree, hf_hclnfsd_unknown_data, offset);
375 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_mode, offset);
377 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_access, offset);
379 offset += 4; /* skip last 4 UNUSED bytes */
386 dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
388 guint32 request_type;
390 request_type = tvb_get_ntohl(tvb, offset);
392 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
396 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
397 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_status, offset);
398 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_sequence, offset);
405 dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
407 return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree);
412 dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
414 return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree);
419 dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
421 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_status, offset);
422 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
423 offset += 4; /* skip unused uint */
425 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_exclusive, offset);
427 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
429 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
431 offset = dissect_rpc_data(tvb, pinfo, tree, hf_hclnfsd_lockowner, offset);
433 offset += 4; /* unused, skip */
435 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_offset, offset);
437 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_length, offset);
444 dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
448 request_type = tvb_get_ntohl(tvb, offset);
450 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
454 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
455 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_status, offset);
462 dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
464 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
466 offset += 4; /* skip unused */
473 dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
475 offset += 4; /* skip unused */
477 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
479 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
481 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
483 offset = dissect_rpc_data(tvb, pinfo, tree, hf_hclnfsd_unknown_data, offset);
485 offset += 4; /* skip unused */
487 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_offset, offset);
488 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_length, offset);
495 dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
497 return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree);
502 dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
504 guint nqueues, nqueues_i;
505 proto_item *queuesitem = NULL;
506 proto_tree *queuestree = NULL;
508 nqueues = tvb_get_ntohl(tvb, offset);
511 queuesitem = proto_tree_add_text(tree, tvb, offset, 4,
512 "Print Queues: %d", nqueues);
515 queuestree = proto_item_add_subtree(queuesitem,
516 ett_hclnfsd_printqueues);
523 for (nqueues_i = 0; nqueues_i < nqueues; nqueues_i++)
525 /* create new item for print queue */
526 offset = dissect_rpc_string(tvb, pinfo, tree,
527 hf_hclnfsd_queuename, offset, NULL);
529 /* create subtree on new item with print queue comment */
530 offset = dissect_rpc_string(tvb, pinfo, tree,
531 hf_hclnfsd_queuecomment, offset, NULL);
539 dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
541 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_queuename, offset, NULL);
543 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_username, offset, NULL);
550 dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
552 guint datafollows, jobid;
553 proto_item *queueitem = NULL;
554 proto_tree *queuetree = NULL;
558 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_printqueuenumber, offset);
560 offset = dissect_rpc_string(tvb, pinfo, tree, hf_hclnfsd_queuecomment, offset, NULL);
562 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_queuestatus, offset);
564 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_numphysicalprinters, offset);
566 datafollows = tvb_get_ntohl(tvb, offset);
569 queueitem = proto_tree_add_text(tree, tvb, offset, 4,
570 "Print Jobs: %d", datafollows);
572 queuetree = proto_item_add_subtree(queueitem, ett_hclnfsd_printqueues);
581 jobid = tvb_get_ntohl(tvb, offset);
582 jobitem = proto_tree_add_text(queuetree, tvb, offset, 4, "Job ID: %d",
586 jobtree = proto_item_add_subtree(jobitem, ett_hclnfsd_printjob);
588 offset = dissect_rpc_string(tvb, pinfo, tree,
589 hf_hclnfsd_username, offset, NULL);
591 offset = dissect_rpc_string(tvb, pinfo, tree,
592 hf_hclnfsd_printparams, offset, NULL);
594 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_queuestatus, offset);
596 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_jobstatus, offset);
597 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_timesubmitted, offset);
598 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_size, offset);
599 offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_hclnfsd_copies, offset);
600 offset = dissect_rpc_string(tvb, pinfo, tree,
601 hf_hclnfsd_queuecomment, offset, NULL);
603 datafollows = tvb_get_ntohl(tvb, offset);
611 /* proc number, "proc name", dissect_request, dissect_reply */
612 /* NULL as function pointer means: take the generic one. */
614 static const vsff hclnfsd1_proc[] = {
615 { HCLNFSDPROC_NULL, "NULL",
617 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE",
618 dissect_hclnfsd_spool_inquire_call, NULL },
619 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE",
620 dissect_hclnfsd_spool_file_call, NULL },
621 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE",
622 dissect_hclnfsd_authorize_call, dissect_hclnfsd_authorize_reply },
623 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB",
624 dissect_hclnfsd_grp_name_to_numb_call, dissect_hclnfsd_grp_name_to_numb_reply },
625 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER",
626 dissect_hclnfsd_grp_to_number_call, dissect_hclnfsd_grp_to_number_reply },
627 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST",
628 dissect_hclnfsd_return_host_call, dissect_hclnfsd_return_host_reply },
629 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME",
630 dissect_hclnfsd_uid_to_name_call, dissect_hclnfsd_uid_to_name_reply },
631 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID",
632 dissect_hclnfsd_name_to_uid_call, dissect_hclnfsd_name_to_uid_reply },
633 { HCLNFSDPROC_SHARE, "SHARE",
634 dissect_hclnfsd_share_call, dissect_hclnfsd_share_reply },
635 { HCLNFSDPROC_UNSHARE, "UNSHARE",
636 dissect_hclnfsd_unshare_call, dissect_hclnfsd_unshare_reply },
637 { HCLNFSDPROC_LOCK, "LOCK",
638 dissect_hclnfsd_lock_call, dissect_hclnfsd_lock_reply },
639 { HCLNFSDPROC_REMOVE, "REMOVE",
640 dissect_hclnfsd_remove_call, NULL },
641 { HCLNFSDPROC_UNLOCK, "UNLOCK",
642 dissect_hclnfsd_unlock_call, dissect_hclnfsd_unlock_reply },
643 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS",
644 NULL, dissect_hclnfsd_get_printers_reply },
645 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ",
646 dissect_hclnfsd_get_printq_call, dissect_hclnfsd_get_printq_reply },
647 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB",
649 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS",
651 { 0, NULL, NULL, NULL }
653 /* end of hclnfsd version 1 */
657 proto_register_hclnfsd(void)
660 static struct true_false_string okfailed = { "Ok", "Failed" };
661 static struct true_false_string yesno = { "Yes", "No" };
664 static hf_register_info hf[] = {
665 { &hf_hclnfsd_request_type, {
666 "Request Type", "hclnfsd.request_type", FT_UINT32, BASE_DEC,
667 VALS(names_request_type), 0, "Request Type", HFILL }},
669 { &hf_hclnfsd_device, {
670 "Device", "hclnfsd.device", FT_STRING, BASE_DEC,
671 NULL, 0, "Device", HFILL }},
673 { &hf_hclnfsd_login, {
674 "Login Text", "hclnfsd.logintext", FT_STRING, BASE_DEC,
675 NULL, 0, "Login Text", HFILL }},
677 { &hf_hclnfsd_lockname, {
678 "Lockname", "hclnfsd.lockname", FT_STRING, BASE_DEC,
679 NULL, 0, "Lockname", HFILL }},
681 { &hf_hclnfsd_unknown_data, {
682 "Unknown", "hclnfsd.unknown_data", FT_BYTES, BASE_DEC,
683 NULL, 0, "Data", HFILL }},
685 { &hf_hclnfsd_lockowner, {
686 "Lockowner", "hclnfsd.lockowner", FT_BYTES, BASE_DEC,
687 NULL, 0, "Lockowner", HFILL }},
689 { &hf_hclnfsd_printername, {
690 "Printer Name", "hclnfsd.printername", FT_STRING, BASE_DEC,
691 NULL, 0, "Printer name", HFILL }},
693 { &hf_hclnfsd_filename, {
694 "Filename", "hclnfsd.filename", FT_STRING, BASE_DEC,
695 NULL, 0, "Filename", HFILL }},
697 { &hf_hclnfsd_fileext, {
698 "File Extension", "hclnfsd.fileext", FT_UINT32, BASE_DEC,
699 NULL, 0, "File Extension", HFILL }},
701 { &hf_hclnfsd_grpname, {
702 "Group", "hclnfsd.group", FT_STRING, BASE_DEC,
703 NULL, 0, "Group", HFILL }},
705 { &hf_hclnfsd_hostname, {
706 "Hostname", "hclnfsd.hostname", FT_STRING, BASE_DEC,
707 NULL, 0, "Hostname", HFILL }},
709 { &hf_hclnfsd_username, {
710 "Username", "hclnfsd.username", FT_STRING, BASE_DEC,
711 NULL, 0, "Username", HFILL }},
713 { &hf_hclnfsd_queuename, {
714 "Name", "hclnfsd.printqueuename", FT_STRING, BASE_DEC,
715 NULL, 0, "Print Queue Name", HFILL }},
717 { &hf_hclnfsd_queuecomment, {
718 "Comment", "hclnfsd.printqueuecomment", FT_STRING, BASE_DEC,
719 NULL, 0, "Print Queue Comment", HFILL }},
721 { &hf_hclnfsd_printparams, {
722 "Print Parameters", "hclnfsd.printparameters", FT_STRING, BASE_DEC,
723 NULL, 0, "Print Parameters", HFILL }},
725 { &hf_hclnfsd_status, {
726 "Status", "hclnfsd.status", FT_UINT32, BASE_DEC,
727 NULL, 0, "Status", HFILL }},
730 "UID", "hclnfsd.uid", FT_UINT32, BASE_DEC,
731 NULL, 0, "User ID", HFILL }},
733 { &hf_hclnfsd_sequence, {
734 "Sequence", "hclnfsd.sequence", FT_UINT32, BASE_HEX,
735 NULL, 0, "Sequence", HFILL }},
737 { &hf_hclnfsd_cookie, {
738 "Cookie", "hclnfsd.cookie", FT_UINT32, BASE_HEX,
739 NULL, 0, "Cookie", HFILL }},
741 { &hf_hclnfsd_mode, {
742 "Mode", "hclnfsd.mode", FT_UINT32, BASE_DEC,
743 NULL, 0, "Mode", HFILL }},
745 { &hf_hclnfsd_access, {
746 "Access", "hclnfsd.access", FT_UINT32, BASE_DEC,
747 NULL, 0, "Access", HFILL }},
749 { &hf_hclnfsd_exclusive, {
750 "Exclusive", "hclnfsd.exclusive", FT_UINT32, BASE_DEC,
751 NULL, 0, "Exclusive", HFILL }},
753 { &hf_hclnfsd_offset, {
754 "Offset", "hclnfsd.offset", FT_UINT32, BASE_DEC,
755 NULL, 0, "Offset", HFILL }},
757 { &hf_hclnfsd_length, {
758 "Length", "hclnfsd.length", FT_UINT32, BASE_DEC,
759 NULL, 0, "Length", HFILL }},
761 { &hf_hclnfsd_queuestatus, {
762 "Queue Status", "hclnfsd.queuestatus", FT_UINT32, BASE_DEC,
763 NULL, 0, "Queue Status", HFILL }},
765 { &hf_hclnfsd_printqueuenumber, {
766 "Print Queue Number", "hclnfsd.pqn", FT_UINT32, BASE_DEC,
767 NULL, 0, "Print Queue Number", HFILL }},
769 { &hf_hclnfsd_numphysicalprinters, {
770 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32, BASE_DEC,
771 NULL, 0, "Number of Physical Printers", HFILL }},
773 { &hf_hclnfsd_jobstatus, {
774 "Job Status", "hclnfsd.jobstatus", FT_UINT32, BASE_DEC,
775 NULL, 0, "Job Status", HFILL }},
777 { &hf_hclnfsd_timesubmitted, {
778 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32, BASE_DEC,
779 NULL, 0, "Time Submitted", HFILL }},
781 { &hf_hclnfsd_size, {
782 "Size", "hclnfsd.size", FT_UINT32, BASE_DEC,
783 NULL, 0, "Size", HFILL }},
785 { &hf_hclnfsd_copies, {
786 "Copies", "hclnfsd.copies", FT_UINT32, BASE_DEC,
787 NULL, 0, "Copies", HFILL }},
790 "GID", "hclnfsd.gid", FT_UINT32, BASE_DEC,
791 NULL, 0, "Group ID", HFILL }},
793 { &hf_hclnfsd_server_ip, {
794 "Server IP", "hclnfsd.server_ip", FT_IPv4, BASE_DEC,
795 NULL, 0, "Server IP", HFILL }},
797 { &hf_hclnfsd_host_ip, {
798 "Host IP", "hclnfsd.host_ip", FT_IPv4, BASE_DEC,
799 NULL, 0, "Host IP", HFILL }},
801 static gint *ett[] = {
806 &ett_hclnfsd_usernames,
807 &ett_hclnfsd_printqueues,
808 &ett_hclnfsd_printjob,
811 proto_hclnfsd = proto_register_protocol("Hummingbird NFS Daemon",
812 "HCLNFSD", "hclnfsd");
813 proto_register_field_array(proto_hclnfsd, hf, array_length(hf));
814 proto_register_subtree_array(ett, array_length(ett));
818 proto_reg_handoff_hclnfsd(void)
820 /* Register the protocol as RPC */
821 rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
823 /* Register the procedure tables */
824 rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc);