2 * Routines for hclnfsd (Hummingbird NFS Daemon) dissection
3 * Copyright 2001, Mike Frisch <frisch@hummingbird.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * Copied from packet-ypserv.c
11 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include "packet-nfs.h"
20 void proto_register_hclnfsd(void);
21 void proto_reg_handoff_hclnfsd(void);
23 #define HCLNFSD_PROGRAM 0x2f00dbad
25 #define HCLNFSDPROC_NULL 0
26 #define HCLNFSDPROC_SPOOL_INQUIRE 1
27 #define HCLNFSDPROC_SPOOL_FILE 2
28 #define HCLNFSDPROC_AUTHORIZE 3
29 #define HCLNFSDPROC_GRP_NAME_TO_NUMB 4
30 #define HCLNFSDPROC_GRP_TO_NUMBER 5
31 #define HCLNFSDPROC_RETURN_HOST 6
32 #define HCLNFSDPROC_UID_TO_NAME 7
33 #define HCLNFSDPROC_NAME_TO_UID 8
34 #define HCLNFSDPROC_SHARE 20
35 #define HCLNFSDPROC_UNSHARE 21
36 #define HCLNFSDPROC_LOCK 22
37 #define HCLNFSDPROC_REMOVE 23
38 #define HCLNFSDPROC_UNLOCK 24
39 #define HCLNFSDPROC_GET_PRINTERS 30
40 #define HCLNFSDPROC_GET_PRINTQ 31
41 #define HCLNFSDPROC_CANCEL_PRJOB 32
42 #define HCLNFSDPROC_ZAP_LOCKS 105
44 static int proto_hclnfsd
;
45 static int hf_hclnfsd_procedure_v1
;
46 static int hf_hclnfsd_request_type
;
47 static int hf_hclnfsd_device
;
48 /* static int hf_hclnfsd_login; */
49 static int hf_hclnfsd_lockname
;
50 static int hf_hclnfsd_unknown_data
;
51 static int hf_hclnfsd_lockowner
;
52 static int hf_hclnfsd_printername
;
53 static int hf_hclnfsd_filename
;
54 static int hf_hclnfsd_fileext
;
55 static int hf_hclnfsd_grpname
;
56 static int hf_hclnfsd_hostname
;
57 static int hf_hclnfsd_username
;
58 static int hf_hclnfsd_queuename
;
59 static int hf_hclnfsd_queuecomment
;
60 static int hf_hclnfsd_queuestatus
;
61 static int hf_hclnfsd_numphysicalprinters
;
62 static int hf_hclnfsd_printqueuenumber
;
63 static int hf_hclnfsd_printparams
;
64 static int hf_hclnfsd_status
;
65 static int hf_hclnfsd_sequence
;
66 static int hf_hclnfsd_server_ip
;
67 static int hf_hclnfsd_host_ip
;
68 static int hf_hclnfsd_gid
;
69 static int hf_hclnfsd_uid
;
70 static int hf_hclnfsd_cookie
;
71 static int hf_hclnfsd_mode
;
72 static int hf_hclnfsd_access
;
73 static int hf_hclnfsd_exclusive
;
74 static int hf_hclnfsd_offset
;
75 static int hf_hclnfsd_length
;
76 static int hf_hclnfsd_jobstatus
;
77 static int hf_hclnfsd_timesubmitted
;
78 static int hf_hclnfsd_size
;
79 static int hf_hclnfsd_copies
;
80 static int hf_hclnfsd_auth_ident_obscure
;
82 /* Generated from convert_proto_tree_add_text.pl */
83 static int hf_hclnfsd_job_id
;
84 static int hf_hclnfsd_print_queues
;
85 static int hf_hclnfsd_print_jobs
;
86 static int hf_hclnfsd_gids
;
87 static int hf_hclnfsd_uids
;
88 static int hf_hclnfsd_password
;
90 static int ett_hclnfsd
;
91 static int ett_hclnfsd_gids
;
92 static int ett_hclnfsd_groups
;
93 static int ett_hclnfsd_uids
;
94 static int ett_hclnfsd_usernames
;
95 static int ett_hclnfsd_printqueues
;
96 static int ett_hclnfsd_printjob
;
97 static int ett_hclnfsd_auth_ident
;
100 dissect_hclnfsd_gids(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
102 uint32_t ngids
, ngids_i
;
103 proto_tree
*gidtree
= NULL
;
104 proto_item
*giditem
= NULL
;
107 ngids
= tvb_get_ntohl(tvb
, offset
);
110 giditem
= proto_tree_add_item(tree
, hf_hclnfsd_gids
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
111 gidtree
= proto_item_add_subtree(giditem
, ett_hclnfsd_gids
);
117 for (ngids_i
= 0; ngids_i
< ngids
; ngids_i
++)
119 proto_tree_add_item(gidtree
, hf_hclnfsd_gid
, tvb
, offset
+ (4 * ngids_i
), 4, ENC_BIG_ENDIAN
);
128 dissect_hclnfsd_spool_inquire_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
131 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_status
, offset
);
133 offset
= dissect_nfs3_fh(tvb
, offset
, pinfo
, tree
, "spool filehandle", NULL
, (rpc_call_info_value
*)data
);
140 dissect_hclnfsd_spool_file_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
144 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_printername
, offset
, NULL
);
146 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_filename
, offset
, NULL
);
148 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_fileext
, offset
);
154 static const value_string names_request_type
[] = {
155 #define HCLNFSD_DISK_REQUEST 4
156 { HCLNFSD_DISK_REQUEST
, "DISK" },
157 #define HCLNFSD_PRINT_REQUEST 3
158 { HCLNFSD_PRINT_REQUEST
, "PRINTER" },
163 hclnfsd_decode_obscure(wmem_allocator_t
*pool
, const char *ident
, int ident_len
)
165 char *ident_decoded
, *ident_out
;
168 ident_decoded
= (char *)wmem_alloc(pool
, ident_len
);
169 ident_out
= ident_decoded
;
170 for (x
= -1, j
= 0; j
< ident_len
; j
++)
179 return ident_decoded
;
184 dissect_hclnfsd_authorize_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
186 uint32_t request_type
;
187 const char *ident
= NULL
;
189 char *username
= NULL
;
190 char *password
= NULL
;
193 proto_item
*ident_item
= NULL
;
194 proto_tree
*ident_tree
= NULL
;
197 proto_tree_add_item(tree
, hf_hclnfsd_server_ip
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
200 request_type
= tvb_get_ntohl(tvb
, offset
);
201 proto_tree_add_uint(tree
, hf_hclnfsd_request_type
, tvb
, offset
,
205 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_device
, offset
,
208 ident_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1,
209 ett_hclnfsd_auth_ident
, &ident_item
, "Authentication Ident");
213 newoffset
= dissect_rpc_string(tvb
, ident_tree
,
214 hf_hclnfsd_auth_ident_obscure
, offset
, &ident
);
218 ident_len
= (int)strlen(ident
);
220 proto_item_set_len(ident_item
, ident_len
);
222 ident_decoded
= hclnfsd_decode_obscure(pinfo
->pool
, ident
, ident_len
);
224 username
= ident_decoded
+ 2;
225 password
= username
+ strlen(username
) + 1;
227 proto_tree_add_string(ident_tree
, hf_hclnfsd_username
, tvb
, offset
, ident_len
, username
);
228 proto_tree_add_string(ident_tree
, hf_hclnfsd_password
, tvb
, offset
, ident_len
, password
);
239 dissect_hclnfsd_authorize_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
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
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
266 return dissect_rpc_string(tvb
, tree
, hf_hclnfsd_grpname
, 0, NULL
);
270 dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
272 return dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_gid
, 0);
277 dissect_hclnfsd_grp_to_number_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
279 return dissect_hclnfsd_gids(tvb
, 0, pinfo
, tree
);
284 dissect_hclnfsd_grp_to_number_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
286 return dissect_rpc_string(tvb
, tree
, hf_hclnfsd_grpname
, 0, NULL
);
291 dissect_hclnfsd_return_host_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
294 proto_tree_add_item(tree
, hf_hclnfsd_host_ip
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
302 dissect_hclnfsd_return_host_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
304 return dissect_rpc_string(tvb
, tree
, hf_hclnfsd_hostname
, 0, NULL
);
309 dissect_hclnfsd_uid_to_name_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
311 uint32_t nuids
, nuids_i
;
312 proto_tree
*uidtree
= NULL
;
313 proto_item
*uiditem
= NULL
;
316 nuids
= tvb_get_ntohl(tvb
, offset
);
319 uiditem
= proto_tree_add_item(tree
, hf_hclnfsd_uids
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
322 uidtree
= proto_item_add_subtree(uiditem
, ett_hclnfsd_uids
);
326 for (nuids_i
= 0; nuids_i
< nuids
; nuids_i
++)
327 offset
= dissect_rpc_uint32(tvb
, uidtree
, hf_hclnfsd_uid
, offset
);
334 dissect_hclnfsd_uid_to_name_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
336 uint32_t nusers
, nusers_i
;
337 proto_tree
*usertree
= NULL
;
338 proto_item
*useritem
= NULL
;
341 nusers
= tvb_get_ntohl(tvb
, offset
);
344 useritem
= proto_tree_add_item(tree
, hf_hclnfsd_uids
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
347 usertree
= proto_item_add_subtree(useritem
, ett_hclnfsd_usernames
);
354 for (nusers_i
= 0; nusers_i
< nusers
; nusers_i
++)
355 offset
= dissect_rpc_string(tvb
, usertree
,
356 hf_hclnfsd_username
, offset
, NULL
);
363 dissect_hclnfsd_name_to_uid_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
365 return dissect_rpc_string(tvb
, tree
, hf_hclnfsd_username
, 0, NULL
);
370 dissect_hclnfsd_name_to_uid_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
372 return dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_uid
, 0);
377 dissect_hclnfsd_share_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
379 uint32_t request_type
;
382 proto_tree_add_item_ret_uint(tree
, hf_hclnfsd_request_type
, tvb
, offset
,
383 4, ENC_BIG_ENDIAN
, &request_type
);
386 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_cookie
, offset
);
388 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_lockname
, offset
, NULL
);
390 offset
= dissect_nfs3_fh(tvb
, offset
, pinfo
, tree
, "Filehandle", NULL
, (rpc_call_info_value
*)data
);
392 offset
= dissect_rpc_data(tvb
, tree
, hf_hclnfsd_unknown_data
, offset
);
394 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_mode
, offset
);
396 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_access
, offset
);
398 offset
+= 4; /* skip last 4 UNUSED bytes */
405 dissect_hclnfsd_share_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
407 uint32_t request_type
;
410 request_type
= tvb_get_ntohl(tvb
, offset
);
412 proto_tree_add_uint(tree
, hf_hclnfsd_request_type
, tvb
, offset
,
416 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_cookie
, offset
);
417 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_status
, offset
);
418 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_sequence
, offset
);
425 dissect_hclnfsd_unshare_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
427 return dissect_hclnfsd_share_call(tvb
, pinfo
, tree
, data
);
432 dissect_hclnfsd_unshare_reply(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
434 return dissect_hclnfsd_share_reply(tvb
, pinfo
, tree
, data
);
439 dissect_hclnfsd_lock_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
443 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_status
, offset
);
444 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_cookie
, offset
);
445 offset
+= 4; /* skip unused uint */
447 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_exclusive
, offset
);
449 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_lockname
, offset
, NULL
);
451 offset
= dissect_nfs3_fh(tvb
, offset
, pinfo
, tree
, "Filehandle", NULL
, (rpc_call_info_value
*)data
);
453 offset
= dissect_rpc_data(tvb
, tree
, hf_hclnfsd_lockowner
, offset
);
455 offset
+= 4; /* unused, skip */
457 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_offset
, offset
);
459 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_length
, offset
);
466 dissect_hclnfsd_lock_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
468 uint32_t request_type
;
471 proto_tree_add_item_ret_uint(tree
, hf_hclnfsd_request_type
, tvb
, offset
,
472 4, ENC_BIG_ENDIAN
, &request_type
);
475 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_cookie
, offset
);
476 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_status
, offset
);
483 dissect_hclnfsd_remove_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
486 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_lockname
, offset
, NULL
);
488 offset
+= 4; /* skip unused */
495 dissect_hclnfsd_unlock_call(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
498 offset
+= 4; /* skip unused */
500 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_cookie
, offset
);
502 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_lockname
, offset
, NULL
);
504 offset
= dissect_nfs3_fh(tvb
, offset
, pinfo
, tree
, "Filehandle", NULL
, (rpc_call_info_value
*)data
);
506 offset
= dissect_rpc_data(tvb
, tree
, hf_hclnfsd_unknown_data
, offset
);
508 offset
+= 4; /* skip unused */
510 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_offset
, offset
);
511 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_length
, offset
);
518 dissect_hclnfsd_unlock_reply(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
520 return dissect_hclnfsd_lock_reply(tvb
, pinfo
, tree
, data
);
525 dissect_hclnfsd_get_printers_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
527 unsigned nqueues
, nqueues_i
;
528 proto_item
*queuesitem
= NULL
;
529 proto_tree
*queuestree
= NULL
;
532 nqueues
= tvb_get_ntohl(tvb
, offset
);
535 queuesitem
= proto_tree_add_item(tree
, hf_hclnfsd_print_queues
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
536 queuestree
= proto_item_add_subtree(queuesitem
, ett_hclnfsd_printqueues
);
543 for (nqueues_i
= 0; nqueues_i
< nqueues
; nqueues_i
++)
545 /* create new item for print queue */
546 offset
= dissect_rpc_string(tvb
, tree
,
547 hf_hclnfsd_queuename
, offset
, NULL
);
549 /* create subtree on new item with print queue comment */
550 offset
= dissect_rpc_string(tvb
, tree
,
551 hf_hclnfsd_queuecomment
, offset
, NULL
);
559 dissect_hclnfsd_get_printq_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
563 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_queuename
, offset
, NULL
);
565 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_username
, offset
, NULL
);
572 dissect_hclnfsd_get_printq_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
574 unsigned datafollows
;
575 proto_item
*queueitem
= NULL
;
576 proto_tree
*queuetree
= NULL
;
581 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_printqueuenumber
, offset
);
583 offset
= dissect_rpc_string(tvb
, tree
, hf_hclnfsd_queuecomment
, offset
, NULL
);
585 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_queuestatus
, offset
);
587 offset
= dissect_rpc_uint32(tvb
, tree
, hf_hclnfsd_numphysicalprinters
, offset
);
589 datafollows
= tvb_get_ntohl(tvb
, offset
);
592 queueitem
= proto_tree_add_item(tree
, hf_hclnfsd_print_jobs
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
593 queuetree
= proto_item_add_subtree(queueitem
, ett_hclnfsd_printqueues
);
599 jobitem
= proto_tree_add_item(queuetree
, hf_hclnfsd_job_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
602 jobtree
= proto_item_add_subtree(jobitem
, ett_hclnfsd_printjob
);
604 offset
= dissect_rpc_string(tvb
, jobtree
,
605 hf_hclnfsd_username
, offset
, NULL
);
607 offset
= dissect_rpc_string(tvb
, jobtree
,
608 hf_hclnfsd_printparams
, offset
, NULL
);
610 offset
= dissect_rpc_uint32(tvb
, jobtree
, hf_hclnfsd_queuestatus
, offset
);
612 offset
= dissect_rpc_uint32(tvb
, jobtree
, hf_hclnfsd_jobstatus
, offset
);
613 offset
= dissect_rpc_uint32(tvb
, jobtree
, hf_hclnfsd_timesubmitted
, offset
);
614 offset
= dissect_rpc_uint32(tvb
, jobtree
, hf_hclnfsd_size
, offset
);
615 offset
= dissect_rpc_uint32(tvb
, jobtree
, hf_hclnfsd_copies
, offset
);
616 offset
= dissect_rpc_string(tvb
, jobtree
, hf_hclnfsd_queuecomment
, offset
, NULL
);
618 datafollows
= tvb_get_ntohl(tvb
, offset
);
626 /* proc number, "proc name", dissect_request, dissect_reply */
628 static const vsff hclnfsd1_proc
[] = {
629 { HCLNFSDPROC_NULL
, "NULL",
630 dissect_rpc_void
, dissect_rpc_void
},
631 { HCLNFSDPROC_SPOOL_INQUIRE
, "SPOOL_INQUIRE",
632 dissect_hclnfsd_spool_inquire_call
, dissect_rpc_unknown
},
633 { HCLNFSDPROC_SPOOL_FILE
, "SPOOL_FILE",
634 dissect_hclnfsd_spool_file_call
, dissect_rpc_void
},
635 { HCLNFSDPROC_AUTHORIZE
, "AUTHORIZE",
636 dissect_hclnfsd_authorize_call
, dissect_hclnfsd_authorize_reply
},
637 { HCLNFSDPROC_GRP_NAME_TO_NUMB
, "GRP_NAME_TO_NUMB",
638 dissect_hclnfsd_grp_name_to_numb_call
, dissect_hclnfsd_grp_name_to_numb_reply
},
639 { HCLNFSDPROC_GRP_TO_NUMBER
, "GRP_TO_NUMBER",
640 dissect_hclnfsd_grp_to_number_call
, dissect_hclnfsd_grp_to_number_reply
},
641 { HCLNFSDPROC_RETURN_HOST
, "RETURN_HOST",
642 dissect_hclnfsd_return_host_call
, dissect_hclnfsd_return_host_reply
},
643 { HCLNFSDPROC_UID_TO_NAME
, "UID_TO_NAME",
644 dissect_hclnfsd_uid_to_name_call
, dissect_hclnfsd_uid_to_name_reply
},
645 { HCLNFSDPROC_NAME_TO_UID
, "NAME_TO_UID",
646 dissect_hclnfsd_name_to_uid_call
, dissect_hclnfsd_name_to_uid_reply
},
647 { HCLNFSDPROC_SHARE
, "SHARE",
648 dissect_hclnfsd_share_call
, dissect_hclnfsd_share_reply
},
649 { HCLNFSDPROC_UNSHARE
, "UNSHARE",
650 dissect_hclnfsd_unshare_call
, dissect_hclnfsd_unshare_reply
},
651 { HCLNFSDPROC_LOCK
, "LOCK",
652 dissect_hclnfsd_lock_call
, dissect_hclnfsd_lock_reply
},
653 { HCLNFSDPROC_REMOVE
, "REMOVE",
654 dissect_hclnfsd_remove_call
, dissect_rpc_void
},
655 { HCLNFSDPROC_UNLOCK
, "UNLOCK",
656 dissect_hclnfsd_unlock_call
, dissect_hclnfsd_unlock_reply
},
657 { HCLNFSDPROC_GET_PRINTERS
, "GET_PRINTERS",
658 dissect_rpc_void
, dissect_hclnfsd_get_printers_reply
},
659 { HCLNFSDPROC_GET_PRINTQ
, "GET_PRINTQ",
660 dissect_hclnfsd_get_printq_call
, dissect_hclnfsd_get_printq_reply
},
661 { HCLNFSDPROC_CANCEL_PRJOB
, "CANCEL_PRJOB",
662 dissect_rpc_unknown
, dissect_rpc_unknown
},
663 { HCLNFSDPROC_ZAP_LOCKS
, "ZAP_LOCKS",
664 dissect_rpc_unknown
, dissect_rpc_unknown
},
665 { 0, NULL
, NULL
, NULL
}
667 static const rpc_prog_vers_info hclnfsd_vers_info
[] = {
668 { 1, hclnfsd1_proc
, &hf_hclnfsd_procedure_v1
},
670 static const value_string hclnfsd1_proc_vals
[] = {
671 { HCLNFSDPROC_NULL
, "NULL" },
672 { HCLNFSDPROC_SPOOL_INQUIRE
, "SPOOL_INQUIRE" },
673 { HCLNFSDPROC_SPOOL_FILE
, "SPOOL_FILE" },
674 { HCLNFSDPROC_AUTHORIZE
, "AUTHORIZE" },
675 { HCLNFSDPROC_GRP_NAME_TO_NUMB
, "GRP_NAME_TO_NUMB" },
676 { HCLNFSDPROC_GRP_TO_NUMBER
, "GRP_TO_NUMBER" },
677 { HCLNFSDPROC_RETURN_HOST
, "RETURN_HOST" },
678 { HCLNFSDPROC_UID_TO_NAME
, "UID_TO_NAME" },
679 { HCLNFSDPROC_NAME_TO_UID
, "NAME_TO_UID" },
680 { HCLNFSDPROC_SHARE
, "SHARE" },
681 { HCLNFSDPROC_UNSHARE
, "UNSHARE" },
682 { HCLNFSDPROC_LOCK
, "LOCK" },
683 { HCLNFSDPROC_REMOVE
, "REMOVE" },
684 { HCLNFSDPROC_UNLOCK
, "UNLOCK" },
685 { HCLNFSDPROC_GET_PRINTERS
, "GET_PRINTERS" },
686 { HCLNFSDPROC_GET_PRINTQ
, "GET_PRINTQ" },
687 { HCLNFSDPROC_CANCEL_PRJOB
, "CANCEL_PRJOB" },
688 { HCLNFSDPROC_ZAP_LOCKS
, "ZAP_LOCKS" },
691 /* end of hclnfsd version 1 */
695 proto_register_hclnfsd(void)
697 static hf_register_info hf
[] = {
698 { &hf_hclnfsd_procedure_v1
, {
699 "V1 Procedure", "hclnfsd.procedure_v1", FT_UINT32
, BASE_DEC
,
700 VALS(hclnfsd1_proc_vals
), 0, NULL
, HFILL
}},
701 { &hf_hclnfsd_request_type
, {
702 "Request Type", "hclnfsd.request_type", FT_UINT32
, BASE_DEC
,
703 VALS(names_request_type
), 0, NULL
, HFILL
}},
705 { &hf_hclnfsd_device
, {
706 "Device", "hclnfsd.device", FT_STRING
, BASE_NONE
,
707 NULL
, 0, NULL
, HFILL
}},
710 { &hf_hclnfsd_login
, {
711 "Login Text", "hclnfsd.logintext", FT_STRING
, BASE_NONE
,
712 NULL
, 0, NULL
, HFILL
}},
715 { &hf_hclnfsd_lockname
, {
716 "Lockname", "hclnfsd.lockname", FT_STRING
, BASE_NONE
,
717 NULL
, 0, NULL
, HFILL
}},
719 { &hf_hclnfsd_unknown_data
, {
720 "Unknown", "hclnfsd.unknown_data", FT_BYTES
, BASE_NONE
,
721 NULL
, 0, "Data", HFILL
}},
723 { &hf_hclnfsd_lockowner
, {
724 "Lockowner", "hclnfsd.lockowner", FT_BYTES
, BASE_NONE
,
725 NULL
, 0, NULL
, HFILL
}},
727 { &hf_hclnfsd_printername
, {
728 "Printer Name", "hclnfsd.printername", FT_STRING
, BASE_NONE
,
729 NULL
, 0, NULL
, HFILL
}},
731 { &hf_hclnfsd_filename
, {
732 "Filename", "hclnfsd.filename", FT_STRING
, BASE_NONE
,
733 NULL
, 0, NULL
, HFILL
}},
735 { &hf_hclnfsd_fileext
, {
736 "File Extension", "hclnfsd.fileext", FT_UINT32
, BASE_DEC
,
737 NULL
, 0, NULL
, HFILL
}},
739 { &hf_hclnfsd_grpname
, {
740 "Group", "hclnfsd.group", FT_STRING
, BASE_NONE
,
741 NULL
, 0, NULL
, HFILL
}},
743 { &hf_hclnfsd_hostname
, {
744 "Hostname", "hclnfsd.hostname", FT_STRING
, BASE_NONE
,
745 NULL
, 0, NULL
, HFILL
}},
747 { &hf_hclnfsd_username
, {
748 "Username", "hclnfsd.username", FT_STRING
, BASE_NONE
,
749 NULL
, 0, NULL
, HFILL
}},
751 { &hf_hclnfsd_queuename
, {
752 "Name", "hclnfsd.printqueuename", FT_STRING
, BASE_NONE
,
753 NULL
, 0, "Print Queue Name", HFILL
}},
755 { &hf_hclnfsd_queuecomment
, {
756 "Comment", "hclnfsd.printqueuecomment", FT_STRING
, BASE_NONE
,
757 NULL
, 0, "Print Queue Comment", HFILL
}},
759 { &hf_hclnfsd_printparams
, {
760 "Print Parameters", "hclnfsd.printparameters", FT_STRING
, BASE_NONE
,
761 NULL
, 0, NULL
, HFILL
}},
763 { &hf_hclnfsd_status
, {
764 "Status", "hclnfsd.status", FT_UINT32
, BASE_DEC
,
765 NULL
, 0, NULL
, HFILL
}},
768 "UID", "hclnfsd.uid", FT_UINT32
, BASE_DEC
,
769 NULL
, 0, "User ID", HFILL
}},
771 { &hf_hclnfsd_sequence
, {
772 "Sequence", "hclnfsd.sequence", FT_UINT32
, BASE_HEX
,
773 NULL
, 0, NULL
, HFILL
}},
775 { &hf_hclnfsd_cookie
, {
776 "Cookie", "hclnfsd.cookie", FT_UINT32
, BASE_HEX
,
777 NULL
, 0, NULL
, HFILL
}},
779 { &hf_hclnfsd_mode
, {
780 "Mode", "hclnfsd.mode", FT_UINT32
, BASE_DEC
,
781 NULL
, 0, NULL
, HFILL
}},
783 { &hf_hclnfsd_access
, {
784 "Access", "hclnfsd.access", FT_UINT32
, BASE_DEC
,
785 NULL
, 0, NULL
, HFILL
}},
787 { &hf_hclnfsd_exclusive
, {
788 "Exclusive", "hclnfsd.exclusive", FT_UINT32
, BASE_DEC
,
789 NULL
, 0, NULL
, HFILL
}},
791 { &hf_hclnfsd_offset
, {
792 "Offset", "hclnfsd.offset", FT_UINT32
, BASE_DEC
,
793 NULL
, 0, NULL
, HFILL
}},
795 { &hf_hclnfsd_length
, {
796 "Length", "hclnfsd.length", FT_UINT32
, BASE_DEC
,
797 NULL
, 0, NULL
, HFILL
}},
799 { &hf_hclnfsd_queuestatus
, {
800 "Queue Status", "hclnfsd.queuestatus", FT_UINT32
, BASE_DEC
,
801 NULL
, 0, NULL
, HFILL
}},
803 { &hf_hclnfsd_printqueuenumber
, {
804 "Print Queue Number", "hclnfsd.pqn", FT_UINT32
, BASE_DEC
,
805 NULL
, 0, NULL
, HFILL
}},
807 { &hf_hclnfsd_numphysicalprinters
, {
808 "Number of Physical Printers", "hclnfsd.npp", FT_UINT32
, BASE_DEC
,
809 NULL
, 0, NULL
, HFILL
}},
811 { &hf_hclnfsd_jobstatus
, {
812 "Job Status", "hclnfsd.jobstatus", FT_UINT32
, BASE_DEC
,
813 NULL
, 0, NULL
, HFILL
}},
815 { &hf_hclnfsd_timesubmitted
, {
816 "Time Submitted", "hclnfsd.timesubmitted", FT_UINT32
, BASE_DEC
,
817 NULL
, 0, NULL
, HFILL
}},
819 { &hf_hclnfsd_size
, {
820 "Size", "hclnfsd.size", FT_UINT32
, BASE_DEC
,
821 NULL
, 0, NULL
, HFILL
}},
823 { &hf_hclnfsd_copies
, {
824 "Copies", "hclnfsd.copies", FT_UINT32
, BASE_DEC
,
825 NULL
, 0, NULL
, HFILL
}},
828 "GID", "hclnfsd.gid", FT_UINT32
, BASE_DEC
,
829 NULL
, 0, "Group ID", HFILL
}},
831 { &hf_hclnfsd_server_ip
, {
832 "Server IP", "hclnfsd.server_ip", FT_IPv4
, BASE_NONE
,
833 NULL
, 0, NULL
, HFILL
}},
835 { &hf_hclnfsd_host_ip
, {
836 "Host IP", "hclnfsd.host_ip", FT_IPv4
, BASE_NONE
,
837 NULL
, 0, NULL
, HFILL
}},
839 { &hf_hclnfsd_auth_ident_obscure
, {
840 "Obscure Ident", "hclnfsd.authorize.ident.obscure", FT_STRING
,
841 BASE_NONE
, NULL
, 0, "Authentication Obscure Ident", HFILL
}},
843 /* Generated from convert_proto_tree_add_text.pl */
845 { "GIDs", "hclnfsd.gids",
846 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
849 { &hf_hclnfsd_password
,
850 { "Password", "hclnfsd.password",
851 FT_STRING
, BASE_NONE
, NULL
, 0x0,
855 { "UIDs", "hclnfsd.uids",
856 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
859 { &hf_hclnfsd_print_queues
,
860 { "Print Queues", "hclnfsd.print_queues",
861 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
864 { &hf_hclnfsd_print_jobs
,
865 { "Print Jobs", "hclnfsd.print_jobs",
866 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
869 { &hf_hclnfsd_job_id
,
870 { "Job ID", "hclnfsd.job_id",
871 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
875 static int *ett
[] = {
880 &ett_hclnfsd_usernames
,
881 &ett_hclnfsd_printqueues
,
882 &ett_hclnfsd_printjob
,
883 &ett_hclnfsd_auth_ident
886 proto_hclnfsd
= proto_register_protocol("Hummingbird NFS Daemon",
887 "HCLNFSD", "hclnfsd");
888 proto_register_field_array(proto_hclnfsd
, hf
, array_length(hf
));
889 proto_register_subtree_array(ett
, array_length(ett
));
893 proto_reg_handoff_hclnfsd(void)
895 /* Register the protocol as RPC */
896 rpc_init_prog(proto_hclnfsd
, HCLNFSD_PROGRAM
, ett_hclnfsd
,
897 G_N_ELEMENTS(hclnfsd_vers_info
), hclnfsd_vers_info
);
901 * Editor modelines - https://www.wireshark.org/tools/modelines.html
906 * indent-tabs-mode: t
909 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
910 * :indentSize=8:tabSize=8:noTabs=false: