2 * 2001 Ronnie Sahlberg <See AUTHORS for email>
4 * $Id: packet-nisplus.c,v 1.15 2002/11/01 00:48:38 sahlberg 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.
31 #include "packet-rpc.h"
32 #include "packet-nisplus.h"
34 static int proto_nisplus = -1;
35 static int hf_nisplus_procedure_v3 = -1;
36 static int hf_nisplus_object = -1;
37 static int hf_nisplus_oid = -1;
38 static int hf_nisplus_object_ctime = -1;
39 static int hf_nisplus_object_mtime = -1;
40 static int hf_nisplus_object_name = -1;
41 static int hf_nisplus_object_owner = -1;
42 static int hf_nisplus_object_group = -1;
43 static int hf_nisplus_object_domain = -1;
44 static int hf_nisplus_object_ttl = -1;
45 static int hf_nisplus_object_type = -1;
46 static int hf_nisplus_object_private = -1;
47 static int hf_nisplus_directory = -1;
48 static int hf_nisplus_directory_name = -1;
49 static int hf_nisplus_directory_type = -1;
50 static int hf_nisplus_directory_ttl = -1;
51 static int hf_nisplus_directory_mask = -1;
52 static int hf_nisplus_directory_mask_list = -1;
53 static int hf_nisplus_access_mask = -1;
54 static int hf_nisplus_mask_world_read = -1;
55 static int hf_nisplus_mask_world_modify = -1;
56 static int hf_nisplus_mask_world_create = -1;
57 static int hf_nisplus_mask_world_destroy = -1;
58 static int hf_nisplus_mask_group_read = -1;
59 static int hf_nisplus_mask_group_modify = -1;
60 static int hf_nisplus_mask_group_create = -1;
61 static int hf_nisplus_mask_group_destroy = -1;
62 static int hf_nisplus_mask_owner_read = -1;
63 static int hf_nisplus_mask_owner_modify = -1;
64 static int hf_nisplus_mask_owner_create = -1;
65 static int hf_nisplus_mask_owner_destroy = -1;
66 static int hf_nisplus_mask_nobody_read = -1;
67 static int hf_nisplus_mask_nobody_modify = -1;
68 static int hf_nisplus_mask_nobody_create = -1;
69 static int hf_nisplus_mask_nobody_destroy = -1;
70 static int hf_nisplus_server_name = -1;
71 static int hf_nisplus_key_type = -1;
72 static int hf_nisplus_key_data = -1;
73 static int hf_nisplus_servers = -1;
74 static int hf_nisplus_cbservers = -1;
75 static int hf_nisplus_server = -1;
76 static int hf_nisplus_endpoints = -1;
77 static int hf_nisplus_endpoint = -1;
78 static int hf_nisplus_endpoint_uaddr = -1;
79 static int hf_nisplus_endpoint_family = -1;
80 static int hf_nisplus_endpoint_proto = -1;
81 static int hf_nisplus_link = -1;
82 static int hf_nisplus_attrs_array = -1;
83 static int hf_nisplus_attr = -1;
84 static int hf_nisplus_attr_name = -1;
85 static int hf_nisplus_attr_val = -1;
86 static int hf_nisplus_entry = -1;
87 static int hf_nisplus_entry_type = -1;
88 static int hf_nisplus_entry_cols = -1;
89 static int hf_nisplus_entry_col = -1;
90 static int hf_nisplus_entry_flags = -1;
91 static int hf_nisplus_entry_val = -1;
92 static int hf_nisplus_entry_mask = -1;
93 static int hf_nisplus_entry_mask_binary = -1;
94 static int hf_nisplus_entry_mask_crypt = -1;
95 static int hf_nisplus_entry_mask_xdr = -1;
96 static int hf_nisplus_entry_mask_modified = -1;
97 static int hf_nisplus_entry_mask_asn = -1;
98 static int hf_nisplus_table = -1;
99 static int hf_nisplus_table_type = -1;
100 static int hf_nisplus_table_maxcol = -1;
101 static int hf_nisplus_table_sep = -1;
102 static int hf_nisplus_table_cols = -1;
103 static int hf_nisplus_table_col = -1;
104 static int hf_nisplus_table_path = -1;
105 static int hf_nisplus_table_col_name = -1;
106 static int hf_nisplus_table_col_mask = -1;
107 static int hf_nisplus_table_col_mask_binary = -1;
108 static int hf_nisplus_table_col_mask_encrypted = -1;
109 static int hf_nisplus_table_col_mask_xdr = -1;
110 static int hf_nisplus_table_col_mask_searchable = -1;
111 static int hf_nisplus_table_col_mask_casesensitive = -1;
112 static int hf_nisplus_table_col_mask_modified = -1;
113 static int hf_nisplus_table_col_mask_asn = -1;
114 static int hf_nisplus_group = -1;
115 static int hf_nisplus_group_flags = -1;
116 static int hf_nisplus_grps = -1;
117 static int hf_nisplus_group_name = -1;
118 static int hf_nisplus_ib_flags = -1;
119 static int hf_nisplus_ib_bufsize = -1;
120 static int hf_nisplus_cookie = -1;
121 static int hf_nisplus_fd_dirname = -1;
122 static int hf_nisplus_fd_requester = -1;
123 static int hf_nisplus_taglist = -1;
124 static int hf_nisplus_tag = -1;
125 static int hf_nisplus_tag_type = -1;
126 static int hf_nisplus_tag_val = -1;
127 static int hf_nisplus_dump_dir = -1;
128 static int hf_nisplus_dump_time = -1;
129 static int hf_nisplus_dummy = -1;
130 static int hf_nisplus_ping_dir = -1;
131 static int hf_nisplus_ping_time = -1;
132 static int hf_nisplus_error = -1;
133 static int hf_nisplus_dir_data = -1;
134 static int hf_nisplus_signature = -1;
135 static int hf_nisplus_log_entries = -1;
136 static int hf_nisplus_log_entry = -1;
137 static int hf_nisplus_log_type = -1;
138 static int hf_nisplus_log_time = -1;
139 static int hf_nisplus_log_principal = -1;
140 static int hf_nisplus_callback_status = -1;
141 static int hf_nisplus_cp_status = -1;
142 static int hf_nisplus_cp_zticks = -1;
143 static int hf_nisplus_cp_dticks = -1;
144 static int hf_nisplus_zticks = -1;
145 static int hf_nisplus_dticks = -1;
146 static int hf_nisplus_aticks = -1;
147 static int hf_nisplus_cticks = -1;
149 static gint ett_nisplus = -1;
150 static gint ett_nisplus_object = -1;
151 static gint ett_nisplus_oid = -1;
152 static gint ett_nisplus_directory = -1;
153 static gint ett_nisplus_directory_mask = -1;
154 static gint ett_nisplus_access_mask = -1;
155 static gint ett_nisplus_server = -1;
156 static gint ett_nisplus_endpoint = -1;
157 static gint ett_nisplus_link = -1;
158 static gint ett_nisplus_attr = -1;
159 static gint ett_nisplus_entry = -1;
160 static gint ett_nisplus_entry_col = -1;
161 static gint ett_nisplus_entry_mask = -1;
162 static gint ett_nisplus_table = -1;
163 static gint ett_nisplus_table_col = -1;
164 static gint ett_nisplus_table_col_mask = -1;
165 static gint ett_nisplus_group = -1;
166 static gint ett_nisplus_grps = -1;
167 static gint ett_nisplus_tag = -1;
168 static gint ett_nisplus_log_entry = -1;
171 #define NIS_MASK_TABLE_BINARY 0x0001
172 #define NIS_MASK_TABLE_CRYPT 0x0002
173 #define NIS_MASK_TABLE_XDR 0x0004
174 #define NIS_MASK_TABLE_SRCH 0x0008
175 #define NIS_MASK_TABLE_CASE 0x0010
176 #define NIS_MASK_TABLE_MODIFIED 0x0020
177 #define NIS_MASK_TABLE_ASN 0x0040
180 #define NIS_MASK_ENTRY_BINARY 0x0001
181 #define NIS_MASK_ENTRY_CRYPT 0x0002
182 #define NIS_MASK_ENTRY_XDR 0x0004
183 #define NIS_MASK_ENTRY_MODIFIED 0x0008
184 #define NIS_MASK_ENTRY_ASN 0x0040
187 #define NIS_MASK_WORLD_READ 0x0001
188 #define NIS_MASK_WORLD_MODIFY 0x0002
189 #define NIS_MASK_WORLD_CREATE 0x0004
190 #define NIS_MASK_WORLD_DESTROY 0x0008
191 #define NIS_MASK_GROUP_READ 0x0010
192 #define NIS_MASK_GROUP_MODIFY 0x0020
193 #define NIS_MASK_GROUP_CREATE 0x0040
194 #define NIS_MASK_GROUP_DESTROY 0x0080
195 #define NIS_MASK_OWNER_READ 0x0100
196 #define NIS_MASK_OWNER_MODIFY 0x0200
197 #define NIS_MASK_OWNER_CREATE 0x0400
198 #define NIS_MASK_OWNER_DESTROY 0x0800
199 #define NIS_MASK_NOBODY_READ 0x1000
200 #define NIS_MASK_NOBODY_MODIFY 0x2000
201 #define NIS_MASK_NOBODY_CREATE 0x4000
202 #define NIS_MASK_NOBODY_DESTROY 0x8000
205 static const value_string key_type[] = {
206 #define NIS_KEY_NONE 0
207 { NIS_KEY_NONE, "No Public Key (unix/sys auth)" },
209 { NIS_KEY_DH, "Diffie-Hellman" },
210 #define NIS_KEY_RSA 2
211 { NIS_KEY_RSA, "RSA" },
212 #define NIS_KEY_KERB 3
213 { NIS_KEY_KERB, "Kerberos" },
214 #define NIS_KEY_DHEXT 4
215 { NIS_KEY_DHEXT, "Extended Diffie-Hellman for RPC-GSS" },
219 static const value_string obj_type[] = {
220 #define NIS_BOGUS_OBJ 0
221 { NIS_BOGUS_OBJ, "Bogus Object" },
223 { NIS_NO_OBJ, "NULL Object" },
224 #define NIS_DIRECTORY_OBJ 2
225 { NIS_DIRECTORY_OBJ, "Directory Object" },
226 #define NIS_GROUP_OBJ 3
227 { NIS_GROUP_OBJ, "Group Object" },
228 #define NIS_TABLE_OBJ 4
229 { NIS_TABLE_OBJ, "Table Object" },
230 #define NIS_ENTRY_OBJ 5
231 { NIS_ENTRY_OBJ, "Entry Object" },
232 #define NIS_LINK_OBJ 6
233 { NIS_LINK_OBJ, "Link Object" },
234 #define NIS_PRIVATE_OBJ 7
235 { NIS_PRIVATE_OBJ, "Private Object" },
239 static const value_string ns_type[] = {
240 #define NIS_TYPE_UNKNOWN 0
241 { NIS_TYPE_UNKNOWN, "UNKNOWN" },
242 #define NIS_TYPE_NIS 1
243 { NIS_TYPE_NIS, "NIS Plus Service" },
244 #define NIS_TYPE_SUNYP 2
245 { NIS_TYPE_SUNYP, "Old NIS Service (YP)" },
246 #define NIS_TYPE_IVY 3
247 { NIS_TYPE_IVY, "NIS Plus Plus Service" },
248 #define NIS_TYPE_DNS 4
249 { NIS_TYPE_DNS, "Domain Name Service (DNS)" },
250 #define NIS_TYPE_X500 5
251 { NIS_TYPE_X500, "ISO/CCITT X.500 Service" },
252 #define NIS_TYPE_DNANS 6
253 { NIS_TYPE_DNANS, "Digital DECNet Name Service" },
254 #define NIS_TYPE_XCHS 7
255 { NIS_TYPE_XCHS, "Xerox ClearingHouse Service" },
256 #define NIS_TYPE_CDS 8
257 { NIS_TYPE_CDS, "CDS" },
265 dissect_nisplus_time(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
270 ts.secs = tvb_get_ntohl(tvb, offset);
273 proto_tree_add_time(tree, hfindex, tvb, offset, 4, &ts);
279 dissect_group(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
281 offset = dissect_rpc_string(tvb, tree,
282 hf_nisplus_group_name, offset, NULL);
289 dissect_group_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
291 proto_item* lock_item = NULL;
292 proto_tree* lock_tree = NULL;
293 int old_offset = offset;
295 lock_item = proto_tree_add_item(tree, hf_nisplus_group,
296 tvb, offset, -1, FALSE);
298 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_group);
300 offset = dissect_rpc_uint32(tvb, lock_tree,
301 hf_nisplus_group_flags, offset);
303 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
304 dissect_group, hf_nisplus_grps);
306 proto_item_set_len(lock_item, offset-old_offset);
312 dissect_access_rights(tvbuff_t *tvb, int offset, proto_tree *tree)
314 proto_item* mask_item = NULL;
315 proto_tree* mask_tree = NULL;
318 mask_item = proto_tree_add_item(tree, hf_nisplus_access_mask,
319 tvb, offset, 4, FALSE);
321 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_access_mask);
322 mask = tvb_get_ntohl(tvb, offset);
323 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_read, tvb, offset, 4, mask);
324 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_modify, tvb, offset, 4, mask);
325 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_create, tvb, offset, 4, mask);
326 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_world_destroy, tvb, offset, 4, mask);
327 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_read, tvb, offset, 4, mask);
328 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_modify, tvb, offset, 4, mask);
329 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_create, tvb, offset, 4, mask);
330 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_group_destroy, tvb, offset, 4, mask);
331 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_read, tvb, offset, 4, mask);
332 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_modify, tvb, offset, 4, mask);
333 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_create, tvb, offset, 4, mask);
334 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_owner_destroy, tvb, offset, 4, mask);
335 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_read, tvb, offset, 4, mask);
336 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_modify, tvb, offset, 4, mask);
337 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_create, tvb, offset, 4, mask);
338 proto_tree_add_boolean(mask_tree, hf_nisplus_mask_nobody_destroy, tvb, offset, 4, mask);
345 dissect_table(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
347 proto_item* lock_item = NULL;
348 proto_tree* lock_tree = NULL;
349 proto_item* mask_item = NULL;
350 proto_tree* mask_tree = NULL;
352 int old_offset = offset;
354 lock_item = proto_tree_add_item(tree, hf_nisplus_table_col,
355 tvb, offset, -1, FALSE);
357 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table_col);
359 offset = dissect_rpc_string(tvb, lock_tree,
360 hf_nisplus_table_col_name, offset, NULL);
363 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_table_col_mask,
366 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_table_col_mask);
367 mask = tvb_get_ntohl(tvb, offset);
368 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_binary,
369 tvb, offset, 4, mask);
370 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_encrypted,
371 tvb, offset, 4, mask);
372 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_xdr,
373 tvb, offset, 4, mask);
374 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_searchable,
375 tvb, offset, 4, mask);
376 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_casesensitive,
377 tvb, offset, 4, mask);
378 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_modified,
379 tvb, offset, 4, mask);
380 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_asn,
381 tvb, offset, 4, mask);
384 offset = dissect_access_rights(tvb, offset, lock_tree);
386 proto_item_set_len(lock_item, offset-old_offset);
391 dissect_table_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
394 proto_item* lock_item = NULL;
395 proto_tree* lock_tree = NULL;
396 int old_offset = offset;
398 lock_item = proto_tree_add_item(tree, hf_nisplus_table,
399 tvb, offset, -1, FALSE);
401 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table);
403 offset = dissect_rpc_string(tvb, lock_tree,
404 hf_nisplus_table_type, offset, NULL);
406 offset = dissect_rpc_uint32(tvb, lock_tree,
407 hf_nisplus_table_maxcol, offset);
409 offset = dissect_rpc_uint32(tvb, lock_tree,
410 hf_nisplus_table_sep, offset);
412 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
413 dissect_table, hf_nisplus_table_cols);
415 offset = dissect_rpc_string(tvb, lock_tree,
416 hf_nisplus_table_path, offset, NULL);
418 proto_item_set_len(lock_item, offset-old_offset);
423 dissect_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
425 proto_item* lock_item = NULL;
426 proto_tree* lock_tree = NULL;
427 proto_item* mask_item = NULL;
428 proto_tree* mask_tree = NULL;
430 int old_offset = offset;
432 lock_item = proto_tree_add_item(tree, hf_nisplus_entry_col,
433 tvb, offset, -1, FALSE);
435 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry_col);
437 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_entry_mask,
441 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_entry_mask);
442 mask = tvb_get_ntohl(tvb, offset);
443 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_binary, tvb, offset, 4, mask);
444 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_crypt, tvb, offset, 4, mask);
445 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_xdr, tvb, offset, 4, mask);
446 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_modified, tvb, offset, 4, mask);
447 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_asn, tvb, offset, 4, mask);
450 offset = dissect_rpc_string(tvb, lock_tree,
451 hf_nisplus_entry_val, offset, NULL);
453 proto_item_set_len(lock_item, offset-old_offset);
458 dissect_entry_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
460 proto_item* lock_item = NULL;
461 proto_tree* lock_tree = NULL;
462 int old_offset = offset;
464 lock_item = proto_tree_add_item(tree, hf_nisplus_entry,
465 tvb, offset, -1, FALSE);
467 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry);
469 offset = dissect_rpc_string(tvb, lock_tree,
470 hf_nisplus_entry_type, offset, NULL);
472 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
473 dissect_entry, hf_nisplus_entry_cols);
475 proto_item_set_len(lock_item, offset-old_offset);
480 dissect_attr(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
482 proto_item* lock_item = NULL;
483 proto_tree* lock_tree = NULL;
484 int old_offset = offset;
486 lock_item = proto_tree_add_item(tree, hf_nisplus_attr,
487 tvb, offset, -1, FALSE);
489 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_attr);
491 offset = dissect_rpc_string(tvb, lock_tree,
492 hf_nisplus_attr_name, offset, NULL);
494 offset = dissect_rpc_data(tvb, lock_tree,
495 hf_nisplus_attr_val, offset);
497 proto_item_set_len(lock_item, offset-old_offset);
502 dissect_link_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
504 proto_item* lock_item = NULL;
505 proto_tree* lock_tree = NULL;
506 int old_offset = offset;
508 lock_item = proto_tree_add_item(tree, hf_nisplus_link,
509 tvb, offset, -1, FALSE);
511 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_link);
513 offset = dissect_rpc_uint32(tvb, lock_tree,
514 hf_nisplus_object_type, offset);
516 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
517 dissect_attr, hf_nisplus_attrs_array);
519 offset = dissect_rpc_string(tvb, lock_tree,
520 hf_nisplus_object_name, offset, NULL);
522 proto_item_set_len(lock_item, offset-old_offset);
528 dissect_endpoint(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
530 proto_item* lock_item = NULL;
531 proto_tree* lock_tree = NULL;
532 int old_offset = offset;
534 lock_item = proto_tree_add_item(tree, hf_nisplus_endpoint,
535 tvb, offset, -1, FALSE);
537 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_endpoint);
539 offset = dissect_rpc_string(tvb, lock_tree,
540 hf_nisplus_endpoint_uaddr, offset, NULL);
542 offset = dissect_rpc_string(tvb, lock_tree,
543 hf_nisplus_endpoint_family, offset, NULL);
545 offset = dissect_rpc_string(tvb, lock_tree,
546 hf_nisplus_endpoint_proto, offset, NULL);
548 proto_item_set_len(lock_item, offset-old_offset);
554 dissect_directory_server(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
556 proto_item* lock_item = NULL;
557 proto_tree* lock_tree = NULL;
558 int old_offset = offset;
560 lock_item = proto_tree_add_item(tree, hf_nisplus_server,
561 tvb, offset, -1, FALSE);
563 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_server);
565 offset = dissect_rpc_string(tvb, lock_tree,
566 hf_nisplus_server_name, offset, NULL);
568 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
569 dissect_endpoint, hf_nisplus_endpoints);
571 offset = dissect_rpc_uint32(tvb, lock_tree,
572 hf_nisplus_key_type, offset);
574 offset = dissect_rpc_data(tvb, lock_tree,
575 hf_nisplus_key_data, offset);
577 proto_item_set_len(lock_item, offset-old_offset);
583 dissect_directory_mask(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
585 proto_item* lock_item = NULL;
586 proto_tree* lock_tree = NULL;
587 int old_offset = offset;
589 lock_item = proto_tree_add_item(tree, hf_nisplus_directory_mask,
590 tvb, offset, -1, FALSE);
592 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory_mask);
594 offset = dissect_access_rights(tvb, offset, lock_tree);
596 offset = dissect_rpc_uint32(tvb, lock_tree,
597 hf_nisplus_object_type, offset);
599 proto_item_set_len(lock_item, offset-old_offset);
604 dissect_directory_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
606 proto_item* lock_item = NULL;
607 proto_tree* lock_tree = NULL;
608 int old_offset = offset;
610 lock_item = proto_tree_add_item(tree, hf_nisplus_directory,
611 tvb, offset, -1, FALSE);
613 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory);
615 offset = dissect_rpc_string(tvb, lock_tree,
616 hf_nisplus_directory_name, offset, NULL);
618 offset = dissect_rpc_uint32(tvb, lock_tree,
619 hf_nisplus_directory_type, offset);
621 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
622 dissect_directory_server, hf_nisplus_servers);
624 offset = dissect_rpc_uint32(tvb, lock_tree,
625 hf_nisplus_directory_ttl, offset);
627 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
628 dissect_directory_mask, hf_nisplus_directory_mask_list);
630 proto_item_set_len(lock_item, offset-old_offset);
635 dissect_nisplus_oid(tvbuff_t *tvb, int offset, proto_tree *tree)
637 proto_item* lock_item = NULL;
638 proto_tree* lock_tree = NULL;
639 int old_offset = offset;
641 lock_item = proto_tree_add_item(tree, hf_nisplus_oid, tvb,
644 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_oid);
646 offset = dissect_nisplus_time(tvb, offset, lock_tree,
647 hf_nisplus_object_ctime);
649 offset = dissect_nisplus_time(tvb, offset, lock_tree,
650 hf_nisplus_object_mtime);
652 proto_item_set_len(lock_item, offset-old_offset);
657 dissect_nisplus_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
659 proto_item* lock_item = NULL;
660 proto_tree* lock_tree = NULL;
662 int old_offset = offset;
664 lock_item = proto_tree_add_item(tree, hf_nisplus_object, tvb,
667 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_object);
669 offset = dissect_nisplus_oid(tvb, offset, lock_tree);
671 offset = dissect_rpc_string(tvb, lock_tree,
672 hf_nisplus_object_name, offset, NULL);
674 offset = dissect_rpc_string(tvb, lock_tree,
675 hf_nisplus_object_owner, offset, NULL);
677 offset = dissect_rpc_string(tvb, lock_tree,
678 hf_nisplus_object_group, offset, NULL);
680 offset = dissect_rpc_string(tvb, lock_tree,
681 hf_nisplus_object_domain, offset, NULL);
683 offset = dissect_access_rights(tvb, offset, lock_tree);
685 offset = dissect_rpc_uint32(tvb, lock_tree,
686 hf_nisplus_object_ttl, offset);
688 type = tvb_get_ntohl(tvb, offset);
689 offset = dissect_rpc_uint32(tvb, lock_tree,
690 hf_nisplus_object_type, offset);
692 case NIS_DIRECTORY_OBJ:
693 offset = dissect_directory_obj(tvb, offset, pinfo, lock_tree);
696 offset = dissect_group_obj(tvb, offset, pinfo, lock_tree);
699 offset = dissect_table_obj(tvb, offset, pinfo, lock_tree);
702 offset = dissect_entry_obj(tvb, offset, pinfo, lock_tree);
705 offset = dissect_link_obj(tvb, offset, pinfo, lock_tree);
707 case NIS_PRIVATE_OBJ:
708 offset = dissect_rpc_data(tvb, lock_tree,
709 hf_nisplus_object_private, offset);
719 proto_item_set_len(lock_item, offset-old_offset);
722 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
723 end of nis object, thats right, all this was the definition of
730 dissect_ns_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
732 offset = dissect_rpc_string(tvb, tree,
733 hf_nisplus_object_name, offset, NULL);
735 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
736 dissect_nisplus_object, hf_nisplus_object);
742 dissect_ib_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
744 offset = dissect_rpc_string(tvb, tree,
745 hf_nisplus_object_name, offset, NULL);
747 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
748 dissect_attr, hf_nisplus_attrs_array);
750 offset = dissect_rpc_uint32(tvb, tree,
751 hf_nisplus_ib_flags, offset);
753 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
754 dissect_nisplus_object, hf_nisplus_object);
756 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
757 dissect_directory_server, hf_nisplus_cbservers);
759 offset = dissect_rpc_uint32(tvb, tree,
760 hf_nisplus_ib_bufsize, offset);
762 offset = dissect_rpc_data(tvb, tree,
763 hf_nisplus_cookie, offset);
769 dissect_fd_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
771 offset = dissect_rpc_string(tvb, tree,
772 hf_nisplus_fd_dirname, offset, NULL);
774 offset = dissect_rpc_string(tvb, tree,
775 hf_nisplus_fd_requester, offset, NULL);
781 dissect_nisplus_tag(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
783 proto_item* lock_item = NULL;
784 proto_tree* lock_tree = NULL;
785 int old_offset = offset;
787 lock_item = proto_tree_add_item(tree, hf_nisplus_tag, tvb,
790 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_tag);
792 offset = dissect_rpc_uint32(tvb, lock_tree,
793 hf_nisplus_tag_type, offset);
795 offset = dissect_rpc_string(tvb, lock_tree,
796 hf_nisplus_tag_val, offset, NULL);
798 proto_item_set_len(lock_item, offset-old_offset);
803 dissect_nisplus_taglist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
805 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
806 dissect_nisplus_tag, hf_nisplus_taglist);
812 dissect_dump_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
814 offset = dissect_rpc_string(tvb, tree,
815 hf_nisplus_dump_dir, offset, NULL);
817 offset = dissect_nisplus_time(tvb, offset, tree,
818 hf_nisplus_dump_time);
820 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
821 dissect_directory_server, hf_nisplus_cbservers);
827 dissect_netobj(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
829 offset = dissect_rpc_data(tvb, tree,
830 hf_nisplus_dummy, offset);
836 dissect_nisname(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
838 offset = dissect_rpc_string(tvb, tree,
839 hf_nisplus_object_name, offset, NULL);
845 dissect_ping_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
847 offset = dissect_rpc_string(tvb, tree,
848 hf_nisplus_ping_dir, offset, NULL);
850 offset = dissect_nisplus_time(tvb, offset, tree,
851 hf_nisplus_ping_time);
857 static const value_string nis_error[] = {
858 #define NIS_SUCCESS 0
859 { NIS_SUCCESS, "A-ok, let's rock n roll" },
860 #define NIS_S_SUCCESS 1
861 { NIS_S_SUCCESS, "Name found (maybe)" },
862 #define NIS_NOTFOUND 2
863 { NIS_NOTFOUND, "Name definitely not found" },
864 #define NIS_S_NOTFOUND 3
865 { NIS_S_NOTFOUND, "Name maybe not found" },
866 #define NIS_CACHEEXPIRED 4
867 { NIS_CACHEEXPIRED, "Name exists but cache out of date" },
868 #define NIS_NAMEUNREACHABLE 5
869 { NIS_NAMEUNREACHABLE, "Can't get there from here" },
870 #define NIS_UNKNOWNOBJ 6
871 { NIS_UNKNOWNOBJ, "Object type is bogus" },
872 #define NIS_TRYAGAIN 7
873 { NIS_TRYAGAIN, "I'm busy, call back" },
874 #define NIS_SYSTEMERROR 8
875 { NIS_SYSTEMERROR, "Generic system error" },
876 #define NIS_CHAINBROKEN 9
877 { NIS_CHAINBROKEN, "First/Next warning" },
878 #define NIS_PERMISSION 10
879 { NIS_PERMISSION, "Not enough permission to access" },
880 #define NIS_NOTOWNER 11
881 { NIS_NOTOWNER, "You don't own it, sorry" },
882 #define NIS_NOT_ME 12
883 { NIS_NOT_ME, "I don't serve this name" },
884 #define NIS_NOMEMORY 13
885 { NIS_NOMEMORY, "Outta VM! Help!" },
886 #define NIS_NAMEEXISTS 14
887 { NIS_NAMEEXISTS, "Can't create over another name" },
888 #define NIS_NOTMASTER 15
889 { NIS_NOTMASTER, "I'm justa secondaray, don't ask me" },
890 #define NIS_INVALIDOBJ 16
891 { NIS_INVALIDOBJ, "Object is broken somehow" },
892 #define NIS_BADNAME 17
893 { NIS_BADNAME, "Unparsable name" },
894 #define NIS_NOCALLBACK 18
895 { NIS_NOCALLBACK, "Couldn't talk to call back proc" },
896 #define NIS_CBRESULTS 19
897 { NIS_CBRESULTS, "Results being called back to you" },
898 #define NIS_NOSUCHNAME 20
899 { NIS_NOSUCHNAME, "Name unknown" },
900 #define NIS_NOTUNIQUE 21
901 { NIS_NOTUNIQUE, "Value is not uniques (entry)" },
902 #define NIS_IBMODERROR 22
903 { NIS_IBMODERROR, "Inf. Base. Modify error." },
904 #define NIS_NOSUCHTABLE 23
905 { NIS_NOSUCHTABLE, "Name for table was wrong" },
906 #define NIS_TYPEMISMATCH 24
907 { NIS_TYPEMISMATCH, "Entry and table type mismatch" },
908 #define NIS_LINKNAMEERROR 25
909 { NIS_LINKNAMEERROR, "Link points to bogus name" },
910 #define NIS_PARTIAL 26
911 { NIS_PARTIAL, "Partial success, found table" },
912 #define NIS_TOOMANYATTRS 27
913 { NIS_TOOMANYATTRS, "Too many attributes" },
914 #define NIS_RPCERROR 28
915 { NIS_RPCERROR, "RPC error encountered" },
916 #define NIS_BADATTRIBUTE 29
917 { NIS_BADATTRIBUTE, "Bad or invalid attribute" },
918 #define NIS_NOTSEARCHABLE 30
919 { NIS_NOTSEARCHABLE, "Non-searchable object searched" },
920 #define NIS_CBERROR 31
921 { NIS_CBERROR, "Error during callback (svc crash)" },
922 #define NIS_FOREIGNNS 32
923 { NIS_FOREIGNNS, "Foreign Namespace" },
924 #define NIS_BADOBJECT 33
925 { NIS_BADOBJECT, "Malformed object structure" },
926 #define NIS_NOTSAMEOBJ 34
927 { NIS_NOTSAMEOBJ, "Object swapped during deletion" },
928 #define NIS_MODFAIL 35
929 { NIS_MODFAIL, "Failure during a Modify." },
930 #define NIS_BADREQUEST 36
931 { NIS_BADREQUEST, "Illegal query for table" },
932 #define NIS_NOTEMPTY 37
933 { NIS_NOTEMPTY, "Attempt to remove a non-empty tbl" },
934 #define NIS_COLDSTART_ERR 38
935 { NIS_COLDSTART_ERR, "Error accesing the cold start file" },
936 #define NIS_RESYNC 39
937 { NIS_RESYNC, "Transaction log too far out of date" },
939 { NIS_FAIL, "NIS operation failed." },
940 #define NIS_UNAVAIL 41
941 { NIS_UNAVAIL, "NIS+ service is unavailable (client)" },
942 #define NIS_RES2BIG 42
943 { NIS_RES2BIG, "NIS+ result too big for datagram" },
944 #define NIS_SRVAUTH 43
945 { NIS_SRVAUTH, "NIS+ server wasn't authenticated." },
946 #define NIS_CLNTAUTH 44
947 { NIS_CLNTAUTH, "NIS+ Client wasn't authenticated." },
948 #define NIS_NOFILESPACE 45
949 { NIS_NOFILESPACE, "NIS+ server ran out of disk space" },
950 #define NIS_NOPROC 46
951 { NIS_NOPROC, "NIS+ server couldn't create new proc" },
952 #define NIS_DUMPLATER 47
953 { NIS_DUMPLATER, "NIS+ server already has dump child" },
958 dissect_nisplus_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
960 offset = dissect_rpc_uint32(tvb, tree,
961 hf_nisplus_error, offset);
963 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
964 dissect_nisplus_object, hf_nisplus_object);
966 offset = dissect_rpc_data(tvb, tree,
967 hf_nisplus_cookie, offset);
969 offset = dissect_rpc_uint32(tvb, tree,
970 hf_nisplus_zticks, offset);
972 offset = dissect_rpc_uint32(tvb, tree,
973 hf_nisplus_dticks, offset);
975 offset = dissect_rpc_uint32(tvb, tree,
976 hf_nisplus_aticks, offset);
978 offset = dissect_rpc_uint32(tvb, tree,
979 hf_nisplus_cticks, offset);
985 dissect_fd_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
987 offset = dissect_rpc_uint32(tvb, tree,
988 hf_nisplus_error, offset);
990 offset = dissect_rpc_string(tvb, tree,
991 hf_nisplus_fd_dirname, offset, NULL);
993 offset = dissect_rpc_data(tvb, tree,
994 hf_nisplus_dir_data, offset);
996 offset = dissect_rpc_data(tvb, tree,
997 hf_nisplus_signature, offset);
1002 static const value_string entry_type[] = {
1005 #define LOG_ADD_NAME 1
1006 { LOG_ADD_NAME, "Name Was Added" },
1007 #define LOG_REM_NAME 2
1008 { LOG_REM_NAME, "Name Was Removed" },
1009 #define LOG_MOD_NAME_OLD 3
1010 { LOG_MOD_NAME_OLD, "Name Was Modified" },
1011 #define LOG_MOD_NAME_NEW 4
1012 { LOG_MOD_NAME_NEW, "Name Was Modified" },
1013 #define LOG_ADD_IBASE 5
1014 { LOG_ADD_IBASE, "Entry Added To Information Base" },
1015 #define LOG_REM_IBASE 6
1016 { LOG_REM_IBASE, "Entry Removed From Information Base" },
1017 #define LOG_MOD_IBASE 7
1018 { LOG_MOD_IBASE, "Entry Modified In Information Base" },
1019 #define LOG_UPD_STAMP 8
1020 { LOG_UPD_STAMP, "Update Timestamp" },
1024 dissect_log_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1026 proto_item* lock_item = NULL;
1027 proto_tree* lock_tree = NULL;
1028 int old_offset = offset;
1030 lock_item = proto_tree_add_item(tree, hf_nisplus_log_entry,
1031 tvb, offset, -1, FALSE);
1033 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_log_entry);
1035 offset = dissect_nisplus_time(tvb, offset, lock_tree,
1036 hf_nisplus_log_time);
1038 offset = dissect_rpc_uint32(tvb, lock_tree,
1039 hf_nisplus_log_type, offset);
1041 offset = dissect_rpc_string(tvb, lock_tree,
1042 hf_nisplus_log_principal, offset, NULL);
1044 offset = dissect_rpc_string(tvb, lock_tree,
1045 hf_nisplus_directory_name, offset, NULL);
1047 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
1048 dissect_attr, hf_nisplus_attrs_array);
1050 offset = dissect_nisplus_object(tvb, offset, pinfo, lock_tree);
1052 proto_item_set_len(lock_item, offset-old_offset);
1057 dissect_log_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1059 offset = dissect_rpc_uint32(tvb, tree,
1060 hf_nisplus_error, offset);
1062 offset = dissect_rpc_data(tvb, tree,
1063 hf_nisplus_cookie, offset);
1065 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1066 dissect_log_entry, hf_nisplus_log_entries);
1072 dissect_callback_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1074 offset = dissect_rpc_bool(tvb, tree, hf_nisplus_callback_status,
1081 dissect_change_time(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1083 offset = dissect_nisplus_time(tvb, offset, tree,
1084 hf_nisplus_log_time);
1090 dissect_cp_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1092 offset = dissect_rpc_uint32(tvb, tree,
1093 hf_nisplus_cp_status, offset);
1095 offset = dissect_rpc_uint32(tvb, tree,
1096 hf_nisplus_cp_zticks, offset);
1098 offset = dissect_rpc_uint32(tvb, tree,
1099 hf_nisplus_cp_dticks, offset);
1105 dissect_nisplus_error(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1107 offset = dissect_rpc_uint32(tvb, tree,
1108 hf_nisplus_error, offset);
1113 /* proc number, "proc name", dissect_request, dissect_reply */
1114 /* NULL as function pointer means: type of arguments is "void". */
1115 static const vsff nisplus3_proc[] = {
1116 { NISPROC_NULL, "NULL",
1118 { NISPROC_LOOKUP, "LOOKUP",
1119 dissect_ns_request, dissect_nisplus_result },
1120 { NISPROC_ADD, "ADD",
1121 dissect_ns_request, dissect_nisplus_result },
1122 { NISPROC_MODIFY, "MODIFY",
1123 dissect_ns_request, dissect_nisplus_result },
1124 { NISPROC_REMOVE, "REMOVE",
1125 dissect_ns_request, dissect_nisplus_result },
1126 { NISPROC_IBLIST, "IBLIST",
1127 dissect_ib_request, dissect_nisplus_result },
1128 { NISPROC_IBADD, "IBADD",
1129 dissect_ib_request, dissect_nisplus_result },
1130 { NISPROC_IBMODIFY, "IBMODIFY",
1131 dissect_ib_request, dissect_nisplus_result },
1132 { NISPROC_IBREMOVE, "IBREMOVE",
1133 dissect_ib_request, dissect_nisplus_result },
1134 { NISPROC_IBFIRST, "IBFIRST",
1135 dissect_ib_request, dissect_nisplus_result },
1136 { NISPROC_IBNEXT, "IBNEXT",
1137 dissect_ib_request, dissect_nisplus_result },
1138 { NISPROC_FINDDIRECTORY, "FINDDIRECTORY",
1139 dissect_fd_args, dissect_fd_result },
1140 { NISPROC_STATUS, "STATUS",
1141 dissect_nisplus_taglist, dissect_nisplus_taglist },
1142 { NISPROC_DUMPLOG, "DUMPLOG",
1143 dissect_dump_args, dissect_log_result },
1144 { NISPROC_DUMP, "DUMP",
1145 dissect_dump_args, dissect_log_result },
1146 { NISPROC_CALLBACK, "CALLBACK",
1147 dissect_netobj, dissect_callback_result },
1148 { NISPROC_CPTIME, "CPTIME",
1149 dissect_nisname, dissect_change_time },
1150 { NISPROC_CHECKPOINT, "CHECKPOINT",
1151 dissect_nisname, dissect_cp_result },
1152 { NISPROC_PING, "PING",
1153 dissect_ping_args, NULL },
1154 { NISPROC_SERVSTATE, "SERVSTATE",
1155 dissect_nisplus_taglist, dissect_nisplus_taglist },
1156 { NISPROC_MKDIR, "MKDIR",
1157 dissect_nisname, dissect_nisplus_error },
1158 { NISPROC_RMDIR, "RMDIR",
1159 dissect_nisname, dissect_nisplus_error },
1160 { NISPROC_UPDKEYS, "UPDKEYS",
1161 dissect_nisname, dissect_nisplus_error },
1162 { 0, NULL, NULL, NULL }
1164 static const value_string nisplus3_proc_vals[] = {
1165 { NISPROC_NULL, "NULL" },
1166 { NISPROC_LOOKUP, "LOOKUP" },
1167 { NISPROC_ADD, "ADD" },
1168 { NISPROC_MODIFY, "MODIFY" },
1169 { NISPROC_REMOVE, "REMOVE" },
1170 { NISPROC_IBLIST, "IBLIST" },
1171 { NISPROC_IBADD, "IBADD" },
1172 { NISPROC_IBMODIFY, "IBMODIFY" },
1173 { NISPROC_IBREMOVE, "IBREMOVE" },
1174 { NISPROC_IBFIRST, "IBFIRST" },
1175 { NISPROC_IBNEXT, "IBNEXT" },
1176 { NISPROC_FINDDIRECTORY, "FINDDIRECTORY" },
1177 { NISPROC_STATUS, "STATUS" },
1178 { NISPROC_DUMPLOG, "DUMPLOG" },
1179 { NISPROC_DUMP, "DUMP" },
1180 { NISPROC_CALLBACK, "CALLBACK" },
1181 { NISPROC_CPTIME, "CPTIME" },
1182 { NISPROC_CHECKPOINT, "CHECKPOINT" },
1183 { NISPROC_PING, "PING" },
1184 { NISPROC_SERVSTATE, "SERVSTATE" },
1185 { NISPROC_MKDIR, "MKDIR" },
1186 { NISPROC_RMDIR, "RMDIR" },
1187 { NISPROC_UPDKEYS, "UPDKEYS" },
1194 proto_register_nis(void)
1196 static const true_false_string tfs_col_binary = {
1198 "column is NOT binary"
1200 static const true_false_string tfs_col_encrypted = {
1201 "column is encrypted",
1202 "column is NOT encrypted"
1204 static const true_false_string tfs_col_xdr = {
1205 "column is xdr encoded",
1206 "column is NOT xdr encoded"
1208 static const true_false_string tfs_col_searchable = {
1209 "column is searchable",
1210 "column is NOT searchable"
1212 static const true_false_string tfs_col_casesensitive = {
1213 "column is case sensitive",
1214 "column is NOT case sensitive"
1216 static const true_false_string tfs_col_modified = {
1217 "column is modified",
1218 "column is NOT modified"
1220 static const true_false_string tfs_col_asn = {
1221 "column is asn.1 encoded",
1222 "column is NOT asn.1 encoded"
1225 static const true_false_string tfs_entry_binary = {
1227 "entry is NOT binary"
1230 static const true_false_string tfs_entry_crypt = {
1231 "entry is encrypted",
1232 "entry is NOT encrypted"
1235 static const true_false_string tfs_entry_xdr = {
1236 "entry is xdr encoded",
1237 "entry is NOT xdr encoded"
1240 static const true_false_string tfs_entry_modified = {
1241 "entry is modified",
1242 "entry is NOT modified"
1245 static const true_false_string tfs_entry_asn = {
1246 "entry is asn.1 encoded",
1247 "entry is NOT asn.1 encoded"
1250 static const true_false_string tfs_world_read = {
1252 "world can NOT read"
1255 static const true_false_string tfs_world_modify = {
1257 "world can NOT modify"
1260 static const true_false_string tfs_world_create = {
1262 "world can NOT create"
1265 static const true_false_string tfs_world_destroy = {
1266 "world can destroy",
1267 "world can NOT destroy"
1270 static const true_false_string tfs_group_read = {
1272 "group can NOT read"
1275 static const true_false_string tfs_group_modify = {
1277 "group can NOT modify"
1280 static const true_false_string tfs_group_create = {
1282 "group can NOT create"
1285 static const true_false_string tfs_group_destroy = {
1286 "group can destroy",
1287 "group can NOT destroy"
1290 static const true_false_string tfs_owner_read = {
1292 "owner can NOT read"
1295 static const true_false_string tfs_owner_modify = {
1297 "owner can NOT modify"
1300 static const true_false_string tfs_owner_create = {
1302 "owner can NOT create"
1305 static const true_false_string tfs_owner_destroy = {
1306 "owner can destroy",
1307 "owner can NOT destroy"
1310 static const true_false_string tfs_nobody_read = {
1312 "nobody can NOT read"
1315 static const true_false_string tfs_nobody_modify = {
1316 "nobody can modify",
1317 "nobody can NOT modify"
1320 static const true_false_string tfs_nobody_create = {
1321 "nobody can create",
1322 "nobody can NOT create"
1325 static const true_false_string tfs_nobody_destroy = {
1326 "nobody can destroy",
1327 "nobody can NOT destroy"
1330 static const true_false_string tfs_callback_status = {
1338 static hf_register_info hf[] = {
1339 { &hf_nisplus_procedure_v3, {
1340 "V3 Procedure", "nisplus.procedure_v3", FT_UINT32, BASE_DEC,
1341 VALS(nisplus3_proc_vals), 0, "V3 Procedure", HFILL }},
1342 { &hf_nisplus_object, {
1343 "NIS Object", "nisplus.object", FT_NONE, BASE_NONE,
1344 NULL, 0, "NIS Object", HFILL }},
1346 { &hf_nisplus_oid, {
1347 "Object Identity Verifier", "nisplus.object.oid", FT_NONE, BASE_NONE,
1348 NULL, 0, "NIS Object Identity Verifier", HFILL }},
1350 { &hf_nisplus_object_name, {
1351 "name", "nisplus.object.name", FT_STRING, BASE_DEC,
1352 NULL, 0, "NIS Name For This Object", HFILL }},
1354 { &hf_nisplus_object_owner, {
1355 "owner", "nisplus.object.owner", FT_STRING, BASE_DEC,
1356 NULL, 0, "NIS Name Of Object Owner", HFILL }},
1358 { &hf_nisplus_object_group, {
1359 "group", "nisplus.object.group", FT_STRING, BASE_DEC,
1360 NULL, 0, "NIS Name Of Access Group", HFILL }},
1362 { &hf_nisplus_object_domain, {
1363 "domain", "nisplus.object.domain", FT_STRING, BASE_DEC,
1364 NULL, 0, "NIS Administrator For This Object", HFILL }},
1366 { &hf_nisplus_object_ttl, {
1367 "ttl", "nisplus.object.ttl", FT_UINT32, BASE_DEC,
1368 NULL, 0, "NIS Time To Live For This Object", HFILL }},
1370 { &hf_nisplus_object_private, {
1371 "private", "nisplus.object.private", FT_BYTES, BASE_DEC,
1372 NULL, 0, "NIS Private Object", HFILL }},
1374 { &hf_nisplus_directory, {
1375 "directory", "nisplus.directory", FT_NONE, BASE_NONE,
1376 NULL, 0, "NIS Directory Object", HFILL }},
1378 { &hf_nisplus_directory_name, {
1379 "directory name", "nisplus.directory.name", FT_STRING, BASE_DEC,
1380 NULL, 0, "Name Of Directory Being Served", HFILL }},
1382 { &hf_nisplus_directory_type, {
1383 "type", "nisplus.directory.type", FT_UINT32, BASE_DEC,
1384 VALS(ns_type), 0, "NIS Type Of Name Service", HFILL }},
1386 { &hf_nisplus_directory_ttl, {
1387 "ttl", "nisplus.directory.ttl", FT_UINT32, BASE_DEC,
1388 NULL, 0, "Time To Live", HFILL }},
1390 { &hf_nisplus_directory_mask, {
1391 "mask", "nisplus.directory.mask", FT_NONE, BASE_NONE,
1392 NULL, 0, "NIS Directory Create/Destroy Rights", HFILL }},
1394 { &hf_nisplus_directory_mask_list, {
1395 "mask list", "nisplus.directory.mask_list", FT_NONE, BASE_NONE,
1396 NULL, 0, "List Of Directory Create/Destroy Rights", HFILL }},
1398 { &hf_nisplus_mask_world_read, {
1399 "WORLD READ", "nisplus.directory.mask.world_read",
1400 FT_BOOLEAN, 32, TFS(&tfs_world_read),
1401 NIS_MASK_WORLD_READ, "World Read Flag", HFILL }},
1403 { &hf_nisplus_mask_world_modify, {
1404 "WORLD MODIFY", "nisplus.directory.mask.world_modify",
1405 FT_BOOLEAN, 32, TFS(&tfs_world_modify),
1406 NIS_MASK_WORLD_MODIFY, "World Modify Flag", HFILL }},
1408 { &hf_nisplus_mask_world_create, {
1409 "WORLD CREATE", "nisplus.directory.mask.world_create",
1410 FT_BOOLEAN, 32, TFS(&tfs_world_create),
1411 NIS_MASK_WORLD_CREATE, "World Create Flag", HFILL }},
1413 { &hf_nisplus_mask_world_destroy, {
1414 "WORLD DESTROY", "nisplus.directory.mask.world_destroy",
1415 FT_BOOLEAN, 32, TFS(&tfs_world_destroy),
1416 NIS_MASK_WORLD_DESTROY, "World Destroy Flag", HFILL }},
1418 { &hf_nisplus_mask_group_read, {
1419 "GROUP READ", "nisplus.directory.mask.group_read",
1420 FT_BOOLEAN, 32, TFS(&tfs_group_read),
1421 NIS_MASK_GROUP_READ, "Group Read Flag", HFILL }},
1423 { &hf_nisplus_mask_group_modify, {
1424 "GROUP MODIFY", "nisplus.directory.mask.group_modify",
1425 FT_BOOLEAN, 32, TFS(&tfs_group_modify),
1426 NIS_MASK_GROUP_MODIFY, "Group Modify Flag", HFILL }},
1428 { &hf_nisplus_mask_group_create, {
1429 "GROUP CREATE", "nisplus.directory.mask.group_create",
1430 FT_BOOLEAN, 32, TFS(&tfs_group_create),
1431 NIS_MASK_GROUP_CREATE, "Group Create Flag", HFILL }},
1433 { &hf_nisplus_mask_group_destroy, {
1434 "GROUP DESTROY", "nisplus.directory.mask.group_destroy",
1435 FT_BOOLEAN, 32, TFS(&tfs_group_destroy),
1436 NIS_MASK_GROUP_DESTROY, "Group Destroy Flag", HFILL }},
1438 { &hf_nisplus_mask_owner_read, {
1439 "OWNER READ", "nisplus.directory.mask.owner_read",
1440 FT_BOOLEAN, 32, TFS(&tfs_owner_read),
1441 NIS_MASK_OWNER_READ, "Owner Read Flag", HFILL }},
1443 { &hf_nisplus_mask_owner_modify, {
1444 "OWNER MODIFY", "nisplus.directory.mask.owner_modify",
1445 FT_BOOLEAN, 32, TFS(&tfs_owner_modify),
1446 NIS_MASK_OWNER_MODIFY, "Owner Modify Flag", HFILL }},
1448 { &hf_nisplus_mask_owner_create, {
1449 "OWNER CREATE", "nisplus.directory.mask.owner_create",
1450 FT_BOOLEAN, 32, TFS(&tfs_owner_create),
1451 NIS_MASK_OWNER_CREATE, "Owner Create Flag", HFILL }},
1453 { &hf_nisplus_mask_owner_destroy, {
1454 "OWNER DESTROY", "nisplus.directory.mask.owner_destroy",
1455 FT_BOOLEAN, 32, TFS(&tfs_owner_destroy),
1456 NIS_MASK_OWNER_DESTROY, "Owner Destroy Flag", HFILL }},
1458 { &hf_nisplus_mask_nobody_read, {
1459 "NOBODY READ", "nisplus.directory.mask.nobody_read",
1460 FT_BOOLEAN, 32, TFS(&tfs_nobody_read),
1461 NIS_MASK_NOBODY_READ, "Nobody Read Flag", HFILL }},
1463 { &hf_nisplus_mask_nobody_modify, {
1464 "NOBODY MODIFY", "nisplus.directory.mask.nobody_modify",
1465 FT_BOOLEAN, 32, TFS(&tfs_nobody_modify),
1466 NIS_MASK_NOBODY_MODIFY, "Nobody Modify Flag", HFILL }},
1468 { &hf_nisplus_mask_nobody_create, {
1469 "NOBODY CREATE", "nisplus.directory.mask.nobody_create",
1470 FT_BOOLEAN, 32, TFS(&tfs_nobody_create),
1471 NIS_MASK_NOBODY_CREATE, "Nobody Create Flag", HFILL }},
1473 { &hf_nisplus_mask_nobody_destroy, {
1474 "NOBODY DESTROY", "nisplus.directory.mask.nobody_destroy",
1475 FT_BOOLEAN, 32, TFS(&tfs_nobody_destroy),
1476 NIS_MASK_NOBODY_DESTROY, "Nobody Destroy Flag", HFILL }},
1478 { &hf_nisplus_access_mask, {
1479 "access mask", "nisplus.access.mask", FT_NONE, BASE_NONE,
1480 NULL, 0, "NIS Access Mask", HFILL }},
1482 { &hf_nisplus_object_type, {
1483 "type", "nisplus.object.type", FT_UINT32, BASE_DEC,
1484 VALS(obj_type), 0, "NIS Type Of Object", HFILL }},
1486 { &hf_nisplus_servers, {
1487 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1488 NULL, 0, "NIS Servers For This Directory", HFILL }},
1490 { &hf_nisplus_cbservers, {
1491 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1492 NULL, 0, "Optional Callback Server", HFILL }},
1494 { &hf_nisplus_server, {
1495 "server", "nisplus.server", FT_NONE, BASE_NONE,
1496 NULL, 0, "NIS Server For This Directory", HFILL }},
1498 { &hf_nisplus_server_name, {
1499 "name", "nisplus.server.name", FT_STRING, BASE_DEC,
1500 NULL, 0, "Name Of NIS Server", HFILL }},
1502 { &hf_nisplus_key_type, {
1503 "type", "nisplus.key.type", FT_UINT32, BASE_DEC,
1504 VALS(key_type), 0, "Type Of Key", HFILL }},
1506 { &hf_nisplus_key_data, {
1507 "key data", "nisplus.key.data", FT_BYTES, BASE_DEC,
1508 NULL, 0, "Encryption Key", HFILL }},
1510 { &hf_nisplus_endpoints, {
1511 "nis endpoints", "nisplus.endpoints", FT_NONE, BASE_NONE,
1512 NULL, 0, "Endpoints For This NIS Server", HFILL }},
1514 { &hf_nisplus_endpoint, {
1515 "endpoint", "nisplus.endpoint", FT_NONE, BASE_NONE,
1516 NULL, 0, "Endpoint For This NIS Server", HFILL }},
1518 { &hf_nisplus_endpoint_uaddr, {
1519 "addr", "nisplus.endpoint.uaddr", FT_STRING, BASE_DEC,
1520 NULL, 0, "Address", HFILL }},
1522 { &hf_nisplus_endpoint_family, {
1523 "family", "nisplus.endpoint.family", FT_STRING, BASE_DEC,
1524 NULL, 0, "Transport Family", HFILL }},
1526 { &hf_nisplus_endpoint_proto, {
1527 "proto", "nisplus.endpoint.proto", FT_STRING, BASE_DEC,
1528 NULL, 0, "Protocol", HFILL }},
1530 { &hf_nisplus_link, {
1531 "link", "nisplus.link", FT_NONE, BASE_NONE,
1532 NULL, 0, "NIS Link Object", HFILL }},
1534 { &hf_nisplus_attrs_array, {
1535 "Attributes", "nisplus.attributes", FT_NONE, BASE_NONE,
1536 NULL, 0, "List Of Attributes", HFILL }},
1538 { &hf_nisplus_attr, {
1539 "Attribute", "nisplus.attr", FT_NONE, BASE_NONE,
1540 NULL, 0, "Attribute", HFILL }},
1542 { &hf_nisplus_attr_name, {
1543 "name", "nisplus.attr.name", FT_STRING, BASE_DEC,
1544 NULL, 0, "Attribute Name", HFILL }},
1546 { &hf_nisplus_attr_val, {
1547 "val", "nisplus.attr.val", FT_BYTES, BASE_HEX,
1548 NULL, 0, "Attribute Value", HFILL }},
1550 { &hf_nisplus_entry, {
1551 "entry", "nisplus.entry", FT_NONE, BASE_NONE,
1552 NULL, 0, "Entry Object", HFILL }},
1554 { &hf_nisplus_entry_type, {
1555 "type", "nisplus.entry.type", FT_STRING, BASE_DEC,
1556 NULL, 0, "Entry Type", HFILL }},
1558 { &hf_nisplus_entry_cols, {
1559 "columns", "nisplus.entry.cols", FT_NONE, BASE_NONE,
1560 NULL, 0, "Entry Columns", HFILL }},
1562 { &hf_nisplus_entry_col, {
1563 "column", "nisplus.entry.col", FT_NONE, BASE_NONE,
1564 NULL, 0, "Entry Column", HFILL }},
1566 { &hf_nisplus_entry_flags, {
1567 "flags", "nisplus.entry.flags", FT_UINT32, BASE_HEX,
1568 NULL, 0, "Entry Col Flags", HFILL }},
1570 { &hf_nisplus_entry_val, {
1571 "val", "nisplus.entry.val", FT_STRING, BASE_DEC,
1572 NULL, 0, "Entry Value", HFILL }},
1574 { &hf_nisplus_entry_mask, {
1575 "flags", "nisplus.entry.flags", FT_NONE, BASE_NONE,
1576 NULL, 0, "Entry Col Flags", HFILL }},
1578 { &hf_nisplus_entry_mask_binary, {
1579 "BINARY", "nisplus.entry.flags.binary",
1580 FT_BOOLEAN, 32, TFS(&tfs_entry_binary),
1581 NIS_MASK_ENTRY_BINARY, "Is This Entry BINARY Flag", HFILL }},
1583 { &hf_nisplus_entry_mask_crypt, {
1584 "ENCRYPTED", "nisplus.entry.flags.encrypted",
1585 FT_BOOLEAN, 32, TFS(&tfs_entry_crypt),
1586 NIS_MASK_ENTRY_CRYPT, "Is This Entry ENCRYPTED Flag", HFILL }},
1588 { &hf_nisplus_entry_mask_xdr, {
1589 "XDR", "nisplus.entry.flags.xdr",
1590 FT_BOOLEAN, 32, TFS(&tfs_entry_xdr),
1591 NIS_MASK_ENTRY_XDR, "Is This Entry XDR Encoded Flag", HFILL }},
1593 { &hf_nisplus_entry_mask_modified, {
1594 "MODIFIED", "nisplus.entry.flags.modified",
1595 FT_BOOLEAN, 32, TFS(&tfs_entry_modified),
1596 NIS_MASK_ENTRY_MODIFIED, "Is This Entry MODIFIED Flag", HFILL }},
1598 { &hf_nisplus_entry_mask_asn, {
1599 "ASN.1", "nisplus.entry.flags.asn",
1600 FT_BOOLEAN, 32, TFS(&tfs_entry_asn),
1601 NIS_MASK_ENTRY_ASN, "Is This Entry ASN.1 Encoded Flag", HFILL }},
1603 { &hf_nisplus_table, {
1604 "table", "nisplus.table", FT_NONE, BASE_NONE,
1605 NULL, 0, "Table Object", HFILL }},
1607 { &hf_nisplus_table_type, {
1608 "type", "nisplus.table.type", FT_STRING, BASE_DEC,
1609 NULL, 0, "Table Type", HFILL }},
1611 { &hf_nisplus_table_maxcol, {
1612 "max columns", "nisplus.table.maxcol", FT_UINT16, BASE_DEC,
1613 NULL, 0, "Maximum Number Of Columns For Table", HFILL }},
1615 { &hf_nisplus_table_sep, {
1616 "separator", "nisplus.table.separator", FT_UINT8, BASE_HEX,
1617 NULL, 0, "Separator Character", HFILL }},
1619 { &hf_nisplus_table_cols, {
1620 "columns", "nisplus.table.cols", FT_NONE, BASE_NONE,
1621 NULL, 0, "Table Columns", HFILL }},
1623 { &hf_nisplus_table_col, {
1624 "column", "nisplus.table.col", FT_NONE, BASE_NONE,
1625 NULL, 0, "Table Column", HFILL }},
1627 { &hf_nisplus_table_path, {
1628 "path", "nisplus.table.path", FT_STRING, BASE_DEC,
1629 NULL, 0, "Table Path", HFILL }},
1631 { &hf_nisplus_table_col_name, {
1632 "column name", "nisplus.table.col.name", FT_STRING, BASE_DEC,
1633 NULL, 0, "Column Name", HFILL }},
1635 { &hf_nisplus_table_col_mask, {
1636 "flags", "nisplus.table.col.flags", FT_NONE, BASE_NONE,
1637 NULL, 0, "Flags For This Column", HFILL }},
1639 { &hf_nisplus_table_col_mask_binary, {
1640 "binary", "nisplus.table.flags.binary",
1641 FT_BOOLEAN, 32, TFS(&tfs_col_binary),
1642 NIS_MASK_TABLE_BINARY, "Is This Column BINARY", HFILL }},
1644 { &hf_nisplus_table_col_mask_encrypted, {
1645 "encrypted", "nisplus.table.flags.encrypted",
1646 FT_BOOLEAN, 32, TFS(&tfs_col_encrypted),
1647 NIS_MASK_TABLE_CRYPT, "Is This Column ENCRYPTED", HFILL }},
1649 { &hf_nisplus_table_col_mask_xdr, {
1650 "xdr", "nisplus.table.flags.xdr",
1651 FT_BOOLEAN, 32, TFS(&tfs_col_xdr),
1652 NIS_MASK_TABLE_XDR, "Is This Column XDR Encoded", HFILL }},
1654 { &hf_nisplus_table_col_mask_searchable, {
1655 "searchable", "nisplus.table.flags.searchable",
1656 FT_BOOLEAN, 32, TFS(&tfs_col_searchable),
1657 NIS_MASK_TABLE_SRCH, "Is This Column SEARCHABLE", HFILL }},
1659 { &hf_nisplus_table_col_mask_casesensitive, {
1660 "casesensitive", "nisplus.table.flags.casesensitive",
1661 FT_BOOLEAN, 32, TFS(&tfs_col_casesensitive),
1662 NIS_MASK_TABLE_CASE, "Is This Column CASESENSITIVE", HFILL }},
1664 { &hf_nisplus_table_col_mask_modified, {
1665 "modified", "nisplus.table.flags.modified",
1666 FT_BOOLEAN, 32, TFS(&tfs_col_modified),
1667 NIS_MASK_TABLE_MODIFIED, "Is This Column MODIFIED", HFILL }},
1669 { &hf_nisplus_table_col_mask_asn, {
1670 "asn", "nisplus.table.flags.asn",
1671 FT_BOOLEAN, 32, TFS(&tfs_col_asn),
1672 NIS_MASK_TABLE_ASN, "Is This Column ASN.1 Encoded", HFILL }},
1674 { &hf_nisplus_group, {
1675 "Group", "nisplus.group", FT_NONE, BASE_NONE,
1676 NULL, 0, "Group Object", HFILL }},
1678 { &hf_nisplus_grps, {
1679 "Groups", "nisplus.grps", FT_NONE, BASE_NONE,
1680 NULL, 0, "List Of Groups", HFILL }},
1682 { &hf_nisplus_group_flags, {
1683 "flags", "nisplus.group.flags", FT_UINT32, BASE_HEX,
1684 NULL, 0, "Group Object Flags", HFILL }},
1686 { &hf_nisplus_group_name, {
1687 "group name", "nisplus.group.name", FT_STRING, BASE_DEC,
1688 NULL, 0, "Name Of Group Member", HFILL }},
1690 { &hf_nisplus_object_ctime, {
1691 "ctime", "nisplus.ctime", FT_ABSOLUTE_TIME, BASE_NONE,
1692 NULL, 0, "Time Of Creation", HFILL }},
1694 { &hf_nisplus_object_mtime, {
1695 "mtime", "nisplus.mtime", FT_ABSOLUTE_TIME, BASE_NONE,
1696 NULL, 0, "Time Last Modified", HFILL }},
1698 { &hf_nisplus_ib_flags, {
1699 "flags", "nisplus.ib.flags", FT_UINT32, BASE_HEX,
1700 NULL, 0, "Information Base Flags", HFILL }},
1702 { &hf_nisplus_ib_bufsize, {
1703 "bufsize", "nisplus.ib.bufsize", FT_UINT32, BASE_HEX,
1704 NULL, 0, "Optional First/NextBufSize", HFILL }},
1706 { &hf_nisplus_cookie, {
1707 "cookie", "nisplus.cookie", FT_BYTES, BASE_HEX,
1708 NULL, 0, "Cookie", HFILL }},
1710 { &hf_nisplus_fd_dirname, {
1711 "dirname", "nisplus.fd.dirname", FT_STRING, BASE_DEC,
1712 NULL, 0, "Directory Name", HFILL }},
1714 { &hf_nisplus_fd_requester, {
1715 "requester", "nisplus.fd.requester", FT_STRING, BASE_DEC,
1716 NULL, 0, "Host Principal Name For Signature", HFILL }},
1718 { &hf_nisplus_taglist, {
1719 "taglist", "nisplus.taglist", FT_NONE, BASE_NONE,
1720 NULL, 0, "List Of Tags", HFILL }},
1722 { &hf_nisplus_tag, {
1723 "tag", "nisplus.tag", FT_NONE, BASE_NONE,
1724 NULL, 0, "Tag", HFILL }},
1726 { &hf_nisplus_tag_type, {
1727 "type", "nisplus.tag.type", FT_UINT32, BASE_DEC,
1728 NULL, 0, "Type Of Statistics Tag", HFILL }},
1730 { &hf_nisplus_tag_val, {
1731 "value", "nisplus.tag.value", FT_STRING, BASE_DEC,
1732 NULL, 0, "Value Of Statistics Tag", HFILL }},
1734 { &hf_nisplus_dump_dir, {
1735 "directory", "nisplus.dump.dir", FT_STRING, BASE_DEC,
1736 NULL, 0, "Directory To Dump", HFILL }},
1738 { &hf_nisplus_dump_time, {
1739 "time", "nisplus.dump.time", FT_ABSOLUTE_TIME, BASE_NONE,
1740 NULL, 0, "From This Timestamp", HFILL }},
1742 { &hf_nisplus_dummy, {
1743 " ", ".nisplus.dummy", FT_BYTES, BASE_NONE,
1744 NULL, 0, " ", HFILL }},
1746 { &hf_nisplus_ping_time, {
1747 "time", "nisplus.ping.time", FT_ABSOLUTE_TIME, BASE_NONE,
1748 NULL, 0, "Timestamp Of The Transaction", HFILL }},
1750 { &hf_nisplus_ping_dir, {
1751 "directory", "nisplus.ping.dir", FT_STRING, BASE_DEC,
1752 NULL, 0, "Directory That Had The Change", HFILL }},
1754 { &hf_nisplus_error, {
1755 "status", "nisplus.status", FT_UINT32, BASE_DEC,
1756 VALS(nis_error), 0, "NIS Status Code", HFILL }},
1758 { &hf_nisplus_dir_data, {
1759 "data", "nisplus.fd.dir.data", FT_BYTES, BASE_HEX,
1760 NULL, 0, "Directory Data In XDR Format", HFILL }},
1762 { &hf_nisplus_signature, {
1763 "signature", "nisplus.fd.sig", FT_BYTES, BASE_HEX,
1764 NULL, 0, "Signature Of The Source", HFILL }},
1766 { &hf_nisplus_log_entries, {
1767 "log entries", "nisplus.log.entries", FT_NONE, BASE_NONE,
1768 NULL, 0, "Log Entries", HFILL }},
1770 { &hf_nisplus_log_entry, {
1771 "log entry", "nisplus.log.entry", FT_NONE, BASE_NONE,
1772 NULL, 0, "Log Entry", HFILL }},
1774 { &hf_nisplus_log_time, {
1775 "time", "nisplus.log.time", FT_ABSOLUTE_TIME, BASE_NONE,
1776 NULL, 0, "Time Of Log Entry", HFILL }},
1778 { &hf_nisplus_log_type, {
1779 "type", "nisplus.log.entry.type", FT_UINT32, BASE_DEC,
1780 VALS(entry_type), 0, "Type Of Entry In Transaction Log", HFILL }},
1782 { &hf_nisplus_log_principal, {
1783 "principal", "nisplus.log.principal", FT_STRING, BASE_DEC,
1784 NULL, 0, "Principal Making The Change", HFILL }},
1786 { &hf_nisplus_callback_status, {
1787 "status", "nisplus.callback.status",
1788 FT_BOOLEAN, 0, TFS(&tfs_callback_status),
1789 0, "Status Of Callback Thread", HFILL }},
1791 { &hf_nisplus_cp_status, {
1792 "status", "nisplus.checkpoint.status", FT_UINT32, BASE_DEC,
1793 NULL, 0, "Checkpoint Status", HFILL }},
1795 { &hf_nisplus_cp_zticks, {
1796 "zticks", "nisplus.checkpoint.zticks", FT_UINT32, BASE_DEC,
1797 NULL, 0, "Service Ticks", HFILL }},
1799 { &hf_nisplus_cp_dticks, {
1800 "dticks", "nisplus.checkpoint.dticks", FT_UINT32, BASE_DEC,
1801 NULL, 0, "Database Ticks", HFILL }},
1803 { &hf_nisplus_zticks, {
1804 "zticks", "nisplus.zticks", FT_UINT32, BASE_DEC,
1805 NULL, 0, "", HFILL }},
1807 { &hf_nisplus_dticks, {
1808 "dticks", "nisplus.dticks", FT_UINT32, BASE_DEC,
1809 NULL, 0, "", HFILL }},
1811 { &hf_nisplus_aticks, {
1812 "aticks", "nisplus.aticks", FT_UINT32, BASE_DEC,
1813 NULL, 0, "", HFILL }},
1815 { &hf_nisplus_cticks, {
1816 "cticks", "nisplus.cticks", FT_UINT32, BASE_DEC,
1817 NULL, 0, "", HFILL }},
1821 static gint *ett[] = {
1823 &ett_nisplus_object,
1825 &ett_nisplus_directory,
1826 &ett_nisplus_directory_mask,
1827 &ett_nisplus_access_mask,
1828 &ett_nisplus_server,
1829 &ett_nisplus_endpoint,
1833 &ett_nisplus_entry_col,
1834 &ett_nisplus_entry_mask,
1836 &ett_nisplus_table_col,
1837 &ett_nisplus_table_col_mask,
1841 &ett_nisplus_log_entry,
1844 proto_nisplus = proto_register_protocol("NIS+",
1846 proto_register_field_array(proto_nisplus, hf, array_length(hf));
1847 proto_register_subtree_array(ett, array_length(ett));
1851 proto_reg_handoff_nis(void)
1853 /* Register the protocol as RPC */
1854 rpc_init_prog(proto_nisplus, NIS_PROGRAM, ett_nisplus);
1855 /* Register the procedure tables */
1856 rpc_init_proc_table(NIS_PROGRAM, 3, nisplus3_proc, hf_nisplus_procedure_v3);
1864 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1865 callback protocol for NIS+
1866 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
1868 static int proto_nispluscb = -1;
1869 static int hf_nispluscb_procedure_v1 = -1;
1870 static int hf_nispluscb_entries = -1;
1871 static int hf_nispluscb_entry = -1;
1873 static gint ett_nispluscb = -1;
1874 static gint ett_nispluscb_entry = -1;
1877 dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
1879 proto_item* lock_item = NULL;
1880 proto_tree* lock_tree = NULL;
1881 int old_offset = offset;
1883 lock_item = proto_tree_add_item(tree, hf_nispluscb_entry,
1884 tvb, offset, -1, FALSE);
1886 lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry);
1888 /*XXXXX Not implemented yet*/
1890 proto_item_set_len(lock_item, offset-old_offset);
1895 dissect_cback_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1897 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1898 dissect_cb_entry, hf_nispluscb_entries);
1903 /* proc number, "proc name", dissect_request, dissect_reply */
1904 /* NULL as function pointer means: type of arguments is "void". */
1905 static const vsff cb1_proc[] = {
1906 { CBPROC_NULL, "NULL",
1908 { CBPROC_RECEIVE, "RECEIVE",
1909 dissect_cback_data, dissect_callback_result },
1910 { CBPROC_FINISH, "FINISH",
1912 { CBPROC_ERROR, "ERROR",
1913 dissect_nisplus_error, NULL },
1914 { 0, NULL, NULL, NULL },
1916 static const value_string nispluscb1_proc_vals[] = {
1917 { CBPROC_NULL, "NULL" },
1918 { CBPROC_RECEIVE, "RECEIVE" },
1919 { CBPROC_FINISH, "FINISH" },
1920 { CBPROC_ERROR, "ERROR" },
1925 proto_register_niscb(void)
1927 static hf_register_info hf[] = {
1928 { &hf_nispluscb_procedure_v1, {
1929 "V1 Procedure", "nispluscb.procedure_v1", FT_UINT32, BASE_DEC,
1930 VALS(nispluscb1_proc_vals), 0, "V1 Procedure", HFILL }},
1931 { &hf_nispluscb_entries, {
1932 "entries", "nispluscb.entries", FT_NONE, BASE_NONE,
1933 NULL, 0, "NIS Callback Entries", HFILL }},
1935 { &hf_nispluscb_entry, {
1936 "entry", "nispluscb.entry", FT_NONE, BASE_NONE,
1937 NULL, 0, "NIS Callback Entry", HFILL }},
1941 static gint *ett[] = {
1943 &ett_nispluscb_entry,
1946 proto_nispluscb = proto_register_protocol("NIS+ Callback",
1947 "NIS+ CB", "nispluscb");
1948 proto_register_field_array(proto_nispluscb, hf, array_length(hf));
1949 proto_register_subtree_array(ett, array_length(ett));
1953 proto_reg_handoff_niscb(void)
1955 /* Register the protocol as RPC */
1956 rpc_init_prog(proto_nispluscb, CB_PROGRAM, ett_nispluscb);
1957 /* Register the procedure tables */
1958 rpc_init_proc_table(CB_PROGRAM, 1, cb1_proc, hf_nispluscb_procedure_v1);