2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
5 * $Id: packet-hclnfsd.c,v 1.5 2001/05/23 19:29:45 guy Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.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., 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-hclnfsd.h"
41 static int proto_hclnfsd = -1;
43 static int hf_hclnfsd_request_type = -1;
44 static int hf_hclnfsd_device = -1;
45 static int hf_hclnfsd_login = -1;
46 static int hf_hclnfsd_lockname = -1;
47 static int hf_hclnfsd_unknown_data = -1;
48 static int hf_hclnfsd_lockowner = -1;
49 static int hf_hclnfsd_printername = -1;
50 static int hf_hclnfsd_filename = -1;
51 static int hf_hclnfsd_fileext = -1;
52 static int hf_hclnfsd_grpname = -1;
53 static int hf_hclnfsd_hostname = -1;
54 static int hf_hclnfsd_username = -1;
55 static int hf_hclnfsd_queuename = -1;
56 static int hf_hclnfsd_queuecomment = -1;
57 static int hf_hclnfsd_queuestatus = -1;
58 static int hf_hclnfsd_numphysicalprinters = -1;
59 static int hf_hclnfsd_printqueuenumber = -1;
60 static int hf_hclnfsd_printparams = -1;
61 static int hf_hclnfsd_status = -1;
62 static int hf_hclnfsd_sequence = -1;
63 static int hf_hclnfsd_server_ip = -1;
64 static int hf_hclnfsd_host_ip = -1;
65 static int hf_hclnfsd_gid = -1;
66 static int hf_hclnfsd_uid = -1;
67 static int hf_hclnfsd_cookie = -1;
68 static int hf_hclnfsd_mode = -1;
69 static int hf_hclnfsd_access = -1;
70 static int hf_hclnfsd_exclusive = -1;
71 static int hf_hclnfsd_offset = -1;
72 static int hf_hclnfsd_length = -1;
73 static int hf_hclnfsd_jobstatus = -1;
74 static int hf_hclnfsd_timesubmitted = -1;
75 static int hf_hclnfsd_size = -1;
76 static int hf_hclnfsd_copies = -1;
78 static gint ett_hclnfsd = -1;
79 static gint ett_hclnfsd_gids = -1;
80 static gint ett_hclnfsd_groups = -1;
81 static gint ett_hclnfsd_uids = -1;
82 static gint ett_hclnfsd_usernames = -1;
83 static gint ett_hclnfsd_printqueues = -1;
84 static gint ett_hclnfsd_printjob = -1;
87 /* defined in 'packet-nfs.c' */
89 dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *name);
93 dissect_hclnfsd_gids(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
95 guint32 ngids, ngids_i, gid;
96 proto_tree *gidtree = NULL;
97 proto_item *giditem = NULL;
100 ngids = tvb_get_ntohl(tvb, offset);
103 giditem = proto_tree_add_text(tree, tvb, offset, 4, "GIDs: %d",
106 gidtree = proto_item_add_subtree(giditem, ett_hclnfsd_gids);
112 for (ngids_i = 0; ngids_i < ngids; ngids_i++)
114 gid = tvb_get_ntohl(tvb, offset + (4 * ngids_i));
115 proto_tree_add_text(gidtree, tvb, offset + (4 * ngids_i), 4,
125 dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
127 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_status, offset);
129 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "spool filehandle");
136 dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
138 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_printername, offset, NULL);
140 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_filename, offset, NULL);
142 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_fileext, offset);
148 static const value_string names_request_type[] = {
149 #define HCLNFSD_DISK_REQUEST 4
150 { HCLNFSD_DISK_REQUEST, "DISK" },
151 #define HCLNFSD_PRINT_REQUEST 3
152 { HCLNFSD_PRINT_REQUEST, "PRINTER" },
158 dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
160 guint32 request_type;
163 ip = tvb_get_ntohl(tvb, offset);
164 ip=((ip&0x000000ff)<<24)|((ip&0x0000ff00)<<8)|((ip&0x00ff0000)>>8)|((ip&0xff000000)>>24);
165 proto_tree_add_ipv4(tree, hf_hclnfsd_server_ip, tvb, offset, 4, ip);
168 request_type = tvb_get_ntohl(tvb, offset);
170 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
174 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_device, offset, NULL);
176 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_login, offset, NULL);
183 dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
187 status = tvb_get_ntohl(tvb, offset);
195 proto_tree_add_uint(tree, hf_hclnfsd_status, tvb, offset, 4, status);
197 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_uid, offset);
199 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_gid, offset);
201 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
207 dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
209 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_grpname, offset, NULL);
215 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
217 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_gid, offset);
224 dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
227 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
234 dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
236 guint32 ngrpnames, ngrpnames_i;
237 proto_tree *grptree = NULL;
238 proto_item *grpitem = NULL;
240 ngrpnames = tvb_get_ntohl(tvb, offset);
243 grpitem = proto_tree_add_text(tree, tvb, offset, 4, "Groups: %d",
247 grptree = proto_item_add_subtree(grpitem, ett_hclnfsd_groups);
254 for (ngrpnames_i = 0; ngrpnames_i < ngrpnames ; ngrpnames_i++)
255 offset = dissect_rpc_string_tvb(tvb, pinfo, grptree,
256 hf_hclnfsd_grpname, offset, NULL);
263 dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
267 ip = tvb_get_ntohl(tvb, offset);
268 ip=((ip&0x000000ff)<<24)|((ip&0x0000ff00)<<8)|((ip&0x00ff0000)>>8)|((ip&0xff000000)>>24);
269 proto_tree_add_ipv4(tree, hf_hclnfsd_host_ip, tvb, offset, 4, ip);
277 dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
279 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_hostname, offset, NULL);
286 dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
288 guint32 nuids, nuids_i;
289 proto_tree *uidtree = NULL;
290 proto_item *uiditem = NULL;
292 nuids = tvb_get_ntohl(tvb, offset);
295 uiditem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
299 uidtree = proto_item_add_subtree(uiditem, ett_hclnfsd_uids);
306 for (nuids_i = 0; nuids_i < nuids; nuids_i++)
307 offset = dissect_rpc_uint32_tvb(tvb, pinfo, uidtree, hf_hclnfsd_uid, offset);
314 dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
316 guint32 nusers, nusers_i;
317 proto_tree *usertree = NULL;
318 proto_item *useritem = NULL;
320 nusers = tvb_get_ntohl(tvb, offset);
323 useritem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
327 usertree = proto_item_add_subtree(useritem, ett_hclnfsd_usernames);
334 for (nusers_i = 0; nusers_i < nusers; nusers_i++)
335 offset = dissect_rpc_string_tvb(tvb, pinfo, usertree,
336 hf_hclnfsd_username, offset, NULL);
343 dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
345 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_username, offset, NULL);
352 dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
354 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_uid, offset);
361 dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
363 guint32 request_type;
365 request_type = tvb_get_ntohl(tvb, offset);
367 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
371 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
373 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
375 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
377 offset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_hclnfsd_unknown_data, offset);
379 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_mode, offset);
381 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_access, offset);
383 offset += 4; /* skip last 4 UNUSED bytes */
390 dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
392 guint32 request_type;
394 request_type = tvb_get_ntohl(tvb, offset);
396 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
400 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
401 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_status, offset);
402 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_sequence, offset);
409 dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
411 return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree);
416 dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
418 return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree);
423 dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
425 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_status, offset);
426 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
427 offset += 4; /* skip unused uint */
429 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_exclusive, offset);
431 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
433 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
435 offset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_hclnfsd_lockowner, offset);
437 offset += 4; /* unused, skip */
439 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_offset, offset);
441 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_length, offset);
448 dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
452 request_type = tvb_get_ntohl(tvb, offset);
454 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
458 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
459 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_status, offset);
466 dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
468 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
470 offset += 4; /* skip unused */
477 dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
479 offset += 4; /* skip unused */
481 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_cookie, offset);
483 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_lockname, offset, NULL);
485 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
487 offset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_hclnfsd_unknown_data, offset);
489 offset += 4; /* skip unused */
491 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_offset, offset);
492 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_length, offset);
499 dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
501 return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree);
506 dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
508 guint nqueues, nqueues_i;
509 proto_item *queuesitem = NULL;
510 proto_tree *queuestree = NULL;
512 nqueues = tvb_get_ntohl(tvb, offset);
515 queuesitem = proto_tree_add_text(tree, tvb, offset, 4,
516 "Print Queues: %d", nqueues);
519 queuestree = proto_item_add_subtree(queuesitem,
520 ett_hclnfsd_printqueues);
527 for (nqueues_i = 0; nqueues_i < nqueues; nqueues_i++)
529 /* create new item for print queue */
530 offset = dissect_rpc_string_tvb(tvb, pinfo, tree,
531 hf_hclnfsd_queuename, offset, NULL);
533 /* create subtree on new item with print queue comment */
534 offset = dissect_rpc_string_tvb(tvb, pinfo, tree,
535 hf_hclnfsd_queuecomment, offset, NULL);
543 dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
545 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_queuename, offset, NULL);
547 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_username, offset, NULL);
554 dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
556 guint datafollows, jobid;
557 proto_item *queueitem = NULL;
558 proto_tree *queuetree = NULL;
562 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_printqueuenumber, offset);
564 offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf_hclnfsd_queuecomment, offset, NULL);
566 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_queuestatus, offset);
568 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_numphysicalprinters, offset);
570 datafollows = tvb_get_ntohl(tvb, offset);
573 queueitem = proto_tree_add_text(tree, tvb, offset, 4,
574 "Print Jobs: %d", datafollows);
576 queuetree = proto_item_add_subtree(queueitem, ett_hclnfsd_printqueues);
585 jobid = tvb_get_ntohl(tvb, offset);
586 jobitem = proto_tree_add_text(queuetree, tvb, offset, 4, "Job ID: %d",
590 jobtree = proto_item_add_subtree(jobitem, ett_hclnfsd_printjob);
592 offset = dissect_rpc_string_tvb(tvb, pinfo, tree,
593 hf_hclnfsd_username, offset, NULL);
595 offset = dissect_rpc_string_tvb(tvb, pinfo, tree,
596 hf_hclnfsd_printparams, offset, NULL);
598 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_queuestatus, offset);
600 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_jobstatus, offset);
601 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_timesubmitted, offset);
602 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_size, offset);
603 offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_hclnfsd_copies, offset);
604 offset = dissect_rpc_string_tvb(tvb, pinfo, tree,
605 hf_hclnfsd_queuecomment, offset, NULL);
607 datafollows = tvb_get_ntohl(tvb, offset);
615 /* proc number, "proc name", dissect_request, dissect_reply */
616 /* NULL as function pointer means: take the generic one. */
618 static const vsff hclnfsd1_proc[] = {
619 { HCLNFSDPROC_NULL, "NULL",
621 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE",
622 dissect_hclnfsd_spool_inquire_call, NULL },
623 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE",
624 dissect_hclnfsd_spool_file_call, NULL },
625 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE",
626 dissect_hclnfsd_authorize_call, dissect_hclnfsd_authorize_reply },
627 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB",
628 dissect_hclnfsd_grp_name_to_numb_call, dissect_hclnfsd_grp_name_to_numb_reply },
629 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER",
630 dissect_hclnfsd_grp_to_number_call, dissect_hclnfsd_grp_to_number_reply },
631 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST",
632 dissect_hclnfsd_return_host_call, dissect_hclnfsd_return_host_reply },
633 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME",
634 dissect_hclnfsd_uid_to_name_call, dissect_hclnfsd_uid_to_name_reply },
635 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID",
636 dissect_hclnfsd_name_to_uid_call, dissect_hclnfsd_name_to_uid_reply },
637 { HCLNFSDPROC_SHARE, "SHARE",
638 dissect_hclnfsd_share_call, dissect_hclnfsd_share_reply },
639 { HCLNFSDPROC_UNSHARE, "UNSHARE",
640 dissect_hclnfsd_unshare_call, dissect_hclnfsd_unshare_reply },
641 { HCLNFSDPROC_LOCK, "LOCK",
642 dissect_hclnfsd_lock_call, dissect_hclnfsd_lock_reply },
643 { HCLNFSDPROC_REMOVE, "REMOVE",
644 dissect_hclnfsd_remove_call, NULL },
645 { HCLNFSDPROC_UNLOCK, "UNLOCK",
646 dissect_hclnfsd_unlock_call, dissect_hclnfsd_unlock_reply },
647 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS",
648 NULL, dissect_hclnfsd_get_printers_reply },
649 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ",
650 dissect_hclnfsd_get_printq_call, dissect_hclnfsd_get_printq_reply },
651 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB",
653 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS",
655 { 0, NULL, NULL, NULL }
657 /* end of hclnfsd version 1 */
661 proto_register_hclnfsd(void)
664 static struct true_false_string okfailed = { "Ok", "Failed" };
665 static struct true_false_string yesno = { "Yes", "No" };
668 static hf_register_info hf[] = {
669 { &hf_hclnfsd_request_type, {
670 "Request Type", "hclnfsd.request_type", FT_UINT32, BASE_DEC,
671 VALS(names_request_type), 0, "Request Type" }},
673 { &hf_hclnfsd_device, {
674 "Device", "hclnfsd.device", FT_STRING, BASE_DEC,
675 NULL, 0, "Device" }},
677 { &hf_hclnfsd_login, {
678 "Login Text", "hclnfsd.logintext", FT_STRING, BASE_DEC,
679 NULL, 0, "Login Text" }},
681 { &hf_hclnfsd_lockname, {
682 "Lockname", "hclnfsd.lockname", FT_STRING, BASE_DEC,
683 NULL, 0, "Lockname" }},
685 { &hf_hclnfsd_unknown_data, {
686 "Unknown", "hclnfsd.unknown_data", FT_BYTES, BASE_DEC,
689 { &hf_hclnfsd_lockowner, {
690 "Lockowner", "hclnfsd.lockowner", FT_BYTES, BASE_DEC,
691 NULL, 0, "Lockowner" }},
693 { &hf_hclnfsd_printername, {
694 "Printer Name", "hclnfsd.printername", FT_STRING, BASE_DEC,
695 NULL, 0, "Printer name" }},
697 { &hf_hclnfsd_filename, {
698 "Filename", "hclnfsd.filename", FT_STRING, BASE_DEC,
699 NULL, 0, "Filename" }},
701 { &hf_hclnfsd_fileext, {
702 "File Extension", "hclnfsd.fileext", FT_UINT32, BASE_DEC,
703 NULL, 0, "File Extension" }},
705 { &hf_hclnfsd_grpname, {
706 "Group", "hclnfsd.group", FT_STRING, BASE_DEC,
709 { &hf_hclnfsd_hostname, {
710 "Hostname", "hclnfsd.hostname", FT_STRING, BASE_DEC,
711 NULL, 0, "Hostname" }},
713 { &hf_hclnfsd_username, {
714 "Username", "hclnfsd.username", FT_STRING, BASE_DEC,
715 NULL, 0, "Username" }},
717 { &hf_hclnfsd_queuename, {
718 "Name", "hclnfsd.printqueuename", FT_STRING, BASE_DEC,
719 NULL, 0, "Print Queue Name" }},
721 { &hf_hclnfsd_queuecomment, {
722 "Comment", "hclnfsd.printqueuecomment", FT_STRING, BASE_DEC,
723 NULL, 0, "Print Queue Comment" }},
725 { &hf_hclnfsd_printparams, {
726 "Print Parameters", "hclnfsd.printparameters", FT_STRING, BASE_DEC,
727 NULL, 0, "Print Parameters" }},
729 { &hf_hclnfsd_status, {
730 "Status", "hclnfsd.status", FT_UINT32, BASE_DEC,
731 NULL, 0, "Status" }},
734 "UID", "hclnfsd.uid", FT_UINT32, BASE_DEC,
735 NULL, 0, "User ID" }},
737 { &hf_hclnfsd_sequence, {
738 "Sequence", "hclnfsd.sequence", FT_UINT32, BASE_HEX,
739 NULL, 0, "Sequence" }},
741 { &hf_hclnfsd_cookie, {
742 "Cookie", "hclnfsd.cookie", FT_UINT32, BASE_HEX,
743 NULL, 0, "Cookie" }},
745 { &hf_hclnfsd_mode, {
746 "Mode", "hclnfsd.mode", FT_UINT32, BASE_DEC,
749 { &hf_hclnfsd_access, {
750 "Access", "hclnfsd.access", FT_UINT32, BASE_DEC,
751 NULL, 0, "Access" }},
753 { &hf_hclnfsd_exclusive, {
754 "Exclusive", "hclnfsd.exclusive", FT_UINT32, BASE_DEC,
755 NULL, 0, "Exclusive" }},
757 { &hf_hclnfsd_offset, {
758 "Offset", "hclnfsd.offset", FT_UINT32, BASE_DEC,
759 NULL, 0, "Offset" }},
761 { &hf_hclnfsd_length, {
762 "Length", "hclnfsd.length", FT_UINT32, BASE_DEC,
763 NULL, 0, "Length" }},
765 { &hf_hclnfsd_queuestatus, {
766 "Queue Status", "hclnfsd.queuestatus", FT_UINT32, BASE_DEC,
767 NULL, 0, "Queue Status" }},
769 { &hf_hclnfsd_printqueuenumber, {
770 "Print Queue Number", "hclnfsd.pqn", FT_UINT32, BASE_DEC,
771 NULL, 0, "Print Queue Number" }},
773 { &hf_hclnfsd_numphysicalprinters, {
774 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32, BASE_DEC,
775 NULL, 0, "Number of Physical Printers" }},
777 { &hf_hclnfsd_jobstatus, {
778 "Job Status", "hclnfsd.jobstatus", FT_UINT32, BASE_DEC,
779 NULL, 0, "Job Status" }},
781 { &hf_hclnfsd_timesubmitted, {
782 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32, BASE_DEC,
783 NULL, 0, "Time Submitted" }},
785 { &hf_hclnfsd_size, {
786 "Size", "hclnfsd.size", FT_UINT32, BASE_DEC,
789 { &hf_hclnfsd_copies, {
790 "Copies", "hclnfsd.copies", FT_UINT32, BASE_DEC,
791 NULL, 0, "Copies" }},
794 "GID", "hclnfsd.gid", FT_UINT32, BASE_DEC,
795 NULL, 0, "Group ID" }},
797 { &hf_hclnfsd_server_ip, {
798 "Server IP", "hclnfsd.server_ip", FT_IPv4, BASE_DEC,
799 NULL, 0, "Server IP" }},
801 { &hf_hclnfsd_host_ip, {
802 "Host IP", "hclnfsd.host_ip", FT_IPv4, BASE_DEC,
803 NULL, 0, "Host IP" }},
805 static gint *ett[] = {
810 &ett_hclnfsd_usernames,
811 &ett_hclnfsd_printqueues,
812 &ett_hclnfsd_printjob,
815 proto_hclnfsd = proto_register_protocol("Hummingbird NFS Daemon",
816 "HCLNFSD", "hclnfsd");
817 proto_register_field_array(proto_hclnfsd, hf, array_length(hf));
818 proto_register_subtree_array(ett, array_length(ett));
822 proto_reg_handoff_hclnfsd(void)
824 /* Register the protocol as RPC */
825 rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
827 /* Register the procedure tables */
828 rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc);