2 * 2001 Ronnie Sahlberg <See AUTHORS for email>
4 * $Id: packet-nisplus.c,v 1.9 2001/12/23 21:36:57 guy 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, packet_info *pinfo, 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, proto_tree *tree)
284 offset = dissect_rpc_string(tvb, pinfo, 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, 0, FALSE);
301 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_group);
303 offset = dissect_rpc_uint32(tvb, pinfo, 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, packet_info *pinfo, 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, 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,
361 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table_col);
363 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
364 hf_nisplus_table_col_name, offset, NULL);
367 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_table_col_mask,
370 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_table_col_mask);
371 mask = tvb_get_ntohl(tvb, offset);
372 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_binary,
373 tvb, offset, 4, mask);
374 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_encrypted,
375 tvb, offset, 4, mask);
376 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_xdr,
377 tvb, offset, 4, mask);
378 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_searchable,
379 tvb, offset, 4, mask);
380 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_casesensitive,
381 tvb, offset, 4, mask);
382 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_modified,
383 tvb, offset, 4, mask);
384 proto_tree_add_boolean(mask_tree, hf_nisplus_table_col_mask_asn,
385 tvb, offset, 4, mask);
388 offset = dissect_access_rights(tvb, offset, pinfo, lock_tree);
390 proto_item_set_len(lock_item, offset-old_offset);
395 dissect_table_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
398 proto_item* lock_item = NULL;
399 proto_tree* lock_tree = NULL;
400 int old_offset = offset;
402 lock_item = proto_tree_add_item(tree, hf_nisplus_table,
403 tvb, offset, 0, FALSE);
405 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table);
407 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
408 hf_nisplus_table_type, offset, NULL);
410 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
411 hf_nisplus_table_maxcol, offset);
413 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
414 hf_nisplus_table_sep, offset);
416 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
417 dissect_table, hf_nisplus_table_cols);
419 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
420 hf_nisplus_table_path, offset, NULL);
422 proto_item_set_len(lock_item, offset-old_offset);
427 dissect_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
429 proto_item* lock_item = NULL;
430 proto_tree* lock_tree = NULL;
431 proto_item* mask_item = NULL;
432 proto_tree* mask_tree = NULL;
434 int old_offset = offset;
436 lock_item = proto_tree_add_item(tree, hf_nisplus_entry_col,
437 tvb, offset, 0, FALSE);
439 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry_col);
441 mask_item = proto_tree_add_item(lock_tree, hf_nisplus_entry_mask,
445 mask_tree = proto_item_add_subtree(mask_item, ett_nisplus_entry_mask);
446 mask = tvb_get_ntohl(tvb, offset);
447 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_binary, tvb, offset, 4, mask);
448 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_crypt, tvb, offset, 4, mask);
449 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_xdr, tvb, offset, 4, mask);
450 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_modified, tvb, offset, 4, mask);
451 proto_tree_add_boolean(mask_tree, hf_nisplus_entry_mask_asn, tvb, offset, 4, mask);
454 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
455 hf_nisplus_entry_val, offset, NULL);
457 proto_item_set_len(lock_item, offset-old_offset);
462 dissect_entry_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
464 proto_item* lock_item = NULL;
465 proto_tree* lock_tree = NULL;
466 int old_offset = offset;
468 lock_item = proto_tree_add_item(tree, hf_nisplus_entry,
469 tvb, offset, 0, FALSE);
471 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry);
473 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
474 hf_nisplus_entry_type, offset, NULL);
476 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
477 dissect_entry, hf_nisplus_entry_cols);
479 proto_item_set_len(lock_item, offset-old_offset);
484 dissect_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
486 proto_item* lock_item = NULL;
487 proto_tree* lock_tree = NULL;
488 int old_offset = offset;
490 lock_item = proto_tree_add_item(tree, hf_nisplus_attr,
491 tvb, offset, 0, FALSE);
493 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_attr);
495 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
496 hf_nisplus_attr_name, offset, NULL);
498 offset = dissect_rpc_data(tvb, pinfo, lock_tree,
499 hf_nisplus_attr_val, offset);
501 proto_item_set_len(lock_item, offset-old_offset);
506 dissect_link_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
508 proto_item* lock_item = NULL;
509 proto_tree* lock_tree = NULL;
510 int old_offset = offset;
512 lock_item = proto_tree_add_item(tree, hf_nisplus_link,
513 tvb, offset, 0, FALSE);
515 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_link);
517 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
518 hf_nisplus_object_type, offset);
520 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
521 dissect_attr, hf_nisplus_attrs_array);
523 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
524 hf_nisplus_object_name, offset, NULL);
526 proto_item_set_len(lock_item, offset-old_offset);
532 dissect_endpoint(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
534 proto_item* lock_item = NULL;
535 proto_tree* lock_tree = NULL;
536 int old_offset = offset;
538 lock_item = proto_tree_add_item(tree, hf_nisplus_endpoint,
539 tvb, offset, 0, FALSE);
541 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_endpoint);
543 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
544 hf_nisplus_endpoint_uaddr, offset, NULL);
546 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
547 hf_nisplus_endpoint_family, offset, NULL);
549 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
550 hf_nisplus_endpoint_proto, offset, NULL);
552 proto_item_set_len(lock_item, offset-old_offset);
558 dissect_directory_server(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
560 proto_item* lock_item = NULL;
561 proto_tree* lock_tree = NULL;
562 int old_offset = offset;
564 lock_item = proto_tree_add_item(tree, hf_nisplus_server,
565 tvb, offset, 0, FALSE);
567 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_server);
569 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
570 hf_nisplus_server_name, offset, NULL);
572 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
573 dissect_endpoint, hf_nisplus_endpoints);
575 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
576 hf_nisplus_key_type, offset);
578 offset = dissect_rpc_data(tvb, pinfo, lock_tree,
579 hf_nisplus_key_data, offset);
581 proto_item_set_len(lock_item, offset-old_offset);
587 dissect_directory_mask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
589 proto_item* lock_item = NULL;
590 proto_tree* lock_tree = NULL;
591 int old_offset = offset;
593 lock_item = proto_tree_add_item(tree, hf_nisplus_directory_mask,
594 tvb, offset, 0, FALSE);
596 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory_mask);
598 offset = dissect_access_rights(tvb, offset, pinfo, lock_tree);
600 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
601 hf_nisplus_object_type, offset);
603 proto_item_set_len(lock_item, offset-old_offset);
608 dissect_directory_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
610 proto_item* lock_item = NULL;
611 proto_tree* lock_tree = NULL;
612 int old_offset = offset;
614 lock_item = proto_tree_add_item(tree, hf_nisplus_directory,
615 tvb, offset, 0, FALSE);
617 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory);
619 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
620 hf_nisplus_directory_name, offset, NULL);
622 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
623 hf_nisplus_directory_type, offset);
625 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
626 dissect_directory_server, hf_nisplus_servers);
628 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
629 hf_nisplus_directory_ttl, offset);
631 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
632 dissect_directory_mask, hf_nisplus_directory_mask_list);
634 proto_item_set_len(lock_item, offset-old_offset);
639 dissect_nisplus_oid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
641 proto_item* lock_item = NULL;
642 proto_tree* lock_tree = NULL;
643 int old_offset = offset;
645 lock_item = proto_tree_add_item(tree, hf_nisplus_oid, tvb,
648 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_oid);
650 offset = dissect_nisplus_time(tvb, offset, pinfo, lock_tree,
651 hf_nisplus_object_ctime);
653 offset = dissect_nisplus_time(tvb, offset, pinfo, lock_tree,
654 hf_nisplus_object_mtime);
656 proto_item_set_len(lock_item, offset-old_offset);
661 dissect_nisplus_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
663 proto_item* lock_item = NULL;
664 proto_tree* lock_tree = NULL;
666 int old_offset = offset;
668 lock_item = proto_tree_add_item(tree, hf_nisplus_object, tvb,
671 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_object);
673 offset = dissect_nisplus_oid(tvb, offset, pinfo, lock_tree);
675 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
676 hf_nisplus_object_name, offset, NULL);
678 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
679 hf_nisplus_object_owner, offset, NULL);
681 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
682 hf_nisplus_object_group, offset, NULL);
684 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
685 hf_nisplus_object_domain, offset, NULL);
687 offset = dissect_access_rights(tvb, offset, pinfo, lock_tree);
689 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
690 hf_nisplus_object_ttl, offset);
692 type = tvb_get_ntohl(tvb, offset);
693 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
694 hf_nisplus_object_type, offset);
696 case NIS_DIRECTORY_OBJ:
697 offset = dissect_directory_obj(tvb, offset, pinfo, lock_tree);
700 offset = dissect_group_obj(tvb, offset, pinfo, lock_tree);
703 offset = dissect_table_obj(tvb, offset, pinfo, lock_tree);
706 offset = dissect_entry_obj(tvb, offset, pinfo, lock_tree);
709 offset = dissect_link_obj(tvb, offset, pinfo, lock_tree);
711 case NIS_PRIVATE_OBJ:
712 offset = dissect_rpc_data(tvb, pinfo, lock_tree,
713 hf_nisplus_object_private, offset);
723 proto_item_set_len(lock_item, offset-old_offset);
726 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
727 end of nis object, thats right, all this was the definition of
734 dissect_ns_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
736 offset = dissect_rpc_string(tvb, pinfo, tree,
737 hf_nisplus_object_name, offset, NULL);
739 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
740 dissect_nisplus_object, hf_nisplus_object);
746 dissect_ib_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
748 offset = dissect_rpc_string(tvb, pinfo, tree,
749 hf_nisplus_object_name, offset, NULL);
751 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
752 dissect_attr, hf_nisplus_attrs_array);
754 offset = dissect_rpc_uint32(tvb, pinfo, tree,
755 hf_nisplus_ib_flags, offset);
757 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
758 dissect_nisplus_object, hf_nisplus_object);
760 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
761 dissect_directory_server, hf_nisplus_cbservers);
763 offset = dissect_rpc_uint32(tvb, pinfo, tree,
764 hf_nisplus_ib_bufsize, offset);
766 offset = dissect_rpc_data(tvb, pinfo, tree,
767 hf_nisplus_cookie, offset);
773 dissect_fd_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
775 offset = dissect_rpc_string(tvb, pinfo, tree,
776 hf_nisplus_fd_dirname, offset, NULL);
778 offset = dissect_rpc_string(tvb, pinfo, tree,
779 hf_nisplus_fd_requester, offset, NULL);
785 dissect_nisplus_tag(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
787 proto_item* lock_item = NULL;
788 proto_tree* lock_tree = NULL;
789 int old_offset = offset;
791 lock_item = proto_tree_add_item(tree, hf_nisplus_tag, tvb,
794 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_tag);
796 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
797 hf_nisplus_tag_type, offset);
799 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
800 hf_nisplus_tag_val, offset, NULL);
802 proto_item_set_len(lock_item, offset-old_offset);
807 dissect_nisplus_taglist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
809 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
810 dissect_nisplus_tag, hf_nisplus_taglist);
816 dissect_dump_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
818 offset = dissect_rpc_string(tvb, pinfo, tree,
819 hf_nisplus_dump_dir, offset, NULL);
821 offset = dissect_nisplus_time(tvb, offset, pinfo, tree,
822 hf_nisplus_dump_time);
824 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
825 dissect_directory_server, hf_nisplus_cbservers);
831 dissect_netobj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
833 offset = dissect_rpc_data(tvb, pinfo, tree,
834 hf_nisplus_dummy, offset);
840 dissect_nisname(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
842 offset = dissect_rpc_string(tvb, pinfo, tree,
843 hf_nisplus_object_name, offset, NULL);
849 dissect_ping_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
851 offset = dissect_rpc_string(tvb, pinfo, tree,
852 hf_nisplus_ping_dir, offset, NULL);
854 offset = dissect_nisplus_time(tvb, offset, pinfo, tree,
855 hf_nisplus_ping_time);
861 static const value_string nis_error[] = {
862 #define NIS_SUCCESS 0
863 { NIS_SUCCESS, "A-ok, let's rock n roll" },
864 #define NIS_S_SUCCESS 1
865 { NIS_S_SUCCESS, "Name found (maybe)" },
866 #define NIS_NOTFOUND 2
867 { NIS_NOTFOUND, "Name definitely not found" },
868 #define NIS_S_NOTFOUND 3
869 { NIS_S_NOTFOUND, "Name maybe not found" },
870 #define NIS_CACHEEXPIRED 4
871 { NIS_CACHEEXPIRED, "Name exists but cache out of date" },
872 #define NIS_NAMEUNREACHABLE 5
873 { NIS_NAMEUNREACHABLE, "Can't get there from here" },
874 #define NIS_UNKNOWNOBJ 6
875 { NIS_UNKNOWNOBJ, "Object type is bogus" },
876 #define NIS_TRYAGAIN 7
877 { NIS_TRYAGAIN, "I'm busy, call back" },
878 #define NIS_SYSTEMERROR 8
879 { NIS_SYSTEMERROR, "Generic system error" },
880 #define NIS_CHAINBROKEN 9
881 { NIS_CHAINBROKEN, "First/Next warning" },
882 #define NIS_PERMISSION 10
883 { NIS_PERMISSION, "Not enough permission to access" },
884 #define NIS_NOTOWNER 11
885 { NIS_NOTOWNER, "You don't own it, sorry" },
886 #define NIS_NOT_ME 12
887 { NIS_NOT_ME, "I don't serve this name" },
888 #define NIS_NOMEMORY 13
889 { NIS_NOMEMORY, "Outta VM! Help!" },
890 #define NIS_NAMEEXISTS 14
891 { NIS_NAMEEXISTS, "Can't create over another name" },
892 #define NIS_NOTMASTER 15
893 { NIS_NOTMASTER, "I'm justa secondaray, don't ask me" },
894 #define NIS_INVALIDOBJ 16
895 { NIS_INVALIDOBJ, "Object is broken somehow" },
896 #define NIS_BADNAME 17
897 { NIS_BADNAME, "Unparsable name" },
898 #define NIS_NOCALLBACK 18
899 { NIS_NOCALLBACK, "Couldn't talk to call back proc" },
900 #define NIS_CBRESULTS 19
901 { NIS_CBRESULTS, "Results being called back to you" },
902 #define NIS_NOSUCHNAME 20
903 { NIS_NOSUCHNAME, "Name unknown" },
904 #define NIS_NOTUNIQUE 21
905 { NIS_NOTUNIQUE, "Value is not uniques (entry)" },
906 #define NIS_IBMODERROR 22
907 { NIS_IBMODERROR, "Inf. Base. Modify error." },
908 #define NIS_NOSUCHTABLE 23
909 { NIS_NOSUCHTABLE, "Name for table was wrong" },
910 #define NIS_TYPEMISMATCH 24
911 { NIS_TYPEMISMATCH, "Entry and table type mismatch" },
912 #define NIS_LINKNAMEERROR 25
913 { NIS_LINKNAMEERROR, "Link points to bogus name" },
914 #define NIS_PARTIAL 26
915 { NIS_PARTIAL, "Partial success, found table" },
916 #define NIS_TOOMANYATTRS 27
917 { NIS_TOOMANYATTRS, "Too many attributes" },
918 #define NIS_RPCERROR 28
919 { NIS_RPCERROR, "RPC error encountered" },
920 #define NIS_BADATTRIBUTE 29
921 { NIS_BADATTRIBUTE, "Bad or invalid attribute" },
922 #define NIS_NOTSEARCHABLE 30
923 { NIS_NOTSEARCHABLE, "Non-searchable object searched" },
924 #define NIS_CBERROR 31
925 { NIS_CBERROR, "Error during callback (svc crash)" },
926 #define NIS_FOREIGNNS 32
927 { NIS_FOREIGNNS, "Foreign Namespace" },
928 #define NIS_BADOBJECT 33
929 { NIS_BADOBJECT, "Malformed object structure" },
930 #define NIS_NOTSAMEOBJ 34
931 { NIS_NOTSAMEOBJ, "Object swapped during deletion" },
932 #define NIS_MODFAIL 35
933 { NIS_MODFAIL, "Failure during a Modify." },
934 #define NIS_BADREQUEST 36
935 { NIS_BADREQUEST, "Illegal query for table" },
936 #define NIS_NOTEMPTY 37
937 { NIS_NOTEMPTY, "Attempt to remove a non-empty tbl" },
938 #define NIS_COLDSTART_ERR 38
939 { NIS_COLDSTART_ERR, "Error accesing the cold start file" },
940 #define NIS_RESYNC 39
941 { NIS_RESYNC, "Transaction log too far out of date" },
943 { NIS_FAIL, "NIS operation failed." },
944 #define NIS_UNAVAIL 41
945 { NIS_UNAVAIL, "NIS+ service is unavailable (client)" },
946 #define NIS_RES2BIG 42
947 { NIS_RES2BIG, "NIS+ result too big for datagram" },
948 #define NIS_SRVAUTH 43
949 { NIS_SRVAUTH, "NIS+ server wasn't authenticated." },
950 #define NIS_CLNTAUTH 44
951 { NIS_CLNTAUTH, "NIS+ Client wasn't authenticated." },
952 #define NIS_NOFILESPACE 45
953 { NIS_NOFILESPACE, "NIS+ server ran out of disk space" },
954 #define NIS_NOPROC 46
955 { NIS_NOPROC, "NIS+ server couldn't create new proc" },
956 #define NIS_DUMPLATER 47
957 { NIS_DUMPLATER, "NIS+ server already has dump child" },
962 dissect_nisplus_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
964 offset = dissect_rpc_uint32(tvb, pinfo, tree,
965 hf_nisplus_error, offset);
967 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
968 dissect_nisplus_object, hf_nisplus_object);
970 offset = dissect_rpc_data(tvb, pinfo, tree,
971 hf_nisplus_cookie, offset);
973 offset = dissect_rpc_uint32(tvb, pinfo, tree,
974 hf_nisplus_zticks, offset);
976 offset = dissect_rpc_uint32(tvb, pinfo, tree,
977 hf_nisplus_dticks, offset);
979 offset = dissect_rpc_uint32(tvb, pinfo, tree,
980 hf_nisplus_aticks, offset);
982 offset = dissect_rpc_uint32(tvb, pinfo, tree,
983 hf_nisplus_cticks, offset);
989 dissect_fd_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
991 offset = dissect_rpc_uint32(tvb, pinfo, tree,
992 hf_nisplus_error, offset);
994 offset = dissect_rpc_string(tvb, pinfo, tree,
995 hf_nisplus_fd_dirname, offset, NULL);
997 offset = dissect_rpc_data(tvb, pinfo, tree,
998 hf_nisplus_dir_data, offset);
1000 offset = dissect_rpc_data(tvb, pinfo, tree,
1001 hf_nisplus_signature, offset);
1006 static const value_string entry_type[] = {
1009 #define LOG_ADD_NAME 1
1010 { LOG_ADD_NAME, "Name Was Added" },
1011 #define LOG_REM_NAME 2
1012 { LOG_REM_NAME, "Name Was Removed" },
1013 #define LOG_MOD_NAME_OLD 3
1014 { LOG_MOD_NAME_OLD, "Name Was Modified" },
1015 #define LOG_MOD_NAME_NEW 4
1016 { LOG_MOD_NAME_NEW, "Name Was Modified" },
1017 #define LOG_ADD_IBASE 5
1018 { LOG_ADD_IBASE, "Entry Added To Information Base" },
1019 #define LOG_REM_IBASE 6
1020 { LOG_REM_IBASE, "Entry Removed From Information Base" },
1021 #define LOG_MOD_IBASE 7
1022 { LOG_MOD_IBASE, "Entry Modified In Information Base" },
1023 #define LOG_UPD_STAMP 8
1024 { LOG_UPD_STAMP, "Update Timestamp" },
1028 dissect_log_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1030 proto_item* lock_item = NULL;
1031 proto_tree* lock_tree = NULL;
1032 int old_offset = offset;
1034 lock_item = proto_tree_add_item(tree, hf_nisplus_log_entry,
1035 tvb, offset, 0, FALSE);
1037 lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_log_entry);
1039 offset = dissect_nisplus_time(tvb, offset, pinfo, lock_tree,
1040 hf_nisplus_log_time);
1042 offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
1043 hf_nisplus_log_type, offset);
1045 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
1046 hf_nisplus_log_principal, offset, NULL);
1048 offset = dissect_rpc_string(tvb, pinfo, lock_tree,
1049 hf_nisplus_directory_name, offset, NULL);
1051 offset = dissect_rpc_array(tvb, pinfo, lock_tree, offset,
1052 dissect_attr, hf_nisplus_attrs_array);
1054 offset = dissect_nisplus_object(tvb, offset, pinfo, lock_tree);
1056 proto_item_set_len(lock_item, offset-old_offset);
1061 dissect_log_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1063 offset = dissect_rpc_uint32(tvb, pinfo, tree,
1064 hf_nisplus_error, offset);
1066 offset = dissect_rpc_data(tvb, pinfo, tree,
1067 hf_nisplus_cookie, offset);
1069 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1070 dissect_log_entry, hf_nisplus_log_entries);
1076 dissect_callback_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1078 offset = dissect_rpc_bool(tvb, pinfo, tree, hf_nisplus_callback_status,
1085 dissect_change_time(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1087 offset = dissect_nisplus_time(tvb, offset, pinfo, tree,
1088 hf_nisplus_log_time);
1094 dissect_cp_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1096 offset = dissect_rpc_uint32(tvb, pinfo, tree,
1097 hf_nisplus_cp_status, offset);
1099 offset = dissect_rpc_uint32(tvb, pinfo, tree,
1100 hf_nisplus_cp_zticks, offset);
1102 offset = dissect_rpc_uint32(tvb, pinfo, tree,
1103 hf_nisplus_cp_dticks, offset);
1109 dissect_nisplus_error(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1111 offset = dissect_rpc_uint32(tvb, pinfo, tree,
1112 hf_nisplus_error, offset);
1117 /* proc number, "proc name", dissect_request, dissect_reply */
1118 /* NULL as function pointer means: type of arguments is "void". */
1119 static const vsff nisplus3_proc[] = {
1120 { NISPROC_NULL, "NULL",
1122 { NISPROC_LOOKUP, "LOOKUP",
1123 dissect_ns_request, dissect_nisplus_result },
1124 { NISPROC_ADD, "ADD",
1125 dissect_ns_request, dissect_nisplus_result },
1126 { NISPROC_MODIFY, "MODIFY",
1127 dissect_ns_request, dissect_nisplus_result },
1128 { NISPROC_REMOVE, "REMOVE",
1129 dissect_ns_request, dissect_nisplus_result },
1130 { NISPROC_IBLIST, "IBLIST",
1131 dissect_ib_request, dissect_nisplus_result },
1132 { NISPROC_IBADD, "IBADD",
1133 dissect_ib_request, dissect_nisplus_result },
1134 { NISPROC_IBMODIFY, "IBMODIFY",
1135 dissect_ib_request, dissect_nisplus_result },
1136 { NISPROC_IBREMOVE, "IBREMOVE",
1137 dissect_ib_request, dissect_nisplus_result },
1138 { NISPROC_IBFIRST, "IBFIRST",
1139 dissect_ib_request, dissect_nisplus_result },
1140 { NISPROC_IBNEXT, "IBNEXT",
1141 dissect_ib_request, dissect_nisplus_result },
1142 { NISPROC_FINDDIRECTORY, "FINDDIRECTORY",
1143 dissect_fd_args, dissect_fd_result },
1144 { NISPROC_STATUS, "STATUS",
1145 dissect_nisplus_taglist, dissect_nisplus_taglist },
1146 { NISPROC_DUMPLOG, "DUMPLOG",
1147 dissect_dump_args, dissect_log_result },
1148 { NISPROC_DUMP, "DUMP",
1149 dissect_dump_args, dissect_log_result },
1150 { NISPROC_CALLBACK, "CALLBACK",
1151 dissect_netobj, dissect_callback_result },
1152 { NISPROC_CPTIME, "CPTIME",
1153 dissect_nisname, dissect_change_time },
1154 { NISPROC_CHECKPOINT, "CHECKPOINT",
1155 dissect_nisname, dissect_cp_result },
1156 { NISPROC_PING, "PING",
1157 dissect_ping_args, NULL },
1158 { NISPROC_SERVSTATE, "SERVSTATE",
1159 dissect_nisplus_taglist, dissect_nisplus_taglist },
1160 { NISPROC_MKDIR, "MKDIR",
1161 dissect_nisname, dissect_nisplus_error },
1162 { NISPROC_RMDIR, "RMDIR",
1163 dissect_nisname, dissect_nisplus_error },
1164 { NISPROC_UPDKEYS, "UPDKEYS",
1165 dissect_nisname, dissect_nisplus_error },
1166 { 0, NULL, NULL, NULL }
1172 proto_register_nis(void)
1174 static const true_false_string tfs_col_binary = {
1176 "column is NOT binary"
1178 static const true_false_string tfs_col_encrypted = {
1179 "column is encrypted",
1180 "column is NOT encrypted"
1182 static const true_false_string tfs_col_xdr = {
1183 "column is xdr encoded",
1184 "column is NOT xdr encoded"
1186 static const true_false_string tfs_col_searchable = {
1187 "column is searchable",
1188 "column is NOT searchable"
1190 static const true_false_string tfs_col_casesensitive = {
1191 "column is case sensitive",
1192 "column is NOT case sensitive"
1194 static const true_false_string tfs_col_modified = {
1195 "column is modified",
1196 "column is NOT modified"
1198 static const true_false_string tfs_col_asn = {
1199 "column is asn.1 encoded",
1200 "column is NOT asn.1 encoded"
1203 static const true_false_string tfs_entry_binary = {
1205 "entry is NOT binary"
1208 static const true_false_string tfs_entry_crypt = {
1209 "entry is encrypted",
1210 "entry is NOT encrypted"
1213 static const true_false_string tfs_entry_xdr = {
1214 "entry is xdr encoded",
1215 "entry is NOT xdr encoded"
1218 static const true_false_string tfs_entry_modified = {
1219 "entry is modified",
1220 "entry is NOT modified"
1223 static const true_false_string tfs_entry_asn = {
1224 "entry is asn.1 encoded",
1225 "entry is NOT asn.1 encoded"
1228 static const true_false_string tfs_world_read = {
1230 "world can NOT read"
1233 static const true_false_string tfs_world_modify = {
1235 "world can NOT modify"
1238 static const true_false_string tfs_world_create = {
1240 "world can NOT create"
1243 static const true_false_string tfs_world_destroy = {
1244 "world can destroy",
1245 "world can NOT destroy"
1248 static const true_false_string tfs_group_read = {
1250 "group can NOT read"
1253 static const true_false_string tfs_group_modify = {
1255 "group can NOT modify"
1258 static const true_false_string tfs_group_create = {
1260 "group can NOT create"
1263 static const true_false_string tfs_group_destroy = {
1264 "group can destroy",
1265 "group can NOT destroy"
1268 static const true_false_string tfs_owner_read = {
1270 "owner can NOT read"
1273 static const true_false_string tfs_owner_modify = {
1275 "owner can NOT modify"
1278 static const true_false_string tfs_owner_create = {
1280 "owner can NOT create"
1283 static const true_false_string tfs_owner_destroy = {
1284 "owner can destroy",
1285 "owner can NOT destroy"
1288 static const true_false_string tfs_nobody_read = {
1290 "nobody can NOT read"
1293 static const true_false_string tfs_nobody_modify = {
1294 "nobody can modify",
1295 "nobody can NOT modify"
1298 static const true_false_string tfs_nobody_create = {
1299 "nobody can create",
1300 "nobody can NOT create"
1303 static const true_false_string tfs_nobody_destroy = {
1304 "nobody can destroy",
1305 "nobody can NOT destroy"
1308 static const true_false_string tfs_callback_status = {
1316 static hf_register_info hf[] = {
1317 { &hf_nisplus_object, {
1318 "NIS Object", "nisplus.object", FT_NONE, BASE_NONE,
1319 NULL, 0, "NIS Object", HFILL }},
1321 { &hf_nisplus_oid, {
1322 "Object Identity Verifier", "nisplus.object.oid", FT_NONE, BASE_NONE,
1323 NULL, 0, "NIS Object Identity Verifier", HFILL }},
1325 { &hf_nisplus_object_name, {
1326 "name", "nisplus.object.name", FT_STRING, BASE_DEC,
1327 NULL, 0, "NIS Name For This Object", HFILL }},
1329 { &hf_nisplus_object_owner, {
1330 "owner", "nisplus.object.owner", FT_STRING, BASE_DEC,
1331 NULL, 0, "NIS Name Of Object Owner", HFILL }},
1333 { &hf_nisplus_object_group, {
1334 "group", "nisplus.object.group", FT_STRING, BASE_DEC,
1335 NULL, 0, "NIS Name Of Access Group", HFILL }},
1337 { &hf_nisplus_object_domain, {
1338 "domain", "nisplus.object.domain", FT_STRING, BASE_DEC,
1339 NULL, 0, "NIS Administrator For This Object", HFILL }},
1341 { &hf_nisplus_object_ttl, {
1342 "ttl", "nisplus.object.ttl", FT_UINT32, BASE_DEC,
1343 NULL, 0, "NIS Time To Live For This Object", HFILL }},
1345 { &hf_nisplus_object_private, {
1346 "private", "nisplus.object.private", FT_BYTES, BASE_DEC,
1347 NULL, 0, "NIS Private Object", HFILL }},
1349 { &hf_nisplus_directory, {
1350 "directory", "nisplus.directory", FT_NONE, BASE_NONE,
1351 NULL, 0, "NIS Directory Object", HFILL }},
1353 { &hf_nisplus_directory_name, {
1354 "directory name", "nisplus.directory.name", FT_STRING, BASE_DEC,
1355 NULL, 0, "Name Of Directory Being Served", HFILL }},
1357 { &hf_nisplus_directory_type, {
1358 "type", "nisplus.directory.type", FT_UINT32, BASE_DEC,
1359 VALS(ns_type), 0, "NIS Type Of Name Service", HFILL }},
1361 { &hf_nisplus_directory_ttl, {
1362 "ttl", "nisplus.directory.ttl", FT_UINT32, BASE_DEC,
1363 NULL, 0, "Time To Live", HFILL }},
1365 { &hf_nisplus_directory_mask, {
1366 "mask", "nisplus.directory.mask", FT_NONE, BASE_NONE,
1367 NULL, 0, "NIS Directory Create/Destroy Rights", HFILL }},
1369 { &hf_nisplus_directory_mask_list, {
1370 "mask list", "nisplus.directory.mask_list", FT_NONE, BASE_NONE,
1371 NULL, 0, "List Of Directory Create/Destroy Rights", HFILL }},
1373 { &hf_nisplus_mask_world_read, {
1374 "WORLD READ", "nisplus.directory.mask.world_read",
1375 FT_BOOLEAN, 32, TFS(&tfs_world_read),
1376 NIS_MASK_WORLD_READ, "World Read Flag", HFILL }},
1378 { &hf_nisplus_mask_world_modify, {
1379 "WORLD MODIFY", "nisplus.directory.mask.world_modify",
1380 FT_BOOLEAN, 32, TFS(&tfs_world_modify),
1381 NIS_MASK_WORLD_MODIFY, "World Modify Flag", HFILL }},
1383 { &hf_nisplus_mask_world_create, {
1384 "WORLD CREATE", "nisplus.directory.mask.world_create",
1385 FT_BOOLEAN, 32, TFS(&tfs_world_create),
1386 NIS_MASK_WORLD_CREATE, "World Create Flag", HFILL }},
1388 { &hf_nisplus_mask_world_destroy, {
1389 "WORLD DESTROY", "nisplus.directory.mask.world_destroy",
1390 FT_BOOLEAN, 32, TFS(&tfs_world_destroy),
1391 NIS_MASK_WORLD_DESTROY, "World Destroy Flag", HFILL }},
1393 { &hf_nisplus_mask_group_read, {
1394 "GROUP READ", "nisplus.directory.mask.group_read",
1395 FT_BOOLEAN, 32, TFS(&tfs_group_read),
1396 NIS_MASK_GROUP_READ, "Group Read Flag", HFILL }},
1398 { &hf_nisplus_mask_group_modify, {
1399 "GROUP MODIFY", "nisplus.directory.mask.group_modify",
1400 FT_BOOLEAN, 32, TFS(&tfs_group_modify),
1401 NIS_MASK_GROUP_MODIFY, "Group Modify Flag", HFILL }},
1403 { &hf_nisplus_mask_group_create, {
1404 "GROUP CREATE", "nisplus.directory.mask.group_create",
1405 FT_BOOLEAN, 32, TFS(&tfs_group_create),
1406 NIS_MASK_GROUP_CREATE, "Group Create Flag", HFILL }},
1408 { &hf_nisplus_mask_group_destroy, {
1409 "GROUP DESTROY", "nisplus.directory.mask.group_destroy",
1410 FT_BOOLEAN, 32, TFS(&tfs_group_destroy),
1411 NIS_MASK_GROUP_DESTROY, "Group Destroy Flag", HFILL }},
1413 { &hf_nisplus_mask_owner_read, {
1414 "OWNER READ", "nisplus.directory.mask.owner_read",
1415 FT_BOOLEAN, 32, TFS(&tfs_owner_read),
1416 NIS_MASK_OWNER_READ, "Owner Read Flag", HFILL }},
1418 { &hf_nisplus_mask_owner_modify, {
1419 "OWNER MODIFY", "nisplus.directory.mask.owner_modify",
1420 FT_BOOLEAN, 32, TFS(&tfs_owner_modify),
1421 NIS_MASK_OWNER_MODIFY, "Owner Modify Flag", HFILL }},
1423 { &hf_nisplus_mask_owner_create, {
1424 "OWNER CREATE", "nisplus.directory.mask.owner_create",
1425 FT_BOOLEAN, 32, TFS(&tfs_owner_create),
1426 NIS_MASK_OWNER_CREATE, "Owner Create Flag", HFILL }},
1428 { &hf_nisplus_mask_owner_destroy, {
1429 "OWNER DESTROY", "nisplus.directory.mask.owner_destroy",
1430 FT_BOOLEAN, 32, TFS(&tfs_owner_destroy),
1431 NIS_MASK_OWNER_DESTROY, "Owner Destroy Flag", HFILL }},
1433 { &hf_nisplus_mask_nobody_read, {
1434 "NOBODY READ", "nisplus.directory.mask.nobody_read",
1435 FT_BOOLEAN, 32, TFS(&tfs_nobody_read),
1436 NIS_MASK_NOBODY_READ, "Nobody Read Flag", HFILL }},
1438 { &hf_nisplus_mask_nobody_modify, {
1439 "NOBODY MODIFY", "nisplus.directory.mask.nobody_modify",
1440 FT_BOOLEAN, 32, TFS(&tfs_nobody_modify),
1441 NIS_MASK_NOBODY_MODIFY, "Nobody Modify Flag", HFILL }},
1443 { &hf_nisplus_mask_nobody_create, {
1444 "NOBODY CREATE", "nisplus.directory.mask.nobody_create",
1445 FT_BOOLEAN, 32, TFS(&tfs_nobody_create),
1446 NIS_MASK_NOBODY_CREATE, "Nobody Create Flag", HFILL }},
1448 { &hf_nisplus_mask_nobody_destroy, {
1449 "NOBODY DESTROY", "nisplus.directory.mask.nobody_destroy",
1450 FT_BOOLEAN, 32, TFS(&tfs_nobody_destroy),
1451 NIS_MASK_NOBODY_DESTROY, "Nobody Destroy Flag", HFILL }},
1453 { &hf_nisplus_access_mask, {
1454 "access mask", "nisplus.access.mask", FT_NONE, BASE_NONE,
1455 NULL, 0, "NIS Access Mask", HFILL }},
1457 { &hf_nisplus_object_type, {
1458 "type", "nisplus.object.type", FT_UINT32, BASE_DEC,
1459 VALS(obj_type), 0, "NIS Type Of Object", HFILL }},
1461 { &hf_nisplus_servers, {
1462 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1463 NULL, 0, "NIS Servers For This Directory", HFILL }},
1465 { &hf_nisplus_cbservers, {
1466 "nis servers", "nisplus.servers", FT_NONE, BASE_NONE,
1467 NULL, 0, "Optional Callback Server", HFILL }},
1469 { &hf_nisplus_server, {
1470 "server", "nisplus.server", FT_NONE, BASE_NONE,
1471 NULL, 0, "NIS Server For This Directory", HFILL }},
1473 { &hf_nisplus_server_name, {
1474 "name", "nisplus.server.name", FT_STRING, BASE_DEC,
1475 NULL, 0, "Name Of NIS Server", HFILL }},
1477 { &hf_nisplus_key_type, {
1478 "type", "nisplus.key.type", FT_UINT32, BASE_DEC,
1479 VALS(key_type), 0, "Type Of Key", HFILL }},
1481 { &hf_nisplus_key_data, {
1482 "key data", "nisplus.key.data", FT_BYTES, BASE_DEC,
1483 NULL, 0, "Encryption Key", HFILL }},
1485 { &hf_nisplus_endpoints, {
1486 "nis endpoints", "nisplus.endpoints", FT_NONE, BASE_NONE,
1487 NULL, 0, "Endpoints For This NIS Server", HFILL }},
1489 { &hf_nisplus_endpoint, {
1490 "endpoint", "nisplus.endpoint", FT_NONE, BASE_NONE,
1491 NULL, 0, "Endpoint For This NIS Server", HFILL }},
1493 { &hf_nisplus_endpoint_uaddr, {
1494 "addr", "nisplus.endpoint.uaddr", FT_STRING, BASE_DEC,
1495 NULL, 0, "Address", HFILL }},
1497 { &hf_nisplus_endpoint_family, {
1498 "family", "nisplus.endpoint.family", FT_STRING, BASE_DEC,
1499 NULL, 0, "Transport Family", HFILL }},
1501 { &hf_nisplus_endpoint_proto, {
1502 "proto", "nisplus.endpoint.proto", FT_STRING, BASE_DEC,
1503 NULL, 0, "Protocol", HFILL }},
1505 { &hf_nisplus_link, {
1506 "link", "nisplus.link", FT_NONE, BASE_NONE,
1507 NULL, 0, "NIS Link Object", HFILL }},
1509 { &hf_nisplus_attrs_array, {
1510 "Attributes", "nisplus.attributes", FT_NONE, BASE_NONE,
1511 NULL, 0, "List Of Attributes", HFILL }},
1513 { &hf_nisplus_attr, {
1514 "Attribute", "nisplus.attr", FT_NONE, BASE_NONE,
1515 NULL, 0, "Attribute", HFILL }},
1517 { &hf_nisplus_attr_name, {
1518 "name", "nisplus.attr.name", FT_STRING, BASE_DEC,
1519 NULL, 0, "Attribute Name", HFILL }},
1521 { &hf_nisplus_attr_val, {
1522 "val", "nisplus.attr.val", FT_BYTES, BASE_HEX,
1523 NULL, 0, "Attribute Value", HFILL }},
1525 { &hf_nisplus_entry, {
1526 "entry", "nisplus.entry", FT_NONE, BASE_NONE,
1527 NULL, 0, "Entry Object", HFILL }},
1529 { &hf_nisplus_entry_type, {
1530 "type", "nisplus.entry.type", FT_STRING, BASE_DEC,
1531 NULL, 0, "Entry Type", HFILL }},
1533 { &hf_nisplus_entry_cols, {
1534 "columns", "nisplus.entry.cols", FT_NONE, BASE_NONE,
1535 NULL, 0, "Entry Columns", HFILL }},
1537 { &hf_nisplus_entry_col, {
1538 "column", "nisplus.entry.col", FT_NONE, BASE_NONE,
1539 NULL, 0, "Entry Column", HFILL }},
1541 { &hf_nisplus_entry_flags, {
1542 "flags", "nisplus.entry.flags", FT_UINT32, BASE_HEX,
1543 NULL, 0, "Entry Col Flags", HFILL }},
1545 { &hf_nisplus_entry_val, {
1546 "val", "nisplus.entry.val", FT_STRING, BASE_DEC,
1547 NULL, 0, "Entry Value", HFILL }},
1549 { &hf_nisplus_entry_mask, {
1550 "flags", "nisplus.entry.flags", FT_NONE, BASE_NONE,
1551 NULL, 0, "Entry Col Flags", HFILL }},
1553 { &hf_nisplus_entry_mask_binary, {
1554 "BINARY", "nisplus.entry.flags.binary",
1555 FT_BOOLEAN, 32, TFS(&tfs_entry_binary),
1556 NIS_MASK_ENTRY_BINARY, "Is This Entry BINARY Flag", HFILL }},
1558 { &hf_nisplus_entry_mask_crypt, {
1559 "ENCRYPTED", "nisplus.entry.flags.encrypted",
1560 FT_BOOLEAN, 32, TFS(&tfs_entry_crypt),
1561 NIS_MASK_ENTRY_CRYPT, "Is This Entry ENCRYPTED Flag", HFILL }},
1563 { &hf_nisplus_entry_mask_xdr, {
1564 "XDR", "nisplus.entry.flags.xdr",
1565 FT_BOOLEAN, 32, TFS(&tfs_entry_xdr),
1566 NIS_MASK_ENTRY_XDR, "Is This Entry XDR Encoded Flag", HFILL }},
1568 { &hf_nisplus_entry_mask_modified, {
1569 "MODIFIED", "nisplus.entry.flags.modified",
1570 FT_BOOLEAN, 32, TFS(&tfs_entry_modified),
1571 NIS_MASK_ENTRY_MODIFIED, "Is This Entry MODIFIED Flag", HFILL }},
1573 { &hf_nisplus_entry_mask_asn, {
1574 "ASN.1", "nisplus.entry.flags.asn",
1575 FT_BOOLEAN, 32, TFS(&tfs_entry_asn),
1576 NIS_MASK_ENTRY_ASN, "Is This Entry ASN.1 Encoded Flag", HFILL }},
1578 { &hf_nisplus_table, {
1579 "table", "nisplus.table", FT_NONE, BASE_NONE,
1580 NULL, 0, "Table Object", HFILL }},
1582 { &hf_nisplus_table_type, {
1583 "type", "nisplus.table.type", FT_STRING, BASE_DEC,
1584 NULL, 0, "Table Type", HFILL }},
1586 { &hf_nisplus_table_maxcol, {
1587 "max columns", "nisplus.table.maxcol", FT_UINT16, BASE_DEC,
1588 NULL, 0, "Maximum Number Of Columns For Table", HFILL }},
1590 { &hf_nisplus_table_sep, {
1591 "separator", "nisplus.table.separator", FT_UINT8, BASE_HEX,
1592 NULL, 0, "Separator Character", HFILL }},
1594 { &hf_nisplus_table_cols, {
1595 "columns", "nisplus.table.cols", FT_NONE, BASE_NONE,
1596 NULL, 0, "Table Columns", HFILL }},
1598 { &hf_nisplus_table_col, {
1599 "column", "nisplus.table.col", FT_NONE, BASE_NONE,
1600 NULL, 0, "Table Column", HFILL }},
1602 { &hf_nisplus_table_path, {
1603 "path", "nisplus.table.path", FT_STRING, BASE_DEC,
1604 NULL, 0, "Table Path", HFILL }},
1606 { &hf_nisplus_table_col_name, {
1607 "column name", "nisplus.table.col.name", FT_STRING, BASE_DEC,
1608 NULL, 0, "Column Name", HFILL }},
1610 { &hf_nisplus_table_col_mask, {
1611 "flags", "nisplus.table.col.flags", FT_NONE, BASE_NONE,
1612 NULL, 0, "Flags For This Column", HFILL }},
1614 { &hf_nisplus_table_col_mask_binary, {
1615 "binary", "nisplus.table.flags.binary",
1616 FT_BOOLEAN, 32, TFS(&tfs_col_binary),
1617 NIS_MASK_TABLE_BINARY, "Is This Column BINARY", HFILL }},
1619 { &hf_nisplus_table_col_mask_encrypted, {
1620 "encrypted", "nisplus.table.flags.encrypted",
1621 FT_BOOLEAN, 32, TFS(&tfs_col_encrypted),
1622 NIS_MASK_TABLE_CRYPT, "Is This Column ENCRYPTED", HFILL }},
1624 { &hf_nisplus_table_col_mask_xdr, {
1625 "xdr", "nisplus.table.flags.xdr",
1626 FT_BOOLEAN, 32, TFS(&tfs_col_xdr),
1627 NIS_MASK_TABLE_XDR, "Is This Column XDR Encoded", HFILL }},
1629 { &hf_nisplus_table_col_mask_searchable, {
1630 "searchable", "nisplus.table.flags.searchable",
1631 FT_BOOLEAN, 32, TFS(&tfs_col_searchable),
1632 NIS_MASK_TABLE_SRCH, "Is This Column SEARCHABLE", HFILL }},
1634 { &hf_nisplus_table_col_mask_casesensitive, {
1635 "casesensitive", "nisplus.table.flags.casesensitive",
1636 FT_BOOLEAN, 32, TFS(&tfs_col_casesensitive),
1637 NIS_MASK_TABLE_CASE, "Is This Column CASESENSITIVE", HFILL }},
1639 { &hf_nisplus_table_col_mask_modified, {
1640 "modified", "nisplus.table.flags.modified",
1641 FT_BOOLEAN, 32, TFS(&tfs_col_modified),
1642 NIS_MASK_TABLE_MODIFIED, "Is This Column MODIFIED", HFILL }},
1644 { &hf_nisplus_table_col_mask_asn, {
1645 "asn", "nisplus.table.flags.asn",
1646 FT_BOOLEAN, 32, TFS(&tfs_col_asn),
1647 NIS_MASK_TABLE_ASN, "Is This Column ASN.1 Encoded", HFILL }},
1649 { &hf_nisplus_group, {
1650 "Group", "nisplus.group", FT_NONE, BASE_NONE,
1651 NULL, 0, "Group Object", HFILL }},
1653 { &hf_nisplus_grps, {
1654 "Groups", "nisplus.grps", FT_NONE, BASE_NONE,
1655 NULL, 0, "List Of Groups", HFILL }},
1657 { &hf_nisplus_group_flags, {
1658 "flags", "nisplus.group.flags", FT_UINT32, BASE_HEX,
1659 NULL, 0, "Group Object Flags", HFILL }},
1661 { &hf_nisplus_group_name, {
1662 "group name", "nisplus.group.name", FT_STRING, BASE_DEC,
1663 NULL, 0, "Name Of Group Member", HFILL }},
1665 { &hf_nisplus_object_ctime, {
1666 "ctime", "nisplus.ctime", FT_ABSOLUTE_TIME, BASE_NONE,
1667 NULL, 0, "Time Of Creation", HFILL }},
1669 { &hf_nisplus_object_mtime, {
1670 "mtime", "nisplus.mtime", FT_ABSOLUTE_TIME, BASE_NONE,
1671 NULL, 0, "Time Last Modified", HFILL }},
1673 { &hf_nisplus_ib_flags, {
1674 "flags", "nisplus.ib.flags", FT_UINT32, BASE_HEX,
1675 NULL, 0, "Information Base Flags", HFILL }},
1677 { &hf_nisplus_ib_bufsize, {
1678 "bufsize", "nisplus.ib.bufsize", FT_UINT32, BASE_HEX,
1679 NULL, 0, "Optional First/NextBufSize", HFILL }},
1681 { &hf_nisplus_cookie, {
1682 "cookie", "nisplus.cookie", FT_BYTES, BASE_HEX,
1683 NULL, 0, "Cookie", HFILL }},
1685 { &hf_nisplus_fd_dirname, {
1686 "dirname", "nisplus.fd.dirname", FT_STRING, BASE_DEC,
1687 NULL, 0, "Directory Name", HFILL }},
1689 { &hf_nisplus_fd_requester, {
1690 "requester", "nisplus.fd.requester", FT_STRING, BASE_DEC,
1691 NULL, 0, "Host Principal Name For Signature", HFILL }},
1693 { &hf_nisplus_taglist, {
1694 "taglist", "nisplus.taglist", FT_NONE, BASE_NONE,
1695 NULL, 0, "List Of Tags", HFILL }},
1697 { &hf_nisplus_tag, {
1698 "tag", "nisplus.tag", FT_NONE, BASE_NONE,
1699 NULL, 0, "Tag", HFILL }},
1701 { &hf_nisplus_tag_type, {
1702 "type", "nisplus.tag.type", FT_UINT32, BASE_DEC,
1703 NULL, 0, "Type Of Statistics Tag", HFILL }},
1705 { &hf_nisplus_tag_val, {
1706 "value", "nisplus.tag.value", FT_STRING, BASE_DEC,
1707 NULL, 0, "Value Of Statistics Tag", HFILL }},
1709 { &hf_nisplus_dump_dir, {
1710 "directory", "nisplus.dump.dir", FT_STRING, BASE_DEC,
1711 NULL, 0, "Directory To Dump", HFILL }},
1713 { &hf_nisplus_dump_time, {
1714 "time", "nisplus.dump.time", FT_ABSOLUTE_TIME, BASE_NONE,
1715 NULL, 0, "From This Timestamp", HFILL }},
1717 { &hf_nisplus_dummy, {
1718 " ", ".nisplus.dummy", FT_BYTES, BASE_NONE,
1719 NULL, 0, " ", HFILL }},
1721 { &hf_nisplus_ping_time, {
1722 "time", "nisplus.ping.time", FT_ABSOLUTE_TIME, BASE_NONE,
1723 NULL, 0, "Timestamp Of The Transaction", HFILL }},
1725 { &hf_nisplus_ping_dir, {
1726 "directory", "nisplus.ping.dir", FT_STRING, BASE_DEC,
1727 NULL, 0, "Directory That Had The Change", HFILL }},
1729 { &hf_nisplus_error, {
1730 "status", "nisplus.status", FT_UINT32, BASE_DEC,
1731 VALS(nis_error), 0, "NIS Status Code", HFILL }},
1733 { &hf_nisplus_dir_data, {
1734 "data", "nisplus.fd.dir.data", FT_BYTES, BASE_HEX,
1735 NULL, 0, "Directory Data In XDR Format", HFILL }},
1737 { &hf_nisplus_signature, {
1738 "signature", "nisplus.fd.sig", FT_BYTES, BASE_HEX,
1739 NULL, 0, "Signature Of The Source", HFILL }},
1741 { &hf_nisplus_log_entries, {
1742 "log entries", "nisplus.log.entries", FT_NONE, BASE_NONE,
1743 NULL, 0, "Log Entries", HFILL }},
1745 { &hf_nisplus_log_entry, {
1746 "log entry", "nisplus.log.entry", FT_NONE, BASE_NONE,
1747 NULL, 0, "Log Entry", HFILL }},
1749 { &hf_nisplus_log_time, {
1750 "time", "nisplus.log.time", FT_ABSOLUTE_TIME, BASE_NONE,
1751 NULL, 0, "Time Of Log Entry", HFILL }},
1753 { &hf_nisplus_log_type, {
1754 "type", "nisplus.log.entry.type", FT_UINT32, BASE_DEC,
1755 VALS(entry_type), 0, "Type Of Entry In Transaction Log", HFILL }},
1757 { &hf_nisplus_log_principal, {
1758 "principal", "nisplus.log.principal", FT_STRING, BASE_DEC,
1759 NULL, 0, "Principal Making The Change", HFILL }},
1761 { &hf_nisplus_callback_status, {
1762 "status", "nisplus.callback.status",
1763 FT_BOOLEAN, 0, TFS(&tfs_callback_status),
1764 0, "Status Of Callback Thread", HFILL }},
1766 { &hf_nisplus_cp_status, {
1767 "status", "nisplus.checkpoint.status", FT_UINT32, BASE_DEC,
1768 NULL, 0, "Checkpoint Status", HFILL }},
1770 { &hf_nisplus_cp_zticks, {
1771 "zticks", "nisplus.checkpoint.zticks", FT_UINT32, BASE_DEC,
1772 NULL, 0, "Service Ticks", HFILL }},
1774 { &hf_nisplus_cp_dticks, {
1775 "dticks", "nisplus.checkpoint.dticks", FT_UINT32, BASE_DEC,
1776 NULL, 0, "Database Ticks", HFILL }},
1778 { &hf_nisplus_zticks, {
1779 "zticks", "nisplus.zticks", FT_UINT32, BASE_DEC,
1780 NULL, 0, "", HFILL }},
1782 { &hf_nisplus_dticks, {
1783 "dticks", "nisplus.dticks", FT_UINT32, BASE_DEC,
1784 NULL, 0, "", HFILL }},
1786 { &hf_nisplus_aticks, {
1787 "aticks", "nisplus.aticks", FT_UINT32, BASE_DEC,
1788 NULL, 0, "", HFILL }},
1790 { &hf_nisplus_cticks, {
1791 "cticks", "nisplus.cticks", FT_UINT32, BASE_DEC,
1792 NULL, 0, "", HFILL }},
1796 static gint *ett[] = {
1798 &ett_nisplus_object,
1800 &ett_nisplus_directory,
1801 &ett_nisplus_directory_mask,
1802 &ett_nisplus_access_mask,
1803 &ett_nisplus_server,
1804 &ett_nisplus_endpoint,
1808 &ett_nisplus_entry_col,
1809 &ett_nisplus_entry_mask,
1811 &ett_nisplus_table_col,
1812 &ett_nisplus_table_col_mask,
1816 &ett_nisplus_log_entry,
1819 proto_nisplus = proto_register_protocol("NIS+",
1821 proto_register_field_array(proto_nisplus, hf, array_length(hf));
1822 proto_register_subtree_array(ett, array_length(ett));
1826 proto_reg_handoff_nis(void)
1828 /* Register the protocol as RPC */
1829 rpc_init_prog(proto_nisplus, NIS_PROGRAM, ett_nisplus);
1830 /* Register the procedure tables */
1831 rpc_init_proc_table(NIS_PROGRAM, 3, nisplus3_proc);
1839 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1840 callback protocol for NIS
1841 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
1843 static int proto_nispluscb = -1;
1844 static int hf_nispluscb_entries = -1;
1845 static int hf_nispluscb_entry = -1;
1847 static gint ett_nispluscb = -1;
1848 static gint ett_nispluscb_entry = -1;
1851 dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1853 proto_item* lock_item = NULL;
1854 proto_tree* lock_tree = NULL;
1855 int old_offset = offset;
1857 lock_item = proto_tree_add_item(tree, hf_nispluscb_entry,
1858 tvb, offset, 0, FALSE);
1860 lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry);
1862 /*XXXXX Not implemented yet*/
1864 proto_item_set_len(lock_item, offset-old_offset);
1869 dissect_cback_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1871 offset = dissect_rpc_array(tvb, pinfo, tree, offset,
1872 dissect_cb_entry, hf_nispluscb_entries);
1877 /* proc number, "proc name", dissect_request, dissect_reply */
1878 /* NULL as function pointer means: type of arguments is "void". */
1879 static const vsff cb1_proc[] = {
1880 { CBPROC_NULL, "NULL",
1882 { CBPROC_RECEIVE, "NULL",
1883 dissect_cback_data, dissect_callback_result },
1884 { CBPROC_FINISH, "NULL",
1886 { CBPROC_ERROR, "NULL",
1887 dissect_nisplus_error, NULL },
1888 { 0, NULL, NULL, NULL },
1892 proto_register_niscb(void)
1894 static hf_register_info hf[] = {
1895 { &hf_nispluscb_entries, {
1896 "entries", "nispluscb.entries", FT_NONE, BASE_NONE,
1897 NULL, 0, "NIS Callback Entries", HFILL }},
1899 { &hf_nispluscb_entry, {
1900 "entry", "nispluscb.entry", FT_NONE, BASE_NONE,
1901 NULL, 0, "NIS Callback Entry", HFILL }},
1905 static gint *ett[] = {
1907 &ett_nispluscb_entry,
1910 proto_nispluscb = proto_register_protocol("NIS+ Callback",
1911 "NIS+ CB", "nispluscb");
1912 proto_register_field_array(proto_nispluscb, hf, array_length(hf));
1913 proto_register_subtree_array(ett, array_length(ett));
1917 proto_reg_handoff_niscb(void)
1919 /* Register the protocol as RPC */
1920 rpc_init_prog(proto_nispluscb, CB_PROGRAM, ett_nispluscb);
1921 /* Register the procedure tables */
1922 rpc_init_proc_table(CB_PROGRAM, 1, cb1_proc);