2 * 2001 Ronnie Sahlberg <See AUTHORS for email>
4 * $Id: packet-nisplus.c,v 1.11 2002/04/03 13:24:12 girlich Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #ifdef HAVE_SYS_TYPES_H
30 #include <sys/types.h>
35 #include "packet-rpc.h"
36 #include "packet-nisplus.h"
38 static int proto_nisplus = -1;
39 static int hf_nisplus_object = -1;
40 static int hf_nisplus_oid = -1;
41 static int hf_nisplus_object_ctime = -1;
42 static int hf_nisplus_object_mtime = -1;
43 static int hf_nisplus_object_name = -1;
44 static int hf_nisplus_object_owner = -1;
45 static int hf_nisplus_object_group = -1;
46 static int hf_nisplus_object_domain = -1;
47 static int hf_nisplus_object_ttl = -1;
48 static int hf_nisplus_object_type = -1;
49 static int hf_nisplus_object_private = -1;
50 static int hf_nisplus_directory = -1;
51 static int hf_nisplus_directory_name = -1;
52 static int hf_nisplus_directory_type = -1;
53 static int hf_nisplus_directory_ttl = -1;
54 static int hf_nisplus_directory_mask = -1;
55 static int hf_nisplus_directory_mask_list = -1;
56 static int hf_nisplus_access_mask = -1;
57 static int hf_nisplus_mask_world_read = -1;
58 static int hf_nisplus_mask_world_modify = -1;
59 static int hf_nisplus_mask_world_create = -1;
60 static int hf_nisplus_mask_world_destroy = -1;
61 static int hf_nisplus_mask_group_read = -1;
62 static int hf_nisplus_mask_group_modify = -1;
63 static int hf_nisplus_mask_group_create = -1;
64 static int hf_nisplus_mask_group_destroy = -1;
65 static int hf_nisplus_mask_owner_read = -1;
66 static int hf_nisplus_mask_owner_modify = -1;
67 static int hf_nisplus_mask_owner_create = -1;
68 static int hf_nisplus_mask_owner_destroy = -1;
69 static int hf_nisplus_mask_nobody_read = -1;
70 static int hf_nisplus_mask_nobody_modify = -1;
71 static int hf_nisplus_mask_nobody_create = -1;
72 static int hf_nisplus_mask_nobody_destroy = -1;
73 static int hf_nisplus_server_name = -1;
74 static int hf_nisplus_key_type = -1;
75 static int hf_nisplus_key_data = -1;
76 static int hf_nisplus_servers = -1;
77 static int hf_nisplus_cbservers = -1;
78 static int hf_nisplus_server = -1;
79 static int hf_nisplus_endpoints = -1;
80 static int hf_nisplus_endpoint = -1;
81 static int hf_nisplus_endpoint_uaddr = -1;
82 static int hf_nisplus_endpoint_family = -1;
83 static int hf_nisplus_endpoint_proto = -1;
84 static int hf_nisplus_link = -1;
85 static int hf_nisplus_attrs_array = -1;
86 static int hf_nisplus_attr = -1;
87 static int hf_nisplus_attr_name = -1;
88 static int hf_nisplus_attr_val = -1;
89 static int hf_nisplus_entry = -1;
90 static int hf_nisplus_entry_type = -1;
91 static int hf_nisplus_entry_cols = -1;
92 static int hf_nisplus_entry_col = -1;
93 static int hf_nisplus_entry_flags = -1;
94 static int hf_nisplus_entry_val = -1;
95 static int hf_nisplus_entry_mask = -1;
96 static int hf_nisplus_entry_mask_binary = -1;
97 static int hf_nisplus_entry_mask_crypt = -1;
98 static int hf_nisplus_entry_mask_xdr = -1;
99 static int hf_nisplus_entry_mask_modified = -1;
100 static int hf_nisplus_entry_mask_asn = -1;
101 static int hf_nisplus_table = -1;
102 static int hf_nisplus_table_type = -1;
103 static int hf_nisplus_table_maxcol = -1;
104 static int hf_nisplus_table_sep = -1;
105 static int hf_nisplus_table_cols = -1;
106 static int hf_nisplus_table_col = -1;
107 static int hf_nisplus_table_path = -1;
108 static int hf_nisplus_table_col_name = -1;
109 static int hf_nisplus_table_col_mask = -1;
110 static int hf_nisplus_table_col_mask_binary = -1;
111 static int hf_nisplus_table_col_mask_encrypted = -1;
112 static int hf_nisplus_table_col_mask_xdr = -1;
113 static int hf_nisplus_table_col_mask_searchable = -1;
114 static int hf_nisplus_table_col_mask_casesensitive = -1;
115 static int hf_nisplus_table_col_mask_modified = -1;
116 static int hf_nisplus_table_col_mask_asn = -1;
117 static int hf_nisplus_group = -1;
118 static int hf_nisplus_group_flags = -1;
119 static int hf_nisplus_grps = -1;
120 static int hf_nisplus_group_name = -1;
121 static int hf_nisplus_ib_flags = -1;
122 static int hf_nisplus_ib_bufsize = -1;
123 static int hf_nisplus_cookie = -1;
124 static int hf_nisplus_fd_dirname = -1;
125 static int hf_nisplus_fd_requester = -1;
126 static int hf_nisplus_taglist = -1;
127 static int hf_nisplus_tag = -1;
128 static int hf_nisplus_tag_type = -1;
129 static int hf_nisplus_tag_val = -1;
130 static int hf_nisplus_dump_dir = -1;
131 static int hf_nisplus_dump_time = -1;
132 static int hf_nisplus_dummy = -1;
133 static int hf_nisplus_ping_dir = -1;
134 static int hf_nisplus_ping_time = -1;
135 static int hf_nisplus_error = -1;
136 static int hf_nisplus_dir_data = -1;
137 static int hf_nisplus_signature = -1;
138 static int hf_nisplus_log_entries = -1;
139 static int hf_nisplus_log_entry = -1;
140 static int hf_nisplus_log_type = -1;
141 static int hf_nisplus_log_time = -1;
142 static int hf_nisplus_log_principal = -1;
143 static int hf_nisplus_callback_status = -1;
144 static int hf_nisplus_cp_status = -1;
145 static int hf_nisplus_cp_zticks = -1;
146 static int hf_nisplus_cp_dticks = -1;
147 static int hf_nisplus_zticks = -1;
148 static int hf_nisplus_dticks = -1;
149 static int hf_nisplus_aticks = -1;
150 static int hf_nisplus_cticks = -1;
152 static gint ett_nisplus = -1;
153 static gint ett_nisplus_object = -1;
154 static gint ett_nisplus_oid = -1;
155 static gint ett_nisplus_directory = -1;
156 static gint ett_nisplus_directory_mask = -1;
157 static gint ett_nisplus_access_mask = -1;
158 static gint ett_nisplus_server = -1;
159 static gint ett_nisplus_endpoint = -1;
160 static gint ett_nisplus_link = -1;
161 static gint ett_nisplus_attr = -1;
162 static gint ett_nisplus_entry = -1;
163 static gint ett_nisplus_entry_col = -1;
164 static gint ett_nisplus_entry_mask = -1;
165 static gint ett_nisplus_table = -1;
166 static gint ett_nisplus_table_col = -1;
167 static gint ett_nisplus_table_col_mask = -1;
168 static gint ett_nisplus_group = -1;
169 static gint ett_nisplus_grps = -1;
170 static gint ett_nisplus_tag = -1;
171 static gint ett_nisplus_log_entry = -1;
174 #define NIS_MASK_TABLE_BINARY 0x0001
175 #define NIS_MASK_TABLE_CRYPT 0x0002
176 #define NIS_MASK_TABLE_XDR 0x0004
177 #define NIS_MASK_TABLE_SRCH 0x0008
178 #define NIS_MASK_TABLE_CASE 0x0010
179 #define NIS_MASK_TABLE_MODIFIED 0x0020
180 #define NIS_MASK_TABLE_ASN 0x0040
183 #define NIS_MASK_ENTRY_BINARY 0x0001
184 #define NIS_MASK_ENTRY_CRYPT 0x0002
185 #define NIS_MASK_ENTRY_XDR 0x0004
186 #define NIS_MASK_ENTRY_MODIFIED 0x0008
187 #define NIS_MASK_ENTRY_ASN 0x0040
190 #define NIS_MASK_WORLD_READ 0x0001
191 #define NIS_MASK_WORLD_MODIFY 0x0002
192 #define NIS_MASK_WORLD_CREATE 0x0004
193 #define NIS_MASK_WORLD_DESTROY 0x0008
194 #define NIS_MASK_GROUP_READ 0x0010
195 #define NIS_MASK_GROUP_MODIFY 0x0020
196 #define NIS_MASK_GROUP_CREATE 0x0040
197 #define NIS_MASK_GROUP_DESTROY 0x0080
198 #define NIS_MASK_OWNER_READ 0x0100
199 #define NIS_MASK_OWNER_MODIFY 0x0200
200 #define NIS_MASK_OWNER_CREATE 0x0400
201 #define NIS_MASK_OWNER_DESTROY 0x0800
202 #define NIS_MASK_NOBODY_READ 0x1000
203 #define NIS_MASK_NOBODY_MODIFY 0x2000
204 #define NIS_MASK_NOBODY_CREATE 0x4000
205 #define NIS_MASK_NOBODY_DESTROY 0x8000
208 static const value_string key_type[] = {
209 #define NIS_KEY_NONE 0
210 { NIS_KEY_NONE, "No Public Key (unix/sys auth)" },
212 { NIS_KEY_DH, "Diffie-Hellman" },
213 #define NIS_KEY_RSA 2
214 { NIS_KEY_RSA, "RSA" },
215 #define NIS_KEY_KERB 3
216 { NIS_KEY_KERB, "Kerberos" },
217 #define NIS_KEY_DHEXT 4
218 { NIS_KEY_DHEXT, "Extended Diffie-Hellman for RPC-GSS" },
222 static const value_string obj_type[] = {
223 #define NIS_BOGUS_OBJ 0
224 { NIS_BOGUS_OBJ, "Bogus Object" },
226 { NIS_NO_OBJ, "NULL Object" },
227 #define NIS_DIRECTORY_OBJ 2
228 { NIS_DIRECTORY_OBJ, "Directory Object" },
229 #define NIS_GROUP_OBJ 3
230 { NIS_GROUP_OBJ, "Group Object" },
231 #define NIS_TABLE_OBJ 4
232 { NIS_TABLE_OBJ, "Table Object" },
233 #define NIS_ENTRY_OBJ 5
234 { NIS_ENTRY_OBJ, "Entry Object" },
235 #define NIS_LINK_OBJ 6
236 { NIS_LINK_OBJ, "Link Object" },
237 #define NIS_PRIVATE_OBJ 7
238 { NIS_PRIVATE_OBJ, "Private Object" },
242 static const value_string ns_type[] = {
243 #define NIS_TYPE_UNKNOWN 0
244 { NIS_TYPE_UNKNOWN, "UNKNOWN" },
245 #define NIS_TYPE_NIS 1
246 { NIS_TYPE_NIS, "NIS Plus Service" },
247 #define NIS_TYPE_SUNYP 2
248 { NIS_TYPE_SUNYP, "Old NIS Service (YP)" },
249 #define NIS_TYPE_IVY 3
250 { NIS_TYPE_IVY, "NIS Plus Plus Service" },
251 #define NIS_TYPE_DNS 4
252 { NIS_TYPE_DNS, "Domain Name Service (DNS)" },
253 #define NIS_TYPE_X500 5
254 { NIS_TYPE_X500, "ISO/CCITT X.500 Service" },
255 #define NIS_TYPE_DNANS 6
256 { NIS_TYPE_DNANS, "Digital DECNet Name Service" },
257 #define NIS_TYPE_XCHS 7
258 { NIS_TYPE_XCHS, "Xerox ClearingHouse Service" },
259 #define NIS_TYPE_CDS 8
260 { NIS_TYPE_CDS, "CDS" },
268 dissect_nisplus_time(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
273 ts.secs = tvb_get_ntohl(tvb, offset);
276 proto_tree_add_time(tree, hfindex, tvb, offset, 4, &ts);
282 dissect_group(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
284 offset = dissect_rpc_string(tvb, tree,
285 hf_nisplus_group_name, offset, NULL);
292 dissect_group_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
294 proto_item* lock_item = NULL;
295 proto_tree* lock_tree = NULL;
296 int old_offset = offset;
298 lock_item = proto_tree_add_item(tree, hf_nisplus_group,
299 tvb, offset, -1, FALSE);
301 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_group);
303 offset = dissect_rpc_uint32(tvb, lock_tree,
304 hf_nisplus_group_flags, offset);
306 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
307 dissect_group, hf_nisplus_grps);
309 proto_item_set_len(lock_item, offset-old_offset);
315 dissect_access_rights(tvbuff_t *tvb, int offset, proto_tree *tree)
317 proto_item* mask_item = NULL;
318 proto_tree* mask_tree = NULL;
321 mask_item = proto_tree_add_item(tree, hf_nisplus_access_mask,
322 tvb, offset, 4, FALSE);
324 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_access_mask);
325 mask = tvb_get_ntohl(tvb, offset);
326 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_read, tvb, offset, 4, mask);
327 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_modify, tvb, offset, 4, mask);
328 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_create, tvb, offset, 4, mask);
329 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_destroy, tvb, offset, 4, mask);
330 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_read, tvb, offset, 4, mask);
331 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_modify, tvb, offset, 4, mask);
332 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_create, tvb, offset, 4, mask);
333 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_destroy, tvb, offset, 4, mask);
334 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_read, tvb, offset, 4, mask);
335 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_modify, tvb, offset, 4, mask);
336 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_create, tvb, offset, 4, mask);
337 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_destroy, tvb, offset, 4, mask);
338 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_read, tvb, offset, 4, mask);
339 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_modify, tvb, offset, 4, mask);
340 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_create, tvb, offset, 4, mask);
341 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_destroy, tvb, offset, 4, mask);
348 dissect_table(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
350 proto_item* lock_item = NULL;
351 proto_tree* lock_tree = NULL;
352 proto_item* mask_item = NULL;
353 proto_tree* mask_tree = NULL;
355 int old_offset = offset;
357 lock_item = proto_tree_add_item(tree, hf_nisplus_table_col,
358 tvb, offset, -1, FALSE);
360 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table_col);
362 offset = dissect_rpc_string(tvb, lock_tree,
363 hf_nisplus_table_col_name, offset, NULL);
366 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_table_col_mask,
369 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_table_col_mask);
370 mask = tvb_get_ntohl(tvb, offset);
371 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_binary,
372 tvb, offset, 4, mask);
373 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_encrypted,
374 tvb, offset, 4, mask);
375 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_xdr,
376 tvb, offset, 4, mask);
377 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_searchable,
378 tvb, offset, 4, mask);
379 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_casesensitive,
380 tvb, offset, 4, mask);
381 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_modified,
382 tvb, offset, 4, mask);
383 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_asn,
384 tvb, offset, 4, mask);
387 offset = dissect_access_rights(tvb, offset, lock_tree);
389 proto_item_set_len(lock_item, offset-old_offset);
394 dissect_table_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
397 proto_item* lock_item = NULL;
398 proto_tree* lock_tree = NULL;
399 int old_offset = offset;
401 lock_item = proto_tree_add_item(tree, hf_nisplus_table,
402 tvb, offset, -1, FALSE);
404 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table);
406 offset = dissect_rpc_string(tvb, lock_tree,
407 hf_nisplus_table_type, offset, NULL);
409 offset = dissect_rpc_uint32(tvb, lock_tree,
410 hf_nisplus_table_maxcol, offset);
412 offset = dissect_rpc_uint32(tvb, lock_tree,
413 hf_nisplus_table_sep, offset);
415 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
416 dissect_table, hf_nisplus_table_cols);
418 offset = dissect_rpc_string(tvb, lock_tree,
419 hf_nisplus_table_path, offset, NULL);
421 proto_item_set_len(lock_item, offset-old_offset);
426 dissect_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
428 proto_item* lock_item = NULL;
429 proto_tree* lock_tree = NULL;
430 proto_item* mask_item = NULL;
431 proto_tree* mask_tree = NULL;
433 int old_offset = offset;
435 lock_item = proto_tree_add_item(tree, hf_nisplus_entry_col,
436 tvb, offset, -1, FALSE);
438 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry_col);
440 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_entry_mask,
444 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_entry_mask);
445 mask = tvb_get_ntohl(tvb, offset);
446 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_binary, tvb, offset, 4, mask);
447 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_crypt, tvb, offset, 4, mask);
448 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_xdr, tvb, offset, 4, mask);
449 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_modified, tvb, offset, 4, mask);
450 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_asn, tvb, offset, 4, mask);
453 offset = dissect_rpc_string(tvb, lock_tree,
454 hf_nisplus_entry_val, offset, NULL);
456 proto_item_set_len(lock_item, offset-old_offset);
461 dissect_entry_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
463 proto_item* lock_item = NULL;
464 proto_tree* lock_tree = NULL;
465 int old_offset = offset;
467 lock_item = proto_tree_add_item(tree, hf_nisplus_entry,
468 tvb, offset, -1, FALSE);
470 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry);
472 offset = dissect_rpc_string(tvb, lock_tree,
473 hf_nisplus_entry_type, offset, NULL);
475 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
476 dissect_entry, hf_nisplus_entry_cols);
478 proto_item_set_len(lock_item, offset-old_offset);
483 dissect_attr(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
485 proto_item* lock_item = NULL;
486 proto_tree* lock_tree = NULL;
487 int old_offset = offset;
489 lock_item = proto_tree_add_item(tree, hf_nisplus_attr,
490 tvb, offset, -1, FALSE);
492 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_attr);
494 offset = dissect_rpc_string(tvb, lock_tree,
495 hf_nisplus_attr_name, offset, NULL);
497 offset = dissect_rpc_data(tvb, lock_tree,
498 hf_nisplus_attr_val, offset);
500 proto_item_set_len(lock_item, offset-old_offset);
505 dissect_link_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
507 proto_item* lock_item = NULL;
508 proto_tree* lock_tree = NULL;
509 int old_offset = offset;
511 lock_item = proto_tree_add_item(tree, hf_nisplus_link,
512 tvb, offset, -1, FALSE);
514 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_link);
516 offset = dissect_rpc_uint32(tvb, lock_tree,
517 hf_nisplus_object_type, offset);
519 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
520 dissect_attr, hf_nisplus_attrs_array);
522 offset = dissect_rpc_string(tvb, lock_tree,
523 hf_nisplus_object_name, offset, NULL);
525 proto_item_set_len(lock_item, offset-old_offset);
531 dissect_endpoint(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
533 proto_item* lock_item = NULL;
534 proto_tree* lock_tree = NULL;
535 int old_offset = offset;
537 lock_item = proto_tree_add_item(tree, hf_nisplus_endpoint,
538 tvb, offset, -1, FALSE);
540 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_endpoint);
542 offset = dissect_rpc_string(tvb, lock_tree,
543 hf_nisplus_endpoint_uaddr, offset, NULL);
545 offset = dissect_rpc_string(tvb, lock_tree,
546 hf_nisplus_endpoint_family, offset, NULL);
548 offset = dissect_rpc_string(tvb, lock_tree,
549 hf_nisplus_endpoint_proto, offset, NULL);
551 proto_item_set_len(lock_item, offset-old_offset);
557 dissect_directory_server(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
559 proto_item* lock_item = NULL;
560 proto_tree* lock_tree = NULL;
561 int old_offset = offset;
563 lock_item = proto_tree_add_item(tree, hf_nisplus_server,
564 tvb, offset, -1, FALSE);
566 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_server);
568 offset = dissect_rpc_string(tvb, lock_tree,
569 hf_nisplus_server_name, offset, NULL);
571 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
572 dissect_endpoint, hf_nisplus_endpoints);
574 offset = dissect_rpc_uint32(tvb, lock_tree,
575 hf_nisplus_key_type, offset);
577 offset = dissect_rpc_data(tvb, lock_tree,
578 hf_nisplus_key_data, offset);
580 proto_item_set_len(lock_item, offset-old_offset);
586 dissect_directory_mask(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
588 proto_item* lock_item = NULL;
589 proto_tree* lock_tree = NULL;
590 int old_offset = offset;
592 lock_item = proto_tree_add_item(tree, hf_nisplus_directory_mask,
593 tvb, offset, -1, FALSE);
595 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory_mask);
597 offset = dissect_access_rights(tvb, offset, lock_tree);
599 offset = dissect_rpc_uint32(tvb, lock_tree,
600 hf_nisplus_object_type, offset);
602 proto_item_set_len(lock_item, offset-old_offset);
607 dissect_directory_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
609 proto_item* lock_item = NULL;
610 proto_tree* lock_tree = NULL;
611 int old_offset = offset;
613 lock_item = proto_tree_add_item(tree, hf_nisplus_directory,
614 tvb, offset, -1, FALSE);
616 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory);
618 offset = dissect_rpc_string(tvb, lock_tree,
619 hf_nisplus_directory_name, offset, NULL);
621 offset = dissect_rpc_uint32(tvb, lock_tree,
622 hf_nisplus_directory_type, offset);
624 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
625 dissect_directory_server, hf_nisplus_servers);
627 offset = dissect_rpc_uint32(tvb, lock_tree,
628 hf_nisplus_directory_ttl, offset);
630 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
631 dissect_directory_mask, hf_nisplus_directory_mask_list);
633 proto_item_set_len(lock_item, offset-old_offset);
638 dissect_nisplus_oid(tvbuff_t *tvb, int offset, proto_tree *tree)
640 proto_item* lock_item = NULL;
641 proto_tree* lock_tree = NULL;
642 int old_offset = offset;
644 lock_item = proto_tree_add_item(tree, hf_nisplus_oid, tvb,
647 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_oid);
649 offset = dissect_nisplus_time(tvb, offset, lock_tree,
650 hf_nisplus_object_ctime);
652 offset = dissect_nisplus_time(tvb, offset, lock_tree,
653 hf_nisplus_object_mtime);
655 proto_item_set_len(lock_item, offset-old_offset);
660 dissect_nisplus_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
662 proto_item* lock_item = NULL;
663 proto_tree* lock_tree = NULL;
665 int old_offset = offset;
667 lock_item = proto_tree_add_item(tree, hf_nisplus_object, tvb,
670 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_object);
672 offset = dissect_nisplus_oid(tvb, offset, lock_tree);
674 offset = dissect_rpc_string(tvb, lock_tree,
675 hf_nisplus_object_name, offset, NULL);
677 offset = dissect_rpc_string(tvb, lock_tree,
678 hf_nisplus_object_owner, offset, NULL);
680 offset = dissect_rpc_string(tvb, lock_tree,
681 hf_nisplus_object_group, offset, NULL);
683 offset = dissect_rpc_string(tvb, lock_tree,
684 hf_nisplus_object_domain, offset, NULL);
686 offset = dissect_access_rights(tvb, offset, lock_tree);
688 offset = dissect_rpc_uint32(tvb, lock_tree,
689 hf_nisplus_object_ttl, offset);
691 type = tvb_get_ntohl(tvb, offset);
692 offset = dissect_rpc_uint32(tvb, lock_tree,
693 hf_nisplus_object_type, offset);
695 case NIS_DIRECTORY_OBJ:
696 offset = dissect_directory_obj(tvb, offset, pinfo, lock_tree);
699 offset = dissect_group_obj(tvb, offset, pinfo, lock_tree);
702 offset = dissect_table_obj(tvb, offset, pinfo, lock_tree);
705 offset = dissect_entry_obj(tvb, offset, pinfo, lock_tree);
708 offset = dissect_link_obj(tvb, offset, pinfo, lock_tree);
710 case NIS_PRIVATE_OBJ:
711 offset = dissect_rpc_data(tvb, lock_tree,
712 hf_nisplus_object_private, offset);
722 proto_item_set_len(lock_item, offset-old_offset);
725 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
726 end of nis object, thats right, all this was the definition of
733 dissect_ns_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
735 offset = dissect_rpc_string(tvb, tree,
736 hf_nisplus_object_name, offset, NULL);
738 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
739 dissect_nisplus_object, hf_nisplus_object);
745 dissect_ib_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
747 offset = dissect_rpc_string(tvb, tree,
748 hf_nisplus_object_name, offset, NULL);
750 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
751 dissect_attr, hf_nisplus_attrs_array);
753 offset = dissect_rpc_uint32(tvb, tree,
754 hf_nisplus_ib_flags, offset);
756 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
757 dissect_nisplus_object, hf_nisplus_object);
759 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
760 dissect_directory_server, hf_nisplus_cbservers);
762 offset = dissect_rpc_uint32(tvb, tree,
763 hf_nisplus_ib_bufsize, offset);
765 offset = dissect_rpc_data(tvb, tree,
766 hf_nisplus_cookie, offset);
772 dissect_fd_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
774 offset = dissect_rpc_string(tvb, tree,
775 hf_nisplus_fd_dirname, offset, NULL);
777 offset = dissect_rpc_string(tvb, tree,
778 hf_nisplus_fd_requester, offset, NULL);
784 dissect_nisplus_tag(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
786 proto_item* lock_item = NULL;
787 proto_tree* lock_tree = NULL;
788 int old_offset = offset;
790 lock_item = proto_tree_add_item(tree, hf_nisplus_tag, tvb,
793 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_tag);
795 offset = dissect_rpc_uint32(tvb, lock_tree,
796 hf_nisplus_tag_type, offset);
798 offset = dissect_rpc_string(tvb, lock_tree,
799 hf_nisplus_tag_val, offset, NULL);
801 proto_item_set_len(lock_item, offset-old_offset);
806 dissect_nisplus_taglist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
808 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
809 dissect_nisplus_tag, hf_nisplus_taglist);
815 dissect_dump_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
817 offset = dissect_rpc_string(tvb, tree,
818 hf_nisplus_dump_dir, offset, NULL);
820 offset = dissect_nisplus_time(tvb, offset, tree,
821 hf_nisplus_dump_time);
823 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
824 dissect_directory_server, hf_nisplus_cbservers);
830 dissect_netobj(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
832 offset = dissect_rpc_data(tvb, tree,
833 hf_nisplus_dummy, offset);
839 dissect_nisname(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
841 offset = dissect_rpc_string(tvb, tree,
842 hf_nisplus_object_name, offset, NULL);
848 dissect_ping_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
850 offset = dissect_rpc_string(tvb, tree,
851 hf_nisplus_ping_dir, offset, NULL);
853 offset = dissect_nisplus_time(tvb, offset, tree,
854 hf_nisplus_ping_time);
860 static const value_string nis_error[] = {
861 #define NIS_SUCCESS 0
862 { NIS_SUCCESS, "A-ok, let's rock n roll" },
863 #define NIS_S_SUCCESS 1
864 { NIS_S_SUCCESS, "Name found (maybe)" },
865 #define NIS_NOTFOUND 2
866 { NIS_NOTFOUND, "Name definitely not found" },
867 #define NIS_S_NOTFOUND 3
868 { NIS_S_NOTFOUND, "Name maybe not found" },
869 #define NIS_CACHEEXPIRED 4
870 { NIS_CACHEEXPIRED, "Name exists but cache out of date" },
871 #define NIS_NAMEUNREACHABLE 5
872 { NIS_NAMEUNREACHABLE, "Can't get there from here" },
873 #define NIS_UNKNOWNOBJ 6
874 { NIS_UNKNOWNOBJ, "Object type is bogus" },
875 #define NIS_TRYAGAIN 7
876 { NIS_TRYAGAIN, "I'm busy, call back" },
877 #define NIS_SYSTEMERROR 8
878 { NIS_SYSTEMERROR, "Generic system error" },
879 #define NIS_CHAINBROKEN 9
880 { NIS_CHAINBROKEN, "First/Next warning" },
881 #define NIS_PERMISSION 10
882 { NIS_PERMISSION, "Not enough permission to access" },
883 #define NIS_NOTOWNER 11
884 { NIS_NOTOWNER, "You don't own it, sorry" },
885 #define NIS_NOT_ME 12
886 { NIS_NOT_ME, "I don't serve this name" },
887 #define NIS_NOMEMORY 13
888 { NIS_NOMEMORY, "Outta VM! Help!" },
889 #define NIS_NAMEEXISTS 14
890 { NIS_NAMEEXISTS, "Can't create over another name" },
891 #define NIS_NOTMASTER 15
892 { NIS_NOTMASTER, "I'm justa secondaray, don't ask me" },
893 #define NIS_INVALIDOBJ 16
894 { NIS_INVALIDOBJ, "Object is broken somehow" },
895 #define NIS_BADNAME 17
896 { NIS_BADNAME, "Unparsable name" },
897 #define NIS_NOCALLBACK 18
898 { NIS_NOCALLBACK, "Couldn't talk to call back proc" },
899 #define NIS_CBRESULTS 19
900 { NIS_CBRESULTS, "Results being called back to you" },
901 #define NIS_NOSUCHNAME 20
902 { NIS_NOSUCHNAME, "Name unknown" },
903 #define NIS_NOTUNIQUE 21
904 { NIS_NOTUNIQUE, "Value is not uniques (entry)" },
905 #define NIS_IBMODERROR 22
906 { NIS_IBMODERROR, "Inf. Base. Modify error." },
907 #define NIS_NOSUCHTABLE 23
908 { NIS_NOSUCHTABLE, "Name for table was wrong" },
909 #define NIS_TYPEMISMATCH 24
910 { NIS_TYPEMISMATCH, "Entry and table type mismatch" },
911 #define NIS_LINKNAMEERROR 25
912 { NIS_LINKNAMEERROR, "Link points to bogus name" },
913 #define NIS_PARTIAL 26
914 { NIS_PARTIAL, "Partial success, found table" },
915 #define NIS_TOOMANYATTRS 27
916 { NIS_TOOMANYATTRS, "Too many attributes" },
917 #define NIS_RPCERROR 28
918 { NIS_RPCERROR, "RPC error encountered" },
919 #define NIS_BADATTRIBUTE 29
920 { NIS_BADATTRIBUTE, "Bad or invalid attribute" },
921 #define NIS_NOTSEARCHABLE 30
922 { NIS_NOTSEARCHABLE, "Non-searchable object searched" },
923 #define NIS_CBERROR 31
924 { NIS_CBERROR, "Error during callback (svc crash)" },
925 #define NIS_FOREIGNNS 32
926 { NIS_FOREIGNNS, "Foreign Namespace" },
927 #define NIS_BADOBJECT 33
928 { NIS_BADOBJECT, "Malformed object structure" },
929 #define NIS_NOTSAMEOBJ 34
930 { NIS_NOTSAMEOBJ, "Object swapped during deletion" },
931 #define NIS_MODFAIL 35
932 { NIS_MODFAIL, "Failure during a Modify." },
933 #define NIS_BADREQUEST 36
934 { NIS_BADREQUEST, "Illegal query for table" },
935 #define NIS_NOTEMPTY 37
936 { NIS_NOTEMPTY, "Attempt to remove a non-empty tbl" },
937 #define NIS_COLDSTART_ERR 38
938 { NIS_COLDSTART_ERR, "Error accesing the cold start file" },
939 #define NIS_RESYNC 39
940 { NIS_RESYNC, "Transaction log too far out of date" },
942 { NIS_FAIL, "NIS operation failed." },
943 #define NIS_UNAVAIL 41
944 { NIS_UNAVAIL, "NIS+ service is unavailable (client)" },
945 #define NIS_RES2BIG 42
946 { NIS_RES2BIG, "NIS+ result too big for datagram" },
947 #define NIS_SRVAUTH 43
948 { NIS_SRVAUTH, "NIS+ server wasn't authenticated." },
949 #define NIS_CLNTAUTH 44
950 { NIS_CLNTAUTH, "NIS+ Client wasn't authenticated." },
951 #define NIS_NOFILESPACE 45
952 { NIS_NOFILESPACE, "NIS+ server ran out of disk space" },
953 #define NIS_NOPROC 46
954 { NIS_NOPROC, "NIS+ server couldn't create new proc" },
955 #define NIS_DUMPLATER 47
956 { NIS_DUMPLATER, "NIS+ server already has dump child" },
961 dissect_nisplus_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
963 offset = dissect_rpc_uint32(tvb, tree,
964 hf_nisplus_error, offset);
966 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
967 dissect_nisplus_object, hf_nisplus_object);
969 offset = dissect_rpc_data(tvb, tree,
970 hf_nisplus_cookie, offset);
972 offset = dissect_rpc_uint32(tvb, tree,
973 hf_nisplus_zticks, offset);
975 offset = dissect_rpc_uint32(tvb, tree,
976 hf_nisplus_dticks, offset);
978 offset = dissect_rpc_uint32(tvb, tree,
979 hf_nisplus_aticks, offset);
981 offset = dissect_rpc_uint32(tvb, tree,
982 hf_nisplus_cticks, offset);
988 dissect_fd_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
990 offset = dissect_rpc_uint32(tvb, tree,
991 hf_nisplus_error, offset);
993 offset = dissect_rpc_string(tvb, tree,
994 hf_nisplus_fd_dirname, offset, NULL);
996 offset = dissect_rpc_data(tvb, tree,
997 hf_nisplus_dir_data, offset);
999 offset = dissect_rpc_data(tvb, tree,
1000 hf_nisplus_signature, offset);
1005 static const value_string entry_type[] = {
1008 #define LOG_ADD_NAME 1
1009 { LOG_ADD_NAME, "Name Was Added" },
1010 #define LOG_REM_NAME 2
1011 { LOG_REM_NAME, "Name Was Removed" },
1012 #define LOG_MOD_NAME_OLD 3
1013 { LOG_MOD_NAME_OLD, "Name Was Modified" },
1014 #define LOG_MOD_NAME_NEW 4
1015 { LOG_MOD_NAME_NEW, "Name Was Modified" },
1016 #define LOG_ADD_IBASE 5
1017 { LOG_ADD_IBASE, "Entry Added To Information Base" },
1018 #define LOG_REM_IBASE 6
1019 { LOG_REM_IBASE, "Entry Removed From Information Base" },
1020 #define LOG_MOD_IBASE 7
1021 { LOG_MOD_IBASE, "Entry Modified In Information Base" },
1022 #define LOG_UPD_STAMP 8
1023 { LOG_UPD_STAMP, "Update Timestamp" },
1027 dissect_log_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1029 proto_item* lock_item = NULL;
1030 proto_tree* lock_tree = NULL;
1031 int old_offset = offset;
1033 lock_item = proto_tree_add_item(tree, hf_nisplus_log_entry,
1034 tvb, offset, -1, FALSE);
1036 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_log_entry);
1038 offset = dissect_nisplus_time(tvb, offset, lock_tree,
1039 hf_nisplus_log_time);
1041 offset = dissect_rpc_uint32(tvb, lock_tree,
1042 hf_nisplus_log_type, offset);
1044 offset = dissect_rpc_string(tvb, lock_tree,
1045 hf_nisplus_log_principal, offset, NULL);
1047 offset = dissect_rpc_string(tvb, lock_tree,
1048 hf_nisplus_directory_name, offset, NULL);
1050 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
1051 dissect_attr, hf_nisplus_attrs_array);
1053 offset = dissect_nisplus_object(tvb, offset, pinfo, lock_tree);
1055 proto_item_set_len(lock_item, offset-old_offset);
1060 dissect_log_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1062 offset = dissect_rpc_uint32(tvb, tree,
1063 hf_nisplus_error, offset);
1065 offset = dissect_rpc_data(tvb, tree,
1066 hf_nisplus_cookie, offset);
1068 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1069 dissect_log_entry, hf_nisplus_log_entries);
1075 dissect_callback_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1077 offset = dissect_rpc_bool(tvb, tree, hf_nisplus_callback_status,
1084 dissect_change_time(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1086 offset = dissect_nisplus_time(tvb, offset, tree,
1087 hf_nisplus_log_time);
1093 dissect_cp_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1095 offset = dissect_rpc_uint32(tvb, tree,
1096 hf_nisplus_cp_status, offset);
1098 offset = dissect_rpc_uint32(tvb, tree,
1099 hf_nisplus_cp_zticks, offset);
1101 offset = dissect_rpc_uint32(tvb, tree,
1102 hf_nisplus_cp_dticks, offset);
1108 dissect_nisplus_error(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1110 offset = dissect_rpc_uint32(tvb, tree,
1111 hf_nisplus_error, offset);
1116 /* proc number, "proc name", dissect_request, dissect_reply */
1117 /* NULL as function pointer means: type of arguments is "void". */
1118 static const vsff nisplus3_proc[] = {
1119 { NISPROC_NULL, "NULL",
1121 { NISPROC_LOOKUP, "LOOKUP",
1122 dissect_ns_request, dissect_nisplus_result },
1123 { NISPROC_ADD, "ADD",
1124 dissect_ns_request, dissect_nisplus_result },
1125 { NISPROC_MODIFY, "MODIFY",
1126 dissect_ns_request, dissect_nisplus_result },
1127 { NISPROC_REMOVE, "REMOVE",
1128 dissect_ns_request, dissect_nisplus_result },
1129 { NISPROC_IBLIST, "IBLIST",
1130 dissect_ib_request, dissect_nisplus_result },
1131 { NISPROC_IBADD, "IBADD",
1132 dissect_ib_request, dissect_nisplus_result },
1133 { NISPROC_IBMODIFY, "IBMODIFY",
1134 dissect_ib_request, dissect_nisplus_result },
1135 { NISPROC_IBREMOVE, "IBREMOVE",
1136 dissect_ib_request, dissect_nisplus_result },
1137 { NISPROC_IBFIRST, "IBFIRST",
1138 dissect_ib_request, dissect_nisplus_result },
1139 { NISPROC_IBNEXT, "IBNEXT",
1140 dissect_ib_request, dissect_nisplus_result },
1141 { NISPROC_FINDDIRECTORY, "FINDDIRECTORY",
1142 dissect_fd_args, dissect_fd_result },
1143 { NISPROC_STATUS, "STATUS",
1144 dissect_nisplus_taglist, dissect_nisplus_taglist },
1145 { NISPROC_DUMPLOG, "DUMPLOG",
1146 dissect_dump_args, dissect_log_result },
1147 { NISPROC_DUMP, "DUMP",
1148 dissect_dump_args, dissect_log_result },
1149 { NISPROC_CALLBACK, "CALLBACK",
1150 dissect_netobj, dissect_callback_result },
1151 { NISPROC_CPTIME, "CPTIME",
1152 dissect_nisname, dissect_change_time },
1153 { NISPROC_CHECKPOINT, "CHECKPOINT",
1154 dissect_nisname, dissect_cp_result },
1155 { NISPROC_PING, "PING",
1156 dissect_ping_args, NULL },
1157 { NISPROC_SERVSTATE, "SERVSTATE",
1158 dissect_nisplus_taglist, dissect_nisplus_taglist },
1159 { NISPROC_MKDIR, "MKDIR",
1160 dissect_nisname, dissect_nisplus_error },
1161 { NISPROC_RMDIR, "RMDIR",
1162 dissect_nisname, dissect_nisplus_error },
1163 { NISPROC_UPDKEYS, "UPDKEYS",
1164 dissect_nisname, dissect_nisplus_error },
1165 { 0, NULL, NULL, NULL }
1171 proto_register_nis(void)
1173 static const true_false_string tfs_col_binary = {
1175 "column is NOT binary"
1177 static const true_false_string tfs_col_encrypted = {
1178 "column is encrypted",
1179 "column is NOT encrypted"
1181 static const true_false_string tfs_col_xdr = {
1182 "column is xdr encoded",
1183 "column is NOT xdr encoded"
1185 static const true_false_string tfs_col_searchable = {
1186 "column is searchable",
1187 "column is NOT searchable"
1189 static const true_false_string tfs_col_casesensitive = {
1190 "column is case sensitive",
1191 "column is NOT case sensitive"
1193 static const true_false_string tfs_col_modified = {
1194 "column is modified",
1195 "column is NOT modified"
1197 static const true_false_string tfs_col_asn = {
1198 "column is asn.1 encoded",
1199 "column is NOT asn.1 encoded"
1202 static const true_false_string tfs_entry_binary = {
1204 "entry is NOT binary"
1207 static const true_false_string tfs_entry_crypt = {
1208 "entry is encrypted",
1209 "entry is NOT encrypted"
1212 static const true_false_string tfs_entry_xdr = {
1213 "entry is xdr encoded",
1214 "entry is NOT xdr encoded"
1217 static const true_false_string tfs_entry_modified = {
1218 "entry is modified",
1219 "entry is NOT modified"
1222 static const true_false_string tfs_entry_asn = {
1223 "entry is asn.1 encoded",
1224 "entry is NOT asn.1 encoded"
1227 static const true_false_string tfs_world_read = {
1229 "world can NOT read"
1232 static const true_false_string tfs_world_modify = {
1234 "world can NOT modify"
1237 static const true_false_string tfs_world_create = {
1239 "world can NOT create"
1242 static const true_false_string tfs_world_destroy = {
1243 "world can destroy",
1244 "world can NOT destroy"
1247 static const true_false_string tfs_group_read = {
1249 "group can NOT read"
1252 static const true_false_string tfs_group_modify = {
1254 "group can NOT modify"
1257 static const true_false_string tfs_group_create = {
1259 "group can NOT create"
1262 static const true_false_string tfs_group_destroy = {
1263 "group can destroy",
1264 "group can NOT destroy"
1267 static const true_false_string tfs_owner_read = {
1269 "owner can NOT read"
1272 static const true_false_string tfs_owner_modify = {
1274 "owner can NOT modify"
1277 static const true_false_string tfs_owner_create = {
1279 "owner can NOT create"
1282 static const true_false_string tfs_owner_destroy = {
1283 "owner can destroy",
1284 "owner can NOT destroy"
1287 static const true_false_string tfs_nobody_read = {
1289 "nobody can NOT read"
1292 static const true_false_string tfs_nobody_modify = {
1293 "nobody can modify",
1294 "nobody can NOT modify"
1297 static const true_false_string tfs_nobody_create = {
1298 "nobody can create",
1299 "nobody can NOT create"
1302 static const true_false_string tfs_nobody_destroy = {
1303 "nobody can destroy",
1304 "nobody can NOT destroy"
1307 static const true_false_string tfs_callback_status = {
1315 static hf_register_info hf[] = {
1316 { &hf_nisplus_object, {
1317 "NIS Object", "nisplus.object", FT_NONE, BASE_NONE,
1318 NULL, 0, "NIS Object", HFILL }},
1320 { &hf_nisplus_oid, {
1321 "Object Identity Verifier", "nisplus.object.oid", FT_NONE, BASE_NONE,
1322 NULL, 0, "NIS Object Identity Verifier", HFILL }},
1324 { &hf_nisplus_object_name, {
1325 "name", "nisplus.object.name", FT_STRING, BASE_DEC,
1326 NULL, 0, "NIS Name For This Object", HFILL }},
1328 { &hf_nisplus_object_owner, {
1329 "owner", "nisplus.object.owner", FT_STRING, BASE_DEC,
1330 NULL, 0, "NIS Name Of Object Owner", HFILL }},
1332 { &hf_nisplus_object_group, {
1333 "group", "nisplus.object.group", FT_STRING, BASE_DEC,
1334 NULL, 0, "NIS Name Of Access Group", HFILL }},
1336 { &hf_nisplus_object_domain, {
1337 "domain", "nisplus.object.domain", FT_STRING, BASE_DEC,
1338 NULL, 0, "NIS Administrator For This Object", HFILL }},
1340 { &hf_nisplus_object_ttl, {
1341 "ttl", "nisplus.object.ttl", FT_UINT32, BASE_DEC,
1342 NULL, 0, "NIS Time To Live For This Object", HFILL }},
1344 { &hf_nisplus_object_private, {
1345 "private", "nisplus.object.private", FT_BYTES, BASE_DEC,
1346 NULL, 0, "NIS Private Object", HFILL }},
1348 { &hf_nisplus_directory, {
1349 "directory", "nisplus.directory", FT_NONE, BASE_NONE,
1350 NULL, 0, "NIS Directory Object", HFILL }},
1352 { &hf_nisplus_directory_name, {
1353 "directory name", "nisplus.directory.name", FT_STRING, BASE_DEC,
1354 NULL, 0, "Name Of Directory Being Served", HFILL }},
1356 { &hf_nisplus_directory_type, {
1357 "type", "nisplus.directory.type", FT_UINT32, BASE_DEC,
1358 VALS(ns_type), 0, "NIS Type Of Name Service", HFILL }},
1360 { &hf_nisplus_directory_ttl, {
1361 "ttl", "nisplus.directory.ttl", FT_UINT32, BASE_DEC,
1362 NULL, 0, "Time To Live", HFILL }},
1364 { &hf_nisplus_directory_mask, {
1365 "mask", "nisplus.directory.mask", FT_NONE, BASE_NONE,
1366 NULL, 0, "NIS Directory Create/Destroy Rights", HFILL }},
1368 { &hf_nisplus_directory_mask_list, {
1369 "mask list", "nisplus.directory.mask_list", FT_NONE, BASE_NONE,
1370 NULL, 0, "List Of Directory Create/Destroy Rights", HFILL }},
1372 { &hf_nisplus_mask_world_read, {
1373 "WORLD READ", "nisplus.directory.mask.world_read",
1374 FT_BOOLEAN, 32, TFS(&tfs_world_read),
1375 NIS_MASK_WORLD_READ, "World Read Flag", HFILL }},
1377 { &hf_nisplus_mask_world_modify, {
1378 "WORLD MODIFY", "nisplus.directory.mask.world_modify",
1379 FT_BOOLEAN, 32, TFS(&tfs_world_modify),
1380 NIS_MASK_WORLD_MODIFY, "World Modify Flag", HFILL }},
1382 { &hf_nisplus_mask_world_create, {
1383 "WORLD CREATE", "nisplus.directory.mask.world_create",
1384 FT_BOOLEAN, 32, TFS(&tfs_world_create),
1385 NIS_MASK_WORLD_CREATE, "World Create Flag", HFILL }},
1387 { &hf_nisplus_mask_world_destroy, {
1388 "WORLD DESTROY", "nisplus.directory.mask.world_destroy",
1389 FT_BOOLEAN, 32, TFS(&tfs_world_destroy),
1390 NIS_MASK_WORLD_DESTROY, "World Destroy Flag", HFILL }},
1392 { &hf_nisplus_mask_group_read, {
1393 "GROUP READ", "nisplus.directory.mask.group_read",
1394 FT_BOOLEAN, 32, TFS(&tfs_group_read),
1395 NIS_MASK_GROUP_READ, "Group Read Flag", HFILL }},
1397 { &hf_nisplus_mask_group_modify, {
1398 "GROUP MODIFY", "nisplus.directory.mask.group_modify",
1399 FT_BOOLEAN, 32, TFS(&tfs_group_modify),
1400 NIS_MASK_GROUP_MODIFY, "Group Modify Flag", HFILL }},
1402 { &hf_nisplus_mask_group_create, {
1403 "GROUP CREATE", "nisplus.directory.mask.group_create",
1404 FT_BOOLEAN, 32, TFS(&tfs_group_create),
1405 NIS_MASK_GROUP_CREATE, "Group Create Flag", HFILL }},
1407 { &hf_nisplus_mask_group_destroy, {
1408 "GROUP DESTROY", "nisplus.directory.mask.group_destroy",
1409 FT_BOOLEAN, 32, TFS(&tfs_group_destroy),
1410 NIS_MASK_GROUP_DESTROY, "Group Destroy Flag", HFILL }},
1412 { &hf_nisplus_mask_owner_read, {
1413 "OWNER READ", "nisplus.directory.mask.owner_read",
1414 FT_BOOLEAN, 32, TFS(&tfs_owner_read),
1415 NIS_MASK_OWNER_READ, "Owner Read Flag", HFILL }},
1417 { &hf_nisplus_mask_owner_modify, {
1418 "OWNER MODIFY", "nisplus.directory.mask.owner_modify",
1419 FT_BOOLEAN, 32, TFS(&tfs_owner_modify),
1420 NIS_MASK_OWNER_MODIFY, "Owner Modify Flag", HFILL }},
1422 { &hf_nisplus_mask_owner_create, {
1423 "OWNER CREATE", "nisplus.directory.mask.owner_create",
1424 FT_BOOLEAN, 32, TFS(&tfs_owner_create),
1425 NIS_MASK_OWNER_CREATE, "Owner Create Flag", HFILL }},
1427 { &hf_nisplus_mask_owner_destroy, {
1428 "OWNER DESTROY", "nisplus.directory.mask.owner_destroy",
1429 FT_BOOLEAN, 32, TFS(&tfs_owner_destroy),
1430 NIS_MASK_OWNER_DESTROY, "Owner Destroy Flag", HFILL }},
1432 { &hf_nisplus_mask_nobody_read, {
1433 "NOBODY READ", "nisplus.directory.mask.nobody_read",
1434 FT_BOOLEAN, 32, TFS(&tfs_nobody_read),
1435 NIS_MASK_NOBODY_READ, "Nobody Read Flag", HFILL }},
1437 { &hf_nisplus_mask_nobody_modify, {
1438 "NOBODY MODIFY", "nisplus.directory.mask.nobody_modify",
1439 FT_BOOLEAN, 32, TFS(&tfs_nobody_modify),
1440 NIS_MASK_NOBODY_MODIFY, "Nobody Modify Flag", HFILL }},
1442 { &hf_nisplus_mask_nobody_create, {
1443 "NOBODY CREATE", "nisplus.directory.mask.nobody_create",
1444 FT_BOOLEAN, 32, TFS(&tfs_nobody_create),
1445 NIS_MASK_NOBODY_CREATE, "Nobody Create Flag", HFILL }},
1447 { &hf_nisplus_mask_nobody_destroy, {
1448 "NOBODY DESTROY", "nisplus.directory.mask.nobody_destroy",
1449 FT_BOOLEAN, 32, TFS(&tfs_nobody_destroy),
1450 NIS_MASK_NOBODY_DESTROY, "Nobody Destroy Flag", HFILL }},
1452 { &hf_nisplus_access_mask, {
1453 "access mask", "nisplus.access.mask", FT_NONE, BASE_NONE,
1454 NULL, 0, "NIS Access Mask", HFILL }},
1456 { &hf_nisplus_object_type, {
1457 "type", "nisplus.object.type", FT_UINT32, BASE_DEC,
1458 VALS(obj_type), 0, "NIS Type Of Object", HFILL }},
1460 { &hf_nisplus_servers, {
1461 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1462 NULL, 0, "NIS Servers For This Directory", HFILL }},
1464 { &hf_nisplus_cbservers, {
1465 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1466 NULL, 0, "Optional Callback Server", HFILL }},
1468 { &hf_nisplus_server, {
1469 "server", "nisplus.server", FT_NONE, BASE_NONE,
1470 NULL, 0, "NIS Server For This Directory", HFILL }},
1472 { &hf_nisplus_server_name, {
1473 "name", "nisplus.server.name", FT_STRING, BASE_DEC,
1474 NULL, 0, "Name Of NIS Server", HFILL }},
1476 { &hf_nisplus_key_type, {
1477 "type", "nisplus.key.type", FT_UINT32, BASE_DEC,
1478 VALS(key_type), 0, "Type Of Key", HFILL }},
1480 { &hf_nisplus_key_data, {
1481 "key data", "nisplus.key.data", FT_BYTES, BASE_DEC,
1482 NULL, 0, "Encryption Key", HFILL }},
1484 { &hf_nisplus_endpoints, {
1485 "nis endpoints", "nisplus.endpoints", FT_NONE, BASE_NONE,
1486 NULL, 0, "Endpoints For This NIS Server", HFILL }},
1488 { &hf_nisplus_endpoint, {
1489 "endpoint", "nisplus.endpoint", FT_NONE, BASE_NONE,
1490 NULL, 0, "Endpoint For This NIS Server", HFILL }},
1492 { &hf_nisplus_endpoint_uaddr, {
1493 "addr", "nisplus.endpoint.uaddr", FT_STRING, BASE_DEC,
1494 NULL, 0, "Address", HFILL }},
1496 { &hf_nisplus_endpoint_family, {
1497 "family", "nisplus.endpoint.family", FT_STRING, BASE_DEC,
1498 NULL, 0, "Transport Family", HFILL }},
1500 { &hf_nisplus_endpoint_proto, {
1501 "proto", "nisplus.endpoint.proto", FT_STRING, BASE_DEC,
1502 NULL, 0, "Protocol", HFILL }},
1504 { &hf_nisplus_link, {
1505 "link", "nisplus.link", FT_NONE, BASE_NONE,
1506 NULL, 0, "NIS Link Object", HFILL }},
1508 { &hf_nisplus_attrs_array, {
1509 "Attributes", "nisplus.attributes", FT_NONE, BASE_NONE,
1510 NULL, 0, "List Of Attributes", HFILL }},
1512 { &hf_nisplus_attr, {
1513 "Attribute", "nisplus.attr", FT_NONE, BASE_NONE,
1514 NULL, 0, "Attribute", HFILL }},
1516 { &hf_nisplus_attr_name, {
1517 "name", "nisplus.attr.name", FT_STRING, BASE_DEC,
1518 NULL, 0, "Attribute Name", HFILL }},
1520 { &hf_nisplus_attr_val, {
1521 "val", "nisplus.attr.val", FT_BYTES, BASE_HEX,
1522 NULL, 0, "Attribute Value", HFILL }},
1524 { &hf_nisplus_entry, {
1525 "entry", "nisplus.entry", FT_NONE, BASE_NONE,
1526 NULL, 0, "Entry Object", HFILL }},
1528 { &hf_nisplus_entry_type, {
1529 "type", "nisplus.entry.type", FT_STRING, BASE_DEC,
1530 NULL, 0, "Entry Type", HFILL }},
1532 { &hf_nisplus_entry_cols, {
1533 "columns", "nisplus.entry.cols", FT_NONE, BASE_NONE,
1534 NULL, 0, "Entry Columns", HFILL }},
1536 { &hf_nisplus_entry_col, {
1537 "column", "nisplus.entry.col", FT_NONE, BASE_NONE,
1538 NULL, 0, "Entry Column", HFILL }},
1540 { &hf_nisplus_entry_flags, {
1541 "flags", "nisplus.entry.flags", FT_UINT32, BASE_HEX,
1542 NULL, 0, "Entry Col Flags", HFILL }},
1544 { &hf_nisplus_entry_val, {
1545 "val", "nisplus.entry.val", FT_STRING, BASE_DEC,
1546 NULL, 0, "Entry Value", HFILL }},
1548 { &hf_nisplus_entry_mask, {
1549 "flags", "nisplus.entry.flags", FT_NONE, BASE_NONE,
1550 NULL, 0, "Entry Col Flags", HFILL }},
1552 { &hf_nisplus_entry_mask_binary, {
1553 "BINARY", "nisplus.entry.flags.binary",
1554 FT_BOOLEAN, 32, TFS(&tfs_entry_binary),
1555 NIS_MASK_ENTRY_BINARY, "Is This Entry BINARY Flag", HFILL }},
1557 { &hf_nisplus_entry_mask_crypt, {
1558 "ENCRYPTED", "nisplus.entry.flags.encrypted",
1559 FT_BOOLEAN, 32, TFS(&tfs_entry_crypt),
1560 NIS_MASK_ENTRY_CRYPT, "Is This Entry ENCRYPTED Flag", HFILL }},
1562 { &hf_nisplus_entry_mask_xdr, {
1563 "XDR", "nisplus.entry.flags.xdr",
1564 FT_BOOLEAN, 32, TFS(&tfs_entry_xdr),
1565 NIS_MASK_ENTRY_XDR, "Is This Entry XDR Encoded Flag", HFILL }},
1567 { &hf_nisplus_entry_mask_modified, {
1568 "MODIFIED", "nisplus.entry.flags.modified",
1569 FT_BOOLEAN, 32, TFS(&tfs_entry_modified),
1570 NIS_MASK_ENTRY_MODIFIED, "Is This Entry MODIFIED Flag", HFILL }},
1572 { &hf_nisplus_entry_mask_asn, {
1573 "ASN.1", "nisplus.entry.flags.asn",
1574 FT_BOOLEAN, 32, TFS(&tfs_entry_asn),
1575 NIS_MASK_ENTRY_ASN, "Is This Entry ASN.1 Encoded Flag", HFILL }},
1577 { &hf_nisplus_table, {
1578 "table", "nisplus.table", FT_NONE, BASE_NONE,
1579 NULL, 0, "Table Object", HFILL }},
1581 { &hf_nisplus_table_type, {
1582 "type", "nisplus.table.type", FT_STRING, BASE_DEC,
1583 NULL, 0, "Table Type", HFILL }},
1585 { &hf_nisplus_table_maxcol, {
1586 "max columns", "nisplus.table.maxcol", FT_UINT16, BASE_DEC,
1587 NULL, 0, "Maximum Number Of Columns For Table", HFILL }},
1589 { &hf_nisplus_table_sep, {
1590 "separator", "nisplus.table.separator", FT_UINT8, BASE_HEX,
1591 NULL, 0, "Separator Character", HFILL }},
1593 { &hf_nisplus_table_cols, {
1594 "columns", "nisplus.table.cols", FT_NONE, BASE_NONE,
1595 NULL, 0, "Table Columns", HFILL }},
1597 { &hf_nisplus_table_col, {
1598 "column", "nisplus.table.col", FT_NONE, BASE_NONE,
1599 NULL, 0, "Table Column", HFILL }},
1601 { &hf_nisplus_table_path, {
1602 "path", "nisplus.table.path", FT_STRING, BASE_DEC,
1603 NULL, 0, "Table Path", HFILL }},
1605 { &hf_nisplus_table_col_name, {
1606 "column name", "nisplus.table.col.name", FT_STRING, BASE_DEC,
1607 NULL, 0, "Column Name", HFILL }},
1609 { &hf_nisplus_table_col_mask, {
1610 "flags", "nisplus.table.col.flags", FT_NONE, BASE_NONE,
1611 NULL, 0, "Flags For This Column", HFILL }},
1613 { &hf_nisplus_table_col_mask_binary, {
1614 "binary", "nisplus.table.flags.binary",
1615 FT_BOOLEAN, 32, TFS(&tfs_col_binary),
1616 NIS_MASK_TABLE_BINARY, "Is This Column BINARY", HFILL }},
1618 { &hf_nisplus_table_col_mask_encrypted, {
1619 "encrypted", "nisplus.table.flags.encrypted",
1620 FT_BOOLEAN, 32, TFS(&tfs_col_encrypted),
1621 NIS_MASK_TABLE_CRYPT, "Is This Column ENCRYPTED", HFILL }},
1623 { &hf_nisplus_table_col_mask_xdr, {
1624 "xdr", "nisplus.table.flags.xdr",
1625 FT_BOOLEAN, 32, TFS(&tfs_col_xdr),
1626 NIS_MASK_TABLE_XDR, "Is This Column XDR Encoded", HFILL }},
1628 { &hf_nisplus_table_col_mask_searchable, {
1629 "searchable", "nisplus.table.flags.searchable",
1630 FT_BOOLEAN, 32, TFS(&tfs_col_searchable),
1631 NIS_MASK_TABLE_SRCH, "Is This Column SEARCHABLE", HFILL }},
1633 { &hf_nisplus_table_col_mask_casesensitive, {
1634 "casesensitive", "nisplus.table.flags.casesensitive",
1635 FT_BOOLEAN, 32, TFS(&tfs_col_casesensitive),
1636 NIS_MASK_TABLE_CASE, "Is This Column CASESENSITIVE", HFILL }},
1638 { &hf_nisplus_table_col_mask_modified, {
1639 "modified", "nisplus.table.flags.modified",
1640 FT_BOOLEAN, 32, TFS(&tfs_col_modified),
1641 NIS_MASK_TABLE_MODIFIED, "Is This Column MODIFIED", HFILL }},
1643 { &hf_nisplus_table_col_mask_asn, {
1644 "asn", "nisplus.table.flags.asn",
1645 FT_BOOLEAN, 32, TFS(&tfs_col_asn),
1646 NIS_MASK_TABLE_ASN, "Is This Column ASN.1 Encoded", HFILL }},
1648 { &hf_nisplus_group, {
1649 "Group", "nisplus.group", FT_NONE, BASE_NONE,
1650 NULL, 0, "Group Object", HFILL }},
1652 { &hf_nisplus_grps, {
1653 "Groups", "nisplus.grps", FT_NONE, BASE_NONE,
1654 NULL, 0, "List Of Groups", HFILL }},
1656 { &hf_nisplus_group_flags, {
1657 "flags", "nisplus.group.flags", FT_UINT32, BASE_HEX,
1658 NULL, 0, "Group Object Flags", HFILL }},
1660 { &hf_nisplus_group_name, {
1661 "group name", "nisplus.group.name", FT_STRING, BASE_DEC,
1662 NULL, 0, "Name Of Group Member", HFILL }},
1664 { &hf_nisplus_object_ctime, {
1665 "ctime", "nisplus.ctime", FT_ABSOLUTE_TIME, BASE_NONE,
1666 NULL, 0, "Time Of Creation", HFILL }},
1668 { &hf_nisplus_object_mtime, {
1669 "mtime", "nisplus.mtime", FT_ABSOLUTE_TIME, BASE_NONE,
1670 NULL, 0, "Time Last Modified", HFILL }},
1672 { &hf_nisplus_ib_flags, {
1673 "flags", "nisplus.ib.flags", FT_UINT32, BASE_HEX,
1674 NULL, 0, "Information Base Flags", HFILL }},
1676 { &hf_nisplus_ib_bufsize, {
1677 "bufsize", "nisplus.ib.bufsize", FT_UINT32, BASE_HEX,
1678 NULL, 0, "Optional First/NextBufSize", HFILL }},
1680 { &hf_nisplus_cookie, {
1681 "cookie", "nisplus.cookie", FT_BYTES, BASE_HEX,
1682 NULL, 0, "Cookie", HFILL }},
1684 { &hf_nisplus_fd_dirname, {
1685 "dirname", "nisplus.fd.dirname", FT_STRING, BASE_DEC,
1686 NULL, 0, "Directory Name", HFILL }},
1688 { &hf_nisplus_fd_requester, {
1689 "requester", "nisplus.fd.requester", FT_STRING, BASE_DEC,
1690 NULL, 0, "Host Principal Name For Signature", HFILL }},
1692 { &hf_nisplus_taglist, {
1693 "taglist", "nisplus.taglist", FT_NONE, BASE_NONE,
1694 NULL, 0, "List Of Tags", HFILL }},
1696 { &hf_nisplus_tag, {
1697 "tag", "nisplus.tag", FT_NONE, BASE_NONE,
1698 NULL, 0, "Tag", HFILL }},
1700 { &hf_nisplus_tag_type, {
1701 "type", "nisplus.tag.type", FT_UINT32, BASE_DEC,
1702 NULL, 0, "Type Of Statistics Tag", HFILL }},
1704 { &hf_nisplus_tag_val, {
1705 "value", "nisplus.tag.value", FT_STRING, BASE_DEC,
1706 NULL, 0, "Value Of Statistics Tag", HFILL }},
1708 { &hf_nisplus_dump_dir, {
1709 "directory", "nisplus.dump.dir", FT_STRING, BASE_DEC,
1710 NULL, 0, "Directory To Dump", HFILL }},
1712 { &hf_nisplus_dump_time, {
1713 "time", "nisplus.dump.time", FT_ABSOLUTE_TIME, BASE_NONE,
1714 NULL, 0, "From This Timestamp", HFILL }},
1716 { &hf_nisplus_dummy, {
1717 " ", ".nisplus.dummy", FT_BYTES, BASE_NONE,
1718 NULL, 0, " ", HFILL }},
1720 { &hf_nisplus_ping_time, {
1721 "time", "nisplus.ping.time", FT_ABSOLUTE_TIME, BASE_NONE,
1722 NULL, 0, "Timestamp Of The Transaction", HFILL }},
1724 { &hf_nisplus_ping_dir, {
1725 "directory", "nisplus.ping.dir", FT_STRING, BASE_DEC,
1726 NULL, 0, "Directory That Had The Change", HFILL }},
1728 { &hf_nisplus_error, {
1729 "status", "nisplus.status", FT_UINT32, BASE_DEC,
1730 VALS(nis_error), 0, "NIS Status Code", HFILL }},
1732 { &hf_nisplus_dir_data, {
1733 "data", "nisplus.fd.dir.data", FT_BYTES, BASE_HEX,
1734 NULL, 0, "Directory Data In XDR Format", HFILL }},
1736 { &hf_nisplus_signature, {
1737 "signature", "nisplus.fd.sig", FT_BYTES, BASE_HEX,
1738 NULL, 0, "Signature Of The Source", HFILL }},
1740 { &hf_nisplus_log_entries, {
1741 "log entries", "nisplus.log.entries", FT_NONE, BASE_NONE,
1742 NULL, 0, "Log Entries", HFILL }},
1744 { &hf_nisplus_log_entry, {
1745 "log entry", "nisplus.log.entry", FT_NONE, BASE_NONE,
1746 NULL, 0, "Log Entry", HFILL }},
1748 { &hf_nisplus_log_time, {
1749 "time", "nisplus.log.time", FT_ABSOLUTE_TIME, BASE_NONE,
1750 NULL, 0, "Time Of Log Entry", HFILL }},
1752 { &hf_nisplus_log_type, {
1753 "type", "nisplus.log.entry.type", FT_UINT32, BASE_DEC,
1754 VALS(entry_type), 0, "Type Of Entry In Transaction Log", HFILL }},
1756 { &hf_nisplus_log_principal, {
1757 "principal", "nisplus.log.principal", FT_STRING, BASE_DEC,
1758 NULL, 0, "Principal Making The Change", HFILL }},
1760 { &hf_nisplus_callback_status, {
1761 "status", "nisplus.callback.status",
1762 FT_BOOLEAN, 0, TFS(&tfs_callback_status),
1763 0, "Status Of Callback Thread", HFILL }},
1765 { &hf_nisplus_cp_status, {
1766 "status", "nisplus.checkpoint.status", FT_UINT32, BASE_DEC,
1767 NULL, 0, "Checkpoint Status", HFILL }},
1769 { &hf_nisplus_cp_zticks, {
1770 "zticks", "nisplus.checkpoint.zticks", FT_UINT32, BASE_DEC,
1771 NULL, 0, "Service Ticks", HFILL }},
1773 { &hf_nisplus_cp_dticks, {
1774 "dticks", "nisplus.checkpoint.dticks", FT_UINT32, BASE_DEC,
1775 NULL, 0, "Database Ticks", HFILL }},
1777 { &hf_nisplus_zticks, {
1778 "zticks", "nisplus.zticks", FT_UINT32, BASE_DEC,
1779 NULL, 0, "", HFILL }},
1781 { &hf_nisplus_dticks, {
1782 "dticks", "nisplus.dticks", FT_UINT32, BASE_DEC,
1783 NULL, 0, "", HFILL }},
1785 { &hf_nisplus_aticks, {
1786 "aticks", "nisplus.aticks", FT_UINT32, BASE_DEC,
1787 NULL, 0, "", HFILL }},
1789 { &hf_nisplus_cticks, {
1790 "cticks", "nisplus.cticks", FT_UINT32, BASE_DEC,
1791 NULL, 0, "", HFILL }},
1795 static gint *ett[] = {
1797 &ett_nisplus_object,
1799 &ett_nisplus_directory,
1800 &ett_nisplus_directory_mask,
1801 &ett_nisplus_access_mask,
1802 &ett_nisplus_server,
1803 &ett_nisplus_endpoint,
1807 &ett_nisplus_entry_col,
1808 &ett_nisplus_entry_mask,
1810 &ett_nisplus_table_col,
1811 &ett_nisplus_table_col_mask,
1815 &ett_nisplus_log_entry,
1818 proto_nisplus = proto_register_protocol("NIS+",
1820 proto_register_field_array(proto_nisplus, hf, array_length(hf));
1821 proto_register_subtree_array(ett, array_length(ett));
1825 proto_reg_handoff_nis(void)
1827 /* Register the protocol as RPC */
1828 rpc_init_prog(proto_nisplus, NIS_PROGRAM, ett_nisplus);
1829 /* Register the procedure tables */
1830 rpc_init_proc_table(NIS_PROGRAM, 3, nisplus3_proc);
1838 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1839 callback protocol for NIS+
1840 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
1842 static int proto_nispluscb = -1;
1843 static int hf_nispluscb_entries = -1;
1844 static int hf_nispluscb_entry = -1;
1846 static gint ett_nispluscb = -1;
1847 static gint ett_nispluscb_entry = -1;
1850 dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1852 proto_item* lock_item = NULL;
1853 proto_tree* lock_tree = NULL;
1854 int old_offset = offset;
1856 lock_item = proto_tree_add_item(tree, hf_nispluscb_entry,
1857 tvb, offset, -1, FALSE);
1859 lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry);
1861 /*XXXXX Not implemented yet*/
1863 proto_item_set_len(lock_item, offset-old_offset);
1868 dissect_cback_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1870 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1871 dissect_cb_entry, hf_nispluscb_entries);
1876 /* proc number, "proc name", dissect_request, dissect_reply */
1877 /* NULL as function pointer means: type of arguments is "void". */
1878 static const vsff cb1_proc[] = {
1879 { CBPROC_NULL, "NULL",
1881 { CBPROC_RECEIVE, "NULL",
1882 dissect_cback_data, dissect_callback_result },
1883 { CBPROC_FINISH, "NULL",
1885 { CBPROC_ERROR, "NULL",
1886 dissect_nisplus_error, NULL },
1887 { 0, NULL, NULL, NULL },
1891 proto_register_niscb(void)
1893 static hf_register_info hf[] = {
1894 { &hf_nispluscb_entries, {
1895 "entries", "nispluscb.entries", FT_NONE, BASE_NONE,
1896 NULL, 0, "NIS Callback Entries", HFILL }},
1898 { &hf_nispluscb_entry, {
1899 "entry", "nispluscb.entry", FT_NONE, BASE_NONE,
1900 NULL, 0, "NIS Callback Entry", HFILL }},
1904 static gint *ett[] = {
1906 &ett_nispluscb_entry,
1909 proto_nispluscb = proto_register_protocol("NIS+ Callback",
1910 "NIS+ CB", "nispluscb");
1911 proto_register_field_array(proto_nispluscb, hf, array_length(hf));
1912 proto_register_subtree_array(ett, array_length(ett));
1916 proto_reg_handoff_niscb(void)
1918 /* Register the protocol as RPC */
1919 rpc_init_prog(proto_nispluscb, CB_PROGRAM, ett_nispluscb);
1920 /* Register the procedure tables */
1921 rpc_init_proc_table(CB_PROGRAM, 1, cb1_proc);