2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
5 * $Id: packet-hclnfsd.c,v 1.19 2002/11/01 00:48:38 sahlberg 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.
34 #include "packet-rpc.h"
35 #include "packet-nfs.h"
36 #include "packet-hclnfsd.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_nfs_fh3(tvb, offset, pinfo, tree, "spool filehandle");
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(char *ident, int ident_len)
154 for (x = -1, j = 0; j < ident_len; j++)
165 dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
167 guint32 request_type;
169 char *username = NULL;
170 char *password = NULL;
173 proto_item *ident_item = NULL;
174 proto_tree *ident_tree = NULL;
176 proto_tree_add_item(tree, hf_hclnfsd_server_ip, tvb, offset, 4, FALSE);
179 request_type = tvb_get_ntohl(tvb, offset);
181 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
185 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_device, offset,
190 ident_item = proto_tree_add_text(tree, tvb, offset, -1,
191 "Authentication Ident");
195 ident_tree = proto_item_add_subtree(ident_item,
196 ett_hclnfsd_auth_ident);
200 newoffset = dissect_rpc_string(tvb, ident_tree,
201 hf_hclnfsd_auth_ident_obscure, offset, &ident);
205 ident_len = strlen(ident);
207 proto_item_set_len(ident_item, ident_len);
209 hclnfsd_decode_obscure(ident, ident_len);
211 username = ident + 2;
212 password = username + strlen(username) + 1;
214 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
215 "Username: %s", username);
217 proto_tree_add_text(ident_tree, tvb, offset, ident_len,
218 "Password: %s", password);
234 dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
238 status = tvb_get_ntohl(tvb, offset);
246 proto_tree_add_uint(tree, hf_hclnfsd_status, tvb, offset, 4, status);
248 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
250 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
252 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
258 dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
260 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset, NULL);
266 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
268 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
275 dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
278 offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
285 dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
287 return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset,
293 dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
295 proto_tree_add_item(tree, hf_hclnfsd_host_ip, tvb, offset, 4, FALSE);
303 dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
305 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_hostname, offset, NULL);
312 dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
314 guint32 nuids, nuids_i;
315 proto_tree *uidtree = NULL;
316 proto_item *uiditem = NULL;
318 nuids = tvb_get_ntohl(tvb, offset);
321 uiditem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
325 uidtree = proto_item_add_subtree(uiditem, ett_hclnfsd_uids);
332 for (nuids_i = 0; nuids_i < nuids; nuids_i++)
333 offset = dissect_rpc_uint32(tvb, uidtree, hf_hclnfsd_uid, offset);
340 dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
342 guint32 nusers, nusers_i;
343 proto_tree *usertree = NULL;
344 proto_item *useritem = NULL;
346 nusers = tvb_get_ntohl(tvb, offset);
349 useritem = proto_tree_add_text(tree, tvb, offset, 4, "UIDs: %d",
353 usertree = proto_item_add_subtree(useritem, ett_hclnfsd_usernames);
360 for (nusers_i = 0; nusers_i < nusers; nusers_i++)
361 offset = dissect_rpc_string(tvb, usertree,
362 hf_hclnfsd_username, offset, NULL);
369 dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
371 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
378 dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
380 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
387 dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
389 guint32 request_type;
391 request_type = tvb_get_ntohl(tvb, offset);
393 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
397 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
399 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
401 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
403 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
405 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_mode, offset);
407 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_access, offset);
409 offset += 4; /* skip last 4 UNUSED bytes */
416 dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
418 guint32 request_type;
420 request_type = tvb_get_ntohl(tvb, offset);
422 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
426 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
427 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
428 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_sequence, offset);
435 dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
437 return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree);
442 dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
444 return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree);
449 dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
451 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
452 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
453 offset += 4; /* skip unused uint */
455 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_exclusive, offset);
457 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
459 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
461 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_lockowner, offset);
463 offset += 4; /* unused, skip */
465 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
467 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
474 dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
478 request_type = tvb_get_ntohl(tvb, offset);
480 proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
484 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
485 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
492 dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
494 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
496 offset += 4; /* skip unused */
503 dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
505 offset += 4; /* skip unused */
507 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
509 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
511 offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle");
513 offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
515 offset += 4; /* skip unused */
517 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_offset, offset);
518 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_length, offset);
525 dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
527 return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree);
532 dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
534 guint nqueues, nqueues_i;
535 proto_item *queuesitem = NULL;
536 proto_tree *queuestree = NULL;
538 nqueues = tvb_get_ntohl(tvb, offset);
541 queuesitem = proto_tree_add_text(tree, tvb, offset, 4,
542 "Print Queues: %d", nqueues);
545 queuestree = proto_item_add_subtree(queuesitem,
546 ett_hclnfsd_printqueues);
553 for (nqueues_i = 0; nqueues_i < nqueues; nqueues_i++)
555 /* create new item for print queue */
556 offset = dissect_rpc_string(tvb, tree,
557 hf_hclnfsd_queuename, offset, NULL);
559 /* create subtree on new item with print queue comment */
560 offset = dissect_rpc_string(tvb, tree,
561 hf_hclnfsd_queuecomment, offset, NULL);
569 dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
571 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuename, offset, NULL);
573 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
580 dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
582 guint datafollows, jobid;
583 proto_item *queueitem = NULL;
584 proto_tree *queuetree = NULL;
588 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_printqueuenumber, offset);
590 offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuecomment, offset, NULL);
592 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_queuestatus, offset);
594 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_numphysicalprinters, offset);
596 datafollows = tvb_get_ntohl(tvb, offset);
599 queueitem = proto_tree_add_text(tree, tvb, offset, 4,
600 "Print Jobs: %d", datafollows);
602 queuetree = proto_item_add_subtree(queueitem, ett_hclnfsd_printqueues);
611 jobid = tvb_get_ntohl(tvb, offset);
612 jobitem = proto_tree_add_text(queuetree, tvb, offset, 4, "Job ID: %d",
616 jobtree = proto_item_add_subtree(jobitem, ett_hclnfsd_printjob);
618 offset = dissect_rpc_string(tvb, tree,
619 hf_hclnfsd_username, offset, NULL);
621 offset = dissect_rpc_string(tvb, tree,
622 hf_hclnfsd_printparams, offset, NULL);
624 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_queuestatus, offset);
626 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_jobstatus, offset);
627 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_timesubmitted, offset);
628 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_size, offset);
629 offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_copies, offset);
630 offset = dissect_rpc_string(tvb, tree,
631 hf_hclnfsd_queuecomment, offset, NULL);
633 datafollows = tvb_get_ntohl(tvb, offset);
641 /* proc number, "proc name", dissect_request, dissect_reply */
642 /* NULL as function pointer means: take the generic one. */
644 static const vsff hclnfsd1_proc[] = {
645 { HCLNFSDPROC_NULL, "NULL",
647 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE",
648 dissect_hclnfsd_spool_inquire_call, NULL },
649 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE",
650 dissect_hclnfsd_spool_file_call, NULL },
651 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE",
652 dissect_hclnfsd_authorize_call, dissect_hclnfsd_authorize_reply },
653 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB",
654 dissect_hclnfsd_grp_name_to_numb_call, dissect_hclnfsd_grp_name_to_numb_reply },
655 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER",
656 dissect_hclnfsd_grp_to_number_call, dissect_hclnfsd_grp_to_number_reply },
657 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST",
658 dissect_hclnfsd_return_host_call, dissect_hclnfsd_return_host_reply },
659 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME",
660 dissect_hclnfsd_uid_to_name_call, dissect_hclnfsd_uid_to_name_reply },
661 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID",
662 dissect_hclnfsd_name_to_uid_call, dissect_hclnfsd_name_to_uid_reply },
663 { HCLNFSDPROC_SHARE, "SHARE",
664 dissect_hclnfsd_share_call, dissect_hclnfsd_share_reply },
665 { HCLNFSDPROC_UNSHARE, "UNSHARE",
666 dissect_hclnfsd_unshare_call, dissect_hclnfsd_unshare_reply },
667 { HCLNFSDPROC_LOCK, "LOCK",
668 dissect_hclnfsd_lock_call, dissect_hclnfsd_lock_reply },
669 { HCLNFSDPROC_REMOVE, "REMOVE",
670 dissect_hclnfsd_remove_call, NULL },
671 { HCLNFSDPROC_UNLOCK, "UNLOCK",
672 dissect_hclnfsd_unlock_call, dissect_hclnfsd_unlock_reply },
673 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS",
674 NULL, dissect_hclnfsd_get_printers_reply },
675 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ",
676 dissect_hclnfsd_get_printq_call, dissect_hclnfsd_get_printq_reply },
677 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB",
679 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS",
681 { 0, NULL, NULL, NULL }
683 static const value_string hclnfsd1_proc_vals[] = {
684 { HCLNFSDPROC_NULL, "NULL" },
685 { HCLNFSDPROC_SPOOL_INQUIRE, "SPOOL_INQUIRE" },
686 { HCLNFSDPROC_SPOOL_FILE, "SPOOL_FILE" },
687 { HCLNFSDPROC_AUTHORIZE, "AUTHORIZE" },
688 { HCLNFSDPROC_GRP_NAME_TO_NUMB, "GRP_NAME_TO_NUMB" },
689 { HCLNFSDPROC_GRP_TO_NUMBER, "GRP_TO_NUMBER" },
690 { HCLNFSDPROC_RETURN_HOST, "RETURN_HOST" },
691 { HCLNFSDPROC_UID_TO_NAME, "UID_TO_NAME" },
692 { HCLNFSDPROC_NAME_TO_UID, "NAME_TO_UID" },
693 { HCLNFSDPROC_SHARE, "SHARE" },
694 { HCLNFSDPROC_UNSHARE, "UNSHARE" },
695 { HCLNFSDPROC_LOCK, "LOCK" },
696 { HCLNFSDPROC_REMOVE, "REMOVE" },
697 { HCLNFSDPROC_UNLOCK, "UNLOCK" },
698 { HCLNFSDPROC_GET_PRINTERS, "GET_PRINTERS" },
699 { HCLNFSDPROC_GET_PRINTQ, "GET_PRINTQ" },
700 { HCLNFSDPROC_CANCEL_PRJOB, "CANCEL_PRJOB" },
701 { HCLNFSDPROC_ZAP_LOCKS, "ZAP_LOCKS" },
704 /* end of hclnfsd version 1 */
708 proto_register_hclnfsd(void)
710 static hf_register_info hf[] = {
711 { &hf_hclnfsd_procedure_v1, {
712 "V1 Procedure", "hclnfsd.procedure_v1", FT_UINT32, BASE_DEC,
713 VALS(hclnfsd1_proc_vals), 0, "V1 Procedure", HFILL }},
714 { &hf_hclnfsd_request_type, {
715 "Request Type", "hclnfsd.request_type", FT_UINT32, BASE_DEC,
716 VALS(names_request_type), 0, "Request Type", HFILL }},
718 { &hf_hclnfsd_device, {
719 "Device", "hclnfsd.device", FT_STRING, BASE_DEC,
720 NULL, 0, "Device", HFILL }},
722 { &hf_hclnfsd_login, {
723 "Login Text", "hclnfsd.logintext", FT_STRING, BASE_DEC,
724 NULL, 0, "Login Text", HFILL }},
726 { &hf_hclnfsd_lockname, {
727 "Lockname", "hclnfsd.lockname", FT_STRING, BASE_DEC,
728 NULL, 0, "Lockname", HFILL }},
730 { &hf_hclnfsd_unknown_data, {
731 "Unknown", "hclnfsd.unknown_data", FT_BYTES, BASE_DEC,
732 NULL, 0, "Data", HFILL }},
734 { &hf_hclnfsd_lockowner, {
735 "Lockowner", "hclnfsd.lockowner", FT_BYTES, BASE_DEC,
736 NULL, 0, "Lockowner", HFILL }},
738 { &hf_hclnfsd_printername, {
739 "Printer Name", "hclnfsd.printername", FT_STRING, BASE_DEC,
740 NULL, 0, "Printer name", HFILL }},
742 { &hf_hclnfsd_filename, {
743 "Filename", "hclnfsd.filename", FT_STRING, BASE_DEC,
744 NULL, 0, "Filename", HFILL }},
746 { &hf_hclnfsd_fileext, {
747 "File Extension", "hclnfsd.fileext", FT_UINT32, BASE_DEC,
748 NULL, 0, "File Extension", HFILL }},
750 { &hf_hclnfsd_grpname, {
751 "Group", "hclnfsd.group", FT_STRING, BASE_DEC,
752 NULL, 0, "Group", HFILL }},
754 { &hf_hclnfsd_hostname, {
755 "Hostname", "hclnfsd.hostname", FT_STRING, BASE_DEC,
756 NULL, 0, "Hostname", HFILL }},
758 { &hf_hclnfsd_username, {
759 "Username", "hclnfsd.username", FT_STRING, BASE_DEC,
760 NULL, 0, "Username", HFILL }},
762 { &hf_hclnfsd_queuename, {
763 "Name", "hclnfsd.printqueuename", FT_STRING, BASE_DEC,
764 NULL, 0, "Print Queue Name", HFILL }},
766 { &hf_hclnfsd_queuecomment, {
767 "Comment", "hclnfsd.printqueuecomment", FT_STRING, BASE_DEC,
768 NULL, 0, "Print Queue Comment", HFILL }},
770 { &hf_hclnfsd_printparams, {
771 "Print Parameters", "hclnfsd.printparameters", FT_STRING, BASE_DEC,
772 NULL, 0, "Print Parameters", HFILL }},
774 { &hf_hclnfsd_status, {
775 "Status", "hclnfsd.status", FT_UINT32, BASE_DEC,
776 NULL, 0, "Status", HFILL }},
779 "UID", "hclnfsd.uid", FT_UINT32, BASE_DEC,
780 NULL, 0, "User ID", HFILL }},
782 { &hf_hclnfsd_sequence, {
783 "Sequence", "hclnfsd.sequence", FT_UINT32, BASE_HEX,
784 NULL, 0, "Sequence", HFILL }},
786 { &hf_hclnfsd_cookie, {
787 "Cookie", "hclnfsd.cookie", FT_UINT32, BASE_HEX,
788 NULL, 0, "Cookie", HFILL }},
790 { &hf_hclnfsd_mode, {
791 "Mode", "hclnfsd.mode", FT_UINT32, BASE_DEC,
792 NULL, 0, "Mode", HFILL }},
794 { &hf_hclnfsd_access, {
795 "Access", "hclnfsd.access", FT_UINT32, BASE_DEC,
796 NULL, 0, "Access", HFILL }},
798 { &hf_hclnfsd_exclusive, {
799 "Exclusive", "hclnfsd.exclusive", FT_UINT32, BASE_DEC,
800 NULL, 0, "Exclusive", HFILL }},
802 { &hf_hclnfsd_offset, {
803 "Offset", "hclnfsd.offset", FT_UINT32, BASE_DEC,
804 NULL, 0, "Offset", HFILL }},
806 { &hf_hclnfsd_length, {
807 "Length", "hclnfsd.length", FT_UINT32, BASE_DEC,
808 NULL, 0, "Length", HFILL }},
810 { &hf_hclnfsd_queuestatus, {
811 "Queue Status", "hclnfsd.queuestatus", FT_UINT32, BASE_DEC,
812 NULL, 0, "Queue Status", HFILL }},
814 { &hf_hclnfsd_printqueuenumber, {
815 "Print Queue Number", "hclnfsd.pqn", FT_UINT32, BASE_DEC,
816 NULL, 0, "Print Queue Number", HFILL }},
818 { &hf_hclnfsd_numphysicalprinters, {
819 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32, BASE_DEC,
820 NULL, 0, "Number of Physical Printers", HFILL }},
822 { &hf_hclnfsd_jobstatus, {
823 "Job Status", "hclnfsd.jobstatus", FT_UINT32, BASE_DEC,
824 NULL, 0, "Job Status", HFILL }},
826 { &hf_hclnfsd_timesubmitted, {
827 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32, BASE_DEC,
828 NULL, 0, "Time Submitted", HFILL }},
830 { &hf_hclnfsd_size, {
831 "Size", "hclnfsd.size", FT_UINT32, BASE_DEC,
832 NULL, 0, "Size", HFILL }},
834 { &hf_hclnfsd_copies, {
835 "Copies", "hclnfsd.copies", FT_UINT32, BASE_DEC,
836 NULL, 0, "Copies", HFILL }},
839 "GID", "hclnfsd.gid", FT_UINT32, BASE_DEC,
840 NULL, 0, "Group ID", HFILL }},
842 { &hf_hclnfsd_server_ip, {
843 "Server IP", "hclnfsd.server_ip", FT_IPv4, BASE_DEC,
844 NULL, 0, "Server IP", HFILL }},
846 { &hf_hclnfsd_host_ip, {
847 "Host IP", "hclnfsd.host_ip", FT_IPv4, BASE_DEC,
848 NULL, 0, "Host IP", HFILL }},
850 { &hf_hclnfsd_auth_ident_obscure, {
851 "Obscure Ident", "hclnfsd.authorize.ident.obscure", FT_STRING,
852 BASE_DEC , NULL, 0, "Authentication Obscure Ident", HFILL }},
854 static gint *ett[] = {
859 &ett_hclnfsd_usernames,
860 &ett_hclnfsd_printqueues,
861 &ett_hclnfsd_printjob,
862 &ett_hclnfsd_auth_ident
865 proto_hclnfsd = proto_register_protocol("Hummingbird NFS Daemon",
866 "HCLNFSD", "hclnfsd");
867 proto_register_field_array(proto_hclnfsd, hf, array_length(hf));
868 proto_register_subtree_array(ett, array_length(ett));
872 proto_reg_handoff_hclnfsd(void)
874 /* Register the protocol as RPC */
875 rpc_init_prog(proto_hclnfsd, HCLNFSD_PROGRAM, ett_hclnfsd);
877 /* Register the procedure tables */
878 rpc_init_proc_table(HCLNFSD_PROGRAM, 1, hclnfsd1_proc, hf_hclnfsd_procedure_v1);