Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ceph.c
blob001fbb413bb70c207a0e6406551f1441a6d6545a
1 /* packet-ceph.c
2 * Routines for Ceph dissection
3 * Copyright 2014, Kevin Cox <kevincox@kevincox.ca>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "config.h"
14 #include <epan/packet.h>
15 #include <epan/expert.h>
16 #include <epan/conversation.h>
17 #include <epan/to_str.h>
18 #include <epan/proto_data.h>
19 #include <epan/tfs.h>
21 void proto_reg_handoff_ceph(void);
22 void proto_register_ceph(void);
24 /* Extending the Ceph Dissector.
26 * Hello, this is a quick overview of the insertion points in the Ceph dissector
27 * it is assumed that you know how dissectors work in general (if not please
28 * read 'doc/README.dissector' and related documents).
30 * If you have any questions feel free to contact Kevin <kevincox@kevincox.ca>.
32 * ## Adding a MSGR Tag
34 * To add a MSGR tag you must update the switch statements inside both
35 * `c_dissect_msgr()` to actually dissect the data and `c_pdu_end()` to
36 * calculate the length of the data.
38 * ## Adding a New Message.
40 * To add a new message type you simply create a new function
41 * `c_dissect_msg_{name}()` with the same signature as the others. Please
42 * insert your function in order of the tag value like the others.
44 * Then you simply add it into the switch in `c_dissect_msg()` (also in the
45 * correct order). Your message will then be dissected when encountered.
47 * ## Supporting new encodings.
49 * ### Message Encodings.
51 * The encoding version of messages is available in `data->head.ver` and the
52 * code should be modified to conditionally decode the new version of the
53 * message.
55 * ### Data Type Encodings.
57 * Data types encoded using Ceph's `ENCODE_START()` macro can be decoded by
58 * using `c_dissect_encoded()` to extract the version and length. You can
59 * then conditionally decode using the version.
61 * Please rely on the length returned by `c_dissect_encoded()` to ensure future
62 * compatibility.
65 static dissector_handle_t ceph_handle;
67 /* Initialize the protocol and registered fields */
68 static int proto_ceph;
69 static int hf_filter_data;
70 static int hf_node_id;
71 static int hf_node_type;
72 static int hf_node_nonce;
73 static int hf_entityinst_name;
74 static int hf_entityinst_addr;
75 static int hf_EntityName;
76 static int hf_EntityName_type;
77 static int hf_EntityName_id;
78 static int hf_src_slug;
79 static int hf_src_type;
80 static int hf_dst_type;
81 static int hf_dst_slug;
82 static int hf_banner;
83 static int hf_client_info;
84 static int hf_server_info;
85 static int hf_sockaddr;
86 static int hf_inet_family;
87 static int hf_port;
88 static int hf_addr_ipv4;
89 static int hf_addr_ipv6;
90 static int hf_data_data;
91 static int hf_data_size;
92 static int hf_string_data;
93 static int hf_string_size;
94 static int hf_keepalive_time;
95 static int hf_encoded_ver;
96 static int hf_encoded_compat;
97 static int hf_encoded_size;
98 static int hf_version;
99 static int hf_epoch;
100 static int hf_pool;
101 static int hf_key;
102 static int hf_namespace;
103 static int hf_hash;
104 static int hf_pgid_ver;
105 static int hf_pgid_pool;
106 static int hf_pgid_seed;
107 static int hf_pgid_preferred;
108 static int hf_pg_create_epoch;
109 static int hf_pg_create_parent;
110 static int hf_pg_create_splitbits;
111 static int hf_path_ver;
112 static int hf_path_inode;
113 static int hf_path_rel;
114 static int hf_mds_release_inode;
115 static int hf_mds_release_capid;
116 static int hf_mds_release_new;
117 static int hf_mds_release_wanted;
118 static int hf_mds_release_seq;
119 static int hf_mds_release_seq_issue;
120 static int hf_mds_release_mseq;
121 static int hf_mds_release_dname_seq;
122 static int hf_mds_release_dname;
123 static int hf_hitset_params;
124 static int hf_hitset_params_type;
125 static int hf_hitset_params_exphash_count;
126 static int hf_hitset_params_exphash_hit;
127 static int hf_snapinfo;
128 static int hf_snapinfo_id;
129 static int hf_snapinfo_time;
130 static int hf_snapinfo_name;
131 static int hf_pgpool;
132 static int hf_pgpool_type;
133 static int hf_pgpool_size;
134 static int hf_pgpool_crush_ruleset;
135 static int hf_pgpool_hash;
136 static int hf_pgpool_pgnum;
137 static int hf_pgpool_pgpnum;
138 static int hf_pgpool_changed;
139 static int hf_pgpool_snapseq;
140 static int hf_pgpool_snapepoch;
141 static int hf_pgpool_snap;
142 static int hf_pgpool_snap_id;
143 static int hf_pgpool_snapdel;
144 static int hf_pgpool_snapdel_from;
145 static int hf_pgpool_snapdel_to;
146 static int hf_pgpool_uid;
147 static int hf_pgpool_flags_low;
148 static int hf_pgpool_flags_high;
149 static int hf_pgpool_crash_reply_interval;
150 static int hf_pgpool_min_size;
151 static int hf_pgpool_quota_bytes;
152 static int hf_pgpool_quota_objects;
153 static int hf_pgpool_tier;
154 static int hf_pgpool_tierof;
155 static int hf_pgpool_cachemode;
156 static int hf_pgpool_readtier;
157 static int hf_pgpool_writetier;
158 static int hf_pgpool_property;
159 static int hf_pgpool_property_key;
160 static int hf_pgpool_property_val;
161 static int hf_pgpool_hitset_period;
162 static int hf_pgpool_hitset_count;
163 static int hf_pgpool_stripewidth;
164 static int hf_pgpool_targetmaxsize;
165 static int hf_pgpool_targetmaxobj;
166 static int hf_pgpool_cache_targetdirtyratio;
167 static int hf_pgpool_cache_targetfullratio;
168 static int hf_pgpool_cache_flushage_min;
169 static int hf_pgpool_cache_evictage_min;
170 static int hf_pgpool_erasurecode_profile;
171 static int hf_pgpool_lastforceresend;
172 static int hf_pgpool_flag_hashpool;
173 static int hf_pgpool_flag_full;
174 static int hf_pgpool_flag_fake_ec_pool;
175 static int hf_monmap;
176 static int hf_monmap_fsid;
177 static int hf_monmap_epoch;
178 static int hf_monmap_address;
179 static int hf_monmap_address_name;
180 static int hf_monmap_address_addr;
181 static int hf_monmap_changed;
182 static int hf_monmap_created;
183 static int hf_pg_stat_ver;
184 static int hf_pg_stat_seq;
185 static int hf_pg_stat_epoch;
186 static int hf_pg_stat_state;
187 static int hf_pg_stat_logstart;
188 static int hf_pg_stat_logstartondisk;
189 static int hf_pg_stat_created;
190 static int hf_pg_stat_lastepochclean;
191 static int hf_pg_stat_parent;
192 static int hf_pg_stat_parent_splitbits;
193 static int hf_pg_stat_lastscrub;
194 static int hf_pg_stat_lastscrubstamp;
195 static int hf_pg_stat_stats;
196 static int hf_pg_stat_logsize;
197 static int hf_pg_stat_logsizeondisk;
198 static int hf_pg_stat_up;
199 static int hf_pg_stat_acting;
200 static int hf_pg_stat_lastfresh;
201 static int hf_pg_stat_lastchange;
202 static int hf_pg_stat_lastactive;
203 static int hf_pg_stat_lastclean;
204 static int hf_pg_stat_lastunstale;
205 static int hf_pg_stat_mappingepoch;
206 static int hf_pg_stat_lastdeepscrub;
207 static int hf_pg_stat_lastdeepscrubstamp;
208 static int hf_pg_stat_statsinvalid;
209 static int hf_pg_stat_lastcleanscrubstamp;
210 static int hf_pg_stat_lastbecameactive;
211 static int hf_pg_stat_dirtystatsinvalid;
212 static int hf_pg_stat_upprimary;
213 static int hf_pg_stat_actingprimary;
214 static int hf_pg_stat_omapstatsinvalid;
215 static int hf_pg_stat_hitsetstatsinvalid;
216 static int hf_crush;
217 static int hf_osd_peerstat;
218 static int hf_osd_peerstat_timestamp;
219 static int hf_featureset_mask;
220 static int hf_featureset_name;
221 static int hf_featureset_name_val;
222 static int hf_featureset_name_name;
223 static int hf_compatset;
224 static int hf_compatset_compat;
225 static int hf_compatset_compatro;
226 static int hf_compatset_incompat;
227 static int hf_osd_superblock;
228 static int hf_osd_superblock_clusterfsid;
229 static int hf_osd_superblock_role;
230 static int hf_osd_superblock_epoch;
231 static int hf_osd_superblock_map_old;
232 static int hf_osd_superblock_map_new;
233 static int hf_osd_superblock_weight;
234 static int hf_osd_superblock_mounted;
235 static int hf_osd_superblock_osdfsid;
236 static int hf_osd_superblock_clean;
237 static int hf_osd_superblock_full;
238 static int hf_osdinfo_ver;
239 static int hf_osdinfo_lastclean_begin;
240 static int hf_osdinfo_lastclean_end;
241 static int hf_osdinfo_up_from;
242 static int hf_osdinfo_up_through;
243 static int hf_osdinfo_downat;
244 static int hf_osdinfo_lostat;
245 static int hf_osdxinfo_down;
246 static int hf_osdxinfo_laggy_probability;
247 static int hf_osdxinfo_laggy_interval;
248 static int hf_osdxinfo_oldweight;
249 static int hf_perfstat_commitlatency;
250 static int hf_perfstat_applylatency;
251 static int hf_osdstat;
252 static int hf_osdstat_kb;
253 static int hf_osdstat_kbused;
254 static int hf_osdstat_kbavail;
255 static int hf_osdstat_trimqueue;
256 static int hf_osdstat_trimming;
257 static int hf_osdstat_hbin;
258 static int hf_osdstat_hbout;
259 static int hf_osdstat_opqueue;
260 static int hf_osdstat_fsperf;
261 static int hf_osdmap;
262 static int hf_osdmap_client;
263 static int hf_osdmap_fsid;
264 static int hf_osdmap_epoch;
265 static int hf_osdmap_created;
266 static int hf_osdmap_modified;
267 static int hf_osdmap_pool;
268 static int hf_osdmap_pool_id;
269 static int hf_osdmap_poolname_item;
270 static int hf_osdmap_poolname;
271 static int hf_osdmap_poolmax;
272 static int hf_osdmap_flags;
273 static int hf_osdmap_osdmax;
274 static int hf_osdmap_osd_state;
275 static int hf_osdmap_osd_weight;
276 static int hf_osdmap_osd_addr;
277 static int hf_osdmap_pgtmp;
278 static int hf_osdmap_pgtmp_pg;
279 static int hf_osdmap_pgtmp_val;
280 static int hf_osdmap_primarytmp;
281 static int hf_osdmap_primarytmp_pg;
282 static int hf_osdmap_primarytmp_val;
283 static int hf_osdmap_osd_primaryaffinity;
284 static int hf_osdmap_erasurecodeprofile;
285 static int hf_osdmap_erasurecodeprofile_name;
286 static int hf_osdmap_erasurecodeprofile_prop;
287 static int hf_osdmap_erasurecodeprofile_k;
288 static int hf_osdmap_erasurecodeprofile_v;
289 static int hf_osdmap_osd;
290 static int hf_osdmap_hbaddr_back;
291 static int hf_osdmap_osd_info;
292 static int hf_osdmap_blacklist;
293 static int hf_osdmap_blacklist_addr;
294 static int hf_osdmap_blacklist_time;
295 static int hf_osdmap_cluster_addr;
296 static int hf_osdmap_cluster_snapepoch;
297 static int hf_osdmap_cluster_snap;
298 static int hf_osdmap_osd_uuid;
299 static int hf_osdmap_osd_xinfo;
300 static int hf_osdmap_hbaddr_front;
301 static int hf_osdmap_inc;
302 static int hf_osdmap_inc_client;
303 static int hf_osdmap_inc_fsid;
304 static int hf_osdmap_inc_osd;
305 static int hf_features_high;
306 static int hf_features_low;
307 static int hf_feature_uid;
308 static int hf_feature_nosrcaddr;
309 static int hf_feature_monclockcheck;
310 static int hf_feature_flock;
311 static int hf_feature_subscribe2;
312 static int hf_feature_monnames;
313 static int hf_feature_reconnect_seq;
314 static int hf_feature_dirlayouthash;
315 static int hf_feature_objectlocator;
316 static int hf_feature_pgid64;
317 static int hf_feature_incsubosdmap;
318 static int hf_feature_pgpool3;
319 static int hf_feature_osdreplymux;
320 static int hf_feature_osdenc;
321 static int hf_feature_omap;
322 static int hf_feature_monenc;
323 static int hf_feature_query_t;
324 static int hf_feature_indep_pg_map;
325 static int hf_feature_crush_tunables;
326 static int hf_feature_chunky_scrub;
327 static int hf_feature_mon_nullroute;
328 static int hf_feature_mon_gv;
329 static int hf_feature_backfill_reservation;
330 static int hf_feature_msg_auth;
331 static int hf_feature_recovery_reservation;
332 static int hf_feature_crush_tunables2;
333 static int hf_feature_createpoolid;
334 static int hf_feature_reply_create_inode;
335 static int hf_feature_osd_hbmsgs;
336 static int hf_feature_mdsenc;
337 static int hf_feature_osdhashpspool;
338 static int hf_feature_mon_single_paxos;
339 static int hf_feature_osd_snapmapper;
340 static int hf_feature_mon_scrub;
341 static int hf_feature_osd_packed_recovery;
342 static int hf_feature_osd_cachepool;
343 static int hf_feature_crush_v2;
344 static int hf_feature_export_peer;
345 static int hf_feature_osd_erasure_codes;
346 static int hf_feature_osd_tmap2omap;
347 static int hf_feature_osdmap_enc;
348 static int hf_feature_mds_inline_data;
349 static int hf_feature_crush_tunables3;
350 static int hf_feature_osd_primary_affinity;
351 static int hf_feature_msgr_keepalive2;
352 static int hf_feature_reserved;
353 static int hf_connect_host_type;
354 static int hf_connect_seq_global;
355 static int hf_connect_seq;
356 static int hf_connect_proto_ver;
357 static int hf_connect_auth_proto;
358 static int hf_connect_auth_size;
359 static int hf_connect_auth;
360 static int hf_flags;
361 static int hf_flag_lossy;
362 static int hf_osd_flags;
363 static int hf_osd_flag_ack;
364 static int hf_osd_flag_onnvram;
365 static int hf_osd_flag_ondisk;
366 static int hf_osd_flag_retry;
367 static int hf_osd_flag_read;
368 static int hf_osd_flag_write;
369 static int hf_osd_flag_ordersnap;
370 static int hf_osd_flag_peerstat_old;
371 static int hf_osd_flag_balance_reads;
372 static int hf_osd_flag_parallelexec;
373 static int hf_osd_flag_pgop;
374 static int hf_osd_flag_exec;
375 static int hf_osd_flag_exec_public;
376 static int hf_osd_flag_localize_reads;
377 static int hf_osd_flag_rwordered;
378 static int hf_osd_flag_ignore_cache;
379 static int hf_osd_flag_skiprwlocks;
380 static int hf_osd_flag_ignore_overlay;
381 static int hf_osd_flag_flush;
382 static int hf_osd_flag_map_snap_clone;
383 static int hf_osd_flag_enforce_snapc;
384 static int hf_osd_op_type;
385 static int hf_osd_op_data;
386 static int hf_osd_op_extent_off;
387 static int hf_osd_op_extent_size;
388 static int hf_osd_op_extent_trunc_size;
389 static int hf_osd_op_extent_trunc_seq;
390 static int hf_osd_op_payload_size;
391 static int hf_osd_redirect_oloc;
392 static int hf_osd_redirect_obj;
393 static int hf_osd_redirect_osdinstr;
394 static int hf_osd_redirect_osdinstr_data;
395 static int hf_osd_redirect_osdinstr_len;
396 static int hf_statsum_bytes;
397 static int hf_statsum_objects;
398 static int hf_statsum_clones;
399 static int hf_statsum_copies;
400 static int hf_statsum_missing;
401 static int hf_statsum_degraded;
402 static int hf_statsum_unfound;
403 static int hf_statsum_read_bytes;
404 static int hf_statsum_read_kbytes;
405 static int hf_statsum_written_bytes;
406 static int hf_statsum_written_kbytes;
407 static int hf_statsum_scrub_errors;
408 static int hf_statsum_recovered;
409 static int hf_statsum_bytes_recovered;
410 static int hf_statsum_keys_recovered;
411 static int hf_statsum_shallow_scrub_errors;
412 static int hf_statsum_deep_scrub_errors;
413 static int hf_statsum_dirty;
414 static int hf_statsum_whiteouts;
415 static int hf_statsum_omap;
416 static int hf_statsum_hitset_archive;
417 static int hf_connect;
418 static int hf_connect_reply;
419 static int hf_tag;
420 static int hf_ack;
421 static int hf_seq_existing;
422 static int hf_seq_new;
423 static int hf_head;
424 static int hf_head_seq;
425 static int hf_head_tid;
426 static int hf_head_type;
427 static int hf_head_priority;
428 static int hf_head_version;
429 static int hf_head_front_size;
430 static int hf_head_middle_size;
431 static int hf_head_data_size;
432 static int hf_head_data_off;
433 static int hf_head_srcname;
434 static int hf_head_compat_version;
435 static int hf_head_reserved;
436 static int hf_head_crc;
437 static int hf_foot;
438 static int hf_foot_front_crc;
439 static int hf_foot_middle_crc;
440 static int hf_foot_data_crc;
441 static int hf_foot_signature;
442 static int hf_msg_front;
443 static int hf_msg_middle;
444 static int hf_msg_data;
445 static int hf_statcollection;
446 static int hf_paxos;
447 static int hf_paxos_ver;
448 static int hf_paxos_mon;
449 static int hf_paxos_mon_tid;
450 static int hf_msg_mon_map;
451 static int hf_msg_statfs;
452 static int hf_msg_statfs_fsid;
453 static int hf_msg_statfsreply;
454 static int hf_msg_statfsreply_fsid;
455 static int hf_msg_statfsreply_ver;
456 static int hf_msg_statfsreply_kb;
457 static int hf_msg_statfsreply_kbused;
458 static int hf_msg_statfsreply_kbavail;
459 static int hf_msg_statfsreply_obj;
460 static int hf_msg_mon_sub;
461 static int hf_msg_mon_sub_item;
462 static int hf_msg_mon_sub_item_len;
463 static int hf_msg_mon_sub_what;
464 static int hf_msg_mon_sub_start;
465 static int hf_msg_mon_sub_flags;
466 static int hf_msg_mon_sub_flags_onetime;
467 static int hf_msg_mon_sub_ack;
468 static int hf_msg_mon_sub_ack_interval;
469 static int hf_msg_mon_sub_ack_fsid;
470 static int hf_msg_auth;
471 static int hf_msg_auth_proto;
472 static int hf_msg_auth_supportedproto;
473 static int hf_msg_auth_supportedproto_ver;
474 static int hf_msg_auth_supportedproto_proto;
475 static int hf_msg_auth_supportedproto_gid;
476 static int hf_msg_auth_cephx;
477 static int hf_msg_auth_cephx_req_type;
478 static int hf_msg_auth_monmap_epoch;
479 static int hf_msg_auth_reply;
480 static int hf_msg_auth_reply_proto;
481 static int hf_msg_auth_reply_result;
482 static int hf_msg_auth_reply_global_id;
483 static int hf_msg_auth_reply_msg;
484 static int hf_msg_mon_getversion;
485 static int hf_msg_mon_getversion_tid;
486 static int hf_msg_mon_getversion_what;
487 static int hf_msg_mon_getversionreply;
488 static int hf_msg_mon_getversionreply_tid;
489 static int hf_msg_mon_getversionreply_ver;
490 static int hf_msg_mon_getversionreply_veroldest;
491 static int hf_msg_mds_map;
492 static int hf_msg_mds_map_fsid;
493 static int hf_msg_mds_map_epoch;
494 static int hf_msg_mds_map_datai;
495 static int hf_msg_mds_map_data;
496 static int hf_msg_mds_map_data_size;
497 static int hf_msg_client_sess;
498 static int hf_msg_client_sess_op;
499 static int hf_msg_client_sess_seq;
500 static int hf_msg_client_sess_time;
501 static int hf_msg_client_sess_caps_max;
502 static int hf_msg_client_sess_leases_max;
503 static int hf_msg_client_req;
504 static int hf_msg_client_req_oldest_tid;
505 static int hf_msg_client_req_mdsmap_epoch;
506 static int hf_msg_client_req_flags;
507 static int hf_msg_client_req_retry;
508 static int hf_msg_client_req_forward;
509 static int hf_msg_client_req_releases;
510 static int hf_msg_client_req_op;
511 static int hf_msg_client_req_caller_uid;
512 static int hf_msg_client_req_caller_gid;
513 static int hf_msg_client_req_inode;
514 static int hf_msg_client_req_path_src;
515 static int hf_msg_client_req_path_dst;
516 static int hf_msg_client_req_release;
517 static int hf_msg_client_req_time;
518 static int hf_msg_client_reqfwd;
519 static int hf_msg_client_reqfwd_dst;
520 static int hf_msg_client_reqfwd_fwd;
521 static int hf_msg_client_reqfwd_resend;
522 static int hf_msg_client_reply;
523 static int hf_msg_client_reply_op;
524 static int hf_msg_client_reply_result;
525 static int hf_msg_client_reply_mdsmap_epoch;
526 static int hf_msg_client_reply_safe;
527 static int hf_msg_client_reply_isdentry;
528 static int hf_msg_client_reply_istarget;
529 static int hf_msg_client_reply_trace;
530 static int hf_msg_client_reply_extra;
531 static int hf_msg_client_reply_snaps;
532 static int hf_msg_osd_map;
533 static int hf_msg_osd_map_fsid;
534 static int hf_msg_osd_map_inc;
535 static int hf_msg_osd_map_inc_len;
536 static int hf_msg_osd_map_map;
537 static int hf_msg_osd_map_map_len;
538 static int hf_msg_osd_map_epoch;
539 static int hf_msg_osd_map_oldest;
540 static int hf_msg_osd_map_newest;
541 static int hf_msg_osd_op;
542 static int hf_msg_osd_op_client_inc;
543 static int hf_msg_osd_op_osdmap_epoch;
544 static int hf_msg_osd_op_mtime;
545 static int hf_msg_osd_op_reassert_version;
546 static int hf_msg_osd_op_oloc;
547 static int hf_msg_osd_op_pgid;
548 static int hf_msg_osd_op_oid;
549 static int hf_msg_osd_op_ops_len;
550 static int hf_msg_osd_op_op;
551 static int hf_msg_osd_op_snap_id;
552 static int hf_msg_osd_op_snap_seq;
553 static int hf_msg_osd_op_snaps_len;
554 static int hf_msg_osd_op_snap;
555 static int hf_msg_osd_op_retry_attempt;
556 static int hf_msg_osd_op_payload;
557 static int hf_msg_osd_opreply;
558 static int hf_msg_osd_opreply_oid;
559 static int hf_msg_osd_opreply_pgid;
560 static int hf_msg_osd_opreply_result;
561 static int hf_msg_osd_opreply_bad_replay_ver;
562 static int hf_msg_osd_opreply_osdmap_epoch;
563 static int hf_msg_osd_opreply_ops_len;
564 static int hf_msg_osd_opreply_op;
565 static int hf_msg_osd_opreply_retry_attempt;
566 static int hf_msg_osd_opreply_rval;
567 static int hf_msg_osd_opreply_replay_ver;
568 static int hf_msg_osd_opreply_user_ver;
569 static int hf_msg_osd_opreply_redirect;
570 static int hf_msg_osd_opreply_payload;
571 static int hf_msg_poolopreply;
572 static int hf_msg_poolopreply_fsid;
573 static int hf_msg_poolopreply_code;
574 static int hf_msg_poolopreply_epoch;
575 static int hf_msg_poolopreply_datai;
576 static int hf_msg_poolopreply_data;
577 static int hf_msg_poolopreply_data_size;
578 static int hf_msg_poolop;
579 static int hf_msg_poolop_fsid;
580 static int hf_msg_poolop_pool;
581 static int hf_msg_poolop_type;
582 static int hf_msg_poolop_auid;
583 static int hf_msg_poolop_snapid;
584 static int hf_msg_poolop_name;
585 static int hf_msg_poolop_crush_rule;
586 static int hf_msg_poolop_crush_rule8;
587 static int hf_msg_mon_cmd;
588 static int hf_msg_mon_cmd_fsid;
589 static int hf_msg_mon_cmd_arg;
590 static int hf_msg_mon_cmd_arg_len;
591 static int hf_msg_mon_cmd_str;
592 static int hf_msg_mon_cmd_ack;
593 static int hf_msg_mon_cmd_ack_code;
594 static int hf_msg_mon_cmd_ack_res;
595 static int hf_msg_mon_cmd_ack_arg;
596 static int hf_msg_mon_cmd_ack_arg_len;
597 static int hf_msg_mon_cmd_ack_arg_str;
598 static int hf_msg_mon_cmd_ack_data;
599 static int hf_msg_poolstats;
600 static int hf_msg_poolstats_fsid;
601 static int hf_msg_poolstats_pool;
602 static int hf_msg_poolstatsreply;
603 static int hf_msg_poolstatsreply_fsid;
604 static int hf_msg_poolstatsreply_stat;
605 static int hf_msg_poolstatsreply_pool;
606 static int hf_msg_poolstatsreply_log_size;
607 static int hf_msg_poolstatsreply_log_size_ondisk;
608 static int hf_msg_mon_globalid_max;
609 static int hf_msg_mon_election;
610 static int hf_msg_mon_election_fsid;
611 static int hf_msg_mon_election_op;
612 static int hf_msg_mon_election_epoch;
613 static int hf_msg_mon_election_quorum;
614 static int hf_msg_mon_election_quorum_features;
615 static int hf_msg_mon_election_defunct_one;
616 static int hf_msg_mon_election_defunct_two;
617 static int hf_msg_mon_election_sharing;
618 static int hf_msg_mon_election_sharing_data;
619 static int hf_msg_mon_election_sharing_size;
620 static int hf_msg_mon_paxos;
621 static int hf_msg_mon_paxos_epoch;
622 static int hf_msg_mon_paxos_op;
623 static int hf_msg_mon_paxos_first;
624 static int hf_msg_mon_paxos_last;
625 static int hf_msg_mon_paxos_pnfrom;
626 static int hf_msg_mon_paxos_pn;
627 static int hf_msg_mon_paxos_pnuncommitted;
628 static int hf_msg_mon_paxos_lease;
629 static int hf_msg_mon_paxos_sent;
630 static int hf_msg_mon_paxos_latest_ver;
631 static int hf_msg_mon_paxos_latest_val;
632 static int hf_msg_mon_paxos_latest_val_data;
633 static int hf_msg_mon_paxos_latest_val_size;
634 static int hf_msg_mon_paxos_value;
635 static int hf_msg_mon_paxos_ver;
636 static int hf_msg_mon_paxos_val;
637 static int hf_msg_mon_paxos_val_data;
638 static int hf_msg_mon_paxos_val_size;
639 static int hf_msg_mon_probe;
640 static int hf_msg_mon_probe_fsid;
641 static int hf_msg_mon_probe_type;
642 static int hf_msg_mon_probe_name;
643 static int hf_msg_mon_probe_quorum;
644 static int hf_msg_mon_probe_paxos_first_ver;
645 static int hf_msg_mon_probe_paxos_last_ver;
646 static int hf_msg_mon_probe_ever_joined;
647 static int hf_msg_mon_probe_req_features;
648 static int hf_msg_osd_ping;
649 static int hf_msg_osd_ping_fsid;
650 static int hf_msg_osd_ping_mapepoch;
651 static int hf_msg_osd_ping_peerepoch;
652 static int hf_msg_osd_ping_op;
653 static int hf_msg_osd_ping_time;
654 static int hf_msg_osd_boot;
655 static int hf_msg_osd_boot_addr_back;
656 static int hf_msg_osd_boot_addr_cluster;
657 static int hf_msg_osd_boot_epoch;
658 static int hf_msg_osd_boot_addr_front;
659 static int hf_msg_osd_boot_metadata;
660 static int hf_msg_osd_boot_metadata_k;
661 static int hf_msg_osd_boot_metadata_v;
662 static int hf_msg_pgstats;
663 static int hf_msg_pgstats_fsid;
664 static int hf_msg_pgstats_pgstat;
665 static int hf_msg_pgstats_pgstat_pg;
666 static int hf_msg_pgstats_pgstat_stat;
667 static int hf_msg_pgstats_epoch;
668 static int hf_msg_pgstats_mapfor;
669 static int hf_msg_osd_pg_create;
670 static int hf_msg_osd_pg_create_epoch;
671 static int hf_msg_osd_pg_create_mkpg;
672 static int hf_msg_osd_pg_create_mkpg_pg;
673 static int hf_msg_osd_pg_create_mkpg_create;
674 static int hf_msg_client_caps;
675 static int hf_msg_client_caps_op;
676 static int hf_msg_client_caps_inode;
677 static int hf_msg_client_caps_relam;
678 static int hf_msg_client_caps_cap_id;
679 static int hf_msg_client_caps_seq;
680 static int hf_msg_client_caps_seq_issue;
681 static int hf_msg_client_caps_new;
682 static int hf_msg_client_caps_wanted;
683 static int hf_msg_client_caps_dirty;
684 static int hf_msg_client_caps_seq_migrate;
685 static int hf_msg_client_caps_snap_follows;
686 static int hf_msg_client_caps_uid;
687 static int hf_msg_client_caps_gid;
688 static int hf_msg_client_caps_mode;
689 static int hf_msg_client_caps_nlink;
690 static int hf_msg_client_caps_xattr_ver;
691 static int hf_msg_client_caps_snap;
692 static int hf_msg_client_caps_flock;
693 static int hf_msg_client_caps_inline_ver;
694 static int hf_msg_client_caps_inline_data;
695 static int hf_msg_client_caps_xattr;
696 static int hf_msg_client_caprel;
697 static int hf_msg_client_caprel_cap;
698 static int hf_msg_client_caprel_cap_inode;
699 static int hf_msg_client_caprel_cap_id;
700 static int hf_msg_client_caprel_cap_migrate;
701 static int hf_msg_client_caprel_cap_seq;
702 static int hf_msg_timecheck;
703 static int hf_msg_timecheck_op;
704 static int hf_msg_timecheck_epoch;
705 static int hf_msg_timecheck_round;
706 static int hf_msg_timecheck_time;
707 static int hf_msg_timecheck_skew;
708 static int hf_msg_timecheck_skew_node;
709 static int hf_msg_timecheck_skew_skew;
710 static int hf_msg_timecheck_latency;
711 static int hf_msg_timecheck_latency_node;
712 static int hf_msg_timecheck_latency_latency;
714 /* Initialize the expert items. */
715 static expert_field ei_unused;
716 static expert_field ei_overrun;
717 static expert_field ei_tag_unknown;
718 static expert_field ei_msg_unknown;
719 static expert_field ei_union_unknown;
720 static expert_field ei_ver_tooold;
721 static expert_field ei_ver_toonew;
722 static expert_field ei_oloc_both;
723 /* static expert_field ei_banner_invalid; */
724 static expert_field ei_sizeillogical;
726 /* Initialize the subtree pointers */
727 static int ett_ceph;
728 static int ett_data;
729 static int ett_str;
730 static int ett_blob;
731 static int ett_sockaddr;
732 static int ett_entityaddr;
733 static int ett_entityname;
734 static int ett_EntityName;
735 static int ett_entityinst;
736 static int ett_kv;
737 static int ett_eversion;
738 static int ett_objectlocator;
739 static int ett_pg;
740 static int ett_pg_create;
741 static int ett_filepath;
742 static int ett_mds_release;
743 static int ett_hitset_params;
744 static int ett_snapinfo;
745 static int ett_pgpool;
746 static int ett_pgpool_snap;
747 static int ett_pgpool_snapdel;
748 static int ett_pgpool_property;
749 static int ett_mon_map;
750 static int ett_mon_map_address;
751 static int ett_osd_peerstat;
752 static int ett_featureset;
753 static int ett_featureset_name;
754 static int ett_compatset;
755 static int ett_osd_superblock;
756 static int ett_osd_info;
757 static int ett_osd_xinfo;
758 static int ett_perfstat;
759 static int ett_osdstat;
760 static int ett_pg_stat;
761 static int ett_osd_map;
762 static int ett_osd_map_client;
763 static int ett_osd_map_pool;
764 static int ett_osd_map_poolname;
765 static int ett_osd_map_pgtmp;
766 static int ett_osd_map_primarytmp;
767 static int ett_osd_map_erasurecodeprofile;
768 static int ett_osd_map_osd;
769 static int ett_osd_map_blacklist;
770 static int ett_osd_map_inc;
771 static int ett_osd_map_inc_client;
772 static int ett_osd_map_inc_osd;
773 static int ett_osd_op;
774 static int ett_redirect;
775 static int ett_statcollection;
776 static int ett_paxos;
777 static int ett_msg_mon_map;
778 static int ett_msg_statfs;
779 static int ett_msg_statfsreply;
780 static int ett_msg_mon_sub;
781 static int ett_msg_mon_sub_item;
782 static int ett_msg_mon_sub_flags;
783 static int ett_msg_mon_sub_ack;
784 static int ett_msg_auth;
785 static int ett_msg_auth_supportedproto;
786 static int ett_msg_auth_cephx;
787 static int ett_msg_authreply;
788 static int ett_msg_mon_getversion;
789 static int ett_msg_mon_getversionreply;
790 static int ett_msg_mds_map;
791 static int ett_msg_client_sess;
792 static int ett_msg_client_req;
793 static int ett_msg_client_reqfwd;
794 static int ett_msg_client_reply;
795 static int ett_msg_osd_map;
796 static int ett_msg_osd_map_inc;
797 static int ett_msg_osd_map_full;
798 static int ett_msg_osd_op;
799 static int ett_msg_osd_opreply;
800 static int ett_msg_poolopreply;
801 static int ett_msg_poolop;
802 static int ett_msg_mon_cmd;
803 static int ett_msg_mon_cmd_arg;
804 static int ett_msg_mon_cmdack;
805 static int ett_msg_mon_cmdack_arg;
806 static int ett_msg_poolstats;
807 static int ett_msg_poolstatsreply;
808 static int ett_msg_poolstatsreply_stat;
809 static int ett_msg_mon_election;
810 static int ett_msg_mon_paxos;
811 static int ett_msg_mon_paxos_value;
812 static int ett_msg_mon_probe;
813 static int ett_msg_osd_ping;
814 static int ett_msg_osd_boot;
815 static int ett_msg_pgstats;
816 static int ett_msg_pgstats_pgstat;
817 static int ett_msg_osd_pg_create;
818 static int ett_msg_osd_pg_create_mkpg;
819 static int ett_msg_client_caps;
820 static int ett_msg_client_caprel;
821 static int ett_msg_client_caprel_cap;
822 static int ett_msg_timecheck;
823 static int ett_msg_timecheck_skew;
824 static int ett_msg_timecheck_latency;
825 static int ett_head;
826 static int ett_foot;
827 static int ett_connect;
828 static int ett_connect_reply;
829 static int ett_filter_data;
831 static const uint8_t *C_BANNER = (const uint8_t*)"ceph v";
833 #define C_BANNER_SIZE 9
834 #define C_BANNER_SIZE_MIN 6
836 /** Feature Flags */
837 /* Transmuted from ceph:/src/include/ceph_features.h */
838 #define C_FEATURE_UID (1U << 0)
839 #define C_FEATURE_NOSRCADDR (1U << 1)
840 #define C_FEATURE_MONCLOCKCHECK (1U << 2)
841 #define C_FEATURE_FLOCK (1U << 3)
842 #define C_FEATURE_SUBSCRIBE2 (1U << 4)
843 #define C_FEATURE_MONNAMES (1U << 5)
844 #define C_FEATURE_RECONNECT_SEQ (1U << 6)
845 #define C_FEATURE_DIRLAYOUTHASH (1U << 7)
846 #define C_FEATURE_OBJECTLOCATOR (1U << 8)
847 #define C_FEATURE_PGID64 (1U << 9)
848 #define C_FEATURE_INCSUBOSDMAP (1U << 10)
849 #define C_FEATURE_PGPOOL3 (1U << 11)
850 #define C_FEATURE_OSDREPLYMUX (1U << 12)
851 #define C_FEATURE_OSDENC (1U << 13)
852 #define C_FEATURE_OMAP (1U << 14)
853 #define C_FEATURE_MONENC (1U << 15)
854 #define C_FEATURE_QUERY_T (1U << 16)
855 #define C_FEATURE_INDEP_PG_MAP (1U << 17)
856 #define C_FEATURE_CRUSH_TUNABLES (1U << 18)
857 #define C_FEATURE_CHUNKY_SCRUB (1U << 19)
858 #define C_FEATURE_MON_NULLROUTE (1U << 20)
859 #define C_FEATURE_MON_GV (1U << 21)
860 #define C_FEATURE_BACKFILL_RESERVATION (1U << 22)
861 #define C_FEATURE_MSG_AUTH (1U << 23)
862 #define C_FEATURE_RECOVERY_RESERVATION (1U << 24)
863 #define C_FEATURE_CRUSH_TUNABLES2 (1U << 25)
864 #define C_FEATURE_CREATEPOOLID (1U << 26)
865 #define C_FEATURE_REPLY_CREATE_INODE (1U << 27)
866 #define C_FEATURE_OSD_HBMSGS (1U << 28)
867 #define C_FEATURE_MDSENC (1U << 29)
868 #define C_FEATURE_OSDHASHPSPOOL (1U << 30)
869 #define C_FEATURE_MON_SINGLE_PAXOS (1U << 31)
870 #define C_FEATURE_OSD_SNAPMAPPER (1U << 0)
871 #define C_FEATURE_MON_SCRUB (1U << 1)
872 #define C_FEATURE_OSD_PACKED_RECOVERY (1U << 2)
873 #define C_FEATURE_OSD_CACHEPOOL (1U << 3)
874 #define C_FEATURE_CRUSH_V2 (1U << 4)
875 #define C_FEATURE_EXPORT_PEER (1U << 5)
876 #define C_FEATURE_OSD_ERASURE_CODES (1U << 6)
877 #define C_FEATURE_OSD_TMAP2OMAP (1U << 6)
878 #define C_FEATURE_OSDMAP_ENC (1U << 7)
879 #define C_FEATURE_MDS_INLINE_DATA (1U << 8)
880 #define C_FEATURE_CRUSH_TUNABLES3 (1U << 9)
881 #define C_FEATURE_OSD_PRIMARY_AFFINITY (1U << 9)
882 #define C_FEATURE_MSGR_KEEPALIVE2 (1U << 10)
883 #define C_FEATURE_RESERVED (1U << 31)
885 /** Connect Message Flags */
886 #define C_FLAG_LOSSY (1U << 0)
888 #define C_PGPOOL_FLAG_HASHPSPOOL (1U << 0) /* hash pg seed and pool together (instead of adding) */
889 #define C_PGPOOL_FLAG_FULL (1U << 1) /* pool is full */
890 #define C_PGPOOL_FLAG_FAKE_EC_POOL (1U << 2) /* require ReplicatedPG to act like an EC pg */
892 /** Macros to create value_stings.
894 * These are a quick wrapper around the functions in value_string.h. They
895 * create an enum `base` with the given values, a `value_string base_strings[]`
896 * and a function `const char `base_string(base val)` which gets the string
897 * for a value.
899 * Additionally, C_MAKE_STRINGS_EXT creates a
900 * `value_strings_ext base_strings_ext` and uses this for the `base_string`
901 * lookup.
903 * @param base The root name.
904 * @param chars The number of characters to use when displaying the value.
905 * this is generally 2*bytes.
907 #define C_MAKE_STRINGS(base, chars) \
908 typedef int base; \
909 VALUE_STRING_ENUM(base##_strings); \
910 VALUE_STRING_ARRAY(base##_strings); \
911 static const char *base##_string(base val) { \
912 return val_to_str(val, base##_strings, "Unknown (0x0"#chars"X)"); \
915 #define C_MAKE_STRINGS_EXT(base, chars) \
916 typedef int base; \
917 VALUE_STRING_ENUM(base##_strings); \
918 VALUE_STRING_ARRAY(base##_strings); \
920 static value_string_ext \
921 base##_strings_ext = VALUE_STRING_EXT_INIT(base##_strings); \
923 static const char *base##_string(base val) { \
924 return val_to_str_ext(val, &base##_strings_ext, "Unknown (0x0"#chars"X)"); \
927 #define c_inet_strings_VALUE_STRING_LIST(V) \
928 V(C_IPv4, 0x0002, "IPv4") \
929 V(C_IPv6, 0x000A, "IPv6")
931 typedef int c_inet;
932 VALUE_STRING_ENUM(c_inet_strings);
933 VALUE_STRING_ARRAY(c_inet_strings);
935 /** Message Tags */
936 #define c_tag_strings_VALUE_STRING_LIST(V) \
937 V(C_TAG_READY, 0x01, "server->client: ready for messages") \
938 V(C_TAG_RESETSESSION, 0x02, "server->client: reset, try again") \
939 V(C_TAG_WAIT, 0x03, "server->client: wait for racing incoming connection") \
940 V(C_TAG_RETRY_SESSION, 0x04, "server->client + cseq: try again with higher cseq") \
941 V(C_TAG_RETRY_GLOBAL, 0x05, "server->client + gseq: try again with higher gseq") \
942 V(C_TAG_CLOSE, 0x06, "closing pipe") \
943 V(C_TAG_MSG, 0x07, "message") \
944 V(C_TAG_ACK, 0x08, "message ack") \
945 V(C_TAG_KEEPALIVE, 0x09, "just a keepalive byte!") \
946 V(C_TAG_BADPROTOVER, 0x0A, "bad protocol version") \
947 V(C_TAG_BADAUTHORIZER, 0x0B, "bad authorizer") \
948 V(C_TAG_FEATURES, 0x0C, "insufficient features") \
949 V(C_TAG_SEQ, 0x0D, "64-bit int follows with seen seq number") \
950 V(C_TAG_KEEPALIVE2, 0x0E, "keepalive2") \
951 V(C_TAG_KEEPALIVE2_ACK, 0x0F, "keepalive2 reply") \
953 typedef int c_tag;
954 VALUE_STRING_ENUM(c_tag_strings);
955 VALUE_STRING_ARRAY(c_tag_strings);
956 static value_string_ext c_tag_strings_ext = VALUE_STRING_EXT_INIT(c_tag_strings);
958 /* Extracted from the Ceph tree.
960 * These are MSG_* constants for server <-> server (internal) messages. and
961 * CEPH_MSG_* for client <-> server messages. There is no functional
962 * difference, just a naming convention.
964 #define c_msg_type_strings_VALUE_STRING_LIST(V) \
965 V(C_MSG_UNKNOWN, 0x0000, "Unknown (0x0000)") \
967 V(C_CEPH_MSG_SHUTDOWN, 0x0001, "C_CEPH_MSG_SHUTDOWN") \
968 V(C_CEPH_MSG_PING, 0x0002, "C_CEPH_MSG_PING") \
969 V(C_CEPH_MSG_MON_MAP, 0x0004, "C_CEPH_MSG_MON_MAP") \
970 V(C_CEPH_MSG_MON_GET_MAP, 0x0005, "C_CEPH_MSG_MON_GET_MAP") \
971 V(C_CEPH_MSG_STATFS, 0x000D, "C_CEPH_MSG_STATFS") \
972 V(C_CEPH_MSG_STATFS_REPLY, 0x000E, "C_CEPH_MSG_STATFS_REPLY") \
973 V(C_CEPH_MSG_MON_SUBSCRIBE, 0x000F, "C_CEPH_MSG_MON_SUBSCRIBE") \
974 V(C_CEPH_MSG_MON_SUBSCRIBE_ACK, 0x0010, "C_CEPH_MSG_MON_SUBSCRIBE_ACK") \
975 V(C_CEPH_MSG_AUTH, 0x0011, "C_CEPH_MSG_AUTH") \
976 V(C_CEPH_MSG_AUTH_REPLY, 0x0012, "C_CEPH_MSG_AUTH_REPLY") \
977 V(C_CEPH_MSG_MON_GET_VERSION, 0x0013, "C_CEPH_MSG_MON_GET_VERSION") \
978 V(C_CEPH_MSG_MON_GET_VERSION_REPLY, 0x0014, "C_CEPH_MSG_MON_GET_VERSION_REPLY") \
979 V(C_CEPH_MSG_MDS_MAP, 0x0015, "C_CEPH_MSG_MDS_MAP") \
980 V(C_CEPH_MSG_CLIENT_SESSION, 0x0016, "C_CEPH_MSG_CLIENT_SESSION") \
981 V(C_CEPH_MSG_CLIENT_RECONNECT, 0x0017, "C_CEPH_MSG_CLIENT_RECONNECT") \
982 V(C_CEPH_MSG_CLIENT_REQUEST, 0x0018, "C_CEPH_MSG_CLIENT_REQUEST") \
983 V(C_CEPH_MSG_CLIENT_REQUEST_FORWARD, 0x0019, "C_CEPH_MSG_CLIENT_REQUEST_FORWARD") \
984 V(C_CEPH_MSG_CLIENT_REPLY, 0x001A, "C_CEPH_MSG_CLIENT_REPLY") \
985 V(C_MSG_PAXOS, 0x0028, "C_MSG_PAXOS") \
986 V(C_CEPH_MSG_OSD_MAP, 0x0029, "C_CEPH_MSG_OSD_MAP") \
987 V(C_CEPH_MSG_OSD_OP, 0x002A, "C_CEPH_MSG_OSD_OP") \
988 V(C_CEPH_MSG_OSD_OPREPLY, 0x002B, "C_CEPH_MSG_OSD_OPREPLY") \
989 V(C_CEPH_MSG_WATCH_NOTIFY, 0x002C, "C_CEPH_MSG_WATCH_NOTIFY") \
990 V(C_MSG_FORWARD, 0x002E, "C_MSG_FORWARD") \
991 V(C_MSG_ROUTE, 0x002F, "C_MSG_ROUTE") \
992 V(C_MSG_POOLOPREPLY, 0x0030, "C_MSG_POOLOPREPLY") \
993 V(C_MSG_POOLOP, 0x0031, "C_MSG_POOLOP") \
994 V(C_MSG_MON_COMMAND, 0x0032, "C_MSG_MON_COMMAND") \
995 V(C_MSG_MON_COMMAND_ACK, 0x0033, "C_MSG_MON_COMMAND_ACK") \
996 V(C_MSG_LOG, 0x0034, "C_MSG_LOG") \
997 V(C_MSG_LOGACK, 0x0035, "C_MSG_LOGACK") \
998 V(C_MSG_MON_OBSERVE, 0x0036, "C_MSG_MON_OBSERVE") \
999 V(C_MSG_MON_OBSERVE_NOTIFY, 0x0037, "C_MSG_MON_OBSERVE_NOTIFY") \
1000 V(C_MSG_CLASS, 0x0038, "C_MSG_CLASS") \
1001 V(C_MSG_CLASS_ACK, 0x0039, "C_MSG_CLASS_ACK") \
1002 V(C_MSG_GETPOOLSTATS, 0x003A, "C_MSG_GETPOOLSTATS") \
1003 V(C_MSG_GETPOOLSTATSREPLY, 0x003B, "C_MSG_GETPOOLSTATSREPLY") \
1004 V(C_MSG_MON_GLOBAL_ID, 0x003C, "C_MSG_MON_GLOBAL_ID") \
1005 /* V(C_CEPH_MSG_PRIO_LOW, 0x0040, "C_CEPH_MSG_PRIO_LOW") */ \
1006 V(C_MSG_MON_SCRUB, 0x0040, "C_MSG_MON_SCRUB") \
1007 V(C_MSG_MON_ELECTION, 0x0041, "C_MSG_MON_ELECTION") \
1008 V(C_MSG_MON_PAXOS, 0x0042, "C_MSG_MON_PAXOS") \
1009 V(C_MSG_MON_PROBE, 0x0043, "C_MSG_MON_PROBE") \
1010 V(C_MSG_MON_JOIN, 0x0044, "C_MSG_MON_JOIN") \
1011 V(C_MSG_MON_SYNC, 0x0045, "C_MSG_MON_SYNC") \
1012 V(C_MSG_OSD_PING, 0x0046, "C_MSG_OSD_PING") \
1013 V(C_MSG_OSD_BOOT, 0x0047, "C_MSG_OSD_BOOT") \
1014 V(C_MSG_OSD_FAILURE, 0x0048, "C_MSG_OSD_FAILURE") \
1015 V(C_MSG_OSD_ALIVE, 0x0049, "C_MSG_OSD_ALIVE") \
1016 V(C_MSG_OSD_MARK_ME_DOWN, 0x004A, "C_MSG_OSD_MARK_ME_DOWN") \
1017 V(C_MSG_OSD_SUBOP, 0x004C, "C_MSG_OSD_SUBOP") \
1018 V(C_MSG_OSD_SUBOPREPLY, 0x004D, "C_MSG_OSD_SUBOPREPLY") \
1019 V(C_MSG_OSD_PGTEMP, 0x004E, "C_MSG_OSD_PGTEMP") \
1020 V(C_MSG_OSD_PG_NOTIFY, 0x0050, "C_MSG_OSD_PG_NOTIFY") \
1021 V(C_MSG_OSD_PG_QUERY, 0x0051, "C_MSG_OSD_PG_QUERY") \
1022 V(C_MSG_OSD_PG_SUMMARY, 0x0052, "C_MSG_OSD_PG_SUMMARY") \
1023 V(C_MSG_OSD_PG_LOG, 0x0053, "C_MSG_OSD_PG_LOG") \
1024 V(C_MSG_OSD_PG_REMOVE, 0x0054, "C_MSG_OSD_PG_REMOVE") \
1025 V(C_MSG_OSD_PG_INFO, 0x0055, "C_MSG_OSD_PG_INFO") \
1026 V(C_MSG_OSD_PG_TRIM, 0x0056, "C_MSG_OSD_PG_TRIM") \
1027 V(C_MSG_PGSTATS, 0x0057, "C_MSG_PGSTATS") \
1028 V(C_MSG_PGSTATSACK, 0x0058, "C_MSG_PGSTATSACK") \
1029 V(C_MSG_OSD_PG_CREATE, 0x0059, "C_MSG_OSD_PG_CREATE") \
1030 V(C_MSG_REMOVE_SNAPS, 0x005A, "C_MSG_REMOVE_SNAPS") \
1031 V(C_MSG_OSD_SCRUB, 0x005B, "C_MSG_OSD_SCRUB") \
1032 V(C_MSG_OSD_PG_MISSING, 0x005C, "C_MSG_OSD_PG_MISSING") \
1033 V(C_MSG_OSD_REP_SCRUB, 0x005D, "C_MSG_OSD_REP_SCRUB") \
1034 V(C_MSG_OSD_PG_SCAN, 0x005E, "C_MSG_OSD_PG_SCAN") \
1035 V(C_MSG_OSD_PG_BACKFILL, 0x005F, "C_MSG_OSD_PG_BACKFILL") \
1036 V(C_MSG_COMMAND, 0x0061, "C_MSG_COMMAND") \
1037 V(C_MSG_COMMAND_REPLY, 0x0062, "C_MSG_COMMAND_REPLY") \
1038 V(C_MSG_OSD_BACKFILL_RESERVE, 0x0063, "C_MSG_OSD_BACKFILL_RESERVE") \
1039 V(C_MSG_MDS_BEACON, 0x0064, "C_MSG_MDS_BEACON") \
1040 V(C_MSG_MDS_SLAVE_REQUEST, 0x0065, "C_MSG_MDS_SLAVE_REQUEST") \
1041 V(C_MSG_MDS_TABLE_REQUEST, 0x0066, "C_MSG_MDS_TABLE_REQUEST") \
1042 V(C_MSG_OSD_PG_PUSH, 0x0069, "C_MSG_OSD_PG_PUSH") \
1043 V(C_MSG_OSD_PG_PULL, 0x006A, "C_MSG_OSD_PG_PULL") \
1044 V(C_MSG_OSD_PG_PUSH_REPLY, 0x006B, "C_MSG_OSD_PG_PUSH_REPLY") \
1045 V(C_MSG_OSD_EC_WRITE, 0x006C, "C_MSG_OSD_EC_WRITE") \
1046 V(C_MSG_OSD_EC_WRITE_REPLY, 0x006D, "C_MSG_OSD_EC_WRITE_REPLY") \
1047 V(C_MSG_OSD_EC_READ, 0x006E, "C_MSG_OSD_EC_READ") \
1048 V(C_MSG_OSD_EC_READ_REPLY, 0x006F, "C_MSG_OSD_EC_READ_REPLY") \
1049 V(C_CEPH_MSG_PRIO_DEFAULT, 0x007F, "C_CEPH_MSG_PRIO_DEFAULT") \
1050 V(C_MSG_OSD_RECOVERY_RESERVE, 0x0096, "C_MSG_OSD_RECOVERY_RESERVE") \
1051 V(C_CEPH_MSG_PRIO_HIGH, 0x00C4, "C_CEPH_MSG_PRIO_HIGH") \
1052 V(C_CEPH_MSG_PRIO_HIGHEST, 0x00FF, "C_CEPH_MSG_PRIO_HIGHEST") \
1053 V(C_MSG_MDS_RESOLVE, 0x0200, "C_MSG_MDS_RESOLVE") \
1054 V(C_MSG_MDS_RESOLVEACK, 0x0201, "C_MSG_MDS_RESOLVEACK") \
1055 V(C_MSG_MDS_CACHEREJOIN, 0x0202, "C_MSG_MDS_CACHEREJOIN") \
1056 V(C_MSG_MDS_DISCOVER, 0x0203, "C_MSG_MDS_DISCOVER") \
1057 V(C_MSG_MDS_DISCOVERREPLY, 0x0204, "C_MSG_MDS_DISCOVERREPLY") \
1058 V(C_MSG_MDS_INODEUPDATE, 0x0205, "C_MSG_MDS_INODEUPDATE") \
1059 V(C_MSG_MDS_DIRUPDATE, 0x0206, "C_MSG_MDS_DIRUPDATE") \
1060 V(C_MSG_MDS_CACHEEXPIRE, 0x0207, "C_MSG_MDS_CACHEEXPIRE") \
1061 V(C_MSG_MDS_DENTRYUNLINK, 0x0208, "C_MSG_MDS_DENTRYUNLINK") \
1062 V(C_MSG_MDS_FRAGMENTNOTIFY, 0x0209, "C_MSG_MDS_FRAGMENTNOTIFY") \
1063 V(C_MSG_MDS_OFFLOAD_TARGETS, 0x020A, "C_MSG_MDS_OFFLOAD_TARGETS") \
1064 V(C_MSG_MDS_DENTRYLINK, 0x020C, "C_MSG_MDS_DENTRYLINK") \
1065 V(C_MSG_MDS_FINDINO, 0x020D, "C_MSG_MDS_FINDINO") \
1066 V(C_MSG_MDS_FINDINOREPLY, 0x020E, "C_MSG_MDS_FINDINOREPLY") \
1067 V(C_MSG_MDS_OPENINO, 0x020F, "C_MSG_MDS_OPENINO") \
1068 V(C_MSG_MDS_OPENINOREPLY, 0x0210, "C_MSG_MDS_OPENINOREPLY") \
1069 V(C_MSG_MDS_LOCK, 0x0300, "C_MSG_MDS_LOCK") \
1070 V(C_MSG_MDS_INODEFILECAPS, 0x0301, "C_MSG_MDS_INODEFILECAPS") \
1071 V(C_CEPH_MSG_CLIENT_CAPS, 0x0310, "C_CEPH_MSG_CLIENT_CAPS") \
1072 V(C_CEPH_MSG_CLIENT_LEASE, 0x0311, "C_CEPH_MSG_CLIENT_LEASE") \
1073 V(C_CEPH_MSG_CLIENT_SNAP, 0x0312, "C_CEPH_MSG_CLIENT_SNAP") \
1074 V(C_CEPH_MSG_CLIENT_CAPRELEASE, 0x0313, "C_CEPH_MSG_CLIENT_CAPRELEASE") \
1075 V(C_MSG_MDS_EXPORTDIRDISCOVER, 0x0449, "C_MSG_MDS_EXPORTDIRDISCOVER") \
1076 V(C_MSG_MDS_EXPORTDIRDISCOVERACK, 0x0450, "C_MSG_MDS_EXPORTDIRDISCOVERACK") \
1077 V(C_MSG_MDS_EXPORTDIRCANCEL, 0x0451, "C_MSG_MDS_EXPORTDIRCANCEL") \
1078 V(C_MSG_MDS_EXPORTDIRPREP, 0x0452, "C_MSG_MDS_EXPORTDIRPREP") \
1079 V(C_MSG_MDS_EXPORTDIRPREPACK, 0x0453, "C_MSG_MDS_EXPORTDIRPREPACK") \
1080 V(C_MSG_MDS_EXPORTDIRWARNING, 0x0454, "C_MSG_MDS_EXPORTDIRWARNING") \
1081 V(C_MSG_MDS_EXPORTDIRWARNINGACK, 0x0455, "C_MSG_MDS_EXPORTDIRWARNINGACK") \
1082 V(C_MSG_MDS_EXPORTDIR, 0x0456, "C_MSG_MDS_EXPORTDIR") \
1083 V(C_MSG_MDS_EXPORTDIRACK, 0x0457, "C_MSG_MDS_EXPORTDIRACK") \
1084 V(C_MSG_MDS_EXPORTDIRNOTIFY, 0x0458, "C_MSG_MDS_EXPORTDIRNOTIFY") \
1085 V(C_MSG_MDS_EXPORTDIRNOTIFYACK, 0x0459, "C_MSG_MDS_EXPORTDIRNOTIFYACK") \
1086 V(C_MSG_MDS_EXPORTDIRFINISH, 0x0460, "C_MSG_MDS_EXPORTDIRFINISH") \
1087 V(C_MSG_MDS_EXPORTCAPS, 0x0470, "C_MSG_MDS_EXPORTCAPS") \
1088 V(C_MSG_MDS_EXPORTCAPSACK, 0x0471, "C_MSG_MDS_EXPORTCAPSACK") \
1089 V(C_MSG_MDS_HEARTBEAT, 0x0500, "C_MSG_MDS_HEARTBEAT") \
1090 V(C_MSG_TIMECHECK, 0x0600, "C_MSG_TIMECHECK") \
1091 V(C_MSG_MON_HEALTH, 0x0601, "C_MSG_MON_HEALTH")
1093 C_MAKE_STRINGS_EXT(c_msg_type, 4)
1095 #define c_osd_optype_strings_VALUE_STRING_LIST(V) \
1096 /*** Raw Codes ***/ \
1097 V(C_OSD_OP_TYPE_LOCK, 0x0100, "C_OSD_OP_TYPE_LOCK") \
1098 V(C_OSD_OP_TYPE_DATA, 0x0200, "C_OSD_OP_TYPE_DATA") \
1099 V(C_OSD_OP_TYPE_ATTR, 0x0300, "C_OSD_OP_TYPE_ATTR") \
1100 V(C_OSD_OP_TYPE_EXEC, 0x0400, "C_OSD_OP_TYPE_EXEC") \
1101 V(C_OSD_OP_TYPE_PG, 0x0500, "C_OSD_OP_TYPE_PG") \
1102 V(C_OSD_OP_TYPE_MULTI, 0x0600, "C_OSD_OP_TYPE_MULTI") /* multiobject */ \
1103 V(C_OSD_OP_TYPE, 0x0f00, "C_OSD_OP_TYPE") \
1105 /*** Sorted by value, keep it that way. ***/ \
1106 V(C_OSD_OP_MODE_RD, 0x1000, "C_OSD_OP_MODE_RD") \
1107 V(C_OSD_OP_READ, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x01, "C_OSD_OP_READ") \
1108 V(C_OSD_OP_STAT, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x02, "C_OSD_OP_STAT") \
1109 V(C_OSD_OP_MAPEXT, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x03, "C_OSD_OP_MAPEXT") \
1110 V(C_OSD_OP_MASKTRUNC, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x04, "C_OSD_OP_MASKTRUNC") \
1111 V(C_OSD_OP_SPARSE_READ, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x05, "C_OSD_OP_SPARSE_READ") \
1112 V(C_OSD_OP_NOTIFY, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x06, "C_OSD_OP_NOTIFY") \
1113 V(C_OSD_OP_NOTIFY_ACK, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x07, "C_OSD_OP_NOTIFY_ACK") \
1114 V(C_OSD_OP_ASSERT_VER, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x08, "C_OSD_OP_ASSERT_VER") \
1115 V(C_OSD_OP_LIST_WATCHERS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x09, "C_OSD_OP_LIST_WATCHERS") \
1116 V(C_OSD_OP_LIST_SNAPS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x0A, "C_OSD_OP_LIST_SNAPS") \
1117 V(C_OSD_OP_SYNC_READ, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x0B, "C_OSD_OP_SYNC_READ") \
1118 V(C_OSD_OP_TMAPGET, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x0C, "C_OSD_OP_TMAPGET") \
1119 V(C_OSD_OP_OMAPGETKEYS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x11, "C_OSD_OP_OMAPGETKEYS") \
1120 V(C_OSD_OP_OMAPGETVALS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x12, "C_OSD_OP_OMAPGETVALS") \
1121 V(C_OSD_OP_OMAPGETHEADER, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x13, "C_OSD_OP_OMAPGETHEADER") \
1122 V(C_OSD_OP_OMAPGETVALSBYKEYS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x14, "C_OSD_OP_OMAPGETVALSBYKEYS") \
1123 V(C_OSD_OP_OMAP_CMP, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x19, "C_OSD_OP_OMAP_CMP") \
1124 V(C_OSD_OP_COPY_GET_CLASSIC, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x1B, "C_OSD_OP_COPY_GET_CLASSIC") \
1125 V(C_OSD_OP_ISDIRTY, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x1D, "C_OSD_OP_ISDIRTY") \
1126 V(C_OSD_OP_COPY_GET, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_DATA | 0x1E, "C_OSD_OP_COPY_GET") \
1127 V(C_OSD_OP_GETXATTR, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_ATTR | 0x01, "C_OSD_OP_GETXATTR") \
1128 V(C_OSD_OP_GETXATTRS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_ATTR | 0x02, "C_OSD_OP_GETXATTRS") \
1129 V(C_OSD_OP_CMPXATTR, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_ATTR | 0x03, "C_OSD_OP_CMPXATTR") \
1130 V(C_OSD_OP_CALL, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_EXEC | 0x01, "C_OSD_OP_CALL") \
1131 V(C_OSD_OP_PGLS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_PG | 0x01, "C_OSD_OP_PGLS") \
1132 V(C_OSD_OP_PGLS_FILTER, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_PG | 0x02, "C_OSD_OP_PGLS_FILTER") \
1133 V(C_OSD_OP_PG_HITSET_LS, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_PG | 0x03, "C_OSD_OP_PG_HITSET_LS") \
1134 V(C_OSD_OP_PG_HITSET_GET, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_PG | 0x04, "C_OSD_OP_PG_HITSET_GET") \
1135 V(C_OSD_OP_ASSERT_SRC_VERSION, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_MULTI | 0x02, "C_OSD_OP_ASSERT_SRC_VERSION") \
1136 V(C_OSD_OP_SRC_CMPXATTR, C_OSD_OP_MODE_RD | C_OSD_OP_TYPE_MULTI | 0x03, "C_OSD_OP_SRC_CMPXATTR") \
1137 V(C_OSD_OP_MODE_WR, 0x2000, "C_OSD_OP_MODE_WR") \
1138 V(C_OSD_OP_WRLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x01, "C_OSD_OP_WRLOCK") \
1139 V(C_OSD_OP_WRUNLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x02, "C_OSD_OP_WRUNLOCK") \
1140 V(C_OSD_OP_RDLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x03, "C_OSD_OP_RDLOCK") \
1141 V(C_OSD_OP_RDUNLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x04, "C_OSD_OP_RDUNLOCK") \
1142 V(C_OSD_OP_UPLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x05, "C_OSD_OP_UPLOCK") \
1143 V(C_OSD_OP_DNLOCK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_LOCK | 0x06, "C_OSD_OP_DNLOCK") \
1144 V(C_OSD_OP_WRITE, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x01, "C_OSD_OP_WRITE") \
1145 V(C_OSD_OP_WRITEFULL, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x02, "C_OSD_OP_WRITEFULL") \
1146 V(C_OSD_OP_TRUNCATE, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x03, "C_OSD_OP_TRUNCATE") \
1147 V(C_OSD_OP_ZERO, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x04, "C_OSD_OP_ZERO") \
1148 V(C_OSD_OP_DELETE, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x05, "C_OSD_OP_DELETE") \
1149 V(C_OSD_OP_APPEND, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x06, "C_OSD_OP_APPEND") \
1150 V(C_OSD_OP_STARTSYNC, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x07, "C_OSD_OP_STARTSYNC") \
1151 V(C_OSD_OP_SETTRUNC, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x08, "C_OSD_OP_SETTRUNC") \
1152 V(C_OSD_OP_TRIMTRUNC, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x09, "C_OSD_OP_TRIMTRUNC") \
1153 V(C_OSD_OP_TMAPPUT, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x0B, "C_OSD_OP_TMAPPUT") \
1154 V(C_OSD_OP_CREATE, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x0D, "C_OSD_OP_CREATE") \
1155 V(C_OSD_OP_ROLLBACK, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x0E, "C_OSD_OP_ROLLBACK") \
1156 V(C_OSD_OP_WATCH, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x0F, "C_OSD_OP_WATCH") \
1157 V(C_OSD_OP_OMAPSETVALS, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x15, "C_OSD_OP_OMAPSETVALS") \
1158 V(C_OSD_OP_OMAPSETHEADER, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x16, "C_OSD_OP_OMAPSETHEADER") \
1159 V(C_OSD_OP_OMAPCLEAR, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x17, "C_OSD_OP_OMAPCLEAR") \
1160 V(C_OSD_OP_OMAPRMKEYS, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x18, "C_OSD_OP_OMAPRMKEYS") \
1161 V(C_OSD_OP_COPY_FROM, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x1A, "C_OSD_OP_COPY_FROM") \
1162 V(C_OSD_OP_UNDIRTY, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x1C, "C_OSD_OP_UNDIRTY") \
1163 V(C_OSD_OP_SETALLOCHINT, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_DATA | 0x23, "C_OSD_OP_SETALLOCHINT") \
1164 V(C_OSD_OP_SETXATTR, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_ATTR | 0x01, "C_OSD_OP_SETXATTR") \
1165 V(C_OSD_OP_SETXATTRS, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_ATTR | 0x02, "C_OSD_OP_SETXATTRS") \
1166 V(C_OSD_OP_RESETXATTRS, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_ATTR | 0x03, "C_OSD_OP_RESETXATTRS") \
1167 V(C_OSD_OP_RMXATTR, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_ATTR | 0x04, "C_OSD_OP_RMXATTR") \
1168 V(C_OSD_OP_CLONERANGE, C_OSD_OP_MODE_WR | C_OSD_OP_TYPE_MULTI | 0x01, "C_OSD_OP_CLONERANGE") \
1169 V(C_OSD_OP_MODE_RMW, 0x3000, "C_OSD_OP_MODE_RMW") \
1170 V(C_OSD_OP_TMAPUP, C_OSD_OP_MODE_RMW | C_OSD_OP_TYPE_DATA | 0x0A, "C_OSD_OP_TMAPUP") \
1171 V(C_OSD_OP_TMAP2OMAP, C_OSD_OP_MODE_RMW | C_OSD_OP_TYPE_DATA | 0x22, "C_OSD_OP_TMAP2OMAP") \
1172 V(C_OSD_OP_MODE_SUB, 0x4000, "C_OSD_OP_MODE_SUB") \
1173 V(C_OSD_OP_PULL, C_OSD_OP_MODE_SUB | 0x01, "C_OSD_OP_PULL") \
1174 V(C_OSD_OP_PUSH, C_OSD_OP_MODE_SUB | 0x02, "C_OSD_OP_PUSH") \
1175 V(C_OSD_OP_BALANCEREADS, C_OSD_OP_MODE_SUB | 0x03, "C_OSD_OP_BALANCEREADS") \
1176 V(C_OSD_OP_UNBALANCEREADS, C_OSD_OP_MODE_SUB | 0x04, "C_OSD_OP_UNBALANCEREADS") \
1177 V(C_OSD_OP_SCRUB, C_OSD_OP_MODE_SUB | 0x05, "C_OSD_OP_SCRUB") \
1178 V(C_OSD_OP_SCRUB_RESERVE, C_OSD_OP_MODE_SUB | 0x06, "C_OSD_OP_SCRUB_RESERVE") \
1179 V(C_OSD_OP_SCRUB_UNRESERVE, C_OSD_OP_MODE_SUB | 0x07, "C_OSD_OP_SCRUB_UNRESERVE") \
1180 V(C_OSD_OP_SCRUB_STOP, C_OSD_OP_MODE_SUB | 0x08, "C_OSD_OP_SCRUB_STOP") \
1181 V(C_OSD_OP_SCRUB_MAP, C_OSD_OP_MODE_SUB | 0x09, "C_OSD_OP_SCRUB_MAP") \
1182 V(C_OSD_OP_MODE_CACHE, 0x8000, "C_OSD_OP_MODE_CACHE") \
1183 V(C_OSD_OP_CACHE_FLUSH, C_OSD_OP_MODE_CACHE | C_OSD_OP_TYPE_DATA | 0x1F, "C_OSD_OP_CACHE_FLUSH") \
1184 V(C_OSD_OP_CACHE_EVICT, C_OSD_OP_MODE_CACHE | C_OSD_OP_TYPE_DATA | 0x20, "C_OSD_OP_CACHE_EVICT") \
1185 V(C_OSD_OP_CACHE_TRY_FLUSH, C_OSD_OP_MODE_CACHE | C_OSD_OP_TYPE_DATA | 0x21, "C_OSD_OP_CACHE_TRY_FLUSH") \
1186 V(C_OSD_OP_MODE, 0xf000, "C_OSD_OP_MODE")
1188 C_MAKE_STRINGS_EXT(c_osd_optype, 4)
1190 #define c_poolop_type_strings_VALUE_STRING_LIST(V) \
1191 V(POOL_OP_CREATE, 0x01, "Create") \
1192 V(POOL_OP_DELETE, 0x02, "Delete") \
1193 V(POOL_OP_AUID_CHANGE, 0x03, "Change Owner") \
1194 V(POOL_OP_CREATE_SNAP, 0x11, "Create Snapshot") \
1195 V(POOL_OP_DELETE_SNAP, 0x12, "Delete Snapshot") \
1196 V(POOL_OP_CREATE_UNMANAGED_SNAP, 0x21, "Create Unmanaged Snapshot") \
1197 V(POOL_OP_DELETE_UNMANAGED_SNAP, 0x22, "Delete Unmanaged Snapshot")
1199 C_MAKE_STRINGS(c_poolop_type, 2)
1201 #define c_mon_election_type_strings_VALUE_STRING_LIST(V) \
1202 V(C_MON_ELECTION_PROPOSE, 0x00000001, "Propose") \
1203 V(C_MON_ELECTION_ACK, 0x00000002, "Acknowledge") \
1204 V(C_MON_ELECTION_NAK, 0x00000003, "Negative Acknowledge") \
1205 V(C_MON_ELECTION_VICTORY, 0x00000004, "Victory")
1207 C_MAKE_STRINGS_EXT(c_mon_election_type, 8)
1209 #define c_mon_paxos_op_strings_VALUE_STRING_LIST(V) \
1210 V(C_MON_PAXOS_COLLECT, 0x00000001, "Propose Round") \
1211 V(C_MON_PAXOS_LAST, 0x00000002, "Accept Round") \
1212 V(C_MON_PAXOS_BEGIN, 0x00000003, "Propose Value") \
1213 V(C_MON_PAXOS_ACCEPT, 0x00000004, "Accept Value") \
1214 V(C_MON_PAXOS_COMMIT, 0x00000005, "Commit") \
1215 V(C_MON_PAXOS_LEASE, 0x00000006, "Extend Peon Lease") \
1216 V(C_MON_PAXOS_LEASEACK, 0x00000007, "Lease Acknowledgment")
1218 C_MAKE_STRINGS_EXT(c_mon_paxos_op, 8)
1220 #define c_mon_probe_type_strings_VALUE_STRING_LIST(V) \
1221 V(C_MON_PROBE_PROBE, 0x00000001, "Probe") \
1222 V(C_MON_PROBE_REPLY, 0x00000002, "Reply") \
1223 V(C_MON_PROBE_SLURP, 0x00000003, "Slurp") \
1224 V(C_MON_PROBE_SLURP_LATEST, 0x00000004, "Slurp Latest") \
1225 V(C_MON_PROBE_DATA, 0x00000005, "Data") \
1226 V(C_MON_PROBE_MISSING_FEATURES, 0x00000006, "Missing Features")
1228 C_MAKE_STRINGS_EXT(c_mon_probe_type, 8)
1230 #define c_osd_ping_op_strings_VALUE_STRING_LIST(V) \
1231 V(C_TIMECHECK_HEARTBEAT, 0x00, "Heartbeat") \
1232 V(C_TIMECHECK_START_HEARTBEAT, 0x01, "Start Heartbeats") \
1233 V(C_TIMECHECK_YOU_DIED, 0x02, "You Died") \
1234 V(C_TIMECHECK_STOP_HEARTBEAT, 0x03, "Stop Heartbeats") \
1235 V(C_TIMECHECK_PING, 0x04, "Ping") \
1236 V(C_TIMECHECK_PING_REPLY, 0x05, "Pong")
1238 C_MAKE_STRINGS_EXT(c_osd_ping_op, 2)
1240 #define c_session_op_type_strings_VALUE_STRING_LIST(V) \
1241 V(C_SESSION_REQUEST_OPEN, 0x00000000, "Request Open") \
1242 V(C_SESSION_OPEN, 0x00000001, "Open") \
1243 V(C_SESSION_REQUEST_CLOSE, 0x00000002, "Request Close") \
1244 V(C_SESSION_CLOSE, 0x00000003, "Close") \
1245 V(C_SESSION_REQUEST_RENEWCAPS, 0x00000004, "Request Renew Caps") \
1246 V(C_SESSION_RENEWCAPS, 0x00000005, "Renew Caps") \
1247 V(C_SESSION_STALE, 0x00000006, "Stale") \
1248 V(C_SESSION_RECALL_STATE, 0x00000007, "Recall Stale") \
1249 V(C_SESSION_FLUSHMSG, 0x00000008, "Flush Message") \
1250 V(C_SESSION_FLUSHMSG_ACK, 0x00000009, "Flush Message Ack")
1252 C_MAKE_STRINGS_EXT(c_session_op_type, 8)
1254 #define c_mds_op_type_strings_VALUE_STRING_LIST(V) \
1255 V(C_MDS_OP_LOOKUP, 0x00000100, "MDS_OP_LOOKUP") \
1256 V(C_MDS_OP_GETATTR, 0x00000101, "MDS_OP_GETATTR") \
1257 V(C_MDS_OP_LOOKUPHASH, 0x00000102, "MDS_OP_LOOKUPHASH") \
1258 V(C_MDS_OP_LOOKUPPARENT, 0x00000103, "MDS_OP_LOOKUPPARENT") \
1259 V(C_MDS_OP_LOOKUPINO, 0x00000104, "MDS_OP_LOOKUPINO") \
1260 V(C_MDS_OP_LOOKUPNAME, 0x00000105, "MDS_OP_LOOKUPNAME") \
1261 V(C_MDS_OP_GETFILELOCK, 0x00000110, "MDS_OP_GETFILELOCK") \
1262 V(C_MDS_OP_OPEN, 0x00000302, "MDS_OP_OPEN") \
1263 V(C_MDS_OP_READDIR, 0x00000305, "MDS_OP_READDIR") \
1264 V(C_MDS_OP_LOOKUPSNAP, 0x00000400, "MDS_OP_LOOKUPSNAP") \
1265 V(C_MDS_OP_LSSNAP, 0x00000402, "MDS_OP_LSSNAP") \
1266 V(C_MDS_OP_WRITE, 0x00001000, "MDS_OP_WRITE") \
1267 V(C_MDS_OP_SETXATTR, 0x00001105, "MDS_OP_SETXATTR") \
1268 V(C_MDS_OP_RMXATTR, 0x00001106, "MDS_OP_RMXATTR") \
1269 V(C_MDS_OP_SETLAYOUT, 0x00001107, "MDS_OP_SETLAYOUT") \
1270 V(C_MDS_OP_SETATTR, 0x00001108, "MDS_OP_SETATTR") \
1271 V(C_MDS_OP_SETFILELOCK, 0x00001109, "MDS_OP_SETFILELOCK") \
1272 V(C_MDS_OP_SETDIRLAYOUT, 0x0000110a, "MDS_OP_SETDIRLAYOUT") \
1273 V(C_MDS_OP_MKNOD, 0x00001201, "MDS_OP_MKNOD") \
1274 V(C_MDS_OP_LINK, 0x00001202, "MDS_OP_LINK") \
1275 V(C_MDS_OP_UNLINK, 0x00001203, "MDS_OP_UNLINK") \
1276 V(C_MDS_OP_RENAME, 0x00001204, "MDS_OP_RENAME") \
1277 V(C_MDS_OP_MKDIR, 0x00001220, "MDS_OP_MKDIR") \
1278 V(C_MDS_OP_RMDIR, 0x00001221, "MDS_OP_RMDIR") \
1279 V(C_MDS_OP_SYMLINK, 0x00001222, "MDS_OP_SYMLINK") \
1280 V(C_MDS_OP_CREATE, 0x00001301, "MDS_OP_CREATE") \
1281 V(C_MDS_OP_MKSNAP, 0x00001400, "MDS_OP_MKSNAP") \
1282 V(C_MDS_OP_RMSNAP, 0x00001401, "MDS_OP_RMSNAP") \
1283 V(C_MDS_OP_FRAGMENTDIR, 0x00001500, "MDS_OP_FRAGMENTDIR") \
1284 V(C_MDS_OP_EXPORTDIR, 0x00001501, "MDS_OP_EXPORTDIR")
1286 C_MAKE_STRINGS_EXT(c_mds_op_type, 8)
1288 #define c_cap_op_type_strings_VALUE_STRING_LIST(V) \
1289 V(C_CAP_OP_GRANT, 0x00000000, "mds->client grant") \
1290 V(C_CAP_OP_REVOKE, 0x00000001, "mds->client revoke") \
1291 V(C_CAP_OP_TRUNC, 0x00000002, "mds->client trunc notify") \
1292 V(C_CAP_OP_EXPORT, 0x00000003, "mds has exported the cap") \
1293 V(C_CAP_OP_IMPORT, 0x00000004, "mds has imported the cap") \
1294 V(C_CAP_OP_UPDATE, 0x00000005, "client->mds update") \
1295 V(C_CAP_OP_DROP, 0x00000006, "client->mds drop cap bits") \
1296 V(C_CAP_OP_FLUSH, 0x00000007, "client->mds cap writeback") \
1297 V(C_CAP_OP_FLUSH_ACK, 0x00000008, "mds->client flushed") \
1298 V(C_CAP_OP_FLUSHSNAP, 0x00000009, "client->mds flush snapped metadata") \
1299 V(C_CAP_OP_FLUSHSNAP_ACK, 0x0000000A, "mds->client flushed snapped metadata") \
1300 V(C_CAP_OP_RELEASE, 0x0000000B, "client->mds release (clean) cap") \
1301 V(C_CAP_OP_RENEW, 0x0000000C, "client->mds renewal request")
1303 C_MAKE_STRINGS_EXT(c_cap_op_type, 8)
1305 #define c_timecheck_op_strings_VALUE_STRING_LIST(V) \
1306 V(C_TIMECHECK_OP_PING, 0x00000001, "Ping") \
1307 V(C_TIMECHECK_OP_PONG, 0x00000002, "Pong") \
1308 V(C_TIMECHECK_OP_REPORT, 0x00000003, "Report")
1310 C_MAKE_STRINGS_EXT(c_timecheck_op, 8)
1312 #define c_pgpool_type_strings_VALUE_STRING_LIST(V) \
1313 V(C_PGPOOL_REPLICATED, 0x01, "Replicated") \
1314 V(C_PGPOOL_RAID4, 0x02, "Raid4") \
1315 V(C_PGPOOL_ERASURE, 0x03, "Erasure-coded")
1317 C_MAKE_STRINGS(c_pgpool_type, 2)
1319 #define c_pgpool_cachemode_strings_VALUE_STRING_LIST(V) \
1320 V(C_PGPOOL_CACHEMODE_NONE, 0x00, "No caching") \
1321 V(C_PGPOOL_CACHEMODE_WRITEBACK, 0x01, "Write to cache, flush later") \
1322 V(C_PGPOOL_CACHEMODE_FORWARD, 0x02, "Forward if not in cache") \
1323 V(C_PGPOOL_CACHEMODE_READONLY, 0x03, "Handle reads, forward writes [not strongly consistent]")
1325 C_MAKE_STRINGS_EXT(c_pgpool_cachemode, 2)
1327 #define c_hitset_params_type_strings_VALUE_STRING_LIST(V) \
1328 V(C_HITSET_PARAMS_TYPE_NONE, 0x00, "None") \
1329 V(C_HITSET_PARAMS_TYPE_EXPLICIT_HASH, 0x01, "Explicit Hash") \
1330 V(C_HITSET_PARAMS_TYPE_EXPLICIT_OBJECT, 0x02, "Explicit Object") \
1331 V(C_HITSET_PARAMS_TYPE_BLOOM, 0x03, "Bloom Filter")
1333 C_MAKE_STRINGS_EXT(c_hitset_params_type, 2)
1335 #define c_auth_proto_strings_VALUE_STRING_LIST(V) \
1336 V(C_AUTH_PROTO_UNKNOWN, 0x00, "Undecided") \
1337 V(C_AUTH_PROTO_NONE, 0x01, "None") \
1338 V(C_AUTH_PROTO_CEPHX, 0x02, "CephX")
1340 C_MAKE_STRINGS(c_auth_proto, 2)
1342 #define c_cephx_req_type_strings_VALUE_STRING_LIST(V) \
1343 V(C_CEPHX_REQ_AUTH_SESSIONKEY, 0x0100, "Get Auth Session Key") \
1344 V(C_CEPHX_REQ_PRINCIPAL_SESSIONKEY, 0x0200, "Get Principal Session Key") \
1345 V(C_CEPHX_REQ_ROTATINGKEY, 0x0400, "Get Rotating Key")
1347 C_MAKE_STRINGS(c_cephx_req_type, 4)
1349 /** Node type database. */
1350 #define c_node_type_strings_LIST(V, W) \
1351 V(C_NODE_TYPE_UNKNOWN, 0x00, W("Unknown", "unknown")) \
1352 V(C_NODE_TYPE_MON, 0x01, W("Monitor", "mon" )) \
1353 V(C_NODE_TYPE_MDS, 0x02, W("Meta Data Server", "mds" )) \
1354 V(C_NODE_TYPE_OSD, 0x04, W("Object Storage Daemon", "osd" )) \
1355 V(C_NODE_TYPE_CLIENT, 0x08, W("Client", "client" )) \
1356 V(C_NODE_TYPE_AUTH, 0x20, W("Authentication Server", "auth" ))
1358 #define C_EXTRACT_1(a, b) a
1359 #define C_EXTRACT_2(a, b) b
1361 /** Extract the full names to create a value_string list. */
1362 #define c_node_type_strings_VALUE_STRING_LIST(V) \
1363 c_node_type_strings_LIST(V, C_EXTRACT_1)
1365 C_MAKE_STRINGS(c_node_type, 2)
1367 /** Extract the abbreviations to create a value_string list. */
1368 #define c_node_type_abbr_strings_VALUE_STRING_LIST(V) \
1369 c_node_type_strings_LIST(V, C_EXTRACT_2)
1371 VALUE_STRING_ARRAY(c_node_type_abbr_strings);
1373 static
1374 const char *c_node_type_abbr_string(c_node_type val)
1376 return val_to_str(val, c_node_type_abbr_strings, "Unknown (0x%02x)");
1379 #define C_MON_SUB_FLAG_ONETIME 0x01
1381 typedef enum _c_state {
1382 C_STATE_NEW,
1383 C_STATE_OPEN,
1384 C_STATE_SEQ /* Waiting for sequence number. */
1385 } c_state;
1387 typedef struct _c_node_name {
1388 const char *slug;
1389 const char *type_str;
1390 uint64_t id;
1391 c_node_type type;
1392 } c_entityname;
1394 static
1395 void c_node_name_init(c_entityname *d)
1397 d->slug = NULL;
1398 d->type_str = NULL;
1399 d->id = UINT64_MAX;
1400 d->type = C_NODE_TYPE_UNKNOWN;
1403 typedef struct _c_node {
1404 address addr;
1405 c_entityname name;
1406 c_state state;
1407 uint16_t port;
1408 } c_node;
1410 static
1411 void c_node_init(c_node *n)
1413 clear_address(&n->addr);
1414 c_node_name_init(&n->name);
1415 n->port = 0xFFFF;
1416 n->state = C_STATE_NEW;
1419 static
1420 c_node *c_node_copy(c_node *src, c_node *dst)
1422 dst->name = src->name;
1423 copy_address_shallow(&dst->addr, &src->addr);
1424 dst->port = src->port;
1425 dst->state = src->state;
1427 return dst;
1430 typedef struct _c_conv_data {
1431 c_node client; /* The node that initiated this connection. */
1432 c_node server; /* The other node. */
1433 } c_conv_data;
1435 static
1436 void c_conv_data_init(c_conv_data *d)
1438 c_node_init(&d->client);
1439 c_node_init(&d->server);
1442 static
1443 c_conv_data *c_conv_data_copy(c_conv_data *src, c_conv_data *dst)
1445 c_node_copy(&src->client, &dst->client);
1446 c_node_copy(&src->server, &dst->server);
1448 return dst;
1451 static
1452 c_conv_data *c_conv_data_clone(c_conv_data *d)
1454 return c_conv_data_copy(d, wmem_new(wmem_file_scope(), c_conv_data));
1457 static
1458 c_conv_data *c_conv_data_new(void)
1460 c_conv_data *r;
1461 r = wmem_new(wmem_file_scope(), c_conv_data);
1462 c_conv_data_init(r);
1463 return r;
1466 typedef struct _c_header {
1467 uint64_t seq;
1468 uint64_t tid;
1469 c_msg_type type;
1470 uint16_t ver;
1471 uint16_t priority;
1472 c_entityname src;
1473 } c_header;
1475 static
1476 void c_header_init(c_header *h)
1478 h->seq = 0;
1479 h->tid = 0;
1480 h->type = C_MSG_UNKNOWN;
1481 h->priority = 0;
1482 h->ver = 0;
1483 memset(&h->src, 0, sizeof(h->src));
1486 typedef struct _c_pkt_data {
1487 conversation_t *conv; /* The wireshark conversation. */
1488 c_conv_data *convd; /* The Ceph conversation data. */
1489 c_node *src; /* The node in convd that sent this message. */
1490 c_node *dst; /* The node in convd that is receiving this message. */
1492 proto_item *item_root; /* The root proto_item for the message. */
1493 packet_info *pinfo;
1495 c_header header; /* The MSG header. */
1496 } c_pkt_data;
1498 /** Initialize the packet data.
1500 * The packet data structure holds all of the Ceph-specific data that is needed
1501 * to dissect the protocol. This function initializes the structure.
1503 * This function grabs the appropriate data either from previous packets in the
1504 * dissection, or creating a new data for new conversations.
1506 * Lastly this function saves the state before every packet so that if we are
1507 * asked to dissect the same packet again the same state will be used as when
1508 * it was dissected initially.
1510 static void
1511 c_pkt_data_init(c_pkt_data *d, packet_info *pinfo, unsigned off)
1513 /* Get conversation to store/retrieve connection data. */
1514 d->conv = find_or_create_conversation(pinfo);
1515 DISSECTOR_ASSERT_HINT(d->conv, "find_or_create_conversation() returned NULL");
1517 if (pinfo->fd->visited)
1519 /* Retrieve the saved state. */
1520 d->convd = (c_conv_data*)p_get_proto_data(wmem_file_scope(), pinfo,
1521 proto_ceph, off);
1522 DISSECTOR_ASSERT_HINT(d->convd, "Frame visited, but no saved state.");
1523 /* Make a copy and use that so we don't mess up the original. */
1524 d->convd = c_conv_data_copy(d->convd, wmem_new(pinfo->pool, c_conv_data));
1526 else
1529 If there is no saved state get the state from dissecting the
1530 last packet.
1532 d->convd = (c_conv_data*)conversation_get_proto_data(d->conv, proto_ceph);
1535 if (!d->convd) /* New conversation. */
1537 d->convd = c_conv_data_new();
1538 conversation_add_proto_data(d->conv, proto_ceph, d->convd);
1542 * Set up src and dst pointers correctly, if the client port is
1543 * already set. Otherwise, we need to wait until we have enough
1544 * data to determine which is which.
1546 if (d->convd->client.port != 0xFFFF) {
1547 if (addresses_equal(&d->convd->client.addr, &pinfo->src) &&
1548 d->convd->client.port == pinfo->srcport)
1550 d->src = &d->convd->client;
1551 d->dst = &d->convd->server;
1553 else
1555 d->src = &d->convd->server;
1556 d->dst = &d->convd->client;
1558 DISSECTOR_ASSERT(d->src);
1559 DISSECTOR_ASSERT(d->dst);
1562 c_header_init(&d->header);
1563 d->item_root = NULL;
1564 d->pinfo = pinfo;
1567 /** Save packet data.
1569 * This function should be called on complete PDUs to save the state so that
1570 * it will be available when redissecting the packet again later..
1572 * This function only actually saves the state when necessary.
1574 static
1575 void c_pkt_data_save(c_pkt_data *d, packet_info *pinfo, unsigned off)
1577 if (!pinfo->fd->visited)
1580 Save a copy of the state for next time we dissect this packet.
1582 p_add_proto_data(wmem_file_scope(), pinfo, proto_ceph, off,
1583 c_conv_data_clone(d->convd));
1587 /** Check if packet is from the client.
1589 * Returns true iff the packet is from the client.
1591 static
1592 bool c_from_client(c_pkt_data *d)
1594 return d->src == &d->convd->client;
1597 /** Check if packet is from the server.
1599 * See c_from_client()
1601 static
1602 bool c_from_server(c_pkt_data *d)
1604 return d->src == &d->convd->server;
1607 static
1608 void c_set_type(c_pkt_data *data, const char *type)
1610 col_add_str(data->pinfo->cinfo, COL_INFO, type);
1611 proto_item_append_text(data->item_root, " %s", type);
1614 #define c_append_text(data, ti, ...) \
1615 do { \
1616 proto_item_append_text(ti, __VA_ARGS__); \
1617 proto_item_append_text(data->item_root, __VA_ARGS__); \
1618 } while (0);
1620 /** Format a timespec.
1622 * The returned string has packet lifetime.
1624 static
1625 char *c_format_timespec(tvbuff_t *tvb, unsigned off)
1627 nstime_t t;
1628 t.secs = tvb_get_letohl(tvb, off);
1629 t.nsecs = tvb_get_letohl(tvb, off+4);
1630 return abs_time_to_str(wmem_packet_scope(), &t, ABSOLUTE_TIME_LOCAL, 1);
1633 /** Format a UUID
1635 * The returned string has packet lifetime.
1637 static
1638 char *c_format_uuid(tvbuff_t *tvb, unsigned off)
1640 e_guid_t uuid;
1641 tvb_get_guid(tvb, off, &uuid, ENC_BIG_ENDIAN);
1642 return guid_to_str(wmem_packet_scope(), &uuid);
1645 #define C_NEEDMORE UINT_MAX
1646 #define C_INVALID 0
1648 /*** Expert info warning functions. ***/
1650 /** Warn about unused data.
1652 * Check if there is unused data and if there is warn about it.
1654 * @param tree The tree where the error should be added.
1655 * @param tvb The buffer with the data.
1656 * @param start The start of the unused data.
1657 * @param end Then end of the unused data.
1658 * @param data The packet data.
1659 * @return True iff there was unused data.
1661 static
1662 bool c_warn_unused(proto_tree *tree,
1663 tvbuff_t *tvb, unsigned start, unsigned end, c_pkt_data *data)
1665 unsigned diff;
1667 DISSECTOR_ASSERT_CMPUINT(start, <=, end);
1669 diff = end - start;
1670 if (!diff) return false; /* no unused space. */
1672 proto_tree_add_expert_format(tree, data->pinfo, &ei_unused,
1673 tvb, start, diff,
1674 "%u unused byte%s", diff, diff == 1? "":"s");
1676 return true;
1679 /** Warn about dissection using more data then expected.
1681 * Check if there is an overrun and if there is warn about it.
1683 * @param tree The tree where the error should be added.
1684 * @param tvb The buffer with the data.
1685 * @param start The start of the overun.
1686 * @param end Then end of the overrun.
1687 * @param data The packet data.
1688 * @return True iff there was an overrun.
1690 static
1691 bool c_warn_overrun(proto_tree *tree,
1692 tvbuff_t *tvb, unsigned start, unsigned end, c_pkt_data *data)
1694 unsigned diff;
1696 DISSECTOR_ASSERT_CMPUINT(start, <=, end);
1698 diff = end - start;
1699 if (!diff) return false; /* no unused space. */
1701 proto_tree_add_expert_format(tree, data->pinfo, &ei_overrun,
1702 tvb, start, diff,
1703 "%u overrun byte%s", diff, diff == 1? "":"s");
1705 return true;
1708 /** Warn about incorrect offset.
1710 * Check if the offset is at the expected location, otherwise warn about it.
1712 * @param tree The tree where the error should be added.
1713 * @param tvb The buffer with the data.
1714 * @param act The actual offset.
1715 * @param exp The expected offset.
1716 * @param data The packet data.
1717 * @return True iff there was a mismatch.
1719 static
1720 bool c_warn_size(proto_tree *tree,
1721 tvbuff_t *tvb, unsigned act, unsigned exp, c_pkt_data *data)
1723 if (act < exp) return c_warn_unused (tree, tvb, act, exp, data);
1724 else return c_warn_overrun(tree, tvb, exp, act, data);
1727 /** Warn about version mismatches.
1729 * Check that the version is within the supported range, otherwise warn about
1730 * it.
1732 * @param ti The item to attach the warning to (probably the version item).
1733 * @param min The minimum supported version.
1734 * @param max The maximum supported version.
1735 * @param data The packet data.
1736 * @return A value less than zero if the version is to old and a value greater
1737 * then zero if the version is too new. Otherwise return zero.
1739 static
1740 int c_warn_ver(proto_item *ti,
1741 int act, int min, int max, c_pkt_data *data)
1743 DISSECTOR_ASSERT_CMPINT(min, <=, max);
1745 if (act < min)
1747 expert_add_info_format(data->pinfo, ti, &ei_ver_tooold,
1748 "Version %d is lower then the minimum "
1749 "supported version (%d).",
1750 act, min);
1751 return -1;
1753 if (act > max)
1755 expert_add_info_format(data->pinfo, ti, &ei_ver_toonew,
1756 "Version %d is higher then the maximum "
1757 "supported version (%d).",
1758 act, max);
1759 return 1;
1762 return 0;
1765 /***** Data Structure Dissectors *****/
1767 /** Dissect a length-delimited binary blob.
1769 static
1770 unsigned c_dissect_blob(proto_tree *root, int hf, int hf_data, int hf_len,
1771 tvbuff_t *tvb, unsigned off)
1773 proto_item *ti;
1774 proto_tree *tree;
1775 uint32_t size;
1777 size = tvb_get_letohl(tvb, off);
1779 ti = proto_tree_add_item(root, hf, tvb, off, size+4, ENC_NA);
1780 tree = proto_item_add_subtree(ti, ett_data);
1782 proto_item_append_text(ti, ", Size: %"PRIu32, size);
1783 if (size)
1785 proto_item_append_text(ti, ", Data: %s",
1786 tvb_bytes_to_str(wmem_packet_scope(), tvb, off+4, size));
1789 proto_tree_add_item(tree, hf_len,
1790 tvb, off, 4, ENC_LITTLE_ENDIAN);
1791 off += 4;
1792 proto_tree_add_item(tree, hf_data,
1793 tvb, off, size, ENC_NA);
1794 off += size;
1796 return off;
1799 /** Dissect a blob of data.
1801 * This is intended for data that is not yet being dissected but will be later.
1803 static
1804 unsigned c_dissect_data(proto_tree *tree, int hf,
1805 tvbuff_t *tvb, unsigned off)
1807 return c_dissect_blob(tree, hf, hf_data_data, hf_data_size, tvb, off);
1810 typedef struct _c_str {
1811 char *str; /** The string data ('\0' terminated). */
1812 uint32_t size; /** The number of bytes in the string. */
1813 } c_str;
1815 /** Dissect a length-delimited string.
1817 * If \a out is provided the string will be stored there.
1819 static
1820 unsigned c_dissect_str(proto_tree *root, int hf, c_str *out,
1821 tvbuff_t *tvb, unsigned off)
1823 proto_item *ti;
1824 proto_tree *tree;
1825 c_str d;
1827 d.size = tvb_get_letohl(tvb, off);
1828 d.str = (char*)tvb_get_string_enc(wmem_packet_scope(),
1829 tvb, off+4, d.size, ENC_ASCII);
1831 ti = proto_tree_add_string(root, hf, tvb, off, 4+d.size, d.str);
1832 tree = proto_item_add_subtree(ti, ett_str);
1834 proto_tree_add_item(tree, hf_string_size,
1835 tvb, off, 4, ENC_LITTLE_ENDIAN);
1836 off += 4;
1837 proto_tree_add_item(tree, hf_string_data,
1838 tvb, off, d.size, ENC_UTF_8);
1839 off += d.size;
1841 if (out) *out = d;
1843 return off;
1846 #define C_SIZE_SOCKADDR_STORAGE 128
1848 typedef struct _c_sockaddr {
1849 const char *str; /** A string representing the entire address. */
1850 const char *addr_str; /** A string representing the address portion. */
1852 c_inet af; /** Address family. */
1853 uint16_t port; /** Network Port. */
1854 } c_sockaddr;
1856 /** Dissect sockaddr structure.
1858 * If \a out is provided the data will be stored there.
1860 static
1861 unsigned c_dissect_sockaddr(proto_tree *root, c_sockaddr *out,
1862 tvbuff_t *tvb, unsigned off)
1864 proto_item *ti;
1865 proto_tree *tree;
1866 c_sockaddr d;
1869 struct sockaddr_storage {
1870 uint16_t family;
1871 uint8_t pad[???]; // Implementation defined.
1873 struct sockaddr_in {
1874 uint16_t family;
1875 uint16_t port;
1876 uint32_t addr;
1877 uint8_t pad[8];
1879 struct sockaddr_in6 {
1880 uint16_t family;
1881 uint16_t port;
1882 uint32_t flow;
1883 uint8_t addr[16];
1884 uint32_t scope;
1888 ti = proto_tree_add_item(root, hf_sockaddr,
1889 tvb, off, C_SIZE_SOCKADDR_STORAGE, ENC_NA);
1890 tree = proto_item_add_subtree(ti, ett_sockaddr);
1892 d.af = (c_inet)tvb_get_ntohs(tvb, off);
1894 proto_tree_add_item(tree, hf_inet_family, tvb, off, 2, ENC_BIG_ENDIAN);
1896 switch (d.af) {
1897 case C_IPv4:
1898 d.port = tvb_get_ntohs(tvb, off+2);
1899 d.addr_str = tvb_ip_to_str(wmem_packet_scope(), tvb, off+4);
1901 proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
1902 proto_tree_add_item(tree, hf_addr_ipv4, tvb, off+4, 4, ENC_BIG_ENDIAN);
1903 break;
1904 case C_IPv6:
1905 d.port = tvb_get_ntohs (tvb, off+2);
1906 d.addr_str = tvb_ip6_to_str(wmem_packet_scope(), tvb, off+8);
1908 proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
1909 proto_tree_add_item(tree, hf_addr_ipv6, tvb, off+8, 16, ENC_NA);
1910 break;
1911 default:
1912 d.port = 0;
1913 d.addr_str = "Unknown INET";
1915 off += C_SIZE_SOCKADDR_STORAGE; /* Skip over sockaddr_storage. */
1917 d.str = wmem_strdup_printf(wmem_packet_scope(), "%s:%"PRIu16,
1918 d.addr_str,
1919 d.port);
1920 proto_item_append_text(ti, ": %s", d.str);
1922 if (out) *out = d;
1924 return off;
1927 #define C_SIZE_ENTITY_ADDR (4 + 4 + C_SIZE_SOCKADDR_STORAGE)
1929 typedef struct _c_entity_addr {
1930 c_sockaddr addr;
1931 const char *type_str;
1932 c_node_type type;
1933 } c_entityaddr;
1935 static
1936 unsigned c_dissect_entityaddr(proto_tree *root, int hf, c_entityaddr *out,
1937 tvbuff_t *tvb, unsigned off)
1939 proto_item *ti;
1940 proto_tree *tree;
1941 c_entityaddr d;
1943 /* entity_addr_t from ceph:/src/msg/msg_types.h */
1945 ti = proto_tree_add_item(root, hf, tvb, off, C_SIZE_ENTITY_ADDR, ENC_NA);
1946 tree = proto_item_add_subtree(ti, ett_entityaddr);
1948 d.type = (c_node_type)tvb_get_letohl(tvb, off);
1949 d.type_str = c_node_type_string(d.type);
1950 proto_tree_add_item(tree, hf_node_type,
1951 tvb, off, 4, ENC_LITTLE_ENDIAN);
1952 off += 4;
1953 proto_tree_add_item(tree, hf_node_nonce,
1954 tvb, off, 4, ENC_LITTLE_ENDIAN);
1955 off += 4;
1956 off = c_dissect_sockaddr(tree, &d.addr, tvb, off);
1958 proto_item_append_text(ti, ", Type: %s, Address: %s",
1959 d.type_str, d.addr.str);
1961 if (out) *out = d;
1963 return off;
1966 #define C_SIZE_ENTITY_NAME 9
1968 /** Dissect a ceph_entity_name.
1970 * If \a out is provided the data is stored there.
1972 static
1973 unsigned c_dissect_entityname(proto_tree *root, int hf, c_entityname *out,
1974 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
1976 /* From ceph:/src/include/msgr.h
1977 struct ceph_entity_name {
1978 __u8 type; // CEPH_ENTITY_TYPE_*
1979 __le64 num;
1980 } __attribute__ ((packed));
1983 proto_item *ti;
1984 proto_tree *tree;
1985 c_entityname d;
1987 ti = proto_tree_add_item(root, hf,
1988 tvb, off, C_SIZE_ENTITY_NAME, ENC_NA);
1989 tree = proto_item_add_subtree(ti, ett_entityname);
1991 d.type = (c_node_type)tvb_get_uint8(tvb, off);
1992 d.type_str = c_node_type_abbr_string(d.type);
1993 proto_tree_add_item(tree, hf_node_type,
1994 tvb, off, 1, ENC_LITTLE_ENDIAN);
1995 off += 1;
1997 d.id = tvb_get_letoh64(tvb, off);
1998 proto_tree_add_item(tree, hf_node_id,
1999 tvb, off, 8, ENC_LITTLE_ENDIAN);
2000 off += 8;
2002 if (d.id == UINT64_MAX)
2004 d.slug = d.type_str;
2006 else
2008 d.slug = wmem_strdup_printf(wmem_packet_scope(), "%s%"PRIu64,
2009 d.type_str,
2010 d.id);
2013 proto_item_append_text(ti, ": %s", d.slug);
2015 if (out) *out = d;
2016 return off;
2019 typedef struct _c_entityinst {
2020 c_entityname name;
2021 c_entityaddr addr;
2022 } c_entityinst;
2024 /** Dissect an entity_inst_t.
2026 static
2027 unsigned c_dissect_entityinst(proto_tree *root, int hf, c_entityinst *out,
2028 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2030 proto_item *ti;
2031 proto_tree *tree;
2033 c_entityinst d;
2035 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2036 tree = proto_item_add_subtree(ti, ett_entityinst);
2038 off = c_dissect_entityname(tree, hf_entityinst_name, &d.name, tvb, off, data);
2039 off = c_dissect_entityaddr(tree, hf_entityinst_addr, &d.addr, tvb, off);
2041 proto_item_append_text(ti, ", Name: %s, Address: %s", d.name.slug, d.addr.addr.str);
2043 if (out) *out = d;
2045 proto_item_set_end(ti, tvb, off);
2046 return off;
2049 /** Dissect an EntityName.
2051 * If \a out is provided the data is stored there.
2053 * \note This is different then c_dissect_entityname()
2055 static
2056 unsigned c_dissect_EntityName(proto_tree *root,
2057 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2059 /* EntityName from ceph:/src/common/entity_name.h */
2061 proto_item *ti;
2062 proto_tree *tree;
2063 c_node_type type;
2064 c_str name;
2066 ti = proto_tree_add_item(root, hf_EntityName,
2067 tvb, off, -1, ENC_NA);
2068 tree = proto_item_add_subtree(ti, ett_EntityName);
2070 type = (c_node_type)tvb_get_letohl(tvb, off);
2071 proto_tree_add_item(tree, hf_EntityName_type,
2072 tvb, off, 4, ENC_LITTLE_ENDIAN);
2073 off += 4;
2075 off = c_dissect_str(tree, hf_EntityName_id, &name, tvb, off);
2077 proto_item_append_text(ti, ": %s.%s",
2078 c_node_type_abbr_string(type), name.str);
2080 proto_item_set_end(ti, tvb, off);
2081 return off;
2084 /** Dissect a connection features list. */
2085 static
2086 unsigned c_dissect_features(proto_tree *tree,
2087 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2089 static int * const lowword[] = {
2090 &hf_feature_uid,
2091 &hf_feature_nosrcaddr,
2092 &hf_feature_monclockcheck,
2093 &hf_feature_flock,
2094 &hf_feature_subscribe2,
2095 &hf_feature_monnames,
2096 &hf_feature_reconnect_seq,
2097 &hf_feature_dirlayouthash,
2098 &hf_feature_objectlocator,
2099 &hf_feature_pgid64,
2100 &hf_feature_incsubosdmap,
2101 &hf_feature_pgpool3,
2102 &hf_feature_osdreplymux,
2103 &hf_feature_osdenc,
2104 &hf_feature_omap,
2105 &hf_feature_monenc,
2106 &hf_feature_query_t,
2107 &hf_feature_indep_pg_map,
2108 &hf_feature_crush_tunables,
2109 &hf_feature_chunky_scrub,
2110 &hf_feature_mon_nullroute,
2111 &hf_feature_mon_gv,
2112 &hf_feature_backfill_reservation,
2113 &hf_feature_msg_auth,
2114 &hf_feature_recovery_reservation,
2115 &hf_feature_crush_tunables2,
2116 &hf_feature_createpoolid,
2117 &hf_feature_reply_create_inode,
2118 &hf_feature_osd_hbmsgs,
2119 &hf_feature_mdsenc,
2120 &hf_feature_osdhashpspool,
2121 &hf_feature_mon_single_paxos,
2122 NULL
2124 static int * const highword[] = {
2125 &hf_feature_osd_snapmapper,
2126 &hf_feature_mon_scrub,
2127 &hf_feature_osd_packed_recovery,
2128 &hf_feature_osd_cachepool,
2129 &hf_feature_crush_v2,
2130 &hf_feature_export_peer,
2131 &hf_feature_osd_erasure_codes,
2132 &hf_feature_osd_tmap2omap,
2133 &hf_feature_osdmap_enc,
2134 &hf_feature_mds_inline_data,
2135 &hf_feature_crush_tunables3,
2136 &hf_feature_osd_primary_affinity,
2137 &hf_feature_msgr_keepalive2,
2138 &hf_feature_reserved,
2139 NULL
2142 /* Wireshark doesn't have support for 64 bit bitfields so dissect as
2143 two 32 bit ones. */
2145 proto_tree_add_bitmask(tree, tvb, off, hf_features_low, hf_features_low,
2146 lowword, ENC_LITTLE_ENDIAN);
2147 off += 4;
2149 proto_tree_add_bitmask(tree, tvb, off, hf_features_high, hf_features_high,
2150 highword, ENC_LITTLE_ENDIAN);
2151 off += 4;
2153 return off;
2156 /** Dissect message flags. */
2157 static
2158 unsigned c_dissect_flags(proto_tree *tree,
2159 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2161 static int * const flags[] = {
2162 &hf_flag_lossy,
2163 NULL
2166 proto_tree_add_bitmask(tree, tvb, off, hf_flags, hf_flags,
2167 flags, ENC_LITTLE_ENDIAN);
2169 return off+1;
2172 #define C_OSD_FLAG_ACK 0x00000001 /* want (or is) "ack" ack */
2173 #define C_OSD_FLAG_ONNVRAM 0x00000002 /* want (or is) "onnvram" ack */
2174 #define C_OSD_FLAG_ONDISK 0x00000004 /* want (or is) "ondisk" ack */
2175 #define C_OSD_FLAG_RETRY 0x00000008 /* resend attempt */
2176 #define C_OSD_FLAG_READ 0x00000010 /* op may read */
2177 #define C_OSD_FLAG_WRITE 0x00000020 /* op may write */
2178 #define C_OSD_FLAG_ORDERSNAP 0x00000040 /* EOLDSNAP if snapc is out of order */
2179 #define C_OSD_FLAG_PEERSTAT_OLD 0x00000080 /* DEPRECATED msg includes osd_peer_stat */
2180 #define C_OSD_FLAG_BALANCE_READS 0x00000100
2181 #define C_OSD_FLAG_PARALLELEXEC 0x00000200 /* execute op in parallel */
2182 #define C_OSD_FLAG_PGOP 0x00000400 /* pg op, no object */
2183 #define C_OSD_FLAG_EXEC 0x00000800 /* op may exec */
2184 #define C_OSD_FLAG_EXEC_PUBLIC 0x00001000 /* DEPRECATED op may exec (public) */
2185 #define C_OSD_FLAG_LOCALIZE_READS 0x00002000 /* read from nearby replica, if any */
2186 #define C_OSD_FLAG_RWORDERED 0x00004000 /* order wrt concurrent reads */
2187 #define C_OSD_FLAG_IGNORE_CACHE 0x00008000 /* ignore cache logic */
2188 #define C_OSD_FLAG_SKIPRWLOCKS 0x00010000 /* skip rw locks */
2189 #define C_OSD_FLAG_IGNORE_OVERLAY 0x00020000 /* ignore pool overlay */
2190 #define C_OSD_FLAG_FLUSH 0x00040000 /* this is part of flush */
2191 #define C_OSD_FLAG_MAP_SNAP_CLONE 0x00080000 /* map snap direct to clone id */
2192 #define C_OSD_FLAG_ENFORCE_SNAPC 0x00100000 /* use snapc provided even if pool uses pool snaps */
2194 /** Dissect OSD flags. */
2195 static
2196 unsigned c_dissect_osd_flags(proto_tree *tree,
2197 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2199 static int * const flags[] = {
2200 &hf_osd_flag_ack,
2201 &hf_osd_flag_onnvram,
2202 &hf_osd_flag_ondisk,
2203 &hf_osd_flag_retry,
2204 &hf_osd_flag_read,
2205 &hf_osd_flag_write,
2206 &hf_osd_flag_ordersnap,
2207 &hf_osd_flag_peerstat_old,
2208 &hf_osd_flag_balance_reads,
2209 &hf_osd_flag_parallelexec,
2210 &hf_osd_flag_pgop,
2211 &hf_osd_flag_exec,
2212 &hf_osd_flag_exec_public,
2213 &hf_osd_flag_localize_reads,
2214 &hf_osd_flag_rwordered,
2215 &hf_osd_flag_ignore_cache,
2216 &hf_osd_flag_skiprwlocks,
2217 &hf_osd_flag_ignore_overlay,
2218 &hf_osd_flag_flush,
2219 &hf_osd_flag_map_snap_clone,
2220 &hf_osd_flag_enforce_snapc,
2221 NULL
2224 proto_tree_add_bitmask(tree, tvb, off, hf_osd_flags, hf_osd_flags,
2225 flags, ENC_LITTLE_ENDIAN);
2227 return off+4;
2230 /** Dissect a map<string,string>
2232 static
2233 unsigned c_dissect_kv(proto_tree *root, int hf, int hf_k, int hf_v,
2234 tvbuff_t *tvb, unsigned off)
2236 proto_item *ti;
2237 proto_tree *tree;
2238 c_str k, v;
2240 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_LITTLE_ENDIAN);
2241 tree = proto_item_add_subtree(ti, ett_kv);
2243 off = c_dissect_str(tree, hf_k, &k, tvb, off);
2244 off = c_dissect_str(tree, hf_v, &v, tvb, off);
2246 proto_item_append_text(ti, ", %s = %s", k.str, v.str);
2247 proto_item_set_end(ti, tvb, off);
2249 return off;
2252 typedef struct _c_encoded {
2253 uint8_t version; /** The version of the struct. */
2254 uint8_t compat; /** The oldest compatible version. */
2255 uint32_t size; /** The size of the struct in bytes */
2256 unsigned end; /** The end of the structure's data. */
2257 } c_encoded;
2259 /** Dissect and 'encoded' struct.
2261 * @param enc The encoded structure to store data in.
2262 * @param minver The minimum version that is understood.
2263 * @param maxver The maximum version that is understood.
2264 * @return The offset of the data.
2266 static
2267 unsigned c_dissect_encoded(proto_tree *tree, c_encoded *enc,
2268 uint8_t minver, uint8_t maxver,
2269 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2271 proto_item *ti;
2273 DISSECTOR_ASSERT_HINT(enc, "enc out parameter must be non-null.");
2275 enc->version = tvb_get_uint8(tvb, off);
2276 ti = proto_tree_add_item(tree, hf_encoded_ver,
2277 tvb, off++, 1, ENC_LITTLE_ENDIAN);
2278 /* XXX - should we quit if this doesn't return 0? */
2279 c_warn_ver(ti, enc->version, minver, maxver, data);
2280 enc->compat = tvb_get_uint8(tvb, off);
2281 proto_tree_add_item(tree, hf_encoded_compat,
2282 tvb, off++, 1, ENC_LITTLE_ENDIAN);
2284 enc->size = tvb_get_letohl(tvb, off);
2285 proto_tree_add_item(tree, hf_encoded_size,
2286 tvb, off, 4, ENC_LITTLE_ENDIAN);
2287 off += 4;
2289 enc->end = off + enc->size;
2291 return off;
2294 #define C_SIZE_TIMESPEC (4 + 4)
2296 #define C_SIZE_EVERSION 12
2298 /** Dissect a eversion_t */
2299 static
2300 unsigned c_dissect_eversion(proto_tree *root, int hf,
2301 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2303 proto_item *ti;
2304 proto_tree *tree;
2305 uint64_t ver;
2306 uint32_t epoch;
2308 /** eversion_t from ceph:/src/osd/osd_types.h */
2310 ti = proto_tree_add_item(root, hf, tvb, off, C_SIZE_EVERSION, ENC_NA);
2311 tree = proto_item_add_subtree(ti, ett_eversion);
2313 /*** version_t ***/
2314 ver = tvb_get_letoh64(tvb, off);
2315 proto_tree_add_item(tree, hf_version, tvb, off, 8, ENC_LITTLE_ENDIAN);
2316 off += 8;
2318 /*** epoch_t ***/
2319 epoch = tvb_get_letohl(tvb, off);
2320 proto_tree_add_item(tree, hf_epoch, tvb, off, 4, ENC_LITTLE_ENDIAN);
2321 off += 4;
2323 proto_item_append_text(ti,
2324 ", Version: %"PRId64
2325 ", Epoch: %"PRId32,
2326 ver, epoch);
2328 proto_item_set_end(ti, tvb, off);
2329 return off;
2332 /** Dissect an object locator. */
2333 static
2334 unsigned c_dissect_object_locator(proto_tree *root, int hf,
2335 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2337 proto_item *ti;
2338 proto_tree *tree;
2339 c_encoded enchdr;
2340 c_str key, nspace;
2341 int64_t hash;
2343 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2344 tree = proto_item_add_subtree(ti, ett_objectlocator);
2346 off = c_dissect_encoded(tree, &enchdr, 3, 6, tvb, off, data);
2348 proto_item_append_text(ti, ", Pool: %"PRId64,
2349 tvb_get_letohi64(tvb, off));
2350 proto_tree_add_item(tree, hf_pool, tvb, off, 8, ENC_LITTLE_ENDIAN);
2351 off += 8;
2353 off += 4; /* Skip over preferred == -1 that old code used. */
2355 key.size = tvb_get_letohl(tvb, off);
2356 if (key.size)
2358 off = c_dissect_str(tree, hf_key, &key, tvb, off);
2359 proto_item_append_text(ti, ", Key: \"%s\"", key.str);
2361 else off += 4; /* If string is empty we should use hash. */
2363 if (enchdr.version >= 5)
2365 off = c_dissect_str(tree, hf_namespace, &nspace, tvb, off);
2366 if (nspace.size)
2367 proto_item_append_text(ti, ", Namespace: \"%s\"", nspace.str);
2370 if (enchdr.version >= 6)
2372 hash = tvb_get_letoh64(tvb, off);
2373 if (hash >= 0)
2375 proto_tree_add_item(tree, hf_hash, tvb, off, 8, ENC_LITTLE_ENDIAN);
2376 proto_item_append_text(ti, ", Hash: %"PRId64, hash);
2378 off += 8;
2380 else hash = -1;
2382 if (key.size && hash >= 0)
2384 proto_tree_add_expert(tree, data->pinfo, &ei_oloc_both, NULL, 0, 0);
2387 c_warn_size(tree, tvb, off, enchdr.end, data);
2388 off = enchdr.end;
2390 proto_item_set_end(ti, tvb, off);
2391 return off;
2394 /** Dissect a placement group. */
2395 static
2396 unsigned c_dissect_pg(proto_tree *root, int hf,
2397 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2399 proto_item *ti, *ti2;
2400 proto_tree *tree;
2401 uint8_t ver;
2402 int32_t preferred;
2404 /** pg_t from ceph:/src/osd/osd_types.h */
2406 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2407 tree = proto_item_add_subtree(ti, ett_pg);
2409 ver = tvb_get_uint8(tvb, off);
2410 ti2 = proto_tree_add_item(tree, hf_pgid_ver, tvb, off, 1, ENC_LITTLE_ENDIAN);
2411 /* XXX - should we quit if this doesn't return 0? */
2412 c_warn_ver(ti2, ver, 1, 1, data);
2413 off += 1;
2415 proto_item_append_text(ti, ", Pool: %"PRId64,
2416 tvb_get_letoh64(tvb, off));
2417 proto_tree_add_item(tree, hf_pgid_pool, tvb, off, 8, ENC_LITTLE_ENDIAN);
2418 off += 8;
2420 proto_item_append_text(ti, ", Seed: %08"PRIX32,
2421 tvb_get_letohl(tvb, off));
2422 proto_tree_add_item(tree, hf_pgid_seed, tvb, off, 4, ENC_LITTLE_ENDIAN);
2423 off += 4;
2425 preferred = tvb_get_letohl(tvb, off);
2426 if (preferred >= 0)
2427 proto_item_append_text(ti, ", Prefer: %"PRId32, preferred);
2428 proto_tree_add_item(tree, hf_pgid_preferred, tvb, off, 4, ENC_LITTLE_ENDIAN);
2429 off += 4;
2431 proto_item_set_end(ti, tvb, off);
2432 return off;
2435 /** Dissect a placement group creation. */
2436 static
2437 unsigned c_dissect_pg_create(proto_tree *root, int hf,
2438 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2440 proto_item *ti;
2441 proto_tree *tree;
2442 c_encoded enc;
2444 /** pg_create_t from ceph:/src/osd/osd_types.h */
2446 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2447 tree = proto_item_add_subtree(ti, ett_pg_create);
2449 off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2451 proto_tree_add_item(tree, hf_pg_create_epoch,
2452 tvb, off, 4, ENC_LITTLE_ENDIAN);
2453 off += 4;
2455 off = c_dissect_pg(tree, hf_pg_create_parent, tvb, off, data);
2457 proto_tree_add_item(tree, hf_pg_create_splitbits,
2458 tvb, off, 4, ENC_LITTLE_ENDIAN);
2459 off += 4;
2461 c_warn_size(tree, tvb, off, enc.end, data);
2462 off = enc.end;
2464 proto_item_set_end(ti, tvb, off);
2465 return off;
2468 /** Dissect a filepath. */
2469 static
2470 unsigned c_dissect_path(proto_tree *root, int hf,
2471 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2473 proto_item *ti, *ti2;
2474 proto_tree *tree;
2475 uint64_t inode;
2476 c_str rel;
2477 unsigned v;
2479 /** filepath from ceph:/src/include/filepath.h */
2481 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2482 tree = proto_item_add_subtree(ti, ett_filepath);
2484 v = tvb_get_uint8(tvb, off);
2485 ti2 = proto_tree_add_item(tree, hf_path_ver, tvb, off, 1, ENC_LITTLE_ENDIAN);
2486 /* XXX - should we quit if this doesn't return 0? */
2487 c_warn_ver(ti2, v, 1, 1, data);
2488 off += 1;
2490 inode = tvb_get_letoh64(tvb, off);
2491 proto_tree_add_item(tree, hf_path_inode, tvb, off, 8, ENC_LITTLE_ENDIAN);
2492 off += 8;
2494 off = c_dissect_str(tree, hf_path_rel, &rel, tvb, off);
2496 if (inode)
2497 proto_item_append_text(ti, ", Inode: 0x%016"PRIu64, inode);
2498 if (rel.size)
2499 proto_item_append_text(ti, ", Rel: \"%s\"", rel.str);
2501 proto_item_set_end(ti, tvb, off);
2502 return off;
2505 /** Dissect a capability release. */
2506 static
2507 unsigned c_dissect_mds_release(proto_tree *root, int hf,
2508 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2510 proto_item *ti;
2511 proto_tree *tree;
2512 uint64_t inode;
2514 /** MClientRequest::Release from ceph:/src/messages/MClientRequest.h */
2516 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2517 tree = proto_item_add_subtree(ti, ett_mds_release);
2519 inode = tvb_get_letoh64(tvb, off);
2520 proto_tree_add_item(tree, hf_mds_release_inode,
2521 tvb, off, 8, ENC_LITTLE_ENDIAN);
2522 off += 8;
2524 proto_tree_add_item(tree, hf_mds_release_capid,
2525 tvb, off, 8, ENC_LITTLE_ENDIAN);
2526 off += 8;
2528 proto_tree_add_item(tree, hf_mds_release_new,
2529 tvb, off, 4, ENC_LITTLE_ENDIAN);
2530 off += 4;
2532 proto_tree_add_item(tree, hf_mds_release_wanted,
2533 tvb, off, 4, ENC_LITTLE_ENDIAN);
2534 off += 4;
2536 proto_tree_add_item(tree, hf_mds_release_seq,
2537 tvb, off, 4, ENC_LITTLE_ENDIAN);
2538 off += 4;
2540 proto_tree_add_item(tree, hf_mds_release_seq_issue,
2541 tvb, off, 4, ENC_LITTLE_ENDIAN);
2542 off += 4;
2544 proto_tree_add_item(tree, hf_mds_release_mseq,
2545 tvb, off, 4, ENC_LITTLE_ENDIAN);
2546 off += 4;
2548 proto_tree_add_item(tree, hf_mds_release_dname_seq,
2549 tvb, off, 4, ENC_LITTLE_ENDIAN);
2550 off += 4;
2552 off = c_dissect_str(tree, hf_mds_release_dname, NULL, tvb, off);
2554 proto_item_append_text(ti, ", Inode: 0x%016"PRIu64, inode);
2556 proto_item_set_end(ti, tvb, off);
2557 return off;
2560 /** Dissect a HitSet::Params */
2561 static
2562 unsigned c_dissect_hitset_params(proto_tree *root,
2563 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2565 proto_item *ti, *ti2;
2566 proto_tree *tree;
2567 c_encoded enc, encimpl;
2568 c_hitset_params_type type;
2569 uint32_t i;
2571 /** HitSet::Params from ceph:/src/osd/HitSet.h */
2573 ti = proto_tree_add_item(root, hf_hitset_params, tvb, off, -1, ENC_NA);
2574 tree = proto_item_add_subtree(ti, ett_hitset_params);
2576 off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2578 type = (c_hitset_params_type)tvb_get_uint8(tvb, off);
2579 proto_item_append_text(ti, ", Type: %s", c_hitset_params_type_string(type));
2580 ti2 = proto_tree_add_item(tree, hf_hitset_params_type,
2581 tvb, off, 1, ENC_LITTLE_ENDIAN);
2582 off += 1;
2584 switch (type)
2586 case C_HITSET_PARAMS_TYPE_NONE:
2587 break;
2588 case C_HITSET_PARAMS_TYPE_EXPLICIT_HASH:
2589 off = c_dissect_encoded(tree, &encimpl, 1, 1, tvb, off, data);
2591 proto_tree_add_item(tree, hf_hitset_params_exphash_count,
2592 tvb, off, 8, ENC_LITTLE_ENDIAN);
2593 off += 8;
2595 i = tvb_get_letohl(tvb, off);
2596 off += 4;
2597 while (i--)
2599 proto_tree_add_item(tree, hf_hitset_params_exphash_hit,
2600 tvb, off, 4, ENC_LITTLE_ENDIAN);
2601 off += 4;
2604 c_warn_size(tree, tvb, off, encimpl.end, data);
2605 off = encimpl.end;
2606 break;
2607 default:
2608 expert_add_info(data->pinfo, ti2, &ei_union_unknown);
2609 off = enc.end; /* Skip everything. */
2612 c_warn_size(tree, tvb, off, enc.end, data);
2613 off = enc.end;
2615 return off;
2619 /** Dissect a pool_snap_info_t */
2620 static
2621 unsigned c_dissect_snapinfo(proto_tree *root,
2622 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2624 proto_item *ti;
2625 proto_tree *tree;
2626 c_encoded enc;
2627 uint64_t id;
2628 c_str name;
2629 char *date;
2631 /** pool_snap_info_t from ceph:/src/osd/osd_types.h */
2633 ti = proto_tree_add_item(root, hf_snapinfo, tvb, off, -1, ENC_NA);
2634 tree = proto_item_add_subtree(ti, ett_snapinfo);
2636 off = c_dissect_encoded(tree, &enc, 2, 2, tvb, off, data);
2638 id = tvb_get_letoh64(tvb, off);
2639 proto_tree_add_item(tree, hf_snapinfo_id,
2640 tvb, off, 8, ENC_LITTLE_ENDIAN);
2641 off += 8;
2643 date = c_format_timespec(tvb, off);
2644 proto_tree_add_item(tree, hf_snapinfo_time,
2645 tvb, off, 8, ENC_LITTLE_ENDIAN);
2646 off += 8;
2648 off = c_dissect_str(tree, hf_snapinfo_name, &name, tvb, off);
2650 proto_item_set_text(ti, ", ID: 0x%016"PRIX64
2651 ", Name: %s, Date: %s",
2653 name.str,
2654 date);
2656 c_warn_size(tree, tvb, off, enc.size, data);
2657 off = enc.size;
2659 return off;
2662 /** Dissect a pg pool. */
2663 static
2664 unsigned c_dissect_pgpool(proto_tree *root,
2665 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2667 proto_item *ti, *ti2;
2668 proto_tree *tree, *subtree;
2669 c_encoded enc;
2670 uint32_t i;
2671 c_pgpool_type type;
2672 c_pgpool_cachemode cachemode;
2674 static int * const flags_low[] = {
2675 &hf_pgpool_flag_hashpool,
2676 &hf_pgpool_flag_full,
2677 &hf_pgpool_flag_fake_ec_pool,
2678 NULL
2680 static int * const flags_high[] = {
2681 NULL
2684 /** pg_pool_t from ceph:/src/osd/osd_types.h */
2686 ti = proto_tree_add_item(root, hf_pgpool, tvb, off, -1, ENC_NA);
2687 tree = proto_item_add_subtree(ti, ett_pgpool);
2689 off = c_dissect_encoded(tree, &enc, 5, 15, tvb, off, data);
2691 type = (c_pgpool_type)tvb_get_uint8(tvb, off);
2692 proto_tree_add_item(tree, hf_pgpool_type,
2693 tvb, off, 1, ENC_LITTLE_ENDIAN);
2694 off += 1;
2696 proto_tree_add_item(tree, hf_pgpool_size,
2697 tvb, off, 1, ENC_LITTLE_ENDIAN);
2698 off += 1;
2700 proto_tree_add_item(tree, hf_pgpool_crush_ruleset,
2701 tvb, off, 1, ENC_LITTLE_ENDIAN);
2702 off += 1;
2704 proto_tree_add_item(tree, hf_pgpool_hash,
2705 tvb, off, 1, ENC_LITTLE_ENDIAN);
2706 off += 1;
2708 proto_tree_add_item(tree, hf_pgpool_pgnum,
2709 tvb, off, 4, ENC_LITTLE_ENDIAN);
2710 off += 4;
2712 proto_tree_add_item(tree, hf_pgpool_pgpnum,
2713 tvb, off, 4, ENC_LITTLE_ENDIAN);
2714 off += 4;
2716 off += 4 + 4; /* Always 0 in new code. Ignored field. */
2718 proto_tree_add_item(tree, hf_pgpool_changed,
2719 tvb, off, 4, ENC_LITTLE_ENDIAN);
2720 off += 4;
2722 proto_tree_add_item(tree, hf_pgpool_snapseq,
2723 tvb, off, 8, ENC_LITTLE_ENDIAN);
2724 off += 8;
2726 proto_tree_add_item(tree, hf_pgpool_snapepoch,
2727 tvb, off, 4, ENC_LITTLE_ENDIAN);
2728 off += 4;
2730 i = tvb_get_letohl(tvb, off);
2731 off += 4;
2732 while (i--)
2734 ti2 = proto_tree_add_item(tree, hf_pgpool_snap,
2735 tvb, off, -1, ENC_NA);
2736 subtree = proto_item_add_subtree(ti2, ett_pgpool_snap);
2738 proto_tree_add_item(subtree, hf_pgpool_snap_id,
2739 tvb, off, 8, ENC_LITTLE_ENDIAN);
2740 off += 8;
2742 off = c_dissect_snapinfo(subtree, tvb, off, data);
2744 proto_item_set_end(ti2, tvb, off);
2747 i = tvb_get_letohl(tvb, off);
2748 off += 4;
2749 while (i--)
2751 ti2 = proto_tree_add_item(tree, hf_pgpool_snapdel,
2752 tvb, off, -1, ENC_NA);
2753 subtree = proto_item_add_subtree(ti2, ett_pgpool_snapdel);
2755 proto_tree_add_item(subtree, hf_pgpool_snapdel_from,
2756 tvb, off, 8, ENC_LITTLE_ENDIAN);
2757 off += 8;
2758 proto_tree_add_item(subtree, hf_pgpool_snapdel_to,
2759 tvb, off, 8, ENC_LITTLE_ENDIAN);
2760 off += 8;
2762 proto_item_set_end(ti2, tvb, off);
2765 proto_tree_add_item(tree, hf_pgpool_uid,
2766 tvb, off, 8, ENC_LITTLE_ENDIAN);
2767 off += 8;
2769 proto_tree_add_bitmask(tree, tvb, off, hf_pgpool_flags_low, hf_pgpool_flags_low,
2770 flags_low, ENC_LITTLE_ENDIAN);
2771 off += 4;
2772 proto_tree_add_bitmask(tree, tvb, off, hf_pgpool_flags_high, hf_pgpool_flags_high,
2773 flags_high, ENC_LITTLE_ENDIAN);
2774 off += 4;
2776 proto_tree_add_item(tree, hf_pgpool_crash_reply_interval,
2777 tvb, off, 4, ENC_LITTLE_ENDIAN);
2778 off += 4;
2780 proto_tree_add_item(tree, hf_pgpool_min_size,
2781 tvb, off, 1, ENC_LITTLE_ENDIAN);
2782 off += 1;
2784 proto_tree_add_item(tree, hf_pgpool_quota_bytes,
2785 tvb, off, 8, ENC_LITTLE_ENDIAN);
2786 off += 8;
2788 proto_tree_add_item(tree, hf_pgpool_quota_objects,
2789 tvb, off, 8, ENC_LITTLE_ENDIAN);
2790 off += 8;
2792 i = tvb_get_letohl(tvb, off);
2793 off += 4;
2794 while (i--)
2796 proto_tree_add_item(tree, hf_pgpool_tier,
2797 tvb, off, 8, ENC_LITTLE_ENDIAN);
2798 off += 8;
2801 proto_tree_add_item(tree, hf_pgpool_tierof,
2802 tvb, off, 8, ENC_LITTLE_ENDIAN);
2803 off += 8;
2805 cachemode = (c_pgpool_cachemode)tvb_get_uint8(tvb, off);
2806 proto_tree_add_item(tree, hf_pgpool_cachemode,
2807 tvb, off, 1, ENC_LITTLE_ENDIAN);
2808 off += 1;
2810 proto_tree_add_item(tree, hf_pgpool_readtier,
2811 tvb, off, 8, ENC_LITTLE_ENDIAN);
2812 off += 8;
2814 proto_tree_add_item(tree, hf_pgpool_writetier,
2815 tvb, off, 8, ENC_LITTLE_ENDIAN);
2816 off += 8;
2818 i = tvb_get_letohl(tvb, off);
2819 off += 4;
2820 while (i--)
2822 c_str k, v;
2824 ti2 = proto_tree_add_item(tree, hf_pgpool_property, tvb, off, -1, ENC_NA);
2825 subtree = proto_item_add_subtree(ti2, ett_pgpool_property);
2827 off = c_dissect_str(subtree, hf_pgpool_property_key, &k, tvb, off);
2828 off = c_dissect_str(subtree, hf_pgpool_property_val, &v, tvb, off);
2830 proto_item_append_text(ti2, ": %s=%s", k.str, v.str);
2832 proto_item_set_end(ti2, tvb, off);
2835 off = c_dissect_hitset_params(tree, tvb, off, data);
2837 proto_tree_add_item(tree, hf_pgpool_hitset_period,
2838 tvb, off, 4, ENC_LITTLE_ENDIAN);
2839 off += 4;
2841 proto_tree_add_item(tree, hf_pgpool_hitset_count,
2842 tvb, off, 4, ENC_LITTLE_ENDIAN);
2843 off += 4;
2845 proto_tree_add_item(tree, hf_pgpool_stripewidth,
2846 tvb, off, 4, ENC_LITTLE_ENDIAN);
2847 off += 4;
2849 proto_tree_add_item(tree, hf_pgpool_targetmaxsize,
2850 tvb, off, 8, ENC_LITTLE_ENDIAN);
2851 off += 8;
2853 proto_tree_add_item(tree, hf_pgpool_targetmaxobj,
2854 tvb, off, 8, ENC_LITTLE_ENDIAN);
2855 off += 8;
2857 proto_tree_add_item(tree, hf_pgpool_cache_targetdirtyratio,
2858 tvb, off, 4, ENC_LITTLE_ENDIAN);
2859 off += 4;
2861 proto_tree_add_item(tree, hf_pgpool_cache_targetfullratio,
2862 tvb, off, 4, ENC_LITTLE_ENDIAN);
2863 off += 4;
2865 proto_tree_add_item(tree, hf_pgpool_cache_flushage_min,
2866 tvb, off, 4, ENC_LITTLE_ENDIAN);
2867 off += 4;
2869 proto_tree_add_item(tree, hf_pgpool_cache_evictage_min,
2870 tvb, off, 4, ENC_LITTLE_ENDIAN);
2871 off += 4;
2873 off = c_dissect_str(tree, hf_pgpool_erasurecode_profile, NULL, tvb, off);
2875 proto_tree_add_item(tree, hf_pgpool_lastforceresend,
2876 tvb, off, 4, ENC_LITTLE_ENDIAN);
2877 off += 4;
2879 c_warn_size(tree, tvb, off, enc.end, data);
2880 off = enc.end;
2882 proto_item_append_text(ti, ", Type: %s, Cache Mode: %s",
2883 c_pgpool_type_string(type),
2884 c_pgpool_cachemode_string(cachemode));
2886 return off;
2889 /** Dissect a MonMap. */
2890 static
2891 unsigned c_dissect_monmap(proto_tree *root,
2892 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2894 proto_item *ti, *ti2;
2895 proto_tree *tree, *subtree;
2896 unsigned size, end;
2897 uint32_t i;
2898 c_encoded enc;
2899 c_str str;
2900 c_entityaddr addr;
2902 /** MonMap from ceph:/src/mon/MonMap.cc */
2904 size = tvb_get_letohl(tvb, off);
2905 end = off + 4 + size;
2907 /* No data here. */
2908 if (!size) return end;
2910 ti = proto_tree_add_item(root, hf_monmap, tvb, off, size, ENC_NA);
2911 tree = proto_item_add_subtree(ti, ett_mon_map);
2913 off += 4;
2915 off = c_dissect_encoded(tree, &enc, 3, 3, tvb, off, data);
2916 /* Check the blob size and encoded size match. */
2917 c_warn_size(tree, tvb, enc.end, end, data);
2919 proto_tree_add_item(tree, hf_monmap_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
2920 off += 16;
2922 proto_tree_add_item(tree, hf_monmap_epoch, tvb, off, 4, ENC_LITTLE_ENDIAN);
2923 off += 4;
2925 i = tvb_get_letohl(tvb, off);
2926 off += 4;
2927 while (i--)
2929 ti2 = proto_tree_add_item(tree, hf_monmap_address,
2930 tvb, off, -1, ENC_NA);
2931 subtree = proto_item_add_subtree(ti2, ett_mon_map_address);
2933 off = c_dissect_str(subtree, hf_monmap_address_name, &str, tvb, off);
2934 off = c_dissect_entityaddr(subtree, hf_monmap_address_addr, &addr,
2935 tvb, off);
2937 proto_item_append_text(ti2, ", Name: %s, Address: %s",
2938 str.str, addr.addr.addr_str);
2940 proto_item_set_end(ti2, tvb, off);
2943 proto_tree_add_item(tree, hf_monmap_changed, tvb, off, 8, ENC_LITTLE_ENDIAN);
2944 off += 8;
2946 proto_tree_add_item(tree, hf_monmap_created, tvb, off, 8, ENC_LITTLE_ENDIAN);
2947 off += 8;
2949 c_warn_size(tree, tvb, off, end, data);
2950 off = end;
2952 return off;
2955 /** Dissect an osd_peer_stat_t */
2956 static
2957 unsigned c_dissect_osd_peerstat(proto_tree *root,
2958 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2960 proto_item *ti;
2961 proto_tree *tree;
2962 c_encoded enc;
2964 /* osd_peer_stat_t from ceph:/src/osd/osd_types.h */
2966 ti = proto_tree_add_item(root, hf_osd_peerstat, tvb, off, -1, ENC_NA);
2967 tree = proto_item_add_subtree(ti, ett_osd_peerstat);
2969 off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2971 proto_tree_add_item(tree, hf_osd_peerstat_timestamp,
2972 tvb, off, 8, ENC_LITTLE_ENDIAN);
2973 off += 8;
2975 c_warn_size(tree, tvb, off, enc.end, data);
2976 off = enc.end;
2978 proto_item_set_end(ti, tvb, off);
2979 return off;
2982 /** Dissect a CompatSet::FeatureSet */
2983 static
2984 unsigned c_dissect_featureset(proto_tree *root, int hf,
2985 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2987 proto_item *ti;
2988 proto_tree *tree;
2989 uint32_t i;
2990 uint64_t features;
2992 /* CompatSet::FeatureSet from ceph:/src/include/FeatureSet.h */
2994 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2995 tree = proto_item_add_subtree(ti, ett_featureset);
2997 features = tvb_get_letoh64(tvb, off);
2998 proto_tree_add_item(tree, hf_featureset_mask,
2999 tvb, off, 8, ENC_LITTLE_ENDIAN);
3000 off += 8;
3002 i = tvb_get_letohl(tvb, off);
3003 off += 4;
3004 while (i--)
3006 proto_item *ti2;
3007 proto_tree *subtree;
3008 uint64_t val;
3009 c_str name;
3011 ti2 = proto_tree_add_item(tree, hf_featureset_name, tvb, off, -1, ENC_NA);
3012 subtree = proto_item_add_subtree(ti2, ett_featureset_name);
3014 val = tvb_get_letoh64(tvb, off);
3015 proto_tree_add_item(subtree, hf_featureset_name_val,
3016 tvb, off, 8, ENC_LITTLE_ENDIAN);
3017 off += 8;
3019 off = c_dissect_str(subtree, hf_featureset_name_name, &name, tvb, off);
3021 proto_item_append_text(ti2, ", Value: %"PRIu64", Name: %s",
3022 val, name.str);
3023 proto_item_set_end(ti2, tvb, off);
3026 proto_item_append_text(ti, ", Features: 0x%016"PRIX64, features);
3027 proto_item_set_end(ti, tvb, off);
3028 return off;
3031 /** Dissect a CompatSet */
3032 static
3033 unsigned c_dissect_compatset(proto_tree *root,
3034 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3036 proto_item *ti;
3037 proto_tree *tree;
3039 /* CompatSet from ceph:/src/include/CompatSet.h */
3041 ti = proto_tree_add_item(root, hf_compatset, tvb, off, -1, ENC_NA);
3042 tree = proto_item_add_subtree(ti, ett_compatset);
3044 off = c_dissect_featureset(tree, hf_compatset_compat, tvb, off, data);
3045 off = c_dissect_featureset(tree, hf_compatset_compatro, tvb, off, data);
3046 off = c_dissect_featureset(tree, hf_compatset_incompat, tvb, off, data);
3048 proto_item_set_end(ti, tvb, off);
3049 return off;
3052 /** Dissect an OSDSuperblock */
3053 static
3054 unsigned c_dissect_osd_superblock(proto_tree *root,
3055 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3057 proto_item *ti;
3058 proto_tree *tree;
3059 c_encoded enc;
3060 uint32_t role, epoch;
3061 double weight;
3063 /* OSDSuperblock from ceph:/src/osd/osd_types.h */
3065 ti = proto_tree_add_item(root, hf_osd_superblock, tvb, off, -1, ENC_NA);
3066 tree = proto_item_add_subtree(ti, ett_osd_superblock);
3068 off = c_dissect_encoded(tree, &enc, 5, 6, tvb, off, data);
3070 proto_tree_add_item(tree, hf_osd_superblock_clusterfsid,
3071 tvb, off, 16, ENC_BIG_ENDIAN);
3072 off += 16;
3074 role = tvb_get_letohl(tvb, off);
3075 proto_tree_add_item(tree, hf_osd_superblock_role,
3076 tvb, off, 4, ENC_LITTLE_ENDIAN);
3077 off += 4;
3079 epoch = tvb_get_letohl(tvb, off);
3080 proto_tree_add_item(tree, hf_osd_superblock_epoch,
3081 tvb, off, 4, ENC_LITTLE_ENDIAN);
3082 off += 4;
3084 proto_tree_add_item(tree, hf_osd_superblock_map_old,
3085 tvb, off, 4, ENC_LITTLE_ENDIAN);
3086 off += 4;
3088 proto_tree_add_item(tree, hf_osd_superblock_map_new,
3089 tvb, off, 4, ENC_LITTLE_ENDIAN);
3090 off += 4;
3092 weight = tvb_get_letohieee_double(tvb, off);
3093 proto_tree_add_item(tree, hf_osd_superblock_weight,
3094 tvb, off, 8, ENC_LITTLE_ENDIAN);
3095 off += 8;
3097 if (enc.version >= 2)
3098 off = c_dissect_compatset(tree, tvb, off, data);
3100 proto_tree_add_item(tree, hf_osd_superblock_clean,
3101 tvb, off, 4, ENC_LITTLE_ENDIAN);
3102 off += 4;
3104 proto_tree_add_item(tree, hf_osd_superblock_mounted,
3105 tvb, off, 4, ENC_LITTLE_ENDIAN);
3106 off += 4;
3108 proto_item_append_text(ti, ", Role: %"PRId32", Weight: %lf"
3109 ", Boot Epoch: %"PRId32,
3110 role, weight, epoch);
3111 if (enc.version >= 4)
3113 proto_item_append_text(ti, ", OSD FSID: %s", c_format_uuid(tvb, off));
3114 proto_tree_add_item(tree, hf_osd_superblock_osdfsid,
3115 tvb, off, 16, ENC_BIG_ENDIAN);
3116 off += 16;
3119 if (enc.version >= 6)
3121 proto_tree_add_item(tree, hf_osd_superblock_full,
3122 tvb, off, 4, ENC_LITTLE_ENDIAN);
3123 off += 4;
3126 c_warn_size(tree, tvb, off, enc.end, data);
3127 off = enc.end;
3129 proto_item_set_end(ti, tvb, off);
3130 return off;
3133 /** Dissect an osd_info_t. */
3134 static
3135 unsigned c_dissect_osdinfo(proto_tree *root, int hf,
3136 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3138 proto_item *ti, *ti2;
3139 proto_tree *tree;
3140 uint8_t ver;
3142 /* osd_info_t from ceph:/src/osd/OSDMap.h */
3144 ti = proto_tree_add_item(root, hf, tvb, off, 25, ENC_NA);
3145 tree = proto_item_add_subtree(ti, ett_osd_info);
3147 ver = tvb_get_uint8(tvb, off);
3148 ti2 = proto_tree_add_item(tree, hf_osdinfo_ver,
3149 tvb, off, 1, ENC_LITTLE_ENDIAN);
3150 /* XXX - should we quit if this doesn't return 0? */
3151 c_warn_ver(ti2, ver, 1, 1, data);
3152 off += 1;
3154 proto_tree_add_item(tree, hf_osdinfo_lastclean_begin,
3155 tvb, off, 4, ENC_LITTLE_ENDIAN);
3156 off += 4;
3158 proto_tree_add_item(tree, hf_osdinfo_lastclean_end,
3159 tvb, off, 4, ENC_LITTLE_ENDIAN);
3160 off += 4;
3162 proto_tree_add_item(tree, hf_osdinfo_up_from,
3163 tvb, off, 4, ENC_LITTLE_ENDIAN);
3164 off += 4;
3166 proto_tree_add_item(tree, hf_osdinfo_up_through,
3167 tvb, off, 4, ENC_LITTLE_ENDIAN);
3168 off += 4;
3170 proto_tree_add_item(tree, hf_osdinfo_downat,
3171 tvb, off, 4, ENC_LITTLE_ENDIAN);
3172 off += 4;
3174 proto_tree_add_item(tree, hf_osdinfo_lostat,
3175 tvb, off, 4, ENC_LITTLE_ENDIAN);
3176 off += 4;
3178 return off;
3181 /** Dissect an osd_xinfo_t. */
3182 static
3183 unsigned c_dissect_osd_xinfo(proto_tree *root, int hf,
3184 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3186 proto_item *ti;
3187 proto_tree *tree;
3188 c_encoded enc;
3190 /* osd_xinfo_t from ceph:/src/osd/OSDMap.h */
3192 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3193 tree = proto_item_add_subtree(ti, ett_osd_xinfo);
3195 off = c_dissect_encoded(tree, &enc, 1, 3, tvb, off, data);
3197 proto_tree_add_item(tree, hf_osdxinfo_down,
3198 tvb, off, 8, ENC_LITTLE_ENDIAN);
3199 off += 8;
3201 proto_tree_add_item(tree, hf_osdxinfo_laggy_probability,
3202 tvb, off, 4, ENC_LITTLE_ENDIAN);
3203 off += 4;
3205 proto_tree_add_item(tree, hf_osdxinfo_laggy_interval,
3206 tvb, off, 4, ENC_LITTLE_ENDIAN);
3207 off += 4;
3209 if (enc.version >= 2 )
3211 off = c_dissect_features(tree, tvb, off, data);
3213 if (enc.version >= 3)
3215 proto_tree_add_item(tree, hf_osdxinfo_oldweight,
3216 tvb, off, 4, ENC_LITTLE_ENDIAN);
3217 off += 4;
3220 c_warn_size(tree, tvb, off, enc.end, data);
3221 off = enc.end;
3222 proto_item_set_end(ti, tvb, off);
3224 return off;
3227 /** Dissect an objectstore_perfstat_t. */
3228 static
3229 unsigned c_dissect_perfstat(proto_tree *root, int hf,
3230 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3232 proto_item *ti;
3233 proto_tree *tree;
3234 c_encoded enc;
3236 /* objectstore_perfstat_t from ceph:/src/osd/osd_types.h */
3238 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3239 tree = proto_item_add_subtree(ti, ett_perfstat);
3241 off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
3243 proto_tree_add_item(tree, hf_perfstat_commitlatency,
3244 tvb, off, 4, ENC_LITTLE_ENDIAN);
3245 off += 4;
3247 proto_tree_add_item(tree, hf_perfstat_applylatency,
3248 tvb, off, 4, ENC_LITTLE_ENDIAN);
3249 off += 4;
3251 c_warn_size(tree, tvb, off, enc.end, data);
3252 off = enc.end;
3254 proto_item_set_end(ti, tvb, off);
3255 return off;
3258 /** Dissect an osd_stat_t. */
3259 static
3260 unsigned c_dissect_osd_stat(proto_tree *root,
3261 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3263 proto_item *ti;
3264 proto_tree *tree;
3265 c_encoded enc, enc2;
3266 uint32_t i;
3268 /* osd_stat_t from ceph:/src/osd/osd_types.h */
3270 ti = proto_tree_add_item(root, hf_osdstat, tvb, off, -1, ENC_NA);
3271 tree = proto_item_add_subtree(ti, ett_pg_stat);
3273 off = c_dissect_encoded(tree, &enc, 2, 4, tvb, off, data);
3275 proto_tree_add_item(tree, hf_osdstat_kb,
3276 tvb, off, 8, ENC_LITTLE_ENDIAN);
3277 off += 8;
3279 proto_tree_add_item(tree, hf_osdstat_kbused,
3280 tvb, off, 8, ENC_LITTLE_ENDIAN);
3281 off += 8;
3283 proto_tree_add_item(tree, hf_osdstat_kbavail,
3284 tvb, off, 8, ENC_LITTLE_ENDIAN);
3285 off += 8;
3287 proto_tree_add_item(tree, hf_osdstat_trimqueue,
3288 tvb, off, 4, ENC_LITTLE_ENDIAN);
3289 off += 4;
3291 proto_tree_add_item(tree, hf_osdstat_trimming,
3292 tvb, off, 4, ENC_LITTLE_ENDIAN);
3293 off += 4;
3295 i = tvb_get_letohl(tvb, off);
3296 off += 4;
3297 while (i--)
3299 proto_tree_add_item(tree, hf_osdstat_hbin,
3300 tvb, off, 4, ENC_LITTLE_ENDIAN);
3301 off += 4;
3304 i = tvb_get_letohl(tvb, off);
3305 off += 4;
3306 while (i--)
3308 proto_tree_add_item(tree, hf_osdstat_hbout,
3309 tvb, off, 4, ENC_LITTLE_ENDIAN);
3310 off += 4;
3313 if (enc.version >= 3)
3315 off = c_dissect_encoded(tree, &enc2, 1, 1, tvb, off, data);
3316 i = tvb_get_letohl(tvb, off);
3317 off += 4;
3318 if (i >= 1)
3319 proto_tree_add_item(tree, hf_osdstat_opqueue,
3320 tvb, off, 4, ENC_LITTLE_ENDIAN);
3321 off += 4*i; /* Skip older values because they are unitless and meaningless. */
3322 c_warn_size(tree, tvb, off, enc2.end, data);
3323 off = enc2.end;
3326 if (enc.version >= 4)
3327 off = c_dissect_perfstat(tree, hf_osdstat_fsperf, tvb, off, data);
3329 c_warn_size(tree, tvb, off, enc.end, data);
3330 off = enc.end;
3332 proto_item_set_end(ti, tvb, off);
3333 return off;
3336 /** Dissect a CRUSH Ruleset. */
3337 static
3338 unsigned c_dissect_crush(proto_tree *root,
3339 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
3341 off = c_dissect_data(root, hf_crush, tvb, off);
3343 return off;
3346 /** Dissect an OSDMap. */
3347 static
3348 unsigned c_dissect_osdmap(proto_tree *root,
3349 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3351 proto_item *ti, *ti2;
3352 proto_tree *tree, *subtree;
3353 unsigned size, end;
3354 uint32_t i;
3355 c_encoded enc, enc2; /* There is an outer one, and multiple inner ones. */
3357 /*** Storage for values that will be formatted and
3358 *** added to the root nodes.
3359 ***/
3360 char *fsid;
3361 char *time_created, *time_modified;
3363 /* OSDMap from ceph:/src/osd/OSDMap.cc */
3365 size = tvb_get_letohl(tvb, off);
3366 end = off + 4 + size;
3368 ti = proto_tree_add_item(root, hf_osdmap, tvb, off, size, ENC_NA);
3369 tree = proto_item_add_subtree(ti, ett_osd_map);
3371 off += 4;
3373 off = c_dissect_encoded(tree, &enc, 7, 7, tvb, off, data);
3374 /* Check the blob size and encoded size match. */
3375 c_warn_size(tree, tvb, enc.end, end, data);
3377 /*** Start first inner ***/
3378 ti2 = proto_tree_add_item(tree, hf_osdmap_client, tvb, off, -1, ENC_NA);
3379 subtree = proto_item_add_subtree(ti2, ett_osd_map_client);
3381 off = c_dissect_encoded(subtree, &enc2, 1, 3, tvb, off, data);
3382 proto_item_set_len(ti2, enc2.size);
3384 fsid = c_format_uuid(tvb, off);
3385 proto_tree_add_item(subtree, hf_osdmap_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
3386 off += 16;
3388 proto_tree_add_item(subtree, hf_osdmap_epoch,
3389 tvb, off, 4, ENC_LITTLE_ENDIAN);
3390 off += 4;
3392 time_created = c_format_timespec(tvb, off);
3393 proto_tree_add_item(subtree, hf_osdmap_created,
3394 tvb, off, 8, ENC_LITTLE_ENDIAN);
3395 off += 8;
3397 time_modified = c_format_timespec(tvb, off);
3398 proto_tree_add_item(subtree, hf_osdmap_modified,
3399 tvb, off, 8, ENC_LITTLE_ENDIAN);
3400 off += 8;
3402 i = tvb_get_letohl(tvb, off);
3403 off += 4;
3404 while (i--)
3406 proto_item *poolti;
3407 proto_tree *pooltree;
3408 uint64_t id;
3410 poolti = proto_tree_add_item(subtree, hf_osdmap_pool,
3411 tvb, off, -1, ENC_NA);
3412 pooltree = proto_item_add_subtree(poolti, ett_osd_map_pool);
3414 id = tvb_get_letoh64(tvb, off);
3415 proto_tree_add_item(pooltree, hf_osdmap_pool_id,
3416 tvb, off, 8, ENC_LITTLE_ENDIAN);
3417 off += 8;
3419 off = c_dissect_pgpool(pooltree, tvb, off, data);
3421 proto_item_append_text(poolti, ", ID: 0x%016"PRIX64, id);
3423 proto_item_set_end(poolti, tvb, off);
3426 i = tvb_get_letohl(tvb, off);
3427 off += 4;
3428 while (i--)
3430 proto_item *nameti;
3431 proto_tree *nametree;
3432 uint64_t id;
3433 c_str name;
3435 nameti = proto_tree_add_item(subtree, hf_osdmap_poolname_item,
3436 tvb, off, -1, ENC_NA);
3437 nametree = proto_item_add_subtree(nameti, ett_osd_map_poolname);
3439 id = tvb_get_letoh64(tvb, off);
3440 proto_tree_add_item(nametree, hf_osdmap_pool_id,
3441 tvb, off, 8, ENC_LITTLE_ENDIAN);
3442 off += 8;
3444 off = c_dissect_str(nametree, hf_osdmap_poolname, &name, tvb, off);
3446 proto_item_append_text(nameti,
3447 ", ID: 0x%016"PRIX64", Name: %s",
3448 id, name.str);
3449 proto_item_set_end(nameti, tvb, off);
3452 proto_tree_add_item(subtree, hf_osdmap_poolmax,
3453 tvb, off, 4, ENC_LITTLE_ENDIAN);
3454 off += 4;
3456 proto_tree_add_item(subtree, hf_osdmap_flags,
3457 tvb, off, 4, ENC_LITTLE_ENDIAN);
3458 off += 4;
3460 proto_tree_add_item(subtree, hf_osdmap_osdmax,
3461 tvb, off, 4, ENC_LITTLE_ENDIAN);
3462 off += 4;
3464 i = tvb_get_letohl(tvb, off);
3465 off += 4;
3466 while (i--)
3468 proto_tree_add_item(subtree, hf_osdmap_osd_state,
3469 tvb, off, 1, ENC_LITTLE_ENDIAN);
3470 off += 1;
3473 i = tvb_get_letohl(tvb, off);
3474 off += 4;
3475 while (i--)
3477 proto_tree_add_item(subtree, hf_osdmap_osd_weight,
3478 tvb, off, 4, ENC_LITTLE_ENDIAN);
3479 off += 4;
3482 i = tvb_get_letohl(tvb, off);
3483 off += 4;
3484 while (i--)
3486 off = c_dissect_entityaddr(subtree, hf_osdmap_osd_addr, NULL,
3487 tvb, off);
3490 i = tvb_get_letohl(tvb, off);
3491 off += 4;
3492 while (i--)
3494 uint32_t j;
3495 proto_item *pgtti;
3496 proto_tree *pgttree;
3498 pgtti = proto_tree_add_item(subtree, hf_osdmap_pgtmp,
3499 tvb, off, -1, ENC_NA);
3500 pgttree = proto_item_add_subtree(pgtti, ett_osd_map_pgtmp);
3502 off = c_dissect_pg(pgttree, hf_osdmap_pgtmp_pg, tvb, off, data);
3504 j = tvb_get_letohl(tvb, off);
3505 off += 4;
3506 while (j--)
3508 proto_tree_add_item(pgttree, hf_osdmap_pgtmp_val,
3509 tvb, off, 4, ENC_LITTLE_ENDIAN);
3510 off += 4;
3513 proto_item_set_end(pgtti, tvb, off);
3516 i = tvb_get_letohl(tvb, off);
3517 off += 4;
3518 while (i--)
3520 proto_item *pgtti;
3521 proto_tree *pgttree;
3523 pgtti = proto_tree_add_item(subtree, hf_osdmap_primarytmp,
3524 tvb, off, -1, ENC_NA);
3525 pgttree = proto_item_add_subtree(pgtti, ett_osd_map_primarytmp);
3527 off = c_dissect_pg(pgttree, hf_osdmap_primarytmp_pg, tvb, off, data);
3529 proto_tree_add_item(pgttree, hf_osdmap_primarytmp_val,
3530 tvb, off, 4, ENC_LITTLE_ENDIAN);
3531 off += 4;
3533 proto_item_set_end(pgtti, tvb, off);
3536 if (enc2.version >= 2)
3538 i = tvb_get_letohl(tvb, off);
3539 off += 4;
3540 while (i--)
3542 proto_tree_add_item(subtree, hf_osdmap_osd_primaryaffinity,
3543 tvb, off, 4, ENC_LITTLE_ENDIAN);
3544 off += 4;
3548 off = c_dissect_crush(subtree, tvb, off, data);
3550 if (enc2.version >= 3)
3552 i = tvb_get_letohl(tvb, off);
3553 off += 4;
3554 while (i--)
3556 uint32_t j;
3557 proto_item *ecti;
3558 proto_tree *ectree;
3559 c_str profile;
3561 ecti = proto_tree_add_item(subtree, hf_osdmap_erasurecodeprofile,
3562 tvb, off, -1, ENC_NA);
3563 ectree = proto_item_add_subtree(ecti, ett_osd_map_erasurecodeprofile);
3565 off = c_dissect_str(ectree, hf_osdmap_erasurecodeprofile_name, &profile,
3566 tvb, off);
3567 proto_item_append_text(ecti, ", Name: %s", profile.str);
3569 j = tvb_get_letohl(tvb, off);
3570 off += 4;
3571 while (j--)
3573 off = c_dissect_kv(ectree, hf_osdmap_erasurecodeprofile_prop,
3574 hf_osdmap_erasurecodeprofile_k,
3575 hf_osdmap_erasurecodeprofile_v,
3576 tvb, off);
3579 proto_item_set_end(ecti, tvb, off);
3583 c_warn_size(subtree, tvb, off, enc2.end, data);
3584 off = enc2.end;
3585 /*** End first inner ***/
3587 /*** Start second inner ***/
3588 ti2 = proto_tree_add_item(tree, hf_osdmap_osd, tvb, off, -1, ENC_NA);
3589 subtree = proto_item_add_subtree(ti2, ett_osd_map_osd);
3590 off = c_dissect_encoded(subtree, &enc2, 1, 1, tvb, off, data);
3591 proto_item_set_len(ti2, enc2.size);
3593 i = tvb_get_letohl(tvb, off);
3594 off += 4;
3595 while (i--)
3597 off = c_dissect_entityaddr(subtree, hf_osdmap_hbaddr_back, NULL,
3598 tvb, off);
3601 i = tvb_get_letohl(tvb, off);
3602 off += 4;
3603 while (i--)
3605 off = c_dissect_osdinfo(subtree, hf_osdmap_osd_info, tvb, off, data);
3608 i = tvb_get_letohl(tvb, off);
3609 off += 4;
3610 while (i--)
3612 proto_item *blti;
3613 proto_tree *bltree;
3615 blti = proto_tree_add_item(subtree, hf_osdmap_blacklist,
3616 tvb, off, -1, ENC_NA);
3617 bltree = proto_item_add_subtree(blti, ett_osd_map_blacklist);
3619 off = c_dissect_entityaddr(bltree, hf_osdmap_blacklist_addr, NULL,
3620 tvb, off);
3622 proto_tree_add_item(bltree, hf_osdmap_blacklist_time,
3623 tvb, off, 8, ENC_LITTLE_ENDIAN);
3624 off += 8;
3626 proto_item_set_end(blti, tvb, off);
3629 i = tvb_get_letohl(tvb, off);
3630 off += 4;
3631 while (i--)
3633 off = c_dissect_entityaddr(subtree, hf_osdmap_cluster_addr, NULL,
3634 tvb, off);
3637 proto_tree_add_item(subtree, hf_osdmap_cluster_snapepoch,
3638 tvb, off, 4, ENC_LITTLE_ENDIAN);
3639 off += 4;
3641 off = c_dissect_str(subtree, hf_osdmap_cluster_snap, NULL, tvb, off);
3643 i = tvb_get_letohl(tvb, off);
3644 off += 4;
3645 while (i--)
3647 proto_tree_add_item(subtree, hf_osdmap_osd_uuid,
3648 tvb, off, 16, ENC_LITTLE_ENDIAN);
3649 off += 16;
3652 i = tvb_get_letohl(tvb, off);
3653 off += 4;
3654 while (i--)
3656 off = c_dissect_osd_xinfo(subtree, hf_osdmap_osd_xinfo, tvb, off, data);
3659 i = tvb_get_letohl(tvb, off);
3660 off += 4;
3661 while (i--)
3663 off = c_dissect_entityaddr(subtree, hf_osdmap_hbaddr_front, NULL,
3664 tvb, off);
3667 c_warn_size(subtree, tvb, off, enc2.end, data);
3668 off = enc2.end;
3669 /*** End second inner ***/
3671 proto_item_append_text(ti, ", FSID: %s, Created: %s, Modified: %s",
3672 fsid,
3673 time_created, time_modified);
3675 c_warn_size(tree, tvb, off, end, data);
3676 off = end;
3678 return off;
3681 /** Dissect an incremental OSDMap. */
3682 static
3683 unsigned c_dissect_osdmap_inc(proto_tree *root,
3684 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3686 proto_item *ti, *ti2;
3687 proto_tree *tree, *subtree;
3688 unsigned size, end;
3689 c_encoded enc, enc2; /* There is an outer one, and multiple inner ones. */
3691 /** OSDMap::Incremental from ceph:/src/osd/OSDMap.cc */
3693 size = tvb_get_letohl(tvb, off);
3694 end = off + 4 + size;
3696 ti = proto_tree_add_item(root, hf_osdmap_inc, tvb, off, size, ENC_NA);
3697 tree = proto_item_add_subtree(ti, ett_osd_map_inc);
3699 off += 4;
3701 off = c_dissect_encoded(tree, &enc, 7, 7, tvb, off, data);
3702 /* Check the blob size and encoded size match. */
3703 c_warn_size(tree, tvb, enc.end, end, data);
3705 /*** Start first inner ***/
3706 ti2 = proto_tree_add_item(tree, hf_osdmap_inc_client, tvb, off, -1, ENC_NA);
3707 subtree = proto_item_add_subtree(ti2, ett_osd_map_inc_client);
3709 off = c_dissect_encoded(subtree, &enc2, 1, 3, tvb, off, data);
3710 proto_item_set_len(ti2, enc2.size);
3712 proto_tree_add_item(subtree, hf_osdmap_inc_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
3713 off += 16;
3715 /* @TODO: Dissect. */
3717 c_warn_size(subtree, tvb, off, enc2.end, data);
3718 off = enc2.end;
3719 /*** End first inner ***/
3721 /*** Start second inner ***/
3722 ti2 = proto_tree_add_item(tree, hf_osdmap_inc_osd, tvb, off, -1, ENC_NA);
3723 subtree = proto_item_add_subtree(ti2, ett_osd_map_inc_osd);
3724 off = c_dissect_encoded(subtree, &enc2, 1, 1, tvb, off, data);
3725 proto_item_set_len(ti2, enc2.size);
3727 /* @TODO: Dissect. */
3729 c_warn_size(subtree, tvb, off, enc2.end, data);
3730 off = enc2.end;
3731 /*** End second inner ***/
3733 c_warn_size(tree, tvb, off, end, data);
3734 off = end;
3736 return off;
3739 typedef struct _c_osd_op {
3740 c_osd_optype type; /** The type of operation. */
3741 const char *type_str; /** The type of operation as a string. */
3742 uint32_t payload_size; /** The size of the operation payload. */
3743 } c_osd_op;
3745 #define C_SIZE_OSD_OP_MIN 34
3747 /** Dissect OSD Operation. */
3748 static
3749 unsigned c_dissect_osd_op(proto_tree *root, int hf, c_osd_op *out,
3750 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3752 proto_item *ti, *ti2;
3753 proto_tree *tree;
3754 c_osd_op d;
3756 uint64_t offset, size;
3757 uint64_t trunc_size, trunc_seq;
3759 /* From ceph:/src/include/rados.h
3760 struct ceph_osd_op {
3761 __le16 op; // CEPH_OSD_OP_*
3762 __le32 flags; // CEPH_OSD_FLAG_*
3763 union {
3764 struct {
3765 __le64 offset, length;
3766 __le64 truncate_size;
3767 __le32 truncate_seq;
3768 } __attribute__ ((packed)) extent;
3769 struct {
3770 __le32 name_len;
3771 __le32 value_len;
3772 __u8 cmp_op; // CEPH_OSD_CMPXATTR_OP_*
3773 __u8 cmp_mode; // CEPH_OSD_CMPXATTR_MODE_*
3774 } __attribute__ ((packed)) xattr;
3775 struct {
3776 __u8 class_len;
3777 __u8 method_len;
3778 __u8 argc;
3779 __le32 indata_len;
3780 } __attribute__ ((packed)) cls;
3781 struct {
3782 __le64 count;
3783 __le32 start_epoch; // for the pgls sequence
3784 } __attribute__ ((packed)) pgls;
3785 struct {
3786 __le64 snapid;
3787 } __attribute__ ((packed)) snap;
3788 struct {
3789 __le64 cookie;
3790 __le64 ver;
3791 __u8 flag; // 0 = unwatch, 1 = watch
3792 } __attribute__ ((packed)) watch;
3793 struct {
3794 __le64 unused;
3795 __le64 ver;
3796 } __attribute__ ((packed)) assert_ver;
3797 struct {
3798 __le64 offset, length;
3799 __le64 src_offset;
3800 } __attribute__ ((packed)) clonerange;
3801 struct {
3802 __le64 max; // max data in reply
3803 } __attribute__ ((packed)) copy_get;
3804 struct {
3805 __le64 snapid;
3806 __le64 src_version;
3807 __u8 flags;
3808 } __attribute__ ((packed)) copy_from;
3809 struct {
3810 struct ceph_timespec stamp;
3811 } __attribute__ ((packed)) hit_set_get;
3812 struct {
3813 __u8 flags;
3814 } __attribute__ ((packed)) tmap2omap;
3815 struct {
3816 __le64 expected_object_size;
3817 __le64 expected_write_size;
3818 } __attribute__ ((packed)) alloc_hint;
3820 __le32 payload_size;
3821 } __attribute__ ((packed));
3824 d.type = (c_osd_optype)tvb_get_letohs(tvb, off);
3826 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3827 tree = proto_item_add_subtree(ti, ett_osd_op);
3829 d.type_str = c_osd_optype_string(d.type);
3830 proto_item_append_text(ti, ", Type: %s", d.type_str);
3831 proto_tree_add_item(tree, hf_osd_op_type, tvb, off, 2, ENC_LITTLE_ENDIAN);
3832 off += 2;
3834 off = c_dissect_osd_flags(tree, tvb, off, data);
3836 /***
3837 Stop moving off here. The size of the individual message doesn't
3838 matter, only the size of the largest, which is added below.
3839 ***/
3841 switch (d.type)
3843 case C_OSD_OP_WRITE:
3844 case C_OSD_OP_WRITEFULL:
3845 case C_OSD_OP_ZERO:
3846 case C_OSD_OP_TRUNCATE:
3847 case C_OSD_OP_DELETE:
3848 case C_OSD_OP_READ:
3849 case C_OSD_OP_STAT:
3850 offset = tvb_get_letoh64(tvb, off);
3851 proto_tree_add_item(tree, hf_osd_op_extent_off,
3852 tvb, off, 8, ENC_LITTLE_ENDIAN);
3853 size = tvb_get_letoh64(tvb, off+8);
3854 proto_tree_add_item(tree, hf_osd_op_extent_size,
3855 tvb, off+8, 8, ENC_LITTLE_ENDIAN);
3856 trunc_size = tvb_get_letoh64(tvb, off+16);
3857 proto_tree_add_item(tree, hf_osd_op_extent_trunc_size,
3858 tvb, off+16, 8, ENC_LITTLE_ENDIAN);
3859 trunc_seq = tvb_get_letohl(tvb, off+24);
3860 proto_tree_add_item(tree, hf_osd_op_extent_trunc_seq,
3861 tvb, off+24, 4, ENC_LITTLE_ENDIAN);
3863 proto_item_append_text(ti, ", Offset: %"PRIu64
3864 ", Size: %"PRIu64,
3865 offset, size);
3866 if (trunc_seq)
3867 proto_item_append_text(ti, ", Truncate To: %"PRIu64,
3868 trunc_size);
3869 break;
3870 default:
3871 ti2 = proto_tree_add_item(tree, hf_osd_op_data, tvb, off, 28, ENC_NA);
3872 expert_add_info(data->pinfo, ti2, &ei_union_unknown);
3875 off += 28;
3877 d.payload_size = tvb_get_letohl(tvb, off);
3878 proto_item_append_text(ti, ", Data Length: %"PRId32,
3879 d.payload_size);
3880 proto_tree_add_item(tree, hf_osd_op_payload_size,
3881 tvb, off, 4, ENC_LITTLE_ENDIAN);
3882 off += 4;
3884 proto_item_set_end(ti, tvb, off);
3886 if (out) *out = d;
3887 return off;
3890 /** Dissect a redirect. */
3891 static
3892 unsigned c_dissect_redirect(proto_tree *root, int hf,
3893 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3895 proto_item *ti;
3896 proto_tree *tree;
3897 c_encoded enc;
3899 /** request_redirect_t from ceph:/src/osd/osd_types.h */
3901 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3902 tree = proto_item_add_subtree(ti, ett_redirect);
3904 off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
3906 off = c_dissect_object_locator(tree, hf_osd_redirect_oloc, tvb, off, data);
3908 if (tvb_get_letohl(tvb, off))
3910 off = c_dissect_str(tree, hf_osd_redirect_obj, NULL, tvb, off);
3912 else off += 4;
3914 off = c_dissect_blob(tree, hf_osd_redirect_osdinstr,
3915 hf_osd_redirect_osdinstr_data, hf_osd_redirect_osdinstr_len,
3916 tvb, off);
3918 c_warn_size(tree, tvb, off, enc.end, data);
3919 off = enc.end;
3921 proto_item_set_end(ti, tvb, off);
3922 return off;
3925 /** Dissect a statsum object. */
3926 static
3927 unsigned c_dissect_statsum(proto_tree *tree,
3928 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3930 c_encoded enc;
3932 /** object_stat_sum_t from ceph:/src/osd/osd_types.h */
3934 off = c_dissect_encoded(tree, &enc, 3, 9, tvb, off, data);
3936 proto_tree_add_item(tree, hf_statsum_bytes,
3937 tvb, off, 8, ENC_LITTLE_ENDIAN);
3938 off += 8;
3939 proto_tree_add_item(tree, hf_statsum_objects,
3940 tvb, off, 8, ENC_LITTLE_ENDIAN);
3941 off += 8;
3942 proto_tree_add_item(tree, hf_statsum_clones,
3943 tvb, off, 8, ENC_LITTLE_ENDIAN);
3944 off += 8;
3945 proto_tree_add_item(tree, hf_statsum_copies,
3946 tvb, off, 8, ENC_LITTLE_ENDIAN);
3947 off += 8;
3948 proto_tree_add_item(tree, hf_statsum_missing,
3949 tvb, off, 8, ENC_LITTLE_ENDIAN);
3950 off += 8;
3951 proto_tree_add_item(tree, hf_statsum_degraded,
3952 tvb, off, 8, ENC_LITTLE_ENDIAN);
3953 off += 8;
3954 proto_tree_add_item(tree, hf_statsum_unfound,
3955 tvb, off, 8, ENC_LITTLE_ENDIAN);
3956 off += 8;
3957 proto_tree_add_item(tree, hf_statsum_read_bytes,
3958 tvb, off, 8, ENC_LITTLE_ENDIAN);
3959 off += 8;
3960 proto_tree_add_item(tree, hf_statsum_read_kbytes,
3961 tvb, off, 8, ENC_LITTLE_ENDIAN);
3962 off += 8;
3963 proto_tree_add_item(tree, hf_statsum_written_bytes,
3964 tvb, off, 8, ENC_LITTLE_ENDIAN);
3965 off += 8;
3966 proto_tree_add_item(tree, hf_statsum_written_kbytes,
3967 tvb, off, 8, ENC_LITTLE_ENDIAN);
3968 off += 8;
3969 proto_tree_add_item(tree, hf_statsum_scrub_errors,
3970 tvb, off, 8, ENC_LITTLE_ENDIAN);
3971 off += 8;
3973 if (enc.version >= 5)
3975 proto_tree_add_item(tree, hf_statsum_recovered,
3976 tvb, off, 8, ENC_LITTLE_ENDIAN);
3977 off += 8;
3978 proto_tree_add_item(tree, hf_statsum_bytes_recovered,
3979 tvb, off, 8, ENC_LITTLE_ENDIAN);
3980 off += 8;
3981 proto_tree_add_item(tree, hf_statsum_keys_recovered,
3982 tvb, off, 8, ENC_LITTLE_ENDIAN);
3983 off += 8;
3985 if (enc.version >= 6)
3987 proto_tree_add_item(tree, hf_statsum_shallow_scrub_errors,
3988 tvb, off, 8, ENC_LITTLE_ENDIAN);
3989 off += 8;
3990 proto_tree_add_item(tree, hf_statsum_deep_scrub_errors,
3991 tvb, off, 8, ENC_LITTLE_ENDIAN);
3992 off += 8;
3994 if (enc.version >= 7)
3996 proto_tree_add_item(tree, hf_statsum_dirty,
3997 tvb, off, 8, ENC_LITTLE_ENDIAN);
3998 off += 8;
3999 proto_tree_add_item(tree, hf_statsum_whiteouts,
4000 tvb, off, 8, ENC_LITTLE_ENDIAN);
4001 off += 8;
4003 if (enc.version >= 8)
4005 proto_tree_add_item(tree, hf_statsum_omap,
4006 tvb, off, 8, ENC_LITTLE_ENDIAN);
4007 off += 8;
4009 if (enc.version >= 9)
4011 proto_tree_add_item(tree, hf_statsum_hitset_archive,
4012 tvb, off, 8, ENC_LITTLE_ENDIAN);
4013 off += 8;
4016 c_warn_size(tree, tvb, off, enc.end, data);
4017 off = enc.end;
4019 return off;
4022 /** Dissect a object_stat_collection_t object. */
4023 static
4024 unsigned c_dissect_statcollection(proto_tree *root, int key,
4025 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
4027 proto_item *ti;
4028 proto_tree *tree;
4029 c_encoded enc;
4030 uint32_t i;
4032 /** object_stat_collection_t from ceph:/src/osd/osd_types.h */
4034 ti = proto_tree_add_item(root, hf_statcollection, tvb, off, -1, ENC_NA);
4035 tree = proto_item_add_subtree(ti, ett_statcollection);
4037 off = c_dissect_encoded(tree, &enc, 2, 2, tvb, off, data);
4039 off = c_dissect_statsum(tree, tvb, off, data);
4040 i = tvb_get_letohl(tvb, off);
4041 off += 4;
4042 while (i--)
4044 off = c_dissect_str(tree, key, NULL, tvb, off);
4045 off = c_dissect_statsum(tree, tvb, off, data);
4048 c_warn_size(tree, tvb, off, enc.end, data);
4049 off = enc.end;
4051 proto_item_set_end(ti, tvb, off);
4052 return off;
4055 /** Dissect an pg_stat_t. */
4056 static
4057 unsigned c_dissect_pg_stats(proto_tree *root, int hf,
4058 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
4060 proto_item *ti;
4061 proto_tree *tree;
4062 c_encoded enc;
4063 uint32_t i;
4065 /* pg_stat_t from ceph:/src/osd/osd_types.h */
4067 ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
4068 tree = proto_item_add_subtree(ti, ett_pg_stat);
4070 off = c_dissect_encoded(tree, &enc, 8, 17, tvb, off, data);
4072 off = c_dissect_eversion(tree, hf_pg_stat_ver, tvb, off, data);
4074 proto_tree_add_item(tree, hf_pg_stat_seq,
4075 tvb, off, 8, ENC_LITTLE_ENDIAN);
4076 off += 8;
4078 proto_tree_add_item(tree, hf_pg_stat_epoch,
4079 tvb, off, 4, ENC_LITTLE_ENDIAN);
4080 off += 4;
4082 proto_tree_add_item(tree, hf_pg_stat_state,
4083 tvb, off, 4, ENC_LITTLE_ENDIAN);
4084 off += 4;
4086 off = c_dissect_eversion(tree, hf_pg_stat_logstart, tvb, off, data);
4087 off = c_dissect_eversion(tree, hf_pg_stat_logstartondisk, tvb, off, data);
4089 proto_tree_add_item(tree, hf_pg_stat_created,
4090 tvb, off, 4, ENC_LITTLE_ENDIAN);
4091 off += 4;
4093 proto_tree_add_item(tree, hf_pg_stat_lastepochclean,
4094 tvb, off, 4, ENC_LITTLE_ENDIAN);
4095 off += 4;
4097 off = c_dissect_pg(tree, hf_pg_stat_parent, tvb, off, data);
4099 proto_tree_add_item(tree, hf_pg_stat_parent_splitbits,
4100 tvb, off, 4, ENC_LITTLE_ENDIAN);
4101 off += 4;
4103 off = c_dissect_eversion(tree, hf_pg_stat_lastscrub, tvb, off, data);
4105 proto_tree_add_item(tree, hf_pg_stat_lastscrubstamp,
4106 tvb, off, 8, ENC_LITTLE_ENDIAN);
4107 off += 8;
4109 off = c_dissect_statcollection(tree, hf_pg_stat_stats, tvb, off, data);
4111 proto_tree_add_item(tree, hf_pg_stat_logsize,
4112 tvb, off, 8, ENC_LITTLE_ENDIAN);
4113 off += 8;
4115 proto_tree_add_item(tree, hf_pg_stat_logsizeondisk,
4116 tvb, off, 8, ENC_LITTLE_ENDIAN);
4117 off += 8;
4119 i = tvb_get_letohl(tvb, off);
4120 off += 4;
4121 while (i--)
4123 proto_tree_add_item(tree, hf_pg_stat_up,
4124 tvb, off, 4, ENC_LITTLE_ENDIAN);
4125 off += 4;
4128 i = tvb_get_letohl(tvb, off);
4129 off += 4;
4130 while (i--)
4132 proto_tree_add_item(tree, hf_pg_stat_acting,
4133 tvb, off, 4, ENC_LITTLE_ENDIAN);
4134 off += 4;
4137 if (enc.version >= 9)
4139 proto_tree_add_item(tree, hf_pg_stat_lastfresh,
4140 tvb, off, 8, ENC_LITTLE_ENDIAN);
4141 off += 8;
4143 proto_tree_add_item(tree, hf_pg_stat_lastchange,
4144 tvb, off, 8, ENC_LITTLE_ENDIAN);
4145 off += 8;
4147 proto_tree_add_item(tree, hf_pg_stat_lastactive,
4148 tvb, off, 8, ENC_LITTLE_ENDIAN);
4149 off += 8;
4151 proto_tree_add_item(tree, hf_pg_stat_lastclean,
4152 tvb, off, 8, ENC_LITTLE_ENDIAN);
4153 off += 8;
4155 proto_tree_add_item(tree, hf_pg_stat_lastunstale,
4156 tvb, off, 8, ENC_LITTLE_ENDIAN);
4157 off += 8;
4159 proto_tree_add_item(tree, hf_pg_stat_mappingepoch,
4160 tvb, off, 4, ENC_LITTLE_ENDIAN);
4161 off += 4;
4163 if (enc.version >= 10)
4165 off = c_dissect_eversion(tree, hf_pg_stat_lastdeepscrub, tvb, off, data);
4167 proto_tree_add_item(tree, hf_pg_stat_lastdeepscrubstamp,
4168 tvb, off, 8, ENC_LITTLE_ENDIAN);
4169 off += 8;
4171 if (enc.version >= 11)
4173 proto_tree_add_item(tree, hf_pg_stat_statsinvalid,
4174 tvb, off, 1, ENC_LITTLE_ENDIAN);
4175 off += 1;
4177 if (enc.version >= 12)
4179 proto_tree_add_item(tree, hf_pg_stat_lastcleanscrubstamp,
4180 tvb, off, 8, ENC_LITTLE_ENDIAN);
4181 off += 8;
4183 if (enc.version >= 13)
4185 proto_tree_add_item(tree, hf_pg_stat_lastbecameactive,
4186 tvb, off, 8, ENC_LITTLE_ENDIAN);
4187 off += 8;
4189 if (enc.version >= 14)
4191 proto_tree_add_item(tree, hf_pg_stat_dirtystatsinvalid,
4192 tvb, off, 1, ENC_LITTLE_ENDIAN);
4193 off += 1;
4195 if (enc.version >= 15)
4197 proto_tree_add_item(tree, hf_pg_stat_upprimary,
4198 tvb, off, 4, ENC_LITTLE_ENDIAN);
4199 off += 4;
4201 proto_tree_add_item(tree, hf_pg_stat_actingprimary,
4202 tvb, off, 4, ENC_LITTLE_ENDIAN);
4203 off += 4;
4205 if (enc.version >= 16)
4207 proto_tree_add_item(tree, hf_pg_stat_omapstatsinvalid,
4208 tvb, off, 1, ENC_LITTLE_ENDIAN);
4209 off += 1;
4211 if (enc.version >= 17)
4213 proto_tree_add_item(tree, hf_pg_stat_hitsetstatsinvalid,
4214 tvb, off, 1, ENC_LITTLE_ENDIAN);
4215 off += 1;
4218 c_warn_size(tree, tvb, off, enc.end, data);
4219 off = enc.end;
4221 proto_item_set_end(ti, tvb, off);
4222 return off;
4225 #define C_SIZE_PAXOS 18
4227 /** Dissect a Paxos Service Message */
4228 static
4229 unsigned c_dissect_paxos(proto_tree *root,
4230 tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
4232 proto_item *ti;
4233 proto_tree *tree;
4235 /** ceph:/src/messages/PaxosServiceMessage.h */
4237 ti = proto_tree_add_item(root, hf_paxos, tvb, off, C_SIZE_PAXOS, ENC_NA);
4238 tree = proto_item_add_subtree(ti, ett_paxos);
4240 proto_tree_add_item(tree, hf_paxos_ver,
4241 tvb, off, 8, ENC_LITTLE_ENDIAN);
4242 off += 8;
4243 proto_tree_add_item(tree, hf_paxos_mon,
4244 tvb, off, 2, ENC_LITTLE_ENDIAN);
4245 off += 2;
4246 proto_tree_add_item(tree, hf_paxos_mon_tid,
4247 tvb, off, 8, ENC_LITTLE_ENDIAN);
4248 off += 8;
4250 return off;
4254 /*** Message Dissectors ***/
4256 /** Used to handle unknown messages.
4258 * Simply displays the front, middle and data portions as binary strings.
4260 static
4261 unsigned c_dissect_msg_unknown(proto_tree *tree,
4262 tvbuff_t *tvb,
4263 unsigned front_len, unsigned middle_len, unsigned data_len,
4264 c_pkt_data *data)
4266 unsigned off = 0;
4268 c_set_type(data, c_msg_type_string(data->header.type));
4269 proto_item_append_text(data->item_root,
4270 ", Type: %s, Front Len: %u, Middle Len: %u, Data Len %u",
4271 c_msg_type_string(data->header.type),
4272 front_len, middle_len, data_len);
4273 expert_add_info(data->pinfo, tree, &ei_msg_unknown);
4275 if (front_len)
4277 proto_tree_add_item(tree, hf_msg_front, tvb, off, front_len, ENC_NA);
4278 off += front_len;
4280 if (middle_len)
4282 proto_tree_add_item(tree, hf_msg_middle, tvb, off, middle_len, ENC_NA);
4283 off += middle_len;
4285 if (data_len)
4287 proto_tree_add_item(tree, hf_msg_data, tvb, off, data_len, ENC_NA);
4288 off += data_len;
4291 return off;
4294 /** Dissect ping 0x0002 */
4295 static
4296 unsigned c_dissect_msg_ping(proto_tree *root _U_,
4297 tvbuff_t *tvb _U_,
4298 unsigned front_len _U_, unsigned middle_len _U_, unsigned data_len _U_,
4299 c_pkt_data *data)
4301 /* ceph:/src/messages/MPing.h */
4302 c_set_type(data, "Ping");
4303 return 0;
4306 /** Dissect monmap message 0x0004 */
4307 static
4308 unsigned c_dissect_msg_mon_map(proto_tree *root,
4309 tvbuff_t *tvb,
4310 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4311 c_pkt_data *data)
4313 proto_item *ti;
4314 proto_tree *tree;
4316 /* ceph:/src/messages/MMonMap.h */
4318 c_set_type(data, "Mon Map");
4320 ti = proto_tree_add_item(root, hf_msg_mon_map, tvb, 0, front_len, ENC_NA);
4321 tree = proto_item_add_subtree(ti, ett_msg_mon_map);
4323 return c_dissect_monmap(tree, tvb, 0, data);
4326 /** Stat FS 0x000D */
4327 static
4328 unsigned c_dissect_msg_statfs(proto_tree *root,
4329 tvbuff_t *tvb,
4330 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4331 c_pkt_data *data)
4333 proto_item *ti;
4334 proto_tree *tree;
4335 unsigned off = 0;
4337 /* ceph:/src/messages/MStatfs.h */
4339 c_set_type(data, "Stat FS");
4341 off = c_dissect_paxos(root, tvb, off, data);
4343 ti = proto_tree_add_item(root, hf_msg_statfs, tvb, off, front_len, ENC_NA);
4344 tree = proto_item_add_subtree(ti, ett_msg_statfs);
4346 proto_tree_add_item(tree, hf_msg_statfs_fsid,
4347 tvb, off, 16, ENC_BIG_ENDIAN);
4348 off += 16;
4350 return off;
4353 /** Stat FS Reply 0x000E */
4354 static
4355 unsigned c_dissect_msg_statfsreply(proto_tree *root,
4356 tvbuff_t *tvb,
4357 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4358 c_pkt_data *data)
4360 proto_item *ti;
4361 proto_tree *tree;
4362 unsigned off = 0;
4364 /* ceph:/src/messages/MStatfsReply.h */
4366 c_set_type(data, "Stat FS Reply");
4368 ti = proto_tree_add_item(root, hf_msg_statfsreply, tvb, off, front_len, ENC_NA);
4369 tree = proto_item_add_subtree(ti, ett_msg_statfsreply);
4371 proto_tree_add_item(tree, hf_msg_statfsreply_fsid,
4372 tvb, off, 16, ENC_BIG_ENDIAN);
4373 off += 16;
4375 proto_tree_add_item(tree, hf_msg_statfsreply_ver,
4376 tvb, off, 8, ENC_LITTLE_ENDIAN);
4377 off += 8;
4379 proto_tree_add_item(tree, hf_msg_statfsreply_kb,
4380 tvb, off, 8, ENC_LITTLE_ENDIAN);
4381 off += 8;
4383 proto_tree_add_item(tree, hf_msg_statfsreply_kbused,
4384 tvb, off, 8, ENC_LITTLE_ENDIAN);
4385 off += 8;
4387 proto_tree_add_item(tree, hf_msg_statfsreply_kbavail,
4388 tvb, off, 8, ENC_LITTLE_ENDIAN);
4389 off += 8;
4391 proto_tree_add_item(tree, hf_msg_statfsreply_obj,
4392 tvb, off, 8, ENC_LITTLE_ENDIAN);
4393 off += 8;
4395 return off;
4398 /** Mon subscribe message 0x000F */
4399 static
4400 unsigned c_dissect_msg_mon_sub(proto_tree *root,
4401 tvbuff_t *tvb,
4402 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4403 c_pkt_data *data)
4405 proto_item *ti, *subti, *subti2;
4406 proto_tree *tree, *subtree;
4407 unsigned off = 0;
4408 unsigned len;
4409 c_str str;
4411 /* ceph:/src/messages/MMonSubscribe.h */
4413 c_set_type(data, "Mon Subscribe");
4415 ti = proto_tree_add_item(root, hf_msg_mon_sub, tvb, off, front_len, ENC_NA);
4416 tree = proto_item_add_subtree(ti, ett_msg_mon_sub);
4418 c_append_text(data, ti, ", To: ");
4420 len = tvb_get_letohl(tvb, off);
4421 proto_tree_add_item(tree, hf_msg_mon_sub_item_len,
4422 tvb, off, 4, ENC_LITTLE_ENDIAN);
4423 off += 4;
4424 while (len--)
4426 /* From ceph:/src/include/ceph_fs.h
4427 struct ceph_mon_subscribe_item {
4428 __le64 start;
4429 __u8 flags;
4430 } __attribute__ ((packed))
4433 subti = proto_tree_add_item(tree, hf_msg_mon_sub_item,
4434 tvb, off, -1, ENC_NA);
4435 subtree = proto_item_add_subtree(subti, ett_msg_mon_sub_item);
4437 off = c_dissect_str(subtree, hf_msg_mon_sub_what, &str, tvb, off);
4439 c_append_text(data, ti, "%s%s", str.str, len? ",":"");
4441 proto_item_append_text(subti, " What: %s, Starting: %"PRIu64,
4442 str.str,
4443 tvb_get_letoh64(tvb, off));
4445 proto_tree_add_item(subtree, hf_msg_mon_sub_start,
4446 tvb, off, 8, ENC_LITTLE_ENDIAN);
4447 off += 8;
4449 /* Flags */
4450 subti2 = proto_tree_add_item(subtree, hf_msg_mon_sub_flags,
4451 tvb, off, 1, ENC_LITTLE_ENDIAN);
4452 /* Reuse subtree variable for flags. */
4453 subtree = proto_item_add_subtree(subti2, ett_msg_mon_sub_flags);
4454 proto_tree_add_item(subtree, hf_msg_mon_sub_flags_onetime,
4455 tvb, off, 1, ENC_LITTLE_ENDIAN);
4456 off += 1;
4458 proto_item_set_end(ti, tvb, off);
4461 return off;
4464 /** Mon subscription ack 0x0010 */
4465 static
4466 unsigned c_dissect_msg_mon_sub_ack(proto_tree *root,
4467 tvbuff_t *tvb,
4468 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4469 c_pkt_data *data)
4471 proto_item *ti;
4472 proto_tree *tree;
4473 unsigned off = 0;
4475 /* ceph:/src/messages/MMonSubscribeAck.h */
4477 c_set_type(data, "Mon Subscribe Ack");
4479 ti = proto_tree_add_item(root, hf_msg_mon_sub_ack, tvb, off, front_len, ENC_NA);
4480 tree = proto_item_add_subtree(ti, ett_msg_mon_sub_ack);
4482 proto_tree_add_item(tree, hf_msg_mon_sub_ack_interval,
4483 tvb, off, 4, ENC_LITTLE_ENDIAN);
4484 off += 4;
4485 proto_tree_add_item(tree, hf_msg_mon_sub_ack_fsid,
4486 tvb, off, 16, ENC_BIG_ENDIAN);
4487 off += 16;
4489 return off;
4492 /** Authentication Request 0x0011. */
4493 static
4494 unsigned c_dissect_msg_auth(proto_tree *root,
4495 tvbuff_t *tvb,
4496 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4497 c_pkt_data *data)
4499 proto_item *ti, *ti2;
4500 proto_tree *tree, *subtree;
4501 unsigned off = 0, expectedoff;
4502 uint8_t ver;
4503 uint32_t i, len;
4504 c_auth_proto proto;
4506 /* ceph:/src/messages/MAuth.h */
4508 c_set_type(data, "Auth");
4510 off = c_dissect_paxos(root, tvb, off, data);
4512 ti = proto_tree_add_item(root, hf_msg_auth, tvb, off, front_len-off, ENC_NA);
4513 tree = proto_item_add_subtree(ti, ett_msg_auth);
4515 proto = (c_auth_proto)tvb_get_letohl(tvb, off);
4516 proto_tree_add_item(tree, hf_msg_auth_proto,
4517 tvb, off, 4, ENC_LITTLE_ENDIAN);
4518 off += 4;
4520 expectedoff = off + 4 + tvb_get_letohl(tvb, off);
4521 off += 4;
4523 switch (proto)
4525 case C_AUTH_PROTO_UNKNOWN:
4526 /* auth_payload is a set of supported protocols. */
4527 ti2 = proto_tree_add_item(tree, hf_msg_auth_supportedproto,
4528 tvb, off, -1, ENC_NA);
4529 subtree = proto_item_add_subtree(ti2, ett_msg_auth_supportedproto);
4531 ver = tvb_get_uint8(tvb, off);
4532 /* XXX - should we quit if this doesn't return 0? */
4533 c_warn_ver(ti2, ver, 1, 1, data);
4534 proto_tree_add_item(tree, hf_msg_auth_supportedproto_ver,
4535 tvb, off, 1, ENC_LITTLE_ENDIAN);
4536 off += 1;
4538 len = tvb_get_letohl(tvb, off);
4539 off += 4;
4540 for (i = 0; i < len; i++)
4542 c_auth_proto sp;
4543 sp = (c_auth_proto)tvb_get_letohl(tvb, off);
4544 proto_item_append_text(ti2, i?",%s":": %s", c_auth_proto_string(sp));
4545 proto_tree_add_item(subtree, hf_msg_auth_supportedproto_proto,
4546 tvb, off, 4, ENC_LITTLE_ENDIAN);
4547 off += 4;
4550 off = c_dissect_EntityName(subtree, tvb, off, data);
4552 proto_tree_add_item(subtree, hf_msg_auth_supportedproto_gid,
4553 tvb, off, 8, ENC_LITTLE_ENDIAN);
4554 off += 8;
4555 break;
4556 case C_AUTH_PROTO_CEPHX:
4558 c_cephx_req_type type;
4560 ti2 = proto_tree_add_item(tree, hf_msg_auth_cephx, tvb, off, -1, ENC_NA);
4561 subtree = proto_item_add_subtree(ti2, ett_msg_auth_cephx);
4563 type = (c_cephx_req_type)tvb_get_letohs(tvb, off);
4564 proto_tree_add_item(subtree, hf_msg_auth_cephx_req_type,
4565 tvb, off, 2, ENC_LITTLE_ENDIAN);
4566 off += 2;
4568 switch (type)
4570 default:
4571 expert_add_info(data->pinfo, ti2, &ei_union_unknown);
4574 proto_item_append_text(ti2, ", Request Type: %s",
4575 c_cephx_req_type_string(type));
4576 break;
4578 default:
4579 expert_add_info(data->pinfo, ti, &ei_union_unknown);
4582 c_warn_size(tree, tvb, off, expectedoff, data);
4583 off = expectedoff;
4585 if (off+4 == front_len) { /* If there is an epoch. */
4586 proto_tree_add_item(tree, hf_msg_auth_monmap_epoch,
4587 tvb, off, 4, ENC_LITTLE_ENDIAN);
4588 off += 4;
4591 c_append_text(data, ti, ", Proto: %s", c_auth_proto_string(proto));
4593 return off;
4596 /** Authentication response. 0x0012 */
4597 static
4598 unsigned c_dissect_msg_auth_reply(proto_tree *root,
4599 tvbuff_t *tvb,
4600 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4601 c_pkt_data *data)
4603 proto_item *ti;
4604 proto_tree *tree;
4605 unsigned off = 0, expectedoff;
4606 c_auth_proto proto;
4608 /* ceph:/src/messages/MAuthReply.h */
4610 c_set_type(data, "Auth Reply");
4612 ti = proto_tree_add_item(root, hf_msg_auth_reply, tvb, off, front_len, ENC_NA);
4613 tree = proto_item_add_subtree(ti, ett_msg_authreply);
4615 proto = (c_auth_proto)tvb_get_letohl(tvb, off);
4616 proto_tree_add_item(tree, hf_msg_auth_reply_proto,
4617 tvb, off, 4, ENC_LITTLE_ENDIAN);
4618 off += 4;
4619 proto_tree_add_item(tree, hf_msg_auth_reply_result,
4620 tvb, off, 4, ENC_LITTLE_ENDIAN);
4621 off += 4;
4622 proto_tree_add_item(tree, hf_msg_auth_reply_global_id,
4623 tvb, off, 8, ENC_LITTLE_ENDIAN);
4624 off += 8;
4626 expectedoff = off + 4 + tvb_get_letohl(tvb, off);
4627 off += 4;
4629 switch (proto)
4631 default:
4632 expert_add_info(data->pinfo, ti, &ei_union_unknown);
4635 c_warn_size(tree, tvb, off, expectedoff, data);
4636 off = expectedoff;
4638 off = c_dissect_str(tree, hf_msg_auth_reply_msg, NULL, tvb, off);
4640 c_append_text(data, ti, ", Proto: %s", c_auth_proto_string(proto));
4642 return off;
4645 /** Get map versions. 0x0013 */
4646 static
4647 unsigned c_dissect_msg_mon_getversion(proto_tree *root,
4648 tvbuff_t *tvb,
4649 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4650 c_pkt_data *data)
4652 proto_item *ti;
4653 proto_tree *tree;
4654 unsigned off = 0;
4655 uint64_t tid;
4656 c_str what;
4658 /* ceph:/src/messages/MMonGetVersion.h */
4660 c_set_type(data, "Monitor Get Version");
4662 ti = proto_tree_add_item(root, hf_msg_mon_getversion, tvb, off, front_len, ENC_NA);
4663 tree = proto_item_add_subtree(ti, ett_msg_mon_getversion);
4665 tid = tvb_get_letoh64(tvb, off);
4666 proto_tree_add_item(tree, hf_msg_mon_getversion_tid,
4667 tvb, off, 8, ENC_LITTLE_ENDIAN);
4668 off += 8;
4670 off = c_dissect_str(tree, hf_msg_mon_getversion_what, &what, tvb, off);
4673 c_append_text(data, ti, ", TID: %"PRIu64", What: %s",
4674 tid, what.str);
4676 return off;
4680 /** Get map versions response. 0x0014 */
4681 static
4682 unsigned c_dissect_msg_mon_getversionreply(proto_tree *root,
4683 tvbuff_t *tvb,
4684 unsigned front_len,
4685 unsigned middle_len _U_,
4686 unsigned data_len _U_,
4687 c_pkt_data *data)
4689 proto_item *ti;
4690 proto_tree *tree;
4691 unsigned off = 0;
4692 uint64_t tid;
4693 uint64_t ver, veroldest;
4695 /* ceph:/src/messages/MMonGetVersionReply.h */
4697 c_set_type(data, "Monitor Get Version Reply");
4699 ti = proto_tree_add_item(root, hf_msg_mon_getversionreply, tvb, off, front_len, ENC_NA);
4700 tree = proto_item_add_subtree(ti, ett_msg_mon_getversionreply);
4702 tid = tvb_get_letoh64(tvb, off);
4703 proto_tree_add_item(tree, hf_msg_mon_getversionreply_tid,
4704 tvb, off, 8, ENC_LITTLE_ENDIAN);
4705 off += 8;
4707 ver = tvb_get_letoh64(tvb, off);
4708 proto_tree_add_item(tree, hf_msg_mon_getversionreply_ver,
4709 tvb, off, 8, ENC_LITTLE_ENDIAN);
4710 off += 8;
4712 veroldest = tvb_get_letoh64(tvb, off);
4713 proto_tree_add_item(tree, hf_msg_mon_getversionreply_veroldest,
4714 tvb, off, 8, ENC_LITTLE_ENDIAN);
4715 off += 8;
4717 c_append_text(data, ti, ", TID: %"PRIu64
4718 ", Version: %"PRIu64
4719 ", Oldest Version: %"PRIu64,
4720 tid, ver, veroldest);
4722 return off;
4725 /** MDS Map 0x0015 */
4726 static
4727 unsigned c_dissect_msg_mds_map(proto_tree *root,
4728 tvbuff_t *tvb,
4729 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4730 c_pkt_data *data)
4732 proto_item *ti;
4733 proto_tree *tree;
4734 unsigned off = 0;
4736 /* ceph:/src/messages/MMDSMap.h */
4738 c_set_type(data, "MDS Map");
4740 ti = proto_tree_add_item(root, hf_msg_mds_map, tvb, off, front_len, ENC_NA);
4741 tree = proto_item_add_subtree(ti, ett_msg_mds_map);
4743 proto_tree_add_item(tree, hf_msg_mds_map_fsid,
4744 tvb, off, 16, ENC_BIG_ENDIAN);
4745 off += 16;
4747 proto_tree_add_item(tree, hf_msg_mds_map_epoch,
4748 tvb, off, 4, ENC_LITTLE_ENDIAN);
4749 off += 4;
4751 /* @TODO: Dissect map data. */
4753 off = c_dissect_blob(tree, hf_msg_mds_map_datai,
4754 hf_msg_mds_map_data, hf_msg_mds_map_data_size,
4755 tvb, off);
4757 return off;
4760 /** Client Session 0x0016 */
4761 static
4762 unsigned c_dissect_msg_client_sess(proto_tree *root,
4763 tvbuff_t *tvb,
4764 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4765 c_pkt_data *data)
4767 proto_item *ti;
4768 proto_tree *tree;
4769 unsigned off = 0;
4770 c_session_op_type op;
4772 /* ceph:/src/messages/MClientSession.h */
4774 c_set_type(data, "Client Session");
4776 ti = proto_tree_add_item(root, hf_msg_client_sess, tvb, off, front_len, ENC_NA);
4777 tree = proto_item_add_subtree(ti, ett_msg_client_sess);
4779 op = (c_session_op_type)tvb_get_letohl(tvb, off);
4780 proto_tree_add_item(tree, hf_msg_client_sess_op,
4781 tvb, off, 4, ENC_LITTLE_ENDIAN);
4782 off += 4;
4784 proto_tree_add_item(tree, hf_msg_client_sess_seq,
4785 tvb, off, 8, ENC_LITTLE_ENDIAN);
4786 off += 8;
4788 proto_tree_add_item(tree, hf_msg_client_sess_time,
4789 tvb, off, 8, ENC_LITTLE_ENDIAN);
4790 off += 8;
4792 proto_tree_add_item(tree, hf_msg_client_sess_caps_max,
4793 tvb, off, 4, ENC_LITTLE_ENDIAN);
4794 off += 4;
4796 proto_tree_add_item(tree, hf_msg_client_sess_leases_max,
4797 tvb, off, 4, ENC_LITTLE_ENDIAN);
4798 off += 4;
4800 c_append_text(data, ti, ", Operation: %s", c_session_op_type_string(op));
4802 return off;
4805 /** Client Request 0x0018 */
4806 static
4807 unsigned c_dissect_msg_client_req(proto_tree *root,
4808 tvbuff_t *tvb,
4809 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4810 c_pkt_data *data)
4812 proto_item *ti;
4813 proto_tree *tree;
4814 unsigned off = 0;
4815 uint32_t i;
4816 c_mds_op_type type;
4818 /* ceph:/src/messages/MClientRequest.h */
4820 c_set_type(data, "Client Request");
4822 ti = proto_tree_add_item(root, hf_msg_client_req, tvb, off, front_len, ENC_NA);
4823 tree = proto_item_add_subtree(ti, ett_msg_client_req);
4825 proto_tree_add_item(tree, hf_msg_client_req_oldest_tid,
4826 tvb, off, 8, ENC_LITTLE_ENDIAN);
4827 off += 8;
4829 proto_tree_add_item(tree, hf_msg_client_req_mdsmap_epoch,
4830 tvb, off, 4, ENC_LITTLE_ENDIAN);
4831 off += 4;
4833 proto_tree_add_item(tree, hf_msg_client_req_flags,
4834 tvb, off, 4, ENC_LITTLE_ENDIAN);
4835 off += 4;
4837 proto_tree_add_item(tree, hf_msg_client_req_retry,
4838 tvb, off, 1, ENC_LITTLE_ENDIAN);
4839 off += 1;
4841 proto_tree_add_item(tree, hf_msg_client_req_forward,
4842 tvb, off, 1, ENC_LITTLE_ENDIAN);
4843 off += 1;
4845 i = tvb_get_letohs(tvb, off);
4846 proto_tree_add_item(tree, hf_msg_client_req_releases,
4847 tvb, off, 2, ENC_LITTLE_ENDIAN);
4848 off += 2;
4850 type = (c_mds_op_type)tvb_get_letohl(tvb, off);
4851 proto_tree_add_item(tree, hf_msg_client_req_op,
4852 tvb, off, 4, ENC_LITTLE_ENDIAN);
4853 off += 4;
4855 proto_tree_add_item(tree, hf_msg_client_req_caller_uid,
4856 tvb, off, 4, ENC_LITTLE_ENDIAN);
4857 off += 4;
4859 proto_tree_add_item(tree, hf_msg_client_req_caller_gid,
4860 tvb, off, 4, ENC_LITTLE_ENDIAN);
4861 off += 4;
4863 proto_tree_add_item(tree, hf_msg_client_req_inode,
4864 tvb, off, 8, ENC_LITTLE_ENDIAN);
4865 off += 8;
4867 off += 48; /* @TODO: Message specific data. */
4869 off = c_dissect_path(tree, hf_msg_client_req_path_src, tvb, off, data);
4870 off = c_dissect_path(tree, hf_msg_client_req_path_dst, tvb, off, data);
4872 while (i--)
4874 off = c_dissect_mds_release(tree, hf_msg_client_req_release,
4875 tvb, off, data);
4878 if (data->header.ver >= 2)
4880 proto_tree_add_item(tree, hf_msg_client_req_time,
4881 tvb, off, 8, ENC_LITTLE_ENDIAN);
4882 off += 8;
4885 c_append_text(data, ti, ", Operation: %s", c_mds_op_type_string(type));
4887 return off;
4890 /** Client Request Forward 0x0019 */
4891 static
4892 unsigned c_dissect_msg_client_reqfwd(proto_tree *root,
4893 tvbuff_t *tvb,
4894 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4895 c_pkt_data *data)
4897 proto_item *ti;
4898 proto_tree *tree;
4899 unsigned off = 0;
4900 uint32_t to, fwd;
4901 uint8_t resend;
4903 /* ceph:/src/messages/MClientRequestForward.h */
4905 c_set_type(data, "Client Request Forward");
4907 ti = proto_tree_add_item(root, hf_msg_client_reqfwd, tvb, off, front_len, ENC_NA);
4908 tree = proto_item_add_subtree(ti, ett_msg_client_reqfwd);
4910 to = tvb_get_letohl(tvb, off);
4911 proto_tree_add_item(tree, hf_msg_client_reqfwd_dst,
4912 tvb, off, 4, ENC_LITTLE_ENDIAN);
4913 off += 4;
4915 fwd = tvb_get_letohl(tvb, off);
4916 proto_tree_add_item(tree, hf_msg_client_reqfwd_fwd,
4917 tvb, off, 4, ENC_LITTLE_ENDIAN);
4918 off += 4;
4920 resend = tvb_get_uint8(tvb, off);
4921 proto_tree_add_item(tree, hf_msg_client_reqfwd_resend,
4922 tvb, off, 1, ENC_LITTLE_ENDIAN);
4923 off += 1;
4925 c_append_text(data, ti, ", To: mds%"PRIu32", Resend: %s, "
4926 "Forwards: %"PRIu32,
4927 to, resend? "True":"False", fwd);
4929 return off;
4932 /** Client Reply 0x001A */
4933 static
4934 unsigned c_dissect_msg_client_reply(proto_tree *root,
4935 tvbuff_t *tvb,
4936 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4937 c_pkt_data *data)
4939 proto_item *ti;
4940 proto_tree *tree;
4941 unsigned off = 0;
4942 c_mds_op_type type;
4944 /* ceph:/src/messages/MClientReply.h */
4946 c_set_type(data, "Client Reply");
4948 ti = proto_tree_add_item(root, hf_msg_client_reply, tvb, off, front_len, ENC_NA);
4949 tree = proto_item_add_subtree(ti, ett_msg_client_reply);
4951 type = (c_mds_op_type)tvb_get_letohl(tvb, off);
4952 proto_tree_add_item(tree, hf_msg_client_reply_op,
4953 tvb, off, 4, ENC_LITTLE_ENDIAN);
4954 off += 4;
4956 proto_tree_add_item(tree, hf_msg_client_reply_result,
4957 tvb, off, 4, ENC_LITTLE_ENDIAN);
4958 off += 4;
4960 proto_tree_add_item(tree, hf_msg_client_reply_mdsmap_epoch,
4961 tvb, off, 4, ENC_LITTLE_ENDIAN);
4962 off += 4;
4964 proto_tree_add_item(tree, hf_msg_client_reply_safe,
4965 tvb, off, 1, ENC_LITTLE_ENDIAN);
4966 off += 1;
4968 proto_tree_add_item(tree, hf_msg_client_reply_isdentry,
4969 tvb, off, 1, ENC_LITTLE_ENDIAN);
4970 off += 1;
4972 proto_tree_add_item(tree, hf_msg_client_reply_istarget,
4973 tvb, off, 1, ENC_LITTLE_ENDIAN);
4974 off += 1;
4976 /* @TODO: Dissect these. */
4977 off = c_dissect_data(tree, hf_msg_client_reply_trace, tvb, off);
4978 off = c_dissect_data(tree, hf_msg_client_reply_extra, tvb, off);
4979 off = c_dissect_data(tree, hf_msg_client_reply_snaps, tvb, off);
4981 c_append_text(data, ti, ", Operation: %s", c_mds_op_type_string(type));
4983 return off;
4986 /** OSD Map 0x0029 */
4987 static
4988 unsigned c_dissect_msg_osd_map(proto_tree *root,
4989 tvbuff_t *tvb,
4990 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
4991 c_pkt_data *data)
4993 proto_item *ti, *ti2;
4994 proto_tree *tree, *subtree;
4995 unsigned off = 0;
4996 uint32_t i;
4997 uint32_t epoch;
4999 /* ceph:/src/messages/MOSDMap.h */
5001 c_set_type(data, "OSD Map");
5003 ti = proto_tree_add_item(root, hf_msg_osd_map, tvb, off, front_len, ENC_NA);
5004 tree = proto_item_add_subtree(ti, ett_msg_osd_map);
5006 proto_tree_add_item(tree, hf_msg_osd_map_fsid,
5007 tvb, off, 16, ENC_BIG_ENDIAN);
5008 off += 16;
5010 /*** Incremental Items ***/
5011 i = tvb_get_letohl(tvb, off);
5012 proto_tree_add_item(tree, hf_msg_osd_map_inc_len,
5013 tvb, off, 4, ENC_LITTLE_ENDIAN);
5014 c_append_text(data, ti, ", Incremental Items: %u", i);
5016 off += 4;
5017 while (i--)
5019 ti2 = proto_tree_add_item(tree, hf_msg_osd_map_inc,
5020 tvb, off, -1, ENC_NA);
5021 subtree = proto_item_add_subtree(ti2, ett_msg_osd_map_inc);
5023 epoch = tvb_get_letohl(tvb, off);
5024 proto_tree_add_item(subtree, hf_msg_osd_map_epoch,
5025 tvb, off, 4, ENC_LITTLE_ENDIAN);
5026 off += 4;
5028 off = c_dissect_osdmap_inc(subtree, tvb, off, data);
5030 proto_item_append_text(ti2, ", For Epoch: %"PRIu32, epoch);
5031 proto_item_set_end(ti2, tvb, off);
5034 /*** Non-incremental Items ***/
5035 i = tvb_get_letohl(tvb, off);
5036 proto_tree_add_item(tree, hf_msg_osd_map_map_len,
5037 tvb, off, 4, ENC_LITTLE_ENDIAN);
5038 c_append_text(data, ti, ", Items: %u", i);
5039 off += 4;
5040 while (i--)
5042 ti2 = proto_tree_add_item(tree, hf_msg_osd_map_map,
5043 tvb, off, -1, ENC_NA);
5044 subtree = proto_item_add_subtree(ti2, ett_msg_osd_map_full);
5046 epoch = tvb_get_letohl(tvb, off);
5047 proto_tree_add_item(subtree, hf_msg_osd_map_epoch,
5048 tvb, off, 4, ENC_LITTLE_ENDIAN);
5049 off += 4;
5051 off = c_dissect_osdmap(subtree, tvb, off, data);
5053 proto_item_append_text(ti2, ", For Epoch: %"PRIu32, epoch);
5054 proto_item_set_end(ti2, tvb, off);
5057 if (data->header.ver >= 2)
5059 proto_tree_add_item(tree, hf_msg_osd_map_oldest,
5060 tvb, off, 4, ENC_LITTLE_ENDIAN);
5061 off += 4;
5062 proto_tree_add_item(tree, hf_msg_osd_map_newest,
5063 tvb, off, 4, ENC_LITTLE_ENDIAN);
5064 off += 4;
5067 return off;
5070 /** OSD Operation (0x002A)
5072 static
5073 unsigned c_dissect_msg_osd_op(proto_tree *root,
5074 tvbuff_t *tvb,
5075 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5076 c_pkt_data *data)
5078 proto_item *ti, *ti2;
5079 proto_tree *tree;
5080 unsigned off = 0;
5081 uint16_t opslen, i;
5082 c_osd_op *ops;
5083 c_str str;
5085 /* ceph:/src/messages/MOSDOp.h */
5087 c_set_type(data, "OSD Operation");
5089 ti = proto_tree_add_item(root, hf_msg_osd_op, tvb, off, front_len, ENC_NA);
5090 tree = proto_item_add_subtree(ti, ett_msg_osd_op);
5092 proto_tree_add_item(tree, hf_msg_osd_op_client_inc,
5093 tvb, off, 4, ENC_LITTLE_ENDIAN);
5094 off += 4;
5096 proto_tree_add_item(tree, hf_msg_osd_op_osdmap_epoch,
5097 tvb, off, 4, ENC_LITTLE_ENDIAN);
5098 off += 4;
5100 off = c_dissect_osd_flags(tree, tvb, off, data);
5102 proto_tree_add_item(tree, hf_msg_osd_op_mtime,
5103 tvb, off, 8, ENC_TIME_SECS_NSECS|ENC_LITTLE_ENDIAN);
5104 off += 8;
5106 off = c_dissect_eversion(tree, hf_msg_osd_op_reassert_version,
5107 tvb, off, data);
5109 off = c_dissect_object_locator(tree, hf_msg_osd_op_oloc, tvb, off, data);
5111 off = c_dissect_pg(tree, hf_msg_osd_op_pgid, tvb, off, data);
5113 off = c_dissect_str(tree, hf_msg_osd_op_oid, &str, tvb, off);
5115 opslen = tvb_get_letohs(tvb, off);
5116 c_append_text(data, ti, ", Operations: %"PRId32, opslen);
5117 ti2 = proto_tree_add_item(tree, hf_msg_osd_op_ops_len,
5118 tvb, off, 2, ENC_LITTLE_ENDIAN);
5119 off += 2;
5120 if (opslen > (tvb_reported_length(tvb)-off)/C_SIZE_OSD_OP_MIN)
5123 If the size is huge (maybe it was mangled on the wire) we want to
5124 avoid allocating massive amounts of memory to handle it. So, if
5125 it is larger then can possibly fit in the rest of the message bail
5126 out.
5128 expert_add_info(data->pinfo, ti2, &ei_sizeillogical);
5129 return off;
5131 ops = wmem_alloc_array(wmem_packet_scope(), c_osd_op, opslen);
5132 for (i = 0; i < opslen; i++)
5134 off = c_dissect_osd_op(tree, hf_msg_osd_op_op, &ops[i], tvb, off, data);
5137 proto_tree_add_item(tree, hf_msg_osd_op_snap_id,
5138 tvb, off, 8, ENC_LITTLE_ENDIAN);
5139 off += 8;
5140 proto_tree_add_item(tree, hf_msg_osd_op_snap_seq,
5141 tvb, off, 8, ENC_LITTLE_ENDIAN);
5142 off += 8;
5144 i = tvb_get_letohl(tvb, off);
5145 proto_tree_add_item(tree, hf_msg_osd_op_snaps_len,
5146 tvb, off, 4, ENC_LITTLE_ENDIAN);
5147 off += 4;
5148 while (i--)
5150 proto_tree_add_item(tree, hf_msg_osd_op_snap,
5151 tvb, off, 8, ENC_LITTLE_ENDIAN);
5152 off += 8;
5155 if (data->header.ver >= 4)
5157 proto_tree_add_item(tree, hf_msg_osd_op_retry_attempt,
5158 tvb, off, 4, ENC_LITTLE_ENDIAN);
5159 off += 4;
5162 c_warn_size(tree, tvb, off, front_len, data);
5164 for (i = 0; i < opslen; i++)
5166 proto_tree_add_item(tree, hf_msg_osd_op_payload,
5167 tvb, off, ops[i].payload_size, ENC_NA);
5168 off += ops[i].payload_size;
5171 return off;
5174 /** OSD Operation Reply (0x002B)
5176 static
5177 unsigned c_dissect_msg_osd_opreply(proto_tree *root,
5178 tvbuff_t *tvb,
5179 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5180 c_pkt_data *data)
5182 proto_item *ti, *ti2;
5183 proto_tree *tree;
5184 unsigned off = 0;
5185 c_str str;
5186 uint32_t i;
5187 uint32_t opslen;
5188 c_osd_op *ops;
5190 /* ceph:/src/messages/MOSDOpReply.h */
5192 c_set_type(data, "OSD Operation Reply");
5194 ti = proto_tree_add_item(root, hf_msg_osd_opreply, tvb, off, front_len, ENC_NA);
5195 tree = proto_item_add_subtree(ti, ett_msg_osd_opreply);
5197 off = c_dissect_str(tree, hf_msg_osd_opreply_oid, &str, tvb, off);
5199 off = c_dissect_pg(tree, hf_msg_osd_opreply_pgid, tvb, off, data);
5201 off = c_dissect_osd_flags(tree, tvb, off, data);
5202 off += 4; /* flags is 64 bit but the higher bits are ignored. */
5204 proto_tree_add_item(tree, hf_msg_osd_opreply_result,
5205 tvb, off, 4, ENC_LITTLE_ENDIAN);
5206 off += 4;
5208 off = c_dissect_eversion(tree, hf_msg_osd_opreply_bad_replay_ver,
5209 tvb, off, data);
5211 proto_tree_add_item(tree, hf_msg_osd_opreply_osdmap_epoch,
5212 tvb, off, 4, ENC_LITTLE_ENDIAN);
5213 off += 4;
5215 opslen = tvb_get_letohl(tvb, off);
5216 ti2 = proto_tree_add_item(tree, hf_msg_osd_opreply_ops_len,
5217 tvb, off, 4, ENC_LITTLE_ENDIAN);
5218 off += 4;
5219 if (opslen >= (tvb_reported_length(tvb)-off)/C_SIZE_OSD_OP_MIN)
5222 If the size is huge (maybe it was mangled on the wire) we want to
5223 avoid allocating massive amounts of memory to handle it. So, if
5224 it is larger then can possible fit in the rest of the message bail
5225 out.
5227 expert_add_info(data->pinfo, ti2, &ei_sizeillogical);
5228 return off;
5230 ops = wmem_alloc_array(wmem_packet_scope(), c_osd_op, opslen);
5231 for (i = 0; i < opslen; i++)
5233 off = c_dissect_osd_op(tree, hf_msg_osd_opreply_op, &ops[i],
5234 tvb, off, data);
5237 if (data->header.ver >= 3)
5239 proto_tree_add_item(tree, hf_msg_osd_opreply_retry_attempt,
5240 tvb, off, 4, ENC_LITTLE_ENDIAN);
5241 off += 4;
5244 if (data->header.ver >= 4)
5246 for (i = 0; i < opslen; i++)
5248 proto_tree_add_item(tree, hf_msg_osd_opreply_rval,
5249 tvb, off, 4, ENC_LITTLE_ENDIAN);
5250 off += 4;
5254 if (data->header.ver >= 5)
5256 off = c_dissect_eversion(tree, hf_msg_osd_opreply_replay_ver,
5257 tvb, off, data);
5258 proto_tree_add_item(tree, hf_msg_osd_opreply_user_ver,
5259 tvb, off, 8, ENC_LITTLE_ENDIAN);
5260 off += 8;
5263 if (data->header.ver >= 6)
5265 off = c_dissect_redirect(tree, hf_msg_osd_opreply_redirect,
5266 tvb, off, data);
5269 c_warn_size(tree, tvb, off, front_len, data);
5270 off = front_len;
5272 if (data->header.ver >= 4)
5274 for (i = 0; i < opslen; i++)
5276 proto_tree_add_item(tree, hf_msg_osd_opreply_payload,
5277 tvb, off, ops[i].payload_size, ENC_NA);
5278 off += ops[i].payload_size;
5282 return off;
5285 /** Pool Op Reply 0x0030 */
5286 static
5287 unsigned c_dissect_msg_poolopreply(proto_tree *root,
5288 tvbuff_t *tvb,
5289 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5290 c_pkt_data *data)
5292 proto_item *ti;
5293 proto_tree *tree;
5294 unsigned off = 0;
5295 int32_t code;
5296 uint8_t b;
5298 /* ceph:/src/messages/MPoolOpReply.h */
5300 c_set_type(data, "Pool Operation Reply");
5302 off = c_dissect_paxos(root, tvb, off, data);
5304 ti = proto_tree_add_item(root, hf_msg_poolopreply, tvb, off, front_len, ENC_NA);
5305 tree = proto_item_add_subtree(ti, ett_msg_poolopreply);
5307 proto_tree_add_item(tree, hf_msg_poolopreply_fsid,
5308 tvb, off, 16, ENC_BIG_ENDIAN);
5309 off += 16;
5311 code = tvb_get_letohl(tvb, off);
5312 proto_tree_add_item(tree, hf_msg_poolopreply_code,
5313 tvb, off, 4, ENC_LITTLE_ENDIAN);
5314 off += 4;
5316 proto_tree_add_item(tree, hf_msg_poolopreply_epoch,
5317 tvb, off, 4, ENC_LITTLE_ENDIAN);
5318 off += 4;
5320 b = tvb_get_uint8(tvb, off);
5321 off += 1;
5322 if (b)
5323 off = c_dissect_blob(tree, hf_msg_poolopreply_datai,
5324 hf_msg_poolopreply_data, hf_msg_poolopreply_data_size,
5325 tvb, off);
5327 c_append_text(data, ti, ", Response Code: %"PRIu32, code);
5329 return off;
5332 /** Pool Op 0x0031
5333 * Why this is a higher value than the reply? Who knows?
5335 static
5336 unsigned c_dissect_msg_poolop(proto_tree *root,
5337 tvbuff_t *tvb,
5338 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5339 c_pkt_data *data)
5341 proto_item *ti;
5342 proto_tree *tree;
5343 unsigned off = 0;
5344 int32_t pool;
5345 c_poolop_type type;
5346 c_str name;
5348 /* ceph:/src/messages/MPoolOp.h */
5350 c_set_type(data, "Pool Operation");
5352 off = c_dissect_paxos(root, tvb, off, data);
5354 ti = proto_tree_add_item(root, hf_msg_poolop, tvb, off, front_len, ENC_NA);
5355 tree = proto_item_add_subtree(ti, ett_msg_poolop);
5357 proto_tree_add_item(tree, hf_msg_poolop_fsid,
5358 tvb, off, 16, ENC_BIG_ENDIAN);
5359 off += 16;
5361 pool = tvb_get_letohl(tvb, off);
5362 proto_tree_add_item(tree, hf_msg_poolop_pool,
5363 tvb, off, 4, ENC_LITTLE_ENDIAN);
5364 off += 4;
5366 if (data->header.ver < 2)
5367 off = c_dissect_str(tree, hf_msg_poolop_name, &name, tvb, off);
5369 type = (c_poolop_type)tvb_get_letohl(tvb, off);
5370 proto_tree_add_item(tree, hf_msg_poolop_type,
5371 tvb, off, 4, ENC_LITTLE_ENDIAN);
5372 off += 4;
5374 proto_tree_add_item(tree, hf_msg_poolop_auid,
5375 tvb, off, 8, ENC_LITTLE_ENDIAN);
5376 off += 8;
5378 proto_tree_add_item(tree, hf_msg_poolop_snapid,
5379 tvb, off, 8, ENC_LITTLE_ENDIAN);
5380 off += 8;
5382 if (data->header.ver >= 2)
5383 off = c_dissect_str(tree, hf_msg_poolop_name, &name, tvb, off);
5385 if (data->header.ver >= 4)
5387 off += 1; /* Skip padding byte. */
5388 proto_tree_add_item(tree, hf_msg_poolop_crush_rule,
5389 tvb, off, 2, ENC_LITTLE_ENDIAN);
5390 off += 2;
5392 else if (data->header.ver == 3)
5394 proto_tree_add_item(tree, hf_msg_poolop_crush_rule8,
5395 tvb, off, 1, ENC_LITTLE_ENDIAN);
5396 off += 1;
5399 c_append_text(data, ti,
5400 ", Type: %s, Name: %s, Pool: %"PRId32,
5401 c_poolop_type_string(type),
5402 name.str,
5403 pool);
5405 return off;
5408 /** Monitor Command 0x0032 */
5409 static
5410 unsigned c_dissect_msg_mon_cmd(proto_tree *root,
5411 tvbuff_t *tvb,
5412 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5413 c_pkt_data *data)
5415 proto_item *ti;
5416 proto_tree *tree, *subtree;
5417 unsigned off = 0;
5418 uint32_t i;
5419 c_str str;
5421 /* ceph:/src/messages/MMonCommand.h */
5423 c_set_type(data, "Mon Command");
5425 off = c_dissect_paxos(root, tvb, off, data);
5427 ti = proto_tree_add_item(root, hf_msg_mon_cmd, tvb, off, front_len, ENC_NA);
5428 tree = proto_item_add_subtree(ti, ett_msg_mon_cmd);
5430 proto_tree_add_item(tree, hf_msg_mon_cmd_fsid,
5431 tvb, off, 16, ENC_BIG_ENDIAN);
5432 off += 16;
5434 i = tvb_get_letohl(tvb, off);
5435 proto_tree_add_item(tree, hf_msg_mon_cmd_arg_len,
5436 tvb, off, 4, ENC_LITTLE_ENDIAN);
5437 off += 4;
5438 while (i--)
5440 ti = proto_tree_add_item(tree, hf_msg_mon_cmd_arg,
5441 tvb, off, -1, ENC_NA);
5442 subtree = proto_item_add_subtree(ti, ett_msg_mon_cmd_arg);
5444 off = c_dissect_str(subtree, hf_msg_mon_cmd_str, &str, tvb, off);
5446 c_append_text(data, ti, " %s", str.str);
5448 proto_item_set_end(ti, tvb, off);
5451 return off;
5454 /** Mon Command ACK 0x0033 */
5455 static
5456 unsigned c_dissect_msg_mon_cmd_ack(proto_tree *root,
5457 tvbuff_t *tvb,
5458 unsigned front_len, unsigned middle_len _U_, unsigned data_len,
5459 c_pkt_data *data)
5461 proto_item *ti;
5462 proto_tree *tree, *subtree;
5463 unsigned off = 0;
5464 uint32_t i;
5466 /* ceph:/src/messages/MMonCommandAck.h */
5468 c_set_type(data, "Mon Command Result");
5470 off = c_dissect_paxos(root, tvb, off, data);
5472 ti = proto_tree_add_item(root, hf_msg_mon_cmd_ack,
5473 tvb, off, front_len+data_len, ENC_NA);
5474 tree = proto_item_add_subtree(ti, ett_msg_mon_cmdack);
5476 proto_tree_add_item(tree, hf_msg_mon_cmd_ack_code,
5477 tvb, off, 4, ENC_LITTLE_ENDIAN);
5478 off += 4;
5479 off = c_dissect_str(tree, hf_msg_mon_cmd_ack_res, NULL, tvb, off);
5481 i = tvb_get_letohl(tvb, off);
5482 proto_tree_add_item(tree, hf_msg_mon_cmd_ack_arg_len,
5483 tvb, off, 4, ENC_LITTLE_ENDIAN);
5484 off += 4;
5485 while (i--)
5487 ti = proto_tree_add_item(tree, hf_msg_mon_cmd_ack_arg, tvb, off, -1, ENC_NA);
5488 subtree = proto_item_add_subtree(ti, ett_msg_mon_cmdack_arg);
5490 off = c_dissect_str(subtree, hf_msg_mon_cmd_ack_arg_str, NULL,
5491 tvb, off);
5493 proto_item_set_end(ti, tvb, off);
5496 c_warn_size(tree, tvb, off, front_len, data);
5498 proto_tree_add_item(tree, hf_msg_mon_cmd_ack_data,
5499 tvb, front_len, data_len, ENC_UTF_8);
5501 return front_len+data_len;
5504 /** Get Pool Stats 0x003A */
5505 static
5506 unsigned c_dissect_msg_poolstats(proto_tree *root,
5507 tvbuff_t *tvb,
5508 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5509 c_pkt_data *data)
5511 proto_item *ti;
5512 proto_tree *tree;
5513 unsigned off = 0;
5514 uint32_t i;
5515 c_str str;
5517 /* ceph:/src/messages/MGetPoolStats.h */
5519 c_set_type(data, "Pool Stats");
5521 off = c_dissect_paxos(root, tvb, off, data);
5523 ti = proto_tree_add_item(root, hf_msg_poolstats, tvb, off, front_len, ENC_NA);
5524 tree = proto_item_add_subtree(ti, ett_msg_poolstats);
5526 c_append_text(data, ti, ", For: ");
5528 proto_tree_add_item(tree, hf_msg_poolstats_fsid,
5529 tvb, off, 16, ENC_BIG_ENDIAN);
5530 off += 16;
5532 i = tvb_get_letohl(tvb, off);
5533 off += 4;
5534 while (i--)
5536 off = c_dissect_str(tree, hf_msg_poolstats_pool, &str, tvb, off);
5537 c_append_text(data, ti, "%s%s", str.str, i? ",":" ");
5540 return off;
5543 /** Pool Stats Reply 0x003B */
5544 static
5545 unsigned c_dissect_msg_poolstatsreply(proto_tree *root,
5546 tvbuff_t *tvb,
5547 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5548 c_pkt_data *data)
5550 proto_item *ti, *ti2;
5551 proto_tree *tree, *subtree;
5552 unsigned off = 0;
5553 uint32_t i;
5554 c_str str;
5555 c_encoded encstat;
5557 /* ceph:/src/messages/MGetPoolStatsReply.h */
5559 c_set_type(data, "Pool Stats Reply");
5561 off = c_dissect_paxos(root, tvb, off, data);
5563 ti = proto_tree_add_item(root, hf_msg_poolstatsreply, tvb, off, front_len, ENC_NA);
5564 tree = proto_item_add_subtree(ti, ett_msg_poolstatsreply);
5566 c_append_text(data, ti, ", For: ");
5568 proto_tree_add_item(tree, hf_msg_poolstatsreply_fsid,
5569 tvb, off, 16, ENC_BIG_ENDIAN);
5570 off += 16;
5572 i = tvb_get_letohl(tvb, off);
5573 off += 4;
5574 while (i--)
5576 ti2 = proto_tree_add_item(tree, hf_msg_poolstatsreply_stat,
5577 tvb, off, -1, ENC_NA);
5578 subtree = proto_item_add_subtree(ti2, ett_msg_poolstatsreply_stat);
5580 off = c_dissect_str(subtree, hf_msg_poolstatsreply_pool, &str, tvb, off);
5581 c_append_text(data, ti, "%s%s", str.str, i? ",":" ");
5582 proto_item_append_text(ti2, ", For: %s", str.str);
5584 /*** pool_stat_t from ceph:/src/osd/osd_types.h ***/
5585 off = c_dissect_encoded(subtree, &encstat, 5, 5, tvb, off, data);
5587 off = c_dissect_statcollection(subtree, hf_msg_poolstatsreply_pool, tvb, off, data);
5589 proto_tree_add_item(subtree, hf_msg_poolstatsreply_log_size,
5590 tvb, off, 8, ENC_LITTLE_ENDIAN);
5591 off += 8;
5592 proto_tree_add_item(subtree, hf_msg_poolstatsreply_log_size_ondisk,
5593 tvb, off, 8, ENC_LITTLE_ENDIAN);
5594 off += 8;
5595 /*** END pool_stat_t ***/
5596 c_warn_size(subtree, tvb, off, encstat.end, data);
5597 off = encstat.end;
5600 return off;
5603 /** Monitor Global ID 0x003C */
5604 static
5605 unsigned c_dissect_msg_mon_globalid(proto_tree *root,
5606 tvbuff_t *tvb,
5607 unsigned front_len _U_, unsigned middle_len _U_, unsigned data_len _U_,
5608 c_pkt_data *data)
5610 unsigned off = 0;
5612 /* ceph:/src/messages/MMonGlobalID.h */
5614 c_set_type(data, "Mon Global ID");
5616 off = c_dissect_paxos(root, tvb, off, data);
5617 proto_tree_add_item(root, hf_msg_mon_globalid_max,
5618 tvb, off, 8, ENC_LITTLE_ENDIAN);
5619 off += 8;
5621 return off;
5624 /** Monitor Election 0x0041 */
5625 static
5626 unsigned c_dissect_msg_mon_election(proto_tree *root,
5627 tvbuff_t *tvb,
5628 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5629 c_pkt_data *data)
5631 proto_item *ti;
5632 proto_tree *tree;
5633 unsigned off = 0;
5634 uint32_t i;
5635 c_mon_election_type type;
5637 /* ceph:/src/messages/MMonElection.h */
5639 c_set_type(data, "Mon Election");
5641 ti = proto_tree_add_item(root, hf_msg_mon_election,
5642 tvb, off, front_len, ENC_NA);
5643 tree = proto_item_add_subtree(ti, ett_msg_mon_election);
5645 proto_tree_add_item(tree, hf_msg_mon_election_fsid,
5646 tvb, off, 16, ENC_BIG_ENDIAN);
5647 off += 16;
5649 type = (c_mon_election_type)tvb_get_letohl(tvb, off);
5650 proto_tree_add_item(tree, hf_msg_mon_election_op,
5651 tvb, off, 4, ENC_LITTLE_ENDIAN);
5652 off += 4;
5654 proto_tree_add_item(tree, hf_msg_mon_election_epoch,
5655 tvb, off, 4, ENC_LITTLE_ENDIAN);
5656 off += 4;
5658 off = c_dissect_monmap(tree, tvb, off, data);
5660 i = tvb_get_letohl(tvb, off);
5661 off += 4;
5662 while (i--)
5664 proto_tree_add_item(tree, hf_msg_mon_election_quorum,
5665 tvb, off, 4, ENC_LITTLE_ENDIAN);
5666 off += 4;
5669 proto_tree_add_item(tree, hf_msg_mon_election_quorum_features,
5670 tvb, off, 8, ENC_LITTLE_ENDIAN);
5671 off += 8;
5673 proto_tree_add_item(tree, hf_msg_mon_election_defunct_one,
5674 tvb, off, 8, ENC_LITTLE_ENDIAN);
5675 off += 8;
5676 proto_tree_add_item(tree, hf_msg_mon_election_defunct_two,
5677 tvb, off, 8, ENC_LITTLE_ENDIAN);
5678 off += 8;
5680 off = c_dissect_blob(tree, hf_msg_mon_election_sharing,
5681 hf_msg_mon_election_sharing_data, hf_msg_mon_election_sharing_size,
5682 tvb, off);
5684 c_append_text(data, ti, ", Operation: %s", c_mon_election_type_string(type));
5686 return off;
5689 /** Monitor Paxos 0x0042 */
5690 static
5691 unsigned c_dissect_msg_mon_paxos(proto_tree *root,
5692 tvbuff_t *tvb,
5693 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5694 c_pkt_data *data)
5696 proto_item *ti;
5697 proto_tree *tree;
5698 unsigned off = 0;
5699 uint32_t i;
5700 uint64_t pn;
5701 c_mon_paxos_op op;
5703 /* ceph:/src/messages/MMonPaxos.h */
5705 c_set_type(data, "Mon Paxos");
5707 ti = proto_tree_add_item(root, hf_msg_mon_paxos, tvb, off, front_len, ENC_NA);
5708 tree = proto_item_add_subtree(ti, ett_msg_mon_paxos);
5710 proto_tree_add_item(tree, hf_msg_mon_paxos_epoch,
5711 tvb, off, 4, ENC_LITTLE_ENDIAN);
5712 off += 4;
5714 op = (c_mon_paxos_op)tvb_get_letohl(tvb, off);
5715 proto_tree_add_item(tree, hf_msg_mon_paxos_op,
5716 tvb, off, 4, ENC_LITTLE_ENDIAN);
5717 off += 4;
5719 proto_tree_add_item(tree, hf_msg_mon_paxos_first,
5720 tvb, off, 8, ENC_LITTLE_ENDIAN);
5721 off += 8;
5723 proto_tree_add_item(tree, hf_msg_mon_paxos_last,
5724 tvb, off, 8, ENC_LITTLE_ENDIAN);
5725 off += 8;
5727 proto_tree_add_item(tree, hf_msg_mon_paxos_pnfrom,
5728 tvb, off, 8, ENC_LITTLE_ENDIAN);
5729 off += 8;
5731 pn = tvb_get_letoh64(tvb, off);
5732 proto_tree_add_item(tree, hf_msg_mon_paxos_pn,
5733 tvb, off, 8, ENC_LITTLE_ENDIAN);
5734 off += 8;
5736 proto_tree_add_item(tree, hf_msg_mon_paxos_pnuncommitted,
5737 tvb, off, 8, ENC_LITTLE_ENDIAN);
5738 off += 8;
5740 proto_tree_add_item(tree, hf_msg_mon_paxos_lease,
5741 tvb, off, 8, ENC_LITTLE_ENDIAN);
5742 off += 8;
5744 if (data->header.ver >= 1)
5746 proto_tree_add_item(tree, hf_msg_mon_paxos_sent,
5747 tvb, off, 8, ENC_LITTLE_ENDIAN);
5748 off += 8;
5751 proto_tree_add_item(tree, hf_msg_mon_paxos_latest_ver,
5752 tvb, off, 8, ENC_LITTLE_ENDIAN);
5753 off += 8;
5755 off = c_dissect_blob(tree, hf_msg_mon_paxos_latest_val,
5756 hf_msg_mon_paxos_latest_val_data,
5757 hf_msg_mon_paxos_latest_val_size,
5758 tvb, off);
5760 i = tvb_get_letohl(tvb, off);
5761 off += 4;
5762 while (i--)
5764 proto_item *ti2;
5765 proto_tree *subtree;
5766 uint64_t ver;
5768 ti2 = proto_tree_add_item(tree, hf_msg_mon_paxos_value, tvb, off, -1, ENC_NA);
5769 subtree = proto_item_add_subtree(ti2, ett_msg_mon_paxos_value);
5771 ver = tvb_get_letoh64(tvb, off);
5772 proto_tree_add_item(subtree, hf_msg_mon_paxos_ver,
5773 tvb, off, 8, ENC_LITTLE_ENDIAN);
5774 off += 8;
5776 off = c_dissect_blob(subtree, hf_msg_mon_paxos_val,
5777 hf_msg_mon_paxos_val_data, hf_msg_mon_paxos_val_size,
5778 tvb, off);
5780 proto_item_append_text(ti2, ", Version: %"PRIu64, ver);
5781 proto_item_set_end(ti2, tvb, off);
5784 c_append_text(data, ti, ", Op: %s, Proposal Number: %"PRIu64,
5785 c_mon_paxos_op_string(op), pn);
5787 return off;
5790 /** Monitor Probe 0x0043 */
5791 static
5792 unsigned c_dissect_msg_mon_probe(proto_tree *root,
5793 tvbuff_t *tvb,
5794 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5795 c_pkt_data *data)
5797 proto_item *ti;
5798 proto_tree *tree;
5799 unsigned off = 0;
5800 uint32_t i;
5801 c_mon_probe_type type;
5802 c_str name;
5804 /* ceph:/src/messages/MMonProbe.h */
5806 c_set_type(data, "Mon Probe");
5808 ti = proto_tree_add_item(root, hf_msg_mon_probe, tvb, off, front_len, ENC_NA);
5809 tree = proto_item_add_subtree(ti, ett_msg_mon_probe);
5811 proto_tree_add_item(tree, hf_msg_mon_probe_fsid,
5812 tvb, off, 16, ENC_BIG_ENDIAN);
5813 off += 16;
5815 type = (c_mon_probe_type)tvb_get_letohl(tvb, off);
5816 proto_tree_add_item(tree, hf_msg_mon_probe_type,
5817 tvb, off, 4, ENC_LITTLE_ENDIAN);
5818 off += 4;
5820 off = c_dissect_str(tree, hf_msg_mon_probe_name, &name, tvb, off);
5822 i = tvb_get_letohl(tvb, off);
5823 off += 4;
5824 while (i--)
5826 proto_tree_add_item(tree, hf_msg_mon_probe_quorum,
5827 tvb, off, 4, ENC_LITTLE_ENDIAN);
5828 off += 4;
5831 off = c_dissect_monmap(tree, tvb, off, data);
5833 proto_tree_add_item(tree, hf_msg_mon_probe_ever_joined,
5834 tvb, off, 1, ENC_LITTLE_ENDIAN);
5835 off += 1;
5836 proto_tree_add_item(tree, hf_msg_mon_probe_paxos_first_ver,
5837 tvb, off, 8, ENC_LITTLE_ENDIAN);
5838 off += 8;
5839 proto_tree_add_item(tree, hf_msg_mon_probe_paxos_last_ver,
5840 tvb, off, 8, ENC_LITTLE_ENDIAN);
5841 off += 8;
5843 if (data->header.ver >= 6)
5845 proto_tree_add_item(tree, hf_msg_mon_probe_req_features,
5846 tvb, off, 8, ENC_LITTLE_ENDIAN);
5847 off += 8;
5850 c_append_text(data, ti, ", Type: %s, Name: %s",
5851 c_mon_probe_type_string(type),
5852 name.str);
5854 return off;
5857 /** OSD Ping (0x0046) */
5858 static
5859 unsigned c_dissect_msg_osd_ping(proto_tree *root,
5860 tvbuff_t *tvb,
5861 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5862 c_pkt_data *data)
5864 proto_item *ti;
5865 proto_tree *tree;
5866 unsigned off = 0;
5867 c_osd_ping_op op;
5869 /* ceph:/src/messages/MOSDPing.h */
5871 c_set_type(data, "OSD Ping");
5873 ti = proto_tree_add_item(root, hf_msg_osd_ping, tvb, off, front_len, ENC_NA);
5874 tree = proto_item_add_subtree(ti, ett_msg_osd_ping);
5876 proto_tree_add_item(tree, hf_msg_osd_ping_fsid,
5877 tvb, off, 16, ENC_BIG_ENDIAN);
5878 off += 16;
5880 proto_tree_add_item(tree, hf_msg_osd_ping_mapepoch,
5881 tvb, off, 4, ENC_LITTLE_ENDIAN);
5882 off += 4;
5884 proto_tree_add_item(tree, hf_msg_osd_ping_peerepoch,
5885 tvb, off, 4, ENC_LITTLE_ENDIAN);
5886 off += 4;
5888 op = (c_osd_ping_op)tvb_get_uint8(tvb, off);
5889 proto_tree_add_item(tree, hf_msg_osd_ping_op,
5890 tvb, off, 1, ENC_LITTLE_ENDIAN);
5891 off += 1;
5893 off = c_dissect_osd_peerstat(tree, tvb, off, data);
5895 if (data->header.ver >= 2)
5897 proto_tree_add_item(tree, hf_msg_osd_ping_time,
5898 tvb, off, 8, ENC_LITTLE_ENDIAN);
5899 off += 8;
5902 c_append_text(data, ti, ", Operation: %s", c_osd_ping_op_string(op));
5903 return off;
5906 /** OSD Boot (0x0047) */
5907 static
5908 unsigned c_dissect_msg_osd_boot(proto_tree *root,
5909 tvbuff_t *tvb,
5910 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5911 c_pkt_data *data)
5913 proto_item *ti;
5914 proto_tree *tree;
5915 unsigned off = 0;
5916 uint32_t i;
5918 /* ceph:/src/messages/MOSDBoot.h */
5920 c_set_type(data, "OSD Boot");
5922 off = c_dissect_paxos(root, tvb, off, data);
5924 ti = proto_tree_add_item(root, hf_msg_osd_boot, tvb, off, front_len, ENC_NA);
5925 tree = proto_item_add_subtree(ti, ett_msg_osd_boot);
5927 off = c_dissect_osd_superblock(tree, tvb, off, data);
5929 off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_back, NULL, tvb, off);
5931 if (data->header.ver >= 2)
5933 off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_cluster, NULL, tvb, off);
5935 if (data->header.ver >= 3)
5937 proto_tree_add_item(tree, hf_msg_osd_boot_epoch,
5938 tvb, off, 4, ENC_LITTLE_ENDIAN);
5939 off += 4;
5941 if (data->header.ver >= 4)
5943 off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_front, NULL, tvb, off);
5945 if (data->header.ver >= 5)
5947 i = tvb_get_letohl(tvb, off);
5948 off += 4;
5949 while (i--)
5951 off = c_dissect_kv(tree, hf_msg_osd_boot_metadata,
5952 hf_msg_osd_boot_metadata_k, hf_msg_osd_boot_metadata_v,
5953 tvb, off);
5957 return off;
5960 /** PG Stats (0x0057) */
5961 static
5962 unsigned c_dissect_msg_pgstats(proto_tree *root,
5963 tvbuff_t *tvb,
5964 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
5965 c_pkt_data *data)
5967 proto_item *ti;
5968 proto_tree *tree;
5969 unsigned off = 0;
5970 uint32_t i;
5972 /* ceph:/src/messages/MPGStats.h */
5974 c_set_type(data, "PG Stats");
5976 off = c_dissect_paxos(root, tvb, off, data);
5978 ti = proto_tree_add_item(root, hf_msg_pgstats, tvb, off, front_len, ENC_NA);
5979 tree = proto_item_add_subtree(ti, ett_msg_pgstats);
5981 proto_tree_add_item(tree, hf_msg_pgstats_fsid,
5982 tvb, off, 16, ENC_LITTLE_ENDIAN);
5983 off += 16;
5985 off = c_dissect_osd_stat(tree, tvb, off, data);
5987 i = tvb_get_letohl(tvb, off);
5988 off += 4;
5989 while (i--)
5991 proto_item *ti2;
5992 proto_tree *subtree;
5994 ti2 = proto_tree_add_item(tree, hf_msg_pgstats_pgstat, tvb, off, -1, ENC_NA);
5995 subtree = proto_item_add_subtree(ti2, ett_msg_pgstats_pgstat);
5997 off = c_dissect_pg(subtree, hf_msg_pgstats_pgstat_pg, tvb, off, data);
5998 off = c_dissect_pg_stats(subtree, hf_msg_pgstats_pgstat_stat, tvb, off, data);
6000 proto_item_set_end(ti2, tvb, off);
6003 proto_tree_add_item(tree, hf_msg_pgstats_epoch,
6004 tvb, off, 4, ENC_LITTLE_ENDIAN);
6005 off += 4;
6007 proto_tree_add_item(tree, hf_msg_pgstats_mapfor,
6008 tvb, off, 8, ENC_LITTLE_ENDIAN);
6009 off += 8;
6011 return off;
6014 /** OSD PG Create (0x0059) */
6015 static
6016 unsigned c_dissect_msg_osd_pg_create(proto_tree *root,
6017 tvbuff_t *tvb,
6018 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
6019 c_pkt_data *data)
6021 proto_item *ti;
6022 proto_tree *tree;
6023 unsigned off = 0;
6024 uint32_t i;
6026 /* ceph:/src/messages/MOSDPGCreate.h */
6028 c_set_type(data, "OSD PG Create");
6030 ti = proto_tree_add_item(root, hf_msg_osd_pg_create, tvb, off, front_len, ENC_NA);
6031 tree = proto_item_add_subtree(ti, ett_msg_osd_pg_create);
6033 proto_tree_add_item(tree, hf_msg_osd_pg_create_epoch,
6034 tvb, off, 8, ENC_LITTLE_ENDIAN);
6035 off += 8;
6037 i = tvb_get_letohl(tvb, off);
6038 off += 4;
6039 while (i--)
6041 proto_item *ti2;
6042 proto_tree *subtree;
6044 ti2 = proto_tree_add_item(tree, hf_msg_osd_pg_create_mkpg,
6045 tvb, off, -1, ENC_NA);
6046 subtree = proto_item_add_subtree(ti2, ett_msg_osd_pg_create_mkpg);
6048 off = c_dissect_pg(subtree, hf_msg_osd_pg_create_mkpg_pg, tvb, off, data);
6049 off = c_dissect_pg_create(subtree, hf_msg_osd_pg_create_mkpg_create, tvb, off, data);
6051 proto_item_set_end(ti2, tvb, off);
6054 return off;
6057 /** Client Caps 0x0310 */
6058 static
6059 unsigned c_dissect_msg_client_caps(proto_tree *root,
6060 tvbuff_t *tvb,
6061 unsigned front_len, unsigned middle_len, unsigned data_len _U_,
6062 c_pkt_data *data)
6064 proto_item *ti;
6065 proto_tree *tree;
6066 unsigned off = 0;
6067 c_cap_op_type op;
6068 uint64_t inode, relam;
6069 uint32_t snap_trace_len, xattr_len;
6071 /* ceph:/src/messages/MClientCaps.h */
6073 c_set_type(data, "Client Capabilities");
6075 ti = proto_tree_add_item(root, hf_msg_client_caps, tvb, off, front_len, ENC_NA);
6076 tree = proto_item_add_subtree(ti, ett_msg_client_caps);
6078 op = (c_cap_op_type)tvb_get_letohl(tvb, off);
6079 proto_tree_add_item(tree, hf_msg_client_caps_op,
6080 tvb, off, 4, ENC_LITTLE_ENDIAN);
6081 off += 4;
6083 inode = tvb_get_letoh64(tvb, off);
6084 proto_tree_add_item(tree, hf_msg_client_caps_inode,
6085 tvb, off, 8, ENC_LITTLE_ENDIAN);
6086 off += 8;
6088 relam = tvb_get_letoh64(tvb, off);
6089 proto_tree_add_item(tree, hf_msg_client_caps_relam,
6090 tvb, off, 8, ENC_LITTLE_ENDIAN);
6091 off += 8;
6093 proto_tree_add_item(tree, hf_msg_client_caps_cap_id,
6094 tvb, off, 8, ENC_LITTLE_ENDIAN);
6095 off += 8;
6097 proto_tree_add_item(tree, hf_msg_client_caps_seq,
6098 tvb, off, 4, ENC_LITTLE_ENDIAN);
6099 off += 4;
6101 proto_tree_add_item(tree, hf_msg_client_caps_seq_issue,
6102 tvb, off, 4, ENC_LITTLE_ENDIAN);
6103 off += 4;
6105 proto_tree_add_item(tree, hf_msg_client_caps_new,
6106 tvb, off, 4, ENC_LITTLE_ENDIAN);
6107 off += 4;
6109 proto_tree_add_item(tree, hf_msg_client_caps_wanted,
6110 tvb, off, 4, ENC_LITTLE_ENDIAN);
6111 off += 4;
6113 proto_tree_add_item(tree, hf_msg_client_caps_dirty,
6114 tvb, off, 4, ENC_LITTLE_ENDIAN);
6115 off += 4;
6117 proto_tree_add_item(tree, hf_msg_client_caps_seq_migrate,
6118 tvb, off, 4, ENC_LITTLE_ENDIAN);
6119 off += 4;
6121 proto_tree_add_item(tree, hf_msg_client_caps_snap_follows,
6122 tvb, off, 8, ENC_BIG_ENDIAN);
6123 off += 8;
6125 snap_trace_len = tvb_get_letohl(tvb, off);
6126 off += 4;
6128 proto_tree_add_item(tree, hf_msg_client_caps_uid,
6129 tvb, off, 4, ENC_LITTLE_ENDIAN);
6130 off += 4;
6132 proto_tree_add_item(tree, hf_msg_client_caps_gid,
6133 tvb, off, 4, ENC_LITTLE_ENDIAN);
6134 off += 4;
6136 proto_tree_add_item(tree, hf_msg_client_caps_mode,
6137 tvb, off, 4, ENC_LITTLE_ENDIAN);
6138 off += 4;
6140 proto_tree_add_item(tree, hf_msg_client_caps_nlink,
6141 tvb, off, 4, ENC_LITTLE_ENDIAN);
6142 off += 4;
6144 xattr_len = tvb_get_letohl(tvb, off);
6145 off += 4;
6147 proto_tree_add_item(tree, hf_msg_client_caps_xattr_ver,
6148 tvb, off, 8, ENC_LITTLE_ENDIAN);
6149 off += 8;
6151 off += 84; /* @TODO: Union. */
6153 proto_tree_add_item(tree, hf_msg_client_caps_snap,
6154 tvb, off, snap_trace_len, ENC_NA);
6155 off += snap_trace_len;
6157 if (data->header.ver >= 2)
6159 off = c_dissect_data(tree, hf_msg_client_caps_flock, tvb, off);
6162 if (data->header.ver >= 3 && op == C_CAP_OP_IMPORT)
6164 /* ceph:/src/include/ceph_fs.h
6165 struct ceph_mds_cap_peer {
6166 __le64 cap_id;
6167 __le32 seq;
6168 __le32 mseq;
6169 __le32 mds;
6170 __u8 flags;
6171 } __attribute__ ((packed));
6173 /* @TODO: Parse this. */
6174 off += 21;
6177 if (data->header.ver >= 4)
6179 proto_tree_add_item(tree, hf_msg_client_caps_inline_ver,
6180 tvb, off, 8, ENC_LITTLE_ENDIAN);
6181 off += 8;
6182 off = c_dissect_data(tree, hf_msg_client_caps_inline_data, tvb, off);
6185 c_warn_size(tree, tvb, off, front_len, data);
6186 c_warn_size(tree, tvb, front_len+xattr_len, front_len+middle_len, data);
6188 proto_tree_add_item(tree, hf_msg_client_caps_xattr,
6189 tvb, front_len, middle_len, ENC_NA);
6191 proto_item_append_text(ti, ", Op: %s"
6192 ", Inode: 0x%016"PRIX64
6193 ", Relam: 0x%"PRIX64,
6194 c_cap_op_type_string(op),
6195 inode, relam);
6197 return front_len+middle_len;
6200 /** Client Cap Release 0x0310 */
6201 static
6202 unsigned c_dissect_msg_client_caprel(proto_tree *root,
6203 tvbuff_t *tvb,
6204 unsigned front_len, unsigned middle_len, unsigned data_len _U_,
6205 c_pkt_data *data)
6207 proto_item *ti;
6208 proto_tree *tree, *subtree;
6209 unsigned off = 0;
6210 uint32_t i;
6212 /* ceph:/src/messages/MClientCapRelease.h */
6214 c_set_type(data, "Client Cap Release");
6216 ti = proto_tree_add_item(root, hf_msg_client_caprel, tvb, off, front_len, ENC_NA);
6217 tree = proto_item_add_subtree(ti, ett_msg_client_caprel);
6219 i = (c_cap_op_type)tvb_get_letohl(tvb, off);
6220 proto_item_append_text(ti, ", Caps: %"PRIu32, i);
6221 off += 4;
6222 while (i--)
6224 ti = proto_tree_add_item(tree, hf_msg_client_caprel_cap, tvb, off, -1, ENC_NA);
6225 subtree = proto_item_add_subtree(ti, ett_msg_client_caprel_cap);
6227 proto_tree_add_item(subtree, hf_msg_client_caprel_cap_inode,
6228 tvb, off, 8, ENC_LITTLE_ENDIAN);
6229 off += 8;
6231 proto_tree_add_item(subtree, hf_msg_client_caprel_cap_id,
6232 tvb, off, 8, ENC_LITTLE_ENDIAN);
6233 off += 8;
6235 proto_tree_add_item(subtree, hf_msg_client_caprel_cap_migrate,
6236 tvb, off, 4, ENC_LITTLE_ENDIAN);
6237 off += 4;
6239 proto_tree_add_item(subtree, hf_msg_client_caprel_cap_seq,
6240 tvb, off, 4, ENC_LITTLE_ENDIAN);
6241 off += 4;
6243 proto_item_set_end(ti, tvb, off);
6246 return front_len+middle_len;
6249 /** Time Check 0x0600 */
6250 static
6251 unsigned c_dissect_msg_timecheck(proto_tree *root,
6252 tvbuff_t *tvb,
6253 unsigned front_len, unsigned middle_len _U_, unsigned data_len _U_,
6254 c_pkt_data *data)
6256 proto_item *ti;
6257 proto_tree *tree;
6258 unsigned off = 0;
6259 uint32_t i;
6260 c_timecheck_op op;
6261 uint64_t epoch, round;
6263 /* ceph:/src/messages/MTimeCheck.h */
6265 c_set_type(data, "Time Check");
6267 ti = proto_tree_add_item(root, hf_msg_timecheck, tvb, off, front_len, ENC_NA);
6268 tree = proto_item_add_subtree(ti, ett_msg_timecheck);
6270 op = (c_timecheck_op)tvb_get_letohl(tvb, off);
6271 proto_tree_add_item(tree, hf_msg_timecheck_op,
6272 tvb, off, 4, ENC_LITTLE_ENDIAN);
6273 off += 4;
6275 epoch = tvb_get_letoh64(tvb, off);
6276 proto_tree_add_item(tree, hf_msg_timecheck_epoch,
6277 tvb, off, 8, ENC_LITTLE_ENDIAN);
6278 off += 8;
6280 round = tvb_get_letoh64(tvb, off);
6281 proto_tree_add_item(tree, hf_msg_timecheck_round,
6282 tvb, off, 8, ENC_LITTLE_ENDIAN);
6283 off += 8;
6285 c_append_text(data, ti, ", Operation: %s, Epoch: %"PRIu64
6286 ", Round: %"PRIu64,
6287 c_timecheck_op_string(op),
6288 epoch, round);
6290 if (op == C_TIMECHECK_OP_PONG)
6292 c_append_text(data, ti, ", Time: %s", c_format_timespec(tvb, off));
6293 proto_tree_add_item(tree, hf_msg_timecheck_time,
6294 tvb, off, 8, ENC_LITTLE_ENDIAN);
6296 off += 8; /* Still in the message, but zeroed and meaningless. */
6298 i = tvb_get_letohl(tvb, off);
6299 off += 4;
6300 while (i--)
6302 proto_item *ti2;
6303 proto_tree *subtree;
6304 c_entityinst inst;
6305 double skew;
6307 ti2 = proto_tree_add_item(tree, hf_msg_timecheck_skew, tvb, off, -1, ENC_NA);
6308 subtree = proto_item_add_subtree(ti2, ett_msg_timecheck_skew);
6310 off = c_dissect_entityinst(subtree, hf_msg_timecheck_skew_node, &inst,
6311 tvb, off, data);
6313 skew = tvb_get_letohieee_double(tvb, off);
6314 proto_tree_add_item(subtree, hf_msg_timecheck_skew_skew,
6315 tvb, off, 8, ENC_LITTLE_ENDIAN);
6316 off += 8;
6318 proto_item_append_text(ti2, ", Node: %s, Skew: %lf", inst.name.slug, skew);
6319 proto_item_set_end(ti2, tvb, off);
6322 i = tvb_get_letohl(tvb, off);
6323 off += 4;
6324 while (i--)
6326 proto_item *ti2;
6327 proto_tree *subtree;
6328 c_entityinst inst;
6329 double ping;
6331 ti2 = proto_tree_add_item(tree, hf_msg_timecheck_latency, tvb, off, -1, ENC_NA);
6332 subtree = proto_item_add_subtree(ti2, ett_msg_timecheck_latency);
6334 off = c_dissect_entityinst(subtree, hf_msg_timecheck_latency_node, &inst,
6335 tvb, off, data);
6337 ping = tvb_get_letohieee_double(tvb, off);
6338 proto_tree_add_item(subtree, hf_msg_timecheck_latency_latency,
6339 tvb, off, 8, ENC_LITTLE_ENDIAN);
6340 off += 8;
6342 proto_item_append_text(ti2, ", Node: %s, Latency: %lf", inst.name.slug, ping);
6343 proto_item_set_end(ti2, tvb, off);
6346 return off;
6349 /*** MSGR Dissectors ***/
6351 #define C_OFF_HEAD0 0
6352 #define C_SIZE_HEAD0 ((64+64+16+16+16)/8)
6354 #define C_OFF_HEAD1 C_SIZE_HEAD0
6355 #define C_SIZE_HEAD1 ((32+32+32+16)/8)
6357 #define C_OFF_HEAD2 (C_OFF_HEAD1 + C_SIZE_HEAD1 + C_SIZE_ENTITY_NAME)
6358 #define C_SIZE_HEAD2 ((16+16+32)/8)
6360 #define C_SIZE_HEAD (C_OFF_HEAD2 + C_SIZE_HEAD2)
6362 #define C_SIZE_FOOT ((32+32+32+64+8)/8)
6364 /** Dissect a MSG message.
6366 * These are Ceph's business messages and are generally sent to specific
6367 * node types.
6369 static
6370 unsigned c_dissect_msg(proto_tree *tree,
6371 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6373 tvbuff_t *subtvb;
6374 proto_item *ti;
6375 proto_tree *subtree;
6376 c_msg_type type;
6377 uint32_t front_len, middle_len, data_len;
6378 unsigned size, parsedsize;
6380 front_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 0);
6381 middle_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 4);
6382 data_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 8);
6384 /*** Header ***/
6386 /* From ceph:/src/include/msgr.h
6387 struct ceph_msg_header {
6388 __le64 seq; // message seq# for this session
6389 __le64 tid; // transaction id
6390 __le16 type; // message type
6391 __le16 priority; // priority. higher value == higher priority
6392 __le16 version; // version of message encoding
6394 __le32 front_len; // bytes in main payload
6395 __le32 middle_len;// bytes in middle payload
6396 __le32 data_len; // bytes of data payload
6397 __le16 data_off; // sender: include full offset; receiver: mask against ~PAGE_MASK
6399 struct ceph_entity_name src;
6401 // oldest code we think can decode this. unknown if zero.
6402 __le16 compat_version;
6403 __le16 reserved;
6404 __le32 crc; // header crc32c
6405 } __attribute__ ((packed));
6408 ti = proto_tree_add_item(tree, hf_head, tvb, off, C_SIZE_HEAD, ENC_NA);
6409 subtree = proto_item_add_subtree(ti, ett_head);
6411 data->header.seq = tvb_get_letoh64(tvb, off);
6412 proto_tree_add_item(subtree, hf_head_seq,
6413 tvb, off, 8, ENC_LITTLE_ENDIAN);
6414 off += 8;
6415 data->header.tid = tvb_get_letoh64(tvb, off);
6416 proto_tree_add_item(subtree, hf_head_tid,
6417 tvb, off, 8, ENC_LITTLE_ENDIAN);
6418 off += 8;
6420 data->header.type = type = (c_msg_type)tvb_get_letohs(tvb, off);
6421 proto_tree_add_item(subtree, hf_head_type,
6422 tvb, off, 2, ENC_LITTLE_ENDIAN);
6423 off += 2;
6425 data->header.priority = tvb_get_letohs(tvb, off);
6426 proto_tree_add_item(subtree, hf_head_priority,
6427 tvb, off, 2, ENC_LITTLE_ENDIAN);
6428 off += 2;
6429 data->header.ver = tvb_get_letohs(tvb, off);
6430 proto_tree_add_item(subtree, hf_head_version,
6431 tvb, off, 2, ENC_LITTLE_ENDIAN);
6432 off += 2;
6434 proto_tree_add_item(subtree, hf_head_front_size,
6435 tvb, off, 4, ENC_LITTLE_ENDIAN);
6436 off += 4;
6437 proto_tree_add_item(subtree, hf_head_middle_size,
6438 tvb, off, 4, ENC_LITTLE_ENDIAN);
6439 off += 4;
6440 proto_tree_add_item(subtree, hf_head_data_size,
6441 tvb, off, 4, ENC_LITTLE_ENDIAN);
6442 off += 4;
6443 proto_tree_add_item(subtree, hf_head_data_off,
6444 tvb, off, 2, ENC_LITTLE_ENDIAN);
6445 off += 2;
6447 off = c_dissect_entityname(subtree, hf_head_srcname, &data->header.src,
6448 tvb, off, data);
6450 /*** Copy the data to the state structure. ***/
6452 /* Save memory by copying only if different, they are *usually* the same. */
6453 if (!data->src->name.slug ||
6454 strcmp(data->src->name.slug, data->header.src.slug) != 0)
6455 data->src->name.slug = wmem_strdup(wmem_file_scope(),
6456 data->header.src.slug);
6457 if (!data->src->name.type_str ||
6458 strcmp(data->src->name.type_str, data->header.src.type_str) != 0)
6459 data->src->name.type_str = wmem_strdup(wmem_file_scope(),
6460 data->header.src.type_str);
6462 data->src->name.type = data->header.src.type;
6463 data->src->name.id = data->header.src.id;
6465 proto_tree_add_item(subtree, hf_head_compat_version,
6466 tvb, off, 2, ENC_LITTLE_ENDIAN);
6467 off += 2;
6468 proto_tree_add_item(subtree, hf_head_reserved,
6469 tvb, off, 2, ENC_LITTLE_ENDIAN);
6470 off += 2;
6471 proto_tree_add_item(subtree, hf_head_crc,
6472 tvb, off, 4, ENC_LITTLE_ENDIAN);
6473 off += 4;
6475 proto_item_append_text(ti, ", Type: %s, From: %s",
6476 c_msg_type_string(type),
6477 data->header.src.slug);
6478 if (front_len ) proto_item_append_text(ti, ", Front Len: %d", front_len);
6479 if (middle_len) proto_item_append_text(ti, ", Mid Len: %d", middle_len);
6480 if (data_len ) proto_item_append_text(ti, ", Data Len: %d", data_len);
6482 /*** Body ***/
6484 subtvb = tvb_new_subset_length(tvb, off, front_len+middle_len+data_len);
6486 switch (type)
6488 #define C_CALL(name) name(tree, subtvb, front_len, middle_len, data_len, data)
6489 #define C_HANDLE(tag, name) case tag: parsedsize = C_CALL(name); break;
6491 C_HANDLE(C_CEPH_MSG_PING, c_dissect_msg_ping)
6492 C_HANDLE(C_CEPH_MSG_MON_MAP, c_dissect_msg_mon_map)
6493 C_HANDLE(C_CEPH_MSG_STATFS, c_dissect_msg_statfs)
6494 C_HANDLE(C_CEPH_MSG_STATFS_REPLY, c_dissect_msg_statfsreply)
6495 C_HANDLE(C_CEPH_MSG_MON_SUBSCRIBE, c_dissect_msg_mon_sub)
6496 C_HANDLE(C_CEPH_MSG_MON_SUBSCRIBE_ACK, c_dissect_msg_mon_sub_ack)
6497 C_HANDLE(C_CEPH_MSG_AUTH, c_dissect_msg_auth)
6498 C_HANDLE(C_CEPH_MSG_AUTH_REPLY, c_dissect_msg_auth_reply)
6499 C_HANDLE(C_CEPH_MSG_MON_GET_VERSION, c_dissect_msg_mon_getversion)
6500 C_HANDLE(C_CEPH_MSG_MON_GET_VERSION_REPLY, c_dissect_msg_mon_getversionreply)
6501 C_HANDLE(C_CEPH_MSG_MDS_MAP, c_dissect_msg_mds_map)
6502 C_HANDLE(C_CEPH_MSG_CLIENT_SESSION, c_dissect_msg_client_sess)
6503 C_HANDLE(C_CEPH_MSG_CLIENT_REQUEST, c_dissect_msg_client_req)
6504 C_HANDLE(C_CEPH_MSG_CLIENT_REQUEST_FORWARD, c_dissect_msg_client_reqfwd)
6505 C_HANDLE(C_CEPH_MSG_CLIENT_REPLY, c_dissect_msg_client_reply)
6506 C_HANDLE(C_CEPH_MSG_OSD_MAP, c_dissect_msg_osd_map)
6507 C_HANDLE(C_CEPH_MSG_OSD_OP, c_dissect_msg_osd_op)
6508 C_HANDLE(C_CEPH_MSG_OSD_OPREPLY, c_dissect_msg_osd_opreply)
6509 C_HANDLE(C_MSG_POOLOPREPLY, c_dissect_msg_poolopreply)
6510 C_HANDLE(C_MSG_POOLOP, c_dissect_msg_poolop)
6511 C_HANDLE(C_MSG_MON_COMMAND, c_dissect_msg_mon_cmd)
6512 C_HANDLE(C_MSG_MON_COMMAND_ACK, c_dissect_msg_mon_cmd_ack)
6513 C_HANDLE(C_MSG_GETPOOLSTATS, c_dissect_msg_poolstats)
6514 C_HANDLE(C_MSG_GETPOOLSTATSREPLY, c_dissect_msg_poolstatsreply)
6515 C_HANDLE(C_MSG_MON_GLOBAL_ID, c_dissect_msg_mon_globalid)
6516 C_HANDLE(C_MSG_MON_ELECTION, c_dissect_msg_mon_election)
6517 C_HANDLE(C_MSG_MON_PAXOS, c_dissect_msg_mon_paxos)
6518 C_HANDLE(C_MSG_MON_PROBE, c_dissect_msg_mon_probe)
6519 C_HANDLE(C_MSG_OSD_PING, c_dissect_msg_osd_ping)
6520 C_HANDLE(C_MSG_OSD_BOOT, c_dissect_msg_osd_boot)
6521 C_HANDLE(C_MSG_PGSTATS, c_dissect_msg_pgstats)
6522 C_HANDLE(C_MSG_OSD_PG_CREATE, c_dissect_msg_osd_pg_create)
6523 C_HANDLE(C_CEPH_MSG_CLIENT_CAPS, c_dissect_msg_client_caps)
6524 C_HANDLE(C_CEPH_MSG_CLIENT_CAPRELEASE, c_dissect_msg_client_caprel)
6525 C_HANDLE(C_MSG_TIMECHECK, c_dissect_msg_timecheck)
6527 default:
6528 parsedsize = C_CALL(c_dissect_msg_unknown);
6529 #undef C_CALL
6530 #undef C_HANDLE
6533 size = front_len + middle_len + data_len;
6535 /* Did the message dissector use all the data? */
6536 c_warn_size(tree, tvb, off+parsedsize, off+size, data);
6538 off += size;
6540 /*** Footer ***/
6542 /* From ceph:/src/include/msgr.h
6543 struct ceph_msg_footer {
6544 __le32 front_crc, middle_crc, data_crc;
6545 // sig holds the 64 bits of the digital signature for the message PLR
6546 __le64 sig;
6547 __u8 flags;
6548 } __attribute__ ((packed));
6551 ti = proto_tree_add_item(tree, hf_foot, tvb, off, C_SIZE_FOOT, ENC_NA);
6552 subtree = proto_item_add_subtree(ti, ett_foot);
6554 proto_tree_add_item(subtree, hf_foot_front_crc,
6555 tvb, off, 4, ENC_LITTLE_ENDIAN);
6556 off += 4;
6557 proto_tree_add_item(subtree, hf_foot_middle_crc,
6558 tvb, off, 4, ENC_LITTLE_ENDIAN);
6559 off += 4;
6560 proto_tree_add_item(subtree, hf_foot_data_crc,
6561 tvb, off, 4, ENC_LITTLE_ENDIAN);
6562 off += 4;
6564 proto_tree_add_item(subtree, hf_foot_signature,
6565 tvb, off, 8, ENC_LITTLE_ENDIAN);
6566 off += 8;
6567 off = c_dissect_flags(subtree, tvb, off, data);
6569 return off;
6572 #define C_SIZE_CONNECT 33
6573 #define C_SIZE_CONNECT_REPLY 25
6574 #define C_CONNECT_REPLY_OFF_OFFLEN 20
6575 #define C_SIZE_HELLO_S (2*C_SIZE_ENTITY_ADDR)
6576 #define C_SIZE_HELLO_C (C_SIZE_ENTITY_ADDR + C_SIZE_CONNECT)
6577 #define C_HELLO_OFF_AUTHLEN (C_SIZE_ENTITY_ADDR + 28)
6579 /** Dissect a connection request. */
6580 static
6581 unsigned c_dissect_connect(proto_tree *root,
6582 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6584 /* From ceph:/src/include/msgr.h
6585 struct ceph_msg_connect {
6586 __le64 features;
6587 __le32 host_type;
6588 __le32 global_seq;
6589 __le32 connect_seq;
6590 __le32 protocol_version;
6591 __le32 authorizer_protocol;
6592 __le32 authorizer_len;
6593 __u8 flags;
6594 } __attribute__(packed);
6597 proto_item *ti;
6598 proto_tree *tree;
6599 uint32_t authsize;
6601 authsize = tvb_get_letohl(tvb, off+28);
6603 ti = proto_tree_add_item(root, hf_connect, tvb, off, C_SIZE_CONNECT, ENC_NA);
6604 tree = proto_item_add_subtree(ti, ett_connect);
6606 off = c_dissect_features(tree, tvb, off, data);
6608 proto_tree_add_item(tree, hf_connect_host_type,
6609 tvb, off, 4, ENC_LITTLE_ENDIAN);
6610 off += 4;
6611 proto_tree_add_item(tree, hf_connect_seq_global,
6612 tvb, off, 4, ENC_LITTLE_ENDIAN);
6613 off += 4;
6614 proto_tree_add_item(tree, hf_connect_seq,
6615 tvb, off, 4, ENC_LITTLE_ENDIAN);
6616 off += 4;
6617 proto_tree_add_item(tree, hf_connect_proto_ver,
6618 tvb, off, 4, ENC_LITTLE_ENDIAN);
6619 off += 4;
6620 proto_tree_add_item(tree, hf_connect_auth_proto,
6621 tvb, off, 4, ENC_LITTLE_ENDIAN);
6622 off += 4;
6623 proto_tree_add_item(tree, hf_connect_auth_size,
6624 tvb, off, 4, ENC_LITTLE_ENDIAN);
6625 off += 4;
6627 off = c_dissect_flags(tree, tvb, off, data);
6629 /* @TODO: Parse auth. */
6630 proto_tree_add_item(tree, hf_connect_auth,
6631 tvb, off, authsize, ENC_NA);
6632 off += authsize;
6634 return off;
6637 /** Dissect a connection reply. */
6638 static
6639 unsigned c_dissect_connect_reply(proto_tree *root,
6640 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6642 /* From ceph:/src/include/msgr.h
6643 struct ceph_msg_connect_reply {
6644 __u8 tag; // Handled outside.
6645 __le64 features;
6646 __le32 global_seq;
6647 __le32 connect_seq;
6648 __le32 protocol_version;
6649 __le32 authorizer_len;
6650 __u8 flags;
6651 } __attribute__ ((packed));
6654 proto_item *ti;
6655 proto_tree *tree;
6656 uint32_t authsize;
6658 authsize = tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6660 c_set_type(data, "Connect Reply");
6662 ti = proto_tree_add_item(root, hf_connect_reply,
6663 tvb, off, C_SIZE_CONNECT_REPLY, ENC_NA);
6664 tree = proto_item_add_subtree(ti, ett_connect_reply);
6666 off = c_dissect_features(tree, tvb, off, data);
6668 proto_tree_add_item(tree, hf_connect_seq_global,
6669 tvb, off, 4, ENC_LITTLE_ENDIAN);
6670 off += 4;
6671 proto_tree_add_item(tree, hf_connect_seq,
6672 tvb, off, 4, ENC_LITTLE_ENDIAN);
6673 off += 4;
6674 proto_tree_add_item(tree, hf_connect_proto_ver,
6675 tvb, off, 4, ENC_LITTLE_ENDIAN);
6676 off += 4;
6677 proto_tree_add_item(tree, hf_connect_auth_size,
6678 tvb, off, 4, ENC_LITTLE_ENDIAN);
6679 off += 4;
6681 off = c_dissect_flags(tree, tvb, off, data);
6683 /* @TODO: Parse auth. */
6684 proto_tree_add_item(tree, hf_connect_auth,
6685 tvb, off, authsize, ENC_NA);
6686 off += authsize;
6688 return off;
6691 /** Do the connection initiation dance.
6693 * This handles the data that is sent before the protocol is actually started.
6695 static
6696 unsigned c_dissect_new(proto_tree *tree,
6697 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6699 int bansize;
6702 Since the packet is larger than the max banner length we can read it
6703 all in safely.
6705 G_STATIC_ASSERT(C_BANNER_SIZE+1 <= C_BANNER_SIZE_MIN+C_SIZE_HELLO_C);
6706 G_STATIC_ASSERT(C_BANNER_SIZE+1 <= C_BANNER_SIZE_MIN+C_SIZE_HELLO_S);
6708 if (tvb_memeql(tvb, off, C_BANNER, C_BANNER_SIZE_MIN) != 0)
6709 return C_INVALID;
6711 bansize = tvb_strnlen(tvb, off, C_BANNER_SIZE+1);
6712 if (bansize != C_BANNER_SIZE) /* Note -1 != C_BANNER_SIZE */
6713 return C_INVALID;
6715 proto_tree_add_item(tree, hf_banner, tvb, off, bansize, ENC_ASCII);
6716 off += bansize;
6718 c_set_type(data, "Connect");
6720 if (c_from_server(data))
6721 off = c_dissect_entityaddr(tree, hf_server_info, NULL, tvb, off);
6723 off = c_dissect_entityaddr(tree, hf_client_info, NULL, tvb, off);
6725 if (c_from_client(data))
6726 off = c_dissect_connect(tree, tvb, off, data);
6728 data->src->state = C_STATE_OPEN;
6730 return off;
6733 static
6734 bool c_unknowntagnext(tvbuff_t *tvb, unsigned off)
6736 if (!tvb_bytes_exist(tvb, off, 1)) return false;
6738 return (try_val_to_str_ext(tvb_get_uint8(tvb, off), &c_tag_strings_ext) == NULL);
6741 /* Dissect a MSGR message.
6743 * MSGR is Ceph's outer message protocol.
6745 static
6746 unsigned c_dissect_msgr(proto_tree *tree,
6747 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6749 proto_item *ti;
6750 c_tag tag;
6751 unsigned unknowntagcount = 1;
6753 tag = (c_tag)tvb_get_uint8(tvb, off);
6754 ti = proto_tree_add_item(tree, hf_tag, tvb, off, 1, ENC_LITTLE_ENDIAN);
6755 off += 1;
6757 switch (tag)
6759 case C_TAG_READY:
6760 case C_TAG_RESETSESSION:
6761 case C_TAG_WAIT:
6762 case C_TAG_RETRY_SESSION:
6763 case C_TAG_RETRY_GLOBAL:
6764 case C_TAG_BADPROTOVER:
6765 case C_TAG_BADAUTHORIZER:
6766 case C_TAG_FEATURES:
6767 off = c_dissect_connect_reply(tree, tvb, off, data);
6768 break;
6769 case C_TAG_SEQ:
6770 off = c_dissect_connect_reply(tree, tvb, off, data);
6771 proto_tree_add_item(tree, hf_seq_existing,
6772 tvb, off, 8, ENC_LITTLE_ENDIAN);
6773 off += 8;
6775 data->dst->state = C_STATE_SEQ;
6776 break;
6777 case C_TAG_CLOSE:
6778 c_set_type(data, "CLOSE");
6779 data->src->state = C_STATE_NEW;
6780 break;
6781 case C_TAG_MSG:
6782 off = c_dissect_msg(tree, tvb, off, data);
6783 break;
6784 case C_TAG_ACK:
6785 c_set_type(data, "ACK");
6786 proto_item_append_text(data->item_root, ", Seq: %u",
6787 tvb_get_letohl(tvb, off));
6788 proto_tree_add_item(tree, hf_ack,
6789 tvb, off, 8, ENC_LITTLE_ENDIAN);
6790 off += 8;
6791 break;
6792 case C_TAG_KEEPALIVE:
6793 c_set_type(data, "KEEPALIVE");
6794 /* No data. */
6795 break;
6796 case C_TAG_KEEPALIVE2:
6797 case C_TAG_KEEPALIVE2_ACK:
6798 c_set_type(data, "KEEPALIVE2");
6799 proto_tree_add_item(tree, hf_keepalive_time,
6800 tvb, off, 8, ENC_LITTLE_ENDIAN);
6801 off += 8;
6802 break;
6803 default:
6805 The default is to do nothing. We have no way of knowing how
6806 long an unknown message will be. Our best bet is to read
6807 just the tag (which we did above) and try to interpret the
6808 next byte as a message. In the best case we step through
6809 the unknown message and when we hit the next known message
6810 we can continue.
6812 Stepping through byte-by-byte is slow, and creates a lot of
6813 "Unknown Tag" items (where only the first one is really
6814 meaningful) but we don't want to miss the next message if we
6815 can help it.
6817 Worst case is the message contains a byte that we think is a
6818 message. In this case we will interpret garbage from there
6819 creating bogus items in the dissection results. After we
6820 "dissect" that "PDU" we go back to the start and hope we get
6821 lucky and find ourselves realigned.
6824 /* Batch multiple unknowns together. */
6825 while (c_unknowntagnext(tvb, off)) {
6826 off++;
6827 unknowntagcount++;
6830 c_set_type(data, wmem_strdup_printf(wmem_packet_scope(),
6831 "UNKNOWN x%u",
6832 unknowntagcount));
6833 expert_add_info(data->pinfo, ti, &ei_tag_unknown);
6836 return off;
6839 /* Dissect a Protocol Data Unit
6841 static
6842 unsigned c_dissect_pdu(proto_tree *root,
6843 tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6845 proto_item *ti, *tif;
6846 proto_tree *tree, *tree_filter;
6848 ti = proto_tree_add_item(root, proto_ceph, tvb, off, -1, ENC_NA);
6849 tree = proto_item_add_subtree(ti, ett_ceph);
6851 data->item_root = ti;
6853 tif = proto_tree_add_item(tree, hf_filter_data, tvb, off, -1, ENC_NA);
6854 tree_filter = proto_item_add_subtree(tif, ett_filter_data);
6856 switch (data->src->state)
6858 case C_STATE_NEW:
6859 off = c_dissect_new(tree, tvb, off, data);
6860 break;
6861 case C_STATE_SEQ:
6862 c_set_type(data, "Sequence Number");
6863 proto_item_append_text(data->item_root, ", Seq: %"PRIu64,
6864 tvb_get_letoh64(tvb, off));
6865 proto_tree_add_item(tree, hf_seq_new, tvb, off, 8, ENC_LITTLE_ENDIAN);
6866 off += 8;
6867 data->src->state = C_STATE_OPEN;
6868 break;
6869 default:
6870 off = c_dissect_msgr(tree, tvb, off, data);
6873 if (tree_filter) {
6874 proto_item *fi;
6875 const char *srcn, *dstn;
6877 /* Provide readable defaults. */
6878 srcn = data->src->name.slug? data->src->name.slug : "Unknown";
6879 dstn = data->dst->name.slug? data->dst->name.slug : "Unknown";
6881 /*** General Filter Data ***/
6882 fi = proto_tree_add_string(tree_filter, hf_src_slug,
6883 NULL, 0, 0, srcn);
6884 proto_item_set_generated(fi);
6885 fi = proto_tree_add_uint(tree_filter, hf_src_type,
6886 NULL, 0, 0, data->src->name.type);
6887 proto_item_set_generated(fi);
6888 fi = proto_tree_add_string(tree_filter, hf_dst_slug,
6889 NULL, 0, 0, dstn);
6890 proto_item_set_generated(fi);
6891 fi = proto_tree_add_uint(tree_filter, hf_dst_type,
6892 NULL, 0, 0, data->dst->name.type);
6893 proto_item_set_generated(fi);
6895 proto_item_set_end(tif, tvb, off);
6898 proto_item_set_end(ti, tvb, off);
6900 return off;
6903 static
6904 unsigned c_pdu_end(tvbuff_t *tvb, packet_info *pinfo, unsigned off, c_pkt_data *data)
6906 c_inet af;
6909 * If we don't already know, then figure out which end of the
6910 * connection is the client. It's icky, but the only way to know is to
6911 * see whether the info after the first entity_addr_t looks like
6912 * another entity_addr_t.
6914 if (data->convd->client.port == 0xFFFF) {
6915 if (!tvb_bytes_exist(tvb, off, C_BANNER_SIZE + C_SIZE_ENTITY_ADDR + 8 + 2))
6916 return C_NEEDMORE;
6918 /* We have enough to determine client vs. server */
6919 af = (c_inet)tvb_get_ntohs(tvb, off + C_BANNER_SIZE + C_SIZE_ENTITY_ADDR + 8);
6920 if (af != C_IPv4 && af != C_IPv6) {
6921 /* Client */
6922 copy_address_wmem(wmem_file_scope(), &data->convd->client.addr, &pinfo->src);
6923 data->convd->client.port = pinfo->srcport;
6924 copy_address_wmem(wmem_file_scope(), &data->convd->server.addr, &pinfo->dst);
6925 data->convd->server.port = pinfo->destport;
6926 data->src = &data->convd->client;
6927 data->dst = &data->convd->server;
6928 } else {
6929 /* Server */
6930 copy_address_wmem(wmem_file_scope(), &data->convd->server.addr, &pinfo->src);
6931 data->convd->server.port = pinfo->srcport;
6932 copy_address_wmem(wmem_file_scope(), &data->convd->client.addr, &pinfo->dst);
6933 data->convd->client.port = pinfo->destport;
6934 data->src = &data->convd->server;
6935 data->dst = &data->convd->client;
6939 switch (data->src->state)
6941 case C_STATE_NEW:
6942 if (c_from_client(data))
6944 if (!tvb_bytes_exist(tvb, off+C_BANNER_SIZE+C_HELLO_OFF_AUTHLEN, 4))
6945 return C_NEEDMORE;
6946 return off + C_BANNER_SIZE + C_SIZE_HELLO_C
6947 + tvb_get_letohl(tvb, off+C_BANNER_SIZE+C_HELLO_OFF_AUTHLEN);
6949 else
6950 return off + C_BANNER_SIZE + C_SIZE_HELLO_S;
6951 case C_STATE_SEQ:
6952 return off + 8;
6953 default:
6954 switch ((c_tag)tvb_get_uint8(tvb, off++))
6956 case C_TAG_READY:
6957 case C_TAG_RESETSESSION:
6958 case C_TAG_WAIT:
6959 case C_TAG_RETRY_SESSION:
6960 case C_TAG_RETRY_GLOBAL:
6961 case C_TAG_BADPROTOVER:
6962 case C_TAG_BADAUTHORIZER:
6963 case C_TAG_FEATURES:
6964 if (!tvb_bytes_exist(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN, 4))
6965 return C_NEEDMORE;
6966 return off + C_SIZE_CONNECT_REPLY
6967 + tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6968 case C_TAG_SEQ:
6969 if (!tvb_bytes_exist(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN, 4))
6970 return C_NEEDMORE;
6971 return off + C_SIZE_CONNECT_REPLY + 8
6972 + tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6973 case C_TAG_CLOSE:
6974 return off;
6975 case C_TAG_MSG:
6977 uint32_t front_len, middle_len, data_len;
6979 if (!tvb_bytes_exist(tvb, off+C_OFF_HEAD1, C_SIZE_HEAD1))
6980 return C_NEEDMORE;
6982 front_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 0);
6983 middle_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 4);
6984 data_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 8);
6986 return off + C_SIZE_HEAD+front_len+middle_len+data_len+C_SIZE_FOOT;
6988 case C_TAG_ACK:
6989 return off + 8;
6990 case C_TAG_KEEPALIVE:
6991 return off;
6992 case C_TAG_KEEPALIVE2:
6993 case C_TAG_KEEPALIVE2_ACK:
6994 return off+C_SIZE_TIMESPEC;
6995 default:
6996 while (c_unknowntagnext(tvb, off))
6997 off++;
6999 return off;
7004 static
7005 int dissect_ceph(tvbuff_t *tvb, packet_info *pinfo,
7006 proto_tree *tree, void *pdata _U_)
7008 unsigned off, offt, offt2;
7009 c_pkt_data data;
7011 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Ceph");
7012 col_clear(pinfo->cinfo, COL_INFO);
7014 off = 0;
7015 while (off < tvb_reported_length(tvb))
7017 c_pkt_data_init(&data, pinfo, off);
7019 /* Save snapshot before dissection changes it. */
7021 If some data has already been dissected in this frame we *must*
7022 save the state so we can remember that the rest of the frame is
7023 an incomplete PDU.
7025 if (off)
7026 c_pkt_data_save(&data, pinfo, off);
7028 offt = c_pdu_end(tvb, pinfo, off, &data);
7029 if (offt == C_INVALID)
7031 return 0;
7033 if (offt == C_NEEDMORE) /* Need more data to determine PDU length. */
7035 pinfo->desegment_offset = off;
7036 pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
7037 return 1;
7039 if (offt > tvb_reported_length(tvb)) /* Know PDU length, get rest */
7041 pinfo->desegment_offset = off;
7042 pinfo->desegment_len = offt - tvb_reported_length(tvb);
7043 return 1;
7047 If we didn't save above, save now. This is a complete PDU so
7048 we need to save the state.
7050 if (!off)
7051 c_pkt_data_save(&data, pinfo, off);
7053 col_append_sep_str(pinfo->cinfo, COL_INFO, " | ", "");
7054 col_set_fence(pinfo->cinfo, COL_INFO);
7056 offt2 = c_dissect_pdu(tree, tvb, off, &data);
7057 if (!offt2) return 0;
7058 DISSECTOR_ASSERT_CMPINT(offt2, ==, offt);
7060 off = offt;
7063 return off; /* Perfect Fit. */
7066 /** An old style dissector proxy.
7068 * Proxies the old style dissector interface to the new style.
7070 static
7071 int dissect_ceph_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
7073 dissect_ceph(tvb, pinfo, tree, data);
7074 return tvb_captured_length(tvb);
7077 static
7078 bool dissect_ceph_heur(tvbuff_t *tvb, packet_info *pinfo,
7079 proto_tree *tree, void *data)
7081 conversation_t *conv;
7083 if (tvb_memeql(tvb, 0, C_BANNER, C_BANNER_SIZE_MIN) != 0) return false;
7085 /*** It's ours! ***/
7087 conv = find_or_create_conversation(pinfo);
7088 /* Mark it as ours. */
7089 conversation_set_dissector(conv, ceph_handle);
7091 dissect_ceph(tvb, pinfo, tree, data);
7092 return true;
7095 /* Register the protocol with Wireshark.
7097 void
7098 proto_register_ceph(void)
7100 expert_module_t *expert_ceph;
7102 static hf_register_info hf[] = {
7103 { &hf_filter_data, {
7104 "Filter Data", "ceph.filter",
7105 FT_NONE, BASE_NONE, NULL, 0,
7106 "A bunch of properties for convenient filtering.", HFILL
7107 } },
7108 { &hf_node_id, {
7109 "ID", "ceph.node_id",
7110 FT_UINT64, BASE_DEC, NULL, 0,
7111 "The numeric ID of the node.", HFILL
7112 } },
7113 { &hf_node_type, {
7114 "Source Node Type", "ceph.node_type",
7115 FT_UINT32, BASE_HEX, VALS(c_node_type_strings), 0,
7116 "The type of source node.", HFILL
7117 } },
7118 { &hf_node_nonce, {
7119 "Nonce", "ceph.node_nonce",
7120 FT_UINT32, BASE_HEX, NULL, 0,
7121 "Meaningless number to differentiate between nodes on "
7122 "the same system.", HFILL
7123 } },
7124 { &hf_entityinst_name, {
7125 "Name", "ceph.entityinst.name",
7126 FT_NONE, BASE_NONE, NULL, 0,
7127 NULL, HFILL
7128 } },
7129 { &hf_entityinst_addr, {
7130 "Address", "ceph.entityinst.addr",
7131 FT_NONE, BASE_NONE, NULL, 0,
7132 NULL, HFILL
7133 } },
7134 { &hf_EntityName, {
7135 "Entity Name", "ceph.EntityName",
7136 FT_NONE, BASE_NONE, NULL, 0,
7137 NULL, HFILL
7138 } },
7139 { &hf_EntityName_type, {
7140 "Type", "ceph.EntityName.type",
7141 FT_UINT32, BASE_HEX, NULL, 0,
7142 NULL, HFILL
7143 } },
7144 { &hf_EntityName_id, {
7145 "ID", "ceph.EntityName.id",
7146 FT_STRING, BASE_NONE, NULL, 0,
7147 NULL, HFILL
7148 } },
7149 { &hf_src_slug, {
7150 "Source Node Name", "ceph.src",
7151 FT_STRING, BASE_NONE, NULL, 0,
7152 NULL, HFILL
7153 } },
7154 { &hf_src_type, {
7155 "Source Node Type", "ceph.src.type",
7156 FT_UINT8, BASE_HEX, VALS(c_node_type_abbr_strings), 0,
7157 NULL, HFILL
7158 } },
7159 { &hf_dst_slug, {
7160 "Destination Node Name", "ceph.dst",
7161 FT_STRING, BASE_NONE, NULL, 0,
7162 NULL, HFILL
7163 } },
7164 { &hf_dst_type, {
7165 "Destination Node Type", "ceph.dst.type",
7166 FT_UINT8, BASE_HEX, VALS(c_node_type_abbr_strings), 0,
7167 NULL, HFILL
7168 } },
7169 { &hf_banner, {
7170 "Version", "ceph.ver",
7171 FT_STRINGZ, BASE_NONE, NULL, 0,
7172 "The protocol version string.", HFILL
7173 } },
7174 { &hf_client_info, {
7175 "Client's Identity", "ceph.client_info",
7176 FT_NONE, BASE_NONE, NULL, 0,
7177 NULL, HFILL
7178 } },
7179 { &hf_server_info, {
7180 "Server's Identity", "ceph.server_info",
7181 FT_NONE, BASE_NONE, NULL, 0,
7182 NULL, HFILL
7183 } },
7184 { &hf_sockaddr, {
7185 "Network Address", "ceph.sockaddr",
7186 FT_NONE, BASE_NONE, NULL, 0,
7187 NULL, HFILL
7188 } },
7189 { &hf_inet_family, {
7190 "Address Family", "ceph.af",
7191 FT_UINT16, BASE_HEX, VALS(c_inet_strings), 0,
7192 "The address family of the client as seen by the server.", HFILL
7193 } },
7194 { &hf_port, {
7195 "Port", "ceph.client.port",
7196 FT_UINT16, BASE_DEC, NULL, 0,
7197 "The port of the client as seen by the server.", HFILL
7198 } },
7199 { &hf_addr_ipv4, {
7200 "IPv4 Address", "ceph.client.ip4",
7201 FT_IPv4, BASE_NONE, NULL, 0,
7202 "The IP address of the client as seen by the server.", HFILL
7203 } },
7204 { &hf_addr_ipv6, {
7205 "IPv6 Address", "ceph.client.ipv6",
7206 FT_IPv6, BASE_NONE, NULL, 0,
7207 "The IP address of the client as seen by the server.", HFILL
7208 } },
7209 { &hf_data_data, {
7210 "Data", "ceph.data.data",
7211 FT_BYTES, BASE_NONE, NULL, 0,
7212 NULL, HFILL
7213 } },
7214 { &hf_data_size, {
7215 "Size", "ceph.data.size",
7216 FT_UINT32, BASE_DEC, NULL, 0,
7217 NULL, HFILL
7218 } },
7219 { &hf_string_data, {
7220 "Data", "ceph.string.data",
7221 FT_STRING, BASE_NONE, NULL, 0,
7222 NULL, HFILL
7223 } },
7224 { &hf_string_size, {
7225 "Size", "ceph.string.size",
7226 FT_UINT32, BASE_DEC, NULL, 0,
7227 NULL, HFILL
7228 } },
7229 { &hf_keepalive_time, {
7230 "Timestamp", "ceph.keepalive.time",
7231 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7232 NULL, HFILL
7233 } },
7234 { &hf_encoded_ver, {
7235 "Encoding Version", "ceph.enc.ver",
7236 FT_UINT8, BASE_DEC, NULL, 0,
7237 NULL, HFILL
7238 } },
7239 { &hf_encoded_compat, {
7240 "Minimum compatible version", "ceph.enc.compat",
7241 FT_UINT8, BASE_DEC, NULL, 0,
7242 NULL, HFILL
7243 } },
7244 { &hf_encoded_size, {
7245 "Size", "ceph.nanoseconds",
7246 FT_UINT32, BASE_DEC, NULL, 0,
7247 "Size of encoded message.", HFILL
7248 } },
7249 { &hf_version, {
7250 "Version", "ceph.version",
7251 FT_UINT64, BASE_DEC, NULL, 0,
7252 NULL, HFILL
7253 } },
7254 { &hf_epoch, {
7255 "Epoch", "ceph.epoch",
7256 FT_UINT32, BASE_DEC, NULL, 0,
7257 NULL, HFILL
7258 } },
7259 { &hf_pool, {
7260 "Pool", "ceph.pool",
7261 FT_INT64, BASE_DEC, NULL, 0,
7262 NULL, HFILL
7263 } },
7264 { &hf_key, {
7265 "Object Key", "ceph.key",
7266 FT_STRING, BASE_NONE, NULL, 0,
7267 NULL, HFILL
7268 } },
7269 { &hf_namespace, {
7270 "Namespace", "ceph.namespace",
7271 FT_STRING, BASE_NONE, NULL, 0,
7272 NULL, HFILL
7273 } },
7274 { &hf_hash, {
7275 "Object Hash", "ceph.hash",
7276 FT_INT64, BASE_DEC, NULL, 0,
7277 NULL, HFILL
7278 } },
7279 { &hf_pgid_ver, {
7280 "Placement Group Version", "ceph.pg.ver",
7281 FT_UINT8, BASE_DEC, NULL, 0,
7282 NULL, HFILL
7283 } },
7284 { &hf_pgid_pool, {
7285 "Pool", "ceph.pg.pool",
7286 FT_UINT64, BASE_HEX, NULL, 0,
7287 NULL, HFILL
7288 } },
7289 { &hf_pgid_seed, {
7290 "Seed", "ceph.pg.seed",
7291 FT_UINT32, BASE_HEX, NULL, 0,
7292 NULL, HFILL
7293 } },
7294 { &hf_pgid_preferred, {
7295 "Preferred", "ceph.pg.preferred",
7296 FT_INT32, BASE_DEC, NULL, 0,
7297 NULL, HFILL
7298 } },
7299 { &hf_pg_create_epoch, {
7300 "Epoch Created", "ceph.pg_create.epoch",
7301 FT_UINT32, BASE_DEC, NULL, 0,
7302 NULL, HFILL
7303 } },
7304 { &hf_pg_create_parent, {
7305 "Parent", "ceph.pg_create.parent",
7306 FT_NONE, BASE_NONE, NULL, 0,
7307 NULL, HFILL
7308 } },
7309 { &hf_pg_create_splitbits, {
7310 "Split Bits", "ceph.pg_create.splitbits",
7311 FT_INT32, BASE_DEC, NULL, 0,
7312 NULL, HFILL
7313 } },
7314 { &hf_path_ver, {
7315 "Encoding Version", "ceph.path.ver",
7316 FT_UINT8, BASE_HEX, NULL, 0,
7317 NULL, HFILL
7318 } },
7319 { &hf_path_inode, {
7320 "Inode", "ceph.path.inode",
7321 FT_UINT64, BASE_HEX, NULL, 0,
7322 NULL, HFILL
7323 } },
7324 { &hf_path_rel, {
7325 "Relative component", "ceph.path.rel",
7326 FT_STRING, BASE_NONE, NULL, 0,
7327 NULL, HFILL
7328 } },
7329 { &hf_mds_release_inode, {
7330 "Inode", "ceph.mds_release.inode",
7331 FT_UINT64, BASE_HEX, NULL, 0,
7332 NULL, HFILL
7333 } },
7334 { &hf_mds_release_capid, {
7335 "Capability ID", "ceph.mds_release.capid",
7336 FT_UINT64, BASE_HEX, NULL, 0,
7337 NULL, HFILL
7338 } },
7339 { &hf_mds_release_new, {
7340 "New Capabilities", "ceph.mds_release.new",
7341 FT_UINT32, BASE_HEX, NULL, 0,
7342 NULL, HFILL
7343 } },
7344 { &hf_mds_release_wanted, {
7345 "Wanted Capabilities", "ceph.mds_release.wanted",
7346 FT_UINT32, BASE_HEX, NULL, 0,
7347 NULL, HFILL
7348 } },
7349 { &hf_mds_release_seq, {
7350 "Seq", "ceph.mds_release.seq",
7351 FT_UINT32, BASE_HEX, NULL, 0,
7352 NULL, HFILL
7353 } },
7354 { &hf_mds_release_seq_issue, {
7355 "Seq Issue", "ceph.mds_release.seq_issue",
7356 FT_UINT32, BASE_HEX, NULL, 0,
7357 NULL, HFILL
7358 } },
7359 { &hf_mds_release_mseq, {
7360 "Migration Sequence", "ceph.mds_release.mseq",
7361 FT_UINT32, BASE_HEX, NULL, 0,
7362 NULL, HFILL
7363 } },
7364 { &hf_mds_release_dname_seq, {
7365 "DName Seq", "ceph.mds_release.dname_seq",
7366 FT_UINT32, BASE_HEX, NULL, 0,
7367 NULL, HFILL
7368 } },
7369 { &hf_mds_release_dname, {
7370 "DName", "ceph.mds_release.dname",
7371 FT_STRING, BASE_NONE, NULL, 0,
7372 NULL, HFILL
7373 } },
7374 { &hf_hitset_params, {
7375 "HitSet Parameters", "ceph.hitset_params",
7376 FT_NONE, BASE_NONE, NULL, 0,
7377 NULL, HFILL
7378 } },
7379 { &hf_hitset_params_type, {
7380 "Type", "ceph.hitset_params.type",
7381 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_hitset_params_type_strings_ext, 0,
7382 NULL, HFILL
7383 } },
7384 { &hf_hitset_params_exphash_count, {
7385 "Count", "ceph.hitset_params.exphash.count",
7386 FT_UINT64, BASE_DEC, NULL, 0,
7387 NULL, HFILL
7388 } },
7389 { &hf_hitset_params_exphash_hit, {
7390 "Hit", "ceph.hitset_params.exphash.hit",
7391 FT_UINT32, BASE_DEC, NULL, 0,
7392 NULL, HFILL
7393 } },
7394 { &hf_snapinfo, {
7395 "Snapshot Info", "ceph.snapinfo",
7396 FT_NONE, BASE_NONE, NULL, 0,
7397 NULL, HFILL
7398 } },
7399 { &hf_snapinfo_id, {
7400 "ID", "ceph.snapinfo.id",
7401 FT_UINT64, BASE_HEX, NULL, 0,
7402 NULL, HFILL
7403 } },
7404 { &hf_snapinfo_time, {
7405 "Timestamp", "ceph.snapinfo.timestamp",
7406 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7407 NULL, HFILL
7408 } },
7409 { &hf_snapinfo_name, {
7410 "Name", "ceph.snapinfo.name",
7411 FT_STRING, BASE_NONE, NULL, 0,
7412 NULL, HFILL
7413 } },
7414 { &hf_pgpool, {
7415 "Placement Group Pool", "ceph.pgpool",
7416 FT_NONE, BASE_NONE, NULL, 0,
7417 NULL, HFILL
7418 } },
7419 { &hf_pgpool_type, {
7420 "Type", "ceph.pgpool.type",
7421 FT_UINT8, BASE_HEX, VALS(c_pgpool_type_strings), 0,
7422 NULL, HFILL
7423 } },
7424 { &hf_pgpool_size, {
7425 "Size", "ceph.pgpool.size",
7426 FT_UINT8, BASE_DEC, NULL, 0,
7427 NULL, HFILL
7428 } },
7429 { &hf_pgpool_crush_ruleset, {
7430 "CRUSH Ruleset", "ceph.pgpool.crush_ruleset",
7431 FT_UINT8, BASE_DEC, NULL, 0,
7432 NULL, HFILL
7433 } },
7434 { &hf_pgpool_hash, {
7435 "Object Hash", "ceph.pgpool.hash",
7436 FT_UINT8, BASE_HEX, NULL, 0,
7437 NULL, HFILL
7438 } },
7439 { &hf_pgpool_pgnum, {
7440 "PG Count", "ceph.pgpool.pgnum",
7441 FT_UINT32, BASE_DEC, NULL, 0,
7442 NULL, HFILL
7443 } },
7444 { &hf_pgpool_pgpnum, {
7445 "PGP Count", "ceph.pgpool.pgpnum",
7446 FT_UINT32, BASE_DEC, NULL, 0,
7447 NULL, HFILL
7448 } },
7449 { &hf_pgpool_changed, {
7450 "Last Changed", "ceph.pgpool.changed",
7451 FT_UINT32, BASE_DEC, NULL, 0,
7452 NULL, HFILL
7453 } },
7454 { &hf_pgpool_snapseq, {
7455 "Snap Sequence", "ceph.pgpool.snapseq",
7456 FT_UINT64, BASE_HEX, NULL, 0,
7457 NULL, HFILL
7458 } },
7459 { &hf_pgpool_snapepoch, {
7460 "Epoch", "ceph.pgpool.snapepoch",
7461 FT_UINT32, BASE_DEC, NULL, 0,
7462 NULL, HFILL
7463 } },
7464 { &hf_pgpool_snap, {
7465 "Snapshot", "ceph.pgpool.snap",
7466 FT_NONE, BASE_NONE, NULL, 0,
7467 NULL, HFILL
7468 } },
7469 { &hf_pgpool_snap_id, {
7470 "ID", "ceph.pgpool.snap.id",
7471 FT_UINT64, BASE_HEX, NULL, 0,
7472 NULL, HFILL
7473 } },
7474 { &hf_pgpool_snapdel, {
7475 "Deleted Snapshots", "ceph.pgpool.snapdel",
7476 FT_NONE, BASE_NONE, NULL, 0,
7477 NULL, HFILL
7478 } },
7479 { &hf_pgpool_snapdel_from, {
7480 "From", "ceph.pgpool.snapdel.from",
7481 FT_UINT64, BASE_HEX, NULL, 0,
7482 NULL, HFILL
7483 } },
7484 { &hf_pgpool_snapdel_to, {
7485 "To", "ceph.pgpool.snapdel.to",
7486 FT_UINT64, BASE_HEX, NULL, 0,
7487 NULL, HFILL
7488 } },
7489 { &hf_pgpool_uid, {
7490 "User ID", "ceph.pgpool.uid",
7491 FT_UINT64, BASE_DEC, NULL, 0,
7492 NULL, HFILL
7493 } },
7494 { &hf_pgpool_flags_low, {
7495 "Flags", "ceph.pgpool.flags",
7496 FT_UINT32, BASE_HEX, NULL, 0,
7497 NULL, HFILL
7498 } },
7499 { &hf_pgpool_flags_high, {
7500 "Flags", "ceph.pgpool.flags",
7501 FT_UINT32, BASE_HEX, NULL, 0,
7502 NULL, HFILL
7503 } },
7504 { &hf_pgpool_crash_reply_interval, {
7505 "Crash Replay Interval", "ceph.pgpool.crash_reply_interval",
7506 FT_UINT32, BASE_DEC, NULL, 0,
7507 "Seconds to allow clients to replay ACKed but "
7508 "unCOMMITted requests.", HFILL
7509 } },
7510 { &hf_pgpool_min_size, {
7511 "Minimum number of OSDs", "ceph.pgpool.min_size",
7512 FT_UINT8, BASE_DEC, NULL, 0,
7513 NULL, HFILL
7514 } },
7515 { &hf_pgpool_quota_bytes, {
7516 "Maximum number of bytes", "ceph.pgpool.quota_bytes",
7517 FT_UINT64, BASE_DEC, NULL, 0,
7518 NULL, HFILL
7519 } },
7520 { &hf_pgpool_quota_objects, {
7521 "Maximum number of objects", "ceph.pgpool.quota_objects",
7522 FT_UINT64, BASE_DEC, NULL, 0,
7523 NULL, HFILL
7524 } },
7525 { &hf_pgpool_tier, {
7526 "Tier", "ceph.msg.tier",
7527 FT_UINT64, BASE_HEX, NULL, 0,
7528 "A pool that is a tier of this tier.", HFILL
7529 } },
7530 { &hf_pgpool_tierof, {
7531 "Tier of", "ceph.pgpool.tierof",
7532 FT_UINT64, BASE_HEX, NULL, 0,
7533 "The pool that this pool is a tier of.", HFILL
7534 } },
7535 { &hf_pgpool_cachemode, {
7536 "Cache Mode", "ceph.pgpool.cache_mode",
7537 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_pgpool_cachemode_strings_ext, 0,
7538 NULL, HFILL
7539 } },
7540 { &hf_pgpool_readtier, {
7541 "Read Tier", "ceph.pgpool.read_tier",
7542 FT_UINT64, BASE_HEX, NULL, 0,
7543 NULL, HFILL
7544 } },
7545 { &hf_pgpool_writetier, {
7546 "Write Tier", "ceph.pgpool.write_tier",
7547 FT_UINT64, BASE_HEX, NULL, 0,
7548 NULL, HFILL
7549 } },
7550 { &hf_pgpool_property, {
7551 "Property", "ceph.pgpool.property",
7552 FT_NONE, BASE_NONE, NULL, 0,
7553 NULL, HFILL
7554 } },
7555 { &hf_pgpool_property_key, {
7556 "Key", "ceph.pgpool.property.key",
7557 FT_STRING, BASE_NONE, NULL, 0,
7558 NULL, HFILL
7559 } },
7560 { &hf_pgpool_property_val, {
7561 "Value", "ceph.pgpool.property.val",
7562 FT_STRING, BASE_NONE, NULL, 0,
7563 NULL, HFILL
7564 } },
7565 { &hf_pgpool_hitset_period, {
7566 "HitSet Period", "ceph.hitset_period",
7567 FT_UINT32, BASE_DEC, NULL, 0,
7568 "The period of HitSet segments in seconds.", HFILL
7569 } },
7570 { &hf_pgpool_hitset_count, {
7571 "HitSet count", "ceph.pgpool.hitset_count",
7572 FT_UINT32, BASE_DEC, NULL, 0,
7573 "The number of HitSet periods to retain.", HFILL
7574 } },
7575 { &hf_pgpool_stripewidth, {
7576 "Stripe Width", "ceph.pgpool.stripewidth",
7577 FT_UINT32, BASE_DEC, NULL, 0,
7578 NULL, HFILL
7579 } },
7580 { &hf_pgpool_targetmaxsize, {
7581 "Target Maximum Bytes", "ceph.pgpool.targetmaxsize",
7582 FT_UINT64, BASE_DEC, NULL, 0,
7583 NULL, HFILL
7584 } },
7585 { &hf_pgpool_targetmaxobj, {
7586 "Target Maximum Objects", "ceph.pgpool.targetmaxobj",
7587 FT_UINT64, BASE_DEC, NULL, 0,
7588 NULL, HFILL
7589 } },
7590 { &hf_pgpool_cache_targetdirtyratio, {
7591 "Cache Target Dirty Ratio", "ceph.pgpool.cache.targetdirtyratio",
7592 FT_UINT32, BASE_DEC, NULL, 0,
7593 "Fraction of cache to leave dirty.", HFILL
7594 } },
7595 { &hf_pgpool_cache_targetfullratio, {
7596 "Cache Target Full Ratio", "ceph.msg.targetfullratio",
7597 FT_UINT32, BASE_DEC, NULL, 0,
7598 "Fraction of target to fill before evicting in earnest.", HFILL
7599 } },
7600 { &hf_pgpool_cache_flushage_min, {
7601 "Cache Minimum Flush Age", "ceph.pgpool.cache.flushage_min",
7602 FT_UINT32, BASE_DEC, NULL, 0,
7603 NULL, HFILL
7604 } },
7605 { &hf_pgpool_cache_evictage_min, {
7606 "Cache Minimum Evict Age", "ceph.pgpool.cache.evictage_min",
7607 FT_UINT32, BASE_DEC, NULL, 0,
7608 NULL, HFILL
7609 } },
7610 { &hf_pgpool_erasurecode_profile, {
7611 "Erasure Code Profile", "ceph.pgpool.erasurecode_profile",
7612 FT_STRING, BASE_NONE, NULL, 0,
7613 NULL, HFILL
7614 } },
7615 { &hf_pgpool_lastforceresend, {
7616 "Last Force Resend", "ceph.pgpool.lastforceresend",
7617 FT_UINT32, BASE_DEC, NULL, 0,
7618 "Last epoch that forced clients to resend.", HFILL
7619 } },
7620 { &hf_pgpool_flag_hashpool, {
7621 "Hash Seed and Pool Together", "ceph.pgpool.flag.hashpool",
7622 FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_HASHPSPOOL,
7623 NULL, HFILL
7624 } },
7625 { &hf_pgpool_flag_full, {
7626 "Pool Full", "ceph.pgpool.flag.full",
7627 FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_FULL,
7628 NULL, HFILL
7629 } },
7630 { &hf_pgpool_flag_fake_ec_pool, {
7631 "Fake Erasure-Coded Pool", "ceph.pgpool.flag.fake_ec_pool",
7632 FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_FAKE_EC_POOL,
7633 NULL, HFILL
7634 } },
7635 { &hf_monmap, {
7636 "Monmap", "ceph.monmap.data",
7637 FT_NONE, BASE_NONE, NULL, 0,
7638 NULL, HFILL
7639 } },
7640 { &hf_monmap_fsid, {
7641 "FSID", "ceph.monmap.fsid",
7642 FT_GUID, BASE_NONE, NULL, 0,
7643 NULL, HFILL
7644 } },
7645 { &hf_monmap_epoch, {
7646 "Epoch", "ceph.monmap.epoch",
7647 FT_UINT32, BASE_DEC, NULL, 0,
7648 NULL, HFILL
7649 } },
7650 { &hf_monmap_address, {
7651 "Monitor Address", "ceph.monmap.address",
7652 FT_NONE, BASE_NONE, NULL, 0,
7653 NULL, HFILL
7654 } },
7655 { &hf_monmap_address_name, {
7656 "Name", "ceph.monmap.address.name",
7657 FT_STRING, BASE_NONE, NULL, 0,
7658 NULL, HFILL
7659 } },
7660 { &hf_monmap_address_addr, {
7661 "Address", "ceph.monmap.address.addr",
7662 FT_NONE, BASE_NONE, NULL, 0,
7663 NULL, HFILL
7664 } },
7665 { &hf_monmap_changed, {
7666 "Last Changed", "ceph.monmap.changed",
7667 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7668 NULL, HFILL
7669 } },
7670 { &hf_monmap_created, {
7671 "Time Created", "ceph.monmap.created",
7672 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7673 NULL, HFILL
7674 } },
7675 { &hf_pg_stat_ver, {
7676 "Version", "ceph.pg_stat.ver",
7677 FT_NONE, BASE_NONE, NULL, 0,
7678 NULL, HFILL
7679 } },
7680 { &hf_pg_stat_seq, {
7681 "Reported Sequence Number", "ceph.pg_stat.seq",
7682 FT_UINT64, BASE_DEC, NULL, 0,
7683 NULL, HFILL
7684 } },
7685 { &hf_pg_stat_epoch, {
7686 "Reported Epoch", "ceph.pg_stat.epoch",
7687 FT_UINT32, BASE_DEC, NULL, 0,
7688 NULL, HFILL
7689 } },
7690 { &hf_pg_stat_state, {
7691 "State", "ceph.pg_stat.state",
7692 FT_UINT32, BASE_DEC, NULL, 0,
7693 NULL, HFILL
7694 } },
7695 { &hf_pg_stat_logstart, {
7696 "Log Start", "ceph.pg_stat.logstart",
7697 FT_NONE, BASE_NONE, NULL, 0,
7698 NULL, HFILL
7699 } },
7700 { &hf_pg_stat_logstartondisk, {
7701 "On-disk Log Start", "ceph.pg_stat.logstartondisk",
7702 FT_NONE, BASE_NONE, NULL, 0,
7703 NULL, HFILL
7704 } },
7705 { &hf_pg_stat_created, {
7706 "Created", "ceph.pg_stat.created",
7707 FT_UINT32, BASE_DEC, NULL, 0,
7708 NULL, HFILL
7709 } },
7710 { &hf_pg_stat_lastepochclean, {
7711 "Last Epoch Clean", "ceph.pg_stat.lastepochclean",
7712 FT_UINT32, BASE_DEC, NULL, 0,
7713 NULL, HFILL
7714 } },
7715 { &hf_pg_stat_parent, {
7716 "Parent", "ceph.pg_stat.parent",
7717 FT_NONE, BASE_NONE, NULL, 0,
7718 NULL, HFILL
7719 } },
7720 { &hf_pg_stat_parent_splitbits, {
7721 "Parent Split Bits", "ceph.pg_stat.parent_splitbits",
7722 FT_UINT32, BASE_HEX, NULL, 0,
7723 NULL, HFILL
7724 } },
7725 { &hf_pg_stat_lastscrub, {
7726 "Last Scrub", "ceph.pg_stat.lastscrub",
7727 FT_NONE, BASE_NONE, NULL, 0,
7728 NULL, HFILL
7729 } },
7730 { &hf_pg_stat_lastscrubstamp, {
7731 "Last Scrub Timestamp", "ceph.pg_stat.lastscrubstamp",
7732 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7733 NULL, HFILL
7734 } },
7735 { &hf_pg_stat_stats, {
7736 "Stats", "ceph.pg_stat.stats",
7737 FT_NONE, BASE_NONE, NULL, 0,
7738 NULL, HFILL
7739 } },
7740 { &hf_pg_stat_logsize, {
7741 "Log Size", "ceph.pg_stat.logsize",
7742 FT_UINT64, BASE_DEC, NULL, 0,
7743 NULL, HFILL
7744 } },
7745 { &hf_pg_stat_logsizeondisk, {
7746 "Log Size On-disk", "ceph.pg_stat.logsizeondisk",
7747 FT_UINT64, BASE_DEC, NULL, 0,
7748 NULL, HFILL
7749 } },
7750 { &hf_pg_stat_up, {
7751 "Up", "ceph.pg_stat.up",
7752 FT_UINT32, BASE_DEC, NULL, 0,
7753 NULL, HFILL
7754 } },
7755 { &hf_pg_stat_acting, {
7756 "Acting", "ceph.pg_stat.acting",
7757 FT_UINT32, BASE_DEC, NULL, 0,
7758 NULL, HFILL
7759 } },
7760 { &hf_pg_stat_lastfresh, {
7761 "Last Fresh", "ceph.pg_stat.lastfresh",
7762 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7763 NULL, HFILL
7764 } },
7765 { &hf_pg_stat_lastchange, {
7766 "Last Change", "ceph.pg_stat.lastchange",
7767 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7768 NULL, HFILL
7769 } },
7770 { &hf_pg_stat_lastactive, {
7771 "Last Active", "ceph.pg_stat.lastactive",
7772 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7773 NULL, HFILL
7774 } },
7775 { &hf_pg_stat_lastclean, {
7776 "Last Clean", "ceph.pg_stat.lastclean",
7777 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7778 NULL, HFILL
7779 } },
7780 { &hf_pg_stat_lastunstale, {
7781 "Last Not Stale", "ceph.pg_stat.lastunstale",
7782 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7783 NULL, HFILL
7784 } },
7785 { &hf_pg_stat_mappingepoch, {
7786 "Mapping Epoch", "ceph.pg_stat.mappingepoch",
7787 FT_UINT32, BASE_DEC, NULL, 0,
7788 NULL, HFILL
7789 } },
7790 { &hf_pg_stat_lastdeepscrub, {
7791 "Last Deep Scrub", "ceph.pg_stat.lastdeepscrub",
7792 FT_NONE, BASE_NONE, NULL, 0,
7793 NULL, HFILL
7794 } },
7795 { &hf_pg_stat_lastdeepscrubstamp, {
7796 "Time of Last Deep Scrub", "ceph.pg_stat.lastdeepscrubstamp",
7797 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7798 NULL, HFILL
7799 } },
7800 { &hf_pg_stat_statsinvalid, {
7801 "Stats Invalid", "ceph.pg_stat.statsinvalid",
7802 FT_BOOLEAN, BASE_NONE, NULL, 0,
7803 NULL, HFILL
7804 } },
7805 { &hf_pg_stat_lastcleanscrubstamp, {
7806 "Time of Last Clean Scrub", "ceph.pg_stat.lastcleanscrubstamp",
7807 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7808 NULL, HFILL
7809 } },
7810 { &hf_pg_stat_lastbecameactive, {
7811 "Last Became Active", "ceph.pg_stat.lastbecameactive",
7812 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7813 NULL, HFILL
7814 } },
7815 { &hf_pg_stat_dirtystatsinvalid, {
7816 "Dirty Stats Invalid", "ceph.pg_stat.dirtystatusinvalid",
7817 FT_BOOLEAN, BASE_NONE, NULL, 0,
7818 NULL, HFILL
7819 } },
7820 { &hf_pg_stat_upprimary, {
7821 "Up Primary", "ceph.pg_stat.upprimary",
7822 FT_INT32, BASE_DEC, NULL, 0,
7823 NULL, HFILL
7824 } },
7825 { &hf_pg_stat_actingprimary, {
7826 "Acting Primary", "ceph.pg_stat.actingprimary",
7827 FT_INT32, BASE_DEC, NULL, 0,
7828 NULL, HFILL
7829 } },
7830 { &hf_pg_stat_omapstatsinvalid, {
7831 "OMap Stats Invalid", "ceph.pg_stat.omapstatsinvalid",
7832 FT_BOOLEAN, BASE_NONE, NULL, 0,
7833 NULL, HFILL
7834 } },
7835 { &hf_pg_stat_hitsetstatsinvalid, {
7836 "HitSet Stats Invalid", "ceph.pg_stat.hitsetstatsinvalid",
7837 FT_BOOLEAN, BASE_NONE, NULL, 0,
7838 NULL, HFILL
7839 } },
7840 { &hf_osd_superblock, {
7841 "Superblock", "ceph.osd_superblock",
7842 FT_NONE, BASE_NONE, NULL, 0,
7843 NULL, HFILL
7844 } },
7845 { &hf_osd_superblock_clusterfsid, {
7846 "Cluster FSID", "ceph.osd_superblock.fsid",
7847 FT_GUID, BASE_NONE, NULL, 0,
7848 NULL, HFILL
7849 } },
7850 { &hf_osd_superblock_role, {
7851 "Role", "ceph.osd_superblock.role",
7852 FT_INT32, BASE_DEC, NULL, 0,
7853 NULL, HFILL
7854 } },
7855 { &hf_osd_superblock_epoch, {
7856 "Epoch", "ceph.osd_superblock.epoch",
7857 FT_UINT32, BASE_DEC, NULL, 0,
7858 NULL, HFILL
7859 } },
7860 { &hf_osd_superblock_map_old, {
7861 "Oldest Map", "ceph.osd_superblock.map_old",
7862 FT_UINT32, BASE_DEC, NULL, 0,
7863 NULL, HFILL
7864 } },
7865 { &hf_osd_superblock_map_new, {
7866 "Newest Map", "ceph.osd_superblock.map_new",
7867 FT_UINT32, BASE_DEC, NULL, 0,
7868 NULL, HFILL
7869 } },
7870 { &hf_osd_superblock_weight, {
7871 "Weight", "ceph.osd_superblock.weight",
7872 FT_DOUBLE, BASE_NONE, NULL, 0,
7873 NULL, HFILL
7874 } },
7875 { &hf_osd_superblock_mounted, {
7876 "Mounted", "ceph.osd_superblock.mounted",
7877 FT_UINT32, BASE_DEC, NULL, 0,
7878 "Last epoch mounted.", HFILL
7879 } },
7880 { &hf_osd_superblock_osdfsid, {
7881 "OSD FSID", "ceph.osd_superblock.osdfsid",
7882 FT_GUID, BASE_NONE, NULL, 0,
7883 NULL, HFILL
7884 } },
7885 { &hf_osd_superblock_clean, {
7886 "Clean Through", "ceph.osd_superblock.clean",
7887 FT_UINT32, BASE_DEC, NULL, 0,
7888 "Last epoch active and clean.", HFILL
7889 } },
7890 { &hf_osd_superblock_full, {
7891 "Last Marked Full", "ceph.osd_superblock.full",
7892 FT_UINT32, BASE_DEC, NULL, 0,
7893 "Last epoch OSDMap was marked full.", HFILL
7894 } },
7895 { &hf_osdinfo_ver, {
7896 "Encoding Version", "ceph.osdinfo.ver",
7897 FT_UINT8, BASE_DEC, NULL, 0,
7898 NULL, HFILL
7899 } },
7900 { &hf_osdinfo_lastclean_begin, {
7901 "Last Clean Begin", "ceph.osdinfo.lastclean.begin",
7902 FT_UINT32, BASE_DEC, NULL, 0,
7903 "The start of the last interval that ended with "
7904 "a clean shutdown.", HFILL
7905 } },
7906 { &hf_osdinfo_lastclean_end, {
7907 "Last Clean End", "ceph.osdinfo.lastclean.end",
7908 FT_UINT32, BASE_DEC, NULL, 0,
7909 "The end of the last interval that ended with a "
7910 "clean shutdown.", HFILL
7911 } },
7912 { &hf_osdinfo_up_from, {
7913 "Up From", "ceph.osdinfo.up.from",
7914 FT_UINT32, BASE_DEC, NULL, 0,
7915 "Epoch OSD was marked up.", HFILL
7916 } },
7917 { &hf_osdinfo_up_through, {
7918 "Up Through", "ceph.osdinfo.up.through",
7919 FT_UINT32, BASE_DEC, NULL, 0,
7920 "Last epoch before OSD died.", HFILL
7921 } },
7922 { &hf_osdinfo_downat, {
7923 "Down At", "ceph.osdinfo.downat",
7924 FT_UINT32, BASE_DEC, NULL, 0,
7925 "First epoch after OSD died.", HFILL
7926 } },
7927 { &hf_osdinfo_lostat, {
7928 "Lost At", "ceph.osdinfo.lostat",
7929 FT_UINT32, BASE_DEC, NULL, 0,
7930 "Last epoch where the data was decided \"lost\".", HFILL
7931 } },
7932 { &hf_osdxinfo_down, {
7933 "Down At", "ceph.osdxinfo.downat",
7934 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7935 "Time when OSD was last marked down.", HFILL
7936 } },
7937 { &hf_osdxinfo_laggy_probability, {
7938 "Laggy Probability", "ceph.osdxinfo.laggy.probability",
7939 FT_UINT32, BASE_DEC, NULL, 0,
7940 "Probability that the OSD is laggy. (out of 0xFFFFFFFF)", HFILL
7941 } },
7942 { &hf_osdxinfo_laggy_interval, {
7943 "Laggy Interval", "ceph.osdxinfo.laggy.interval",
7944 FT_UINT32, BASE_DEC, NULL, 0,
7945 "Average interval between being marked laggy and recovering.", HFILL
7946 } },
7947 { &hf_osdxinfo_oldweight, {
7948 "Old Weight", "ceph.osdxinfo.oldweight",
7949 FT_UINT32, BASE_DEC, NULL, 0,
7950 NULL, HFILL
7951 } },
7952 { &hf_perfstat_commitlatency, {
7953 "Commit Latency", "ceph.perfstat.commitlatency",
7954 FT_UINT32, BASE_DEC, NULL, 0,
7955 NULL, HFILL
7956 } },
7957 { &hf_perfstat_applylatency, {
7958 "Apply Latency", "ceph.perfstat.applylatency",
7959 FT_UINT32, BASE_DEC, NULL, 0,
7960 NULL, HFILL
7961 } },
7962 { &hf_osdstat, {
7963 "OSD Stats", "ceph.osdstat",
7964 FT_NONE, BASE_NONE, NULL, 0,
7965 NULL, HFILL
7966 } },
7967 { &hf_osdstat_kb, {
7968 "KiB", "ceph.osdstat.kb",
7969 FT_UINT64, BASE_DEC, NULL, 0,
7970 NULL, HFILL
7971 } },
7972 { &hf_osdstat_kbused, {
7973 "KiB Used", "ceph.osdstat.kbused",
7974 FT_UINT64, BASE_DEC, NULL, 0,
7975 NULL, HFILL
7976 } },
7977 { &hf_osdstat_kbavail, {
7978 "KiB Available", "ceph.osdstat.kbavail",
7979 FT_UINT64, BASE_DEC, NULL, 0,
7980 NULL, HFILL
7981 } },
7982 { &hf_osdstat_trimqueue, {
7983 "Trim Queue", "ceph.osdstat.trimqueue",
7984 FT_UINT32, BASE_DEC, NULL, 0,
7985 NULL, HFILL
7986 } },
7987 { &hf_osdstat_hbin, {
7988 "Heartbeats In", "ceph.osdstat.hbin",
7989 FT_UINT32, BASE_DEC, NULL, 0,
7990 NULL, HFILL
7991 } },
7992 { &hf_osdstat_hbout, {
7993 "Heartbeats Out", "ceph.osdstat.hbout",
7994 FT_UINT32, BASE_DEC, NULL, 0,
7995 NULL, HFILL
7996 } },
7997 { &hf_osdstat_opqueue, {
7998 "Op Queue", "ceph.osdstat.opqueue",
7999 FT_UINT32, BASE_DEC, NULL, 0,
8000 NULL, HFILL
8001 } },
8002 { &hf_osdstat_fsperf, {
8003 "Filesystem Performance", "ceph.osdstat.fsperf",
8004 FT_NONE, BASE_NONE, NULL, 0,
8005 NULL, HFILL
8006 } },
8007 { &hf_osdstat_trimming, {
8008 "Number Trimming", "ceph.osdstat.trimming",
8009 FT_UINT32, BASE_DEC, NULL, 0,
8010 NULL, HFILL
8011 } },
8012 { &hf_osdmap, {
8013 "OSD Map", "ceph.osdmap",
8014 FT_NONE, BASE_NONE, NULL, 0,
8015 NULL, HFILL
8016 } },
8017 { &hf_osdmap_client, {
8018 "Client-Usable Data", "ceph.osdmap.client",
8019 FT_NONE, BASE_NONE, NULL, 0,
8020 NULL, HFILL
8021 } },
8022 { &hf_osdmap_fsid, {
8023 "FSID", "ceph.osdmap.fsid",
8024 FT_GUID, BASE_NONE, NULL, 0,
8025 NULL, HFILL
8026 } },
8027 { &hf_osdmap_epoch, {
8028 "Epoch", "ceph.osdmap.epoch",
8029 FT_UINT32, BASE_DEC, NULL, 0,
8030 NULL, HFILL
8031 } },
8032 { &hf_osdmap_created, {
8033 "Time Created", "ceph.osdmap.created",
8034 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8035 NULL, HFILL
8036 } },
8037 { &hf_osdmap_modified, {
8038 "Last Modified", "ceph.osdmap.modified",
8039 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8040 NULL, HFILL
8041 } },
8042 { &hf_osdmap_pool, {
8043 "Pool", "ceph.osdmap.pool",
8044 FT_NONE, BASE_NONE, NULL, 0,
8045 NULL, HFILL
8046 } },
8047 { &hf_osdmap_pool_id, {
8048 "ID", "ceph.osdmap.pool.id",
8049 FT_UINT64, BASE_HEX, NULL, 0,
8050 NULL, HFILL
8051 } },
8052 { &hf_osdmap_poolname_item, {
8053 "Pool Name", "ceph.osdmap.poolname.item",
8054 FT_NONE, BASE_NONE, NULL, 0,
8055 NULL, HFILL
8056 } },
8057 { &hf_osdmap_poolname, {
8058 "Name", "ceph.osdmap.poolname",
8059 FT_STRING, BASE_NONE, NULL, 0,
8060 NULL, HFILL
8061 } },
8062 { &hf_osdmap_poolmax, {
8063 "Highest Pool ID", "ceph.osdmap.poolmax",
8064 FT_INT32, BASE_DEC, NULL, 0,
8065 NULL, HFILL
8066 } },
8067 { &hf_osdmap_flags, {
8068 "Flags", "ceph.osdmap.flags",
8069 FT_UINT32, BASE_HEX, NULL, 0,
8070 NULL, HFILL
8071 } },
8072 { &hf_osdmap_osdmax, {
8073 "Highest OSD Number", "ceph.osdmap.osdmax",
8074 FT_INT32, BASE_DEC, NULL, 0,
8075 NULL, HFILL
8076 } },
8077 { &hf_osdmap_osd_state, {
8078 "OSD State", "ceph.osdmap.osd.state",
8079 FT_UINT8, BASE_HEX, NULL, 0,
8080 NULL, HFILL
8081 } },
8082 { &hf_osdmap_osd_weight, {
8083 "OSD Weight", "ceph.osdmap.osd.weight",
8084 FT_UINT32, BASE_DEC, NULL, 0,
8085 NULL, HFILL
8086 } },
8087 { &hf_osdmap_osd_addr, {
8088 "OSD Address", "ceph.osdmap.address",
8089 FT_NONE, BASE_NONE, NULL, 0,
8090 NULL, HFILL
8091 } },
8092 { &hf_osdmap_pgtmp, {
8093 "Temporary Placement Group Mapping", "ceph.osdmap.pgtmp",
8094 FT_NONE, BASE_NONE, NULL, 0,
8095 NULL, HFILL
8096 } },
8097 { &hf_osdmap_pgtmp_pg, {
8098 "Placement Group", "ceph.osdmap.pgtmp.pg",
8099 FT_NONE, BASE_NONE, NULL, 0,
8100 NULL, HFILL
8101 } },
8102 { &hf_osdmap_pgtmp_val, {
8103 "Value", "ceph.osdmap.pgtmp.val",
8104 FT_UINT32, BASE_DEC, NULL, 0,
8105 NULL, HFILL
8106 } },
8107 { &hf_osdmap_primarytmp, {
8108 "Temporary Primary Mapping", "ceph.osdmap.primarytmp",
8109 FT_NONE, BASE_NONE, NULL, 0,
8110 NULL, HFILL
8111 } },
8112 { &hf_osdmap_primarytmp_pg, {
8113 "Placement Group", "ceph.osdmap.primarytmp.pg",
8114 FT_NONE, BASE_NONE, NULL, 0,
8115 NULL, HFILL
8116 } },
8117 { &hf_osdmap_primarytmp_val, {
8118 "Value", "ceph.osdmap.primarytmp.val",
8119 FT_UINT32, BASE_DEC, NULL, 0,
8120 NULL, HFILL
8121 } },
8122 { &hf_osdmap_osd_primaryaffinity, {
8123 "Primary Affinity", "ceph.osdmap.osd.primaryaffinity",
8124 FT_UINT32, BASE_DEC, NULL, 0,
8125 NULL, HFILL
8126 } },
8127 { &hf_crush, {
8128 "CRUSH Rules", "ceph.crush",
8129 FT_NONE, BASE_NONE, NULL, 0,
8130 NULL, HFILL
8131 } },
8132 { &hf_osd_peerstat, {
8133 "Peer Stat", "ceph.osd.peerstat",
8134 FT_NONE, BASE_NONE, NULL, 0,
8135 NULL, HFILL
8136 } },
8137 { &hf_osd_peerstat_timestamp, {
8138 "Timestamp", "ceph.osd.peerstat.timestamp",
8139 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8140 NULL, HFILL
8141 } },
8142 { &hf_featureset_mask, {
8143 "Feature Mask", "ceph.featureset.mask",
8144 FT_UINT64, BASE_DEC, NULL, 0,
8145 NULL, HFILL
8146 } },
8147 { &hf_featureset_name, {
8148 "Name", "ceph.featureset.name",
8149 FT_NONE, BASE_NONE, NULL, 0,
8150 NULL, HFILL
8151 } },
8152 { &hf_featureset_name_val, {
8153 "Value", "ceph.featureset.name.val",
8154 FT_UINT64, BASE_DEC, NULL, 0,
8155 NULL, HFILL
8156 } },
8157 { &hf_featureset_name_name, {
8158 "Name", "ceph.featureset.name.name",
8159 FT_STRING, BASE_NONE, NULL, 0,
8160 NULL, HFILL
8161 } },
8162 { &hf_compatset, {
8163 "Compat Set", "ceph.compatset",
8164 FT_NONE, BASE_NONE, NULL, 0,
8165 NULL, HFILL
8166 } },
8167 { &hf_compatset_compat, {
8168 "Compatible", "ceph.compatset.compat",
8169 FT_NONE, BASE_NONE, NULL, 0,
8170 NULL, HFILL
8171 } },
8172 { &hf_compatset_compatro, {
8173 "Read-Only Compatible", "ceph.compatset.rocompat",
8174 FT_NONE, BASE_NONE, NULL, 0,
8175 NULL, HFILL
8176 } },
8177 { &hf_compatset_incompat, {
8178 "Incompatible", "ceph.compatset.incompat",
8179 FT_NONE, BASE_NONE, NULL, 0,
8180 NULL, HFILL
8181 } },
8182 { &hf_osdmap_erasurecodeprofile, {
8183 "Erasure Code Profile", "ceph.osdmap.erasurecodeprofile",
8184 FT_NONE, BASE_NONE, NULL, 0,
8185 NULL, HFILL
8186 } },
8187 { &hf_osdmap_erasurecodeprofile_name, {
8188 "Profile Name", "ceph.osdmap.erasurecodeprofile.name",
8189 FT_STRING, BASE_NONE, NULL, 0,
8190 NULL, HFILL
8191 } },
8192 { &hf_osdmap_erasurecodeprofile_prop, {
8193 "Property", "ceph.osdmap.erasurecodeprofile.prop",
8194 FT_NONE, BASE_NONE, NULL, 0,
8195 NULL, HFILL
8196 } },
8197 { &hf_osdmap_erasurecodeprofile_k, {
8198 "Key", "ceph.osdmap.erasurecodeprofile.key",
8199 FT_STRING, BASE_NONE, NULL, 0,
8200 NULL, HFILL
8201 } },
8202 { &hf_osdmap_erasurecodeprofile_v, {
8203 "Value", "ceph.osdmap.erasurecodeprofile.value",
8204 FT_STRING, BASE_NONE, NULL, 0,
8205 NULL, HFILL
8206 } },
8207 { &hf_osdmap_osd, {
8208 "OSD-Only Data", "ceph.osdmap.osd",
8209 FT_NONE, BASE_NONE, NULL, 0,
8210 NULL, HFILL
8211 } },
8212 { &hf_osdmap_hbaddr_back, {
8213 "Cluster-side Heartbeat Address", "ceph.osdmap.nbbackaddr",
8214 FT_NONE, BASE_NONE, NULL, 0,
8215 "The address checked to ensure the OSD is reachable by "
8216 "the cluster.", HFILL
8217 } },
8218 { &hf_osdmap_osd_info, {
8219 "OSD Info", "ceph.osdmap.osd.info",
8220 FT_NONE, BASE_NONE, NULL, 0,
8221 NULL, HFILL
8222 } },
8223 { &hf_osdmap_blacklist, {
8224 "Blacklist", "ceph.osdmap.blacklist",
8225 FT_NONE, BASE_NONE, NULL, 0,
8226 NULL, HFILL
8227 } },
8228 { &hf_osdmap_blacklist_addr, {
8229 "Address", "ceph.osdmap.blacklist.addr",
8230 FT_NONE, BASE_NONE, NULL, 0,
8231 NULL, HFILL
8232 } },
8233 { &hf_osdmap_blacklist_time, {
8234 "Time", "ceph.osdmap.blacklist.time",
8235 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8236 NULL, HFILL
8237 } },
8238 { &hf_osdmap_cluster_addr, {
8239 "Cluster Address", "ceph.osdmap.cluster.addr",
8240 FT_NONE, BASE_NONE, NULL, 0,
8241 NULL, HFILL
8242 } },
8243 { &hf_osdmap_cluster_snapepoch, {
8244 "Cluster Snapshot Epoch", "ceph.osdmap.cluster.snapepoch",
8245 FT_UINT32, BASE_DEC, NULL, 0,
8246 NULL, HFILL
8247 } },
8248 { &hf_osdmap_cluster_snap, {
8249 "Cluster Snapshot", "ceph.osdmap.cluster.snap",
8250 FT_STRING, BASE_NONE, NULL, 0,
8251 NULL, HFILL
8252 } },
8253 { &hf_osdmap_osd_uuid, {
8254 "OSD UUID", "ceph.osdmap.osd.uuid",
8255 FT_GUID, BASE_NONE, NULL, 0,
8256 NULL, HFILL
8257 } },
8258 { &hf_osdmap_osd_xinfo, {
8259 "OSD xinfo", "ceph.osdmap.osd.xinfo",
8260 FT_NONE, BASE_NONE, NULL, 0,
8261 NULL, HFILL
8262 } },
8263 { &hf_osdmap_hbaddr_front, {
8264 "Client-side Heartbeat Address", "ceph.osdmap.hbfrontaddr",
8265 FT_NONE, BASE_NONE, NULL, 0,
8266 "The address checked to ensure the OSD is reachable "
8267 "by the client.", HFILL
8268 } },
8269 { &hf_osdmap_inc, {
8270 "Incremental OSD Map", "ceph.osdmap_inc",
8271 FT_NONE, BASE_NONE, NULL, 0,
8272 NULL, HFILL
8273 } },
8274 { &hf_osdmap_inc_client, {
8275 "Client-Usable Data", "ceph.osdmap_inc.client",
8276 FT_NONE, BASE_NONE, NULL, 0,
8277 NULL, HFILL
8278 } },
8279 { &hf_osdmap_inc_fsid, {
8280 "FSID", "ceph.osdmap_inc.fsid",
8281 FT_GUID, BASE_NONE, NULL, 0,
8282 NULL, HFILL
8283 } },
8284 { &hf_osdmap_inc_osd, {
8285 "OSD-Only Data", "ceph.osdmap_inc.osd",
8286 FT_NONE, BASE_NONE, NULL, 0,
8287 NULL, HFILL
8288 } },
8289 { &hf_connect, {
8290 "Connection Negotiation", "ceph.connect",
8291 FT_NONE, BASE_NONE, NULL, 0,
8292 NULL, HFILL
8293 } },
8294 { &hf_features_low, {
8295 "Features", "ceph.connect.features.low",
8296 FT_UINT32, BASE_HEX, NULL, 0,
8297 NULL, HFILL
8298 } },
8299 { &hf_features_high, {
8300 "Features", "ceph.connect.features.high",
8301 FT_UINT32, BASE_HEX, NULL, 0,
8302 NULL, HFILL
8303 } },
8304 { &hf_feature_uid, {
8305 "UID", "ceph.features.uid",
8306 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_UID,
8307 NULL, HFILL
8308 } },
8309 { &hf_feature_nosrcaddr, {
8310 "NOSRCADDR", "ceph.features.nosrcaddr",
8311 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_NOSRCADDR,
8312 NULL, HFILL
8313 } },
8314 { &hf_feature_monclockcheck, {
8315 "MONCLOCKCHECK", "ceph.features.monclockcheck",
8316 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONCLOCKCHECK,
8317 NULL, HFILL
8318 } },
8319 { &hf_feature_flock, {
8320 "FLOCK", "ceph.features.flock",
8321 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_FLOCK,
8322 NULL, HFILL
8323 } },
8324 { &hf_feature_subscribe2, {
8325 "SUBSCRIBE2", "ceph.features.subscribe2",
8326 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_SUBSCRIBE2,
8327 NULL, HFILL
8328 } },
8329 { &hf_feature_monnames, {
8330 "MONNAMES", "ceph.features.monnames",
8331 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONNAMES,
8332 NULL, HFILL
8333 } },
8334 { &hf_feature_reconnect_seq, {
8335 "RECONNECT_SEQ", "ceph.features.reconnect_seq",
8336 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_RECONNECT_SEQ,
8337 NULL, HFILL
8338 } },
8339 { &hf_feature_dirlayouthash, {
8340 "DIRLAYOUTHASH", "ceph.features.dirlayouthash",
8341 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_DIRLAYOUTHASH,
8342 NULL, HFILL
8343 } },
8344 { &hf_feature_objectlocator, {
8345 "OBJECTLOCATOR", "ceph.features.objectlocator",
8346 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OBJECTLOCATOR,
8347 NULL, HFILL
8348 } },
8349 { &hf_feature_pgid64, {
8350 "PGID64", "ceph.features.pgid64",
8351 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_PGID64,
8352 NULL, HFILL
8353 } },
8354 { &hf_feature_incsubosdmap, {
8355 "INCSUBOSDMAP", "ceph.features.incsubosdmap",
8356 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_INCSUBOSDMAP,
8357 NULL, HFILL
8358 } },
8359 { &hf_feature_pgpool3, {
8360 "PGPOOL3", "ceph.features.pgpool3",
8361 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_PGPOOL3,
8362 NULL, HFILL
8363 } },
8364 { &hf_feature_osdreplymux, {
8365 "OSDREPLYMUX", "ceph.features.osdreplymux",
8366 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDREPLYMUX,
8367 NULL, HFILL
8368 } },
8369 { &hf_feature_osdenc, {
8370 "OSDENC", "ceph.features.osdenc",
8371 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDENC,
8372 NULL, HFILL
8373 } },
8374 { &hf_feature_omap, {
8375 "OMAP", "ceph.features.omap",
8376 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OMAP,
8377 NULL, HFILL
8378 } },
8379 { &hf_feature_monenc, {
8380 "MONENC", "ceph.features.monenc",
8381 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONENC,
8382 NULL, HFILL
8383 } },
8384 { &hf_feature_query_t, {
8385 "QUERY_T", "ceph.features.query_t",
8386 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_QUERY_T,
8387 NULL, HFILL
8388 } },
8389 { &hf_feature_indep_pg_map, {
8390 "INDEP_PG_MAP", "ceph.features.indep_pg_map",
8391 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_INDEP_PG_MAP,
8392 NULL, HFILL
8393 } },
8394 { &hf_feature_crush_tunables, {
8395 "CRUSH_TUNABLES", "ceph.features.crush_tunables",
8396 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES,
8397 NULL, HFILL
8398 } },
8399 { &hf_feature_chunky_scrub, {
8400 "CHUNKY_SCRUB", "ceph.features.chunky_scrub",
8401 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CHUNKY_SCRUB,
8402 NULL, HFILL
8403 } },
8404 { &hf_feature_mon_nullroute, {
8405 "MON_NULLROUTE", "ceph.features.mon_nullroute",
8406 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_NULLROUTE,
8407 NULL, HFILL
8408 } },
8409 { &hf_feature_mon_gv, {
8410 "MON_GV", "ceph.features.mon_gv",
8411 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_GV,
8412 NULL, HFILL
8413 } },
8414 { &hf_feature_backfill_reservation, {
8415 "BACKFILL_RESERVATION", "ceph.features.backfill_reservation",
8416 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_BACKFILL_RESERVATION,
8417 NULL, HFILL
8418 } },
8419 { &hf_feature_msg_auth, {
8420 "MSG_AUTH", "ceph.features.msg_auth",
8421 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MSG_AUTH,
8422 NULL, HFILL
8423 } },
8424 { &hf_feature_recovery_reservation, {
8425 "RECOVERY_RESERVATION", "ceph.features.recovery_reservation",
8426 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_RECOVERY_RESERVATION,
8427 NULL, HFILL
8428 } },
8429 { &hf_feature_crush_tunables2, {
8430 "CRUSH_TUNABLES2", "ceph.features.crush_tunables2",
8431 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES2,
8432 NULL, HFILL
8433 } },
8434 { &hf_feature_createpoolid, {
8435 "CREATEPOOLID", "ceph.features.createpoolid",
8436 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CREATEPOOLID,
8437 NULL, HFILL
8438 } },
8439 { &hf_feature_reply_create_inode, {
8440 "REPLY_CREATE_INODE", "ceph.features.reply_create_inode",
8441 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_REPLY_CREATE_INODE,
8442 NULL, HFILL
8443 } },
8444 { &hf_feature_osd_hbmsgs, {
8445 "OSD_HBMSGS", "ceph.features.osd_hbmsgs",
8446 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_HBMSGS,
8447 NULL, HFILL
8448 } },
8449 { &hf_feature_mdsenc, {
8450 "MDSENC", "ceph.features.mdsenc",
8451 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MDSENC,
8452 NULL, HFILL
8453 } },
8454 { &hf_feature_osdhashpspool, {
8455 "OSDHASHPSPOOL", "ceph.features.osdhashpspool",
8456 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDHASHPSPOOL,
8457 NULL, HFILL
8458 } },
8459 { &hf_feature_mon_single_paxos, {
8460 "MON_SINGLE_PAXOS", "ceph.features.mon_single_paxos",
8461 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_SINGLE_PAXOS,
8462 NULL, HFILL
8463 } },
8464 { &hf_feature_osd_snapmapper, {
8465 "OSD_SNAPMAPPER", "ceph.features.osd_snapmapper",
8466 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_SNAPMAPPER,
8467 NULL, HFILL
8468 } },
8469 { &hf_feature_mon_scrub, {
8470 "MON_SCRUB", "ceph.features.mon_scrub",
8471 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_SCRUB,
8472 NULL, HFILL
8473 } },
8474 { &hf_feature_osd_packed_recovery, {
8475 "OSD_PACKED_RECOVERY", "ceph.features.osd_packed_recovery",
8476 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_PACKED_RECOVERY,
8477 NULL, HFILL
8478 } },
8479 { &hf_feature_osd_cachepool, {
8480 "OSD_CACHEPOOL", "ceph.features.osd_cachepool",
8481 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_CACHEPOOL,
8482 NULL, HFILL
8483 } },
8484 { &hf_feature_crush_v2, {
8485 "CRUSH_V2", "ceph.features.crush_v2",
8486 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_V2,
8487 NULL, HFILL
8488 } },
8489 { &hf_feature_export_peer, {
8490 "EXPORT_PEER", "ceph.features.export_peer",
8491 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_EXPORT_PEER,
8492 NULL, HFILL
8493 } },
8494 { &hf_feature_osd_erasure_codes, {
8495 "OSD_ERASURE_CODES", "ceph.features.osd_erasure_codes",
8496 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_ERASURE_CODES,
8497 NULL, HFILL
8498 } },
8499 { &hf_feature_osd_tmap2omap, {
8500 "OSD_TMAP2OMAP", "ceph.features.osd_tmap2omap",
8501 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_TMAP2OMAP,
8502 NULL, HFILL
8503 } },
8504 { &hf_feature_osdmap_enc, {
8505 "OSDMAP_ENC", "ceph.features.osdmap_enc",
8506 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDMAP_ENC,
8507 NULL, HFILL
8508 } },
8509 { &hf_feature_mds_inline_data, {
8510 "MDS_INLINE_DATA", "ceph.features.mds_inline_data",
8511 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MDS_INLINE_DATA,
8512 NULL, HFILL
8513 } },
8514 { &hf_feature_crush_tunables3, {
8515 "CRUSH_TUNABLES3", "ceph.features.crush_tunables3",
8516 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES3,
8517 NULL, HFILL
8518 } },
8519 { &hf_feature_osd_primary_affinity, {
8520 "OSD_PRIMARY_AFFINITY", "ceph.features.osd_primary_affinity",
8521 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_PRIMARY_AFFINITY,
8522 NULL, HFILL
8523 } },
8524 { &hf_feature_msgr_keepalive2, {
8525 "MSGR_KEEPALIVE2", "ceph.features.msgr_keepalive2",
8526 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MSGR_KEEPALIVE2,
8527 NULL, HFILL
8528 } },
8529 { &hf_feature_reserved, {
8530 "RESERVED", "ceph.features.reserved",
8531 FT_BOOLEAN, 32, TFS(&tfs_set_notset), C_FEATURE_RESERVED,
8532 NULL, HFILL
8533 } },
8534 { &hf_connect_host_type, {
8535 "Host Type", "ceph.connect.host",
8536 FT_UINT32, BASE_HEX, VALS(c_node_type_strings), 0,
8537 "The type of host.", HFILL
8538 } },
8539 { &hf_connect_seq_global, {
8540 "Global Sequence Number", "ceph.connect.global_seq",
8541 FT_UINT32, BASE_DEC, NULL, 0,
8542 "The number of connections initiated by this host.", HFILL
8543 } },
8544 { &hf_connect_seq, {
8545 "Sequence Number", "ceph.connect.seq",
8546 FT_UINT32, BASE_DEC, NULL, 0,
8547 "The number of connections initiated this session.", HFILL
8548 } },
8549 { &hf_connect_proto_ver, {
8550 "Protocol Version", "ceph.connect.ver",
8551 FT_UINT32, BASE_DEC, NULL, 0,
8552 "The protocol version to use.", HFILL
8553 } },
8554 { &hf_connect_auth_proto, {
8555 "Authentication Protocol", "ceph.connect.auth.proto",
8556 FT_UINT32, BASE_DEC, NULL, 0,
8557 "The authentication protocol to use.", HFILL
8558 } },
8559 { &hf_connect_auth_size, {
8560 "Authentication Size", "ceph.connect.auth.size",
8561 FT_UINT32, BASE_DEC, NULL, 0,
8562 "The size of the authentication.", HFILL
8563 } },
8564 { &hf_connect_auth, {
8565 "Authentication", "ceph.connect.auth",
8566 FT_BYTES, BASE_NONE, NULL, 0,
8567 "Authentication data.", HFILL
8568 } },
8569 { &hf_flags, {
8570 "Flags", "ceph.connect.flags",
8571 FT_UINT8, BASE_HEX, NULL, 0,
8572 NULL, HFILL
8573 } },
8574 { &hf_flag_lossy, {
8575 "Lossy", "ceph.flags.lossy",
8576 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), C_FLAG_LOSSY,
8577 "Messages may be safely dropped.", HFILL
8578 } },
8579 { &hf_osd_flags, {
8580 "OSD Flags", "ceph.osd_flags",
8581 FT_UINT32, BASE_HEX, NULL, 0,
8582 NULL, HFILL
8583 } },
8584 { &hf_osd_flag_ack, {
8585 "ACK", "ceph.osd_flags.ack",
8586 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ACK,
8587 "want (or is) \"ack\" ack", HFILL
8588 } },
8589 { &hf_osd_flag_onnvram, {
8590 "ACK on NVRAM", "ceph.osd_flags.onnvram",
8591 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ONNVRAM,
8592 "want (or is) \"onnvram\" ack", HFILL
8593 } },
8594 { &hf_osd_flag_ondisk, {
8595 "ACK on DISK", "ceph.osd_flags.ondisk",
8596 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ONDISK,
8597 "want (or is) \"ondisk\" ack", HFILL
8598 } },
8599 { &hf_osd_flag_retry, {
8600 "Retry", "ceph.osd_flags.retry",
8601 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_RETRY,
8602 "resend attempt", HFILL
8603 } },
8604 { &hf_osd_flag_read, {
8605 "Read", "ceph.osd_flags.read",
8606 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_READ,
8607 "op may read", HFILL
8608 } },
8609 { &hf_osd_flag_write, {
8610 "Write", "ceph.osd_flags.write",
8611 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_WRITE,
8612 "op may write", HFILL
8613 } },
8614 { &hf_osd_flag_ordersnap, {
8615 "ORDERSNAP", "ceph.osd_flags.ordersnap",
8616 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ORDERSNAP,
8617 "EOLDSNAP if snapc is out of order", HFILL
8618 } },
8619 { &hf_osd_flag_peerstat_old, {
8620 "PEERSTAT_OLD", "ceph.osd_flags.peerstat_old",
8621 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PEERSTAT_OLD,
8622 "DEPRECATED msg includes osd_peer_stat", HFILL
8623 } },
8624 { &hf_osd_flag_balance_reads, {
8625 "BALANCE_READS", "ceph.osd_flags.balance_reads",
8626 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_BALANCE_READS,
8627 NULL, HFILL
8628 } },
8629 { &hf_osd_flag_parallelexec, {
8630 "PARALLELEXEC", "ceph.osd_flags.parallelexec",
8631 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PARALLELEXEC,
8632 "execute op in parallel", HFILL
8633 } },
8634 { &hf_osd_flag_pgop, {
8635 "PGOP", "ceph.osd_flags.pgop",
8636 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PGOP,
8637 "pg op, no object", HFILL
8638 } },
8639 { &hf_osd_flag_exec, {
8640 "EXEC", "ceph.osd_flags.exec",
8641 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_EXEC,
8642 "op may exec", HFILL
8643 } },
8644 { &hf_osd_flag_exec_public, {
8645 "EXEC_PUBLIC", "ceph.osd_flags.exec_public",
8646 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_EXEC_PUBLIC,
8647 "DEPRECATED op may exec (public)", HFILL
8648 } },
8649 { &hf_osd_flag_localize_reads, {
8650 "LOCALIZE_READS", "ceph.osd_flags.localize_reads",
8651 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_LOCALIZE_READS,
8652 "read from nearby replica, if any", HFILL
8653 } },
8654 { &hf_osd_flag_rwordered, {
8655 "RWORDERED", "ceph.osd_flags.rwordered",
8656 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_RWORDERED,
8657 "order wrt concurrent reads", HFILL
8658 } },
8659 { &hf_osd_flag_ignore_cache, {
8660 "IGNORE_CACHE", "ceph.osd_flags.ignore_cache",
8661 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_IGNORE_CACHE,
8662 "ignore cache logic", HFILL
8663 } },
8664 { &hf_osd_flag_skiprwlocks, {
8665 "SKIPRWLOCKS", "ceph.osd_flags.skiprwlocks",
8666 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_SKIPRWLOCKS,
8667 "skip rw locks", HFILL
8668 } },
8669 { &hf_osd_flag_ignore_overlay, {
8670 "IGNORE_OVERLAY", "ceph.osd_flags.ignore_overlay",
8671 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_IGNORE_OVERLAY,
8672 "ignore pool overlay", HFILL
8673 } },
8674 { &hf_osd_flag_flush, {
8675 "FLUSH", "ceph.osd_flags.flush",
8676 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_FLUSH,
8677 "this is part of flush", HFILL
8678 } },
8679 { &hf_osd_flag_map_snap_clone, {
8680 "MAP_SNAP_CLONE", "ceph.osd_flags.map_snap_clone",
8681 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_MAP_SNAP_CLONE,
8682 "map snap direct to clone id", HFILL
8683 } },
8684 { &hf_osd_flag_enforce_snapc, {
8685 "ENFORCE_SNAPC", "ceph.osd_flags.enforce_snapc",
8686 FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ENFORCE_SNAPC,
8687 "use snapc provided even if pool uses pool snaps", HFILL
8688 } },
8689 { &hf_osd_op_type, {
8690 "Operation", "ceph.osd_op.op",
8691 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &c_osd_optype_strings_ext, 0,
8692 NULL, HFILL
8693 } },
8694 { &hf_osd_op_data, {
8695 "Operation Specific Data", "ceph.osd_op.data",
8696 FT_BYTES, BASE_NONE, NULL, 0,
8697 NULL, HFILL
8698 } },
8699 { &hf_osd_op_extent_off, {
8700 "Offset", "ceph.osd_op.extent.offset",
8701 FT_UINT64, BASE_DEC, NULL, 0,
8702 NULL, HFILL
8703 } },
8704 { &hf_osd_op_extent_size, {
8705 "Size", "ceph.osd_op.extent.size",
8706 FT_UINT64, BASE_DEC, NULL, 0,
8707 NULL, HFILL
8708 } },
8709 { &hf_osd_op_extent_trunc_size, {
8710 "Truncate Size", "ceph.osd_op.extent.trunc_size",
8711 FT_UINT64, BASE_DEC, NULL, 0,
8712 NULL, HFILL
8713 } },
8714 { &hf_osd_op_extent_trunc_seq, {
8715 "Truncate Sequence", "ceph.osd_op.extent.trunc_seq",
8716 FT_UINT64, BASE_DEC, NULL, 0,
8717 NULL, HFILL
8718 } },
8719 { &hf_osd_op_payload_size, {
8720 "Payload Size", "ceph.osd_op.payload_size",
8721 FT_UINT32, BASE_DEC, NULL, 0,
8722 NULL, HFILL
8723 } },
8724 { &hf_osd_redirect_oloc, {
8725 "Object Locater", "ceph.osd_redirect.oloc",
8726 FT_NONE, BASE_NONE, NULL, 0,
8727 NULL, HFILL
8728 } },
8729 { &hf_osd_redirect_obj, {
8730 "Object Name", "ceph.osd_redirect.obj",
8731 FT_BYTES, BASE_NONE, NULL, 0,
8732 "Redirect to this object.", HFILL
8733 } },
8734 { &hf_osd_redirect_osdinstr, {
8735 "OSD Instructions", "ceph.osd_redirect.osd_instructions",
8736 FT_NONE, BASE_NONE, NULL, 0,
8737 "Instructions to pass to the new target.", HFILL
8738 } },
8739 { &hf_osd_redirect_osdinstr_data, {
8740 "Data", "ceph.osd_redirect.osd_instructions_data",
8741 FT_BYTES, BASE_NONE, NULL, 0,
8742 NULL, HFILL
8743 } },
8744 { &hf_osd_redirect_osdinstr_len, {
8745 "Length", "ceph.osd_redirect.osd_instructions_len",
8746 FT_UINT32, BASE_DEC, NULL, 0,
8747 NULL, HFILL
8748 } },
8749 { &hf_statsum_bytes, {
8750 "Bytes", "ceph.statsum.bytes",
8751 FT_UINT64, BASE_DEC, NULL, 0,
8752 "The space used in bytes.", HFILL
8753 } },
8754 { &hf_statsum_objects, {
8755 "Objects", "ceph.statsum.objects",
8756 FT_UINT64, BASE_DEC, NULL, 0,
8757 "The number of logical objects.", HFILL
8758 } },
8759 { &hf_statsum_clones, {
8760 "Clones", "ceph.statsum.clones",
8761 FT_UINT64, BASE_DEC, NULL, 0,
8762 NULL, HFILL
8763 } },
8764 { &hf_statsum_copies, {
8765 "Copies", "ceph.statsum.copies",
8766 FT_UINT64, BASE_DEC, NULL, 0,
8767 "The total number of objects including redundant "
8768 "copies (objects*replicas).", HFILL
8769 } },
8770 { &hf_statsum_missing, {
8771 "Missing Objects", "ceph.statsum.missing",
8772 FT_UINT64, BASE_DEC, NULL, 0,
8773 NULL, HFILL
8774 } },
8775 { &hf_statsum_degraded, {
8776 "Degraded Objects", "ceph.statsum.degraded",
8777 FT_UINT64, BASE_DEC, NULL, 0,
8778 "Number of objects that are on at least one OSD but "
8779 "less then they should be.", HFILL
8780 } },
8781 { &hf_statsum_unfound, {
8782 "Unfound Objects", "ceph.statsum.unfound",
8783 FT_UINT64, BASE_DEC, NULL, 0,
8784 "Number of objects with no copies.", HFILL
8785 } },
8786 { &hf_statsum_read_bytes, {
8787 "Bytes Read", "ceph.statsum.read_bytes",
8788 FT_UINT64, BASE_DEC, NULL, 0,
8789 NULL, HFILL
8790 } },
8791 { &hf_statsum_read_kbytes, {
8792 "Kibibytes Read", "ceph.statsum.read_kbytes",
8793 FT_UINT64, BASE_DEC, NULL, 0,
8794 "The number of KiB (2^10) read.", HFILL
8795 } },
8796 { &hf_statsum_written_bytes, {
8797 "Bytes Written", "ceph.statsum.written_bytes",
8798 FT_UINT64, BASE_DEC, NULL, 0,
8799 NULL, HFILL
8800 } },
8801 { &hf_statsum_written_kbytes, {
8802 "Kibibytes Written", "ceph.statsum.written_kbytes",
8803 FT_UINT64, BASE_DEC, NULL, 0,
8804 "The number of KiB (2^10) written.", HFILL
8805 } },
8806 { &hf_statsum_scrub_errors, {
8807 "Scrub Errors", "ceph.statsum.scrub_errors",
8808 FT_UINT64, BASE_DEC, NULL, 0,
8809 "Total scrub errors. (shallow+deep)", HFILL
8810 } },
8811 { &hf_statsum_recovered, {
8812 "Recovered Objects", "ceph.statsum.recovered",
8813 FT_UINT64, BASE_DEC, NULL, 0,
8814 NULL, HFILL
8815 } },
8816 { &hf_statsum_bytes_recovered, {
8817 "Recovered Bytes", "ceph.statsum.bytes_recovered",
8818 FT_UINT64, BASE_DEC, NULL, 0,
8819 NULL, HFILL
8820 } },
8821 { &hf_statsum_keys_recovered, {
8822 "Keys Recovered", "ceph.statsum.keys_recovered",
8823 FT_UINT64, BASE_DEC, NULL, 0,
8824 NULL, HFILL
8825 } },
8826 { &hf_statsum_shallow_scrub_errors, {
8827 "Shallow Scrub Errors", "ceph.statsum.shallow_scrub_errors",
8828 FT_UINT64, BASE_DEC, NULL, 0,
8829 NULL, HFILL
8830 } },
8831 { &hf_statsum_deep_scrub_errors, {
8832 "Deep Scrub Errors", "ceph.statsum.deep_scrub_errors",
8833 FT_UINT64, BASE_DEC, NULL, 0,
8834 NULL, HFILL
8835 } },
8836 { &hf_statsum_dirty, {
8837 "Dirty Objects", "ceph.statsum.dirty",
8838 FT_UINT64, BASE_DEC, NULL, 0,
8839 NULL, HFILL
8840 } },
8841 { &hf_statsum_whiteouts, {
8842 "Whiteouts", "ceph.statsum.whiteouts",
8843 FT_UINT64, BASE_DEC, NULL, 0,
8844 NULL, HFILL
8845 } },
8846 { &hf_statsum_omap, {
8847 "OMAP Objects", "ceph.statsum.omap",
8848 FT_UINT64, BASE_DEC, NULL, 0,
8849 NULL, HFILL
8850 } },
8851 { &hf_statsum_hitset_archive, {
8852 "Hit Set Archive", "ceph.statsum.hitset_archive",
8853 FT_UINT64, BASE_DEC, NULL, 0,
8854 NULL, HFILL
8855 } },
8856 { &hf_connect_reply, {
8857 "Connection Negotiation Reply", "ceph.connect_reply",
8858 FT_NONE, BASE_NONE, NULL, 0,
8859 NULL, HFILL
8860 } },
8861 { &hf_tag, {
8862 "Tag", "ceph.tag",
8863 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_tag_strings_ext, 0,
8864 NULL, HFILL
8865 } },
8866 { &hf_ack, {
8867 "Acknowledgment", "ceph.ack",
8868 FT_UINT64, BASE_DEC, NULL, 0,
8869 NULL, HFILL
8870 } },
8871 { &hf_seq_existing, {
8872 "Existing Sequence Number", "ceph.seq_existing",
8873 FT_UINT64, BASE_DEC, NULL, 0,
8874 NULL, HFILL
8875 } },
8876 { &hf_seq_new, {
8877 "Newly Acknowledged Sequence Number", "ceph.seq_new",
8878 FT_UINT64, BASE_DEC, NULL, 0,
8879 NULL, HFILL
8880 } },
8881 { &hf_head, {
8882 "Message Header", "ceph.head",
8883 FT_NONE, BASE_NONE, NULL, 0,
8884 NULL, HFILL
8885 } },
8886 { &hf_head_seq, {
8887 "Sequence Number", "ceph.seq",
8888 FT_UINT64, BASE_DEC, NULL, 0,
8889 NULL, HFILL
8890 } },
8891 { &hf_head_tid, {
8892 "Transaction ID", "ceph.tid",
8893 FT_UINT64, BASE_DEC, NULL, 0,
8894 NULL, HFILL
8895 } },
8896 { &hf_head_type, {
8897 "Type", "ceph.type",
8898 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &c_msg_type_strings_ext, 0,
8899 "Message type.", HFILL
8900 } },
8901 { &hf_head_priority, {
8902 "Priority", "ceph.priority",
8903 FT_UINT16, BASE_DEC, NULL, 0,
8904 "The priority of this message, higher the more urgent.", HFILL
8905 } },
8906 { &hf_head_version, {
8907 "Version", "ceph.head_version",
8908 FT_UINT16, BASE_DEC, NULL, 0,
8909 NULL, HFILL
8910 } },
8911 { &hf_head_front_size, {
8912 "Front Size", "ceph.front_size",
8913 FT_UINT32, BASE_DEC, NULL, 0,
8914 NULL, HFILL
8915 } },
8916 { &hf_head_middle_size, {
8917 "Middle Size", "ceph.middle_size",
8918 FT_UINT32, BASE_DEC, NULL, 0,
8919 NULL, HFILL
8920 } },
8921 { &hf_head_data_size, {
8922 "Data Size", "ceph.data_size",
8923 FT_UINT32, BASE_DEC, NULL, 0,
8924 NULL, HFILL
8925 } },
8926 { &hf_head_data_off, {
8927 "Data Offset", "ceph.data_off",
8928 FT_UINT16, BASE_DEC, NULL, 0,
8929 NULL, HFILL
8930 } },
8931 { &hf_head_srcname, {
8932 "Source Name", "ceph.node",
8933 FT_NONE, BASE_NONE, NULL, 0,
8934 NULL, HFILL
8935 } },
8936 { &hf_head_compat_version, {
8937 "Compatibility Version", "ceph.compat_version",
8938 FT_UINT64, BASE_DEC, NULL, 0,
8939 "The oldest code that can probably decode this message.", HFILL
8940 } },
8941 { &hf_head_reserved, {
8942 "Reserved", "ceph.reserved",
8943 FT_UINT16, BASE_HEX, NULL, 0,
8944 NULL, HFILL
8945 } },
8946 { &hf_head_crc, {
8947 "CRC Checksum", "ceph.crc",
8948 FT_UINT32, BASE_HEX, NULL, 0,
8949 NULL, HFILL
8950 } },
8951 { &hf_foot, {
8952 "Message Footer", "ceph.foot",
8953 FT_NONE, BASE_NONE, NULL, 0,
8954 NULL, HFILL
8955 } },
8956 { &hf_foot_front_crc, {
8957 "Front Checksum", "ceph.foot.front_crc",
8958 FT_UINT32, BASE_HEX, NULL, 0,
8959 NULL, HFILL
8960 } },
8961 { &hf_foot_middle_crc, {
8962 "Middle Checksum", "ceph.foot.middle_crc",
8963 FT_UINT32, BASE_HEX, NULL, 0,
8964 NULL, HFILL
8965 } },
8966 { &hf_foot_data_crc, {
8967 "Data Checksum", "ceph.foot.data_crc",
8968 FT_UINT32, BASE_HEX, NULL, 0,
8969 NULL, HFILL
8970 } },
8971 { &hf_foot_signature, {
8972 "Signature", "ceph.foot.signature",
8973 FT_UINT64, BASE_HEX, NULL, 0,
8974 NULL, HFILL
8975 } },
8976 { &hf_msg_front, {
8977 "Front", "ceph.front",
8978 FT_BYTES, BASE_NONE, NULL, 0,
8979 NULL, HFILL
8980 } },
8981 { &hf_msg_middle, {
8982 "Middle", "ceph.mid",
8983 FT_BYTES, BASE_NONE, NULL, 0,
8984 NULL, HFILL
8985 } },
8986 { &hf_msg_data, {
8987 "Data", "ceph.data",
8988 FT_BYTES, BASE_NONE, NULL, 0,
8989 NULL, HFILL
8990 } },
8991 { &hf_statcollection, {
8992 "Stats", "ceph.statcollection",
8993 FT_NONE, BASE_NONE, NULL, 0,
8994 NULL, HFILL
8995 } },
8996 { &hf_paxos, {
8997 "Paxos Message", "ceph.paxos",
8998 FT_NONE, BASE_NONE, NULL, 0,
8999 NULL, HFILL
9000 } },
9001 { &hf_paxos_ver, {
9002 "Paxos Version", "ceph.paxos.ver",
9003 FT_UINT64, BASE_DEC, NULL, 0,
9004 NULL, HFILL
9005 } },
9006 { &hf_paxos_mon, {
9007 "Mon", "ceph.paxos.mon",
9008 FT_INT16, BASE_DEC, NULL, 0,
9009 NULL, HFILL
9010 } },
9011 { &hf_paxos_mon_tid, {
9012 "Mon Transaction ID", "ceph.paxos.tid",
9013 FT_UINT64, BASE_DEC, NULL, 0,
9014 NULL, HFILL
9015 } },
9016 { &hf_msg_mon_map, {
9017 "Mon Map Message", "ceph.msg.mon_map",
9018 FT_NONE, BASE_NONE, NULL, 0,
9019 NULL, HFILL
9020 } },
9021 { &hf_msg_statfs, {
9022 "Stat Filesystem", "ceph.msg.statfs",
9023 FT_NONE, BASE_NONE, NULL, 0,
9024 NULL, HFILL
9025 } },
9026 { &hf_msg_statfs_fsid, {
9027 "FSID", "ceph.msg.statfs.fsid",
9028 FT_GUID, BASE_NONE, NULL, 0,
9029 NULL, HFILL
9030 } },
9031 { &hf_msg_statfsreply, {
9032 "Stat Filesystem Reply", "ceph.msg.statfsreply",
9033 FT_NONE, BASE_NONE, NULL, 0,
9034 NULL, HFILL
9035 } },
9036 { &hf_msg_statfsreply_fsid, {
9037 "FSID", "ceph.msg.statfsreply.fsid",
9038 FT_GUID, BASE_NONE, NULL, 0,
9039 NULL, HFILL
9040 } },
9041 { &hf_msg_statfsreply_ver, {
9042 "Version", "ceph.msg.statfsreply.ver",
9043 FT_UINT64, BASE_DEC, NULL, 0,
9044 NULL, HFILL
9045 } },
9046 { &hf_msg_statfsreply_kb, {
9047 "Kibibytes", "ceph.msg.statfsreply.kb",
9048 FT_UINT64, BASE_DEC, NULL, 0,
9049 NULL, HFILL
9050 } },
9051 { &hf_msg_statfsreply_kbused, {
9052 "Kibibytes Used", "ceph.msg.statfsreply.kbused",
9053 FT_UINT64, BASE_DEC, NULL, 0,
9054 NULL, HFILL
9055 } },
9056 { &hf_msg_statfsreply_kbavail, {
9057 "Kibibytes Available", "ceph.msg.statfsreply.kbavail",
9058 FT_UINT64, BASE_DEC, NULL, 0,
9059 NULL, HFILL
9060 } },
9061 { &hf_msg_statfsreply_obj, {
9062 "Number of Objects", "ceph.msg.statfsreply.obj",
9063 FT_UINT64, BASE_DEC, NULL, 0,
9064 NULL, HFILL
9065 } },
9066 { &hf_msg_mon_sub, {
9067 "Mon Subscribe Message", "ceph.msg.mon_sub",
9068 FT_NONE, BASE_NONE, NULL, 0,
9069 NULL, HFILL
9070 } },
9071 { &hf_msg_mon_sub_item, {
9072 "Subscription Item", "ceph.msg.mon_sub.item",
9073 FT_NONE, BASE_NONE, NULL, 0,
9074 NULL, HFILL
9075 } },
9076 { &hf_msg_mon_sub_item_len, {
9077 "Number of items", "ceph.msg.mon_sub.item_len",
9078 FT_UINT32, BASE_DEC, NULL, 0,
9079 NULL, HFILL
9080 } },
9081 { &hf_msg_mon_sub_what, {
9082 "What", "ceph.msg.mon_sub.what",
9083 FT_STRING, BASE_NONE, NULL, 0,
9084 "What to subscribe to.", HFILL
9085 } },
9086 { &hf_msg_mon_sub_start, {
9087 "Start Time", "ceph.msg.mon_sub.start",
9088 FT_UINT64, BASE_DEC, NULL, 0,
9089 NULL, HFILL
9090 } },
9091 { &hf_msg_mon_sub_flags, {
9092 "Flags", "ceph.msg.mon_sub.flags",
9093 FT_UINT8, BASE_HEX, NULL, 0,
9094 NULL, HFILL
9095 } },
9096 { &hf_msg_mon_sub_flags_onetime, {
9097 "One Time", "ceph.msg.mon_sub.flags.onetime",
9098 FT_BOOLEAN, 8, TFS(&tfs_yes_no), C_MON_SUB_FLAG_ONETIME,
9099 NULL, HFILL
9100 } },
9101 { &hf_msg_mon_sub_ack, {
9102 "Subscription Acknowledgment", "ceph.msg.mon_sub_ack",
9103 FT_NONE, BASE_NONE, NULL, 0,
9104 NULL, HFILL
9105 } },
9106 { &hf_msg_mon_sub_ack_interval, {
9107 "Interval", "ceph.msg.mon_sub_ack.interval",
9108 FT_UINT32, BASE_DEC, NULL, 0,
9109 NULL, HFILL
9110 } },
9111 { &hf_msg_mon_sub_ack_fsid, {
9112 "FSID", "ceph.msg.mon_sub_ack.fsid",
9113 FT_GUID, BASE_NONE, NULL, 0,
9114 NULL, HFILL
9115 } },
9116 { &hf_msg_auth, {
9117 "Auth Message", "ceph.msg.auth",
9118 FT_NONE, BASE_NONE, NULL, 0,
9119 NULL, HFILL
9120 } },
9121 { &hf_msg_auth_proto, {
9122 "Protocol", "ceph.msg.auth.proto",
9123 FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9124 NULL, HFILL
9125 } },
9126 { &hf_msg_auth_supportedproto, {
9127 "Supported Protocols", "ceph.msg.auth.supportedproto",
9128 FT_NONE, BASE_NONE, NULL, 0,
9129 NULL, HFILL
9130 } },
9131 { &hf_msg_auth_supportedproto_ver, {
9132 "Encoding Version", "ceph.msg.auth.supportedproto.ver",
9133 FT_UINT8, BASE_DEC, NULL, 0,
9134 NULL, HFILL
9135 } },
9136 { &hf_msg_auth_supportedproto_proto, {
9137 "Supported Protocol", "ceph.msg.auth.supportedproto.proto",
9138 FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9139 NULL, HFILL
9140 } },
9141 { &hf_msg_auth_supportedproto_gid, {
9142 "Global ID", "ceph.msg.auth.supportedproto.gid",
9143 FT_UINT64, BASE_HEX, NULL, 0,
9144 NULL, HFILL
9145 } },
9146 { &hf_msg_auth_cephx, {
9147 "CephX", "ceph.msg.auth.cephx",
9148 FT_NONE, BASE_NONE, NULL, 0,
9149 NULL, HFILL
9150 } },
9151 { &hf_msg_auth_cephx_req_type, {
9152 "Type", "ceph.msg.auth.cephx.req.type",
9153 FT_UINT16, BASE_HEX, VALS(c_cephx_req_type_strings), 0,
9154 NULL, HFILL
9155 } },
9156 { &hf_msg_auth_monmap_epoch, {
9157 "Monmap epoch", "ceph.msg.auth.monmap_epoch",
9158 FT_UINT32, BASE_DEC, NULL, 0,
9159 NULL, HFILL
9160 } },
9161 { &hf_msg_auth_reply, {
9162 "Auth Reply Message", "ceph.msg.auth_reply",
9163 FT_NONE, BASE_NONE, NULL, 0,
9164 NULL, HFILL
9165 } },
9166 { &hf_msg_auth_reply_proto, {
9167 "Protocol", "ceph.msg.auth_reply.proto",
9168 FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9169 NULL, HFILL
9170 } },
9171 { &hf_msg_auth_reply_result, {
9172 "Result", "ceph.msg.auth_reply.result",
9173 FT_INT32, BASE_DEC, NULL, 0,
9174 NULL, HFILL
9175 } },
9176 { &hf_msg_auth_reply_global_id, {
9177 "Global ID", "ceph.msg.auth_reply.id",
9178 FT_UINT64, BASE_HEX, NULL, 0,
9179 NULL, HFILL
9180 } },
9181 { &hf_msg_auth_reply_msg, {
9182 "Message", "ceph.msg.auth_reply.msg",
9183 FT_STRING, BASE_NONE, NULL, 0,
9184 NULL, HFILL
9185 } },
9186 { &hf_msg_mon_getversion, {
9187 "Get Version", "ceph.msg.mon.getversion",
9188 FT_NONE, BASE_NONE, NULL, 0,
9189 NULL, HFILL
9190 } },
9191 { &hf_msg_mon_getversion_tid, {
9192 "Transaction ID", "ceph.msg.mon.getversion.tid",
9193 FT_UINT64, BASE_DEC, NULL, 0,
9194 NULL, HFILL
9195 } },
9196 { &hf_msg_mon_getversion_what, {
9197 "What", "ceph.msg.mon.getversion.what",
9198 FT_STRING, BASE_NONE, NULL, 0,
9199 NULL, HFILL
9200 } },
9201 { &hf_msg_mon_getversionreply, {
9202 "Get Version Reply", "ceph.msg.mon.getversionreply",
9203 FT_NONE, BASE_NONE, NULL, 0,
9204 NULL, HFILL
9205 } },
9206 { &hf_msg_mon_getversionreply_tid, {
9207 "Transaction ID", "ceph.msg.mon.getversionreply.tid",
9208 FT_UINT64, BASE_DEC, NULL, 0,
9209 NULL, HFILL
9210 } },
9211 { &hf_msg_mon_getversionreply_ver, {
9212 "Version", "ceph.msg.mon.getversionreply.ver",
9213 FT_UINT64, BASE_DEC, NULL, 0,
9214 NULL, HFILL
9215 } },
9216 { &hf_msg_mon_getversionreply_veroldest, {
9217 "Oldest Version", "ceph.msg.mon.getversionreply.veroldest",
9218 FT_UINT64, BASE_DEC, NULL, 0,
9219 NULL, HFILL
9220 } },
9221 { &hf_msg_mds_map, {
9222 "OSD Map Message", "ceph.msg.osd_map",
9223 FT_NONE, BASE_NONE, NULL, 0,
9224 NULL, HFILL
9225 } },
9226 { &hf_msg_mds_map_fsid, {
9227 "FSID", "ceph.msg.osd_map.fsid",
9228 FT_GUID, BASE_NONE, NULL, 0,
9229 NULL, HFILL
9230 } },
9231 { &hf_msg_mds_map_epoch, {
9232 "Epoch", "ceph.msg.osd_map.epoch",
9233 FT_UINT32, BASE_DEC, NULL, 0,
9234 NULL, HFILL
9235 } },
9236 { &hf_msg_mds_map_datai, {
9237 "OSD Map Data", "ceph.msg.osd_map.datai",
9238 FT_NONE, BASE_NONE, NULL, 0,
9239 NULL, HFILL
9240 } },
9241 { &hf_msg_mds_map_data, {
9242 "Data", "ceph.msg.osd_map.data",
9243 FT_BYTES, BASE_NONE, NULL, 0,
9244 NULL, HFILL
9245 } },
9246 { &hf_msg_mds_map_data_size, {
9247 "Size", "ceph.msg.osd_map.size",
9248 FT_UINT32, BASE_DEC, NULL, 0,
9249 NULL, HFILL
9250 } },
9251 { &hf_msg_client_sess, {
9252 "Client Session", "ceph.msg.client_sess",
9253 FT_NONE, BASE_NONE, NULL, 0,
9254 NULL, HFILL
9255 } },
9256 { &hf_msg_client_sess_op, {
9257 "Operation", "ceph.msg.client_sess.op",
9258 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_session_op_type_strings_ext, 0,
9259 NULL, HFILL
9260 } },
9261 { &hf_msg_client_sess_seq, {
9262 "Sequence Number", "ceph.msg.client_sess.seq",
9263 FT_UINT64, BASE_DEC, NULL, 0,
9264 NULL, HFILL
9265 } },
9266 { &hf_msg_client_sess_time, {
9267 "Timestamp", "ceph.msg.client_sess.time",
9268 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9269 NULL, HFILL
9270 } },
9271 { &hf_msg_client_sess_caps_max, {
9272 "Maximum Capabilities", "ceph.msg.client_sess.caps_max",
9273 FT_UINT32, BASE_DEC, NULL, 0,
9274 NULL, HFILL
9275 } },
9276 { &hf_msg_client_sess_leases_max, {
9277 "Maximum Leases", "ceph.msg.client_sess.leases_max",
9278 FT_UINT32, BASE_DEC, NULL, 0,
9279 NULL, HFILL
9280 } },
9281 { &hf_msg_client_req, {
9282 "Client Request", "ceph.msg.client_req",
9283 FT_NONE, BASE_NONE, NULL, 0,
9284 NULL, HFILL
9285 } },
9286 { &hf_msg_client_req_oldest_tid, {
9287 "Oldest TID", "ceph.msg.client_req.oldest_tid",
9288 FT_UINT64, BASE_DEC, NULL, 0,
9289 NULL, HFILL
9290 } },
9291 { &hf_msg_client_req_mdsmap_epoch, {
9292 "MDS Map Epoch", "ceph.msg.client_req.mdsmap_epoch",
9293 FT_UINT32, BASE_DEC, NULL, 0,
9294 NULL, HFILL
9295 } },
9296 { &hf_msg_client_req_flags, {
9297 "Flags", "ceph.msg.client_req.flags",
9298 FT_UINT32, BASE_HEX, NULL, 0,
9299 NULL, HFILL
9300 } },
9301 { &hf_msg_client_req_retry, {
9302 "Number of Retries", "ceph.msg.client_req.retry",
9303 FT_UINT8, BASE_DEC, NULL, 0,
9304 NULL, HFILL
9305 } },
9306 { &hf_msg_client_req_forward, {
9307 "Number of Forwards", "ceph.msg.client_req.forward",
9308 FT_UINT8, BASE_DEC, NULL, 0,
9309 NULL, HFILL
9310 } },
9311 { &hf_msg_client_req_releases, {
9312 "Number of Releases", "ceph.msg.client_req.releases",
9313 FT_UINT16, BASE_DEC, NULL, 0,
9314 NULL, HFILL
9315 } },
9316 { &hf_msg_client_req_op, {
9317 "Operation", "ceph.msg.client_req.op",
9318 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_mds_op_type_strings_ext, 0,
9319 NULL, HFILL
9320 } },
9321 { &hf_msg_client_req_caller_uid, {
9322 "Caller User ID", "ceph.msg.client_req.caller_uid",
9323 FT_UINT32, BASE_DEC, NULL, 0,
9324 NULL, HFILL
9325 } },
9326 { &hf_msg_client_req_caller_gid, {
9327 "Caller Group ID", "ceph.msg.client_req.caller_gid",
9328 FT_UINT32, BASE_DEC, NULL, 0,
9329 NULL, HFILL
9330 } },
9331 { &hf_msg_client_req_inode, {
9332 "Inode", "ceph.msg.client_req.inode",
9333 FT_UINT64, BASE_DEC, NULL, 0,
9334 NULL, HFILL
9335 } },
9336 { &hf_msg_client_req_path_src, {
9337 "Path", "ceph.msg.client_req.path_src",
9338 FT_NONE, BASE_NONE, NULL, 0,
9339 NULL, HFILL
9340 } },
9341 { &hf_msg_client_req_path_dst, {
9342 "Second Path", "ceph.msg.client_req.path_dst",
9343 FT_NONE, BASE_NONE, NULL, 0,
9344 NULL, HFILL
9345 } },
9346 { &hf_msg_client_req_release, {
9347 "Release", "ceph.msg.client_req.release",
9348 FT_NONE, BASE_NONE, NULL, 0,
9349 NULL, HFILL
9350 } },
9351 { &hf_msg_client_req_time, {
9352 "Timestamp", "ceph.msg.client_req.time",
9353 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9354 NULL, HFILL
9355 } },
9356 { &hf_msg_client_reqfwd, {
9357 "Client Request Forward", "ceph.msg.client_reqfwd",
9358 FT_NONE, BASE_NONE, NULL, 0,
9359 NULL, HFILL
9360 } },
9361 { &hf_msg_client_reqfwd_dst, {
9362 "Destination MDS", "ceph.msg.client_reqfwd.dst",
9363 FT_UINT32, BASE_DEC, NULL, 0,
9364 NULL, HFILL
9365 } },
9366 { &hf_msg_client_reqfwd_fwd, {
9367 "Number of Forwards", "ceph.msg.client_reqfwd.fwd",
9368 FT_UINT32, BASE_DEC, NULL, 0,
9369 NULL, HFILL
9370 } },
9371 { &hf_msg_client_reqfwd_resend, {
9372 "Resend", "ceph.msg.client_reqfwd.resend",
9373 FT_BOOLEAN, BASE_NONE, NULL, 0,
9374 "Does the client have to resend the request?", HFILL
9375 } },
9376 { &hf_msg_client_reply, {
9377 "Client Reply", "ceph.msg.client_reply",
9378 FT_NONE, BASE_NONE, NULL, 0,
9379 NULL, HFILL
9380 } },
9381 { &hf_msg_client_reply_op, {
9382 "Operation", "ceph.msg.client_reply.op",
9383 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &c_mds_op_type_strings_ext, 0,
9384 NULL, HFILL
9385 } },
9386 { &hf_msg_client_reply_result, {
9387 "Result", "ceph.msg.client_reply.result",
9388 FT_UINT32, BASE_DEC, NULL, 0,
9389 NULL, HFILL
9390 } },
9391 { &hf_msg_client_reply_mdsmap_epoch, {
9392 "MDS Map Epoch", "ceph.msg.client_reply.mdsmap_epoch",
9393 FT_UINT32, BASE_DEC, NULL, 0,
9394 NULL, HFILL
9395 } },
9396 { &hf_msg_client_reply_isdentry, {
9397 "Is Dentry", "ceph.msg.client_reply.isdentry",
9398 FT_BOOLEAN, BASE_NONE, NULL, 0,
9399 NULL, HFILL
9400 } },
9401 { &hf_msg_client_reply_istarget, {
9402 "Is Target", "ceph.msg.client_reply.istarget",
9403 FT_BOOLEAN, BASE_NONE, NULL, 0,
9404 NULL, HFILL
9405 } },
9406 { &hf_msg_client_reply_trace, {
9407 "Trace", "ceph.msg.client_reply.trace",
9408 FT_NONE, BASE_NONE, NULL, 0,
9409 NULL, HFILL
9410 } },
9411 { &hf_msg_client_reply_extra, {
9412 "Extra", "ceph.msg.client_reply.extra",
9413 FT_NONE, BASE_NONE, NULL, 0,
9414 NULL, HFILL
9415 } },
9416 { &hf_msg_client_reply_snaps, {
9417 "Snapshots", "ceph.msg.client_reply.snaps",
9418 FT_NONE, BASE_NONE, NULL, 0,
9419 NULL, HFILL
9420 } },
9421 { &hf_msg_client_reply_safe, {
9422 "Committed to Permanent Storage", "ceph.msg.client_reply.safe",
9423 FT_BOOLEAN, BASE_NONE, NULL, 0,
9424 NULL, HFILL
9425 } },
9426 { &hf_msg_osd_map, {
9427 "OSD Map Message", "ceph.msg.osd_map",
9428 FT_NONE, BASE_NONE, NULL, 0,
9429 NULL, HFILL
9430 } },
9431 { &hf_msg_osd_map_fsid, {
9432 "FSID", "ceph.msg.osd_map.fsid",
9433 FT_GUID, BASE_NONE, NULL, 0,
9434 NULL, HFILL
9435 } },
9436 { &hf_msg_osd_map_inc, {
9437 "Incremental Map", "ceph.msg.osd_map.inc",
9438 FT_NONE, BASE_NONE, NULL, 0,
9439 NULL, HFILL
9440 } },
9441 { &hf_msg_osd_map_inc_len, {
9442 "Incremental Map Count", "ceph.msg.osd_map.inc_len",
9443 FT_UINT32, BASE_DEC, NULL, 0,
9444 NULL, HFILL
9445 } },
9446 { &hf_msg_osd_map_map, {
9447 "Map", "ceph.msg.osd_map.map",
9448 FT_NONE, BASE_NONE, NULL, 0,
9449 NULL, HFILL
9450 } },
9451 { &hf_msg_osd_map_map_len, {
9452 "Map Count", "ceph.msg.osd_map.map_size",
9453 FT_UINT32, BASE_DEC, NULL, 0,
9454 NULL, HFILL
9455 } },
9456 { &hf_msg_osd_map_epoch, {
9457 "Epoch", "ceph.msg.osd_map.epoch",
9458 FT_UINT32, BASE_DEC, NULL, 0,
9459 NULL, HFILL
9460 } },
9461 { &hf_msg_osd_map_oldest, {
9462 "Oldest Map", "ceph.msg.osd_map.oldest",
9463 FT_UINT32, BASE_DEC, NULL, 0,
9464 NULL, HFILL
9465 } },
9466 { &hf_msg_osd_map_newest, {
9467 "Newest Map", "ceph.msg.osd_map.newest",
9468 FT_UINT32, BASE_DEC, NULL, 0,
9469 NULL, HFILL
9470 } },
9471 { &hf_msg_osd_op, {
9472 "OSD Operation", "ceph.msg.osd_op",
9473 FT_NONE, BASE_NONE, NULL, 0,
9474 NULL, HFILL
9475 } },
9476 { &hf_msg_osd_op_client_inc, {
9477 "Client Inc", "ceph.msg.osd_op.client_inc",
9478 FT_UINT32, BASE_DEC, NULL, 0,
9479 NULL, HFILL
9480 } },
9481 { &hf_msg_osd_op_osdmap_epoch, {
9482 "OSD Map Epoch", "ceph.msg.osd_op.osdmap_epoch",
9483 FT_UINT32, BASE_DEC, NULL, 0,
9484 NULL, HFILL
9485 } },
9486 { &hf_msg_osd_op_mtime, {
9487 "Modification Time", "ceph.msg.osd_op.mtime",
9488 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9489 NULL, HFILL
9490 } },
9491 { &hf_msg_osd_op_reassert_version, {
9492 "Reassert Version", "ceph.msg.osd_op.reassert_version",
9493 FT_NONE, BASE_NONE, NULL, 0,
9494 NULL, HFILL
9495 } },
9496 { &hf_msg_osd_op_oloc, {
9497 "Object Locater", "ceph.msg.osd_op.oloc",
9498 FT_NONE, BASE_NONE, NULL, 0,
9499 NULL, HFILL
9500 } },
9501 { &hf_msg_osd_op_pgid, {
9502 "Placement Group ID", "ceph.msg.osd_op.pgid",
9503 FT_NONE, BASE_NONE, NULL, 0,
9504 NULL, HFILL
9505 } },
9506 { &hf_msg_osd_op_oid, {
9507 "Object ID", "ceph.msg.osd_op.oid",
9508 FT_STRING, BASE_NONE, NULL, 0,
9509 NULL, HFILL
9510 } },
9511 { &hf_msg_osd_op_ops_len, {
9512 "Operation Count", "ceph.msg.osd_op.ops_len",
9513 FT_UINT16, BASE_DEC, NULL, 0,
9514 NULL, HFILL
9515 } },
9516 { &hf_msg_osd_op_op, {
9517 "Operation", "ceph.msg.osd_op.op",
9518 FT_NONE, BASE_NONE, NULL, 0,
9519 NULL, HFILL
9520 } },
9521 { &hf_msg_osd_op_snap_id, {
9522 "Snapshot ID", "ceph.msg.osd_op.snap_id",
9523 FT_UINT64, BASE_DEC, NULL, 0,
9524 NULL, HFILL
9525 } },
9526 { &hf_msg_osd_op_snap_seq, {
9527 "Snapshot Sequence", "ceph.msg.osd_op.snap_seq",
9528 FT_UINT64, BASE_DEC, NULL, 0,
9529 NULL, HFILL
9530 } },
9531 { &hf_msg_osd_op_snaps_len, {
9532 "Snapshot Count", "ceph.msg.osd_op.snaps_len",
9533 FT_UINT32, BASE_DEC, NULL, 0,
9534 NULL, HFILL
9535 } },
9536 { &hf_msg_osd_op_snap, {
9537 "Snapshot", "ceph.msg.osd_op.snaps",
9538 FT_UINT64, BASE_DEC, NULL, 0,
9539 NULL, HFILL
9540 } },
9541 { &hf_msg_osd_op_retry_attempt, {
9542 "Retry Attempt", "ceph.msg.osd_op.retry",
9543 FT_INT32, BASE_DEC, NULL, 0,
9544 NULL, HFILL
9545 } },
9546 { &hf_msg_osd_op_payload, {
9547 "Operation Payload", "ceph.msg.osd_op.op_payload",
9548 FT_BYTES, BASE_NONE, NULL, 0,
9549 NULL, HFILL
9550 } },
9551 { &hf_msg_osd_opreply, {
9552 "OSD Operation Reply", "ceph.msg.osd_opreply",
9553 FT_NONE, BASE_NONE, NULL, 0,
9554 NULL, HFILL
9555 } },
9556 { &hf_msg_osd_opreply_oid, {
9557 "Object ID", "ceph.msg.osd_opreply.oid",
9558 FT_STRING, BASE_NONE, NULL, 0,
9559 NULL, HFILL
9560 } },
9561 { &hf_msg_osd_opreply_pgid, {
9562 "Placement Group ID", "ceph.msg.osd_opreply.pgid",
9563 FT_NONE, BASE_NONE, NULL, 0,
9564 NULL, HFILL
9565 } },
9566 { &hf_msg_osd_opreply_result, {
9567 "Result", "ceph.msg.osd_opreply.result",
9568 FT_INT32, BASE_DEC, NULL, 0,
9569 NULL, HFILL
9570 } },
9571 { &hf_msg_osd_opreply_bad_replay_ver, {
9572 "Bad Replay Version", "ceph.msg.osd_opreply.bad_replay_ver",
9573 FT_NONE, BASE_NONE, NULL, 0,
9574 NULL, HFILL
9575 } },
9576 { &hf_msg_osd_opreply_replay_ver, {
9577 "Replay Version", "ceph.msg.osd_opreply.replay_ver",
9578 FT_NONE, BASE_NONE, NULL, 0,
9579 NULL, HFILL
9580 } },
9581 { &hf_msg_osd_opreply_user_ver, {
9582 "User Version", "ceph.msg.osd_opreply.user_ver",
9583 FT_UINT64, BASE_DEC, NULL, 0,
9584 NULL, HFILL
9585 } },
9586 { &hf_msg_osd_opreply_redirect, {
9587 "Redirect", "ceph.msg.osd_opreply.redirect",
9588 FT_NONE, BASE_NONE, NULL, 0,
9589 NULL, HFILL
9590 } },
9591 { &hf_msg_osd_opreply_osdmap_epoch, {
9592 "OSD Map Epoch", "ceph.msg.osd_opreply.osdmap_epoch",
9593 FT_UINT32, BASE_DEC, NULL, 0,
9594 NULL, HFILL
9595 } },
9596 { &hf_msg_osd_opreply_ops_len, {
9597 "Operation Count", "ceph.msg.osd_opreply.ops_len",
9598 FT_UINT32, BASE_DEC, NULL, 0,
9599 NULL, HFILL
9600 } },
9601 { &hf_msg_osd_opreply_op, {
9602 "Operation", "ceph.msg.osd_opreply.op",
9603 FT_NONE, BASE_NONE, NULL, 0,
9604 NULL, HFILL
9605 } },
9606 { &hf_msg_osd_opreply_retry_attempt, {
9607 "Retry Attempt", "ceph.msg.osd_opreply.retry",
9608 FT_INT32, BASE_DEC, NULL, 0,
9609 NULL, HFILL
9610 } },
9611 { &hf_msg_osd_opreply_rval, {
9612 "Operation Return Value", "ceph.msg.osd_opreply.rval",
9613 FT_INT32, BASE_DEC, NULL, 0,
9614 NULL, HFILL
9615 } },
9616 { &hf_msg_osd_opreply_payload, {
9617 "Operation Result", "ceph.msg.osd_opreply.payload",
9618 FT_BYTES, BASE_NONE, NULL, 0,
9619 NULL, HFILL
9620 } },
9621 { &hf_msg_poolopreply, {
9622 "Pool Operation", "ceph.msg.poolopreply",
9623 FT_NONE, BASE_NONE, NULL, 0,
9624 NULL, HFILL
9625 } },
9626 { &hf_msg_poolopreply_fsid, {
9627 "FSID", "ceph.msg.poolopreply.fsid",
9628 FT_GUID, BASE_NONE, NULL, 0,
9629 NULL, HFILL
9630 } },
9631 { &hf_msg_poolopreply_code, {
9632 "Response Code", "ceph.msg.poolopreply.code",
9633 FT_UINT32, BASE_DEC, NULL, 0,
9634 NULL, HFILL
9635 } },
9636 { &hf_msg_poolopreply_epoch, {
9637 "Epoch", "ceph.msg.poolopreply.epoch",
9638 FT_UINT32, BASE_DEC, NULL, 0,
9639 NULL, HFILL
9640 } },
9641 { &hf_msg_poolopreply_datai, {
9642 "Data", "ceph.msg.poolopreply.datai",
9643 FT_UINT32, BASE_DEC, NULL, 0,
9644 NULL, HFILL
9645 } },
9646 { &hf_msg_poolopreply_data, {
9647 "Data", "ceph.msg.poolopreply.data",
9648 FT_BYTES, BASE_NONE, NULL, 0,
9649 NULL, HFILL
9650 } },
9651 { &hf_msg_poolopreply_data_size, {
9652 "Size", "ceph.msg.poolopreply.data_size",
9653 FT_UINT32, BASE_DEC, NULL, 0,
9654 NULL, HFILL
9655 } },
9656 { &hf_msg_poolop, {
9657 "Pool Operation", "ceph.msg.poolop",
9658 FT_NONE, BASE_NONE, NULL, 0,
9659 NULL, HFILL
9660 } },
9661 { &hf_msg_poolop_fsid, {
9662 "FSID", "ceph.msg.poolop.fsid",
9663 FT_GUID, BASE_NONE, NULL, 0,
9664 NULL, HFILL
9665 } },
9666 { &hf_msg_poolop_pool, {
9667 "Pool", "ceph.msg.poolop.pool",
9668 FT_UINT32, BASE_DEC, NULL, 0,
9669 NULL, HFILL
9670 } },
9671 { &hf_msg_poolop_type, {
9672 "Type", "ceph.msg.poolop.type",
9673 FT_UINT32, BASE_HEX, VALS(c_poolop_type_strings), 0,
9674 NULL, HFILL
9675 } },
9676 { &hf_msg_poolop_auid, {
9677 "AUID", "ceph.msg.poolop.auid",
9678 FT_UINT64, BASE_DEC, NULL, 0,
9679 NULL, HFILL
9680 } },
9681 { &hf_msg_poolop_snapid, {
9682 "Snapshot ID", "ceph.msg.poolop.snap",
9683 FT_UINT64, BASE_DEC, NULL, 0,
9684 NULL, HFILL
9685 } },
9686 { &hf_msg_poolop_name, {
9687 "Name", "ceph.msg.poolop.name",
9688 FT_STRING, BASE_NONE, NULL, 0,
9689 NULL, HFILL
9690 } },
9691 { &hf_msg_poolop_crush_rule, {
9692 "Crush Rule", "ceph.msg.poolop.crush_rule",
9693 FT_UINT16, BASE_DEC, NULL, 0,
9694 NULL, HFILL
9695 } },
9696 { &hf_msg_poolop_crush_rule8, {
9697 "Crush Rule", "ceph.msg.poolop.crush_rule",
9698 FT_UINT8, BASE_DEC, NULL, 0,
9699 NULL, HFILL
9700 } },
9701 { &hf_msg_mon_cmd, {
9702 "Mon Command", "ceph.msg.mon_cmd",
9703 FT_NONE, BASE_NONE, NULL, 0,
9704 NULL, HFILL
9705 } },
9706 { &hf_msg_mon_cmd_fsid, {
9707 "FSID", "ceph.msg.mon_cmd.fsid",
9708 FT_GUID, BASE_NONE, NULL, 0,
9709 NULL, HFILL
9710 } },
9711 { &hf_msg_mon_cmd_arg, {
9712 "Argument", "ceph.msg.mon_cmd.arg",
9713 FT_NONE, BASE_NONE, NULL, 0,
9714 NULL, HFILL
9715 } },
9716 { &hf_msg_mon_cmd_arg_len, {
9717 "Argument Count", "ceph.msg.mon_cmd.arg_len",
9718 FT_UINT32, BASE_DEC, NULL, 0,
9719 NULL, HFILL
9720 } },
9721 { &hf_msg_mon_cmd_str, {
9722 "String", "ceph.msg.mon_cmd.str",
9723 FT_STRING, BASE_NONE, NULL, 0,
9724 NULL, HFILL
9725 } },
9726 { &hf_msg_mon_cmd_ack, {
9727 "Mon Command Result", "ceph.msg.mon_cmd_ack",
9728 FT_NONE, BASE_NONE, NULL, 0,
9729 NULL, HFILL
9730 } },
9731 { &hf_msg_mon_cmd_ack_code, {
9732 "Result Code", "ceph.msg.mon_cmd_ack.code",
9733 FT_INT32, BASE_DEC, NULL, 0,
9734 NULL, HFILL
9735 } },
9736 { &hf_msg_mon_cmd_ack_res, {
9737 "Result String", "ceph.msg.mon_cmd_ack.result",
9738 FT_STRING, BASE_NONE, NULL, 0,
9739 NULL, HFILL
9740 } },
9741 { &hf_msg_mon_cmd_ack_arg, {
9742 "Argument", "ceph.msg.mon_cmd_ack.arg",
9743 FT_NONE, BASE_NONE, NULL, 0,
9744 NULL, HFILL
9745 } },
9746 { &hf_msg_mon_cmd_ack_arg_len, {
9747 "Argument Count", "ceph.msg.mon_cmd_ack.arg_len",
9748 FT_UINT32, BASE_DEC, NULL, 0,
9749 NULL, HFILL
9750 } },
9751 { &hf_msg_mon_cmd_ack_arg_str, {
9752 "String", "ceph.msg.mon_cmd_ack.str",
9753 FT_STRING, BASE_NONE, NULL, 0,
9754 NULL, HFILL
9755 } },
9756 { &hf_msg_mon_cmd_ack_data, {
9757 "Data", "ceph.msg.mon_cmd_ack.data",
9758 FT_STRING, BASE_NONE, NULL, 0,
9759 NULL, HFILL
9760 } },
9761 { &hf_msg_poolstats, {
9762 "Pool Stats", "ceph.msg.poolstats",
9763 FT_NONE, BASE_NONE, NULL, 0,
9764 NULL, HFILL
9765 } },
9766 { &hf_msg_poolstats_fsid, {
9767 "FSID", "ceph.msg.poolstats.fsid",
9768 FT_GUID, BASE_NONE, NULL, 0,
9769 NULL, HFILL
9770 } },
9771 { &hf_msg_poolstats_pool, {
9772 "Pool", "ceph.msg.poolstats.pool",
9773 FT_STRING, BASE_NONE, NULL, 0,
9774 NULL, HFILL
9775 } },
9776 { &hf_msg_poolstatsreply, {
9777 "Pool Stats", "ceph.msg.poolstatsreply",
9778 FT_NONE, BASE_NONE, NULL, 0,
9779 NULL, HFILL
9780 } },
9781 { &hf_msg_poolstatsreply_fsid, {
9782 "FSID", "ceph.msg.poolstatsreply.fsid",
9783 FT_GUID, BASE_NONE, NULL, 0,
9784 NULL, HFILL
9785 } },
9786 { &hf_msg_poolstatsreply_stat, {
9787 "Stats", "ceph.msg.poolstatsreply.pool.stat",
9788 FT_NONE, BASE_NONE, NULL, 0,
9789 NULL, HFILL
9790 } },
9791 { &hf_msg_poolstatsreply_pool, {
9792 "Pool", "ceph.msg.poolstatsreply.pool",
9793 FT_STRING, BASE_NONE, NULL, 0,
9794 NULL, HFILL
9795 } },
9796 { &hf_msg_poolstatsreply_log_size, {
9797 "Log Size", "ceph.msg.poolstatsreply.log_size",
9798 FT_INT64, BASE_DEC, NULL, 0,
9799 NULL, HFILL
9800 } },
9801 { &hf_msg_poolstatsreply_log_size_ondisk, {
9802 "On-Disk Log Size", "ceph.msg.poolstatsreply.log_size_ondisk",
9803 FT_INT64, BASE_DEC, NULL, 0,
9804 NULL, HFILL
9805 } },
9806 { &hf_msg_mon_globalid_max, {
9807 "Old Max ID", "ceph.msg.mon.globalid.max",
9808 FT_UINT64, BASE_HEX, NULL, 0,
9809 NULL, HFILL
9810 } },
9811 { &hf_msg_mon_election, {
9812 "Monitor Election", "ceph.msg.mon_election",
9813 FT_NONE, BASE_NONE, NULL, 0,
9814 NULL, HFILL
9815 } },
9816 { &hf_msg_mon_election_fsid, {
9817 "FSID", "ceph.msg.mon_election.fsid",
9818 FT_GUID, BASE_NONE, NULL, 0,
9819 NULL, HFILL
9820 } },
9821 { &hf_msg_mon_election_op, {
9822 "Type", "ceph.msg.mon_election.op",
9823 FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_election_type_strings_ext, 0,
9824 NULL, HFILL
9825 } },
9826 { &hf_msg_mon_election_epoch, {
9827 "Epoch", "ceph.msg.mon_election.epoch",
9828 FT_UINT32, BASE_DEC, NULL, 0,
9829 NULL, HFILL
9830 } },
9831 { &hf_msg_mon_election_quorum, {
9832 "Quorum", "ceph.msg.mon_election.quorum",
9833 FT_INT64, BASE_DEC, NULL, 0,
9834 NULL, HFILL
9835 } },
9836 { &hf_msg_mon_election_quorum_features, {
9837 "Epoch", "ceph.msg.mon_election.quorum_features",
9838 FT_UINT64, BASE_HEX, NULL, 0,
9839 NULL, HFILL
9840 } },
9841 { &hf_msg_mon_election_defunct_one, {
9842 "Defunct One", "ceph.msg.mon_election.defunct_one",
9843 FT_UINT64, BASE_DEC, NULL, 0,
9844 NULL, HFILL
9845 } },
9846 { &hf_msg_mon_election_defunct_two, {
9847 "Defunct Two", "ceph.msg.mon_election.defunct_two",
9848 FT_UINT64, BASE_DEC, NULL, 0,
9849 NULL, HFILL
9850 } },
9851 { &hf_msg_mon_election_sharing, {
9852 "Sharing", "ceph.msg.mon_election.sharing",
9853 FT_NONE, BASE_NONE, NULL, 0,
9854 NULL, HFILL
9855 } },
9856 { &hf_msg_mon_election_sharing_data, {
9857 "Data", "ceph.msg.mon_election.sharing_data",
9858 FT_BYTES, BASE_NONE, NULL, 0,
9859 NULL, HFILL
9860 } },
9861 { &hf_msg_mon_election_sharing_size, {
9862 "Size", "ceph.msg.mon_election.sharing_size",
9863 FT_UINT32, BASE_DEC, NULL, 0,
9864 NULL, HFILL
9865 } },
9866 { &hf_msg_mon_paxos, {
9867 "Paxos", "ceph.msg.mon_paxos",
9868 FT_NONE, BASE_NONE, NULL, 0,
9869 NULL, HFILL
9870 } },
9871 { &hf_msg_mon_paxos_epoch, {
9872 "Epoch", "ceph.msg.mon_paxos.epoch",
9873 FT_UINT32, BASE_DEC, NULL, 0,
9874 NULL, HFILL
9875 } },
9876 { &hf_msg_mon_paxos_op, {
9877 "Op", "ceph.msg.mon_paxos.op",
9878 FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_paxos_op_strings_ext, 0,
9879 NULL, HFILL
9880 } },
9881 { &hf_msg_mon_paxos_first, {
9882 "First Committed", "ceph.msg.mon_paxos.first",
9883 FT_UINT64, BASE_DEC, NULL, 0,
9884 NULL, HFILL
9885 } },
9886 { &hf_msg_mon_paxos_last, {
9887 "Last Committed", "ceph.msg.mon_paxos.last",
9888 FT_UINT64, BASE_DEC, NULL, 0,
9889 NULL, HFILL
9890 } },
9891 { &hf_msg_mon_paxos_pnfrom, {
9892 "Greatest Seen Proposal Number", "ceph.msg.mon_paxos.pnfrom",
9893 FT_UINT64, BASE_DEC, NULL, 0,
9894 NULL, HFILL
9895 } },
9896 { &hf_msg_mon_paxos_pn, {
9897 "Proposal Number", "ceph.msg.mon_paxos.pn",
9898 FT_UINT64, BASE_DEC, NULL, 0,
9899 NULL, HFILL
9900 } },
9901 { &hf_msg_mon_paxos_pnuncommitted, {
9902 "Previous Proposal Number", "ceph.msg.mon_paxos.pnuncommitted",
9903 FT_UINT64, BASE_DEC, NULL, 0,
9904 NULL, HFILL
9905 } },
9906 { &hf_msg_mon_paxos_lease, {
9907 "Lease Timestamp", "ceph.msg.mon_paxos.lease",
9908 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9909 NULL, HFILL
9910 } },
9911 { &hf_msg_mon_paxos_sent, {
9912 "Sent Timestamp", "ceph.msg.mon_paxos.sent",
9913 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9914 NULL, HFILL
9915 } },
9916 { &hf_msg_mon_paxos_latest_ver, {
9917 "Latest Version", "ceph.msg.mon_paxos.latest_ver",
9918 FT_UINT64, BASE_DEC, NULL, 0,
9919 NULL, HFILL
9920 } },
9921 { &hf_msg_mon_paxos_latest_val, {
9922 "Latest Value", "ceph.msg.mon_paxos.latest_val",
9923 FT_NONE, BASE_NONE, NULL, 0,
9924 NULL, HFILL
9925 } },
9926 { &hf_msg_mon_paxos_latest_val_data, {
9927 "Data", "ceph.msg.mon_paxos.latest_val.data",
9928 FT_BYTES, BASE_NONE, NULL, 0,
9929 NULL, HFILL
9930 } },
9931 { &hf_msg_mon_paxos_latest_val_size, {
9932 "Size", "ceph.msg.mon_paxos.latest_val.size",
9933 FT_UINT32, BASE_DEC, NULL, 0,
9934 NULL, HFILL
9935 } },
9936 { &hf_msg_mon_paxos_value, {
9937 "Proposal", "ceph.msg.mon_paxos.value",
9938 FT_NONE, BASE_NONE, NULL, 0,
9939 NULL, HFILL
9940 } },
9941 { &hf_msg_mon_paxos_ver, {
9942 "Version", "ceph.msg.mon_paxos.ver",
9943 FT_UINT64, BASE_DEC, NULL, 0,
9944 NULL, HFILL
9945 } },
9946 { &hf_msg_mon_paxos_val, {
9947 "Value", "ceph.msg.mon_paxos.val",
9948 FT_NONE, BASE_NONE, NULL, 0,
9949 NULL, HFILL
9950 } },
9951 { &hf_msg_mon_paxos_val_data, {
9952 "Data", "ceph.msg.mon_paxos.val.data",
9953 FT_BYTES, BASE_NONE, NULL, 0,
9954 NULL, HFILL
9955 } },
9956 { &hf_msg_mon_paxos_val_size, {
9957 "Size", "ceph.msg.mon_paxos.val.size",
9958 FT_UINT32, BASE_DEC, NULL, 0,
9959 NULL, HFILL
9960 } },
9961 { &hf_msg_mon_probe, {
9962 "Monitor Probe", "ceph.msg.mon_probe",
9963 FT_NONE, BASE_NONE, NULL, 0,
9964 NULL, HFILL
9965 } },
9966 { &hf_msg_mon_probe_fsid, {
9967 "FSID", "ceph.msg.mon_probe.fsid",
9968 FT_GUID, BASE_NONE, NULL, 0,
9969 NULL, HFILL
9970 } },
9971 { &hf_msg_mon_probe_type, {
9972 "Type", "ceph.msg.mon_probe.type",
9973 FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_probe_type_strings_ext, 0,
9974 NULL, HFILL
9975 } },
9976 { &hf_msg_mon_probe_name, {
9977 "Name", "ceph.msg.mon_probe.name",
9978 FT_STRING, BASE_NONE, NULL, 0,
9979 NULL, HFILL
9980 } },
9981 { &hf_msg_mon_probe_quorum, {
9982 "Quorum", "ceph.msg.mon_probe.quorum",
9983 FT_INT32, BASE_DEC, NULL, 0,
9984 NULL, HFILL
9985 } },
9986 { &hf_msg_mon_probe_paxos_first_ver, {
9987 "Paxos First Version", "ceph.msg.mon_probe.paxos_first_ver",
9988 FT_UINT64, BASE_DEC, NULL, 0,
9989 NULL, HFILL
9990 } },
9991 { &hf_msg_mon_probe_paxos_last_ver, {
9992 "Paxos Last Version", "ceph.msg.mon_probe.paxos_last_ver",
9993 FT_UINT64, BASE_DEC, NULL, 0,
9994 NULL, HFILL
9995 } },
9996 { &hf_msg_mon_probe_ever_joined, {
9997 "Has Ever Joined?", "ceph.msg.mon_probe.has_ever_joined",
9998 FT_BOOLEAN, BASE_NONE, NULL, 0,
9999 NULL, HFILL
10000 } },
10001 { &hf_msg_mon_probe_req_features, {
10002 "Required Features", "ceph.msg.mon_probe.required_features",
10003 FT_UINT64, BASE_HEX, NULL, 0,
10004 NULL, HFILL
10005 } },
10006 { &hf_msg_osd_ping, {
10007 "OSD Ping", "ceph.msg.osd.ping",
10008 FT_NONE, BASE_NONE, NULL, 0,
10009 NULL, HFILL
10010 } },
10011 { &hf_msg_osd_ping_fsid, {
10012 "FSID", "ceph.msg.osd.ping.fsid",
10013 FT_GUID, BASE_NONE, NULL, 0,
10014 NULL, HFILL
10015 } },
10016 { &hf_msg_osd_ping_mapepoch, {
10017 "OSD Map Epoch", "ceph.msg.osd.ping.mapepoch",
10018 FT_UINT32, BASE_DEC, NULL, 0,
10019 NULL, HFILL
10020 } },
10021 { &hf_msg_osd_ping_peerepoch, {
10022 "Peer as of Epoch", "ceph.msg.osd.ping.peerepoch",
10023 FT_UINT32, BASE_DEC, NULL, 0,
10024 NULL, HFILL
10025 } },
10026 { &hf_msg_osd_ping_op, {
10027 "Operation", "ceph.msg.osd.ping.op",
10028 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_osd_ping_op_strings_ext, 0,
10029 NULL, HFILL
10030 } },
10031 { &hf_msg_osd_ping_time, {
10032 "Timestamp", "ceph.msg.osd.ping.time",
10033 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10034 NULL, HFILL
10035 } },
10036 { &hf_msg_osd_boot, {
10037 "OSD Boot", "ceph.msg.osd_boot",
10038 FT_NONE, BASE_NONE, NULL, 0,
10039 NULL, HFILL
10040 } },
10041 { &hf_msg_osd_boot_addr_back, {
10042 "Back Address", "ceph.msg.osd_boot.addr.back",
10043 FT_NONE, BASE_NONE, NULL, 0,
10044 NULL, HFILL
10045 } },
10046 { &hf_msg_osd_boot_addr_cluster, {
10047 "Cluster Address", "ceph.msg.osd_boot.addr.cluster",
10048 FT_NONE, BASE_NONE, NULL, 0,
10049 NULL, HFILL
10050 } },
10051 { &hf_msg_osd_boot_epoch, {
10052 "Boot Epoch", "ceph.msg.osd_boot.epoch",
10053 FT_UINT32, BASE_DEC, NULL, 0,
10054 NULL, HFILL
10055 } },
10056 { &hf_msg_osd_boot_addr_front, {
10057 "Front Address", "ceph.msg.osd_boot.addr.front",
10058 FT_NONE, BASE_NONE, NULL, 0,
10059 NULL, HFILL
10060 } },
10061 { &hf_msg_osd_boot_metadata, {
10062 "Metadata", "ceph.msg.osd_boot.metadata",
10063 FT_NONE, BASE_NONE, NULL, 0,
10064 NULL, HFILL
10065 } },
10066 { &hf_msg_osd_boot_metadata_k, {
10067 "Key", "ceph.msg.osd_boot.metadata.k",
10068 FT_STRING, BASE_NONE, NULL, 0,
10069 NULL, HFILL
10070 } },
10071 { &hf_msg_osd_boot_metadata_v, {
10072 "Value", "ceph.msg.osd_boot.metadata.v",
10073 FT_STRING, BASE_NONE, NULL, 0,
10074 NULL, HFILL
10075 } },
10076 { &hf_msg_pgstats, {
10077 "Placement Group Stats", "ceph.msg.pgstats",
10078 FT_NONE, BASE_NONE, NULL, 0,
10079 NULL, HFILL
10080 } },
10081 { &hf_msg_pgstats_fsid, {
10082 "FSID", "ceph.msg.pgstats.fsid",
10083 FT_GUID, BASE_NONE, NULL, 0,
10084 NULL, HFILL
10085 } },
10086 { &hf_msg_pgstats_pgstat, {
10087 "PG Stats", "ceph.msg.pgstats.pgstat",
10088 FT_NONE, BASE_NONE, NULL, 0,
10089 NULL, HFILL
10090 } },
10091 { &hf_msg_pgstats_pgstat_pg, {
10092 "Placement Group", "ceph.msg.pgstats.pgstat.pg",
10093 FT_NONE, BASE_NONE, NULL, 0,
10094 NULL, HFILL
10095 } },
10096 { &hf_msg_pgstats_pgstat_stat, {
10097 "Stats", "ceph.msg.pgstats.pgstat.stat",
10098 FT_NONE, BASE_NONE, NULL, 0,
10099 NULL, HFILL
10100 } },
10101 { &hf_msg_pgstats_epoch, {
10102 "Epoch", "ceph.msg.pgstats.epoch",
10103 FT_UINT32, BASE_DEC, NULL, 0,
10104 NULL, HFILL
10105 } },
10106 { &hf_msg_pgstats_mapfor, {
10107 "Has Map For", "ceph.msg.pgstats.mapfor",
10108 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10109 NULL, HFILL
10110 } },
10111 { &hf_msg_osd_pg_create, {
10112 "PG Create", "ceph.msg.osd.pg.create",
10113 FT_NONE, BASE_NONE, NULL, 0,
10114 NULL, HFILL
10115 } },
10116 { &hf_msg_osd_pg_create_epoch, {
10117 "Epoch", "ceph.msg.osd.pg.create.epoch",
10118 FT_UINT64, BASE_DEC, NULL, 0,
10119 NULL, HFILL
10120 } },
10121 { &hf_msg_osd_pg_create_mkpg, {
10122 "Creation Request", "ceph.msg.osd.pg.create.mkpg",
10123 FT_NONE, BASE_NONE, NULL, 0,
10124 NULL, HFILL
10125 } },
10126 { &hf_msg_osd_pg_create_mkpg_pg, {
10127 "PG", "ceph.msg.osd.pg.create.mkpg.pg",
10128 FT_NONE, BASE_NONE, NULL, 0,
10129 NULL, HFILL
10130 } },
10131 { &hf_msg_osd_pg_create_mkpg_create, {
10132 "Creation Options", "ceph.msg.osd.pg.create.mkpg.create",
10133 FT_NONE, BASE_NONE, NULL, 0,
10134 NULL, HFILL
10135 } },
10136 { &hf_msg_client_caps, {
10137 "Client Caps", "ceph.msg.client_caps",
10138 FT_NONE, BASE_NONE, NULL, 0,
10139 NULL, HFILL
10140 } },
10141 { &hf_msg_client_caps_op, {
10142 "Operation", "ceph.msg.client_caps.op",
10143 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_cap_op_type_strings_ext, 0,
10144 NULL, HFILL
10145 } },
10146 { &hf_msg_client_caps_inode, {
10147 "Inode", "ceph.msg.client_caps.inode",
10148 FT_UINT64, BASE_HEX, NULL, 0,
10149 NULL, HFILL
10150 } },
10151 { &hf_msg_client_caps_relam, {
10152 "Relam", "ceph.msg.client_caps.relam",
10153 FT_UINT64, BASE_DEC, NULL, 0,
10154 NULL, HFILL
10155 } },
10156 { &hf_msg_client_caps_cap_id, {
10157 "Cap ID", "ceph.msg.client_caps.cap_id",
10158 FT_UINT64, BASE_HEX, NULL, 0,
10159 NULL, HFILL
10160 } },
10161 { &hf_msg_client_caps_seq, {
10162 "Sequence", "ceph.msg.client_caps.seq",
10163 FT_UINT32, BASE_DEC, NULL, 0,
10164 NULL, HFILL
10165 } },
10166 { &hf_msg_client_caps_seq_issue, {
10167 "Issue Sequence", "ceph.msg.client_caps.seq_issue",
10168 FT_UINT32, BASE_DEC, NULL, 0,
10169 NULL, HFILL
10170 } },
10171 { &hf_msg_client_caps_new, {
10172 "New Capabilities", "ceph.msg.client_caps.new",
10173 FT_UINT32, BASE_HEX, NULL, 0,
10174 NULL, HFILL
10175 } },
10176 { &hf_msg_client_caps_wanted, {
10177 "Wanted Capabilities", "ceph.msg.client_caps.wanted",
10178 FT_UINT32, BASE_DEC, NULL, 0,
10179 NULL, HFILL
10180 } },
10181 { &hf_msg_client_caps_dirty, {
10182 "Dirty Capabilities", "ceph.msg.client_caps.dirty",
10183 FT_UINT32, BASE_DEC, NULL, 0,
10184 NULL, HFILL
10185 } },
10186 { &hf_msg_client_caps_seq_migrate, {
10187 "Migrate Sequence", "ceph.msg.client_caps_seq.migrate",
10188 FT_UINT32, BASE_DEC, NULL, 0,
10189 NULL, HFILL
10190 } },
10191 { &hf_msg_client_caps_snap_follows, {
10192 "Snapshot Follows", "ceph.msg.client_caps.snap_follows",
10193 FT_UINT64, BASE_DEC, NULL, 0,
10194 NULL, HFILL
10195 } },
10196 { &hf_msg_client_caps_uid, {
10197 "User ID", "ceph.msg.client_caps.uid",
10198 FT_UINT32, BASE_DEC, NULL, 0,
10199 NULL, HFILL
10200 } },
10201 { &hf_msg_client_caps_gid, {
10202 "Group ID", "ceph.msg.client_caps.gid",
10203 FT_UINT32, BASE_DEC, NULL, 0,
10204 NULL, HFILL
10205 } },
10206 { &hf_msg_client_caps_mode, {
10207 "Mode", "ceph.msg.client_caps.mode",
10208 FT_UINT32, BASE_DEC, NULL, 0,
10209 NULL, HFILL
10210 } },
10211 { &hf_msg_client_caps_nlink, {
10212 "Number of Links", "ceph.msg.client_caps.nlink",
10213 FT_UINT32, BASE_DEC, NULL, 0,
10214 NULL, HFILL
10215 } },
10216 { &hf_msg_client_caps_xattr_ver, {
10217 "Xattr Version", "ceph.msg.client_caps.xattr_ver",
10218 FT_UINT64, BASE_DEC, NULL, 0,
10219 NULL, HFILL
10220 } },
10221 { &hf_msg_client_caps_snap, {
10222 "Snapshot Data", "ceph.msg.client_caps.snap",
10223 FT_BYTES, BASE_NONE, NULL, 0,
10224 NULL, HFILL
10225 } },
10226 { &hf_msg_client_caps_flock, {
10227 "Flock", "ceph.msg.client_caps.flock",
10228 FT_NONE, BASE_NONE, NULL, 0,
10229 NULL, HFILL
10230 } },
10231 { &hf_msg_client_caps_inline_ver, {
10232 "Inline Version", "ceph.msg.client_caps.inline_ver",
10233 FT_UINT64, BASE_DEC, NULL, 0,
10234 NULL, HFILL
10235 } },
10236 { &hf_msg_client_caps_inline_data, {
10237 "Inline Data", "ceph.msg.client_caps.inline_data",
10238 FT_NONE, BASE_NONE, NULL, 0,
10239 NULL, HFILL
10240 } },
10241 { &hf_msg_client_caps_xattr, {
10242 "Xattr", "ceph.msg.client_caps.xattr",
10243 FT_BYTES, BASE_NONE, NULL, 0,
10244 NULL, HFILL
10245 } },
10246 { &hf_msg_client_caprel, {
10247 "Capability Release", "ceph.msg.client_caprel",
10248 FT_NONE, BASE_NONE, NULL, 0,
10249 NULL, HFILL
10250 } },
10251 { &hf_msg_client_caprel_cap, {
10252 "Capability", "ceph.msg.client_caprel.cap",
10253 FT_NONE, BASE_NONE, NULL, 0,
10254 NULL, HFILL
10255 } },
10256 { &hf_msg_client_caprel_cap_inode, {
10257 "Inode", "ceph.msg.client_caprel.cap.inode",
10258 FT_UINT64, BASE_HEX, NULL, 0,
10259 NULL, HFILL
10260 } },
10261 { &hf_msg_client_caprel_cap_id, {
10262 "Capability ID", "ceph.msg.client_caprel.cap.id",
10263 FT_UINT64, BASE_HEX, NULL, 0,
10264 NULL, HFILL
10265 } },
10266 { &hf_msg_client_caprel_cap_migrate, {
10267 "Migrate Sequence", "ceph.msg.client_caprel_cap.migrate",
10268 FT_UINT32, BASE_DEC, NULL, 0,
10269 NULL, HFILL
10270 } },
10271 { &hf_msg_client_caprel_cap_seq, {
10272 "Sequence", "ceph.msg.client_caprel_cap.seq",
10273 FT_UINT32, BASE_DEC, NULL, 0,
10274 NULL, HFILL
10275 } },
10276 { &hf_msg_timecheck, {
10277 "Timecheck", "ceph.msg.timecheck",
10278 FT_NONE, BASE_NONE, NULL, 0,
10279 NULL, HFILL
10280 } },
10281 { &hf_msg_timecheck_op, {
10282 "Operation", "ceph.msg.timecheck.op",
10283 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_timecheck_op_strings_ext, 0,
10284 NULL, HFILL
10285 } },
10286 { &hf_msg_timecheck_epoch, {
10287 "Epoch", "ceph.msg.timecheck.epoch",
10288 FT_UINT64, BASE_DEC, NULL, 0,
10289 NULL, HFILL
10290 } },
10291 { &hf_msg_timecheck_round, {
10292 "Round", "ceph.msg.timecheck.round",
10293 FT_UINT64, BASE_DEC, NULL, 0,
10294 NULL, HFILL
10295 } },
10296 { &hf_msg_timecheck_time, {
10297 "Time", "ceph.msg.timecheck.time",
10298 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10299 NULL, HFILL
10300 } },
10301 { &hf_msg_timecheck_skew, {
10302 "Skew", "ceph.msg.timecheck.skew",
10303 FT_NONE, BASE_NONE, NULL, 0,
10304 NULL, HFILL
10305 } },
10306 { &hf_msg_timecheck_skew_node, {
10307 "Node", "ceph.msg.timecheck.skew.node",
10308 FT_NONE, BASE_NONE, NULL, 0,
10309 NULL, HFILL
10310 } },
10311 { &hf_msg_timecheck_skew_skew, {
10312 "Skew", "ceph.msg.timecheck.skew.skew",
10313 FT_DOUBLE, BASE_NONE, NULL, 0,
10314 NULL, HFILL
10315 } },
10316 { &hf_msg_timecheck_latency, {
10317 "Latency", "ceph.msg.timecheck.latency",
10318 FT_NONE, BASE_NONE, NULL, 0,
10319 NULL, HFILL
10320 } },
10321 { &hf_msg_timecheck_latency_node, {
10322 "Node", "ceph.msg.timecheck.latency.node",
10323 FT_NONE, BASE_NONE, NULL, 0,
10324 NULL, HFILL
10325 } },
10326 { &hf_msg_timecheck_latency_latency, {
10327 "Latency", "ceph.msg.timecheck.latency.latency",
10328 FT_DOUBLE, BASE_NONE, NULL, 0,
10329 NULL, HFILL
10330 } },
10333 /* Setup protocol subtree array */
10334 static int *ett[] = {
10335 &ett_ceph,
10336 &ett_data,
10337 &ett_str,
10338 &ett_blob,
10339 &ett_sockaddr,
10340 &ett_entityaddr,
10341 &ett_entityname,
10342 &ett_EntityName,
10343 &ett_entityinst,
10344 &ett_kv,
10345 &ett_eversion,
10346 &ett_objectlocator,
10347 &ett_pg,
10348 &ett_pg_create,
10349 &ett_filepath,
10350 &ett_mds_release,
10351 &ett_hitset_params,
10352 &ett_snapinfo,
10353 &ett_pgpool,
10354 &ett_pgpool_snap,
10355 &ett_pgpool_snapdel,
10356 &ett_pgpool_property,
10357 &ett_mon_map,
10358 &ett_mon_map_address,
10359 &ett_osd_peerstat,
10360 &ett_featureset,
10361 &ett_featureset_name,
10362 &ett_compatset,
10363 &ett_osd_superblock,
10364 &ett_osd_info,
10365 &ett_osd_xinfo,
10366 &ett_perfstat,
10367 &ett_osdstat,
10368 &ett_pg_stat,
10369 &ett_osd_map,
10370 &ett_osd_map_client,
10371 &ett_osd_map_pool,
10372 &ett_osd_map_poolname,
10373 &ett_osd_map_pgtmp,
10374 &ett_osd_map_primarytmp,
10375 &ett_osd_map_erasurecodeprofile,
10376 &ett_osd_map_osd,
10377 &ett_osd_map_blacklist,
10378 &ett_osd_map_inc,
10379 &ett_osd_map_inc_client,
10380 &ett_osd_map_inc_osd,
10381 &ett_osd_op,
10382 &ett_redirect,
10383 &ett_statcollection,
10384 &ett_paxos,
10385 &ett_msg_mon_map,
10386 &ett_msg_statfs,
10387 &ett_msg_statfsreply,
10388 &ett_msg_mon_sub,
10389 &ett_msg_mon_sub_item,
10390 &ett_msg_mon_sub_flags,
10391 &ett_msg_mon_sub_ack,
10392 &ett_msg_auth,
10393 &ett_msg_auth_supportedproto,
10394 &ett_msg_auth_cephx,
10395 &ett_msg_authreply,
10396 &ett_msg_mon_getversion,
10397 &ett_msg_mon_getversionreply,
10398 &ett_msg_mds_map,
10399 &ett_msg_client_sess,
10400 &ett_msg_client_req,
10401 &ett_msg_client_reqfwd,
10402 &ett_msg_client_reply,
10403 &ett_msg_osd_map,
10404 &ett_msg_osd_map_inc,
10405 &ett_msg_osd_map_full,
10406 &ett_msg_osd_op,
10407 &ett_msg_osd_opreply,
10408 &ett_msg_poolopreply,
10409 &ett_msg_poolop,
10410 &ett_msg_mon_cmd,
10411 &ett_msg_mon_cmd_arg,
10412 &ett_msg_mon_cmdack,
10413 &ett_msg_mon_cmdack_arg,
10414 &ett_msg_poolstats,
10415 &ett_msg_poolstatsreply,
10416 &ett_msg_poolstatsreply_stat,
10417 &ett_msg_mon_election,
10418 &ett_msg_mon_paxos,
10419 &ett_msg_mon_paxos_value,
10420 &ett_msg_mon_probe,
10421 &ett_msg_osd_ping,
10422 &ett_msg_osd_boot,
10423 &ett_msg_pgstats,
10424 &ett_msg_pgstats_pgstat,
10425 &ett_msg_osd_pg_create,
10426 &ett_msg_osd_pg_create_mkpg,
10427 &ett_msg_client_caps,
10428 &ett_msg_client_caprel,
10429 &ett_msg_client_caprel_cap,
10430 &ett_msg_timecheck,
10431 &ett_msg_timecheck_skew,
10432 &ett_msg_timecheck_latency,
10433 &ett_head,
10434 &ett_foot,
10435 &ett_connect,
10436 &ett_connect_reply,
10437 &ett_filter_data,
10440 /* Expert info items. */
10441 static ei_register_info ei[] = {
10442 { &ei_unused, {
10443 "ceph.unused", PI_UNDECODED, PI_WARN,
10444 "Unused data in message. This usually indicates an error by the "
10445 "sender or a bug in the dissector.", EXPFILL
10446 } },
10447 { &ei_overrun, {
10448 "ceph.overrun", PI_UNDECODED, PI_WARN,
10449 "There was less data then expected. This usually indicates an "
10450 "error by the sender or a bug in the dissector.", EXPFILL
10451 } },
10452 { &ei_tag_unknown, {
10453 "ceph.tag_unknown", PI_UNDECODED, PI_ERROR,
10454 "Unknown tag. This is either an error by the sender or an "
10455 "indication that the dissector is out of date.", EXPFILL
10456 } },
10457 { &ei_msg_unknown, {
10458 "ceph.msg_unknown", PI_UNDECODED, PI_WARN,
10459 "Unknown message type. This most likely means that the dissector "
10460 "is out of date. However it could also be an error by the "
10461 "sender.", EXPFILL
10462 } },
10463 { &ei_union_unknown, {
10464 "ceph.union_unknown", PI_UNDECODED, PI_WARN,
10465 "This data's meaning depends on other information in the message "
10466 "but the dissector doesn't know what type it is.", EXPFILL
10467 } },
10468 { &ei_ver_tooold, {
10469 "ceph.ver.tooold", PI_UNDECODED, PI_WARN,
10470 "This data is in an older format that is not supported by the "
10471 "dissector.", EXPFILL
10472 } },
10473 { &ei_ver_toonew, {
10474 "ceph.ver.toonew", PI_UNDECODED, PI_WARN,
10475 "This data is in a newer format that is not supported by the "
10476 "dissector.", EXPFILL
10477 } },
10478 { &ei_oloc_both, {
10479 "ceph.oloc.both", PI_MALFORMED, PI_ERROR,
10480 "Only one of the key or hash should be present, however both are.",
10481 EXPFILL
10482 } },
10483 #if 0
10484 { &ei_banner_invalid, {
10485 "ceph.banner.invalid", PI_MALFORMED, PI_ERROR,
10486 "Banner was invalid.", EXPFILL
10487 } },
10488 #endif
10489 { &ei_sizeillogical, {
10490 "ceph.sizeillogical", PI_MALFORMED, PI_ERROR,
10491 "The claimed size is impossible.", EXPFILL
10492 } },
10495 /* Register the protocol name and description */
10496 proto_ceph = proto_register_protocol("Ceph", "Ceph", "ceph");
10498 /* Required function calls to register the header fields and subtrees */
10499 proto_register_field_array(proto_ceph, hf, array_length(hf));
10500 proto_register_subtree_array(ett, array_length(ett));
10501 expert_ceph = expert_register_protocol(proto_ceph);
10502 expert_register_field_array(expert_ceph, ei, array_length(ei));
10504 ceph_handle = register_dissector("ceph", dissect_ceph_old, proto_ceph);
10507 void
10508 proto_reg_handoff_ceph(void)
10510 heur_dissector_add("tcp", dissect_ceph_heur, "Ceph over TCP", "ceph_tcp", proto_ceph, HEURISTIC_ENABLE);
10514 * Editor modelines - https://www.wireshark.org/tools/modelines.html
10516 * Local variables:
10517 * c-basic-offset: 8
10518 * tab-width: 8
10519 * indent-tabs-mode: t
10520 * End:
10522 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
10523 * :indentSize=8:tabSize=8:noTabs=false: