Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-qnet6.c
blob2e96e139bbc35059392e4c8db139a03af1cf40de
1 /* packet-qnet6.c Routines for qnet6 LwL4 dissection Copyright 2009,
2 * dragonlinux <dragonlinux@gmail.com>
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #include "config.h"
13 #include <epan/packet.h>
14 #include <epan/prefs.h>
15 #include <epan/to_str.h>
17 #include <epan/etypes.h>
18 #include <epan/crc32-tvb.h>
19 #include <epan/tfs.h>
20 #include <wsutil/array.h>
21 #include <wsutil/crc32.h>
22 #include <epan/ipproto.h>
24 void proto_reg_handoff_qnet6(void);
25 void proto_register_qnet6(void);
27 static dissector_handle_t qnet6_handle;
29 static int proto_qnet6_l4;
30 static int proto_qnet6_qos;
31 static int proto_qnet6_lr;
32 static int proto_qnet6_kif;
33 static int proto_qnet6_nr;
35 static int hf_qnet6_l4_padding;
36 static int hf_qnet6_l4_ver;
37 static int hf_qnet6_l4_type;
38 static int hf_qnet6_l4_flags;
39 static int hf_qnet6_l4_flags_first;
40 static int hf_qnet6_l4_flags_last;
41 static int hf_qnet6_l4_flags_crc;
42 static int hf_qnet6_l4_qos_info;
43 static int hf_qnet6_l4_qos_src_nd_for_dst;
44 static int hf_qnet6_l4_qos_dst_nd_for_src;
45 static int hf_qnet6_l4_qos_src_conn_id;
46 static int hf_qnet6_l4_qos_dst_conn_id;
47 static int hf_qnet6_l4_qos_src_seq_num;
48 static int hf_qnet6_l4_qos_qos_type;
49 static int hf_qnet6_l4_qos_src_qos_idx;
50 static int hf_qnet6_l4_layer;
51 static int hf_qnet6_l4_offset;
52 static int hf_qnet6_l4_length;
53 static int hf_qnet6_l4_crc;
55 static int hf_qnet6_qos_tcs_src_name_off;
56 static int hf_qnet6_qos_tcs_src_name_generated;
57 static int hf_qnet6_qos_tcs_src_domain_off;
58 static int hf_qnet6_qos_tcs_src_domain_generated;
59 static int hf_qnet6_qos_tcs_dst_name_off;
60 static int hf_qnet6_qos_tcs_dst_name_generated;
61 static int hf_qnet6_qos_tcs_dst_domain_off;
62 static int hf_qnet6_qos_tcs_dst_domain_generated;
64 static int hf_qnet6_lr_ver;
65 static int hf_qnet6_lr_type;
66 static int hf_qnet6_lr_total_len;
67 static int hf_qnet6_lr_src;
68 static int hf_qnet6_lr_src_name_off;
69 static int hf_qnet6_lr_src_name_len;
70 static int hf_qnet6_lr_src_name_generated;
71 static int hf_qnet6_lr_src_domain_off;
72 static int hf_qnet6_lr_src_domain_len;
73 static int hf_qnet6_lr_src_domain_generated;
74 static int hf_qnet6_lr_src_addr_off;
75 static int hf_qnet6_lr_src_addr_len;
76 static int hf_qnet6_lr_src_addr_generated;
77 static int hf_qnet6_lr_dst;
78 static int hf_qnet6_lr_dst_name_off;
79 static int hf_qnet6_lr_dst_name_len;
80 static int hf_qnet6_lr_dst_name_generated;
81 static int hf_qnet6_lr_dst_domain_off;
82 static int hf_qnet6_lr_dst_domain_len;
83 static int hf_qnet6_lr_dst_domain_generated;
84 static int hf_qnet6_lr_dst_addr_off;
85 static int hf_qnet6_lr_dst_addr_len;
86 static int hf_qnet6_lr_dst_addr_generated;
88 static int hf_qnet6_kif_msgtype;
89 static int hf_qnet6_kif_size;
91 static int hf_qnet6_kif_version;
92 static int hf_qnet6_kif_client_info;
93 static int hf_qnet6_kif_zero;
96 * client_info
98 static int hf_qnet6_kif_client_info_nd;
99 static int hf_qnet6_kif_client_info_pid;
100 static int hf_qnet6_kif_client_info_sid;
101 static int hf_qnet6_kif_client_info_flags;
102 static int hf_qnet6_kif_client_info_cred;
103 static int hf_qnet6_kif_client_info_cred_ruid;
104 static int hf_qnet6_kif_client_info_cred_euid;
105 static int hf_qnet6_kif_client_info_cred_suid;
106 static int hf_qnet6_kif_client_info_cred_rgid;
107 static int hf_qnet6_kif_client_info_cred_egid;
108 static int hf_qnet6_kif_client_info_cred_sgid;
109 static int hf_qnet6_kif_client_info_cred_ngroups;
110 static int hf_qnet6_kif_client_info_cred_grouplist;
113 * connect message
115 static int hf_qnet6_kif_connect;
116 static int hf_qnet6_kif_connect_server_pid;
117 static int hf_qnet6_kif_connect_server_chid;
118 static int hf_qnet6_kif_connect_client_id;
119 static int hf_qnet6_kif_connect_client_pid;
121 * connect success message
123 static int hf_qnet6_kif_connects_client_id;
124 static int hf_qnet6_kif_connects_server_id;
125 static int hf_qnet6_kif_connects_scoid;
126 static int hf_qnet6_kif_connects_nbytes;
128 * connect fail message
130 static int hf_qnet6_kif_connectf_client_id;
131 static int hf_qnet6_kif_connectf_status;
133 * connect death message
135 static int hf_qnet6_kif_connectd_client_id;
137 * msgsend message
139 static int hf_qnet6_kif_msgsend;
140 static int hf_qnet6_kif_msgsend_server_id;
141 static int hf_qnet6_kif_msgsend_client_handle;
142 static int hf_qnet6_kif_msgsend_vinfo;
143 static int hf_qnet6_kif_msgsend_nbytes;
145 * msgread message
147 static int hf_qnet6_kif_msgread_msgread_handle;
148 static int hf_qnet6_kif_msgread_client_handle;
149 static int hf_qnet6_kif_msgread_offset;
150 static int hf_qnet6_kif_msgread_nbytes;
152 * msgwrite message
154 static int hf_qnet6_kif_msgwrite_status;
155 static int hf_qnet6_kif_msgwrite_handle;
156 static int hf_qnet6_kif_msgwrite_offset;
157 static int hf_qnet6_kif_msgwrite_nbytes;
158 static int hf_qnet6_kif_msgwrite_data;
160 * unblock message
162 static int hf_qnet6_kif_unblock_server_id;
163 static int hf_qnet6_kif_unblock_client_handle;
164 static int hf_qnet6_kif_unblock_tid;
166 * event message
168 static int hf_qnet6_kif_event_client_handle;
169 static int hf_qnet6_kif_event_event;
170 static int hf_qnet6_kif_event_notify;
171 static int hf_qnet6_kif_event_union1;
172 static int hf_qnet6_kif_event_value;
173 static int hf_qnet6_kif_event_union2;
176 * pulse message
178 #if 0
179 static int hf_qnet6_kif_pulse_server_id;
180 static int hf_qnet6_kif_pulse_client_handle;
181 static int hf_qnet6_kif_pulse_vinfo;
182 #endif
183 static int hf_qnet6_kif_pulse_pulse;
184 static int hf_qnet6_kif_pulse_priority;
186 * signal message
188 static int hf_qnet6_kif_signal_client_handle;
189 static int hf_qnet6_kif_signal_pid;
190 static int hf_qnet6_kif_signal_tid;
191 static int hf_qnet6_kif_signal_signo;
192 static int hf_qnet6_kif_signal_code;
193 static int hf_qnet6_kif_signal_value;
195 * disconnect message
197 static int hf_qnet6_kif_disconnect_server_id;
200 * vinfo
202 static int hf_qnet6_kif_vtid_info_tid;
203 static int hf_qnet6_kif_vtid_info_coid;
204 static int hf_qnet6_kif_vtid_info_priority;
205 static int hf_qnet6_kif_vtid_info_srcmsglen;
206 static int hf_qnet6_kif_vtid_info_keydata;
207 static int hf_qnet6_kif_vtid_info_srcnd;
208 static int hf_qnet6_kif_vtid_info_dstmsglen;
209 static int hf_qnet6_kif_vtid_info_zero;
211 * pulse
213 static int hf_qnet6_kif_pulse_pulse_type;
214 static int hf_qnet6_kif_pulse_pulse_subtype;
215 static int hf_qnet6_kif_pulse_pulse_code;
216 static int hf_qnet6_kif_pulse_pulse_reserved;
217 static int hf_qnet6_kif_pulse_pulse_value;
218 static int hf_qnet6_kif_pulse_pulse_scoid;
220 * message
222 static int hf_qnet6_kif_msg;
223 static int hf_qnet6_kif_msg_type;
224 static int hf_qnet6_kif_msg_connect_subtype;
225 static int hf_qnet6_kif_msg_connect_filetype;
226 static int hf_qnet6_kif_msg_connect_replymax;
227 static int hf_qnet6_kif_msg_connect_entrymax;
228 static int hf_qnet6_kif_msg_connect_key;
229 static int hf_qnet6_kif_msg_connect_handle;
231 static int hf_qnet6_kif_msg_connect_ioflag;
233 static int hf_qnet6_kif_msg_connect_ioflag_access;
234 static int hf_qnet6_kif_msg_connect_ioflag_append;
235 static int hf_qnet6_kif_msg_connect_ioflag_dsync;
236 static int hf_qnet6_kif_msg_connect_ioflag_sync;
237 static int hf_qnet6_kif_msg_connect_ioflag_rsync;
238 static int hf_qnet6_kif_msg_connect_ioflag_nonblock;
239 static int hf_qnet6_kif_msg_connect_ioflag_creat;
240 static int hf_qnet6_kif_msg_connect_ioflag_truncate;
241 static int hf_qnet6_kif_msg_connect_ioflag_exclusive;
242 static int hf_qnet6_kif_msg_connect_ioflag_noctrltty;
243 static int hf_qnet6_kif_msg_connect_ioflag_closexec;
244 static int hf_qnet6_kif_msg_connect_ioflag_realids;
245 static int hf_qnet6_kif_msg_connect_ioflag_largefile;
246 static int hf_qnet6_kif_msg_connect_ioflag_async;
248 static int hf_qnet6_kif_msg_connect_mode;
249 static int hf_qnet6_kif_msg_connect_mode_other_exe;
250 static int hf_qnet6_kif_msg_connect_mode_other_read;
251 static int hf_qnet6_kif_msg_connect_mode_other_write;
252 static int hf_qnet6_kif_msg_connect_mode_group_read;
253 static int hf_qnet6_kif_msg_connect_mode_group_write;
254 static int hf_qnet6_kif_msg_connect_mode_group_exe;
255 static int hf_qnet6_kif_msg_connect_mode_owner_read;
256 static int hf_qnet6_kif_msg_connect_mode_owner_write;
257 static int hf_qnet6_kif_msg_connect_mode_owner_exe;
258 static int hf_qnet6_kif_msg_connect_mode_setuid;
259 static int hf_qnet6_kif_msg_connect_mode_setgid;
260 static int hf_qnet6_kif_msg_connect_mode_sticky;
261 static int hf_qnet6_kif_msg_connect_mode_format;
263 static int hf_qnet6_kif_msg_connect_sflag;
264 static int hf_qnet6_kif_msg_connect_access;
265 static int hf_qnet6_kif_msg_connect_zero;
266 static int hf_qnet6_kif_msg_connect_pathlen;
267 static int hf_qnet6_kif_msg_connect_eflag;
268 static int hf_qnet6_kif_msg_connect_eflag_dir;
269 static int hf_qnet6_kif_msg_connect_eflag_dot;
270 static int hf_qnet6_kif_msg_connect_eflag_dotdot;
271 static int hf_qnet6_kif_msg_connect_extratype;
272 static int hf_qnet6_kif_msg_connect_extralen;
273 static int hf_qnet6_kif_msg_connect_path;
274 static int hf_qnet6_kif_msg_connect_pad_data;
275 static int hf_qnet6_kif_msg_connect_extra_symlink_path;
276 static int hf_qnet6_kif_msg_connect_extra_rename_path;
277 static int hf_qnet6_kif_msg_connect_extra_mount;
278 static int hf_qnet6_kif_msg_connect_extra_data;
279 static int hf_qnet6_kif_msg_connect_extra_link_ocb;
281 * devctl
283 static int hf_qnet6_kif_msg_io_combine_len;
284 static int hf_qnet6_kif_msg_devctl_dcmd;
285 static int hf_qnet6_kif_msg_devctl_dcmd_cmd;
286 static int hf_qnet6_kif_msg_devctl_dcmd_ccmd;
287 static int hf_qnet6_kif_msg_devctl_dcmd_size;
288 static int hf_qnet6_kif_msg_devctl_dcmd_class;
289 static int hf_qnet6_kif_msg_devctl_dcmd_from;
290 static int hf_qnet6_kif_msg_devctl_dcmd_to;
292 static int hf_qnet6_kif_msg_devctl_nbytes;
293 static int hf_qnet6_kif_msg_devctl_zero;
295 * stat
298 * read
300 static int hf_qnet6_kif_msg_io_read_nbytes;
301 static int hf_qnet6_kif_msg_io_read_xtypes;
302 static int hf_qnet6_kif_msg_io_read_xtypes_0_7;
303 static int hf_qnet6_kif_msg_io_read_xtypes_8;
304 static int hf_qnet6_kif_msg_io_read_xtypes_14;
305 static int hf_qnet6_kif_msg_io_read_xtypes_15;
306 static int hf_qnet6_kif_msg_io_read_xoffset;
307 static int hf_qnet6_kif_msg_io_read_cond_min;
308 static int hf_qnet6_kif_msg_io_read_cond_time;
309 static int hf_qnet6_kif_msg_io_read_cond_timeout;
311 * write
313 static int hf_qnet6_kif_msg_io_write_data;
314 static int hf_qnet6_kif_msg_io_write_nbytes;
315 static int hf_qnet6_kif_msg_io_write_xtypes;
316 static int hf_qnet6_kif_msg_io_write_xtypes_0_7;
317 static int hf_qnet6_kif_msg_io_write_xtypes_8;
318 static int hf_qnet6_kif_msg_io_write_xtypes_14;
319 static int hf_qnet6_kif_msg_io_write_xtypes_15;
320 static int hf_qnet6_kif_msg_io_write_xoffset;
323 * seek
325 static int hf_qnet6_kif_msg_seek_whence;
326 static int hf_qnet6_kif_msg_seek_offset;
328 * pathconf
330 static int hf_qnet6_kif_msg_pathconf_name;
332 * chmod
334 static int hf_qnet6_kif_msg_io_chmod;
335 static int hf_qnet6_kif_msg_io_chmod_other_exe;
336 static int hf_qnet6_kif_msg_io_chmod_other_read;
337 static int hf_qnet6_kif_msg_io_chmod_other_write;
338 static int hf_qnet6_kif_msg_io_chmod_group_read;
339 static int hf_qnet6_kif_msg_io_chmod_group_write;
340 static int hf_qnet6_kif_msg_io_chmod_group_exe;
341 static int hf_qnet6_kif_msg_io_chmod_owner_read;
342 static int hf_qnet6_kif_msg_io_chmod_owner_write;
343 static int hf_qnet6_kif_msg_io_chmod_owner_exe;
344 static int hf_qnet6_kif_msg_io_chmod_setuid;
345 static int hf_qnet6_kif_msg_io_chmod_setgid;
346 static int hf_qnet6_kif_msg_io_chmod_sticky;
348 * chown
350 static int hf_qnet6_kif_msg_io_chown_gid;
351 static int hf_qnet6_kif_msg_io_chown_uid;
353 * sync
355 static int hf_qnet6_kif_msg_io_sync;
356 static int hf_qnet6_kif_msg_syncflag_dsync;
357 static int hf_qnet6_kif_msg_syncflag_sync;
358 static int hf_qnet6_kif_msg_syncflag_rsync;
360 * utime
362 static int hf_qnet6_kif_msg_io_utime_curflag;
363 static int hf_qnet6_kif_msg_io_utime_actime;
364 static int hf_qnet6_kif_msg_io_utime_modtime;
366 * fdinfo
368 static int hf_qnet6_kif_msg_io_fdinfo_flags;
369 static int hf_qnet6_kif_msg_io_fdinfo_path_len;
370 static int hf_qnet6_kif_msg_io_fdinfo_reserved;
372 * lock
374 static int hf_qnet6_kif_msg_io_lock_subtype;
375 static int hf_qnet6_kif_msg_io_lock_nbytes;
377 * space
379 static int hf_qnet6_kif_msg_io_space_subtype;
380 static int hf_qnet6_kif_msg_io_space_whence;
381 static int hf_qnet6_kif_msg_io_space_start;
382 static int hf_qnet6_kif_msg_io_space_len;
384 static int hf_qnet6_kif_msgsend_extra;
386 * msginfo
388 static int hf_qnet6_kif_msg_msginfo_nd;
389 static int hf_qnet6_kif_msg_msginfo_srcnd;
390 static int hf_qnet6_kif_msg_msginfo_pid;
391 static int hf_qnet6_kif_msg_msginfo_tid;
392 static int hf_qnet6_kif_msg_msginfo_chid;
393 static int hf_qnet6_kif_msg_msginfo_scoid;
394 static int hf_qnet6_kif_msg_msginfo_coid;
395 static int hf_qnet6_kif_msg_msginfo_msglen;
396 static int hf_qnet6_kif_msg_msginfo_srcmsglen;
397 static int hf_qnet6_kif_msg_msginfo_dstmsglen;
398 static int hf_qnet6_kif_msg_msginfo_priority;
399 static int hf_qnet6_kif_msg_msginfo_flags;
400 static int hf_qnet6_kif_msg_msginfo_reserved;
402 * openfd
404 static int hf_qnet6_kif_msg_openfd_reserved;
405 static int hf_qnet6_kif_msg_openfd_key;
406 static int hf_qnet6_kif_msg_openfd_ioflag;
408 static int hf_qnet6_kif_msg_openfd_ioflag_access;
409 static int hf_qnet6_kif_msg_openfd_ioflag_append;
410 static int hf_qnet6_kif_msg_openfd_ioflag_dsync;
411 static int hf_qnet6_kif_msg_openfd_ioflag_sync;
412 static int hf_qnet6_kif_msg_openfd_ioflag_rsync;
413 static int hf_qnet6_kif_msg_openfd_ioflag_nonblock;
414 static int hf_qnet6_kif_msg_openfd_ioflag_creat;
415 static int hf_qnet6_kif_msg_openfd_ioflag_truncate;
416 static int hf_qnet6_kif_msg_openfd_ioflag_exclusive;
417 static int hf_qnet6_kif_msg_openfd_ioflag_noctrltty;
418 static int hf_qnet6_kif_msg_openfd_ioflag_closexec;
419 static int hf_qnet6_kif_msg_openfd_ioflag_realids;
420 static int hf_qnet6_kif_msg_openfd_ioflag_largefile;
421 static int hf_qnet6_kif_msg_openfd_ioflag_async;
422 static int hf_qnet6_kif_msg_openfd_xtype;
423 static int hf_qnet6_kif_msg_openfd_sflag;
425 * dup
427 static int hf_qnet6_kif_msg_io_dup_reserved;
428 static int hf_qnet6_kif_msg_io_dup_key;
430 * msg
432 static int hf_qnet6_kif_msg_io_msg_mgrid;
433 static int hf_qnet6_kif_msg_io_msg_subtype;
435 * mmap
437 static int hf_qnet6_kif_msg_io_mmap_prot;
438 static int hf_qnet6_kif_msg_io_mmap_prot_read;
439 static int hf_qnet6_kif_msg_io_mmap_prot_write;
440 static int hf_qnet6_kif_msg_io_mmap_prot_exec;
441 static int hf_qnet6_kif_msg_io_mmap_offset;
443 * notify
445 static int hf_qnet6_kif_msg_io_notify_action;
446 static int hf_qnet6_kif_msg_io_notify_flags;
447 static int hf_qnet6_kif_msg_io_notify_flags_31;
448 static int hf_qnet6_kif_msg_io_notify_flags_30;
449 static int hf_qnet6_kif_msg_io_notify_flags_29;
450 static int hf_qnet6_kif_msg_io_notify_flags_28;
451 static int hf_qnet6_kif_msg_io_notify_mgr;
452 static int hf_qnet6_kif_msg_io_notify_flags_extra_mask;
453 static int hf_qnet6_kif_msg_io_notify_flags_exten;
454 static int hf_qnet6_kif_msg_io_notify_nfds;
455 static int hf_qnet6_kif_msg_io_notify_fd_first;
456 static int hf_qnet6_kif_msg_io_notify_nfds_ready;
457 static int hf_qnet6_kif_msg_io_notify_timo;
458 static int hf_qnet6_kif_msg_io_notify_fds;
460 * NR
463 * sys/lsm/qnet/nr_msg.h
465 static int hf_qnet6_nr_type;
466 static int hf_qnet6_nr_remote_req_len;
467 static int hf_qnet6_nr_remote_req_id;
468 static int hf_qnet6_nr_remote_req_name;
469 static int hf_qnet6_nr_remote_rep_spare;
470 static int hf_qnet6_nr_remote_rep_id; /* remote_answer id */
471 static int hf_qnet6_nr_remote_rep_nd; /* remote_answer nd */
472 static int hf_qnet6_nr_remote_rep_status; /* remote_error * status */
475 * Initialize the subtree pointers
477 static int ett_qnet6_l4;
478 static int ett_qnet6_qos;
479 static int ett_qnet6_flags;
480 static int ett_qnet6_qos_info;
482 static int ett_qnet6_lr;
483 static int ett_qnet6_lr_src;
484 static int ett_qnet6_lr_src_name_subtree;
485 static int ett_qnet6_lr_src_domain_subtree;
486 static int ett_qnet6_lr_src_addr_subtree;
487 static int ett_qnet6_lr_dst_name_subtree;
488 static int ett_qnet6_lr_dst_domain_subtree;
489 static int ett_qnet6_lr_dst_addr_subtree;
490 static int ett_qnet6_lr_dst;
492 static int ett_qnet6_kif;
493 static int ett_qnet6_kif_vinfo;
494 static int ett_qnet6_kif_pulse;
495 static int ett_qnet6_kif_event;
496 static int ett_qnet6_kif_msg;
497 static int ett_qnet6_kif_msg_ioflag;
498 static int ett_qnet6_kif_msg_mode;
499 static int ett_qnet6_kif_msg_eflag;
500 static int ett_qnet6_kif_connect;
501 static int ett_qnet6_kif_chmod_mode;
502 static int ett_qnet6_kif_msgsend;
503 static int ett_qnet6_kif_client_info;
504 static int ett_qnet6_kif_client_info_cred;
505 static int ett_qnet6_kif_client_info_cred_group;
506 static int ett_qnet6_kif_msg_devctl_dcmd;
507 static int ett_qnet6_kif_msg_read_xtypes;
508 static int ett_qnet6_kif_msg_write_xtypes;
509 static int ett_qnet6_kif_msg_sync;
510 static int ett_qnet6_kif_msg_openfd_ioflag;
511 static int ett_qnet6_kif_msg_msginfo;
512 static int ett_qnet6_kif_msg_prot;
513 static int ett_qnet6_kif_msg_notify_flags;
514 static int ett_qnet6_kif_msg_notify_fds;
515 static int ett_qnet6_nr;
518 * struct qnet6_lr_pkt { uint8_t version; uint8_t pad0; uint8_t type; uint8_t
519 * pad1;
521 * uint32_t total_len;
523 * uint32_t src_name_off; uint32_t src_name_len; uint32_t src_domain_off;
524 * uint32_t src_domain_len; uint32_t src_addr_off; uint32_t src_addr_len;
526 * uint32_t dst_name_off; uint32_t dst_name_len; uint32_t dst_domain_off;
527 * uint32_t dst_domain_len; uint32_t dst_addr_off; uint32_t dst_addr_len; };
529 #define QNX_QNET6_LR_PKT_SIZE 56
531 * 56 bytes in header, name, domain, addr data are behind
534 struct qnet6_kif_hdr
536 uint16_t msgtype;
537 uint16_t size;
540 enum _msg_bases_qnx
542 QNX_IO_BASE = 0x100,
543 QNX_IO_MAX = 0x1FF
546 enum _io__Uint16types
548 QNX_IO_CONNECT = QNX_IO_BASE,
549 QNX_IO_READ,
550 QNX_IO_WRITE,
551 QNX_IO_RSVD_CLOSE_OCB, /* Place holder in jump table */
552 QNX_IO_STAT,
553 QNX_IO_NOTIFY,
554 QNX_IO_DEVCTL,
555 QNX_IO_RSVD_UNBLOCK, /* Place holder in jump table */
556 QNX_IO_PATHCONF,
557 QNX_IO_LSEEK,
558 QNX_IO_CHMOD,
559 QNX_IO_CHOWN,
560 QNX_IO_UTIME,
561 QNX_IO_OPENFD,
562 QNX_IO_FDINFO,
563 QNX_IO_LOCK,
564 QNX_IO_SPACE,
565 QNX_IO_SHUTDOWN,
566 QNX_IO_MMAP,
567 QNX_IO_MSG,
568 QNX_IO_RSVD,
569 QNX_IO_DUP,
570 QNX_IO_CLOSE,
571 QNX_IO_RSVD_LOCK_OCB, /* Place holder in jump table */
572 QNX_IO_RSVD_UNLOCK_OCB, /* Place holder in jump table */
573 QNX_IO_SYNC,
574 QNX_IO_POWER
577 * struct _io_connect subtype
579 enum _io_connect_subtypes
581 QNX_IO_CONNECT_COMBINE, /* Combine with IO msg */
582 QNX_IO_CONNECT_COMBINE_CLOSE, /* Combine with IO msg and always close */
583 QNX_IO_CONNECT_OPEN,
584 QNX_IO_CONNECT_UNLINK,
585 QNX_IO_CONNECT_RENAME,
586 QNX_IO_CONNECT_MKNOD,
587 QNX_IO_CONNECT_READLINK,
588 QNX_IO_CONNECT_LINK,
589 QNX_IO_CONNECT_RSVD_UNBLOCK, /* Place holder in jump table */
590 QNX_IO_CONNECT_MOUNT
594 * struct _io_connect extra_type
596 enum _io_connect_extra_type
598 QNX_IO_CONNECT_EXTRA_NONE,
599 QNX_IO_CONNECT_EXTRA_LINK,
600 QNX_IO_CONNECT_EXTRA_SYMLINK,
601 QNX_IO_CONNECT_EXTRA_MQUEUE,
602 QNX_IO_CONNECT_EXTRA_PHOTON,
603 QNX_IO_CONNECT_EXTRA_SOCKET,
604 QNX_IO_CONNECT_EXTRA_SEM,
605 QNX_IO_CONNECT_EXTRA_RESMGR_LINK,
606 QNX_IO_CONNECT_EXTRA_PROC_SYMLINK,
607 QNX_IO_CONNECT_EXTRA_RENAME,
608 QNX_IO_CONNECT_EXTRA_MOUNT,
609 QNX_IO_CONNECT_EXTRA_MOUNT_OCB,
610 QNX_IO_CONNECT_EXTRA_TYMEM
612 #define QNET_LWL4_VER_LITTLE 0x2a /* 42 */
613 #define QNET_LWL4_VER_BIG 0xaa /* 42|0x80, msb is set */
615 static const value_string qnet6_ver_vals[] = {
616 {QNET_LWL4_VER_LITTLE, "LWL4 little endian"},
617 {QNET_LWL4_VER_BIG, "LWL4 big endian"},
618 {0, NULL}
621 #define QNET_L4_TYPE_USER_DATA 0x0
622 #define QNET_L4_TYPE_TCS_INIT 0x1
623 #define QNET_L4_TYPE_TCS_REM_UP 0x2
624 #define QNET_L4_TYPE_TCS_UP 0x3
625 #define QNET_L4_TYPE_TCS_DOWN 0x4
626 #define QNET_L4_TYPE_TCS_REM_DOWN 0x5
628 #define QNET_L4_TYPE_USER 0x8
629 #define QNET_L4_TYPE_ACK 0x9
630 #define QNET_L4_TYPE_NACK 0xa
631 #define QNET_L4_TYPE_LRES 0xb
632 static const value_string qnet6_type_vals[] = {
633 {QNET_L4_TYPE_USER_DATA, "LWL4 user data packet"},
634 {QNET_L4_TYPE_TCS_INIT, "LWL4 TX establishing connection"},
635 {QNET_L4_TYPE_TCS_REM_UP, "LWL4 RX node UP"},
636 {QNET_L4_TYPE_TCS_UP, "LWL4 TX node UP"},
637 {QNET_L4_TYPE_TCS_DOWN, "LWL4 RX tears connection down"},
638 {QNET_L4_TYPE_TCS_REM_DOWN, "LWL4 RX tears connection down"},
639 {QNET_L4_TYPE_USER, "LWL4 Data packet"},
640 {QNET_L4_TYPE_ACK, "LWL4 Ack packet"},
641 {QNET_L4_TYPE_NACK, "LWL4 Nack packet"},
642 {QNET_L4_TYPE_LRES, "LWL4 Lan Resolver packets"},
643 {0, NULL}
646 #define QNET_L4_FLAGS_FIRST 0x01
647 #define QNET_L4_FLAGS_LAST 0x02
648 #define QNET_L4_FLAGS_CRC 0x04
650 #define QNET_L4_LAYER_KIF 0
651 #define QNET_L4_LAYER_NR 1
652 #define QNET_L4_LAYER_LR 2
653 #define QNET_L4_LAYER_SEQ 3
654 static const value_string qnet6_layer_vals[] = {
655 {QNET_L4_LAYER_KIF, "Kernel Interface"},
656 {QNET_L4_LAYER_NR, "Node Resolver"},
657 {QNET_L4_LAYER_LR, "Lan Resolver"},
658 {QNET_L4_LAYER_SEQ, "Sequence"},
659 {0, NULL}
662 #define QNET_L4_QOS_TYPE_LOADBALANCE 0
663 #define QNET_L4_QOS_TYPE_REDUNDANT 1
664 #define QNET_L4_QOS_TYPE_EXCLUSIVE 2
665 #define QNET_L4_QOS_TYPE_PREFERRED 3
666 static const value_string qnet6_qos_type_vals[] = {
667 {QNET_L4_QOS_TYPE_LOADBALANCE, "Load balance"},
668 {QNET_L4_QOS_TYPE_REDUNDANT, "Redundant"},
669 {QNET_L4_QOS_TYPE_EXCLUSIVE, "Exclusive or Sequential"},
670 {QNET_L4_QOS_TYPE_PREFERRED, "Preferred link"},
671 {0, NULL}
674 static const value_string qnet6_lr_ver_vals[] = {
675 {1, "1"},
676 {0, NULL}
679 #define QNET_LR_TYPE_REQUEST 0x1
680 #define QNET_LR_TYPE_REPLY 0x2
681 static const value_string qnet6_lr_type_vals[] = {
682 {QNET_LR_TYPE_REQUEST, "Request"},
683 {QNET_LR_TYPE_REPLY, "Reply"},
684 {0, NULL}
687 #define QNET_KIF_MSGTYPE_MASK 0x007f
688 #define QNET_KIF_CRED 0x0100
689 #define QNET_KIF_ENDIAN_MASK 0x8080
690 #define QNET_KIF_ENDIAN_LITTLE 0x0000
691 #define QNET_KIF_ENDIAN_BIG 0x8080
693 enum QNET_KIF_MSGTYPE
695 QNET_KIF_MSGTYPE_CONNECT,
696 QNET_KIF_MSGTYPE_CONNECT_MSGSEND,
697 QNET_KIF_MSGTYPE_CONNECT_SUCCESS,
698 QNET_KIF_MSGTYPE_CONNECT_FAIL,
699 QNET_KIF_MSGTYPE_UNBLOCK,
700 QNET_KIF_MSGTYPE_MSGSEND,
701 QNET_KIF_MSGTYPE_MSGREAD,
702 QNET_KIF_MSGTYPE_MSGREAD_XFER,
703 QNET_KIF_MSGTYPE_MSGWRITE,
704 QNET_KIF_MSGTYPE_MSGREPLY,
705 QNET_KIF_MSGTYPE_MSGERROR,
706 QNET_KIF_MSGTYPE_EVENT,
707 QNET_KIF_MSGTYPE_PULSE,
708 QNET_KIF_MSGTYPE_SIGNAL,
709 QNET_KIF_MSGTYPE_DISCONNECT,
710 QNET_KIF_MSGTYPE_CONNECT_DEATH,
711 QNET_KIF_MSGTYPE_MSGREAD_ERROR,
712 QNET_KIF_MSGTYPE_CONNECT_PULSE
716 * from lib/c/public/devctl.h
718 enum QNX_DCMD_DEF
720 QNX_DCMD_ALL = 0x01,
721 QNX_DCMD_FSYS = 0x02,
722 QNX_DCMD_BLK = QNX_DCMD_FSYS,
723 QNX_DCMD_CHR = 0x03,
724 QNX_DCMD_NET = 0x04,
725 QNX_DCMD_MISC = 0x05,
726 QNX_DCMD_IP = 0x06,
727 QNX_DCMD_MIXER = 0x07,
728 QNX_DCMD_PROC = 0x08,
729 QNX_DCMD_MEM = 0x09,
730 QNX_DCMD_INPUT = 0x0A,
731 QNX_DCMD_PHOTON = 0x0B,
732 QNX_DCMD_CAM = 0x0C,
733 QNX_DCMD_USB = 0x0D,
734 QNX_DCMD_MEDIA = 0x0E,
735 QNX_DCMD_CAM_SIM = 0x0F,
736 QNX_DCMD_MEMCLASS = 0x10,
737 QNX_DCMD_PARTITION = 0x11,
738 QNX_DCMD_IOCTL_TTY = 't',
739 QNX_DCMD_CTTY = 'T',
740 QNX_DCMD_FCTL = 'f'
742 enum qnx_mgr_types
744 _IOMGR_FSYS = 0x02,
745 _IOMGR_TCPIP = 0x06,
746 _IOMGR_PHOTON = 0x0B,
747 _IOMGR_CAM = 0x0C,
748 _IOMGR_PCI = 0x0d,
749 _IOMGR_NETMGR = 0x0e,
750 _IOMGR_REGISTRY = 0x10,
751 _IOMGR_PCCARD = 0x11,
752 _IOMGR_USB = 0x12,
753 _IOMGR_MEDIA = 0x13,
754 _IOMGR_PMM = 0x14,
755 _IOMGR_DISPLAY = 0x15,
756 _IOMGR_INPUT = 0x16
758 static const value_string qnet6_kif_mgr_types_vals[] = {
759 {_IOMGR_FSYS, "_IOMGR_FSYS"},
760 {_IOMGR_TCPIP, "_IOMGR_TCPIP"},
761 {_IOMGR_PHOTON, "_IOMGR_PHOTON"},
762 {_IOMGR_CAM, "_IOMGR_CAM"},
763 {_IOMGR_PCI, "_IOMGR_PCI"},
764 {_IOMGR_NETMGR, "_IOMGR_NETMGR "},
765 {_IOMGR_REGISTRY, "_IOMGR_REGISTRY"},
766 {_IOMGR_PCCARD, "_IOMGR_PCCARD"},
767 {_IOMGR_USB, "_IOMGR_USB"},
768 {_IOMGR_MEDIA, "_IOMGR_MEDIA"},
769 {_IOMGR_PMM, "_IOMGR_PMM"},
770 {_IOMGR_DISPLAY, "_IOMGR_DISPLAY"},
771 {_IOMGR_INPUT, "_IOMGR_INPUT"},
772 {0, NULL}
775 static const value_string qnet6_kif_msgtype_vals[] = {
776 {QNET_KIF_MSGTYPE_CONNECT, "Connect"},
777 {QNET_KIF_MSGTYPE_CONNECT_MSGSEND, "Connect MsgSend"},
778 {QNET_KIF_MSGTYPE_CONNECT_SUCCESS, "Connect Success"},
779 {QNET_KIF_MSGTYPE_CONNECT_FAIL, "Connect Fail"},
780 {QNET_KIF_MSGTYPE_UNBLOCK, "Unblock"},
781 {QNET_KIF_MSGTYPE_MSGSEND, "MsgSend"},
782 {QNET_KIF_MSGTYPE_MSGREAD, "MsgRead"},
783 {QNET_KIF_MSGTYPE_MSGREAD_XFER, "MsgRead_Xfer"},
784 {QNET_KIF_MSGTYPE_MSGWRITE, "MsgWrite"},
785 {QNET_KIF_MSGTYPE_MSGREPLY, "MsgReply"},
786 {QNET_KIF_MSGTYPE_MSGERROR, "MsgError"},
787 {QNET_KIF_MSGTYPE_EVENT, "Event"},
788 {QNET_KIF_MSGTYPE_PULSE, "Pulse"},
789 {QNET_KIF_MSGTYPE_SIGNAL, "Signal"},
790 {QNET_KIF_MSGTYPE_DISCONNECT, "Disconnect"},
791 {QNET_KIF_MSGTYPE_CONNECT_DEATH, "Connect Death"},
792 {QNET_KIF_MSGTYPE_MSGREAD_ERROR, "MsgRead Error"},
793 {QNET_KIF_MSGTYPE_CONNECT_PULSE, "Connect Pulse"},
794 {0, NULL}
797 static const value_string qnet6_kif_msgsend_msgtype_vals[] = {
798 {QNX_IO_CONNECT, "_IO_CONNECT"},
799 {QNX_IO_READ, "_IO_READ"},
800 {QNX_IO_WRITE, "_IO_WRITE"},
801 {QNX_IO_RSVD_CLOSE_OCB, "_IO_CLOSE_OCB"},
802 {QNX_IO_STAT, "_IO_STAT"},
803 {QNX_IO_NOTIFY, "_IO_NOTIFY"},
804 {QNX_IO_DEVCTL, "_IO_DEVCTL"},
805 {QNX_IO_RSVD_UNBLOCK, "_IO_UNBLOCK"},
806 {QNX_IO_PATHCONF, "_IO_PATHCONF"},
807 {QNX_IO_LSEEK, "_IO_LSEEK"},
808 {QNX_IO_CHMOD, "_IO_CHMOD"},
809 {QNX_IO_CHOWN, "_IO_CHOWN"},
810 {QNX_IO_UTIME, "_IO_UTIME"},
811 {QNX_IO_OPENFD, "_IO_OPENFD"},
812 {QNX_IO_FDINFO, "_IO_FDINFO"},
813 {QNX_IO_LOCK, "_IO_LOCK"},
814 {QNX_IO_SPACE, "_IO_SPACE"},
815 {QNX_IO_SHUTDOWN, "_IO_SHUTDOWN"},
816 {QNX_IO_MMAP, "_IO_MMAP"},
817 {QNX_IO_MSG, "_IO_MSG"},
818 {QNX_IO_RSVD, "_IO_RESERVED"},
819 {QNX_IO_DUP, "_IO_DUP"},
820 {QNX_IO_CLOSE, "_IO_CLOSE"},
821 {QNX_IO_RSVD_LOCK_OCB, "_IO_LOCK_OCB"},
822 {QNX_IO_RSVD_UNLOCK_OCB, "_IO_UNLOCK_OCB"},
823 {QNX_IO_SYNC, "_IO_SYNC"},
824 {QNX_IO_POWER, "_IO_POWER"},
825 {0, NULL}
828 static value_string_ext qnet6_kif_msgsend_msgtype_vals_ext = VALUE_STRING_EXT_INIT(qnet6_kif_msgsend_msgtype_vals);
831 static const value_string qnet6_kif_msgsend_msg_connect_subtype_vals[] = {
832 {QNX_IO_CONNECT_COMBINE, "_IO_CONNECT_COMBINE"},
833 {QNX_IO_CONNECT_COMBINE_CLOSE, "_IO_CONNECT_COMBINE_CLOSE"},
834 {QNX_IO_CONNECT_OPEN, "_IO_CONNECT_OPEN"},
835 {QNX_IO_CONNECT_UNLINK, "_IO_CONNECT_UNLINK"},
836 {QNX_IO_CONNECT_RENAME, "_IO_CONNECT_RENAME"},
837 {QNX_IO_CONNECT_MKNOD, "_IO_CONNECT_MKNOD"},
838 {QNX_IO_CONNECT_READLINK, "_IO_CONNECT_READLINK"},
839 {QNX_IO_CONNECT_LINK, "_IO_CONNECT_LINK"},
840 {QNX_IO_CONNECT_RSVD_UNBLOCK, "_IO_CONNECT_UNBLOCK"},
841 {QNX_IO_CONNECT_MOUNT, "_IO_CONNECT_MOUNT"},
842 {0, NULL}
845 static const value_string qnet6_kif_msgsend_msg_connect_extratype_vals[] = {
846 {QNX_IO_CONNECT_EXTRA_NONE, "_IO_CONNECT_EXTRA_NONE"},
847 {QNX_IO_CONNECT_EXTRA_LINK, "_IO_CONNECT_EXTRA_LINK"},
848 {QNX_IO_CONNECT_EXTRA_SYMLINK, "_IO_CONNECT_EXTRA_SYMLINK"},
849 {QNX_IO_CONNECT_EXTRA_MQUEUE, "_IO_CONNECT_EXTRA_MQUEUE"},
850 {QNX_IO_CONNECT_EXTRA_PHOTON, "_IO_CONNECT_EXTRA_PHOTON"},
851 {QNX_IO_CONNECT_EXTRA_SOCKET, "_IO_CONNECT_EXTRA_SOCKET"},
852 {QNX_IO_CONNECT_EXTRA_SEM, "_IO_CONNECT_EXTRA_SEM"},
853 {QNX_IO_CONNECT_EXTRA_RESMGR_LINK, "_IO_CONNECT_EXTRA_RESMGR_LINK"},
854 {QNX_IO_CONNECT_EXTRA_PROC_SYMLINK, "_IO_CONNECT_EXTRA_PROC_SYMLINK"},
855 {QNX_IO_CONNECT_EXTRA_RENAME, "_IO_CONNECT_EXTRA_RENAME"},
856 {QNX_IO_CONNECT_EXTRA_MOUNT, "_IO_CONNECT_EXTRA_MOUNT"},
857 {QNX_IO_CONNECT_EXTRA_MOUNT_OCB, "_IO_CONNECT_EXTRA_MOUNT_OCB"},
858 {QNX_IO_CONNECT_EXTRA_TYMEM, "_IO_CONNECT_EXTRA_TYMEM"},
859 {0, NULL}
862 static const value_string qnet6_kif_msgsend_msg_devctl_cmd_class_vals[] = {
863 {0, "QNX Reserved"},
864 {QNX_DCMD_ALL, "All io servers"},
865 {QNX_DCMD_FSYS, "Filesystem or io-blk"},
866 {QNX_DCMD_CHR, "Character"},
867 {QNX_DCMD_NET, "Network driver"},
868 {QNX_DCMD_MISC, "Misc"},
869 {QNX_DCMD_IP, "IP"},
870 {QNX_DCMD_MIXER, "Mixer"},
871 {QNX_DCMD_PROC, "Proc"},
872 {QNX_DCMD_MEM, "Mem"},
873 {QNX_DCMD_INPUT, "Input"},
874 {QNX_DCMD_PHOTON, "Photon"},
875 {QNX_DCMD_CAM, "Cam"},
876 {QNX_DCMD_USB, "Usb"},
877 {QNX_DCMD_MEDIA, "Media"},
878 {QNX_DCMD_CAM_SIM, "CamSim"},
879 {QNX_DCMD_MEMCLASS, "Memory Partition"},
880 {QNX_DCMD_PARTITION, "Adaptive Parition"},
881 {QNX_DCMD_CTTY, "T"},
882 {QNX_DCMD_FCTL, "f"},
883 {QNX_DCMD_IOCTL_TTY, "IOCTL_TTY"},
884 {0, NULL}
887 static value_string_ext qnet6_kif_msgsend_msg_devctl_cmd_class_vals_ext = VALUE_STRING_EXT_INIT(qnet6_kif_msgsend_msg_devctl_cmd_class_vals);
889 enum QNX_DCMD_CC_DEF
891 QNX_CCMD_DCMD_ALL_GETFLAGS = 0x101,
892 QNX_CCMD_DCMD_ALL_SETFLAGS = 0x102,
893 QNX_CCMD_DCMD_ALL_GETMOUNTFLAGS = 0x103,
894 QNX_CCMD_DCMD_ALL_GETOWN = 0x104,
895 QNX_CCMD_DCMD_ALL_SETOWN = 0x105,
896 QNX_CCMD_DCMD_ALL_FADVISE = 0x106,
898 QNX_CCMD_DCMD_PROC_SYSINFO = 0x800,
899 QNX_CCMD_DCMD_PROC_INFO = 0x801,
900 QNX_CCMD_DCMD_PROC_MAPINFO = 0x802,
901 QNX_CCMD_DCMD_PROC_MAPDEBUG = 0x803,
902 QNX_CCMD_DCMD_PROC_MAPDEBUG_BASE,
903 QNX_CCMD_DCMD_PROC_SIGNAL,
904 QNX_CCMD_DCMD_PROC_STOP,
905 QNX_CCMD_DCMD_PROC_WAITSTOP,
906 QNX_CCMD_DCMD_PROC_STATUS,
907 QNX_CCMD_DCMD_PROC_TIDSTATUS = QNX_CCMD_DCMD_PROC_STATUS,
908 QNX_CCMD_DCMD_PROC_CURTHREAD,
909 QNX_CCMD_DCMD_PROC_RUN,
910 QNX_CCMD_DCMD_PROC_GETGREG,
911 QNX_CCMD_DCMD_PROC_SETGREG,
912 QNX_CCMD_DCMD_PROC_GETFPREG,
913 QNX_CCMD_DCMD_PROC_SETFPREG,
914 QNX_CCMD_DCMD_PROC_BREAK,
915 QNX_CCMD_DCMD_PROC_FREEZETHREAD,
916 QNX_CCMD_DCMD_PROC_THAWTHREAD,
917 QNX_CCMD_DCMD_PROC_EVENT,
918 QNX_CCMD_DCMD_PROC_SET_FLAG,
919 QNX_CCMD_DCMD_PROC_CLEAR_FLAG,
920 QNX_CCMD_DCMD_PROC_PAGEDATA,
921 QNX_CCMD_DCMD_PROC_GETALTREG, /* 21 */
922 QNX_CCMD_DCMD_PROC_SETALTREG,
923 QNX_CCMD_DCMD_PROC_TIMERS,
924 QNX_CCMD_DCMD_PROC_IRQS,
925 QNX_CCMD_DCMD_PROC_GETREGSET,
926 QNX_CCMD_DCMD_PROC_SETREGSET,
927 QNX_CCMD_DCMD_PROC_THREADCTL,
928 QNX_CCMD_DCMD_PROC_GET_BREAKLIST,
929 QNX_CCMD_DCMD_PROC_CHANNELS,
930 QNX_CCMD_DCMD_PROC_GET_MEMPART_LIST, /* 30 */
931 QNX_CCMD_DCMD_PROC_ADD_MEMPARTID,
932 QNX_CCMD_DCMD_PROC_DEL_MEMPARTID,
933 QNX_CCMD_DCMD_PROC_CHG_MEMPARTID, /* 33 */
935 QNX_CCMD_DCMD_BLK_PARTENTRY = 0x201,
936 QNX_CCMD_DCMD_BLK_FORCE_RELEARN = 0x202,
939 * lib/io-char/public/sys/dcmd_chr.h
941 QNX_CCMD_DCMD_CHR_TTYINFO = 0x300 + 10,
942 QNX_CCMD_DCMD_CHR_SERCTL = 0x300 + 20,
943 QNX_CCMD_DCMD_CHR_TCINJECTC = 0x300 + 22,
944 QNX_CCMD_DCMD_CHR_TCINJECTR = 0x300 + 23,
945 QNX_CCMD_DCMD_CHR_ISATTY = 0x300 + 24,
946 QNX_CCMD_DCMD_CHR_GETOBAND = 0x300 + 25,
947 QNX_CCMD_DCMD_CHR_ISSIZE = 0x300 + 27,
948 QNX_CCMD_DCMD_CHR_OSSIZE = 0x300 + 28,
949 QNX_CCMD_DCMD_CHR_PARCTL = 0x300 + 98,
950 QNX_CCMD_DCMD_CHR_PNPTEXT = 0x300 + 99,
952 QNX_CCMD_DCMD_CHR_ISCHARS = ('f' << 0x8) + 127,
954 QNX_CCMD_DCMD_CHR_TCFLOW = ('T' << 0x8) + 6,
956 QNX_CCMD_DCMD_CHR_TCGETSID = ('t' << 0x8) + 7,
957 QNX_CCMD_DCMD_CHR_TCSETSID = ('t' << 0x8) + 8,
958 QNX_CCMD_DCMD_CHR_TCFLUSH = ('t' << 0x8) + 16,
959 QNX_CCMD_DCMD_CHR_TCSETATTR = ('t' << 0x8) + 20,
960 QNX_CCMD_DCMD_CHR_TCSETATTRD = ('t' << 0x8) + 21,
961 QNX_CCMD_DCMD_CHR_TCSETATTRF = ('t' << 0x8) + 22,
962 QNX_CCMD_DCMD_CHR_TCGETATTR = ('t' << 0x8) + 19,
963 QNX_CCMD_DCMD_CHR_PUTOBAND = ('t' << 0x8) + 26,
964 QNX_CCMD_DCMD_CHR_TCDRAIN = ('t' << 0x8) + 94,
965 QNX_CCMD_DCMD_CHR_SETSIZE = ('t' << 0x8) + 103,
966 QNX_CCMD_DCMD_CHR_GETSIZE = ('t' << 0x8) + 104,
967 QNX_CCMD_DCMD_CHR_LINESTATUS = ('t' << 0x8) + 106,
968 QNX_CCMD_DCMD_CHR_OSCHARS = ('t' << 0x8) + 115,
969 QNX_CCMD_DCMD_CHR_TCSETPGRP = ('t' << 0x8) + 118,
970 QNX_CCMD_DCMD_CHR_TCGETPGRP = ('t' << 0x8) + 119,
973 * lib/malloc/public/malloc_g/malloc-lib.h
975 QNX_CCMD_DCMD_DBGMEM_ADDSYM = 0x500 + 0,
976 QNX_CCMD_DCMD_DBGMEM_REGISTER = 0x500 + 1,
979 * services/io-fs/lib/public/sys/dmd_dio.h
981 QNX_CCMD_DCMD_DIO_DEVICE = 0xf00 + 1,
982 QNX_CCMD_DCMD_DIO_ALLOC = 0xf00 + 2,
983 QNX_CCMD_DCMD_DIO_IO = 0xf00 + 3,
986 * services/dumper/public/sys/dcmd_dumper.h
988 QNX_CCMD_DCMD_DUMPER_NOTIFYEVENT = 0x500 + 1,
989 QNX_CCMD_DCMD_DUMPER_REMOVEALL = 0x500 + 3,
990 QNX_CCMD_DCMD_DUMPER_REMOVEEVENT = 0x500 + 2,
992 QNX_CCMD_DCMD_FSYS_FORCE_RELEARN = 0x200 + 2,
993 QNX_CCMD_DCMD_FSYS_STATISTICS = 0x200 + 11,
994 QNX_CCMD_DCMD_FSYS_STATISTICS_CLR = 0x200 + 12,
995 QNX_CCMD_DCMD_FSYS_STATVFS = 0x200 + 13,
996 QNX_CCMD_DCMD_FSYS_PREGROW_FILE,
997 QNX_CCMD_DCMD_FSYS_DIRECT_IO,
998 QNX_CCMD_DCMD_FSYS_MOUNTED_ON,
999 QNX_CCMD_DCMD_FSYS_MOUNTED_AT,
1000 QNX_CCMD_DCMD_FSYS_MOUNTED_BY,
1001 QNX_CCMD_DCMD_FSYS_OPTIONS,
1002 QNX_CCMD_DCMD_FSYS_FILE_FLAGS,
1003 QNX_CCMD_DCMD_FSYS_MAP_OFFSET = 0x200 + 21,
1006 * services/io-fs/lib/public/sys/dcmd_fsys.h
1008 QNX_CCMD_DCMD_FSYS_UUID = 0x200 + 21, /* same with the MAP_OFFSET */
1009 QNX_CCMD_DCMD_FSYS_DIR_NFILES,
1010 QNX_CCMD_DCMD_FSYS_PASS_USE,
1011 QNX_CCMD_DCMD_FSYS_PASS_CHG,
1012 QNX_CCMD_DCMD_FSYS_PASS_NEW,
1013 QNX_CCMD_DCMD_FSYS_CACHE_SET = 0x200 + 26,
1016 * services/io-fs/lib/public/sys/dcmd_media.h
1018 QNX_CCMD_DCMD_MEDIA_SONG = 0xe00 + 100,
1019 QNX_CCMD_DCMD_MEDIA_ALBUM = 0xe00 + 101,
1020 QNX_CCMD_DCMD_MEDIA_ARTIST,
1021 QNX_CCMD_DCMD_MEDIA_GENRE,
1022 QNX_CCMD_DCMD_MEDIA_COMPOSER,
1023 QNX_CCMD_DCMD_MEDIA_RELEASE_DATE,
1024 QNX_CCMD_DCMD_MEDIA_TRACK_NUM,
1026 QNX_CCMD_DCMD_MEDIA_PUBLISHER = 0xe00 + 107, /* from */
1027 QNX_CCMD_DCMD_MEDIA_DURATION = 0xe00 + 107, /* no direction */
1029 QNX_CCMD_DCMD_MEDIA_NAME, /* 108 */
1031 QNX_CCMD_DCMD_MEDIA_INFO_STREAM = 0xe00 + 114, /* 114 */
1032 QNX_CCMD_DCMD_MEDIA_OPEN_STREAM,
1033 QNX_CCMD_DCMD_MEDIA_CLOSE_STREAM,
1034 QNX_CCMD_DCMD_MEDIA_SET_STREAM,
1035 QNX_CCMD_DCMD_MEDIA_READ_STREAM,
1036 QNX_CCMD_DCMD_MEDIA_GET_DEVINFO,
1037 QNX_CCMD_DCMD_MEDIA_UPNP_CDS_BROWSE,
1038 QNX_CCMD_DCMD_MEDIA_DRM_IS_AUTH,
1039 QNX_CCMD_DCMD_MEDIA_DRM_REGISTER,
1040 QNX_CCMD_DCMD_MEDIA_DRM_PROXIMTY,
1041 QNX_CCMD_DCMD_MEDIA_DRM_LICENSE,
1042 QNX_CCMD_DCMD_MEDIA_DRM_CHALLENGE, /* 125 */
1044 QNX_CCMD_DCMD_MEDIA_PLAY = 0xe00 + 10,
1045 QNX_CCMD_DCMD_MEDIA_PLAY_AT,
1046 QNX_CCMD_DCMD_MEDIA_PAUSE,
1047 QNX_CCMD_DCMD_MEDIA_RESUME,
1048 QNX_CCMD_DCMD_MEDIA_NEXT_TRACK,
1049 QNX_CCMD_DCMD_MEDIA_PREV_TRACK,
1050 QNX_CCMD_DCMD_MEDIA_FASTFWD,
1051 QNX_CCMD_DCMD_MEDIA_FASTRWD,
1052 QNX_CCMD_DCMD_MEDIA_PLAYBACK_INFO,
1053 QNX_CCMD_DCMD_MEDIA_GET_SHUFFLE,
1054 QNX_CCMD_DCMD_MEDIA_SET_SHUFFLE,
1055 QNX_CCMD_DCMD_MEDIA_GET_REPEAT,
1056 QNX_CCMD_DCMD_MEDIA_SET_REPEAT,
1058 QNX_CCMD_DCMD_MEDIA_DEBUG0 = 0xe00 + 200,
1059 QNX_CCMD_DCMD_MEDIA_DEBUG1,
1060 QNX_CCMD_DCMD_MEDIA_DEBUG2,
1061 QNX_CCMD_DCMD_MEDIA_DEBUG3,
1062 QNX_CCMD_DCMD_MEDIA_DEBUG4,
1063 QNX_CCMD_DCMD_MEDIA_DEBUG5,
1065 QNX_CCMD_DCMD_IO_NET_MAX_QUEUE = 0x400 + 10,
1066 QNX_CCMD_DCMD_IO_NET_PROMISCUOUS = 0x400 + 12,
1067 QNX_CCMD_DCMD_IO_NET_WIFI = 0x400 + 14,
1068 QNX_CCMD_DCMD_IO_NET_REDIRECT_BELOW,
1069 QNX_CCMD_DCMD_IO_NET_VERSION,
1070 QNX_CCMD_DCMD_IO_NET_CHANGE_MCAST,
1071 QNX_CCMD_DCMD_IO_NET_INSTANCE,
1072 QNX_CCMD_DCMD_IO_NET_TX_FLUSH,
1073 QNX_CCMD_DCMD_IO_NET_MIIPHY,
1074 QNX_CCMD_DCMD_IO_NET_GET_CONFIG
1079 * from services/system/public/sys/procfs.h
1081 static const value_string qnet6_kif_msg_devctl_cmd_class_vals[] = {
1082 {QNX_CCMD_DCMD_BLK_PARTENTRY, "DCMD_BLK_PARTENTRY"},
1083 {QNX_CCMD_DCMD_BLK_FORCE_RELEARN, "DCMD_BLK_FORCE_RELEARN"},
1084 /* {QNX_CCMD_DCMD_FSYS_FORCE_RELEARN, "DCMD_FSYS_FORCE_RELEARN"}, XXX - duplicate of QNX_CCMD_DCMD_BLK_FORCE_RELEARN */
1085 {QNX_CCMD_DCMD_FSYS_STATISTICS, "DCMD_FSYS_STATISTICS"},
1086 {QNX_CCMD_DCMD_FSYS_STATISTICS_CLR, "DCMD_FSYS_STATISTICS_CLR"},
1087 {QNX_CCMD_DCMD_FSYS_STATVFS, "DCMD_FSYS_STATVFS"},
1088 {QNX_CCMD_DCMD_FSYS_PREGROW_FILE, "DCMD_FSYS_PREGROW_FILE"},
1089 {QNX_CCMD_DCMD_FSYS_DIRECT_IO, "DCMD_FSYS_DIRECT_IO"},
1090 {QNX_CCMD_DCMD_FSYS_MOUNTED_ON, "DCMD_FSYS_MOUNTED_ON"},
1091 {QNX_CCMD_DCMD_FSYS_MOUNTED_AT, "DCMD_FSYS_MOUNTED_AT"},
1092 {QNX_CCMD_DCMD_FSYS_MOUNTED_BY, "DCMD_FSYS_MOUNTED_BY"},
1093 {QNX_CCMD_DCMD_FSYS_OPTIONS, "DCMD_FSYS_OPTIONS"},
1094 {QNX_CCMD_DCMD_FSYS_FILE_FLAGS, "DCMD_FSYS_FILE_FLAGS"},
1095 {QNX_CCMD_DCMD_FSYS_MAP_OFFSET, "DCMD_FSYS_MAP_OFFSET"},
1096 /* {QNX_CCMD_DCMD_FSYS_UUID, "DCMD_FSYS_UUID"}, XXX - duplicate of QNX_CCMD_DCMD_FSYS_MAP_OFFSET */
1097 {QNX_CCMD_DCMD_FSYS_DIR_NFILES, "DCMD_FSYS_DIR_NFILES"},
1098 {QNX_CCMD_DCMD_FSYS_PASS_USE, "DCMD_FSYS_PASS_USE"},
1099 {QNX_CCMD_DCMD_FSYS_PASS_CHG, "DCMD_FSYS_PASS_CHG"},
1100 {QNX_CCMD_DCMD_FSYS_PASS_NEW, "DCMD_FSYS_PASS_NEW"},
1101 {QNX_CCMD_DCMD_FSYS_CACHE_SET, "DCMD_FSYS_CACHE_SET"},
1102 {QNX_CCMD_DCMD_CHR_TTYINFO, "DCMD_CHR_TTYINFO"},
1103 {QNX_CCMD_DCMD_CHR_SERCTL, "DCMD_CHR_SERCTL"},
1104 {QNX_CCMD_DCMD_CHR_TCINJECTC, "DCMD_CHR_TCINJECTC"},
1105 {QNX_CCMD_DCMD_CHR_TCINJECTR, "DCMD_CHR_TCINJECTR"},
1106 {QNX_CCMD_DCMD_CHR_ISATTY, "DCMD_CHR_ISATTY"},
1107 {QNX_CCMD_DCMD_CHR_GETOBAND, "DCMD_CHR_GETOBAND"},
1108 {QNX_CCMD_DCMD_CHR_ISSIZE, "DCMD_CHR_ISSIZE"},
1109 {QNX_CCMD_DCMD_CHR_OSSIZE, "DCMD_CHR_OSSIZE"},
1110 {QNX_CCMD_DCMD_CHR_PARCTL, "DCMD_CHR_PARCTL"},
1111 {QNX_CCMD_DCMD_CHR_PNPTEXT, "DCMD_CHR_PNPTEXT"},
1112 {QNX_CCMD_DCMD_IO_NET_MAX_QUEUE, "DCMD_IO_NET_MAX_QUEUE"},
1113 {QNX_CCMD_DCMD_IO_NET_PROMISCUOUS, "DCMD_IO_NET_PROMISCUOUS"},
1114 {QNX_CCMD_DCMD_IO_NET_WIFI, "DCMD_IO_NET_WIFI"},
1115 {QNX_CCMD_DCMD_IO_NET_REDIRECT_BELOW, "DCMD_IO_NET_REDIRECT_BELOW"},
1116 {QNX_CCMD_DCMD_IO_NET_VERSION, "DCMD_IO_NET_VERSION"},
1117 {QNX_CCMD_DCMD_IO_NET_CHANGE_MCAST, "DCMD_IO_NET_CHANGE_MCAST"},
1118 {QNX_CCMD_DCMD_IO_NET_INSTANCE, "DCMD_IO_NET_INSTANCE"},
1119 {QNX_CCMD_DCMD_IO_NET_TX_FLUSH, "DCMD_IO_NET_TX_FLUSH"},
1120 {QNX_CCMD_DCMD_IO_NET_MIIPHY, "DCMD_IO_NET_MIIPHY"},
1121 {QNX_CCMD_DCMD_IO_NET_GET_CONFIG, "DCMD_IO_NET_GET_CONFIG"},
1122 {QNX_CCMD_DCMD_DBGMEM_ADDSYM, "DCMD_DBGMEM_ADDSYM"},
1123 {QNX_CCMD_DCMD_DBGMEM_REGISTER, "DCMD_DBGMEM_REGISTER"},
1124 /* {QNX_CCMD_DCMD_DUMPER_NOTIFYEVENT, "DCMD_DUMPER_NOTIFYEVENT"}, XXX - duplicate of QNX_CCMD_DCMD_DBGMEM_REGISTER */
1125 {QNX_CCMD_DCMD_DUMPER_REMOVEEVENT, "DCMD_DUMPER_REMOVEEVENT"},
1126 {QNX_CCMD_DCMD_DUMPER_REMOVEALL, "DCMD_DUMPER_REMOVEALL"},
1127 {QNX_CCMD_DCMD_PROC_SYSINFO, "DCMD_PROC_SYSINFO:obtain information stored in the system page"},
1128 {QNX_CCMD_DCMD_PROC_INFO, "DCMD_PROC_INFO:obtain information about a specific process"},
1129 {QNX_CCMD_DCMD_PROC_MAPINFO,
1130 "DCMD_PROC_MAPINFO:obtain segment specific information about mapped memory segments in the specific process "},
1131 {QNX_CCMD_DCMD_PROC_MAPDEBUG,
1132 "DCMD_PROC_MAPDEBUG:used by debuggers to find the object that contains the symbol information"},
1133 {QNX_CCMD_DCMD_PROC_MAPDEBUG_BASE, "PROC_MAPDEBUG_BASE:obtain information pertaining to the path"},
1134 {QNX_CCMD_DCMD_PROC_SIGNAL, "DCMD_PROC_SIGNAL"},
1135 {QNX_CCMD_DCMD_PROC_STOP, "DCMD_PROC_STOP"},
1136 {QNX_CCMD_DCMD_PROC_WAITSTOP, "DCMD_PROC_WAITSTOP"},
1137 {QNX_CCMD_DCMD_PROC_STATUS, "DCMD_PROC_STATUS or TIDSTATUS"},
1138 {QNX_CCMD_DCMD_PROC_CURTHREAD, "DCMD_PROC_CURTHREAD"},
1139 {QNX_CCMD_DCMD_PROC_RUN, "DCMD_PROC_RUN"},
1140 {QNX_CCMD_DCMD_PROC_GETGREG, "DCMD_PROC_GETGREG"},
1141 {QNX_CCMD_DCMD_PROC_SETGREG, "DCMD_PROC_SETGREG"},
1142 {QNX_CCMD_DCMD_PROC_GETFPREG, ""},
1143 {QNX_CCMD_DCMD_PROC_SETFPREG, "DCMD_PROC_SETFPREG"},
1144 {QNX_CCMD_DCMD_PROC_BREAK, "DCMD_PROC_BREAK"},
1145 {QNX_CCMD_DCMD_PROC_FREEZETHREAD, "DCMD_PROC_FREEZETHREAD"},
1146 {QNX_CCMD_DCMD_PROC_THAWTHREAD, "DCMD_PROC_THAWTHREAD"},
1147 {QNX_CCMD_DCMD_PROC_EVENT, "DCMD_PROC_EVENT"},
1148 {QNX_CCMD_DCMD_PROC_SET_FLAG, "DCMD_PROC_SET_FLAG"},
1149 {QNX_CCMD_DCMD_PROC_CLEAR_FLAG, "DCMD_PROC_CLEAR_FLAG"},
1150 {QNX_CCMD_DCMD_PROC_PAGEDATA, "DCMD_PROC_PAGEDATA"},
1151 {QNX_CCMD_DCMD_PROC_GETALTREG, "DCMD_PROC_GETALTREG"}, /* 21 */
1152 {QNX_CCMD_DCMD_PROC_SETALTREG, "DCMD_PROC_SETALTREG"},
1153 {QNX_CCMD_DCMD_PROC_TIMERS, "DCMD_PROC_TIMERS"},
1154 {QNX_CCMD_DCMD_PROC_IRQS, "DCMD_PROC_IRQS"},
1155 {QNX_CCMD_DCMD_PROC_GETREGSET, "DCMD_PROC_GETREGSET"},
1156 {QNX_CCMD_DCMD_PROC_SETREGSET, "DCMD_PROC_SETREGSET"},
1157 {QNX_CCMD_DCMD_PROC_THREADCTL, "DCMD_PROC_THREADCTL"},
1158 {QNX_CCMD_DCMD_PROC_GET_BREAKLIST, "DCMD_PROC_GET_BREAKLIST"},
1159 {QNX_CCMD_DCMD_PROC_CHANNELS, "DCMD_PROC_CHANNELS"},
1160 {QNX_CCMD_DCMD_PROC_GET_MEMPART_LIST, "DCMD_PROC_GET_MEMPART_LIST"}, /* 30 */
1161 {QNX_CCMD_DCMD_PROC_ADD_MEMPARTID, "DCMD_PROC_ADD_MEMPARTID"},
1162 {QNX_CCMD_DCMD_PROC_DEL_MEMPARTID, "DCMD_PROC_DEL_MEMPARTID"},
1163 {QNX_CCMD_DCMD_PROC_CHG_MEMPARTID, "DCMD_PROC_CHG_MEMPARTID"}, /* 33 */
1164 {QNX_CCMD_DCMD_DIO_DEVICE, "DCMD_DIO_DEVICE"},
1165 {QNX_CCMD_DCMD_DIO_ALLOC, "DCMD_DIO_ALLOC"},
1166 {QNX_CCMD_DCMD_DIO_IO, "DCMD_DIO_IO"},
1167 {QNX_CCMD_DCMD_CHR_TCFLOW, "DCMD_CHR_TCFLOW"},
1168 {QNX_CCMD_DCMD_CHR_ISCHARS, "DCMD_CHR_ISCHARS"},
1169 {QNX_CCMD_DCMD_CHR_TCGETSID, "DCMD_CHR_TCGETSID"},
1170 {QNX_CCMD_DCMD_CHR_TCSETSID, "DCMD_CHR_TCSETSID"},
1171 {QNX_CCMD_DCMD_CHR_TCFLUSH, "DCMD_CHR_TCFLUSH"},
1172 {QNX_CCMD_DCMD_CHR_TCGETATTR, "DCMD_CHR_TCGETATTR"},
1173 {QNX_CCMD_DCMD_CHR_TCSETATTR, "DCMD_CHR_TCSETATTR"},
1174 {QNX_CCMD_DCMD_CHR_TCSETATTRD, "DCMD_CHR_TCSETATTRD"},
1175 {QNX_CCMD_DCMD_CHR_TCSETATTRF, "DCMD_CHR_TCSETATTRF"},
1176 {QNX_CCMD_DCMD_CHR_PUTOBAND, "DCMD_CHR_PUTOBAND"},
1177 {QNX_CCMD_DCMD_CHR_TCDRAIN, "DCMD_CHR_TCDRAIN"},
1178 {QNX_CCMD_DCMD_CHR_SETSIZE, "DCMD_CHR_SETSIZE"},
1179 {QNX_CCMD_DCMD_CHR_GETSIZE, "DCMD_CHR_GETSIZE"},
1180 {QNX_CCMD_DCMD_CHR_LINESTATUS, "DCMD_CHR_LINESTATUS"},
1181 {QNX_CCMD_DCMD_CHR_OSCHARS, "DCMD_CHR_OSCHARS"},
1182 {QNX_CCMD_DCMD_CHR_TCSETPGRP, "DCMD_CHR_TCSETPGRP"},
1183 {QNX_CCMD_DCMD_CHR_TCGETPGRP, "DCMD_CHR_TCGETPGRP"},
1184 {0, NULL}
1187 static value_string_ext qnet6_kif_msg_devctl_cmd_class_vals_ext = VALUE_STRING_EXT_INIT(qnet6_kif_msg_devctl_cmd_class_vals);
1189 enum qnx_io_msg_xtypes
1191 QNX_IO_XTYPE_NONE,
1192 QNX_IO_XTYPE_READCOND,
1193 QNX_IO_XTYPE_MQUEUE,
1194 QNX_IO_XTYPE_TCPIP,
1195 QNX_IO_XTYPE_TCPIP_MSG,
1196 QNX_IO_XTYPE_OFFSET,
1197 QNX_IO_XTYPE_REGISTRY
1199 static const value_string qnet6_kif_msgsend_msg_io_read_xtypes_vals[] = {
1200 {QNX_IO_XTYPE_NONE, "_IO_XTYPE_NONE"},
1201 {QNX_IO_XTYPE_READCOND, "_IO_XTYPE_READCOND"},
1202 {QNX_IO_XTYPE_MQUEUE, "_IO_XTYPE_MQUEUE"},
1203 {QNX_IO_XTYPE_TCPIP, "_IO_XTYPE_TCPIP"},
1204 {QNX_IO_XTYPE_TCPIP_MSG, "_IO_XTYPE_TCPIP_MSG"},
1205 {QNX_IO_XTYPE_OFFSET, "_IO_XTYPE_OFFSET"},
1206 {QNX_IO_XTYPE_REGISTRY, "_IO_XTYPE_REGISTRY"},
1207 {0, NULL}
1210 enum _file_type
1212 QNX_FTYPE_MATCHED = -1,
1213 QNX_FTYPE_ALL = -1,
1214 QNX_FTYPE_ANY = 0,
1215 QNX_FTYPE_FILE,
1216 QNX_FTYPE_LINK,
1217 QNX_FTYPE_SYMLINK,
1218 QNX_FTYPE_PIPE,
1219 QNX_FTYPE_SHMEM,
1220 QNX_FTYPE_MQUEUE,
1221 QNX_FTYPE_SOCKET,
1222 QNX_FTYPE_SEM,
1223 QNX_FTYPE_PHOTON,
1224 QNX_FTYPE_DUMPER,
1225 QNX_FTYPE_MOUNT,
1226 QNX_FTYPE_NAME,
1227 QNX_FTYPE_TYMEM
1229 static const value_string qnet6_kif_msgsend_msg_connect_filetype_vals[] = {
1230 {QNX_FTYPE_ALL, "_FTYPE_ALL"},
1231 {QNX_FTYPE_ANY, "_FTYPE_ANY"},
1232 {QNX_FTYPE_FILE, "_FTYPE_FILE"},
1233 {QNX_FTYPE_LINK, "_FTYPE_LINK"},
1234 {QNX_FTYPE_SYMLINK, "_FTYPE_SYMLINK"},
1235 {QNX_FTYPE_PIPE, "_FTYPE_PIPE"},
1236 {QNX_FTYPE_SHMEM, "_FTYPE_SHMEM"},
1237 {QNX_FTYPE_MQUEUE, "_FTYPE_MQUEUE"},
1238 {QNX_FTYPE_SOCKET, "_FTYPE_SOCKET"},
1239 {QNX_FTYPE_SEM, "_FTYPE_SEM"},
1240 {QNX_FTYPE_PHOTON, "_FTYPE_PHOTON"},
1241 {QNX_FTYPE_DUMPER, "_FTYPE_DUMPER"},
1242 {QNX_FTYPE_MOUNT, "_FTYPE_MOUNT"},
1243 {QNX_FTYPE_NAME, "_FTYPE_NAME"},
1244 {QNX_FTYPE_TYMEM, "_FTYPE_TYMEM"},
1245 {0, NULL}
1248 static const value_string qnet6_kif_msgsend_msg_connect_ioflag_vals[] = {
1249 {0x0, "readonly"}, /* O_RDONLY 0 */
1250 {0x1, "writeonly"}, /* O_WRONLY 1 */
1251 {0x2, "readwrite"}, /* O_RDWR 2 */
1252 #if 0
1253 {0x4, "append"}, /* O_APPEND 010 */
1254 {0x5, "datasync"}, /* O_DSYNC 020 */
1255 {0x6, "sync"}, /* O_SYNC 040 */
1257 {0x9, "rsync"}, /* O_RSYNC 0100 */
1258 {0xa, "nonblock"}, /* O_NONBLOCK 0200 */
1259 {0xb, "creat"}, /* O_CREAT 0400 */
1261 {0xd, "truncate"}, /* O_TRUNC 01000 */
1262 {0xe, "exclusive"}, /* O_EXCL 02000 */
1263 {0xf, "noctrltty"}, /* O_NOCTTY 04000 */
1265 * below is QNX extension
1268 * O_CLOEXEC 020000
1271 * O_REALIDS 040000
1274 * O_LARGEFILE 0100000
1277 * O_ASYNC 0200000
1279 #endif
1280 {0, NULL}
1283 static const value_string qnet6_kif_msgsend_msg_connect_mode_vals[] = {
1284 #if 0
1285 #define S_IRWXU 000700 /* Read, write, execute/search */
1286 #define S_IRUSR 000400 /* Read permission */
1287 #define S_IWUSR 000200 /* Write permission */
1288 #define S_IXUSR 000100 /* Execute/search permission */
1291 * Group permissions
1293 #define S_IRWXG 000070 /* Read, write, execute/search */
1294 #define S_IRGRP 000040 /* Read permission */
1295 #define S_IWGRP 000020 /* Write permission */
1296 #define S_IXGRP 000010 /* Execute/search permission */
1299 * Other permissions
1301 #define S_IRWXO 000007 /* Read, write, execute/search */
1302 #define S_IROTH 000004 /* Read permission */
1303 #define S_IWOTH 000002 /* Write permission */
1304 #define S_IXOTH 000001 /* Execute/search permission */
1305 #define S_ISUID 004000 /* set user id on execution */
1306 #define S_ISGID 002000 /* set group id on execution */
1307 #define S_ISVTX 001000 /* sticky bit */
1309 #define _S_IFIFO 0x1000 /* FIFO */
1310 #define _S_IFCHR 0x2000 /* Character special */
1311 #define _S_IFDIR 0x4000 /* Directory */
1312 #define _S_IFNAM 0x5000 /* Special named file */
1313 #define _S_IFBLK 0x6000 /* Block special */
1314 #define _S_IFREG 0x8000 /* Regular */
1315 #define _S_IFLNK 0xA000 /* Symbolic link */
1316 #define _S_IFSOCK 0xC000 /* Socket */
1317 #endif
1319 * yzhao the value should be the value after bitshift
1321 {0x1, "FIFO"},
1322 {0x2, "Character special"},
1323 {0x4, "Directory"},
1324 {0x5, "Special named file"},
1325 {0x6, "Block special"},
1326 {0x8, "Regular"},
1327 {0xa, "Symbolic link"},
1328 {0xc, "Socket"},
1329 {0, NULL}
1332 static const value_string qnet6_kif_msgsend_msg_connect_sflag_vals[] = {
1333 {0x00, "compatibility mode"},
1334 {0x01, "DOS-like interpretation of open, locks, etc"},
1335 {0x10, "deny read/write mode"},
1336 {0x20, "deny write mode"},
1337 {0x30, "deny read mode"},
1338 {0x40, "deny none mode"},
1339 {0x70, "mask for standard share modes"},
1340 {0, NULL}
1343 static const value_string qnet6_kif_msgsend_msg_connect_access_vals[] = {
1344 {0x0, "not set"},
1345 {0x1, "read"}, /* IO_FLAG_RD 1 */
1346 {0x2, "write"}, /* IO_FLAG_WR 2 */
1347 {0, NULL}
1350 static const value_string qnet6_kif_msgsend_msg_io_seek_whence_vals[] = {
1351 {0x0, "SEEK_SET"},
1352 {0x1, "SEEK_CUR"},
1353 {0x2, "SEEK_END"},
1354 {0, NULL}
1357 enum qnx_io_space_subtype_enum
1359 QNX_F_ALLOCSP64 = 110,
1360 QNX_F_FREESP64 = 111
1363 static const value_string qnet6_kif_msgsend_msg_io_space_subtype_vals[] = {
1364 {QNX_F_ALLOCSP64, "F_ALLOCSP64"},
1365 {QNX_F_FREESP64, "F_FREESP64"},
1366 {0, NULL}
1369 enum pathconf_value
1371 QNX_PC_LINK_MAX = 1,
1372 QNX_PC_MAX_CANON,
1373 QNX_PC_MAX_INPUT,
1374 QNX_PC_NAME_MAX,
1375 QNX_PC_PATH_MAX,
1376 QNX_PC_PIPE_BUF,
1377 QNX_PC_NO_TRUNC,
1378 QNX_PC_VDISABLE,
1379 QNX_PC_CHOWN_RESTRICTED,
1380 QNX_PC_DOS_SHARE = 10,
1381 QNX_PC_IMAGE_VADDR = 11,
1382 QNX_PC_ASYNC_IO = 12,
1383 QNX_PC_PRIO_IO = 13,
1384 QNX_PC_SYNC_IO = 14,
1385 QNX_PC_SOCK_MAXBUF = 15,
1386 QNX_PC_FILESIZEBITS = 16,
1387 QNX_PC_SYMLINK_MAX = 17,
1388 QNX_PC_SYMLOOP_MAX = 18,
1389 QNX_PC_LINK_DIR = 19,
1390 QNX_PC_2_SYMLINKS = 20,
1391 QNX_PC_ALLOC_SIZE_MIN = 21,
1392 QNX_PC_REC_INCR_XFER_SIZE = 22,
1393 QNX_PC_REC_MAX_XFER_SIZE = 23,
1394 QNX_PC_REC_MIN_XFER_SIZE = 24,
1395 QNX_PC_REC_XFER_ALIGN = 25
1398 static const value_string qnet6_kif_msgsend_msg_io_pathconf_name_vals[] = {
1399 {QNX_PC_LINK_MAX, "_PC_LINK_MAX"},
1400 {QNX_PC_MAX_CANON, "_PC_MAX_CANON"},
1401 {QNX_PC_MAX_INPUT, "_PC_MAX_INPUT"},
1402 {QNX_PC_NAME_MAX, "_PC_NAME_MAX"},
1403 {QNX_PC_PATH_MAX, "_PC_PATH_MAX"},
1404 {QNX_PC_PIPE_BUF, "_PC_PIPE_BUF"},
1405 {QNX_PC_NO_TRUNC, "_PC_NO_TRUNC"},
1406 {QNX_PC_VDISABLE, "_PC_VDISABLE"},
1407 {QNX_PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED"},
1408 {QNX_PC_DOS_SHARE, "_PC_DOS_SHARE"},
1409 {QNX_PC_IMAGE_VADDR, "_PC_IMAGE_VADDR"},
1410 {QNX_PC_ASYNC_IO, "_PC_ASYNC_IO"},
1411 {QNX_PC_PRIO_IO, "_PC_PRIO_IO"},
1412 {QNX_PC_SYNC_IO, "_PC_SYNC_IO"},
1413 {QNX_PC_SOCK_MAXBUF, "_PC_SOCK_MAXBUF"},
1414 {QNX_PC_FILESIZEBITS, "_PC_FILESIZEBITS"},
1415 {QNX_PC_SYMLINK_MAX, "_PC_SYMLINK_MAX"},
1416 {QNX_PC_SYMLOOP_MAX, "_PC_SYMLOOP_MAX"},
1417 {QNX_PC_LINK_DIR, "_PC_LINK_DIR"},
1418 {QNX_PC_2_SYMLINKS, "_PC_2_SYMLINKS"},
1419 {QNX_PC_ALLOC_SIZE_MIN, "_PC_ALLOC_SIZE_MIN"},
1420 {QNX_PC_REC_INCR_XFER_SIZE, "_PC_REC_INCR_XFER_SIZE"},
1421 {QNX_PC_REC_MAX_XFER_SIZE, "_PC_REC_MAX_XFER_SIZE"},
1422 {QNX_PC_REC_MIN_XFER_SIZE, "_PC_REC_MIN_XFER_SIZE"},
1423 {QNX_PC_REC_XFER_ALIGN, "_PC_REC_XFER_ALIGN"},
1424 {0, NULL}
1427 static value_string_ext qnet6_kif_msgsend_msg_io_pathconf_name_vals_ext = VALUE_STRING_EXT_INIT(qnet6_kif_msgsend_msg_io_pathconf_name_vals);
1429 enum QNX_IO_OPENFD_XTYPES
1431 _IO_OPENFD_NONE,
1432 _IO_OPENFD_PIPE,
1433 _IO_OPENFD_KQUEUE,
1434 _IO_OPENFD_ACCEPT,
1435 _IO_OPENFD_SCTP_PEELOFF
1438 static const value_string qnet6_kif_msgsend_msg_openfd_xtypes_vals[] = {
1439 {_IO_OPENFD_NONE, "_IO_OPENFD_NONE"},
1440 {_IO_OPENFD_PIPE, "_IO_OPENFD_PIPE"},
1441 {_IO_OPENFD_KQUEUE, "_IO_OPENFD_KQUEUE"},
1442 {_IO_OPENFD_ACCEPT, "_IO_OPENFD_ACCEPT"},
1443 {_IO_OPENFD_SCTP_PEELOFF, "_IO_OPENFD_SCTP_PEELOFF"},
1444 {0, NULL}
1447 #define QNX_NTO_SIDE_CHANNEL 0x40000000
1448 #define QNX_NTO_GLOBAL_CHANNEL QNX_NTO_SIDE_CHANNEL
1451 * Perform LWL4 crc check
1453 static bool qnet6_lwl4_check_crc = true;
1456 * in sys/lsm/qnet/qos.h LR is using sockaddr as addr Family:1 means mac
1457 * :2 means interface name
1459 #define QNET_LR_SA_FAMILY_MAC 1
1462 * when dissect_qnet6_lr is called in dissect_qnet6, it has already
1463 * checked whether left length > sizeof(struct qnet6_lr_pkt) so here we
1464 * have to check whether off, len > left length proto_tree_add_subtree and
1465 * proto_tree_add_string's difference are text doesn't need the hf_... so
1466 * it can't be searched.
1468 static int
1469 dissect_qnet6_lr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
1471 #define QNET6_LR_PAIRS 6
1472 proto_item *ti;
1473 proto_tree *stree, *srctree, *dstree, *sstree = NULL;
1474 uint32_t total_len, off, len, rlen;
1475 int lr_start, i, hf_index_off = -1, hf_index_len = -1, hf_index = -1;
1476 uint8_t type;
1477 uint8_t const *p, *name[QNET6_LR_PAIRS];
1479 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QNET_LR");
1482 * now rlen is the length of data behind qnet6_lr_pkt + qnet6_lr_pkt
1484 rlen = tvb_reported_length_remaining(tvb, *poffset + QNX_QNET6_LR_PKT_SIZE);
1486 lr_start = *poffset;
1487 ti = proto_tree_add_item(tree, proto_qnet6_lr, tvb, *poffset, -1, ENC_NA);
1488 stree = proto_item_add_subtree(ti, ett_qnet6_lr);
1491 * version
1493 proto_tree_add_item(stree, hf_qnet6_lr_ver, tvb, (*poffset)++, 1, ENC_BIG_ENDIAN);
1494 (*poffset)++; /* skip spare byte */
1496 * type
1498 type = tvb_get_uint8(tvb, *poffset);
1499 proto_tree_add_item(stree, hf_qnet6_lr_type, tvb, (*poffset)++, 1, ENC_BIG_ENDIAN);
1500 (*poffset)++; /* skip another spare byte */
1503 * total length which includes this header and name payload
1505 total_len = tvb_get_uint32(tvb, *poffset, encoding);
1506 proto_tree_add_uint(stree, hf_qnet6_lr_total_len, tvb, *poffset, 4, total_len);
1507 *poffset += 4;
1509 ti = proto_tree_add_string(stree, hf_qnet6_lr_src, tvb, *poffset, 4 * 6, "source node information");
1510 srctree = proto_item_add_subtree(ti, ett_qnet6_lr_src);
1511 ti = proto_tree_add_string(stree, hf_qnet6_lr_dst, tvb, *poffset + 4 * 6, 4 * 6, "destination node information");
1512 dstree = proto_item_add_subtree(ti, ett_qnet6_lr_dst);
1513 rlen = MIN(rlen, total_len);
1515 for (i = 0; i < QNET6_LR_PAIRS; i++)
1517 if (i < 3)
1518 stree = srctree;
1519 else
1520 stree = dstree;
1522 switch (i)
1524 case 0:
1525 hf_index_off = hf_qnet6_lr_src_name_off;
1526 hf_index_len = hf_qnet6_lr_src_name_len;
1527 hf_index = hf_qnet6_lr_src_name_generated;
1528 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1529 ett_qnet6_lr_src_name_subtree, NULL, "name");
1530 break;
1531 case 1:
1532 hf_index_off = hf_qnet6_lr_src_domain_off;
1533 hf_index_len = hf_qnet6_lr_src_domain_len;
1534 hf_index = hf_qnet6_lr_src_domain_generated;
1535 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1536 ett_qnet6_lr_src_name_subtree, NULL, "domain");
1537 break;
1538 case 2:
1539 hf_index_off = hf_qnet6_lr_src_addr_off;
1540 hf_index_len = hf_qnet6_lr_src_addr_len;
1541 hf_index = hf_qnet6_lr_src_addr_generated;
1542 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1543 ett_qnet6_lr_src_name_subtree, NULL, "address");
1544 break;
1545 case 3:
1546 hf_index_off = hf_qnet6_lr_dst_name_off;
1547 hf_index_len = hf_qnet6_lr_dst_name_len;
1548 hf_index = hf_qnet6_lr_dst_name_generated;
1549 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1550 ett_qnet6_lr_src_name_subtree, NULL, "name");
1551 break;
1552 case 4:
1553 hf_index_off = hf_qnet6_lr_dst_domain_off;
1554 hf_index_len = hf_qnet6_lr_dst_domain_len;
1555 hf_index = hf_qnet6_lr_dst_domain_generated;
1556 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1557 ett_qnet6_lr_src_name_subtree, NULL, "domain");
1558 break;
1559 case 5:
1560 hf_index_off = hf_qnet6_lr_dst_addr_off;
1561 hf_index_len = hf_qnet6_lr_dst_addr_len;
1562 hf_index = hf_qnet6_lr_dst_addr_generated;
1563 sstree = proto_tree_add_subtree(stree, tvb, *poffset, 4 * 2,
1564 ett_qnet6_lr_src_name_subtree, NULL, "address");
1565 break;
1568 off = tvb_get_uint32(tvb, *poffset, encoding);
1569 proto_tree_add_item(sstree, hf_index_off, tvb, *poffset, 4, encoding);
1570 *poffset += 4;
1572 len = tvb_get_uint32(tvb, *poffset, encoding);
1573 proto_tree_add_item(sstree, hf_index_len, tvb, *poffset, 4, encoding);
1574 *poffset += 4;
1576 if ((off <= rlen) && (len <= rlen))
1578 unsigned addr_data_offset = lr_start + off + QNX_QNET6_LR_PKT_SIZE /* sizeof(struct qnet6_lr_pkt) */;
1580 * struct qnet6_lr_pkt is 64 bit aligned
1582 if (i != 2 && i != 5)
1584 name[i] = tvb_get_string_enc(pinfo->pool,
1585 tvb,
1586 addr_data_offset,
1587 len,
1588 ENC_ASCII|ENC_NA);
1589 ti = proto_tree_add_string(sstree, hf_index, tvb, addr_data_offset, len, name[i]);
1590 proto_item_set_generated(ti);
1592 else
1594 if (tvb_get_uint8(tvb, addr_data_offset + 1) == QNET_LR_SA_FAMILY_MAC && len >= 2 + 6)
1596 name[i] = tvb_ether_to_str(pinfo->pool, tvb, addr_data_offset + 2);
1597 ti = proto_tree_add_item(sstree, hf_index, tvb, addr_data_offset + 2, 6, ENC_NA);
1598 proto_item_set_generated(ti);
1600 else
1602 /* The comment above suggests that value '2' means interface
1603 * name, but this was not observed in the provided pcap, so
1604 * let's ignore that possibility for now. */
1605 name[i] = NULL;
1609 else
1611 name[i] = NULL;
1615 switch (type)
1617 case QNET_LR_TYPE_REQUEST:
1618 p = name[2];
1619 if (p)
1621 col_add_fstr(pinfo->cinfo, COL_INFO,
1622 "Who is \"%s.%s\"? Tell \"%s.%s\"@%s",
1623 name[3] ? (const char*)name[3] : "?", name[4] ? (const char*)name[4] : "?",
1624 name[0] ? (const char*)name[0] : "?", name[1] ? (const char*)name[1] : "?",
1627 break;
1628 case QNET_LR_TYPE_REPLY:
1629 p = name[2];
1630 if (p)
1632 col_add_fstr(pinfo->cinfo, COL_INFO,
1633 "To \"%s.%s\", \"%s.%s\" is at %s",
1634 name[3] ? (const char*)name[3] : "?", name[4] ? (const char*)name[4] : "?",
1635 name[0] ? (const char*)name[0] : "?", name[1] ? (const char*)name[1] : "?",
1638 break;
1639 default:
1640 col_set_str(pinfo->cinfo, COL_INFO, "Unknown LR Type");
1643 return *poffset - lr_start;
1646 #define QNX_NR_PING_REQ 0
1647 #define QNX_NR_PING_ANS 1
1648 #define QNX_NR_REMOTE_REQ 2
1649 #define QNX_NR_REMOTE_ANS 3
1650 #define QNX_NR_REMOTE_ERROR 4
1652 static const value_string qnet6_nr_type_vals[] = {
1653 {QNX_NR_PING_REQ, "Network Resolver Ping Request"},
1654 {QNX_NR_PING_ANS, "Network Resolver Ping Reply"},
1655 {QNX_NR_REMOTE_REQ, "Network Resolver Remote Request"},
1656 {QNX_NR_REMOTE_ANS, "Network Resolver Remote Reply"},
1657 {QNX_NR_REMOTE_ERROR, "Network Resolver Remote Error"},
1658 {0, NULL}
1661 #define QNX_NOTIFY_ACTION_TRANARM 0x0
1662 #define QNX_NOTIFY_ACTION_CONDARM 0x1
1663 #define QNX_NOTIFY_ACTION_POLL 0x2
1664 #define QNX_NOTIFY_ACTION_POLLARM 0x3
1665 static const value_string qnet6_kif_msgsend_msg_io_notify_action_vals[] = {
1666 {QNX_NOTIFY_ACTION_TRANARM, "_NOTIFY_ACTION_TRANARM"},
1667 {QNX_NOTIFY_ACTION_CONDARM, "_NOTIFY_ACTION_CONDARM"},
1668 {QNX_NOTIFY_ACTION_POLL, "_NOTIFY_ACTION_POLL"},
1669 {QNX_NOTIFY_ACTION_POLLARM, "_NOTIFY_ACTION_POLLARM"},
1670 {0, NULL}
1674 * NR related header files are in sys/lsm/qnet/nr_msg.h yzhao
1676 static int
1677 dissect_qnet6_nr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
1679 proto_item *ti;
1680 proto_tree *stree;
1681 uint8_t name_len, rlen, type;
1683 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QNET_NR");
1685 ti = proto_tree_add_item(tree, proto_qnet6_nr, tvb, *poffset, -1, ENC_NA);
1686 stree = proto_item_add_subtree(ti, ett_qnet6_nr);
1689 * type
1691 type = tvb_get_uint8(tvb, *poffset);
1692 proto_tree_add_item(stree, hf_qnet6_nr_type, tvb, (*poffset)++, 1, ENC_NA);
1693 switch (type)
1695 case QNX_NR_PING_REQ:
1696 col_set_str(pinfo->cinfo, COL_INFO, "Network Resolver Ping Request");
1697 break;
1698 case QNX_NR_PING_ANS:
1699 col_set_str(pinfo->cinfo, COL_INFO, "Network Resolver Ping Reply");
1701 * ping request/reply there is no further data
1703 break;
1704 case QNX_NR_REMOTE_REQ:
1705 col_set_str(pinfo->cinfo, COL_INFO, "Network Resolver Remote Request");
1706 name_len = tvb_get_uint8(tvb, *poffset);
1707 proto_tree_add_item(stree, hf_qnet6_nr_remote_req_len, tvb, (*poffset)++, 1, ENC_BIG_ENDIAN);
1708 proto_tree_add_item(stree, hf_qnet6_nr_remote_req_id, tvb, *poffset, 2, encoding);
1709 *poffset += 2;
1710 rlen = MIN(name_len, tvb_reported_length_remaining(tvb, *poffset));
1711 proto_tree_add_item(stree, hf_qnet6_nr_remote_req_name, tvb, *poffset, rlen, encoding);
1712 *poffset += rlen;
1713 break;
1714 case QNX_NR_REMOTE_ANS:
1715 col_set_str(pinfo->cinfo, COL_INFO, "Network Resolver Remote Reply");
1716 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_spare, tvb, (*poffset)++, 1, ENC_BIG_ENDIAN);
1717 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_id, tvb, *poffset, 2, encoding);
1718 *poffset += 2;
1719 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_nd, tvb, *poffset, 4, encoding);
1720 *poffset += 4;
1721 break;
1722 case QNX_NR_REMOTE_ERROR:
1723 col_set_str(pinfo->cinfo, COL_INFO, "Network Resolver Remote Error");
1724 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_spare, tvb, (*poffset)++, 1, ENC_BIG_ENDIAN);
1725 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_id, tvb, *poffset, 2, encoding);
1726 *poffset += 2;
1727 proto_tree_add_item(stree, hf_qnet6_nr_remote_rep_status, tvb, *poffset, 4, encoding);
1728 *poffset += 4;
1729 break;
1730 default:
1731 col_set_str(pinfo->cinfo, COL_INFO, "Unknown type");
1732 break;
1735 return 0;
1739 * in Neutrino pid_t is _INT32
1742 * all definitions below are based on QNX Neutrino only supports 32 bits
1743 * now struct qnet6_kif_connect { uint16_t msgtype; uint16_t size; // Size
1744 * of message with cred if sent uint32_t version; // Version of local
1745 * protocol int32_t server_pid; // target process on remote node int32_t
1746 * server_chid; // target channel on remote node int32_t client_id; //
1747 * handle for remote node to use for this connection int32_t client_pid;
1748 * // local process id for remote node to verify }; struct
1749 * qnet6_kif_connect_success { uint16_t msgtype; //
1750 * qnet6_kif_CONNECT_SUCCESS uint16_t size; // Size of message uint32_t
1751 * version; // Version of remote protocol int32_t client_id; // Handle
1752 * passed in qnet6_kif_connect int32_t server_id; // A handle on remote
1753 * node to target messages int32_t scoid; // Remote server's server
1754 * connect id for local information uint32_t nbytes; // Number of bytes to
1755 * limit qnet6_kif_msgsend to };
1757 * struct qnet6_kif_connect_fail { uint16_t msgtype; //
1758 * qnet6_kif_CONNECT_FAIL uint16_t size; // Size of message uint32_t
1759 * version; // Version of remote protocol int32_t client_id; // Handle
1760 * passed in qnet6_kif_connect int32_t status; // errno reason for failure
1761 * };
1763 * struct qnet6_kif_connect_death { uint16_t msgtype; //
1764 * qnet6_kif_CONNECT_DEATH uint16_t size; // Size of message int32_t
1765 * client_id; // Handle passed in qnet6_kif_connect };
1768 * _vtid_info is in sys/neutrino.h
1771 * struct _vtid_info { int32_t tid; int32_t coid; int32_t priority; int32_t
1772 * srcmsglen; int32_t keydata; int32_t srcnd; int32_t dstmsglen; int32_t zero;
1773 * }; struct qnet6_kif_msgsend { uint16_t msgtype; // qnet6_kif_MSGSEND
1774 * uint16_t size; // Size of message without message int32_t server_id; //
1775 * Handle returned in qnet6_kif_connect_success int32_t client_handle; //
1776 * Local handle for this transaction struct _vtid_info vinfo; // Info that
1777 * changes frequently uint32_t nbytes; // number of bytes limited by what
1778 * remote node requested // unsigned char message[]; // Data to be sent
1779 * };
1781 * struct qnet6_kif_msgread { uint16_t msgtype; // qnet6_kif_MSGREAD
1782 * uint16_t size; // Size of message int32_t msgread_handle; // Remote
1783 * handle to msgxfer to int32_t client_handle; // Local handle for this
1784 * transaction uint32_t offset; // Requested offset to read from uint32_t
1785 * nbytes; // Requested size to read };
1787 * struct qnet6_kif_msgwrite { uint16_t msgtype; // MSGWRITE, MSGREPLY,
1788 * MSGERROR, MSGREAD_XFER, MSGREAD_ERROR uint16_t size; // Size of message
1789 * without message int32_t status; // MSGWRITE/MSGREAD_XFER=not used,
1790 * MSGREPLY=status, MSGERROR,MSGREAD_ERROR=errno int32_t handle; // xfer
1791 * handle (msgread_handle or client_handle) uint32_t offset; // Requested
1792 * offset to xfer to uint32_t nbytes; // Requested size to xfer //
1793 * unsigned char message[]; // Data to be sent };
1795 * struct qnet6_kif_unblock { uint16_t msgtype; // qnet6_kif_UNBLOCK
1796 * uint16_t size; // Size of message int32_t server_id; // Handle returned
1797 * in qnet6_kif_connect_success int32_t client_handle; // Local handle to
1798 * match for unblock int tid; // Local threadid to unblock (match to
1799 * vinfo.tid) };
1802 * _pulse is in sys/neutrino.h too
1805 * QNX6 doesn't support 64 bits yet so void* will be 32 bits, and I assume
1806 * the int as 32 bits too(I haven't see int is not 32 bits yet on
1807 * Windows64 and Linux64 so change it to int32_t sizeof(union sigval) will
1808 * change when QNX6 supports 64 bits and you may see 32, 64 bits OSes
1809 * running on different machines with QNX even preference may not help as
1810 * these are application level data.
1813 * union sigval_qnx { int32_t sival_int; void *sival_ptr; }; struct
1814 * sigevent_qnx { int sigev_notify; union { int __sigev_signo; int
1815 * __sigev_coid; int __sigev_id; void (*__sigev_notify_function) (union
1816 * sigval); } __sigev_un1; union sigval_qnx sigev_value; union { struct {
1817 * short __sigev_code; short __sigev_priority; } __st; pthread_attr_t
1818 * *__sigev_notify_attributes; } __sigev_un2;
1820 * };
1822 * struct qnet6_kif_event { uint16_t msgtype; // qnet6_kif_EVENT uint16_t
1823 * size; // Size of message int32_t client_handle; // Local handle to
1824 * deliver event to struct sigevent_qnx event; // Event to be delivered
1825 * };
1827 * struct _pulse { uint16_t type; uint16_t subtype; int8_t code; uint8_t
1828 * reserved[3]; // zero must be union sigval_qnx value; int32_t scoid; };
1829 * struct qnet6_kif_pulse { uint16_t msgtype; // qnet6_kif_PULSE uint16_t
1830 * size; // Size of message int32_t server_id; // Handle returned in
1831 * qnet6_kif_connect_success int32_t client_handle; // Local handle for
1832 * this transaction struct _vtid_info vinfo; // Info that changes
1833 * frequently struct _pulse pulse; // Pulse to deliver to remote int32_t
1834 * priority; // Priority in MsgSendPulse() };
1836 * struct qnet6_kif_signal { uint16_t msgtype; // qnet6_kif_SIGNAL uint16_t
1837 * size; // Size of message int32_t client_handle; // Local handle for
1838 * this transaction int32_t pid; // Signal from this pid (local) int32_t
1839 * tid; // Signal from this tid (local) int32_t signo; // Signal to
1840 * deliver to remote int32_t code; int32_t value; };
1842 * struct qnet6_kif_disconnect { uint16_t msgtype; // qnet6_kif_DISCONNECT
1843 * uint16_t size; // Size of message int32_t server_id; // Handle returned
1844 * in qnet6_kif_connect_success };
1847 static void
1848 display_channel_id(uint32_t chid, proto_item * ti)
1850 if (chid & QNX_NTO_GLOBAL_CHANNEL)
1852 proto_item_append_text(ti, " _NTO_GLOBAL_CHANNEL|%" PRIu32, chid & ~QNX_NTO_GLOBAL_CHANNEL);
1856 static void
1857 display_coid(uint32_t coid, proto_item * ti)
1859 if (coid & QNX_NTO_SIDE_CHANNEL)
1860 { /* side channel */
1861 if ((coid & ~QNX_NTO_SIDE_CHANNEL) == 0)
1862 proto_item_append_text(ti, " SYSMGR_COID)");
1863 else
1864 proto_item_append_text(ti," (_NTO_SIDE_CHANNEL|%" PRIu32 ")", coid & ~QNX_NTO_SIDE_CHANNEL);
1869 * struct qnx_io_devctl { _Uint16t type; _Uint16t combine_len; _Int32t
1870 * dcmd; _Int32t nbytes; _Int32t zero; };
1872 * struct qnx_io_devctl_reply { _Uint32t zero; _Int32t ret_val; _Int32t
1873 * nbytes; _Int32t zero2; }; #define _POSIX_DEVDIR_NONE 0 #define
1874 * _POSIX_DEVDIR_TO 0x80000000 #define _POSIX_DEVDIR_FROM 0x40000000
1875 * #define _POSIX_DEVDIR_TOFROM (_POSIX_DEVDIR_TO | _POSIX_DEVDIR_FROM)
1876 * #define _POSIX_DEVDIR_CMD_MASK 0x0000FFFF
1879 * direction is encoded in command's highest 2 bits and command only uses
1880 * 16 bits please reference QNX' lib/c/public/devctl.h
1883 static int
1884 dissect_qnet6_kif_msgsend_msg(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding);
1886 static void
1887 dissect_qnet6_kif_msgsend_msg_extra(tvbuff_t * tvb, proto_tree * tree, int * poffset, int combine_len, int * left, int clen, const char *data)
1889 int nlen;
1891 nlen = combine_len & ~0x8000;
1893 * combine_len includes the type as well
1895 if (nlen > clen)
1896 { /* there are data behind _io_msg */
1897 nlen -= clen;
1898 if (nlen > *left)
1899 nlen = *left;
1900 if (nlen > 0)
1902 proto_tree_add_string(tree, hf_qnet6_kif_msgsend_extra, tvb, *poffset, nlen, data);
1903 *poffset += nlen;
1904 *left -= nlen;
1910 * struct _msg_info { // _msg_info _server_info _Uint32t nd; // client
1911 * server _Uint32t srcnd; // server n/a pid_t pid; // client server
1912 * _Int32t tid; // thread n/a _Int32t chid; // server server _Int32t
1913 * scoid; // server server _Int32t coid; // client client _Int32t
1914 * msglen; // msg n/a _Int32t srcmsglen; // thread n/a _Int32t
1915 * dstmsglen; // thread n/a _Int16t priority; // thread n/a _Int16t
1916 * flags; // n/a client _Uint32t reserved; };
1918 #define QNX_MSG_INFO_SIZE (12*4)
1919 static int
1920 dissect_qnet6_kif_msgsend_msg_msginfo(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
1922 int ret = -1;
1923 uint32_t chid, coid;
1924 proto_item *ti;
1926 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_nd, tvb, *poffset, 4, encoding);
1927 *poffset += 4;
1928 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_srcnd, tvb, *poffset, 4, encoding);
1929 *poffset += 4;
1930 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_pid, tvb, *poffset, 4, encoding);
1931 *poffset += 4;
1932 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_tid, tvb, *poffset, 4, encoding);
1933 *poffset += 4;
1934 chid = tvb_get_uint32(tvb, *poffset, encoding);
1935 ti = proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_chid, tvb, *poffset, 4, encoding);
1936 display_channel_id(chid, ti);
1937 *poffset += 4;
1938 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_scoid, tvb, *poffset, 4, encoding);
1939 *poffset += 4;
1940 coid = tvb_get_uint32(tvb, *poffset, encoding);
1941 ti = proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_coid, tvb, *poffset, 4, encoding);
1942 display_coid(coid, ti);
1943 *poffset += 4;
1944 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_msglen, tvb, *poffset, 4, encoding);
1945 *poffset += 4;
1946 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_srcmsglen, tvb, *poffset, 4, encoding);
1947 *poffset += 4;
1948 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_dstmsglen, tvb, *poffset, 4, encoding);
1949 *poffset += 4;
1950 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_priority, tvb, *poffset, 2, encoding);
1951 *poffset += 2;
1952 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_flags, tvb, *poffset, 2, encoding);
1953 *poffset += 2;
1954 proto_tree_add_item(tree, hf_qnet6_kif_msg_msginfo_reserved, tvb, *poffset, 4, encoding);
1955 *poffset += 4;
1957 return ret;
1961 // Most of the functions below recurse via dissect_qnet6_kif_msgsend_msg.
1962 // We're guaranteed to run out of packet before we run out of stack, so
1963 // just skip over them.
1964 // NOLINTBEGIN(misc-no-recursion)
1967 * in dissect_qnet6_kif_msgsend_msg already passed the first 2 bytes
1968 * msg->type and when dissect_qnet6_kif_msgsend_msg_devctl is called, it
1969 * is guaranteed that at least there 2+4+4+4 data left
1972 static int
1973 dissect_qnet6_kif_msgsend_msg_devctl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
1975 int ret = -1;
1976 int combine_len, left;
1977 const char *p;
1978 uint32_t dcmd;
1979 static int * const dcmd_fields[] = {
1980 &hf_qnet6_kif_msg_devctl_dcmd_cmd,
1981 &hf_qnet6_kif_msg_devctl_dcmd_class,
1982 &hf_qnet6_kif_msg_devctl_dcmd_ccmd,
1983 &hf_qnet6_kif_msg_devctl_dcmd_size,
1984 &hf_qnet6_kif_msg_devctl_dcmd_from,
1985 &hf_qnet6_kif_msg_devctl_dcmd_to,
1986 NULL
1989 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
1990 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
1991 *poffset += 2;
1992 dcmd = tvb_get_uint32(tvb, *poffset, encoding);
1993 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_devctl_dcmd, ett_qnet6_kif_msg_devctl_dcmd, dcmd_fields, encoding);
1994 *poffset += 4;
1995 proto_tree_add_item(tree, hf_qnet6_kif_msg_devctl_nbytes, tvb, *poffset, 4, encoding);
1996 *poffset += 4;
1997 proto_tree_add_item(tree, hf_qnet6_kif_msg_devctl_zero, tvb, *poffset, 4, encoding);
1998 *poffset += 4;
1999 left = tvb_reported_length_remaining(tvb, *poffset);
2001 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3, "devctl's extra data");
2002 p = try_val_to_str_ext((dcmd & 0x0000ffff), &qnet6_kif_msg_devctl_cmd_class_vals_ext);
2003 if (p)
2004 col_append_fstr(pinfo->cinfo, COL_INFO, " %s", p);
2006 ret = 0;
2008 * how combine_len works? message header1
2009 * (combine_len=COMBINE_LEN_FLAG| sizeof(header1)+ its data size
2010 * message header1's data(optional) message header2
2011 * combine_len=COMBINE_FLAG|sizeof(message header2)+its data size so
2012 * combine_len is the size of its own header+data|COMBINE_FLAG
2015 * if combine_len > sizeof(qnx_io_devctl) then there are other
2016 * messages behind
2018 if (combine_len & 0x8000)
2019 { /* _IO_COMBINE_FLAG is 0x8000 */
2020 if (0 < left)
2022 ret =
2023 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2027 return ret;
2031 * struct qnx_io_read { _Uint16t type; _Uint16t combine_len; _Int32t
2032 * nbytes; _Uint32t xtype; _Uint32t zero; };
2034 * typedef union { struct qnx_io_read i; } io_read_t;
2037 static int
2038 dissect_qnet6_kif_msgsend_msg_read(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2040 int ret = -1;
2041 uint32_t xtypes;
2042 int combine_len, left;
2043 static int * const xtypes_fields[] = {
2044 &hf_qnet6_kif_msg_io_read_xtypes_0_7,
2045 &hf_qnet6_kif_msg_io_read_xtypes_8,
2046 &hf_qnet6_kif_msg_io_read_xtypes_14,
2047 &hf_qnet6_kif_msg_io_read_xtypes_15,
2048 NULL
2051 left = tvb_reported_length_remaining(tvb, *poffset);
2052 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2053 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2054 *poffset += 2;
2055 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_nbytes, tvb, *poffset, 4, encoding);
2056 *poffset += 4;
2057 xtypes = tvb_get_uint32(tvb, *poffset, encoding);
2058 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_read_xtypes, ett_qnet6_kif_msg_read_xtypes, xtypes_fields, encoding);
2059 *poffset += 4;
2060 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 4, ENC_NA);
2061 *poffset += 4;
2064 * if xtypes is not _IO_XTYPE_NONE then after io_read_t it is another
2065 * structure according the xtype&0xff
2067 left -= 2 + 4 * 3;
2068 switch (xtypes & 0xff)
2070 case QNX_IO_XTYPE_OFFSET:
2071 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_xoffset, tvb, *poffset, 8, encoding);
2072 *poffset += 8;
2073 left -= 8;
2074 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3 + 8, "read's extra data");
2075 break;
2076 case QNX_IO_XTYPE_READCOND:
2077 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_min, tvb, *poffset, 4, encoding);
2078 *poffset += 4;
2079 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_time,tvb, *poffset, 4, encoding);
2080 *poffset += 4;
2081 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_timeout, tvb, *poffset, 4, encoding);
2082 *poffset += 4;
2083 left -= 12;
2084 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3 + 12, "read's extra data");
2085 break;
2086 default:
2087 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3, "read's extra data");
2088 break;
2090 ret = 0;
2091 if (combine_len & 0x8000)
2092 { /* _IO_COMBINE_FLAG is 0x8000 */
2093 if (left > 0)
2095 ret =
2096 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2100 return ret;
2104 static int
2105 dissect_qnet6_kif_msgsend_msg_write(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2107 int ret = -1;
2108 uint32_t xtypes;
2109 int combine_len, left;
2110 static int * const xtypes_fields[] = {
2111 &hf_qnet6_kif_msg_io_write_xtypes_0_7,
2112 &hf_qnet6_kif_msg_io_write_xtypes_8,
2113 &hf_qnet6_kif_msg_io_write_xtypes_14,
2114 &hf_qnet6_kif_msg_io_write_xtypes_15,
2115 NULL
2118 left = tvb_reported_length_remaining(tvb, *poffset);
2119 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2120 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2121 *poffset += 2;
2122 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_write_nbytes, tvb, *poffset, 4, encoding);
2123 *poffset += 4;
2124 xtypes = tvb_get_uint32(tvb, *poffset, encoding);
2125 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_write_xtypes, ett_qnet6_kif_msg_write_xtypes, xtypes_fields, encoding);
2126 *poffset += 4;
2127 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 4, ENC_NA);
2128 *poffset += 4;
2131 * if xtypes is not _IO_XTYPE_NONE then after io_read_t it is another
2132 * structure according the xtype&0xff
2134 left -= 2 + 4 * 3;
2135 switch (xtypes & 0xff)
2137 case QNX_IO_XTYPE_OFFSET:
2138 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_write_xoffset, tvb, *poffset, 8, encoding);
2139 *poffset += 8;
2140 left -= 8;
2141 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3 + 8, "write's extra data");
2142 break;
2143 case QNX_IO_XTYPE_READCOND:
2144 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_min, tvb, *poffset, 4, encoding);
2145 *poffset += 4;
2146 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_time, tvb, *poffset, 4, encoding);
2147 *poffset += 4;
2148 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_read_cond_timeout, tvb, *poffset, 4, encoding);
2149 *poffset += 4;
2150 left -= 12;
2151 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3 + 12, "write's extra data");
2152 break;
2153 default:
2154 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3, "write's extra data");
2155 break;
2158 ret = 0;
2159 if (combine_len & 0x8000)
2160 { /* _IO_COMBINE_FLAG is 0x8000 */
2161 if (left > 0)
2163 ret =
2164 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2167 else
2169 if (left > 0)
2170 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_write_data, tvb, *poffset, left, ENC_NA);
2173 return ret;
2178 *struct qnx_io_lseek {
2179 _Uint16t type;
2180 _Uint16t combine_len;
2181 short whence;
2182 _Uint16t zero;
2183 _Uint64t offset;
2186 typedef union {
2187 struct qnx_io_lseek i;
2188 _Uint64t o;
2189 } io_lseek_t;
2191 static int
2192 dissect_qnet6_kif_msgsend_msg_seek(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2194 int ret = -1;
2195 int combine_len, left;
2197 left = tvb_reported_length_remaining(tvb, *poffset);
2198 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2199 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2200 *poffset += 2;
2201 proto_tree_add_item(tree, hf_qnet6_kif_msg_seek_whence, tvb, *poffset, 2, encoding);
2202 *poffset += 2;
2204 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 2, ENC_NA);
2205 *poffset += 2;
2206 proto_tree_add_item(tree, hf_qnet6_kif_msg_seek_offset, tvb, *poffset, 8, encoding);
2207 *poffset += 8;
2208 left -= 2 + 2 + 2 + 8;
2209 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 2 + 2 + 8, "seek's extra data");
2211 ret = 0;
2212 if (combine_len & 0x8000)
2213 { /* _IO_COMBINE_FLAG is 0x8000 */
2214 if (left > 0)
2216 ret =
2217 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2221 return ret;
2226 *struct qnx_io_pathconf {
2227 _Uint16t type;
2228 _Uint16t combine_len;
2229 short name;
2230 _Uint16t zero;
2233 typedef union {
2234 struct qnx_io_pathconf i;
2235 } io_pathconf_t;
2237 static int
2238 dissect_qnet6_kif_msgsend_msg_pathconf(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2240 int ret = -1;
2241 int combine_len, left;
2243 left = tvb_reported_length_remaining(tvb, *poffset);
2244 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2245 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2246 *poffset += 2;
2247 proto_tree_add_item(tree, hf_qnet6_kif_msg_pathconf_name, tvb, *poffset, 2, encoding);
2248 *poffset += 2;
2249 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 2, ENC_NA);
2250 *poffset += 2;
2252 left -= 2 + 4;
2253 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4, "pathconf's extra data");
2255 ret = 0;
2256 if (combine_len & 0x8000)
2257 { /* _IO_COMBINE_FLAG is 0x8000 */
2258 if (left > 0)
2260 ret =
2261 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2265 return ret;
2270 *struct _io_chmod {
2271 * _Uint16t type;
2272 * _Uint16t combine_len;
2273 * mode_t mode;
2276 *typedef union {
2277 * struct _io_chmod i;
2278 *} io_chmod_t;
2281 static int
2282 dissect_qnet6_kif_msgsend_msg_chmod(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2284 int ret = -1;
2285 int combine_len, left;
2286 static int * const chmod_fields[] = {
2287 &hf_qnet6_kif_msg_io_chmod_other_exe,
2288 &hf_qnet6_kif_msg_io_chmod_other_write,
2289 &hf_qnet6_kif_msg_io_chmod_other_read,
2290 &hf_qnet6_kif_msg_io_chmod_group_exe,
2291 &hf_qnet6_kif_msg_io_chmod_group_write,
2292 &hf_qnet6_kif_msg_io_chmod_group_read,
2293 &hf_qnet6_kif_msg_io_chmod_owner_exe,
2294 &hf_qnet6_kif_msg_io_chmod_owner_write,
2295 &hf_qnet6_kif_msg_io_chmod_owner_read,
2296 &hf_qnet6_kif_msg_io_chmod_sticky,
2297 &hf_qnet6_kif_msg_io_chmod_setgid,
2298 &hf_qnet6_kif_msg_io_chmod_setuid,
2299 NULL
2302 left = tvb_reported_length_remaining(tvb, *poffset);
2303 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2304 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2305 *poffset += 2;
2306 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_chmod, ett_qnet6_kif_chmod_mode, chmod_fields, encoding);
2307 *poffset += 4;
2309 left -= 2 + 4;
2310 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4, "chmod's extra data");
2312 ret = 0;
2313 if (combine_len & 0x8000)
2314 { /* _IO_COMBINE_FLAG is 0x8000 */
2315 if (left > 0)
2317 ret =
2318 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2322 return ret;
2327 * struct qnx_io_fdinfo { _Uint16t type; _Uint16t combine_len; _Uint32t
2328 * flags; _Int32t path_len; _Uint32t reserved; };
2330 * struct _io_fdinfo_reply { _Uint32t zero[2]; struct _fdinfo info; //char
2331 * path[path_len + 1]; }; according to lib/c/qnx/iofdinfo.c: client ->
2332 * server a io_fdinfo message is sent out, if client requests path then
2333 * path_len !=0 server -> client a fdinfo_reply replied. client is using 3
2334 * iov to receive reply: 1.msg.o.zero 2.msg.o.info 3.path buffer in
2335 * iofunc_fdinfo_default it will memset the first 2 uint32. How do I know
2336 * it is a corresponding reply?
2338 static int
2339 dissect_qnet6_kif_msgsend_msg_fdinfo(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2341 int ret = -1;
2342 int combine_len, left;
2344 left = tvb_reported_length_remaining(tvb, *poffset);
2345 if (left < 2 + 4 + 4 + 4)
2346 return ret;
2348 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2349 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2350 *poffset += 2;
2351 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_fdinfo_flags, tvb, *poffset, 4, encoding);
2352 *poffset += 4;
2353 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_fdinfo_path_len, tvb, *poffset, 4, encoding);
2354 *poffset += 4;
2355 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_fdinfo_reserved, tvb, *poffset, 4, encoding);
2356 *poffset += 4;
2358 left -= 2 + 4 * 3;
2359 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3, "fdinfo's extra data");
2360 ret = 0;
2361 if (combine_len & 0x8000)
2362 { /* _IO_COMBINE_FLAG is 0x8000 */
2363 if (left > 0)
2365 ret =
2366 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2370 return ret;
2375 * struct _io_lock { _Uint16t type; _Uint16t combine_len; _Uint32t
2376 * subtype; _Int32t nbytes; //char data[1]; };
2378 * struct _io_lock_reply { _Uint32t zero[3];
2380 * };
2383 static int
2384 dissect_qnet6_kif_msgsend_msg_lock(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2386 int ret = -1;
2387 int combine_len, left;
2389 left = tvb_reported_length_remaining(tvb, *poffset);
2391 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2392 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2393 *poffset += 2;
2394 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_lock_subtype, tvb, *poffset, 4, encoding);
2395 *poffset += 4;
2396 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_lock_nbytes, tvb, *poffset, 4, encoding);
2397 *poffset += 4;
2399 left -= 2 + 4 + 4;
2400 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 + 4, "lock's extra data");
2402 ret = 0;
2403 if (combine_len & 0x8000)
2404 { /* _IO_COMBINE_FLAG is 0x8000 */
2405 if (left > 0)
2407 ret =
2408 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2412 return ret;
2416 static int
2417 dissect_qnet6_kif_msgsend_msg_space(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2419 int ret = -1;
2420 int combine_len, left;
2422 left = tvb_reported_length_remaining(tvb, *poffset);
2424 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2425 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2426 *poffset += 2;
2427 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_space_subtype, tvb, *poffset, 2, encoding);
2428 *poffset += 2;
2429 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_space_whence, tvb, *poffset, 2, encoding);
2430 *poffset += 2;
2431 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_space_start, tvb, *poffset, 8, encoding);
2432 *poffset += 8;
2433 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_space_len, tvb, *poffset, 8, encoding);
2434 *poffset += 8;
2436 left -= 2 * 3 + 8 * 2;
2437 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 * 4 + 8 * 2, "space's extra data");
2439 ret = 0;
2440 if (combine_len & 0x8000)
2441 { /* _IO_COMBINE_FLAG is 0x8000 */
2442 if (left > 0)
2444 ret =
2445 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2449 return ret;
2453 static int
2454 dissect_qnet6_kif_msgsend_msg_chown(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2456 int ret = -1;
2457 int combine_len, left;
2459 left = tvb_reported_length_remaining(tvb, *poffset);
2461 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2462 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2463 *poffset += 2;
2464 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_chown_gid, tvb, *poffset, 4, encoding);
2465 *poffset += 4;
2466 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_chown_uid, tvb, *poffset, 4, encoding);
2467 *poffset += 4;
2469 left -= 2 + 4 + 4;
2470 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 + 4, "chown's extra data");
2472 ret = 0;
2473 if (combine_len & 0x8000)
2474 { /* _IO_COMBINE_FLAG is 0x8000 */
2475 if (left > 0)
2477 ret =
2478 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2482 return ret;
2487 * struct qnx_io_utime { _Uint16t type; _Uint16t combine_len; _Int32t
2488 * cur_flag; If set, ignore times and set to "now" struct utimbuf times;
2489 * };
2491 * in lib/c/public/utime.h struct utimbuf { time_t actime; time_t modtime;
2492 * };
2494 static int
2495 dissect_qnet6_kif_msgsend_msg_utime(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2497 int ret = -1;
2498 int combine_len, left;
2500 left = tvb_reported_length_remaining(tvb, *poffset);
2502 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2503 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2504 *poffset += 2;
2505 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_curflag, tvb, *poffset, 4, encoding);
2506 *poffset += 4;
2507 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_actime,
2508 tvb, *poffset, 4, ENC_TIME_SECS|encoding);
2509 *poffset += 4;
2510 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_utime_modtime,
2511 tvb, *poffset, 4, ENC_TIME_SECS|encoding);
2512 *poffset += 4;
2514 left -= 2 + 4 + 4 + 4;
2515 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 3, "utime's data");
2517 ret = 0;
2518 if (combine_len & 0x8000)
2519 { /* _IO_COMBINE_FLAG is 0x8000 */
2520 if (left > 0)
2522 ret =
2523 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2527 return ret;
2531 static int
2532 dissect_qnet6_kif_msgsend_msg_sync(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2534 int ret = -1;
2535 int combine_len, left;
2536 static int * const sync_fields[] = {
2537 &hf_qnet6_kif_msg_syncflag_dsync,
2538 &hf_qnet6_kif_msg_syncflag_sync,
2539 &hf_qnet6_kif_msg_syncflag_rsync,
2540 NULL
2543 left = tvb_reported_length_remaining(tvb, *poffset);
2545 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2546 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2547 *poffset += 2;
2548 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_sync, ett_qnet6_kif_msg_sync, sync_fields, encoding);
2549 *poffset += 4;
2551 left -= 2 + 4;
2552 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4, "sync's extra data");
2554 ret = 0;
2555 if (combine_len & 0x8000)
2556 { /* _IO_COMBINE_FLAG is 0x8000 */
2557 if (left > 0)
2559 ret =
2560 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2564 return ret;
2568 static int
2569 dissect_qnet6_kif_msgsend_msg_close(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2571 int ret = -1;
2572 int combine_len, left;
2574 left = tvb_reported_length_remaining(tvb, *poffset);
2576 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2577 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2578 *poffset += 2;
2580 left -= 2;
2581 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2, "close's extra data");
2582 ret = 0;
2583 if (combine_len & 0x8000)
2584 { /* _IO_COMBINE_FLAG is 0x8000 */
2585 if (left > 0)
2587 ret =
2588 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2592 return ret;
2596 static int
2597 dissect_qnet6_kif_msgsend_msg_stat(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
2599 int ret = -1;
2600 int combine_len, left;
2602 left = tvb_reported_length_remaining(tvb, *poffset);
2604 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2605 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2606 *poffset += 2;
2607 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 4, ENC_NA);
2608 *poffset += 4;
2610 left -= 2 + 4;
2611 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4, "stat's extra data");
2613 ret = 0;
2614 if (combine_len & 0x8000)
2615 { /* _IO_COMBINE_FLAG is 0x8000 */
2616 if (left > 0)
2618 ret =
2619 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2623 return ret;
2627 static int
2628 dissect_qnet6_kif_msgsend_msg_shutdown(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2630 int ret = -1;
2631 int combine_len, left;
2633 left = tvb_reported_length_remaining(tvb, *poffset);
2634 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2635 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2636 *poffset += 2;
2638 left -= 2;
2639 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2, "shutdown's extra data");
2641 ret = 0;
2642 if (combine_len & 0x8000)
2643 { /* _IO_COMBINE_FLAG is 0x8000 */
2644 if (left > 0)
2646 ret =
2647 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2651 return ret;
2655 static int
2656 dissect_qnet6_kif_msgsend_msg_openfd(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2658 int ret = -1;
2659 int combine_len, left;
2660 proto_tree *stree;
2661 static int * const openfd_ioflag_fields[] = {
2662 &hf_qnet6_kif_msg_openfd_ioflag_access,
2663 &hf_qnet6_kif_msg_openfd_ioflag_append,
2664 &hf_qnet6_kif_msg_openfd_ioflag_dsync,
2665 &hf_qnet6_kif_msg_openfd_ioflag_sync,
2666 &hf_qnet6_kif_msg_openfd_ioflag_rsync,
2667 &hf_qnet6_kif_msg_openfd_ioflag_nonblock,
2668 &hf_qnet6_kif_msg_openfd_ioflag_creat,
2669 &hf_qnet6_kif_msg_openfd_ioflag_truncate,
2670 &hf_qnet6_kif_msg_openfd_ioflag_exclusive,
2671 &hf_qnet6_kif_msg_openfd_ioflag_noctrltty,
2672 &hf_qnet6_kif_msg_openfd_ioflag_closexec,
2673 &hf_qnet6_kif_msg_openfd_ioflag_realids,
2674 &hf_qnet6_kif_msg_openfd_ioflag_largefile,
2675 &hf_qnet6_kif_msg_openfd_ioflag_async,
2676 NULL
2679 left = tvb_reported_length_remaining(tvb, *poffset);
2680 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2681 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2682 *poffset += 2;
2683 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_openfd_ioflag, ett_qnet6_kif_msg_openfd_ioflag, openfd_ioflag_fields, encoding);
2684 *poffset += 4;
2685 proto_tree_add_item(tree, hf_qnet6_kif_msg_openfd_sflag, tvb, *poffset, 2, encoding);
2686 *poffset += 2;
2687 proto_tree_add_item(tree, hf_qnet6_kif_msg_openfd_xtype, tvb, *poffset, 2, encoding);
2688 *poffset += 2;
2691 stree = proto_tree_add_subtree(tree, tvb, *poffset, QNX_MSG_INFO_SIZE, ett_qnet6_kif_msg_msginfo, NULL, "MsgInfo");
2694 * dissect msg_info
2696 dissect_qnet6_kif_msgsend_msg_msginfo(tvb, pinfo, stree, poffset, encoding);
2698 proto_tree_add_item(tree, hf_qnet6_kif_msg_openfd_reserved, tvb, *poffset, 4, encoding);
2699 *poffset += 4;
2700 proto_tree_add_item(tree, hf_qnet6_kif_msg_openfd_key, tvb, *poffset, 4, encoding);
2701 *poffset += 4;
2703 left -= 2 + 4 + 2 * 2 + QNX_MSG_INFO_SIZE + 4 * 2;
2704 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 + 2 * 2 + QNX_MSG_INFO_SIZE + 4 * 2, "openfd's extra data");
2706 ret = 0;
2707 if (combine_len & 0x8000)
2708 { /* _IO_COMBINE_FLAG is 0x8000 */
2709 if (left > 0)
2711 ret =
2712 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2716 return ret;
2720 static int
2721 dissect_qnet6_kif_msgsend_msg_mmap(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2723 int ret = -1;
2724 int combine_len, left;
2725 proto_tree *stree;
2726 static int * const prot_fields[] = {
2727 &hf_qnet6_kif_msg_io_mmap_prot_read,
2728 &hf_qnet6_kif_msg_io_mmap_prot_write,
2729 &hf_qnet6_kif_msg_io_mmap_prot_exec,
2730 NULL
2733 left = tvb_reported_length_remaining(tvb, *poffset);
2735 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2736 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2737 *poffset += 2;
2738 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_mmap_prot, ett_qnet6_kif_msg_prot, prot_fields, encoding);
2739 *poffset += 4;
2740 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_mmap_offset, tvb, *poffset, 8, encoding);
2741 *poffset += 8;
2742 stree = proto_tree_add_subtree(tree, tvb, *poffset, QNX_MSG_INFO_SIZE, ett_qnet6_kif_msg_msginfo, NULL, "MsgInfo");
2744 * dissect msg_info
2746 dissect_qnet6_kif_msgsend_msg_msginfo(tvb, pinfo, stree, poffset, encoding);
2748 proto_tree_add_item(tree, hf_qnet6_kif_zero, tvb, *poffset, 4 * 6, ENC_NA);
2749 *poffset += 4 * 6;
2751 left -= 2 + 4 + 8 + 4 * 6 + QNX_MSG_INFO_SIZE;
2752 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 + 8 + 4 * 6 + QNX_MSG_INFO_SIZE, "mmap's extra data");
2754 ret = 0;
2755 if (combine_len & 0x8000)
2756 { /* _IO_COMBINE_FLAG is 0x8000 */
2757 if (left > 0)
2759 ret =
2760 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2764 return ret;
2768 static int
2769 dissect_qnet6_kif_msgsend_msg_iomsg(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2771 int ret = -1;
2772 int combine_len, left;
2774 left = tvb_reported_length_remaining(tvb, *poffset);
2776 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2777 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2778 *poffset += 2;
2779 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_msg_mgrid, tvb, *poffset, 2, encoding);
2780 *poffset += 2;
2781 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_msg_subtype, tvb, *poffset, 2, encoding);
2782 *poffset += 2;
2784 left -= 2 * 3;
2786 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 * 3, "io_msg's data");
2788 ret = 0;
2789 if (combine_len & 0x8000)
2790 { /* _IO_COMBINE_FLAG is 0x8000 */
2791 if (left > 0)
2793 ret =
2794 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2798 return ret;
2803 * struct qnx_io_notify { _Uint16t type; _Uint16t combine_len; _Int32t
2804 * action; _Int32t flags; struct sigevent_qnx event;
2806 * // Following fields only valid if (flags & _NOTIFY_COND_EXTEN) _Int32t
2807 * mgr[2]; // For use by manager _Int32t flags_extra_mask; _Int32t
2808 * flags_exten; _Int32t nfds; _Int32t fd_first; _Int32t nfds_ready;
2809 * _Int64t timo; // struct pollfd fds[nfds]; }; struct pollfd { int fd;
2810 * //file descriptor short events; //events to look for short revents; //
2811 * events returned };
2814 static const uint8_t *qnet6_kif_msg_io_notify_event_str[] = {
2815 "read ", "write ", "rdband "
2818 static int
2819 dissect_qnet6_kif_msgsend_msg_notify(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2821 int ret = -1;
2822 int combine_len, left, fd;
2823 uint16_t event, revent;
2824 proto_tree *stree;
2825 nstime_t nt;
2826 uint64_t timo;
2827 uint32_t nfds, i, j, n, m;
2828 uint8_t sevent[20], srevent[20]; /* enough to fit "read,write,rdband" */
2829 static int * const notify_flags_fields[] = {
2830 &hf_qnet6_kif_msg_io_notify_flags_28,
2831 &hf_qnet6_kif_msg_io_notify_flags_29,
2832 &hf_qnet6_kif_msg_io_notify_flags_30,
2833 &hf_qnet6_kif_msg_io_notify_flags_31,
2834 NULL
2837 left = tvb_reported_length_remaining(tvb, *poffset);
2839 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2840 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2841 *poffset += 2;
2842 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_action, tvb, *poffset, 4, encoding);
2843 *poffset += 4;
2844 proto_tree_add_bitmask(tree, tvb, *poffset, hf_qnet6_kif_msg_io_notify_flags, ett_qnet6_kif_msg_notify_flags, notify_flags_fields, encoding);
2845 *poffset += 4;
2847 * sigevent
2849 stree = proto_tree_add_subtree(tree, tvb, *poffset, 4 * 4, ett_qnet6_kif_event, NULL, "sigevent");
2851 *poffset += sizeof(struct sigevent_qnx); */
2853 proto_tree_add_item(stree, hf_qnet6_kif_event_notify, tvb, *poffset, 4, encoding);
2854 *poffset += 4;
2855 proto_tree_add_item(stree, hf_qnet6_kif_event_union1, tvb, *poffset, 4, encoding);
2856 *poffset += 4;
2857 proto_tree_add_item(stree, hf_qnet6_kif_event_value, tvb, *poffset, 4, encoding);
2858 *poffset += 4;
2859 proto_tree_add_item(stree, hf_qnet6_kif_event_union2, tvb, *poffset, 4, encoding);
2860 *poffset += 4;
2862 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_mgr, tvb, *poffset, 8, encoding);
2863 *poffset += 8;
2864 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_flags_extra_mask, tvb, *poffset, 4, encoding);
2865 *poffset += 4;
2866 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_flags_exten, tvb, *poffset, 4, encoding);
2867 *poffset += 4;
2868 nfds = tvb_get_uint32(tvb, *poffset, encoding);
2869 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_nfds, tvb, *poffset, 4, encoding);
2870 *poffset += 4;
2871 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_fd_first, tvb, *poffset, 4, encoding);
2872 *poffset += 4;
2873 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_notify_nfds_ready, tvb, *poffset, 4, encoding);
2874 *poffset += 4;
2876 timo = tvb_get_uint64(tvb, *poffset, encoding);
2877 if (timo != 0)
2879 if (timo > 1000000000)
2881 nt.secs = (int)(timo / 1000000000);
2882 nt.nsecs = (int)(timo - nt.secs * 1000000000);
2884 else
2886 nt.secs = 0;
2887 nt.nsecs = (int)timo;
2890 else
2892 nt.nsecs = 0;
2893 nt.secs = 0;
2895 proto_tree_add_time(tree, hf_qnet6_kif_msg_io_notify_timo, tvb, *poffset, 8, &nt);
2896 *poffset += 8;
2898 left -= 2 + 4 * 2 + 4 * 4 + 4 * 7 + 8;
2900 * handle pollfd fds[nfds]
2902 if ((uint32_t) left >= nfds * 8)
2903 { /* each pollfd size is 8 */
2904 stree = proto_tree_add_subtree(tree, tvb, *poffset, nfds * 8, ett_qnet6_kif_msg_notify_fds, NULL, "Poll file descriptors array");
2905 for (i = 0; i < nfds; i++)
2907 fd = tvb_get_uint32(tvb, *poffset, encoding);
2908 event = tvb_get_uint16(tvb, *poffset + 4, encoding);
2909 revent = tvb_get_uint16(tvb, *poffset + 4 + 2, encoding);
2910 sevent[0] = srevent[0] = 0;
2911 for (j = n = m = 0; j < 3; j++)
2913 if (event & (1<<j))
2914 n += snprintf(sevent + n, sizeof(sevent) - n, "%s", qnet6_kif_msg_io_notify_event_str[j]);
2915 if (revent & (1<<j))
2916 m += snprintf(srevent + m, sizeof(srevent) - m, "%s", qnet6_kif_msg_io_notify_event_str[j]);
2918 proto_tree_add_string_format_value(stree, hf_qnet6_kif_msg_io_notify_fds, tvb, *poffset, 8, NULL, "fd:%" PRId32 " " "event:0x%x %s" "revent:0x%x %s", fd, event, sevent, revent, srevent);
2919 *poffset += 8;
2921 left -= nfds * 8;
2922 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + 4 * 2 + 4 * 4 + 4 * 7 + 8 + nfds * 8, "notify's extra data");
2925 else
2926 return ret;
2928 ret = 0;
2929 if (combine_len & 0x8000)
2930 { /* _IO_COMBINE_FLAG is 0x8000 */
2931 if (left > 0)
2934 * there is io_notify's data behind _io_notify_t in
2935 * lib/c/xopen/poll.c msg.i.combine_len = sizeof(msg.i) so in
2936 * theory we should not see combine_len > sizeof(msg.i) fds
2937 * array should be behind _io_notify_t for example: fds[100]
2938 * nfds=100, fd_first=0, fd_ to server1: server1 may cut it
2939 * from the end to server2: fds[98] nfds=98, fd_first=xxx any
2940 * server can only cut from the end as iov[1].base is always
2941 * fds it didn't set these length to combine_len:(
2943 ret = dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2947 return ret;
2951 static int
2952 dissect_qnet6_kif_msgsend_msg_dup(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
2954 int ret = -1;
2955 int combine_len, left;
2956 proto_tree *stree;
2958 left = tvb_reported_length_remaining(tvb, *poffset);
2959 combine_len = tvb_get_uint16(tvb, *poffset, encoding);
2960 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_combine_len, tvb, *poffset, 2, encoding);
2961 *poffset += 2;
2962 stree = proto_tree_add_subtree(tree, tvb, *poffset, QNX_MSG_INFO_SIZE, ett_qnet6_kif_msg_msginfo, NULL, "MsgInfo");
2964 dissect_qnet6_kif_msgsend_msg_msginfo(tvb, pinfo, stree, poffset, encoding);
2966 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_dup_reserved, tvb, *poffset, 4, encoding);
2967 *poffset += 4;
2968 proto_tree_add_item(tree, hf_qnet6_kif_msg_io_dup_key, tvb, *poffset, 4, encoding);
2969 *poffset += 4;
2971 left -= 2 + QNX_MSG_INFO_SIZE + 4 * 2;
2972 dissect_qnet6_kif_msgsend_msg_extra(tvb, tree, poffset, combine_len, &left, 2 + 2 + QNX_MSG_INFO_SIZE + 4 * 2, "dup's extra data");
2974 ret = 0;
2975 if (combine_len & 0x8000)
2976 { /* _IO_COMBINE_FLAG is 0x8000 */
2977 if (left > 0)
2979 ret =
2980 dissect_qnet6_kif_msgsend_msg(tvb, pinfo, tree, poffset, encoding);
2984 return ret;
2988 static int
2989 dissect_qnet6_kif_msgsend_msg(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
2991 proto_item *ti;
2992 proto_tree *stree;
2993 uint16_t msgtype, subtype, path_len, extra_len, extra_pad;
2994 const char *msgstr;
2995 uint8_t extra_type;
2996 int rlen, head_len;
2997 int ret = -1;
2998 static int * const ioflag_fields[] = {
2999 &hf_qnet6_kif_msg_connect_ioflag_access,
3000 &hf_qnet6_kif_msg_connect_ioflag_append,
3001 &hf_qnet6_kif_msg_connect_ioflag_dsync,
3002 &hf_qnet6_kif_msg_connect_ioflag_sync,
3003 &hf_qnet6_kif_msg_connect_ioflag_rsync,
3004 &hf_qnet6_kif_msg_connect_ioflag_nonblock,
3005 &hf_qnet6_kif_msg_connect_ioflag_creat,
3006 &hf_qnet6_kif_msg_connect_ioflag_truncate,
3007 &hf_qnet6_kif_msg_connect_ioflag_exclusive,
3008 &hf_qnet6_kif_msg_connect_ioflag_noctrltty,
3009 &hf_qnet6_kif_msg_connect_ioflag_closexec,
3010 &hf_qnet6_kif_msg_connect_ioflag_realids,
3011 &hf_qnet6_kif_msg_connect_ioflag_largefile,
3012 &hf_qnet6_kif_msg_connect_ioflag_async,
3013 NULL
3015 static int * const mode_fields[] = {
3016 &hf_qnet6_kif_msg_connect_mode_other_exe,
3017 &hf_qnet6_kif_msg_connect_mode_other_write,
3018 &hf_qnet6_kif_msg_connect_mode_other_read,
3019 &hf_qnet6_kif_msg_connect_mode_group_exe,
3020 &hf_qnet6_kif_msg_connect_mode_group_write,
3021 &hf_qnet6_kif_msg_connect_mode_group_read,
3022 &hf_qnet6_kif_msg_connect_mode_owner_exe,
3023 &hf_qnet6_kif_msg_connect_mode_owner_write,
3024 &hf_qnet6_kif_msg_connect_mode_owner_read,
3025 &hf_qnet6_kif_msg_connect_mode_sticky,
3026 &hf_qnet6_kif_msg_connect_mode_setgid,
3027 &hf_qnet6_kif_msg_connect_mode_setuid,
3028 &hf_qnet6_kif_msg_connect_mode_format,
3029 NULL
3031 static int * const eflag_fields[] = {
3032 &hf_qnet6_kif_msg_connect_eflag_dir,
3033 &hf_qnet6_kif_msg_connect_eflag_dot,
3034 &hf_qnet6_kif_msg_connect_eflag_dotdot,
3035 NULL
3038 rlen = tvb_reported_length_remaining(tvb, *poffset);
3040 ti = proto_tree_add_string(tree, hf_qnet6_kif_msg, tvb, *poffset, -1, "upper layer message(QNX6 message passing)");
3041 stree = proto_item_add_subtree(ti, ett_qnet6_kif_msg);
3043 msgtype = tvb_get_uint16(tvb, *poffset, encoding);
3044 proto_tree_add_item(stree, hf_qnet6_kif_msg_type, tvb, *poffset, 2, encoding);
3045 *poffset += 2;
3046 msgstr = try_val_to_str_ext(msgtype, &qnet6_kif_msgsend_msgtype_vals_ext);
3047 if (msgstr != NULL)
3049 col_append_fstr(pinfo->cinfo, COL_INFO, " %s", msgstr);
3050 proto_item_set_text(ti, "%s", msgstr);
3052 rlen -= 2;
3054 switch (msgtype)
3056 case QNX_IO_CONNECT:
3057 if (rlen < 2) /* there is no subtype */
3058 return ret;
3060 head_len = 2 + 2 + 4 + 2 * 2 + 4 * 4 + 2 * 4 + 1 * 2 + 2;
3061 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_subtype,tvb, *poffset, 2, encoding);
3062 subtype = tvb_get_uint16(tvb, *poffset, encoding);
3063 *poffset += 2;
3064 rlen -= 2;
3065 if (head_len - 2 - 2 > rlen) /* there is no rest of io_connect */
3066 return ret;
3067 rlen -=(head_len - 2 - 2);
3069 * file type is 1, 2, 3, 4,.... so it is value_strings
3071 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_filetype,tvb, *poffset, 4, encoding);
3072 *poffset += 4;
3073 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_replymax, tvb, *poffset, 2, encoding);
3074 *poffset += 2;
3075 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_entrymax, tvb, *poffset, 2, encoding);
3076 *poffset += 2;
3077 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_key, tvb, *poffset, 4, encoding);
3078 *poffset += 4;
3079 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_handle, tvb, *poffset, 4, encoding);
3080 *poffset += 4;
3082 proto_tree_add_bitmask(stree, tvb, *poffset, hf_qnet6_kif_msg_connect_ioflag, ett_qnet6_kif_msg_ioflag, ioflag_fields, encoding);
3084 *poffset += 4;
3085 proto_tree_add_bitmask(stree, tvb, *poffset, hf_qnet6_kif_msg_connect_mode, ett_qnet6_kif_msg_mode, mode_fields, encoding);
3086 *poffset += 4;
3087 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_sflag, tvb, *poffset, 2, encoding);
3088 *poffset += 2;
3089 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_access, tvb, *poffset, 2, encoding);
3090 *poffset += 2;
3091 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_zero, tvb, *poffset, 2, encoding);
3092 *poffset += 2;
3093 path_len = tvb_get_uint16(tvb, *poffset, encoding);
3094 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_pathlen, tvb, *poffset, 2, encoding);
3095 *poffset += 2;
3096 proto_tree_add_bitmask(stree, tvb, *poffset, hf_qnet6_kif_msg_connect_eflag, ett_qnet6_kif_msg_eflag, eflag_fields, encoding);
3097 *poffset += 1;
3098 extra_type = tvb_get_uint8(tvb, *poffset);
3099 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extratype, tvb, *poffset, 1, encoding);
3100 *poffset += 1;
3101 extra_len = tvb_get_uint16(tvb, *poffset, encoding);
3102 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extralen, tvb, *poffset, 2, encoding);
3103 *poffset += 2;
3104 if (path_len > rlen)
3105 path_len = rlen;
3107 * after extra_len is path_len=strlen(path)+1(path,null),
3108 * extra_len
3110 if (path_len > 0)
3112 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_path, tvb, *poffset, path_len, ENC_ASCII);
3113 *poffset += path_len;
3114 rlen -= path_len;
3116 col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(subtype,
3117 qnet6_kif_msgsend_msg_connect_subtype_vals, "Unknown"));
3119 if (extra_len > 0 && rlen > 0)
3122 * extra data is QNX_MSG_ALIGN which is 8 default is there
3125 if ((path_len + head_len) &(8 - 1))
3127 extra_pad =(8 -((path_len + head_len) &(8 - 1)));
3128 if (extra_pad > rlen)
3129 extra_pad = rlen;
3130 if (extra_pad > 0)
3132 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_pad_data, tvb, *poffset, extra_pad, ENC_NA);
3133 *poffset += extra_pad;
3134 rlen -= extra_pad;
3138 * COMBINE_CLOSE and COMBINE are used when it is _IO_CONNECT
3139 * it will have an additional io message in extra difference
3140 * in COMBINE_CLOSE and COMBINE is resource manager will call
3141 * close handler if it is COMBINE_CLOSE for use there is no
3142 * difference. yzhao I haven't see any app supports COMBINE
3143 * and support !EXTRA_NONE
3145 if (extra_len > rlen)
3146 extra_len = rlen;
3148 switch (subtype)
3150 case QNX_IO_CONNECT_COMBINE_CLOSE:
3151 case QNX_IO_CONNECT_COMBINE:
3152 if (extra_len >= 4 /* type+combine_len in io message */
3153 && rlen >= 4)
3154 ret = dissect_qnet6_kif_msgsend_msg(tvb, pinfo, stree, poffset, encoding);
3155 return ret;
3156 default:
3157 switch (extra_type)
3159 case QNX_IO_CONNECT_EXTRA_LINK: /* 1 */
3160 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extra_link_ocb, tvb, *poffset, extra_len, encoding);
3161 break;
3162 case QNX_IO_CONNECT_EXTRA_SYMLINK: /* 2 */
3164 * extra data is the symlink new path name
3166 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extra_symlink_path, tvb, *poffset, extra_len, ENC_ASCII);
3167 break;
3168 case QNX_IO_CONNECT_EXTRA_RENAME:
3170 * extra data is the mv old new ,extra is old path
3171 * name path is the new name
3173 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extra_rename_path, tvb, *poffset, extra_len, ENC_ASCII);
3174 break;
3175 case QNX_IO_CONNECT_EXTRA_MOUNT:
3176 case QNX_IO_CONNECT_EXTRA_MOUNT_OCB:
3177 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extra_mount, tvb, *poffset, extra_len, ENC_ASCII);
3178 break;
3179 case QNX_IO_CONNECT_EXTRA_NONE: /* 0 */
3180 default:
3181 proto_tree_add_item(stree, hf_qnet6_kif_msg_connect_extra_data, tvb, *poffset, extra_len, ENC_NA);
3182 break;
3184 break;
3187 *poffset += extra_len;
3190 ret = 0;
3191 break;
3192 case QNX_IO_DEVCTL:
3193 ret = dissect_qnet6_kif_msgsend_msg_devctl(tvb, pinfo, stree, poffset, encoding);
3194 break;
3195 case QNX_IO_READ:
3196 ret = dissect_qnet6_kif_msgsend_msg_read(tvb, pinfo, stree, poffset, encoding);
3197 break;
3198 case QNX_IO_WRITE:
3199 ret = dissect_qnet6_kif_msgsend_msg_write(tvb, pinfo, stree, poffset, encoding);
3200 break;
3201 case QNX_IO_PATHCONF:
3202 ret = dissect_qnet6_kif_msgsend_msg_pathconf(tvb, pinfo, stree, poffset, encoding);
3203 break;
3204 case QNX_IO_STAT:
3205 ret = dissect_qnet6_kif_msgsend_msg_stat(tvb, pinfo, stree, poffset, encoding);
3206 break;
3207 case QNX_IO_LSEEK:
3208 ret = dissect_qnet6_kif_msgsend_msg_seek(tvb, pinfo, stree, poffset, encoding);
3209 break;
3210 case QNX_IO_CHMOD:
3211 ret = dissect_qnet6_kif_msgsend_msg_chmod(tvb, pinfo, stree, poffset, encoding);
3212 break;
3213 case QNX_IO_CHOWN:
3214 ret = dissect_qnet6_kif_msgsend_msg_chown(tvb, pinfo, stree, poffset, encoding);
3215 break;
3216 case QNX_IO_UTIME:
3217 ret = dissect_qnet6_kif_msgsend_msg_utime(tvb, pinfo, stree, poffset, encoding);
3218 break;
3219 case QNX_IO_FDINFO:
3220 ret = dissect_qnet6_kif_msgsend_msg_fdinfo(tvb, pinfo, stree, poffset, encoding);
3221 break;
3222 case QNX_IO_LOCK:
3223 ret = dissect_qnet6_kif_msgsend_msg_lock(tvb, pinfo, stree, poffset, encoding);
3224 break;
3225 case QNX_IO_SPACE:
3226 ret = dissect_qnet6_kif_msgsend_msg_space(tvb, pinfo, stree, poffset, encoding);
3227 break;
3228 case QNX_IO_CLOSE:
3230 * io_close there is no data but only combine_len
3232 ret = dissect_qnet6_kif_msgsend_msg_close(tvb, pinfo, stree, poffset, encoding);
3233 break;
3234 case QNX_IO_SYNC:
3235 ret = dissect_qnet6_kif_msgsend_msg_sync(tvb, pinfo, stree, poffset, encoding);
3236 break;
3237 case QNX_IO_OPENFD:
3238 ret = dissect_qnet6_kif_msgsend_msg_openfd(tvb, pinfo, stree, poffset, encoding);
3239 break;
3240 case QNX_IO_SHUTDOWN:
3241 ret = dissect_qnet6_kif_msgsend_msg_shutdown(tvb, pinfo, stree, poffset, encoding);
3242 break;
3243 case QNX_IO_MMAP:
3244 ret = dissect_qnet6_kif_msgsend_msg_mmap(tvb, pinfo, stree, poffset, encoding);
3245 break;
3246 case QNX_IO_MSG:
3247 ret = dissect_qnet6_kif_msgsend_msg_iomsg(tvb, pinfo, stree, poffset, encoding);
3248 break;
3249 case QNX_IO_NOTIFY:
3250 ret = dissect_qnet6_kif_msgsend_msg_notify(tvb, pinfo, stree, poffset, encoding);
3251 break;
3252 case QNX_IO_DUP:
3253 ret = dissect_qnet6_kif_msgsend_msg_dup(tvb, pinfo, stree, poffset, encoding);
3254 break;
3256 default:
3257 break;
3260 return ret;
3263 // NOLINTEND(misc-no-recursion)
3265 static void
3266 qos_tcs_init_addtree(tvbuff_t * tvb, proto_tree * tree, int * poffset, unsigned encoding, int hf_off, int hf_generated, int rlen, int name_start)
3268 uint16_t off;
3269 proto_item *ti;
3270 int i;
3272 proto_tree_add_item(tree, hf_off, tvb, *poffset, 2, encoding);
3273 off = tvb_get_uint16(tvb, *poffset, encoding);
3274 if ((int) off < rlen)
3276 i = off;
3277 while(i <= rlen)
3279 if (tvb_get_uint8(tvb, name_start + i)== 0)
3280 break;
3281 i++;
3283 if (i <= rlen)
3285 ti = proto_tree_add_item(tree, hf_generated, tvb, name_start + off, i - off, ENC_ASCII|ENC_NA);
3286 proto_item_set_generated(ti);
3290 *poffset += 2;
3294 static int
3295 dissect_qnet6_qos(uint8_t qtype, tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
3297 proto_item *ti;
3298 proto_tree *stree;
3299 int rlen, name_start;
3301 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QNET_QOS");
3303 switch (qtype)
3305 case QNET_L4_TYPE_TCS_INIT:
3306 ti = proto_tree_add_item(tree, proto_qnet6_qos, tvb, *poffset, -1, ENC_NA);
3307 stree = proto_item_add_subtree(ti, ett_qnet6_qos);
3309 * after l4_pkt header is the tcs_init_strings uint16_t
3310 * src_name_off, src_domain_off, dst_name_off, dst_domain_off
3313 rlen = tvb_reported_length_remaining(tvb, *poffset);
3314 if (rlen <(int) 2 * 4) /* at least we have tcs_init_strings */
3315 return -1;
3317 * after tcs_init_strings how much left
3319 rlen -= 2 * 4;
3320 name_start = *poffset + 2 * 4;
3322 qos_tcs_init_addtree(tvb, stree, poffset, encoding, hf_qnet6_qos_tcs_src_name_off, hf_qnet6_qos_tcs_src_name_generated, rlen, name_start);
3323 qos_tcs_init_addtree(tvb, stree, poffset, encoding, hf_qnet6_qos_tcs_src_domain_off, hf_qnet6_qos_tcs_src_domain_generated, rlen, name_start);
3324 qos_tcs_init_addtree(tvb, stree, poffset, encoding, hf_qnet6_qos_tcs_dst_name_off, hf_qnet6_qos_tcs_dst_name_generated, rlen, name_start);
3325 qos_tcs_init_addtree(tvb, stree, poffset, encoding, hf_qnet6_qos_tcs_dst_domain_off, hf_qnet6_qos_tcs_dst_domain_generated, rlen, name_start);
3327 col_set_str(pinfo->cinfo, COL_INFO, "Qos TCS_INIT Message");
3329 break;
3330 case QNET_L4_TYPE_TCS_REM_UP:
3331 col_set_str(pinfo->cinfo, COL_INFO, "Qos TCS_REM_UP Message");
3332 break;
3333 case QNET_L4_TYPE_TCS_UP:
3334 col_set_str(pinfo->cinfo, COL_INFO, "Qos TCS_UP Message");
3335 break;
3336 case QNET_L4_TYPE_TCS_DOWN:
3337 col_set_str(pinfo->cinfo, COL_INFO, "Qos TCS_DOWN Message");
3338 break;
3339 case QNET_L4_TYPE_TCS_REM_DOWN:
3340 col_set_str(pinfo->cinfo, COL_INFO, "Qos TCS_REM_DOWN Message");
3341 break;
3342 default:
3343 break;
3347 return 0;
3351 * _client_info is defined in sys / neutrino.h and uid_t, gid_t are _INT32
3353 #if defined(__NGROUPS_MAX)
3354 #define O__NGROUPS_MAX __NGROUPS_MAX
3355 #undef __NGROUPS_MAX
3356 #define __NGROUPS_MAX 8
3357 #else
3358 #define __NGROUPS_MAX 8
3359 #endif
3361 * struct _cred_info { int32_t ruid; int32_t euid; int32_t suid; int32_t rgid;
3362 * int32_t egid; int32_t sgid; uint32_t ngroups; int32_t
3363 * grouplist[__NGROUPS_MAX]; };
3365 * struct _client_info { uint32_t nd; int32_t pid; int32_t sid; uint32_t flags;
3366 * struct _cred_info cred; };
3369 * dissect_qnet6_kif_cred will return -1 if there are some data there. and
3370 * it is supposed to be part of cred but not enough or 0 if cred is fully
3371 * parsed
3373 static int
3374 dissect_qnet6_kif_cred(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int * poffset, unsigned encoding)
3376 proto_item *ti, *ti1, *ti2;
3377 proto_tree *stree, *sstree;
3378 uint32_t ngroups;
3379 int nleft, ret = -1, length;
3381 ti = NULL; /* for compiler warning */
3382 nleft = tvb_reported_length_remaining(tvb, *poffset);
3383 length =((4 * 4 /* nd,pid,sid,flags */ ) +
3384 (4 * 3 * 2 + 4) /* ruid,euid,suid,rgid,egid,sgid,ngroups */ );
3386 * at least we need everything before the array
3387 * grouplist[__NGROUPS_MAX]
3389 if (nleft < length)
3390 return ret;
3391 ti1 = proto_tree_add_string(tree, hf_qnet6_kif_client_info, tvb, *poffset, MIN(length, nleft), "client information");
3392 stree = proto_item_add_subtree(ti1, ett_qnet6_kif_client_info);
3394 * nd
3396 proto_tree_add_item(stree, hf_qnet6_kif_client_info_nd, tvb, *poffset, 4, encoding);
3397 *poffset += 4;
3399 * pid
3401 proto_tree_add_item(stree, hf_qnet6_kif_client_info_pid, tvb, *poffset, 4, encoding);
3402 *poffset += 4;
3404 * sid
3406 proto_tree_add_item(stree, hf_qnet6_kif_client_info_sid, tvb, *poffset, 4, encoding);
3407 *poffset += 4;
3409 * flags
3411 proto_tree_add_item(stree, hf_qnet6_kif_client_info_flags, tvb, *poffset, 4, encoding);
3412 *poffset += 4;
3413 ti2 = proto_tree_add_string(stree, hf_qnet6_kif_client_info_cred, tvb, *poffset, MIN(4 * 6 + 4, nleft - 4 * 4), "client information");
3414 sstree = proto_item_add_subtree(ti2, ett_qnet6_kif_client_info_cred);
3417 * ruid
3419 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_ruid, tvb, *poffset, 4, encoding);
3420 *poffset += 4;
3422 * euid
3424 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_euid, tvb, *poffset, 4, encoding);
3425 *poffset += 4;
3427 * suid
3429 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_suid, tvb, *poffset, 4, encoding);
3430 *poffset += 4;
3432 * rgid
3434 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_rgid, tvb, *poffset, 4, encoding);
3435 *poffset += 4;
3437 * egid
3439 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_egid, tvb, *poffset, 4, encoding);
3440 *poffset += 4;
3442 * sgid
3444 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_sgid, tvb, *poffset, 4, encoding);
3445 *poffset += 4;
3446 ngroups = tvb_get_uint32(tvb, *poffset, encoding);
3448 * ngroups
3450 proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_ngroups, tvb, *poffset, 4, encoding);
3451 *poffset += 4;
3452 if (ngroups > __NGROUPS_MAX) /* ngroups is wrong */
3453 return ret;
3454 nleft -= length;
3455 nleft = MIN(nleft, __NGROUPS_MAX * 4);
3456 if (nleft < (int) ngroups * 4)
3457 return ret;
3459 * nleft at least >=0
3461 nleft = MIN(ngroups * 4,(uint32_t) nleft);
3463 * nleft is possible 0,4,...
3465 if (nleft >= 4)
3467 ti = proto_tree_add_item(sstree, hf_qnet6_kif_client_info_cred_grouplist, tvb, *poffset, 4, encoding);
3468 *poffset += 4;
3469 nleft -= 4;
3470 length += 4;
3473 for (; nleft > 0; nleft -= 4)
3475 proto_item_append_text(ti, " %" PRIu32, tvb_get_uint32(tvb, *poffset, encoding));
3476 *poffset += 4;
3477 length += 4;
3479 proto_item_set_len(ti1, length);
3480 proto_item_set_len(ti2, length - 4 * 4); /* except nd,pid,sid,flags */
3481 if (ti)
3482 proto_item_set_len(ti, length - 4 * 4 - 4 * 6 - 4);
3483 ret = 0;
3485 return ret;
3488 static int
3489 dissect_qnet6_kif(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int * poffset, unsigned encoding)
3491 proto_item *ti;
3492 proto_tree *stree, *stree1, *sstree;
3493 int rlen;
3494 struct qnet6_kif_hdr khdr;
3495 const value_string *p;
3496 int ret = -1;
3497 uint32_t nleft, coid, chid;
3499 ti = proto_tree_add_item(tree, proto_qnet6_kif, tvb, *poffset, -1, ENC_NA);
3500 stree = proto_item_add_subtree(ti, ett_qnet6_kif);
3503 * when dissect_qnet6_kif is called it is guaranteed that at least msgtype
3504 * and size are in packet
3506 khdr.msgtype = tvb_get_uint16(tvb, *poffset, encoding);
3507 khdr.size = tvb_get_uint16(tvb, *poffset + 2, encoding);
3509 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QNET_KIF");
3510 for (p = qnet6_kif_msgtype_vals;
3511 p < qnet6_kif_msgtype_vals + array_length(qnet6_kif_msgtype_vals);
3512 p++)
3514 if (p->value ==(khdr.msgtype & QNET_KIF_MSGTYPE_MASK))
3516 if (p->strptr)
3517 col_set_str(pinfo->cinfo, COL_INFO, p->strptr);
3521 if ((khdr.msgtype & QNET_KIF_MSGTYPE_MASK) !=
3522 QNET_KIF_MSGTYPE_CONNECT_MSGSEND)
3525 * msgtype
3527 ti = proto_tree_add_item(stree, hf_qnet6_kif_msgtype, tvb, *poffset, 2, encoding);
3528 if (khdr.msgtype & QNET_KIF_CRED)
3529 proto_item_append_text(ti, " CRED");
3530 if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_BIG)
3531 proto_item_append_text(ti, " BIG_ENDIAN");
3532 else if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_LITTLE)
3533 proto_item_append_text(ti, " LITTLE_ENDIAN");
3534 *poffset += 2;
3536 * size
3538 proto_tree_add_item(stree, hf_qnet6_kif_size, tvb, *poffset, 2, encoding);
3539 *poffset += 2;
3542 * how much data left and not parsed yet
3544 rlen = tvb_reported_length_remaining(tvb, *poffset);
3546 switch (khdr.msgtype & QNET_KIF_MSGTYPE_MASK)
3548 case QNET_KIF_MSGTYPE_CONNECT:
3550 * version
3552 proto_tree_add_item(stree, hf_qnet6_kif_version, tvb, *poffset, 4, encoding);
3553 *poffset += 4;
3555 * server pid
3557 proto_tree_add_item(stree, hf_qnet6_kif_connect_server_pid, tvb, *poffset, 4, encoding);
3558 *poffset += 4;
3560 * server chid
3562 chid = tvb_get_uint32(tvb, *poffset, encoding);
3563 ti = proto_tree_add_item(stree,hf_qnet6_kif_connect_server_chid, tvb,*poffset, 4, encoding);
3564 display_channel_id(chid, ti);
3565 *poffset += 4;
3567 * client id
3569 proto_tree_add_item(stree, hf_qnet6_kif_connect_client_id, tvb, *poffset, 4, encoding);
3570 *poffset += 4;
3572 * client pid
3574 proto_tree_add_item(stree, hf_qnet6_kif_connect_client_pid, tvb, *poffset, 4, encoding);
3575 *poffset += 4;
3577 * dissect_qnet6_kif_cred will check whether no more data
3579 if (khdr.msgtype & QNET_KIF_CRED)
3581 ret = dissect_qnet6_kif_cred(tvb, pinfo, stree, poffset, encoding);
3582 if (ret != 0)
3583 return ret;
3585 break;
3586 case QNET_KIF_MSGTYPE_CONNECT_MSGSEND:
3588 * still don't know how many ngroups in cred_info so needs to
3589 * modify its size later proto_item_set_len should be called later
3590 * when we know ngroups.
3593 * connect_msgsend format: connect cred (optional, msgtype
3594 * indicates it size=sizeof(connect)+optinal sizeof(cred)) msgsend
3595 * cred (optional)
3598 * if no struct qnet6_kif_connect
3600 if (rlen < 4 + 4 + 4 + 4 + 4 + 4)
3601 return ret;
3602 ti = proto_tree_add_string(stree, hf_qnet6_kif_connect, tvb, *poffset,
3603 2 * 2 + 4 * 5 + ((khdr.msgtype & QNET_KIF_CRED) ? (4 * 4 + 4 * 7) : 0),
3604 "qnet connect message");
3605 stree1 = proto_item_add_subtree(ti, ett_qnet6_kif_connect);
3607 * msgtype
3609 ti = proto_tree_add_item(stree1, hf_qnet6_kif_msgtype, tvb, *poffset, 2, encoding);
3610 if (khdr.msgtype & QNET_KIF_CRED)
3611 proto_item_append_text(ti, " CRED");
3612 if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_BIG)
3613 proto_item_append_text(ti, " BIG_ENDIAN");
3614 else if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_LITTLE)
3615 proto_item_append_text(ti, " LITTLE_ENDIAN");
3616 *poffset += 2;
3618 * size
3620 proto_tree_add_item(stree1, hf_qnet6_kif_size, tvb, *poffset, 2, encoding);
3621 *poffset += 2;
3623 * version
3625 proto_tree_add_item(stree1, hf_qnet6_kif_version, tvb, *poffset, 4, encoding);
3626 *poffset += 4;
3628 * server pid
3630 proto_tree_add_item(stree1, hf_qnet6_kif_connect_server_pid, tvb, *poffset, 4, encoding);
3631 *poffset += 4;
3633 * server chid
3635 chid = tvb_get_uint32(tvb, *poffset, encoding);
3636 ti = proto_tree_add_item(stree1, hf_qnet6_kif_connect_server_chid, tvb, *poffset, 4, encoding);
3637 display_channel_id(chid, ti);
3638 *poffset += 4;
3640 * client id
3642 proto_tree_add_item(stree1, hf_qnet6_kif_connect_client_id, tvb, *poffset, 4, encoding);
3643 *poffset += 4;
3645 * client pid
3647 proto_tree_add_item(stree1, hf_qnet6_kif_connect_client_pid, tvb, *poffset, 4, encoding);
3648 *poffset += 4;
3649 if (khdr.msgtype & QNET_KIF_CRED)
3651 ret = dissect_qnet6_kif_cred(tvb, pinfo, stree1, poffset, encoding);
3652 if (ret != 0)
3653 return ret;
3656 rlen = tvb_reported_length_remaining(tvb, *poffset);
3657 if (rlen < 4 /* type+size */ )
3658 return ret;
3660 * msgsend msgtype, size part
3662 ti = proto_tree_add_string(stree, hf_qnet6_kif_msgsend, tvb, *poffset, -1, "qnet msgsend message");
3663 stree = proto_item_add_subtree(ti, ett_qnet6_kif_msgsend);
3665 khdr.msgtype = tvb_get_uint16(tvb, *poffset, encoding);
3666 khdr.size = tvb_get_uint16(tvb, *poffset + 2, encoding);
3668 * msgtype
3670 ti = proto_tree_add_item(stree, hf_qnet6_kif_msgtype, tvb, *poffset, 2, encoding);
3671 if (khdr.msgtype & QNET_KIF_CRED)
3672 proto_item_append_text(ti, " CRED");
3673 if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_BIG)
3674 proto_item_append_text(ti, " BIG_ENDIAN");
3675 else if ((khdr.msgtype & QNET_KIF_ENDIAN_MASK) == QNET_KIF_ENDIAN_LITTLE)
3676 proto_item_append_text(ti, " LITTLE_ENDIAN");
3677 *poffset += 2;
3679 * size
3681 proto_tree_add_item(stree, hf_qnet6_kif_size, tvb, *poffset, 2, encoding);
3682 *poffset += 2;
3683 rlen -= 4;
3684 goto lmsgsend;
3685 break;
3686 case QNET_KIF_MSGTYPE_CONNECT_SUCCESS:
3687 if (rlen < 4 + 4 + 4 + 4 + 4) /* ver, sid,cid,scoid,nbytes */
3688 return ret;
3690 * version
3692 proto_tree_add_item(stree, hf_qnet6_kif_version, tvb, *poffset, 4, encoding);
3693 *poffset += 4;
3695 * server id
3697 proto_tree_add_item(stree, hf_qnet6_kif_connects_server_id, tvb, *poffset, 4, encoding);
3698 *poffset += 4;
3700 * client id
3702 proto_tree_add_item(stree, hf_qnet6_kif_connects_client_id, tvb, *poffset, 4, encoding);
3703 *poffset += 4;
3705 * scoid
3707 proto_tree_add_item(stree, hf_qnet6_kif_connects_scoid, tvb, *poffset, 4, encoding);
3708 *poffset += 4;
3710 * nbytes
3712 proto_tree_add_item(stree, hf_qnet6_kif_connects_nbytes, tvb, *poffset, 4, encoding);
3713 *poffset += 4;
3714 if (khdr.msgtype & QNET_KIF_CRED)
3716 ret = dissect_qnet6_kif_cred(tvb, pinfo, stree, poffset, encoding);
3717 if (ret != 0)
3718 return ret;
3720 break;
3721 case QNET_KIF_MSGTYPE_CONNECT_FAIL:
3722 if (rlen < 4 + 4 + 4) /* ver, cid, status */
3723 return ret;
3725 * version
3727 proto_tree_add_item(stree, hf_qnet6_kif_version, tvb, *poffset, 4, encoding);
3728 *poffset += 4;
3730 * client id
3732 proto_tree_add_item(stree, hf_qnet6_kif_connectf_client_id, tvb, *poffset, 4, encoding);
3733 *poffset += 4;
3735 * status
3737 proto_tree_add_item(stree, hf_qnet6_kif_connectf_status, tvb, *poffset, 4, encoding);
3738 *poffset += 4;
3739 break;
3740 case QNET_KIF_MSGTYPE_CONNECT_DEATH:
3741 if (rlen < 4)
3742 return ret;
3744 * client id
3746 proto_tree_add_item(stree, hf_qnet6_kif_connectd_client_id, tvb, *poffset, 4, encoding);
3747 *poffset += 4;
3748 break;
3749 case QNET_KIF_MSGTYPE_MSGSEND:
3751 case QNET_KIF_MSGTYPE_PULSE:
3752 lmsgsend:
3753 if (rlen < 4 * 10) /* sid,client_handle, tid, coid,priority, srcmsglen,keydata,srcnd,dstmsglen */
3754 return ret;
3756 * server id
3758 proto_tree_add_item(stree, hf_qnet6_kif_msgsend_server_id, tvb, *poffset, 4, encoding);
3759 *poffset += 4;
3761 * client handle
3763 proto_tree_add_item(stree, hf_qnet6_kif_msgsend_client_handle, tvb, *poffset, 4, encoding);
3764 *poffset += 4;
3766 * vinfo, it is packed as 64 bits aligned so sizeof should work
3767 * well on 32, 64 bits platforms
3769 ti = proto_tree_add_string(stree, hf_qnet6_kif_msgsend_vinfo, tvb, *poffset, 4 * 8, "virtual thread information");
3770 sstree = proto_item_add_subtree(ti, ett_qnet6_kif_vinfo);
3772 * tid
3774 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_tid, tvb, *poffset, 4, encoding);
3775 *poffset += 4;
3776 coid = tvb_get_uint32(tvb, *poffset, encoding);
3777 ti = proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_coid, tvb, *poffset, 4, encoding);
3778 display_coid(coid, ti);
3779 *poffset += 4;
3780 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_priority, tvb, *poffset, 4, encoding);
3781 *poffset += 4;
3782 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_srcmsglen, tvb, *poffset, 4, encoding);
3783 *poffset += 4;
3784 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_keydata, tvb, *poffset, 4, encoding);
3785 *poffset += 4;
3786 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_srcnd, tvb, *poffset, 4, encoding);
3787 *poffset += 4;
3788 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_dstmsglen, tvb, *poffset, 4, encoding);
3789 *poffset += 4;
3790 proto_tree_add_item(sstree, hf_qnet6_kif_vtid_info_zero, tvb, *poffset, 4, encoding);
3791 *poffset += 4;
3793 rlen -= 40;
3794 if ((khdr.msgtype & QNET_KIF_MSGTYPE_MASK) ==
3795 QNET_KIF_MSGTYPE_MSGSEND
3796 || (khdr.msgtype & QNET_KIF_MSGTYPE_MASK) ==
3797 QNET_KIF_MSGTYPE_CONNECT_MSGSEND)
3800 * nbytes
3802 proto_tree_add_item(stree, hf_qnet6_kif_msgsend_nbytes, tvb, *poffset, 4, encoding);
3803 *poffset += 4;
3806 * start to dissect resmgr_iomsgs which starts with uint16_t
3807 * type
3809 ret = dissect_qnet6_kif_msgsend_msg(tvb, pinfo, stree, poffset, encoding);
3810 if (ret != 0)
3811 return ret;
3813 else
3815 if (rlen < 2 * 2 + 1 + 3 + 4 * 3)
3816 return ret;
3818 * pulse is done
3820 ti = proto_tree_add_string(stree, hf_qnet6_kif_pulse_pulse, tvb, *poffset, 4 * 4 , "pulse information");
3821 sstree = proto_item_add_subtree(ti, ett_qnet6_kif_pulse);
3822 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_type, tvb, *poffset, 2, encoding);
3823 *poffset += 2;
3824 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_subtype, tvb, *poffset, 2, encoding);
3825 *poffset += 2;
3826 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_code, tvb, *poffset, 1, encoding);
3827 *poffset += 1;
3828 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_reserved, tvb, *poffset, 3, encoding);
3829 *poffset += 3;
3830 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_value, tvb, *poffset, 4, encoding);
3831 *poffset += 4;
3832 proto_tree_add_item(sstree, hf_qnet6_kif_pulse_pulse_scoid, tvb, *poffset, 4, encoding);
3833 *poffset += 4;
3835 * priority
3837 proto_tree_add_item(stree, hf_qnet6_kif_pulse_priority, tvb, *poffset, 4, encoding);
3838 *poffset += 4;
3840 if (khdr.msgtype & QNET_KIF_CRED)
3842 ret = dissect_qnet6_kif_cred(tvb, pinfo, stree, poffset, encoding);
3843 if (ret != 0)
3844 return ret;
3846 break;
3847 case QNET_KIF_MSGTYPE_MSGREAD:
3848 if (rlen < 4 * 4)
3849 return ret;
3851 * msgread handle
3853 proto_tree_add_item(stree, hf_qnet6_kif_msgread_msgread_handle, tvb, *poffset, 4, encoding);
3854 *poffset += 4;
3856 * client handle
3858 proto_tree_add_item(stree, hf_qnet6_kif_msgread_client_handle, tvb, *poffset, 4, encoding);
3859 *poffset += 4;
3861 * offset
3863 proto_tree_add_item(stree, hf_qnet6_kif_msgread_offset, tvb, *poffset, 4, encoding);
3864 *poffset += 4;
3866 * nbytes
3868 proto_tree_add_item(stree, hf_qnet6_kif_msgread_nbytes, tvb, *poffset, 4, encoding);
3869 *poffset += 4;
3870 break;
3871 case QNET_KIF_MSGTYPE_MSGWRITE:
3872 case QNET_KIF_MSGTYPE_MSGREPLY:
3873 case QNET_KIF_MSGTYPE_MSGERROR:
3874 case QNET_KIF_MSGTYPE_MSGREAD_XFER:
3875 case QNET_KIF_MSGTYPE_MSGREAD_ERROR:
3876 if (rlen < 4 * 4)
3877 return ret;
3880 * status
3882 proto_tree_add_item(stree, hf_qnet6_kif_msgwrite_status, tvb, *poffset, 4, encoding);
3883 *poffset += 4;
3885 * handle
3887 proto_tree_add_item(stree, hf_qnet6_kif_msgwrite_handle, tvb, *poffset, 4, encoding);
3888 *poffset += 4;
3890 * offset
3892 proto_tree_add_item(stree, hf_qnet6_kif_msgwrite_offset, tvb, *poffset, 4, encoding);
3893 *poffset += 4;
3895 * nbytes
3897 nleft = tvb_get_uint32(tvb, *poffset, encoding);
3898 proto_tree_add_item(stree, hf_qnet6_kif_msgwrite_nbytes, tvb, *poffset, 4, encoding);
3899 *poffset += 4;
3901 * else data
3903 if (rlen - 4 * 4 > 0)
3904 proto_tree_add_item(stree, hf_qnet6_kif_msgwrite_data, tvb, *poffset, MIN(nleft, (uint32_t) rlen - 4 * 4), ENC_NA);
3906 break;
3907 case QNET_KIF_MSGTYPE_UNBLOCK:
3908 if (rlen < 4 * 3)
3909 return ret;
3911 * server id
3913 proto_tree_add_item(stree, hf_qnet6_kif_unblock_server_id, tvb, *poffset, 4, encoding);
3914 *poffset += 4;
3916 * client handle
3918 proto_tree_add_item(stree, hf_qnet6_kif_unblock_client_handle, tvb, *poffset, 4, encoding);
3919 *poffset += 4;
3921 * tid
3923 proto_tree_add_item(stree, hf_qnet6_kif_unblock_tid, tvb, *poffset, 4, encoding);
3924 *poffset += 4;
3926 break;
3927 case QNET_KIF_MSGTYPE_EVENT:
3928 if (rlen < 4)
3929 return ret;
3931 * client handle
3933 proto_tree_add_item(stree, hf_qnet6_kif_event_client_handle, tvb, *poffset, 4, encoding);
3934 *poffset += 4;
3935 if (rlen < 4 * 4)
3936 return ret;
3938 * sigevent
3940 ti = proto_tree_add_item(stree, hf_qnet6_kif_event_event, tvb, *poffset, 4 * 4, ENC_NA);
3942 *poffset += sizeof(struct sigevent_qnx); */
3943 sstree = proto_item_add_subtree(ti, ett_qnet6_kif_event);
3945 proto_tree_add_item(sstree, hf_qnet6_kif_event_notify, tvb, *poffset, 4, encoding);
3946 *poffset += 4;
3947 proto_tree_add_item(sstree, hf_qnet6_kif_event_union1, tvb, *poffset, 4, encoding);
3948 *poffset += 4;
3949 proto_tree_add_item(sstree, hf_qnet6_kif_event_value, tvb, *poffset, 4, encoding);
3950 *poffset += 4;
3951 proto_tree_add_item(sstree, hf_qnet6_kif_event_union2, tvb, *poffset, 4, encoding);
3952 *poffset += 4;
3954 break;
3955 case QNET_KIF_MSGTYPE_SIGNAL:
3956 if (rlen < 4 * 6)
3957 return ret;
3959 * client handle
3961 proto_tree_add_item(stree, hf_qnet6_kif_signal_client_handle, tvb, *poffset, 4, encoding);
3962 *poffset += 4;
3964 * pid
3966 proto_tree_add_item(stree, hf_qnet6_kif_signal_pid, tvb, *poffset, 4, encoding);
3967 *poffset += 4;
3969 * tid
3971 proto_tree_add_item(stree, hf_qnet6_kif_signal_tid, tvb, *poffset, 4, encoding);
3972 *poffset += 4;
3974 * signo
3976 proto_tree_add_item(stree, hf_qnet6_kif_signal_signo, tvb, *poffset, 4, encoding);
3977 *poffset += 4;
3979 * code
3981 proto_tree_add_item(stree, hf_qnet6_kif_signal_code, tvb, *poffset, 4, encoding);
3982 *poffset += 4;
3984 * value
3986 proto_tree_add_item(stree, hf_qnet6_kif_signal_value, tvb, *poffset, 4, encoding);
3987 *poffset += 4;
3988 if (khdr.msgtype & QNET_KIF_CRED)
3990 ret = dissect_qnet6_kif_cred(tvb, pinfo, stree, poffset, encoding);
3991 if (ret != 0)
3992 return ret;
3994 break;
3995 case QNET_KIF_MSGTYPE_DISCONNECT:
3996 if (rlen < 4)
3997 return ret;
3999 * server id
4001 proto_tree_add_item(stree, hf_qnet6_kif_disconnect_server_id, tvb, *poffset, 4, encoding);
4002 *poffset += 4;
4003 default:
4004 break;
4006 ret = 0;
4008 return ret;
4011 #ifdef O__NGROUPS_MAX
4012 #define __NGROUPS_MAX O__NGROUPS_MAX
4013 #else
4014 #undef __NGROUPS_MAX
4015 #endif
4017 static int
4018 dissect_qnet6(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data _U_)
4021 proto_item *ti;
4022 proto_tree *qnet6_tree, *stree;
4023 uint8_t qflags, qlayer, qtype, crcbuf[4];
4024 unsigned encoding;
4025 int offset = 0;
4026 int len, plen, cklen;
4027 uint32_t crc, crcp;
4028 static int * const flags[] = {
4029 &hf_qnet6_l4_flags_first,
4030 &hf_qnet6_l4_flags_last,
4031 &hf_qnet6_l4_flags_crc,
4032 NULL
4035 memset(crcbuf, 0, sizeof(crcbuf));
4037 * Check that there's enough data
4039 len = (int) tvb_reported_length(tvb);
4040 if (len < 36 + 2) /* sizeof (l4_pkt) + 2 bytes pad after 0x8204 */
4041 return 0;
4043 col_set_str(pinfo->cinfo, COL_PROTOCOL, "QNET_LWL4");
4046 * write to Info column
4048 col_set_str(pinfo->cinfo, COL_INFO, "Qnet6");
4050 ti = proto_tree_add_item(tree, proto_qnet6_l4, tvb, 0, 36 + 2, ENC_NA);
4051 qnet6_tree = proto_item_add_subtree(ti, ett_qnet6_l4);
4053 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_padding, tvb, offset, 2, ENC_BIG_ENDIAN);
4054 offset += 2;
4057 * version
4059 encoding =(tvb_get_uint8(tvb, offset) & 0x80) ? ENC_BIG_ENDIAN : ENC_LITTLE_ENDIAN;
4060 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_ver, tvb, offset++, 1, ENC_BIG_ENDIAN);
4063 * type
4065 qtype = tvb_get_uint8(tvb, offset);
4066 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
4068 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(qtype, qnet6_type_vals, "Unknown LWL4 Type %u packets"));
4070 * flags
4072 proto_tree_add_bitmask_with_flags(qnet6_tree, tvb, offset,
4073 hf_qnet6_l4_flags, ett_qnet6_flags, flags, ENC_NA, BMT_NO_APPEND|BMT_NO_FALSE);
4074 qflags = tvb_get_uint8(tvb, offset);
4075 offset++;
4077 * layer
4079 qlayer = tvb_get_uint8(tvb, offset);
4080 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_layer, tvb, offset++, 1, encoding);
4082 * qos_info
4085 * src_nd_for_dst
4087 ti = proto_tree_add_item(qnet6_tree, hf_qnet6_l4_qos_info, tvb, offset, 20, ENC_NA);
4088 stree = proto_item_add_subtree(ti, ett_qnet6_qos_info);
4089 proto_tree_add_item(stree, hf_qnet6_l4_qos_src_nd_for_dst, tvb, offset, 2, encoding);
4090 offset += 2;
4092 * dst_nd_for_src
4094 proto_tree_add_item(stree, hf_qnet6_l4_qos_dst_nd_for_src, tvb, offset, 2, encoding);
4095 offset += 2;
4097 * src connection id
4099 proto_tree_add_item(stree, hf_qnet6_l4_qos_src_conn_id, tvb, offset, 4, encoding);
4100 offset += 4;
4102 * dst connection id
4104 proto_tree_add_item(stree, hf_qnet6_l4_qos_dst_conn_id, tvb, offset, 4, encoding);
4105 offset += 4;
4107 * sequence number
4109 proto_tree_add_item(stree, hf_qnet6_l4_qos_src_seq_num, tvb, offset, 4, encoding);
4110 offset += 4;
4112 * qos type
4114 proto_tree_add_item(stree, hf_qnet6_l4_qos_qos_type, tvb, offset, 2, encoding);
4115 offset += 2;
4117 * qos index
4119 proto_tree_add_item(stree, hf_qnet6_l4_qos_src_qos_idx, tvb, offset, 2, encoding);
4120 offset += 2;
4122 * end of qos_info
4125 * offset in this stream
4127 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_offset, tvb, offset, 4, encoding);
4128 offset += 4;
4130 * length of its payload
4132 plen = tvb_get_uint32(tvb, offset, encoding);
4133 proto_tree_add_uint(qnet6_tree, hf_qnet6_l4_length, tvb, offset, 4, plen);
4134 offset += 4;
4136 * crc value
4138 crcp = tvb_get_uint32(tvb, offset, encoding);
4140 * crc value is l4_pkt header + data behind with original crc is 0
4142 if ((qflags & (QNET_L4_FLAGS_FIRST)) &&
4143 (qflags & QNET_L4_FLAGS_LAST) && ((qnet6_lwl4_check_crc) || (qflags & QNET_L4_FLAGS_CRC)))
4146 * only do crc when first|last|crc are all set
4149 * 1.cksum header of l4_pkt except crc field
4152 * qnet is using initial seed 0 not 0xffffffff
4154 crc = crc32_mpeg2_tvb_offset_seed(tvb, 2, 36 - 4, 0);
4155 crc = ~crc;
4157 * 2. cksum crc field with 4 bytes 0
4159 crc = crc32_mpeg2_seed(crcbuf, 4, ~crc);
4160 crc = ~crc;
4161 cklen = len - 36 - 2;
4162 if (plen < cklen)
4163 cklen = plen;
4165 * data after header
4167 if (cklen > 0)
4169 crc = crc32_mpeg2_tvb_offset_seed(tvb, 36 + 2, cklen, ~crc);
4170 crc = ~crc;
4173 * qnet l4's crc didn't xor itself at last so we have to
4174 * workaround it
4176 crc = ~crc;
4177 if (crcp == crc)
4178 proto_tree_add_uint_format(qnet6_tree, hf_qnet6_l4_crc, tvb, offset, 4, crcp, "crc32:0x%x [correct]", crcp);
4179 else
4180 proto_tree_add_uint_format(qnet6_tree, hf_qnet6_l4_crc, tvb, offset, 4, crcp, "crc32:0x%x [incorrect, should be 0x%x]", crcp, crc);
4182 else
4184 proto_tree_add_item(qnet6_tree, hf_qnet6_l4_crc, tvb, offset, 4, encoding);
4186 offset += 4;
4188 * Continue adding tree items to process the packet here
4191 * there is no data behind l4_pkt header in this packet
4193 if (len == offset)
4194 return offset;
4196 * don't support fragment yet
4198 if (!((qflags & QNET_L4_FLAGS_FIRST) && (qflags & QNET_L4_FLAGS_LAST)))
4200 if (!(qflags & QNET_L4_FLAGS_FIRST))
4202 if (qflags & QNET_L4_FLAGS_LAST)
4203 col_prepend_fstr(pinfo->cinfo, COL_INFO, "Last Fragmented ");
4204 else
4205 col_prepend_fstr(pinfo->cinfo, COL_INFO, "Fragmented ");
4206 return offset;
4211 * if (plen == 0 ) there is no payload indicated by the length in
4212 * l4_pkt header but we need to go through upper protocol layer to
4213 * show protocol and info. so upper layer should be careful of
4214 * the length
4218 * qtype < QNET_L4_TYPE_USER is qos packet so qlayer is useless
4220 if (qtype < QNET_L4_TYPE_USER && qtype > QNET_L4_TYPE_USER_DATA)
4222 dissect_qnet6_qos(qtype, tvb, pinfo, tree, &offset, encoding);
4224 else
4226 switch (qtype)
4228 case QNET_L4_TYPE_ACK:
4229 col_set_str(pinfo->cinfo, COL_INFO, "Ack");
4230 break;
4231 case QNET_L4_TYPE_NACK:
4232 col_set_str(pinfo->cinfo, COL_INFO, "Nack");
4233 break;
4234 case QNET_L4_TYPE_LRES:
4235 col_set_str(pinfo->cinfo, COL_INFO, "Lan Resolver Packets");
4236 break;
4237 default:
4238 break;
4240 switch (qlayer)
4242 case QNET_L4_LAYER_KIF:
4243 if (plen >= 4 /* sizeof(struct qnet6_kif_hdr) */ )
4245 dissect_qnet6_kif (tvb, pinfo, tree, &offset, encoding);
4247 break;
4248 case QNET_L4_LAYER_NR:
4250 * at least a type in payload
4252 if (plen >= (int) 1)
4253 dissect_qnet6_nr(tvb, pinfo, tree, &offset, encoding);
4254 break;
4255 case QNET_L4_LAYER_LR:
4256 if (plen >= QNX_QNET6_LR_PKT_SIZE
4258 * sizeof(struct qnet6_lr_pkt)
4259 */ )
4261 dissect_qnet6_lr(tvb, pinfo, tree, &offset, encoding);
4263 break;
4264 case QNET_L4_LAYER_SEQ:
4265 col_set_str(pinfo->cinfo, COL_INFO, "Qos Sequence hole filler Packets");
4266 break;
4269 if (!((qflags & QNET_L4_FLAGS_FIRST) && (qflags & QNET_L4_FLAGS_LAST)))
4271 if (qflags & QNET_L4_FLAGS_FIRST)
4274 * do as much as we can
4276 col_prepend_fstr(pinfo->cinfo, COL_INFO, "First fragmented ");
4279 return offset;
4283 * Register the protocol with Wireshark
4286 void
4287 proto_register_qnet6(void)
4289 static hf_register_info hf[] = {
4290 {&hf_qnet6_l4_padding,
4291 {"Padding", "qnet6.l4.padding",
4292 FT_UINT16, BASE_HEX, NULL, 0,
4293 NULL, HFILL
4296 {&hf_qnet6_l4_ver,
4297 {"Version", "qnet6.l4.ver",
4298 FT_UINT8, BASE_DEC, VALS(qnet6_ver_vals), 0,
4299 "QNET6 L4 Packet Version", HFILL
4302 {&hf_qnet6_l4_type,
4303 {"Type", "qnet6.l4.type",
4304 FT_UINT8, BASE_HEX, VALS(qnet6_type_vals), 0,
4305 "QNET6 L4 Upper layer protocol type", HFILL}
4307 {&hf_qnet6_l4_flags,
4308 {"Flag", "qnet6.l4.flags",
4309 FT_UINT8, BASE_HEX, NULL, 0,
4310 NULL, HFILL}
4312 {&hf_qnet6_l4_flags_first,
4313 {"First Fragment", "qnet6.l4.flags.first",
4314 FT_BOOLEAN, 8, TFS(&tfs_yes_no), QNET_L4_FLAGS_FIRST,
4315 "QNET6 L4 Packet first fragment", HFILL}
4317 {&hf_qnet6_l4_flags_last,
4318 {"Last Fragment", "qnet6.l4.flags.last",
4319 FT_BOOLEAN, 8, TFS(&tfs_yes_no), QNET_L4_FLAGS_LAST,
4320 "QNET6 L4 Packet last fragment", HFILL}
4322 {&hf_qnet6_l4_flags_crc,
4323 {"CRC", "qnet6.l4.flags.crc",
4324 FT_BOOLEAN, 8, TFS(&tfs_used_notused), QNET_L4_FLAGS_CRC,
4325 "QNET6 L4 Packet crc used", HFILL}
4328 {&hf_qnet6_l4_layer,
4329 {"Layer", "qnet6.l4.layer",
4330 FT_UINT8, BASE_DEC, VALS(qnet6_layer_vals), 0,
4331 "QNET6 L4 Packet layer", HFILL}
4333 /* start from here is for qos_info */
4334 /* in qos_info, node id is like ip address
4335 * but node id is not global like ip address
4336 * node id is unique on any node only. dragonlinux
4338 {&hf_qnet6_l4_qos_info,
4339 {"Qos info", "qnet6.qos.qos_info",
4340 FT_NONE, BASE_NONE, NULL, 0,
4341 NULL, HFILL}
4343 {&hf_qnet6_l4_qos_src_nd_for_dst,
4344 {"Src_nd_for_dst", "qnet6.qos.src_nd_for_dst",
4345 FT_UINT16, BASE_DEC, NULL, 0,
4346 "QNET6 source node id for destination node", HFILL}
4348 {&hf_qnet6_l4_qos_dst_nd_for_src,
4349 {"Dst_nd_for_src", "qnet6.qos.dst_nd_for_src",
4350 FT_UINT16, BASE_DEC, NULL, 0,
4351 "QNET6 destination node id for source node", HFILL}
4353 /* in qos_info, connection id is like port number */
4354 {&hf_qnet6_l4_qos_src_conn_id,
4355 {"Sconn", "qnet6.qos.sconn",
4356 FT_UINT32, BASE_HEX, NULL, 0,
4357 "QNET6 source node's connection id", HFILL}
4359 {&hf_qnet6_l4_qos_dst_conn_id,
4360 {"Dconn", "qnet6.qos.dconn",
4361 FT_UINT32, BASE_HEX, NULL, 0,
4362 "QNET6 destination node's connection id", HFILL}
4364 {&hf_qnet6_l4_qos_src_seq_num,
4365 {"Seq", "qnet6.qos.seq",
4366 FT_UINT32, BASE_DEC, NULL, 0,
4367 "QNET6 connection sequence number", HFILL}
4369 {&hf_qnet6_l4_qos_qos_type,
4370 {"Qos_type", "qnet6.qos.qos_type",
4371 FT_UINT16, BASE_DEC, VALS(qnet6_qos_type_vals), 0,
4372 "QNET6 qos type", HFILL}
4374 {&hf_qnet6_l4_qos_src_qos_idx,
4375 {"Src_qos_idx", "qnet6.qos.src_qos_idx",
4376 FT_UINT16, BASE_DEC, NULL, 0,
4377 "QNET6 source node qos index", HFILL}
4380 /* end of qos_info in l4_pkt */
4381 {&hf_qnet6_l4_offset,
4382 {"Offset", "qnet6.l4.offset",
4383 FT_UINT32, BASE_DEC, NULL, 0,
4384 "QNET6 Packet offset in stream", HFILL}
4386 {&hf_qnet6_l4_length,
4387 {"Length", "qnet6.l4.length",
4388 FT_UINT32, BASE_DEC, NULL, 0,
4389 "QNET6 Packet payload length", HFILL}
4391 {&hf_qnet6_l4_crc,
4392 {"Crc", "qnet6.l4.crc",
4393 FT_UINT32, BASE_HEX, NULL, 0,
4394 "QNET6 Packet cksum of header and payload", HFILL}
4398 static hf_register_info hf_qos[] = {
4399 {&hf_qnet6_qos_tcs_src_name_off,
4400 {"Src_name_off", "qnet6.qos.src_name_off",
4401 FT_UINT16, BASE_DEC, NULL, 0,
4402 "Source name offset", HFILL}
4404 {&hf_qnet6_qos_tcs_src_name_generated,
4405 {"Src_name", "qnet6.qos.src_name",
4406 FT_STRING, BASE_NONE, NULL, 0,
4407 "Source name", HFILL}
4409 {&hf_qnet6_qos_tcs_src_domain_off,
4410 {"Src_domain_off", "qnet6.qos.src_domain_off",
4411 FT_UINT16, BASE_DEC, NULL, 0,
4412 "Source domain name offset", HFILL}
4414 {&hf_qnet6_qos_tcs_src_domain_generated,
4415 {"Src_domain", "qnet6.qos.src_domain",
4416 FT_STRING, BASE_NONE, NULL, 0,
4417 "Source domain name", HFILL}
4419 {&hf_qnet6_qos_tcs_dst_name_off,
4420 {"Dst_name_off", "qnet6.qos.dst_name_off",
4421 FT_UINT16, BASE_DEC, NULL, 0,
4422 "Destination name offset", HFILL}
4424 {&hf_qnet6_qos_tcs_dst_name_generated,
4425 {"Dst_name", "qnet6.qos.dst_name",
4426 FT_STRING, BASE_NONE, NULL, 0,
4427 "Destination name", HFILL}
4429 {&hf_qnet6_qos_tcs_dst_domain_off,
4430 {"Dst_domain_off", "qnet6.qos.dst_domain_off",
4431 FT_UINT16, BASE_DEC, NULL, 0,
4432 "Destination domain name offset", HFILL}
4434 {&hf_qnet6_qos_tcs_dst_domain_generated,
4435 {"Dst_domain", "qnet6.qos.dst_domain",
4436 FT_STRING, BASE_NONE, NULL, 0,
4437 "Destination domain name", HFILL}
4440 static hf_register_info hf_nr[] = {
4441 /* type, size are the first uint8_t in all nr messages */
4442 {&hf_qnet6_nr_type,
4443 {"Type", "qnet6.nr.type",
4444 FT_UINT8, BASE_DEC, VALS(qnet6_nr_type_vals), 0,
4445 "Network Resolver Message Type", HFILL}
4447 {&hf_qnet6_nr_remote_req_len,
4448 {"Req_len", "qnet6.nr.req_len",
4449 FT_UINT8, BASE_DEC, NULL, 0,
4450 "Network Resolver remote request length", HFILL}
4452 {&hf_qnet6_nr_remote_req_id,
4453 {"Req_id", "qnet6.nr.req_id",
4454 FT_UINT16, BASE_HEX_DEC, NULL, 0,
4455 "Network Resolver remote request id", HFILL}
4457 {&hf_qnet6_nr_remote_req_name,
4458 {"Req_name", "qnet6.nr.req_name",
4459 FT_STRINGZ, BASE_NONE, NULL, 0,
4460 "Network Resolver remote request name", HFILL}
4462 {&hf_qnet6_nr_remote_rep_spare,
4463 {"Rep_spare", "qnet6.nr.rep_spare",
4464 FT_UINT8, BASE_HEX, NULL, 0,
4465 "Network Resolver remote answer pad byte", HFILL}
4467 {&hf_qnet6_nr_remote_rep_id,
4468 {"Rep_id", "qnet6.nr.rep_id",
4469 FT_UINT16, BASE_HEX, NULL, 0,
4470 "Network Resolver remote answer id", HFILL}
4472 {&hf_qnet6_nr_remote_rep_nd,
4473 {"Rep_nd", "qnet6.nr.rep_nd",
4474 FT_UINT32, BASE_HEX, NULL, 0,
4475 "Network Resolver remote answer node id", HFILL}
4477 {&hf_qnet6_nr_remote_rep_status,
4478 {"Rep_status", "qnet6.nr.rep_status",
4479 FT_UINT32, BASE_HEX, NULL, 0,
4480 "Network Resolver remote answer error status", HFILL}
4484 static hf_register_info hf_lr[] = {
4485 /* start of qnet6_lr_pkt */
4486 {&hf_qnet6_lr_ver,
4487 {"Version", "qnet6.lr.ver",
4488 FT_UINT8, BASE_DEC, VALS(qnet6_lr_ver_vals), 0,
4489 "Lan Resolver Version", HFILL}
4491 {&hf_qnet6_lr_type,
4492 {"Type", "qnet6.lr.type",
4493 FT_UINT8, BASE_HEX, VALS(qnet6_lr_type_vals), 0,
4494 "Lan Resolver Message Type", HFILL}
4496 {&hf_qnet6_lr_total_len,
4497 {"Length", "qnet6.lr.length",
4498 FT_UINT32, BASE_DEC, NULL, 0,
4499 "LR Message total length(include header + payload)", HFILL}
4501 {&hf_qnet6_lr_src,
4502 {"Source", "qnet6.lr.src",
4503 FT_STRING, BASE_NONE, NULL, 0,
4504 "LR Message source node", HFILL}
4507 {&hf_qnet6_lr_src_name_off,
4508 {"Offset", "qnet6.lr.src.name.off",
4509 FT_UINT32, BASE_DEC, NULL, 0,
4510 "LR Message source name offset", HFILL}
4512 {&hf_qnet6_lr_src_name_len,
4513 {"Length", "qnet6.lr.src.name.len",
4514 FT_UINT32, BASE_DEC, NULL, 0,
4515 "LR Message source name length", HFILL}
4517 {&hf_qnet6_lr_src_name_generated,
4518 {"Name", "qnet6.lr.src.name.name",
4519 FT_STRING, BASE_NONE, NULL, 0,
4520 "LR Message source name", HFILL}
4522 {&hf_qnet6_lr_src_domain_off,
4523 {"Offset", "qnet6.lr.src.domain.off",
4524 FT_UINT32, BASE_DEC, NULL, 0,
4525 "LR Message source domain name offset", HFILL}
4527 {&hf_qnet6_lr_src_domain_len,
4528 {"Length", "qnet6.lr.src.domain.len",
4529 FT_UINT32, BASE_DEC, NULL, 0,
4530 "LR Message source domain name length", HFILL}
4532 {&hf_qnet6_lr_src_domain_generated,
4533 {"Domain", "qnet6.lr.src.domain",
4534 FT_STRING, BASE_NONE, NULL, 0,
4535 "LR Message source domain name", HFILL}
4537 {&hf_qnet6_lr_src_addr_off,
4538 {"Offset", "qnet6.lr.src.addr.off",
4539 FT_UINT32, BASE_DEC, NULL, 0,
4540 "LR Message source address offset", HFILL}
4542 {&hf_qnet6_lr_src_addr_len,
4543 {"Length", "qnet6.lr.src.addr.len",
4544 FT_UINT32, BASE_DEC, NULL, 0,
4545 "LR Message source address length", HFILL}
4547 {&hf_qnet6_lr_src_addr_generated,
4548 {"Address", "qnet6.lr.src.addr",
4549 FT_ETHER, BASE_NONE, NULL, 0,
4550 "LR Message source address", HFILL}
4552 {&hf_qnet6_lr_dst,
4553 {"Destination", "qnet6.lr.dst",
4554 FT_STRING, BASE_NONE, NULL, 0,
4555 "LR Message destination node", HFILL}
4557 {&hf_qnet6_lr_dst_name_off,
4558 {"Offset", "qnet6.lr.dst.name.off",
4559 FT_UINT32, BASE_DEC, NULL, 0,
4560 "LR Message destination name offset", HFILL}
4562 {&hf_qnet6_lr_dst_name_len,
4563 {"Length", "qnet6.lr.dst.name.len",
4564 FT_UINT32, BASE_DEC, NULL, 0,
4565 "LR Message destination name length", HFILL}
4567 {&hf_qnet6_lr_dst_name_generated,
4568 {"Name", "qnet6.lr.dst.name",
4569 FT_STRING, BASE_NONE, NULL, 0,
4570 "LR Message destination name", HFILL}
4572 {&hf_qnet6_lr_dst_domain_off,
4573 {"Offset", "qnet6.lr.dst.domain.off",
4574 FT_UINT32, BASE_DEC, NULL, 0,
4575 "LR Message destination domain name offset", HFILL}
4577 {&hf_qnet6_lr_dst_domain_len,
4578 {"Length", "qnet6.lr.dst_domain_len",
4579 FT_UINT32, BASE_DEC, NULL, 0,
4580 "LR Message destination domain name length", HFILL}
4582 {&hf_qnet6_lr_dst_domain_generated,
4583 {"Domain", "qnet6.lr.dst.domain",
4584 FT_STRING, BASE_NONE, NULL, 0,
4585 "LR Message destination domain name", HFILL}
4587 {&hf_qnet6_lr_dst_addr_off,
4588 {"Offset", "qnet6.lr.dst.addr.off",
4589 FT_UINT32, BASE_DEC, NULL, 0,
4590 "LR Message destination address offset", HFILL}
4592 {&hf_qnet6_lr_dst_addr_len,
4593 {"Length", "qnet6.lr.dst.addr.len",
4594 FT_UINT32, BASE_DEC, NULL, 0,
4595 "LR Message destination address length", HFILL}
4597 {&hf_qnet6_lr_dst_addr_generated,
4598 {"Address", "qnet6.lr.dst.addr",
4599 FT_ETHER, BASE_NONE, NULL, 0,
4600 "LR Message destination address", HFILL}
4605 static hf_register_info hf_kif[] = {
4606 /* msgtype, size are the first 2 in all kif messages */
4607 {&hf_qnet6_kif_msgtype,
4608 {"Type", "qnet6.kif.type",
4609 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgtype_vals), QNET_KIF_MSGTYPE_MASK,
4610 "Kernel Interface Message Type", HFILL}
4612 {&hf_qnet6_kif_size,
4613 {"Size", "qnet6.kif.size",
4614 FT_UINT16, BASE_HEX, NULL, 0,
4615 "Kernel Interface Message header size", HFILL}
4617 /* some kif messages will include version as well */
4618 {&hf_qnet6_kif_version,
4619 {"Version", "qnet6.kif.version",
4620 FT_UINT32, BASE_HEX, NULL, 0,
4621 "Kernel Interface Message version", HFILL}
4623 /* connect message after msghdr */
4624 {&hf_qnet6_kif_connect,
4625 {"Connect", "qnet6.kif.connect",
4626 FT_STRING, BASE_NONE, NULL, 0,
4627 "Connect Message", HFILL}
4629 {&hf_qnet6_kif_msgsend,
4630 {"Msgsend", "qnet6.kif.msgsend",
4631 FT_STRING, BASE_NONE, NULL, 0,
4632 "Msgsend Message", HFILL}
4634 {&hf_qnet6_kif_connect_server_pid,
4635 {"Server_pid", "qnet6.kif.connect.server_pid",
4636 FT_UINT32, BASE_DEC, NULL, 0,
4637 "Kernel Interface Message Server Pid", HFILL}
4639 {&hf_qnet6_kif_connect_server_chid,
4640 {"Server_chid", "qnet6.kif.connect.server_chid",
4641 FT_UINT32, BASE_HEX_DEC, NULL, 0,
4642 "Kernel Interface Message Server channel id", HFILL}
4644 {&hf_qnet6_kif_connect_client_id,
4645 {"Client_id", "qnet6.kif.connect.client_id",
4646 FT_UINT32, BASE_HEX_DEC, NULL, 0,
4647 "Kernel Interface Message client id", HFILL}
4649 {&hf_qnet6_kif_connect_client_pid,
4650 {"Client_pid", "qnet6.kif.connect.client_pid",
4651 FT_UINT32, BASE_DEC, NULL, 0,
4652 "Kernel Interface Message Client Pid", HFILL}
4654 /* connect success message after msghdr */
4655 {&hf_qnet6_kif_connects_client_id,
4656 {"Client_id", "qnet6.kif.connect_success.client_id",
4657 FT_INT32, BASE_DEC, NULL, 0,
4658 "Kernel Interface Message client id", HFILL}
4660 {&hf_qnet6_kif_connects_server_id,
4661 {"Server_id", "qnet6.kif.connect_success.server_id",
4662 FT_INT32, BASE_DEC, NULL, 0,
4663 "Kernel Interface Message Server id", HFILL}
4665 {&hf_qnet6_kif_connects_scoid,
4666 {"Scoid", "qnet6.kif.connect_success.scoid",
4667 FT_INT32, BASE_DEC, NULL, 0,
4668 "Kernel Interface Message server connection id", HFILL}
4670 {&hf_qnet6_kif_connects_nbytes,
4671 {"Nbytes", "qnet6.kif.connect_success.nbytes",
4672 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4673 "Kernel Interface Message limit for msgsend", HFILL}
4675 /* connect fail after msghdr and version */
4676 {&hf_qnet6_kif_connectf_client_id,
4677 {"Client_id", "qnet6.kif.connect_fail.client_id",
4678 FT_INT32, BASE_DEC, NULL, 0,
4679 "Kernel Interface Connect Fail Message client id", HFILL}
4681 {&hf_qnet6_kif_connectf_status,
4682 {"Status", "qnet6.kif.connect_fail.status",
4683 FT_INT32, BASE_DEC, NULL, 0,
4684 "Kernel Interface Connect Fail Message Status", HFILL}
4686 /* connect death after msghdr */
4687 {&hf_qnet6_kif_connectd_client_id,
4688 {"Client_id", "qnet6.kif.connect_death.client_id",
4689 FT_INT32, BASE_DEC, NULL, 0,
4690 "Kernel Interface Connect Death Message client id", HFILL}
4693 /* msgsend message after msghdr */
4694 {&hf_qnet6_kif_msgsend_server_id,
4695 {"Server_id", "qnet6.kif.msgsend.server_id",
4696 FT_INT32, BASE_DEC, NULL, 0,
4697 "Kernel Interface MsgSend Message Server id", HFILL}
4699 {&hf_qnet6_kif_msgsend_client_handle,
4700 {"Client_handle", "qnet6.kif.msgsend.client_handle",
4701 FT_INT32, BASE_DEC, NULL, 0,
4702 "MsgSend Message client handle", HFILL}
4704 /* msgsend vtid_info here */
4705 {&hf_qnet6_kif_msgsend_vinfo,
4706 {"Vinfo", "qnet6.kif.msgsend.vinfo",
4707 FT_STRINGZ, BASE_NONE, NULL, 0,
4708 "Kernel Interface MsgSend Message virtual thread information", HFILL}
4710 {&hf_qnet6_kif_vtid_info_tid,
4711 {"Vtid", "qnet6.kif.msgsend.vtid_info.tid",
4712 FT_INT32, BASE_DEC, NULL, 0,
4713 "Virtual thread information thread id", HFILL}
4715 {&hf_qnet6_kif_vtid_info_coid,
4716 {"Coid", "qnet6.kif.msgsend.vtid_info.coid",
4717 FT_INT32, BASE_DEC, NULL, 0,
4718 "Kernel Interface MsgSend Message virtual thread connection id", HFILL}
4720 {&hf_qnet6_kif_vtid_info_priority,
4721 {"Priority", "qnet6.kif.msgsend.vtid_info.priority",
4722 FT_INT32, BASE_DEC, NULL, 0,
4723 "MsgSend Message virtual thread priority", HFILL}
4725 {&hf_qnet6_kif_vtid_info_srcmsglen,
4726 {"Srcmsglen", "qnet6.kif.msgsend.vtid_info.srcmsglen",
4727 FT_INT32, BASE_DEC, NULL, 0,
4728 "MsgSend Message virtual thread source message length", HFILL}
4730 {&hf_qnet6_kif_vtid_info_keydata,
4731 {"Keydata", "qnet6.kif.msgsend.vtid_info.keydata",
4732 FT_INT32, BASE_DEC, NULL, 0,
4733 "MsgSend Message virtual thread keydata", HFILL}
4735 {&hf_qnet6_kif_vtid_info_srcnd,
4736 {"Srcnd", "qnet6.kif.msgsend.vtid_info.srcnd",
4737 FT_INT32, BASE_DEC, NULL, 0,
4738 "MsgSend Message virtual thread source node id", HFILL}
4740 {&hf_qnet6_kif_vtid_info_dstmsglen,
4741 {"Dstmsglen", "qnet6.kif.msgsend.vtid_info.dstmsglen",
4742 FT_INT32, BASE_DEC, NULL, 0,
4743 "MsgSend Message virtual thread destination message length", HFILL}
4745 {&hf_qnet6_kif_vtid_info_zero,
4746 {"Zero", "qnet6.kif.msgsend.vtid_info.zero",
4747 FT_INT32, BASE_DEC, NULL, 0,
4748 "MsgSend Message virtual thread reserved part", HFILL}
4750 {&hf_qnet6_kif_msgsend_nbytes,
4751 {"Nbytes", "qnet6.kif.msgsend.nbytes",
4752 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4753 "Kernel Interface MsgSend Message limit for msgsend", HFILL}
4755 {&hf_qnet6_kif_msgread_msgread_handle,
4756 {"Msgread_handle", "qnet6.kif.msgread.msgread_handle",
4757 FT_INT32, BASE_DEC, NULL, 0,
4758 "MsgRead Message handle", HFILL}
4760 {&hf_qnet6_kif_msgread_client_handle,
4761 {"Client_handle", "qnet6.kif.msgread.client_handle",
4762 FT_INT32, BASE_DEC, NULL, 0,
4763 "MsgRead Message client handle", HFILL}
4765 {&hf_qnet6_kif_msgread_offset,
4766 {"Offset", "qnet6.kif.msgread.offset",
4767 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4768 "MsgRead Message limit for msgread", HFILL}
4770 {&hf_qnet6_kif_msgread_nbytes,
4771 {"Nbytes", "qnet6.kif.msgread.nbytes",
4772 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4773 "MsgRead Message limit for msgread", HFILL}
4775 /* msgwrite */
4776 {&hf_qnet6_kif_msgwrite_status,
4777 {"Status", "qnet6.kif.msgwrite.status",
4778 FT_INT32, BASE_DEC, NULL, 0,
4779 "Msgwrite Message client handle", HFILL}
4781 {&hf_qnet6_kif_msgwrite_handle,
4782 {"Handle", "qnet6.kif.msgwrite.handle",
4783 FT_INT32, BASE_DEC, NULL, 0,
4784 "Msgwrite Message client handle", HFILL}
4786 {&hf_qnet6_kif_msgwrite_offset,
4787 {"Offset", "qnet6.kif.msgwrite.offset",
4788 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4789 "Msgwrite Message limit for msgwrite", HFILL}
4791 {&hf_qnet6_kif_msgwrite_nbytes,
4792 {"Nbytes", "qnet6.kif.msgwrite.nbytes",
4793 FT_UINT32, BASE_DEC_HEX, NULL, 0,
4794 "Msgwrite Message limit for msgwrite", HFILL}
4796 {&hf_qnet6_kif_msgwrite_data,
4797 {"Data", "qnet6.kif.msgwrite.data",
4798 FT_BYTES, BASE_NONE, NULL, 0,
4799 NULL, HFILL}
4801 /* unblock */
4802 {&hf_qnet6_kif_unblock_server_id,
4803 {"Server_id", "qnet6.kif.unblock.server_id",
4804 FT_INT32, BASE_DEC, NULL, 0,
4805 "Unblock Message Server id", HFILL}
4807 {&hf_qnet6_kif_unblock_client_handle,
4808 {"Client_handle", "qnet6.kif.unblock.client_handle",
4809 FT_INT32, BASE_DEC, NULL, 0,
4810 "Unblock Message client handle", HFILL}
4812 {&hf_qnet6_kif_unblock_tid,
4813 {"Tid", "qnet6.kif.unblock.tid",
4814 FT_INT32, BASE_DEC, NULL, 0,
4815 "thread information thread id", HFILL}
4817 /* event */
4818 {&hf_qnet6_kif_event_client_handle,
4819 {"Client_handle", "qnet6.kif.event.client_handle",
4820 FT_INT32, BASE_DEC, NULL, 0,
4821 "Event Message client handle", HFILL}
4823 /* event */
4824 {&hf_qnet6_kif_event_event,
4825 {"Sigevent", "qnet6.kif.event.event",
4826 FT_NONE, BASE_NONE, NULL, 0,
4827 NULL, HFILL}
4829 {&hf_qnet6_kif_event_notify,
4830 {"Sigevent_notify", "qnet6.kif.event.sigevent_notify",
4831 FT_INT32, BASE_DEC, NULL, 0,
4832 "Event Message sigevent notify", HFILL}
4834 {&hf_qnet6_kif_event_union1,
4835 {"Sigevent_union1", "qnet6.kif.event.sigevent_union1",
4836 FT_INT32, BASE_DEC, NULL, 0,
4837 "Event Message sigevent union1", HFILL}
4839 {&hf_qnet6_kif_event_value,
4840 {"Sigevent_sigvalue", "qnet6.kif.event.sigevent_sigvalue",
4841 FT_INT32, BASE_DEC, NULL, 0,
4842 "Event Message sigevent sigvalue", HFILL}
4844 {&hf_qnet6_kif_event_union2,
4845 {"Sigevent_union2", "qnet6.kif.event.sigevent_union2",
4846 FT_INT32, BASE_DEC, NULL, 0,
4847 "Event Message sigevent union2", HFILL}
4849 /* pulse */
4850 /* will use msgsend */
4851 {&hf_qnet6_kif_pulse_pulse,
4852 {"Pulse", "qnet6.kif.pulse",
4853 FT_STRING, BASE_NONE, NULL, 0,
4854 NULL, HFILL}
4856 {&hf_qnet6_kif_pulse_pulse_type,
4857 {"Type", "qnet6.kif.pulse.pulse.type",
4858 FT_UINT16, BASE_HEX_DEC, NULL, 0,
4859 NULL, HFILL}
4861 {&hf_qnet6_kif_pulse_pulse_subtype,
4862 {"Subtype", "qnet6.kif.pulse.pulse.subtype",
4863 FT_UINT16, BASE_HEX_DEC, NULL, 0,
4864 NULL, HFILL}
4866 {&hf_qnet6_kif_pulse_pulse_code,
4867 {"Code", "qnet6.kif.pulse.pulse.code",
4868 FT_INT8, BASE_DEC, NULL, 0,
4869 NULL, HFILL}
4871 {&hf_qnet6_kif_pulse_pulse_reserved,
4872 {"Reserved", "qnet6.kif.pulse.pulse.reserved",
4873 FT_UINT24, BASE_DEC, NULL, 0,
4874 NULL, HFILL}
4876 {&hf_qnet6_kif_pulse_pulse_value,
4877 {"Value", "qnet6.kif.pulse.pulse.value",
4878 FT_UINT32, BASE_HEX_DEC, NULL, 0,
4879 NULL, HFILL}
4881 {&hf_qnet6_kif_pulse_pulse_scoid,
4882 {"Scoid", "qnet6.kif.pulse.pulse.scoid",
4883 FT_INT32, BASE_DEC, NULL, 0,
4884 NULL, HFILL}
4886 {&hf_qnet6_kif_pulse_priority,
4887 {"Priority", "qnet6.kif.pulse.priority",
4888 FT_INT32, BASE_DEC, NULL, 0,
4889 NULL, HFILL}
4891 /* signal */
4892 {&hf_qnet6_kif_signal_client_handle,
4893 {"Client_handle", "qnet6.kif.signal.client_handle",
4894 FT_INT32, BASE_DEC, NULL, 0,
4895 "Signal Message client handle", HFILL}
4897 {&hf_qnet6_kif_signal_pid,
4898 {"Pid", "qnet6.kif.signal.pid",
4899 FT_INT32, BASE_DEC, NULL, 0,
4900 "Signal Message from this pid", HFILL}
4902 {&hf_qnet6_kif_signal_tid,
4903 {"Tid", "qnet6.kif.signal.tid",
4904 FT_INT32, BASE_DEC, NULL, 0,
4905 "Signal Message from this tid", HFILL}
4907 {&hf_qnet6_kif_signal_signo,
4908 {"Signo", "qnet6.kif.signal.signo",
4909 FT_INT32, BASE_DEC, NULL, 0,
4910 "Signal number delivered to remote", HFILL}
4912 {&hf_qnet6_kif_signal_code,
4913 {"Code", "qnet6.kif.signal.code",
4914 FT_INT32, BASE_DEC, NULL, 0,
4915 "Signal code delivered to remote", HFILL}
4917 {&hf_qnet6_kif_signal_value,
4918 {"Value", "qnet6.kif.signal.value",
4919 FT_INT32, BASE_DEC, NULL, 0,
4920 "Signal value delivered to remote", HFILL}
4922 /* disconnect */
4923 {&hf_qnet6_kif_disconnect_server_id,
4924 {"Server_id", "qnet6.kif.disconnect.server_id",
4925 FT_INT32, BASE_DEC, NULL, 0,
4926 "disconnect message server id from connect success message", HFILL}
4928 /* msg info */
4929 {&hf_qnet6_kif_msg,
4930 {"Message", "qnet6.kif.msgsend.msg",
4931 FT_STRING, BASE_NONE, NULL, 0,
4932 NULL, HFILL}
4934 {&hf_qnet6_kif_msg_type,
4935 {"Type", "qnet6.kif.msgsend.msg.type",
4936 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &qnet6_kif_msgsend_msgtype_vals_ext, 0,
4937 NULL, HFILL}
4939 {&hf_qnet6_kif_msg_connect_subtype,
4940 {"Subtype", "qnet6.kif.msgsend.msg.connect.subtype",
4941 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_subtype_vals), 0,
4942 NULL, HFILL}
4944 {&hf_qnet6_kif_msg_connect_filetype,
4945 {"File_type", "qnet6.kif.msgsend.msg.connect.file_type",
4946 FT_UINT32, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_filetype_vals), 0,
4947 "file type", HFILL}
4949 {&hf_qnet6_kif_msg_connect_replymax,
4950 {"Reply_max", "qnet6.kif.msgsend.msg.connect.reply_max",
4951 FT_UINT16, BASE_HEX_DEC, NULL, 0,
4952 NULL, HFILL}
4954 {&hf_qnet6_kif_msg_connect_entrymax,
4955 {"Entry_max", "qnet6.kif.msgsend.msg.connect.entry_max",
4956 FT_UINT16, BASE_HEX_DEC, NULL, 0,
4957 NULL, HFILL}
4959 {&hf_qnet6_kif_msg_connect_key,
4960 {"Key", "qnet6.kif.msgsend.msg.connect.key",
4961 FT_UINT32, BASE_HEX, NULL, 0,
4962 NULL, HFILL}
4964 {&hf_qnet6_kif_msg_connect_handle,
4965 {"Handle", "qnet6.kif.msgsend.msg.connect.handle",
4966 FT_UINT32, BASE_HEX_DEC, NULL, 0,
4967 NULL, HFILL}
4969 {&hf_qnet6_kif_msg_connect_ioflag,
4970 {"Ioflag", "qnet6.kif.msgsend.msg.connect.ioflag",
4971 FT_UINT32, BASE_OCT, NULL, 0,
4972 "file io flag", HFILL}
4974 /* for FT_BOOLEAN, its display field must be parent bit width */
4976 {&hf_qnet6_kif_msg_connect_ioflag_access,
4977 {"access", "qnet6.kif.msgsend.msg.connect.ioflag.access",
4978 FT_UINT32, BASE_DEC, VALS(qnet6_kif_msgsend_msg_connect_ioflag_vals), 03,
4979 "access mode", HFILL}
4981 {&hf_qnet6_kif_msg_connect_ioflag_append,
4982 {"append", "qnet6.kif.msgsend.msg.connect.ioflag.append",
4983 FT_BOOLEAN, 32, NULL, 010,
4984 "append mode", HFILL}
4986 {&hf_qnet6_kif_msg_connect_ioflag_dsync,
4987 {"dsync", "qnet6.kif.msgsend.msg.connect.ioflag.dsync",
4988 FT_BOOLEAN, 32, NULL, 020,
4989 "data sync mode", HFILL}
4991 {&hf_qnet6_kif_msg_connect_ioflag_sync,
4992 {"sync", "qnet6.kif.msgsend.msg.connect.ioflag.sync",
4993 FT_BOOLEAN, 32, NULL, 040,
4994 "file sync mode", HFILL}
4996 {&hf_qnet6_kif_msg_connect_ioflag_rsync,
4997 {"rsync", "qnet6.kif.msgsend.msg.connect.ioflag.rsync",
4998 FT_BOOLEAN, 32, NULL, 0100,
4999 "alias for data sync mode", HFILL}
5001 {&hf_qnet6_kif_msg_connect_ioflag_nonblock,
5002 {"nonblock", "qnet6.kif.msgsend.msg.connect.ioflag.nonblock",
5003 FT_BOOLEAN, 32, NULL, 0200,
5004 "alias for data sync mode", HFILL}
5006 {&hf_qnet6_kif_msg_connect_ioflag_creat,
5007 {"creat", "qnet6.kif.msgsend.msg.connect.ioflag.creat",
5008 FT_BOOLEAN, 32, NULL, 0400,
5009 "creat mode", HFILL}
5011 {&hf_qnet6_kif_msg_connect_ioflag_truncate,
5012 {"truncate", "qnet6.kif.msgsend.msg.connect.ioflag.truncate",
5013 FT_BOOLEAN, 32, NULL, 01000,
5014 "truncate mode", HFILL}
5016 {&hf_qnet6_kif_msg_connect_ioflag_exclusive,
5017 {"exclusive", "qnet6.kif.msgsend.msg.connect.ioflag.exclusive",
5018 FT_BOOLEAN, 32, NULL, 02000,
5019 "exclusive mode", HFILL}
5021 {&hf_qnet6_kif_msg_connect_ioflag_noctrltty,
5022 {"noctrltty", "qnet6.kif.msgsend.msg.connect.ioflag.noctrltty",
5023 FT_BOOLEAN, 32, NULL, 04000,
5024 "noctrltty mode", HFILL}
5026 {&hf_qnet6_kif_msg_connect_ioflag_closexec,
5027 {"closexec", "qnet6.kif.msgsend.msg.connect.ioflag.closexec",
5028 FT_BOOLEAN, 32, NULL, 010000,
5029 "closexec mode", HFILL}
5031 {&hf_qnet6_kif_msg_connect_ioflag_realids,
5032 {"realids", "qnet6.kif.msgsend.msg.connect.ioflag.realids",
5033 FT_BOOLEAN, 32, NULL, 020000,
5034 "realids mode", HFILL}
5036 {&hf_qnet6_kif_msg_connect_ioflag_largefile,
5037 {"largefile", "qnet6.kif.msgsend.msg.connect.ioflag.largefile",
5038 FT_BOOLEAN, 32, NULL, 0100000,
5039 "largefile mode", HFILL}
5041 {&hf_qnet6_kif_msg_connect_ioflag_async,
5042 {"async", "qnet6.kif.msgsend.msg.connect.ioflag.async",
5043 FT_BOOLEAN, 32, NULL, 0200000,
5044 "async mode", HFILL}
5047 {&hf_qnet6_kif_msg_connect_mode,
5048 {"Mode", "qnet6.kif.msgsend.msg.connect.mode",
5049 FT_UINT32, BASE_HEX, NULL, 0,
5050 NULL, HFILL}
5052 {&hf_qnet6_kif_msg_connect_mode_other_exe,
5053 {"Oexec", "qnet6.kif.msgsend.msg.connect.mode.other.exec",
5054 FT_BOOLEAN, 32, NULL, 01,
5055 "others exec permission", HFILL}
5058 {&hf_qnet6_kif_msg_connect_mode_other_write,
5059 {"Owrite", "qnet6.kif.msgsend.msg.connect.mode.other.write",
5060 FT_BOOLEAN, 32, NULL, 02,
5061 "others write permission", HFILL}
5063 {&hf_qnet6_kif_msg_connect_mode_other_read,
5064 {"Oread", "qnet6.kif.msgsend.msg.connect.mode.other.read",
5065 FT_BOOLEAN, 32, NULL, 04,
5066 "others read permission", HFILL}
5068 {&hf_qnet6_kif_msg_connect_mode_group_exe,
5069 {"Gexec", "qnet6.kif.msgsend.msg.connect.mode.group.exec",
5070 FT_BOOLEAN, 32, NULL, 010,
5071 "group exec permission", HFILL}
5073 {&hf_qnet6_kif_msg_connect_mode_group_write,
5074 {"Gwrite", "qnet6.kif.msgsend.msg.connect.mode.group.write",
5075 FT_BOOLEAN, 32, NULL, 020,
5076 "group write permission", HFILL}
5078 {&hf_qnet6_kif_msg_connect_mode_group_read,
5079 {"Gread", "qnet6.kif.msgsend.msg.connect.mode.group.read",
5080 FT_BOOLEAN, 32, NULL, 040,
5081 "group read permission", HFILL}
5083 {&hf_qnet6_kif_msg_connect_mode_owner_exe,
5084 {"Uexec", "qnet6.kif.msgsend.msg.connect.mode.owner.exec",
5085 FT_BOOLEAN, 32, NULL, 0100,
5086 "owner exec permission", HFILL}
5088 {&hf_qnet6_kif_msg_connect_mode_owner_write,
5089 {"Uwrite", "qnet6.kif.msgsend.msg.connect.mode.owner.write",
5090 FT_BOOLEAN, 32, NULL, 0200,
5091 "owner write permission", HFILL}
5093 {&hf_qnet6_kif_msg_connect_mode_owner_read,
5094 {"Uread", "qnet6.kif.msgsend.msg.connect.mode.owner.read",
5095 FT_BOOLEAN, 32, NULL, 0400,
5096 "owner read permission", HFILL}
5098 {&hf_qnet6_kif_msg_connect_mode_sticky,
5099 {"sticky", "qnet6.kif.msgsend.msg.connect.mode.sticky",
5100 FT_BOOLEAN, 32, NULL, 01000,
5101 "sticky bit", HFILL}
5103 {&hf_qnet6_kif_msg_connect_mode_setgid,
5104 {"setgid", "qnet6.kif.msgsend.msg.connect.mode.setgid",
5105 FT_BOOLEAN, 32, NULL, 02000,
5106 "set gid when execution", HFILL}
5108 {&hf_qnet6_kif_msg_connect_mode_setuid,
5109 {"setuid", "qnet6.kif.msgsend.msg.connect.mode.setuid",
5110 FT_BOOLEAN, 32, NULL, 04000,
5111 "set uid when execution", HFILL}
5114 {&hf_qnet6_kif_msg_connect_mode_format,
5115 {"format", "qnet6.kif.msgsend.msg.connect.mode.format",
5116 FT_UINT32, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_mode_vals), 0xf000,
5117 "file format", HFILL}
5119 {&hf_qnet6_kif_msg_connect_sflag,
5120 {"Sflag", "qnet6.kif.msgsend.msg.connect.sflag",
5121 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_sflag_vals), 0,
5122 NULL, HFILL}
5124 {&hf_qnet6_kif_msg_connect_access,
5125 {"Access", "qnet6.kif.msgsend.msg.connect.access",
5126 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_access_vals), 0,
5127 NULL, HFILL}
5129 {&hf_qnet6_kif_msg_connect_zero,
5130 {"Zero", "qnet6.kif.msgsend.msg.connect.zero",
5131 FT_UINT16, BASE_HEX, NULL, 0,
5132 NULL, HFILL}
5134 {&hf_qnet6_kif_msg_connect_pathlen,
5135 {"Path_len", "qnet6.kif.msgsend.msg.connect.path_len",
5136 FT_UINT16, BASE_HEX, NULL, 0,
5137 "path length", HFILL}
5139 {&hf_qnet6_kif_msg_connect_eflag,
5140 {"Eflag", "qnet6.kif.msgsend.msg.connect.eflag",
5141 FT_UINT8, BASE_HEX, NULL, 0,
5142 NULL, HFILL}
5144 {&hf_qnet6_kif_msg_connect_eflag_dir,
5145 {"dir", "qnet6.kif.msgsend.msg.connect.eflag.dir",
5146 FT_BOOLEAN, 8, NULL, 1,
5147 "path referenced a directory", HFILL}
5149 {&hf_qnet6_kif_msg_connect_eflag_dot,
5150 {"dot", "qnet6.kif.msgsend.msg.connect.eflag.dot",
5151 FT_BOOLEAN, 8, NULL, 2,
5152 "Last component was . or ..", HFILL}
5154 {&hf_qnet6_kif_msg_connect_eflag_dotdot,
5155 {"dotdot", "qnet6.kif.msgsend.msg.connect.eflag.dotdot",
5156 FT_BOOLEAN, 8, NULL, 4,
5157 "Last component was ..", HFILL}
5159 {&hf_qnet6_kif_msg_connect_extratype,
5160 {"Extra_type", "qnet6.kif.msgsend.msg.connect.extra_type",
5161 FT_UINT8, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_extratype_vals), 0,
5162 NULL, HFILL}
5164 {&hf_qnet6_kif_msg_connect_extralen,
5165 {"Extra_len", "qnet6.kif.msgsend.msg.connect.extra_len",
5166 FT_UINT16, BASE_HEX_DEC, NULL, 0,
5167 "extra data length", HFILL}
5169 {&hf_qnet6_kif_msg_connect_path,
5170 {"Path", "qnet6.kif.msgsend.msg.connect.path",
5171 FT_STRINGZ, BASE_NONE, NULL, 0,
5172 "path name", HFILL}
5174 {&hf_qnet6_kif_msg_connect_pad_data,
5175 {"Pad data", "qnet6.kif.msgsend.msg.pad_data",
5176 FT_BYTES, BASE_NONE, NULL, 0,
5177 NULL, HFILL}
5179 {&hf_qnet6_kif_msg_connect_extra_link_ocb,
5180 {"Ocb", "qnet6.kif.msgsend.msg.connect.extra.link.ocb",
5181 FT_UINT32, BASE_HEX, NULL, 0,
5182 "Ocb pointer value", HFILL}
5184 {&hf_qnet6_kif_msg_connect_extra_symlink_path,
5185 {"Path", "qnet6.kif.msgsend.msg.connect.extra.symlink.path",
5186 FT_STRINGZ, BASE_NONE, NULL, 0,
5187 "Symlink new path name", HFILL}
5189 {&hf_qnet6_kif_msg_connect_extra_rename_path,
5190 {"Path", "qnet6.kif.msgsend.msg.connect.extra.rename.path",
5191 FT_STRINGZ, BASE_NONE, NULL, 0,
5192 "Rename old path name", HFILL}
5194 {&hf_qnet6_kif_msg_connect_extra_mount,
5195 {"Mount", "qnet6.kif.msgsend.msg.connect.extra.mount",
5196 FT_STRINGZ, BASE_NONE, NULL, 0,
5197 NULL, HFILL}
5199 {&hf_qnet6_kif_msg_connect_extra_data,
5200 {"Extra Data", "qnet6.kif.msgsend.msg.connect.extra.data",
5201 FT_BYTES, BASE_NONE, NULL, 0,
5202 NULL, HFILL}
5205 /* _IO_DEVCTL */
5206 {&hf_qnet6_kif_msg_io_combine_len,
5207 {"Combine_len", "qnet6.kif.msgsend.msg.combine_len",
5208 FT_UINT16, BASE_HEX, NULL, 0,
5209 "combine length", HFILL}
5211 /* when it is in this field is dcmd,
5212 * out ret_val
5214 {&hf_qnet6_kif_msg_devctl_dcmd,
5215 {"Dcmd", "qnet6.kif.msgsend.msg.dcmd",
5216 FT_UINT32, BASE_HEX, NULL, 0,
5217 "Devctl Command and Direction", HFILL}
5219 /* if use FT_INT32 then can't use bitmask !!! */
5220 {&hf_qnet6_kif_msg_devctl_dcmd_ccmd,
5221 {"Ccmd", "qnet6.kif.msgsend.msg.dcmd.ccmd",
5222 FT_UINT32, BASE_HEX_DEC|BASE_EXT_STRING, &qnet6_kif_msg_devctl_cmd_class_vals_ext, 0xffff,
5223 "Devctl Class+Command", HFILL}
5225 {&hf_qnet6_kif_msg_devctl_dcmd_cmd,
5226 {"Cmd", "qnet6.kif.msgsend.msg.dcmd.cmd",
5227 FT_UINT32, BASE_HEX_DEC, NULL, 0xff,
5228 "Devctl Command", HFILL}
5230 {&hf_qnet6_kif_msg_devctl_dcmd_class,
5231 {"Class", "qnet6.kif.msgsend.msg.dcmd.class",
5232 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &qnet6_kif_msgsend_msg_devctl_cmd_class_vals_ext, 0xff00,
5233 "Devctl Command", HFILL}
5235 {&hf_qnet6_kif_msg_devctl_dcmd_size,
5236 {"Size", "qnet6.kif.msgsend.msg.dcmd.size",
5237 FT_UINT32, BASE_HEX, NULL, 0x3fff0000,
5238 "Devctl Command", HFILL}
5240 {&hf_qnet6_kif_msg_devctl_dcmd_from,
5241 {"From", "qnet6.kif.msgsend.msg.dcmd.from",
5242 FT_UINT32, BASE_HEX, NULL, 0x40000000,
5243 "Devctl Direction has from", HFILL}
5245 {&hf_qnet6_kif_msg_devctl_dcmd_to,
5246 {"To", "qnet6.kif.msgsend.msg.dcmd.to",
5247 FT_UINT32, BASE_HEX, NULL, 0x80000000,
5248 "Devctl Direction has to", HFILL}
5250 {&hf_qnet6_kif_msg_devctl_nbytes,
5251 {"Nbytes", "qnet6.kif.msgsend.msg.nbytes",
5252 FT_INT32, BASE_DEC, NULL, 0,
5253 "payload length", HFILL}
5255 {&hf_qnet6_kif_msg_devctl_zero,
5256 {"Zero", "qnet6.kif.msgsend.msg.zero",
5257 FT_INT32, BASE_DEC, NULL, 0,
5258 "pad", HFILL}
5260 /* io_read */
5261 {&hf_qnet6_kif_msg_io_read_nbytes,
5262 {"Nbytes", "qnet6.kif.msgsend.msg.read.nbytes",
5263 FT_INT32, BASE_DEC, NULL, 0,
5264 "read buffer size", HFILL}
5266 {&hf_qnet6_kif_msg_io_read_xtypes,
5267 {"Xtypes", "qnet6.kif.msgsend.msg.read.xtypes",
5268 FT_UINT32, BASE_HEX, NULL, 0,
5269 "Extended types for io message", HFILL}
5271 {&hf_qnet6_kif_msg_io_read_xtypes_0_7,
5272 {"Xtype", "qnet6.kif.msgsend.msg.read.xtypes0-7",
5273 FT_UINT32, BASE_HEX, VALS(qnet6_kif_msgsend_msg_io_read_xtypes_vals), 0x000000ff,
5274 "Extended types 0-7 bits", HFILL}
5276 {&hf_qnet6_kif_msg_io_read_xtypes_8,
5277 {"DirExtraHint", "qnet6.kif.msgsend.msg.read.xtypes8",
5278 FT_UINT32, BASE_HEX, NULL, 0x00000100,
5279 "_IO_XFLAG_DIR_EXTRA_HINT", HFILL}
5281 {&hf_qnet6_kif_msg_io_read_xtypes_14,
5282 {"Nonblock", "qnet6.kif.msgsend.msg.read.xtypes14",
5283 FT_UINT32, BASE_HEX, NULL, 0x4000,
5284 "_IO_XFLAG_NONBLOCK", HFILL}
5286 {&hf_qnet6_kif_msg_io_read_xtypes_15,
5287 {"Block", "qnet6.kif.msgsend.msg.read.xtypes15",
5288 FT_UINT32, BASE_HEX, NULL, 0x8000,
5289 "_IO_XFLAG_BLOCK", HFILL}
5291 {&hf_qnet6_kif_msg_io_read_xoffset,
5292 {"Xoffset", "qnet6.kif.msgsend.msg.read.xoffset",
5293 FT_INT64, BASE_DEC, NULL, 0,
5294 "Extended offset in io message", HFILL}
5296 {&hf_qnet6_kif_msg_io_read_cond_min,
5297 {"Min", "qnet6.kif.msgsend.msg.read.readcond.min",
5298 FT_INT32, BASE_DEC, NULL, 0,
5299 "Extended attribute minimum characters for readcond", HFILL}
5301 {&hf_qnet6_kif_msg_io_read_cond_time,
5302 {"Time", "qnet6.kif.msgsend.msg.read.readcond.time",
5303 FT_INT32, BASE_DEC, NULL, 0,
5304 "Extended attribute for readcond in 1/10 second", HFILL}
5306 {&hf_qnet6_kif_msg_io_read_cond_timeout,
5307 {"Timeout", "qnet6.kif.msgsend.msg.read.readcond.timeout",
5308 FT_INT32, BASE_DEC, NULL, 0,
5309 "Extended attribute timeout for readcond in 1/10 second", HFILL}
5311 /* io_write */
5312 {&hf_qnet6_kif_msg_io_write_data,
5313 {"Write Data", "qnet6.kif.msgsend.msg.write.data",
5314 FT_BYTES, BASE_NONE, NULL, 0,
5315 NULL, HFILL}
5317 {&hf_qnet6_kif_msg_io_write_nbytes,
5318 {"Nbytes", "qnet6.kif.msgsend.msg.write.nbytes",
5319 FT_INT32, BASE_DEC, NULL, 0,
5320 "write buffer size", HFILL}
5322 {&hf_qnet6_kif_msg_io_write_xtypes,
5323 {"Xtypes", "qnet6.kif.msgsend.msg.write.xtypes",
5324 FT_UINT32, BASE_HEX, NULL, 0,
5325 "Extended types for io message", HFILL}
5327 {&hf_qnet6_kif_msg_io_write_xtypes_0_7,
5328 {"Xtype", "qnet6.kif.msgsend.msg.write.xtypes0-7",
5329 FT_UINT32, BASE_HEX, VALS(qnet6_kif_msgsend_msg_io_read_xtypes_vals), 0x000000ff,
5330 "Extended types 0-7 bits", HFILL}
5332 {&hf_qnet6_kif_msg_io_write_xtypes_8,
5333 {"DirExtraHint", "qnet6.kif.msgsend.msg.write.xtypes8",
5334 FT_UINT32, BASE_HEX, NULL, 0x00000100,
5335 "_IO_XFLAG_DIR_EXTRA_HINT", HFILL}
5337 {&hf_qnet6_kif_msg_io_write_xtypes_14,
5338 {"Nonblock", "qnet6.kif.msgsend.msg.write.xtypes14",
5339 FT_UINT32, BASE_HEX, NULL, 0x00004000,
5340 "_IO_XFLAG_NONBLOCK", HFILL}
5342 {&hf_qnet6_kif_msg_io_write_xtypes_15,
5343 {"Block", "qnet6.kif.msgsend.msg.write.xtypes15",
5344 FT_UINT32, BASE_HEX, NULL, 0x00008000,
5345 "_IO_XFLAG_BLOCK", HFILL}
5347 {&hf_qnet6_kif_msg_io_write_xoffset,
5348 {"Xoffset", "qnet6.kif.msgsend.msg.write.xoffset",
5349 FT_INT64, BASE_DEC, NULL, 0,
5350 "Extended offset in io message", HFILL}
5352 /* io_seek */
5353 {&hf_qnet6_kif_msg_seek_whence,
5354 {"Whence", "qnet6.kif.msgsend.msg.lseek.whence",
5355 FT_INT16, BASE_DEC, VALS(qnet6_kif_msgsend_msg_io_seek_whence_vals), 0,
5356 "whence in file", HFILL}
5358 {&hf_qnet6_kif_msg_seek_offset,
5359 {"Offset", "qnet6.kif.msgsend.msg.lseek.offset",
5360 FT_UINT64, BASE_DEC_HEX, NULL, 0,
5361 "offset according to whence in file", HFILL}
5363 /* io_pathconf */
5364 {&hf_qnet6_kif_msg_pathconf_name,
5365 {"name", "qnet6.kif.msgsend.msg.pathconf.name",
5366 FT_INT16, BASE_DEC|BASE_EXT_STRING, &qnet6_kif_msgsend_msg_io_pathconf_name_vals_ext, 0,
5367 "pathconf(name)", HFILL}
5369 /* io_chmod */
5370 {&hf_qnet6_kif_msg_io_chmod,
5371 {"mode", "qnet6.kif.msgsend.msg.chmod.mode",
5372 FT_UINT32, BASE_HEX, NULL, 0,
5373 NULL, HFILL}
5375 {&hf_qnet6_kif_msg_io_chmod_other_exe,
5376 {"Oexec", "qnet6.kif.msgsend.msg.chmod.other.exec",
5377 FT_BOOLEAN, 32, NULL, 01,
5378 "others exec permission", HFILL}
5381 {&hf_qnet6_kif_msg_io_chmod_other_write,
5382 {"Owrite", "qnet6.kif.msgsend.msg.chmod.other.write",
5383 FT_BOOLEAN, 32, NULL, 02,
5384 "others write permission", HFILL}
5386 {&hf_qnet6_kif_msg_io_chmod_other_read,
5387 {"Oread", "qnet6.kif.msgsend.msg.chmod.other.read",
5388 FT_BOOLEAN, 32, NULL, 04,
5389 "others read permission", HFILL}
5391 {&hf_qnet6_kif_msg_io_chmod_group_exe,
5392 {"Gexec", "qnet6.kif.msgsend.msg.chmod.group.exec",
5393 FT_BOOLEAN, 32, NULL, 010,
5394 "group exec permission", HFILL}
5396 {&hf_qnet6_kif_msg_io_chmod_group_write,
5397 {"Gwrite", "qnet6.kif.msgsend.msg.chmod.group.write",
5398 FT_BOOLEAN, 32, NULL, 020,
5399 "group write permission", HFILL}
5401 {&hf_qnet6_kif_msg_io_chmod_group_read,
5402 {"Gread", "qnet6.kif.msgsend.msg.chmod.group.read",
5403 FT_BOOLEAN, 32, NULL, 040,
5404 "group read permission", HFILL}
5406 {&hf_qnet6_kif_msg_io_chmod_owner_exe,
5407 {"Uexec", "qnet6.kif.msgsend.msg.chmod.owner.exec",
5408 FT_BOOLEAN, 32, NULL, 0100,
5409 "owner exec permission", HFILL}
5411 {&hf_qnet6_kif_msg_io_chmod_owner_write,
5412 {"Uwrite", "qnet6.kif.msgsend.msg.chmod.owner.write",
5413 FT_BOOLEAN, 32, NULL, 0200,
5414 "owner write permission", HFILL}
5416 {&hf_qnet6_kif_msg_io_chmod_owner_read,
5417 {"Uread", "qnet6.kif.msgsend.msg.chmod.owner.read",
5418 FT_BOOLEAN, 32, NULL, 0400,
5419 "owner read permission", HFILL}
5421 {&hf_qnet6_kif_msg_io_chmod_sticky,
5422 {"sticky", "qnet6.kif.msgsend.msg.chmod.sticky",
5423 FT_BOOLEAN, 32, NULL, 01000,
5424 "sticky bit", HFILL}
5426 {&hf_qnet6_kif_msg_io_chmod_setgid,
5427 {"setgid", "qnet6.kif.msgsend.msg.chmod.setgid",
5428 FT_BOOLEAN, 32, NULL, 02000,
5429 "set gid when execution", HFILL}
5431 {&hf_qnet6_kif_msg_io_chmod_setuid,
5432 {"setuid", "qnet6.kif.msgsend.msg.chmod.setuid",
5433 FT_BOOLEAN, 32, NULL, 04000,
5434 "set uid when execution", HFILL}
5436 /* io_chown */
5437 {&hf_qnet6_kif_msg_io_chown_gid,
5438 {"gid", "qnet6.kif.msgsend.msg.chown.gid",
5439 FT_UINT32, BASE_HEX, NULL, 0,
5440 "chown gid", HFILL}
5442 {&hf_qnet6_kif_msg_io_chown_uid,
5443 {"uid", "qnet6.kif.msgsend.msg.chown.uid",
5444 FT_UINT32, BASE_HEX, NULL, 0,
5445 "chown uid", HFILL}
5447 /* io_sync */
5448 {&hf_qnet6_kif_msg_io_sync,
5449 {"sync", "qnet6.kif.msgsend.msg.sync",
5450 FT_UINT32, BASE_HEX, NULL, 0,
5451 "io sync command", HFILL}
5453 {&hf_qnet6_kif_msg_syncflag_dsync,
5454 {"dsync", "qnet6.kif.msgsend.msg.sync.flag.dsync",
5455 FT_BOOLEAN, 32, NULL, 020,
5456 "data sync mode", HFILL}
5458 {&hf_qnet6_kif_msg_syncflag_sync,
5459 {"sync", "qnet6.kif.msgsend.msg.sync.flag.sync",
5460 FT_BOOLEAN, 32, NULL, 040,
5461 "file sync mode", HFILL}
5463 {&hf_qnet6_kif_msg_syncflag_rsync,
5464 {"rsync", "qnet6.kif.msgsend.msg.sync.flag.rsync",
5465 FT_BOOLEAN, 32, NULL, 0100,
5466 "alias for data sync mode", HFILL}
5468 /* utime */
5469 {&hf_qnet6_kif_msg_io_utime_curflag,
5470 {"curflag", "qnet6.kif.msgsend.msg.utime.curflag",
5471 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0,
5472 "whether use current time", HFILL}
5474 {&hf_qnet6_kif_msg_io_utime_actime,
5475 {"actime", "qnet6.kif.msgsend.msg.utime.actime",
5476 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
5477 "access time in seconds since the Epoch", HFILL}
5479 {&hf_qnet6_kif_msg_io_utime_modtime,
5480 {"modtime", "qnet6.kif.msgsend.msg.utime.modtime",
5481 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
5482 "modification time in seconds since the Epoch", HFILL}
5484 /* fdinfo */
5485 {&hf_qnet6_kif_msg_io_fdinfo_flags,
5486 {"flags", "qnet6.kif.msgsend.msg.fdinfo.flags",
5487 FT_BOOLEAN, BASE_NONE, TFS(&tfs_set_notset), 0,
5488 "_FDINFO_FLAG_LOCALPATH", HFILL}
5490 {&hf_qnet6_kif_msg_io_fdinfo_path_len,
5491 {"pathlen", "qnet6.kif.msgsend.msg.fdinfo.pathlen",
5492 FT_UINT32, BASE_HEX, NULL, 0,
5493 "returned path buffer's length", HFILL}
5495 {&hf_qnet6_kif_msg_io_fdinfo_reserved,
5496 {"reserved", "qnet6.kif.msgsend.msg.fdinfo.reserved",
5497 FT_UINT32, BASE_HEX, NULL, 0,
5498 "reserved fields", HFILL}
5500 /* lock */
5501 {&hf_qnet6_kif_msg_io_lock_subtype,
5502 {"subtype", "qnet6.kif.msgsend.msg.lock.subtype",
5503 FT_UINT32, BASE_HEX, NULL, 0,
5504 "io lock subytpe", HFILL}
5506 {&hf_qnet6_kif_msg_io_lock_nbytes,
5507 {"nbytes", "qnet6.kif.msgsend.msg.lock.nbytes",
5508 FT_UINT32, BASE_HEX, NULL, 0,
5509 "io lock nbytes", HFILL}
5511 /* space */
5512 {&hf_qnet6_kif_msg_io_space_subtype,
5513 {"subtype", "qnet6.kif.msgsend.msg.space.subtype",
5514 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_io_space_subtype_vals), 0,
5515 "io space subytpe", HFILL}
5517 {&hf_qnet6_kif_msg_io_space_whence,
5518 {"whence", "qnet6.kif.msgsend.msg.space.whence",
5519 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_io_seek_whence_vals), 0,
5520 "io space whence", HFILL}
5522 {&hf_qnet6_kif_msg_io_space_start,
5523 {"start", "qnet6.kif.msgsend.msg.space.start",
5524 FT_UINT64, BASE_HEX, NULL, 0,
5525 "io space start", HFILL}
5527 {&hf_qnet6_kif_msg_io_space_len,
5528 {"len", "qnet6.kif.msgsend.msg.space.len",
5529 FT_UINT64, BASE_HEX, NULL, 0,
5530 "io space len", HFILL}
5532 {&hf_qnet6_kif_msgsend_extra,
5533 {"Extra", "qnet6.kif.msgsend.extra",
5534 FT_STRING, BASE_NONE, NULL, 0,
5535 NULL, HFILL}
5538 /* msg_info */
5539 {&hf_qnet6_kif_msg_msginfo_nd,
5540 {"Node", "qnet6.kif.msgsend.msg_info.nd",
5541 FT_UINT32, BASE_DEC_HEX, NULL, 0,
5542 "node id", HFILL}
5544 {&hf_qnet6_kif_msg_msginfo_srcnd,
5545 {"Srcnode", "qnet6.kif.msgsend.msg_info.srcnd",
5546 FT_UINT32, BASE_DEC_HEX, NULL, 0,
5547 "source node id", HFILL}
5549 {&hf_qnet6_kif_msg_msginfo_pid,
5550 {"Pid", "qnet6.kif.msgsend.msg_info.pid",
5551 FT_INT32, BASE_DEC, NULL, 0,
5552 "process id", HFILL}
5554 {&hf_qnet6_kif_msg_msginfo_tid,
5555 {"Tid", "qnet6.kif.msgsend.msg_info.tid",
5556 FT_INT32, BASE_DEC, NULL, 0,
5557 "thread id", HFILL}
5559 {&hf_qnet6_kif_msg_msginfo_chid,
5560 {"Chid", "qnet6.kif.msgsend.msg_info.chid",
5561 FT_INT32, BASE_DEC, NULL, 0,
5562 "channel id", HFILL}
5564 {&hf_qnet6_kif_msg_msginfo_scoid,
5565 {"Scoid", "qnet6.kif.msgsend.msg_info.scoid",
5566 FT_INT32, BASE_DEC, NULL, 0,
5567 "server connection id", HFILL}
5569 {&hf_qnet6_kif_msg_msginfo_coid,
5570 {"Coid", "qnet6.kif.msgsend.msg_info.coid",
5571 FT_INT32, BASE_DEC, NULL, 0,
5572 "connection id", HFILL}
5574 {&hf_qnet6_kif_msg_msginfo_msglen,
5575 {"Msglen", "qnet6.kif.msgsend.msg_info.msglen",
5576 FT_INT32, BASE_DEC, NULL, 0,
5577 "message length", HFILL}
5579 {&hf_qnet6_kif_msg_msginfo_srcmsglen,
5580 {"Srcmsglen", "qnet6.kif.msgsend.msg_info.srcmsglen",
5581 FT_INT32, BASE_DEC, NULL, 0,
5582 "source message length", HFILL}
5584 {&hf_qnet6_kif_msg_msginfo_dstmsglen,
5585 {"Dstmsglen", "qnet6.kif.msgsend.msg_info.dstmsglen",
5586 FT_INT32, BASE_DEC, NULL, 0,
5587 "destination message length", HFILL}
5589 {&hf_qnet6_kif_msg_msginfo_priority,
5590 {"Priority", "qnet6.kif.msgsend.msg_info.priority",
5591 FT_INT16, BASE_DEC, NULL, 0,
5592 NULL, HFILL}
5594 {&hf_qnet6_kif_msg_msginfo_flags,
5595 {"Flags", "qnet6.kif.msgsend.msg_info.flags",
5596 FT_INT16, BASE_DEC, NULL, 0,
5597 NULL, HFILL}
5599 {&hf_qnet6_kif_msg_msginfo_reserved,
5600 {"Reserved", "qnet6.kif.msgsend.msg_info.reserved",
5601 FT_UINT32, BASE_HEX, NULL, 0,
5602 NULL, HFILL}
5604 /* openfd */
5606 {&hf_qnet6_kif_msg_openfd_ioflag,
5607 {"Ioflag", "qnet6.kif.msgsend.msg.openfd.ioflag",
5608 FT_UINT32, BASE_OCT, NULL, 0,
5609 "file io flag", HFILL}
5611 /* for FT_BOOLEAN, its display field must be parent bit width */
5613 {&hf_qnet6_kif_msg_openfd_ioflag_access,
5614 {"access", "qnet6.kif.msgsend.msg.openfd.ioflag.access",
5615 FT_UINT32, BASE_DEC, VALS(qnet6_kif_msgsend_msg_connect_ioflag_vals), 03,
5616 "access mode", HFILL}
5618 {&hf_qnet6_kif_msg_openfd_ioflag_append,
5619 {"append", "qnet6.kif.msgsend.msg.openfd.ioflag.append",
5620 FT_BOOLEAN, 32, NULL, 010,
5621 "append mode", HFILL}
5623 {&hf_qnet6_kif_msg_openfd_ioflag_dsync,
5624 {"dsync", "qnet6.kif.msgsend.msg.openfd.ioflag.dsync",
5625 FT_BOOLEAN, 32, NULL, 020,
5626 "data sync mode", HFILL}
5628 {&hf_qnet6_kif_msg_openfd_ioflag_sync,
5629 {"sync", "qnet6.kif.msgsend.msg.openfd.ioflag.sync",
5630 FT_BOOLEAN, 32, NULL, 040,
5631 "file sync mode", HFILL}
5633 {&hf_qnet6_kif_msg_openfd_ioflag_rsync,
5634 {"rsync", "qnet6.kif.msgsend.msg.openfd.ioflag.rsync",
5635 FT_BOOLEAN, 32, NULL, 0100,
5636 "alias for data sync mode", HFILL}
5638 {&hf_qnet6_kif_msg_openfd_ioflag_nonblock,
5639 {"nonblock", "qnet6.kif.msgsend.msg.openfd.ioflag.nonblock",
5640 FT_BOOLEAN, 32, NULL, 0200,
5641 "alias for data sync mode", HFILL}
5643 {&hf_qnet6_kif_msg_openfd_ioflag_creat,
5644 {"creat", "qnet6.kif.msgsend.msg.openfd.ioflag.creat",
5645 FT_BOOLEAN, 32, NULL, 0400,
5646 "creat mode", HFILL}
5648 {&hf_qnet6_kif_msg_openfd_ioflag_truncate,
5649 {"truncate", "qnet6.kif.msgsend.msg.openfd.ioflag.truncate",
5650 FT_BOOLEAN, 32, NULL, 01000,
5651 "truncate mode", HFILL}
5653 {&hf_qnet6_kif_msg_openfd_ioflag_exclusive,
5654 {"exclusive", "qnet6.kif.msgsend.msg.openfd.ioflag.exclusive",
5655 FT_BOOLEAN, 32, NULL, 02000,
5656 "exclusive mode", HFILL}
5658 {&hf_qnet6_kif_msg_openfd_ioflag_noctrltty,
5659 {"noctrltty", "qnet6.kif.msgsend.msg.openfd.ioflag.noctrltty",
5660 FT_BOOLEAN, 32, NULL, 04000,
5661 "noctrltty mode", HFILL}
5663 {&hf_qnet6_kif_msg_openfd_ioflag_closexec,
5664 {"closexec", "qnet6.kif.msgsend.msg.openfd.ioflag.closexec",
5665 FT_BOOLEAN, 32, NULL, 010000,
5666 "closexec mode", HFILL}
5668 {&hf_qnet6_kif_msg_openfd_ioflag_realids,
5669 {"realids", "qnet6.kif.msgsend.msg.openfd.ioflag.realids",
5670 FT_BOOLEAN, 32, NULL, 020000,
5671 "realids mode", HFILL}
5673 {&hf_qnet6_kif_msg_openfd_ioflag_largefile,
5674 {"largefile", "qnet6.kif.msgsend.msg.openfd.ioflag.largefile",
5675 FT_BOOLEAN, 32, NULL, 0100000,
5676 "largefile mode", HFILL}
5678 {&hf_qnet6_kif_msg_openfd_ioflag_async,
5679 {"async", "qnet6.kif.msgsend.msg.openfd.ioflag.async",
5680 FT_BOOLEAN, 32, NULL, 0200000,
5681 "async mode", HFILL}
5683 {&hf_qnet6_kif_msg_openfd_sflag,
5684 {"Sflag", "qnet6.kif.msgsend.msg.openfd.sflag",
5685 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_connect_sflag_vals), 0,
5686 NULL, HFILL}
5688 {&hf_qnet6_kif_msg_openfd_xtype,
5689 {"Xtype", "qnet6.kif.msgsend.msg.openfd.xtype",
5690 FT_UINT16, BASE_HEX, VALS(qnet6_kif_msgsend_msg_openfd_xtypes_vals), 0,
5691 "openfd xtype", HFILL}
5693 {&hf_qnet6_kif_msg_openfd_reserved,
5694 {"Reserved", "qnet6.kif.msgsend.msg.openfd.reserved",
5695 FT_UINT32, BASE_HEX, NULL, 0,
5696 "openfd reserved fields", HFILL}
5698 {&hf_qnet6_kif_msg_openfd_key,
5699 {"Key", "qnet6.kif.msgsend.msg.openfd.key",
5700 FT_UINT32, BASE_HEX, NULL, 0,
5701 "openfd key", HFILL}
5703 /* mmap */
5704 {&hf_qnet6_kif_msg_io_mmap_prot,
5705 {"Prot", "qnet6.kif.msgsend.msg.mmap.prot",
5706 FT_UINT32, BASE_HEX, NULL, 0,
5707 "protection field of mmap", HFILL}
5709 {&hf_qnet6_kif_msg_io_mmap_prot_read,
5710 {"Read", "qnet6.kif.msgsend.msg.mmap.prot.read",
5711 FT_BOOLEAN, 32, NULL, 0x00000100,
5712 "protection field of mmap", HFILL}
5714 {&hf_qnet6_kif_msg_io_mmap_prot_write,
5715 {"Write", "qnet6.kif.msgsend.msg.mmap.prot.write",
5716 FT_BOOLEAN, 32, NULL, 0x00000200,
5717 "protection field of mmap", HFILL}
5719 {&hf_qnet6_kif_msg_io_mmap_prot_exec,
5720 {"Exec", "qnet6.kif.msgsend.msg.mmap.prot.exec",
5721 FT_BOOLEAN, 32, NULL, 0x00000400,
5722 "protection field of mmap", HFILL}
5724 {&hf_qnet6_kif_msg_io_mmap_offset,
5725 {"Offset", "qnet6.kif.msgsend.msg.mmap.offset",
5726 FT_UINT64, BASE_HEX, NULL, 0,
5727 "offset of object", HFILL}
5729 /* notify */
5730 {&hf_qnet6_kif_msg_io_notify_action,
5731 {"Action", "qnet6.kif.msgsend.msg.notify.action",
5732 FT_UINT32, BASE_HEX, VALS(qnet6_kif_msgsend_msg_io_notify_action_vals), 0,
5733 "action of notify", HFILL}
5735 {&hf_qnet6_kif_msg_io_notify_flags,
5736 {"Action", "qnet6.kif.msgsend.msg.notify.action",
5737 FT_UINT32, BASE_HEX, NULL, 0,
5738 "flags of notify", HFILL}
5740 {&hf_qnet6_kif_msg_io_notify_flags_31,
5741 {"Exten", "qnet6.kif.msgsend.msg.notify.flags.exten",
5742 FT_BOOLEAN, 32, NULL, 0x80000000,
5743 "exten flag of notify", HFILL}
5745 {&hf_qnet6_kif_msg_io_notify_flags_30,
5746 {"Oband", "qnet6.kif.msgsend.msg.notify.flags.oband",
5747 FT_BOOLEAN, 32, NULL, 0x40000000,
5748 "outband flag of notify", HFILL}
5750 {&hf_qnet6_kif_msg_io_notify_flags_29,
5751 {"Output", "qnet6.kif.msgsend.msg.notify.flags.output",
5752 FT_BOOLEAN, 32, NULL, 0x20000000,
5753 "output flag of notify", HFILL}
5755 {&hf_qnet6_kif_msg_io_notify_flags_28,
5756 {"Input", "qnet6.kif.msgsend.msg.notify.flags.input",
5757 FT_BOOLEAN, 32, NULL, 0x10000000,
5758 "input flag of notify", HFILL}
5761 {&hf_qnet6_kif_msg_io_notify_mgr,
5762 {"Manager", "qnet6.kif.msgsend.msg.notify.mgr",
5763 FT_UINT64, BASE_HEX, NULL, 0,
5764 "managers of notify", HFILL}
5766 {&hf_qnet6_kif_msg_io_notify_flags_extra_mask,
5767 {"FlagsExtraMask", "qnet6.kif.msgsend.msg.notify.flags_extra_mask",
5768 FT_UINT32, BASE_HEX, NULL, 0,
5769 "extra mask of flags", HFILL}
5771 {&hf_qnet6_kif_msg_io_notify_flags_exten,
5772 {"FlagsExten", "qnet6.kif.msgsend.msg.notify.flags_exten",
5773 FT_UINT32, BASE_HEX, NULL, 0,
5774 "glags exten", HFILL}
5776 {&hf_qnet6_kif_msg_io_notify_nfds,
5777 {"Nfds", "qnet6.kif.msgsend.msg.notify.nfds",
5778 FT_UINT32, BASE_HEX, NULL, 0,
5779 "number of fds", HFILL}
5781 {&hf_qnet6_kif_msg_io_notify_fd_first,
5782 {"Firstfd", "qnet6.kif.msgsend.msg.notify.fd_first",
5783 FT_UINT32, BASE_HEX, NULL, 0,
5784 "first fd in nfds array", HFILL}
5786 {&hf_qnet6_kif_msg_io_notify_nfds_ready,
5787 {"Ready", "qnet6.kif.msgsend.msg.notify.nfds_ready",
5788 FT_UINT32, BASE_HEX, NULL, 0,
5789 "number of ready fds", HFILL}
5791 {&hf_qnet6_kif_msg_io_notify_timo,
5792 {"Timeout", "qnet6.kif.msgsend.msg.notify.timeo",
5793 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
5794 "notify timeout", HFILL}
5796 {&hf_qnet6_kif_msg_io_notify_fds,
5797 {"FDS", "qnet6.kif.msgsend.msg.notify.fds",
5798 FT_STRING, BASE_NONE, NULL, 0,
5799 NULL, HFILL}
5802 /* iomsg*/
5803 {&hf_qnet6_kif_msg_io_msg_mgrid,
5804 {"Mgrid", "qnet6.kif.msgsend.msg.iomsg.mgrid",
5805 FT_UINT16, BASE_HEX, VALS(qnet6_kif_mgr_types_vals), 0,
5806 "manager id", HFILL}
5808 {&hf_qnet6_kif_msg_io_msg_subtype,
5809 {"subtype", "qnet6.kif.msgsend.msg.iomsg.subtype",
5810 FT_UINT16, BASE_HEX, NULL, 0,
5811 NULL, HFILL}
5813 /* dup */
5814 {&hf_qnet6_kif_msg_io_dup_reserved,
5815 {"Reserved", "qnet6.kif.msgsend.msg.dup.reserved",
5816 FT_UINT32, BASE_HEX, NULL, 0,
5817 "dup message reserved fields", HFILL}
5819 {&hf_qnet6_kif_msg_io_dup_key,
5820 {"Key", "qnet6.kif.msgsend.msg.dup.key",
5821 FT_UINT32, BASE_HEX, NULL, 0,
5822 "dup message key", HFILL}
5825 /* _client_info */
5826 {&hf_qnet6_kif_client_info,
5827 {"Client_info", "qnet6.kif.client_info",
5828 FT_STRINGZ, BASE_NONE, NULL, 0,
5829 "client information", HFILL}
5831 {&hf_qnet6_kif_zero,
5832 {"Zero", "qnet6.kif.zero",
5833 FT_BYTES, BASE_NONE, NULL, 0,
5834 "All bytes should be zero", HFILL}
5836 {&hf_qnet6_kif_client_info_nd,
5837 {"Nd", "qnet6.kif.client_info.nd",
5838 FT_UINT32, BASE_DEC_HEX, NULL, 0,
5839 "node id", HFILL}
5841 {&hf_qnet6_kif_client_info_pid,
5842 {"Pid", "qnet6.kif.client_info.pid",
5843 FT_INT32, BASE_DEC, NULL, 0,
5844 "process id", HFILL}
5846 {&hf_qnet6_kif_client_info_sid,
5847 {"Sid", "qnet6.kif.client_info.sid",
5848 FT_INT32, BASE_DEC, NULL, 0,
5849 "server connection id", HFILL}
5851 {&hf_qnet6_kif_client_info_flags,
5852 {"Flags", "qnet6.kif.client_info.flags",
5853 FT_UINT32, BASE_HEX, NULL, 0,
5854 "connection flags", HFILL}
5856 {&hf_qnet6_kif_client_info_cred,
5857 {"Cred", "qnet6.kif.client_info.cred",
5858 FT_STRINGZ, BASE_NONE, NULL, 0,
5859 "client credential information", HFILL}
5861 {&hf_qnet6_kif_client_info_cred_ruid,
5862 {"Ruid", "qnet6.kif.client_info.cred.ruid",
5863 FT_INT32, BASE_DEC, NULL, 0,
5864 "client real uid", HFILL}
5866 {&hf_qnet6_kif_client_info_cred_euid,
5867 {"Euid", "qnet6.kif.client_info.cred.euid",
5868 FT_INT32, BASE_DEC, NULL, 0,
5869 "client effective uid", HFILL}
5871 {&hf_qnet6_kif_client_info_cred_suid,
5872 {"Suid", "qnet6.kif.client_info.cred.suid",
5873 FT_INT32, BASE_DEC, NULL, 0,
5874 "client saved uid", HFILL}
5876 {&hf_qnet6_kif_client_info_cred_rgid,
5877 {"Rgid", "qnet6.kif.client_info.cred.rgid",
5878 FT_INT32, BASE_DEC, NULL, 0,
5879 "client real gid", HFILL}
5881 {&hf_qnet6_kif_client_info_cred_egid,
5882 {"Egid", "qnet6.kif.client_info.cred.egid",
5883 FT_INT32, BASE_DEC, NULL, 0,
5884 "client effective gid", HFILL}
5886 {&hf_qnet6_kif_client_info_cred_sgid,
5887 {"Sgid", "qnet6.kif.client_info.cred.sgid",
5888 FT_INT32, BASE_DEC, NULL, 0,
5889 "client saved gid", HFILL}
5891 {&hf_qnet6_kif_client_info_cred_ngroups,
5892 {"Ngroups", "qnet6.kif.client_info.cred.ngroups",
5893 FT_UINT32, BASE_DEC_HEX, NULL, 0,
5894 "number of groups client belongs to", HFILL}
5896 {&hf_qnet6_kif_client_info_cred_grouplist,
5897 {"Grouplist", "qnet6.kif.client_info.cred.grouplist",
5898 FT_UINT32, BASE_DEC, NULL, 0,
5899 "groups client belongs to", HFILL}
5903 /* Setup protocol subtree array */
5904 static int *ett[] = {
5905 &ett_qnet6_l4,
5906 &ett_qnet6_flags,
5907 &ett_qnet6_qos_info
5909 static int *ett_lr[] = {
5910 &ett_qnet6_lr,
5911 &ett_qnet6_lr_src,
5912 &ett_qnet6_lr_src_name_subtree,
5913 &ett_qnet6_lr_src_domain_subtree,
5914 &ett_qnet6_lr_src_addr_subtree,
5915 &ett_qnet6_lr_dst,
5916 &ett_qnet6_lr_dst_name_subtree,
5917 &ett_qnet6_lr_dst_domain_subtree,
5918 &ett_qnet6_lr_dst_addr_subtree
5921 static int *ett_kif[] = {
5922 &ett_qnet6_kif,
5923 &ett_qnet6_kif_vinfo,
5924 &ett_qnet6_kif_pulse,
5925 &ett_qnet6_kif_event,
5926 &ett_qnet6_kif_msg,
5927 &ett_qnet6_kif_msg_ioflag,
5928 &ett_qnet6_kif_msg_mode,
5929 &ett_qnet6_kif_msg_eflag,
5930 &ett_qnet6_kif_connect,
5931 &ett_qnet6_kif_msgsend,
5932 &ett_qnet6_kif_client_info,
5933 &ett_qnet6_kif_client_info_cred,
5934 &ett_qnet6_kif_client_info_cred_group,
5935 &ett_qnet6_kif_msg_devctl_dcmd,
5936 &ett_qnet6_kif_msg_read_xtypes,
5937 &ett_qnet6_kif_msg_write_xtypes,
5938 &ett_qnet6_kif_chmod_mode,
5939 &ett_qnet6_kif_msg_sync,
5940 &ett_qnet6_kif_msg_msginfo,
5941 &ett_qnet6_kif_msg_openfd_ioflag,
5942 &ett_qnet6_kif_msg_prot,
5943 &ett_qnet6_kif_msg_notify_flags,
5944 &ett_qnet6_kif_msg_notify_fds
5946 static int *ett_nr[] = {
5947 &ett_qnet6_nr
5949 static int *ett_qos[] = {
5950 &ett_qnet6_qos
5952 module_t *qnet6_module;
5954 /* Register the protocol name and description */
5955 proto_qnet6_l4 = proto_register_protocol("QNX6 QNET LWL4 protocol", "LWL4", "lwl4");
5957 proto_qnet6_qos = proto_register_protocol("QNX6 QNET QOS protocol", "QOS", "qos");
5959 proto_qnet6_lr = proto_register_protocol("QNX6 QNET LR protocol", "LR", "lr");
5961 proto_qnet6_kif = proto_register_protocol("QNX6 QNET KIF protocol", "KIF", "kif");
5963 proto_qnet6_nr = proto_register_protocol("QNX6 QNET Network Resolver protocol", "NR", "nr");
5965 /* Register the dissector handle */
5966 qnet6_handle = register_dissector("lwl4", dissect_qnet6, proto_qnet6_l4);
5968 /* Required function calls to register the header fields and subtrees used */
5969 proto_register_field_array(proto_qnet6_l4, hf, array_length(hf));
5970 proto_register_subtree_array(ett, array_length(ett));
5972 proto_register_field_array(proto_qnet6_qos, hf_qos, array_length(hf_qos));
5973 proto_register_subtree_array(ett_qos, array_length(ett_qos));
5975 proto_register_field_array(proto_qnet6_lr, hf_lr, array_length(hf_lr));
5976 proto_register_subtree_array(ett_lr, array_length(ett_lr));
5978 proto_register_field_array(proto_qnet6_kif, hf_kif, array_length(hf_kif));
5979 proto_register_subtree_array(ett_kif, array_length(ett_kif));
5981 proto_register_field_array(proto_qnet6_nr, hf_nr, array_length(hf_nr));
5982 proto_register_subtree_array(ett_nr, array_length(ett_nr));
5984 qnet6_module = prefs_register_protocol(proto_qnet6_l4, NULL);
5985 prefs_register_bool_preference(qnet6_module, "check_crc",
5986 "Validate the LWL4 crc even crc bit is not set",
5987 "Whether to validate the LWL4 crc when crc bit is not set",
5988 &qnet6_lwl4_check_crc);
5993 void
5994 proto_reg_handoff_qnet6(void)
5996 dissector_add_uint("ethertype", ETHERTYPE_QNX_QNET6, qnet6_handle);
5997 dissector_add_uint("ip.proto", IP_PROTO_QNX, qnet6_handle);
6002 * Editor modelines
6004 * Local Variables:
6005 * c-basic-offset: 2
6006 * tab-width: 8
6007 * indent-tabs-mode: nil
6008 * End:
6010 * ex: set shiftwidth=2 tabstop=8 expandtab:
6011 * :indentSize=2:tabSize=8:noTabs=true: