Coverage Report

Created: 2025-02-15 06:25

/src/wireshark/epan/dissectors/packet-ceph.c
Line
Count
Source (jump to first uncovered line)
1
/* packet-ceph.c
2
 * Routines for Ceph dissection
3
 * Copyright 2014, Kevin Cox <kevincox@kevincox.ca>
4
 *
5
 * Wireshark - Network traffic analyzer
6
 * By Gerald Combs <gerald@wireshark.org>
7
 * Copyright 1998 Gerald Combs
8
 *
9
 * SPDX-License-Identifier: GPL-2.0-or-later
10
 */
11
12
#include "config.h"
13
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>
20
21
void proto_reg_handoff_ceph(void);
22
void proto_register_ceph(void);
23
24
/* Extending the Ceph Dissector.
25
 *
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).
29
 *
30
 * If you have any questions feel free to contact Kevin <kevincox@kevincox.ca>.
31
 *
32
 * ## Adding a MSGR Tag
33
 *
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.
37
 *
38
 * ## Adding a New Message.
39
 *
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.
43
 *
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.
46
 *
47
 * ## Supporting new encodings.
48
 *
49
 * ### Message Encodings.
50
 *
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.
54
 *
55
 * ### Data Type Encodings.
56
 *
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.
60
 *
61
 * Please rely on the length returned by `c_dissect_encoded()` to ensure future
62
 * compatibility.
63
 */
64
65
static dissector_handle_t ceph_handle;
66
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;
713
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;
725
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;
830
831
static const uint8_t *C_BANNER = (const uint8_t*)"ceph v";
832
833
368
#define C_BANNER_SIZE     9
834
2.43k
#define C_BANNER_SIZE_MIN 6
835
836
/** Feature Flags */
837
/* Transmuted from ceph:/src/include/ceph_features.h */
838
14
#define C_FEATURE_UID          (1U <<  0)
839
14
#define C_FEATURE_NOSRCADDR        (1U <<  1)
840
14
#define C_FEATURE_MONCLOCKCHECK        (1U <<  2)
841
14
#define C_FEATURE_FLOCK          (1U <<  3)
842
14
#define C_FEATURE_SUBSCRIBE2         (1U <<  4)
843
14
#define C_FEATURE_MONNAMES         (1U <<  5)
844
14
#define C_FEATURE_RECONNECT_SEQ        (1U <<  6)
845
14
#define C_FEATURE_DIRLAYOUTHASH        (1U <<  7)
846
14
#define C_FEATURE_OBJECTLOCATOR        (1U <<  8)
847
14
#define C_FEATURE_PGID64         (1U <<  9)
848
14
#define C_FEATURE_INCSUBOSDMAP         (1U << 10)
849
14
#define C_FEATURE_PGPOOL3        (1U << 11)
850
14
#define C_FEATURE_OSDREPLYMUX        (1U << 12)
851
14
#define C_FEATURE_OSDENC         (1U << 13)
852
14
#define C_FEATURE_OMAP           (1U << 14)
853
14
#define C_FEATURE_MONENC         (1U << 15)
854
14
#define C_FEATURE_QUERY_T        (1U << 16)
855
14
#define C_FEATURE_INDEP_PG_MAP         (1U << 17)
856
14
#define C_FEATURE_CRUSH_TUNABLES       (1U << 18)
857
14
#define C_FEATURE_CHUNKY_SCRUB         (1U << 19)
858
14
#define C_FEATURE_MON_NULLROUTE        (1U << 20)
859
14
#define C_FEATURE_MON_GV         (1U << 21)
860
14
#define C_FEATURE_BACKFILL_RESERVATION (1U << 22)
861
14
#define C_FEATURE_MSG_AUTH         (1U << 23)
862
14
#define C_FEATURE_RECOVERY_RESERVATION (1U << 24)
863
14
#define C_FEATURE_CRUSH_TUNABLES2      (1U << 25)
864
14
#define C_FEATURE_CREATEPOOLID         (1U << 26)
865
14
#define C_FEATURE_REPLY_CREATE_INODE   (1U << 27)
866
14
#define C_FEATURE_OSD_HBMSGS         (1U << 28)
867
14
#define C_FEATURE_MDSENC         (1U << 29)
868
14
#define C_FEATURE_OSDHASHPSPOOL        (1U << 30)
869
14
#define C_FEATURE_MON_SINGLE_PAXOS     (1U << 31)
870
14
#define C_FEATURE_OSD_SNAPMAPPER       (1U <<  0)
871
14
#define C_FEATURE_MON_SCRUB        (1U <<  1)
872
14
#define C_FEATURE_OSD_PACKED_RECOVERY  (1U <<  2)
873
14
#define C_FEATURE_OSD_CACHEPOOL        (1U <<  3)
874
14
#define C_FEATURE_CRUSH_V2         (1U <<  4)
875
14
#define C_FEATURE_EXPORT_PEER        (1U <<  5)
876
14
#define C_FEATURE_OSD_ERASURE_CODES    (1U <<  6)
877
14
#define C_FEATURE_OSD_TMAP2OMAP        (1U <<  6)
878
14
#define C_FEATURE_OSDMAP_ENC         (1U <<  7)
879
14
#define C_FEATURE_MDS_INLINE_DATA      (1U <<  8)
880
14
#define C_FEATURE_CRUSH_TUNABLES3      (1U <<  9)
881
14
#define C_FEATURE_OSD_PRIMARY_AFFINITY (1U <<  9)
882
14
#define C_FEATURE_MSGR_KEEPALIVE2      (1U << 10)
883
14
#define C_FEATURE_RESERVED         (1U << 31)
884
885
/** Connect Message Flags */
886
14
#define C_FLAG_LOSSY                 (1U << 0)
887
888
14
#define C_PGPOOL_FLAG_HASHPSPOOL       (1U << 0) /* hash pg seed and pool together (instead of adding) */
889
14
#define C_PGPOOL_FLAG_FULL         (1U << 1) /* pool is full */
890
14
#define C_PGPOOL_FLAG_FAKE_EC_POOL     (1U << 2) /* require ReplicatedPG to act like an EC pg */
891
892
/** Macros to create value_stings.
893
 *
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.
898
 *
899
 * Additionally, C_MAKE_STRINGS_EXT creates a
900
 * `value_strings_ext base_strings_ext` and uses this for the `base_string`
901
 * lookup.
902
 *
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.
906
 */
907
#define C_MAKE_STRINGS(base, chars) \
908
  typedef int base; \
909
  VALUE_STRING_ENUM(base##_strings); \
910
  VALUE_STRING_ARRAY(base##_strings); \
911
23
  static const char *base##_string(base val) { \
912
23
    return val_to_str(val, base##_strings, "Unknown (0x0"#chars"X)"); \
913
23
  }
packet-ceph.c:c_node_type_string
Line
Count
Source
911
23
  static const char *base##_string(base val) { \
912
23
    return val_to_str(val, base##_strings, "Unknown (0x0"#chars"X)"); \
913
23
  }
Unexecuted instantiation: packet-ceph.c:c_auth_proto_string
Unexecuted instantiation: packet-ceph.c:c_cephx_req_type_string
Unexecuted instantiation: packet-ceph.c:c_pgpool_type_string
Unexecuted instantiation: packet-ceph.c:c_poolop_type_string
914
915
#define C_MAKE_STRINGS_EXT(base, chars) \
916
  typedef int base; \
917
  VALUE_STRING_ENUM(base##_strings); \
918
  VALUE_STRING_ARRAY(base##_strings); \
919
  \
920
  static value_string_ext \
921
  base##_strings_ext = VALUE_STRING_EXT_INIT(base##_strings); \
922
  \
923
18
  static const char *base##_string(base val) { \
924
18
    return val_to_str_ext(val, &base##_strings_ext, "Unknown (0x0"#chars"X)"); \
925
18
  }
packet-ceph.c:c_msg_type_string
Line
Count
Source
923
18
  static const char *base##_string(base val) { \
924
18
    return val_to_str_ext(val, &base##_strings_ext, "Unknown (0x0"#chars"X)"); \
925
18
  }
Unexecuted instantiation: packet-ceph.c:c_session_op_type_string
Unexecuted instantiation: packet-ceph.c:c_mds_op_type_string
Unexecuted instantiation: packet-ceph.c:c_hitset_params_type_string
Unexecuted instantiation: packet-ceph.c:c_pgpool_cachemode_string
Unexecuted instantiation: packet-ceph.c:c_osd_optype_string
Unexecuted instantiation: packet-ceph.c:c_mon_election_type_string
Unexecuted instantiation: packet-ceph.c:c_mon_paxos_op_string
Unexecuted instantiation: packet-ceph.c:c_mon_probe_type_string
Unexecuted instantiation: packet-ceph.c:c_osd_ping_op_string
Unexecuted instantiation: packet-ceph.c:c_cap_op_type_string
Unexecuted instantiation: packet-ceph.c:c_timecheck_op_string
926
927
#define c_inet_strings_VALUE_STRING_LIST(V) \
928
  V(C_IPv4, 0x0002, "IPv4") \
929
  V(C_IPv6, 0x000A, "IPv6")
930
931
typedef int c_inet;
932
VALUE_STRING_ENUM(c_inet_strings);
933
VALUE_STRING_ARRAY(c_inet_strings);
934
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")            \
952
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);
957
958
/* Extracted from the Ceph tree.
959
 *
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.
963
 */
964
#define c_msg_type_strings_VALUE_STRING_LIST(V) \
965
  V(C_MSG_UNKNOWN,         0x0000, "Unknown (0x0000)")      \
966
                        \
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")
1092
1093
C_MAKE_STRINGS_EXT(c_msg_type, 4)
1094
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")                 \
1104
                              \
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")
1187
1188
C_MAKE_STRINGS_EXT(c_osd_optype, 4)
1189
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")
1198
1199
C_MAKE_STRINGS(c_poolop_type, 2)
1200
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")
1206
1207
C_MAKE_STRINGS_EXT(c_mon_election_type, 8)
1208
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")
1217
1218
C_MAKE_STRINGS_EXT(c_mon_paxos_op, 8)
1219
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")
1227
1228
C_MAKE_STRINGS_EXT(c_mon_probe_type, 8)
1229
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")
1237
1238
C_MAKE_STRINGS_EXT(c_osd_ping_op, 2)
1239
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")
1251
1252
C_MAKE_STRINGS_EXT(c_session_op_type, 8)
1253
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")
1285
1286
C_MAKE_STRINGS_EXT(c_mds_op_type, 8)
1287
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")
1302
1303
C_MAKE_STRINGS_EXT(c_cap_op_type, 8)
1304
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")
1309
1310
C_MAKE_STRINGS_EXT(c_timecheck_op, 8)
1311
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")
1316
1317
C_MAKE_STRINGS(c_pgpool_type, 2)
1318
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]")
1324
1325
C_MAKE_STRINGS_EXT(c_pgpool_cachemode, 2)
1326
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")
1332
1333
C_MAKE_STRINGS_EXT(c_hitset_params_type, 2)
1334
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")
1339
1340
C_MAKE_STRINGS(c_auth_proto, 2)
1341
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")
1346
1347
C_MAKE_STRINGS(c_cephx_req_type, 4)
1348
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"   ))
1357
1358
#define C_EXTRACT_1(a, b) a
1359
#define C_EXTRACT_2(a, b) b
1360
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)
1364
1365
C_MAKE_STRINGS(c_node_type, 2)
1366
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)
1370
1371
VALUE_STRING_ARRAY(c_node_type_abbr_strings);
1372
1373
static
1374
const char *c_node_type_abbr_string(c_node_type val)
1375
6
{
1376
6
  return val_to_str(val, c_node_type_abbr_strings, "Unknown (0x%02x)");
1377
6
}
1378
1379
14
#define C_MON_SUB_FLAG_ONETIME  0x01
1380
1381
typedef enum _c_state {
1382
  C_STATE_NEW,
1383
  C_STATE_OPEN,
1384
  C_STATE_SEQ /* Waiting for sequence number. */
1385
} c_state;
1386
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;
1393
1394
static
1395
void c_node_name_init(c_entityname *d)
1396
86
{
1397
86
  d->slug     = NULL;
1398
86
  d->type_str = NULL;
1399
86
  d->id     = UINT64_MAX;
1400
86
  d->type     = C_NODE_TYPE_UNKNOWN;
1401
86
}
1402
1403
typedef struct _c_node {
1404
  address addr;
1405
  c_entityname name;
1406
  c_state state;
1407
  uint16_t port;
1408
} c_node;
1409
1410
static
1411
void c_node_init(c_node *n)
1412
86
{
1413
86
  clear_address(&n->addr);
1414
86
  c_node_name_init(&n->name);
1415
86
  n->port = 0xFFFF;
1416
86
  n->state = C_STATE_NEW;
1417
86
}
1418
1419
static
1420
c_node *c_node_copy(c_node *src, c_node *dst)
1421
690
{
1422
690
  dst->name = src->name;
1423
690
  copy_address_shallow(&dst->addr, &src->addr);
1424
690
  dst->port = src->port;
1425
690
  dst->state = src->state;
1426
1427
690
  return dst;
1428
690
}
1429
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;
1434
1435
static
1436
void c_conv_data_init(c_conv_data *d)
1437
43
{
1438
43
  c_node_init(&d->client);
1439
43
  c_node_init(&d->server);
1440
43
}
1441
1442
static
1443
c_conv_data *c_conv_data_copy(c_conv_data *src, c_conv_data *dst)
1444
345
{
1445
345
  c_node_copy(&src->client, &dst->client);
1446
345
  c_node_copy(&src->server, &dst->server);
1447
1448
345
  return dst;
1449
345
}
1450
1451
static
1452
c_conv_data *c_conv_data_clone(c_conv_data *d)
1453
345
{
1454
345
  return c_conv_data_copy(d, wmem_new(wmem_file_scope(), c_conv_data));
1455
345
}
1456
1457
static
1458
c_conv_data *c_conv_data_new(void)
1459
43
{
1460
43
  c_conv_data *r;
1461
43
  r = wmem_new(wmem_file_scope(), c_conv_data);
1462
43
  c_conv_data_init(r);
1463
43
  return r;
1464
43
}
1465
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;
1474
1475
static
1476
void c_header_init(c_header *h)
1477
407
{
1478
407
  h->seq      = 0;
1479
407
  h->tid      = 0;
1480
407
  h->type     = C_MSG_UNKNOWN;
1481
407
  h->priority = 0;
1482
407
  h->ver      = 0;
1483
407
  memset(&h->src, 0, sizeof(h->src));
1484
407
}
1485
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. */
1491
1492
  proto_item  *item_root; /* The root proto_item for the message. */
1493
  packet_info *pinfo;
1494
1495
  c_header header;  /* The MSG header. */
1496
} c_pkt_data;
1497
1498
/** Initialize the packet data.
1499
 *
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.
1502
 *
1503
 * This function grabs the appropriate data either from previous packets in the
1504
 * dissection, or creating a new data for new conversations.
1505
 *
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.
1509
 */
1510
static void
1511
c_pkt_data_init(c_pkt_data *d, packet_info *pinfo, unsigned off)
1512
407
{
1513
  /* Get conversation to store/retrieve connection data. */
1514
407
  d->conv = find_or_create_conversation(pinfo);
1515
407
  DISSECTOR_ASSERT_HINT(d->conv, "find_or_create_conversation() returned NULL");
1516
1517
407
  if (pinfo->fd->visited)
1518
0
  {
1519
    /* Retrieve the saved state. */
1520
0
    d->convd = (c_conv_data*)p_get_proto_data(wmem_file_scope(), pinfo,
1521
0
                proto_ceph, off);
1522
0
    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
0
    d->convd = c_conv_data_copy(d->convd, wmem_new(pinfo->pool, c_conv_data));
1525
0
  }
1526
407
  else
1527
407
  {
1528
    /*
1529
      If there is no saved state get the state from dissecting the
1530
      last packet.
1531
    */
1532
407
    d->convd = (c_conv_data*)conversation_get_proto_data(d->conv, proto_ceph);
1533
407
  }
1534
1535
407
  if (!d->convd) /* New conversation. */
1536
43
  {
1537
43
    d->convd = c_conv_data_new();
1538
43
    conversation_add_proto_data(d->conv, proto_ceph, d->convd);
1539
43
  }
1540
1541
  /*
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.
1545
   */
1546
407
  if (d->convd->client.port != 0xFFFF) {
1547
345
    if (addresses_equal(&d->convd->client.addr, &pinfo->src) &&
1548
345
        d->convd->client.port == pinfo->srcport)
1549
345
    {
1550
345
      d->src = &d->convd->client;
1551
345
      d->dst = &d->convd->server;
1552
345
    }
1553
0
    else
1554
0
    {
1555
0
      d->src = &d->convd->server;
1556
0
      d->dst = &d->convd->client;
1557
0
    }
1558
345
    DISSECTOR_ASSERT(d->src);
1559
345
    DISSECTOR_ASSERT(d->dst);
1560
345
  }
1561
1562
407
  c_header_init(&d->header);
1563
407
  d->item_root = NULL;
1564
407
  d->pinfo    = pinfo;
1565
407
}
1566
1567
/** Save packet data.
1568
 *
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..
1571
 *
1572
 * This function only actually saves the state when necessary.
1573
 */
1574
static
1575
void c_pkt_data_save(c_pkt_data *d, packet_info *pinfo, unsigned off)
1576
345
{
1577
345
  if (!pinfo->fd->visited)
1578
345
  {
1579
    /*
1580
      Save a copy of the state for next time we dissect this packet.
1581
    */
1582
345
    p_add_proto_data(wmem_file_scope(), pinfo, proto_ceph, off,
1583
345
                c_conv_data_clone(d->convd));
1584
345
  }
1585
345
}
1586
1587
/** Check if packet is from the client.
1588
 *
1589
 * Returns true iff the packet is from the client.
1590
 */
1591
static
1592
bool c_from_client(c_pkt_data *d)
1593
96
{
1594
96
  return d->src == &d->convd->client;
1595
96
}
1596
1597
/** Check if packet is from the server.
1598
 *
1599
 * See c_from_client()
1600
 */
1601
static
1602
bool c_from_server(c_pkt_data *d)
1603
23
{
1604
23
  return d->src == &d->convd->server;
1605
23
}
1606
1607
static
1608
void c_set_type(c_pkt_data *data, const char *type)
1609
313
{
1610
313
  col_add_str(data->pinfo->cinfo, COL_INFO, type);
1611
313
  proto_item_append_text(data->item_root, " %s", type);
1612
313
}
1613
1614
#define c_append_text(data, ti, ...) \
1615
0
  do { \
1616
0
    proto_item_append_text(ti, __VA_ARGS__); \
1617
0
    proto_item_append_text(data->item_root, __VA_ARGS__); \
1618
0
  } while (0);
1619
1620
/** Format a timespec.
1621
 *
1622
 * The returned string has packet lifetime.
1623
 */
1624
static
1625
char *c_format_timespec(tvbuff_t *tvb, unsigned off)
1626
0
{
1627
0
  nstime_t t;
1628
0
  t.secs  = tvb_get_letohl(tvb, off);
1629
0
  t.nsecs = tvb_get_letohl(tvb, off+4);
1630
0
  return abs_time_to_str(wmem_packet_scope(), &t, ABSOLUTE_TIME_LOCAL, 1);
1631
0
}
1632
1633
/** Format a UUID
1634
 *
1635
 * The returned string has packet lifetime.
1636
 */
1637
static
1638
char *c_format_uuid(tvbuff_t *tvb, unsigned off)
1639
0
{
1640
0
  e_guid_t uuid;
1641
0
  tvb_get_guid(tvb, off, &uuid, ENC_BIG_ENDIAN);
1642
0
  return guid_to_str(wmem_packet_scope(), &uuid);
1643
0
}
1644
1645
436
#define C_NEEDMORE      UINT_MAX
1646
413
#define C_INVALID       0
1647
1648
/*** Expert info warning functions. ***/
1649
1650
/** Warn about unused data.
1651
 *
1652
 * Check if there is unused data and if there is warn about it.
1653
 *
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.
1660
 */
1661
static
1662
bool c_warn_unused(proto_tree *tree,
1663
           tvbuff_t *tvb, unsigned start, unsigned end, c_pkt_data *data)
1664
0
{
1665
0
  unsigned diff;
1666
1667
0
  DISSECTOR_ASSERT_CMPUINT(start, <=, end);
1668
1669
0
  diff = end - start;
1670
0
  if (!diff) return false; /* no unused space. */
1671
1672
0
  proto_tree_add_expert_format(tree, data->pinfo, &ei_unused,
1673
0
             tvb, start, diff,
1674
0
             "%u unused byte%s", diff, diff == 1? "":"s");
1675
1676
0
  return true;
1677
0
}
1678
1679
/** Warn about dissection using more data then expected.
1680
 *
1681
 * Check if there is an overrun and if there is warn about it.
1682
 *
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.
1689
 */
1690
static
1691
bool c_warn_overrun(proto_tree *tree,
1692
      tvbuff_t *tvb, unsigned start, unsigned end, c_pkt_data *data)
1693
6
{
1694
6
  unsigned diff;
1695
1696
6
  DISSECTOR_ASSERT_CMPUINT(start, <=, end);
1697
1698
6
  diff = end - start;
1699
6
  if (!diff) return false; /* no unused space. */
1700
1701
0
  proto_tree_add_expert_format(tree, data->pinfo, &ei_overrun,
1702
0
             tvb, start, diff,
1703
0
             "%u overrun byte%s", diff, diff == 1? "":"s");
1704
1705
0
  return true;
1706
6
}
1707
1708
/** Warn about incorrect offset.
1709
 *
1710
 * Check if the offset is at the expected location, otherwise warn about it.
1711
 *
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.
1718
 */
1719
static
1720
bool c_warn_size(proto_tree *tree,
1721
         tvbuff_t *tvb, unsigned act, unsigned exp, c_pkt_data *data)
1722
6
{
1723
6
  if (act < exp) return c_warn_unused (tree, tvb, act, exp, data);
1724
6
  else         return c_warn_overrun(tree, tvb, exp, act, data);
1725
6
}
1726
1727
/** Warn about version mismatches.
1728
 *
1729
 * Check that the version is within the supported range, otherwise warn about
1730
 * it.
1731
 *
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.
1738
 */
1739
static
1740
int c_warn_ver(proto_item *ti,
1741
         int act, int min, int max, c_pkt_data *data)
1742
0
{
1743
0
  DISSECTOR_ASSERT_CMPINT(min, <=, max);
1744
1745
0
  if (act < min)
1746
0
  {
1747
0
    expert_add_info_format(data->pinfo, ti, &ei_ver_tooold,
1748
0
               "Version %d is lower then the minimum "
1749
0
               "supported version (%d).",
1750
0
               act, min);
1751
0
    return -1;
1752
0
  }
1753
0
  if (act > max)
1754
0
  {
1755
0
    expert_add_info_format(data->pinfo, ti, &ei_ver_toonew,
1756
0
               "Version %d is higher then the maximum "
1757
0
               "supported version (%d).",
1758
0
               act, max);
1759
0
    return 1;
1760
0
  }
1761
1762
0
  return 0;
1763
0
}
1764
1765
/***** Data Structure Dissectors *****/
1766
1767
/** Dissect a length-delimited binary blob.
1768
 */
1769
static
1770
unsigned c_dissect_blob(proto_tree *root, int hf, int hf_data, int hf_len,
1771
         tvbuff_t *tvb, unsigned off)
1772
0
{
1773
0
  proto_item *ti;
1774
0
  proto_tree *tree;
1775
0
  uint32_t size;
1776
1777
0
  size = tvb_get_letohl(tvb, off);
1778
1779
0
  ti = proto_tree_add_item(root, hf, tvb, off, size+4, ENC_NA);
1780
0
  tree = proto_item_add_subtree(ti, ett_data);
1781
1782
0
  proto_item_append_text(ti, ", Size: %"PRIu32, size);
1783
0
  if (size)
1784
0
  {
1785
0
    proto_item_append_text(ti, ", Data: %s",
1786
0
               tvb_bytes_to_str(wmem_packet_scope(), tvb, off+4, size));
1787
0
  }
1788
1789
0
  proto_tree_add_item(tree, hf_len,
1790
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
1791
0
  off += 4;
1792
0
  proto_tree_add_item(tree, hf_data,
1793
0
          tvb, off, size, ENC_NA);
1794
0
  off += size;
1795
1796
0
  return off;
1797
0
}
1798
1799
/** Dissect a blob of data.
1800
 *
1801
 * This is intended for data that is not yet being dissected but will be later.
1802
 */
1803
static
1804
unsigned c_dissect_data(proto_tree *tree, int hf,
1805
         tvbuff_t *tvb, unsigned off)
1806
0
{
1807
0
  return c_dissect_blob(tree, hf, hf_data_data, hf_data_size, tvb, off);
1808
0
}
1809
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;
1814
1815
/** Dissect a length-delimited string.
1816
 *
1817
 * If \a out is provided the string will be stored there.
1818
 */
1819
static
1820
unsigned c_dissect_str(proto_tree *root, int hf, c_str *out,
1821
         tvbuff_t *tvb, unsigned off)
1822
0
{
1823
0
  proto_item *ti;
1824
0
  proto_tree *tree;
1825
0
  c_str d;
1826
1827
0
  d.size = tvb_get_letohl(tvb, off);
1828
0
  d.str  = (char*)tvb_get_string_enc(wmem_packet_scope(),
1829
0
             tvb, off+4, d.size, ENC_ASCII);
1830
1831
0
  ti = proto_tree_add_string(root, hf, tvb, off, 4+d.size, d.str);
1832
0
  tree = proto_item_add_subtree(ti, ett_str);
1833
1834
0
  proto_tree_add_item(tree, hf_string_size,
1835
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
1836
0
  off += 4;
1837
0
  proto_tree_add_item(tree, hf_string_data,
1838
0
          tvb, off, d.size, ENC_UTF_8);
1839
0
  off += d.size;
1840
1841
0
  if (out) *out = d;
1842
1843
0
  return off;
1844
0
}
1845
1846
385
#define C_SIZE_SOCKADDR_STORAGE 128
1847
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. */
1851
1852
  c_inet af;         /** Address family. */
1853
  uint16_t port;         /** Network Port. */
1854
} c_sockaddr;
1855
1856
/** Dissect sockaddr structure.
1857
 *
1858
 * If \a out is provided the data will be stored there.
1859
 */
1860
static
1861
unsigned c_dissect_sockaddr(proto_tree *root, c_sockaddr *out,
1862
       tvbuff_t *tvb, unsigned off)
1863
23
{
1864
23
  proto_item *ti;
1865
23
  proto_tree *tree;
1866
23
  c_sockaddr d;
1867
1868
  /*
1869
  struct sockaddr_storage {
1870
    uint16_t family;
1871
    uint8_t pad[???]; // Implementation defined.
1872
  };
1873
  struct sockaddr_in {
1874
    uint16_t family;
1875
    uint16_t port;
1876
    uint32_t addr;
1877
    uint8_t pad[8];
1878
  };
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;
1885
  };
1886
  */
1887
1888
23
  ti = proto_tree_add_item(root, hf_sockaddr,
1889
23
         tvb, off, C_SIZE_SOCKADDR_STORAGE, ENC_NA);
1890
23
  tree = proto_item_add_subtree(ti, ett_sockaddr);
1891
1892
23
  d.af = (c_inet)tvb_get_ntohs(tvb, off);
1893
1894
23
  proto_tree_add_item(tree, hf_inet_family, tvb, off, 2, ENC_BIG_ENDIAN);
1895
1896
23
  switch (d.af) {
1897
0
  case C_IPv4:
1898
0
    d.port     = tvb_get_ntohs(tvb, off+2);
1899
0
    d.addr_str = tvb_ip_to_str(wmem_packet_scope(), tvb, off+4);
1900
1901
0
    proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
1902
0
    proto_tree_add_item(tree, hf_addr_ipv4, tvb, off+4, 4, ENC_BIG_ENDIAN);
1903
0
    break;
1904
0
  case C_IPv6:
1905
0
    d.port     = tvb_get_ntohs (tvb, off+2);
1906
0
    d.addr_str = tvb_ip6_to_str(wmem_packet_scope(), tvb, off+8);
1907
1908
0
    proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
1909
0
    proto_tree_add_item(tree, hf_addr_ipv6, tvb, off+8, 16, ENC_NA);
1910
0
    break;
1911
23
  default:
1912
23
    d.port = 0;
1913
23
    d.addr_str = "Unknown INET";
1914
23
  }
1915
23
  off += C_SIZE_SOCKADDR_STORAGE; /* Skip over sockaddr_storage. */
1916
1917
23
  d.str = wmem_strdup_printf(wmem_packet_scope(), "%s:%"PRIu16,
1918
23
           d.addr_str,
1919
23
           d.port);
1920
23
  proto_item_append_text(ti, ": %s", d.str);
1921
1922
23
  if (out) *out = d;
1923
1924
23
  return off;
1925
23
}
1926
1927
339
#define C_SIZE_ENTITY_ADDR (4 + 4 + C_SIZE_SOCKADDR_STORAGE)
1928
1929
typedef struct _c_entity_addr {
1930
  c_sockaddr addr;
1931
  const char *type_str;
1932
  c_node_type type;
1933
} c_entityaddr;
1934
1935
static
1936
unsigned c_dissect_entityaddr(proto_tree *root, int hf, c_entityaddr *out,
1937
         tvbuff_t *tvb, unsigned off)
1938
23
{
1939
23
  proto_item *ti;
1940
23
  proto_tree *tree;
1941
23
  c_entityaddr d;
1942
1943
  /* entity_addr_t from ceph:/src/msg/msg_types.h */
1944
1945
23
  ti = proto_tree_add_item(root, hf, tvb, off, C_SIZE_ENTITY_ADDR, ENC_NA);
1946
23
  tree = proto_item_add_subtree(ti, ett_entityaddr);
1947
1948
23
  d.type = (c_node_type)tvb_get_letohl(tvb, off);
1949
23
  d.type_str = c_node_type_string(d.type);
1950
23
  proto_tree_add_item(tree, hf_node_type,
1951
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
1952
23
  off += 4;
1953
23
  proto_tree_add_item(tree, hf_node_nonce,
1954
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
1955
23
  off += 4;
1956
23
  off = c_dissect_sockaddr(tree, &d.addr, tvb, off);
1957
1958
23
  proto_item_append_text(ti, ", Type: %s, Address: %s",
1959
23
             d.type_str, d.addr.str);
1960
1961
23
  if (out) *out = d;
1962
1963
23
  return off;
1964
23
}
1965
1966
18
#define C_SIZE_ENTITY_NAME 9
1967
1968
/** Dissect a ceph_entity_name.
1969
 *
1970
 * If \a out is provided the data is stored there.
1971
 */
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_)
1975
6
{
1976
  /* From ceph:/src/include/msgr.h
1977
  struct ceph_entity_name {
1978
    __u8 type;  // CEPH_ENTITY_TYPE_*
1979
    __le64 num;
1980
  } __attribute__ ((packed));
1981
  */
1982
1983
6
  proto_item *ti;
1984
6
  proto_tree *tree;
1985
6
  c_entityname d;
1986
1987
6
  ti = proto_tree_add_item(root, hf,
1988
6
         tvb, off, C_SIZE_ENTITY_NAME, ENC_NA);
1989
6
  tree = proto_item_add_subtree(ti, ett_entityname);
1990
1991
6
  d.type     = (c_node_type)tvb_get_uint8(tvb, off);
1992
6
  d.type_str = c_node_type_abbr_string(d.type);
1993
6
  proto_tree_add_item(tree, hf_node_type,
1994
6
          tvb, off, 1, ENC_LITTLE_ENDIAN);
1995
6
  off += 1;
1996
1997
6
  d.id   = tvb_get_letoh64(tvb, off);
1998
6
  proto_tree_add_item(tree, hf_node_id,
1999
6
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2000
6
  off += 8;
2001
2002
6
  if (d.id == UINT64_MAX)
2003
0
  {
2004
0
    d.slug = d.type_str;
2005
0
  }
2006
6
  else
2007
6
  {
2008
6
    d.slug = wmem_strdup_printf(wmem_packet_scope(), "%s%"PRIu64,
2009
6
              d.type_str,
2010
6
              d.id);
2011
6
  }
2012
2013
6
  proto_item_append_text(ti, ": %s", d.slug);
2014
2015
6
  if (out) *out = d;
2016
6
  return off;
2017
6
}
2018
2019
typedef struct _c_entityinst {
2020
  c_entityname name;
2021
  c_entityaddr addr;
2022
} c_entityinst;
2023
2024
/** Dissect an entity_inst_t.
2025
 */
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)
2029
0
{
2030
0
  proto_item *ti;
2031
0
  proto_tree *tree;
2032
2033
0
  c_entityinst d;
2034
2035
0
  ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2036
0
  tree = proto_item_add_subtree(ti, ett_entityinst);
2037
2038
0
  off = c_dissect_entityname(tree, hf_entityinst_name, &d.name, tvb, off, data);
2039
0
  off = c_dissect_entityaddr(tree, hf_entityinst_addr, &d.addr, tvb, off);
2040
2041
0
  proto_item_append_text(ti, ", Name: %s, Address: %s", d.name.slug, d.addr.addr.str);
2042
2043
0
  if (out) *out = d;
2044
2045
0
  proto_item_set_end(ti, tvb, off);
2046
0
  return off;
2047
0
}
2048
2049
/** Dissect an EntityName.
2050
 *
2051
 * If \a out is provided the data is stored there.
2052
 *
2053
 * \note This is different then c_dissect_entityname()
2054
 */
2055
static
2056
unsigned c_dissect_EntityName(proto_tree *root,
2057
         tvbuff_t *tvb, unsigned off, c_pkt_data *data _U_)
2058
0
{
2059
  /* EntityName from ceph:/src/common/entity_name.h */
2060
2061
0
  proto_item *ti;
2062
0
  proto_tree *tree;
2063
0
  c_node_type type;
2064
0
  c_str name;
2065
2066
0
  ti = proto_tree_add_item(root, hf_EntityName,
2067
0
         tvb, off, -1, ENC_NA);
2068
0
  tree = proto_item_add_subtree(ti, ett_EntityName);
2069
2070
0
  type = (c_node_type)tvb_get_letohl(tvb, off);
2071
0
  proto_tree_add_item(tree, hf_EntityName_type,
2072
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2073
0
  off += 4;
2074
2075
0
  off = c_dissect_str(tree, hf_EntityName_id, &name, tvb, off);
2076
2077
0
  proto_item_append_text(ti, ": %s.%s",
2078
0
             c_node_type_abbr_string(type), name.str);
2079
2080
0
  proto_item_set_end(ti, tvb, off);
2081
0
  return off;
2082
0
}
2083
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_)
2088
91
{
2089
91
  static int * const lowword[] = {
2090
91
    &hf_feature_uid,
2091
91
    &hf_feature_nosrcaddr,
2092
91
    &hf_feature_monclockcheck,
2093
91
    &hf_feature_flock,
2094
91
    &hf_feature_subscribe2,
2095
91
    &hf_feature_monnames,
2096
91
    &hf_feature_reconnect_seq,
2097
91
    &hf_feature_dirlayouthash,
2098
91
    &hf_feature_objectlocator,
2099
91
    &hf_feature_pgid64,
2100
91
    &hf_feature_incsubosdmap,
2101
91
    &hf_feature_pgpool3,
2102
91
    &hf_feature_osdreplymux,
2103
91
    &hf_feature_osdenc,
2104
91
    &hf_feature_omap,
2105
91
    &hf_feature_monenc,
2106
91
    &hf_feature_query_t,
2107
91
    &hf_feature_indep_pg_map,
2108
91
    &hf_feature_crush_tunables,
2109
91
    &hf_feature_chunky_scrub,
2110
91
    &hf_feature_mon_nullroute,
2111
91
    &hf_feature_mon_gv,
2112
91
    &hf_feature_backfill_reservation,
2113
91
    &hf_feature_msg_auth,
2114
91
    &hf_feature_recovery_reservation,
2115
91
    &hf_feature_crush_tunables2,
2116
91
    &hf_feature_createpoolid,
2117
91
    &hf_feature_reply_create_inode,
2118
91
    &hf_feature_osd_hbmsgs,
2119
91
    &hf_feature_mdsenc,
2120
91
    &hf_feature_osdhashpspool,
2121
91
    &hf_feature_mon_single_paxos,
2122
91
    NULL
2123
91
  };
2124
91
  static int * const highword[] = {
2125
91
    &hf_feature_osd_snapmapper,
2126
91
    &hf_feature_mon_scrub,
2127
91
    &hf_feature_osd_packed_recovery,
2128
91
    &hf_feature_osd_cachepool,
2129
91
    &hf_feature_crush_v2,
2130
91
    &hf_feature_export_peer,
2131
91
    &hf_feature_osd_erasure_codes,
2132
91
    &hf_feature_osd_tmap2omap,
2133
91
    &hf_feature_osdmap_enc,
2134
91
    &hf_feature_mds_inline_data,
2135
91
    &hf_feature_crush_tunables3,
2136
91
    &hf_feature_osd_primary_affinity,
2137
91
    &hf_feature_msgr_keepalive2,
2138
91
    &hf_feature_reserved,
2139
91
    NULL
2140
91
  };
2141
2142
  /* Wireshark doesn't have support for 64 bit bitfields so dissect as
2143
     two 32 bit ones. */
2144
2145
91
  proto_tree_add_bitmask(tree, tvb, off, hf_features_low, hf_features_low,
2146
91
             lowword, ENC_LITTLE_ENDIAN);
2147
91
  off += 4;
2148
2149
91
  proto_tree_add_bitmask(tree, tvb, off, hf_features_high, hf_features_high,
2150
91
             highword, ENC_LITTLE_ENDIAN);
2151
91
  off += 4;
2152
2153
91
  return off;
2154
91
}
2155
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_)
2160
97
{
2161
97
  static int * const flags[] = {
2162
97
    &hf_flag_lossy,
2163
97
    NULL
2164
97
  };
2165
2166
97
  proto_tree_add_bitmask(tree, tvb, off, hf_flags, hf_flags,
2167
97
             flags, ENC_LITTLE_ENDIAN);
2168
2169
97
  return off+1;
2170
97
}
2171
2172
14
#define C_OSD_FLAG_ACK        0x00000001   /* want (or is) "ack" ack */
2173
14
#define C_OSD_FLAG_ONNVRAM      0x00000002   /* want (or is) "onnvram" ack */
2174
14
#define C_OSD_FLAG_ONDISK     0x00000004   /* want (or is) "ondisk" ack */
2175
14
#define C_OSD_FLAG_RETRY      0x00000008   /* resend attempt */
2176
14
#define C_OSD_FLAG_READ       0x00000010   /* op may read */
2177
14
#define C_OSD_FLAG_WRITE      0x00000020   /* op may write */
2178
14
#define C_OSD_FLAG_ORDERSNAP      0x00000040   /* EOLDSNAP if snapc is out of order */
2179
14
#define C_OSD_FLAG_PEERSTAT_OLD     0x00000080   /* DEPRECATED msg includes osd_peer_stat */
2180
14
#define C_OSD_FLAG_BALANCE_READS    0x00000100
2181
14
#define C_OSD_FLAG_PARALLELEXEC     0x00000200   /* execute op in parallel */
2182
14
#define C_OSD_FLAG_PGOP       0x00000400   /* pg op, no object */
2183
14
#define C_OSD_FLAG_EXEC       0x00000800   /* op may exec */
2184
14
#define C_OSD_FLAG_EXEC_PUBLIC      0x00001000   /* DEPRECATED op may exec (public) */
2185
14
#define C_OSD_FLAG_LOCALIZE_READS   0x00002000   /* read from nearby replica, if any */
2186
14
#define C_OSD_FLAG_RWORDERED      0x00004000   /* order wrt concurrent reads */
2187
14
#define C_OSD_FLAG_IGNORE_CACHE     0x00008000   /* ignore cache logic */
2188
14
#define C_OSD_FLAG_SKIPRWLOCKS      0x00010000   /* skip rw locks */
2189
14
#define C_OSD_FLAG_IGNORE_OVERLAY   0x00020000   /* ignore pool overlay */
2190
14
#define C_OSD_FLAG_FLUSH      0x00040000   /* this is part of flush */
2191
14
#define C_OSD_FLAG_MAP_SNAP_CLONE   0x00080000   /* map snap direct to clone id */
2192
14
#define C_OSD_FLAG_ENFORCE_SNAPC    0x00100000   /* use snapc provided even if pool uses pool snaps */
2193
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_)
2198
0
{
2199
0
  static int * const flags[] = {
2200
0
    &hf_osd_flag_ack,
2201
0
    &hf_osd_flag_onnvram,
2202
0
    &hf_osd_flag_ondisk,
2203
0
    &hf_osd_flag_retry,
2204
0
    &hf_osd_flag_read,
2205
0
    &hf_osd_flag_write,
2206
0
    &hf_osd_flag_ordersnap,
2207
0
    &hf_osd_flag_peerstat_old,
2208
0
    &hf_osd_flag_balance_reads,
2209
0
    &hf_osd_flag_parallelexec,
2210
0
    &hf_osd_flag_pgop,
2211
0
    &hf_osd_flag_exec,
2212
0
    &hf_osd_flag_exec_public,
2213
0
    &hf_osd_flag_localize_reads,
2214
0
    &hf_osd_flag_rwordered,
2215
0
    &hf_osd_flag_ignore_cache,
2216
0
    &hf_osd_flag_skiprwlocks,
2217
0
    &hf_osd_flag_ignore_overlay,
2218
0
    &hf_osd_flag_flush,
2219
0
    &hf_osd_flag_map_snap_clone,
2220
0
    &hf_osd_flag_enforce_snapc,
2221
0
    NULL
2222
0
  };
2223
2224
0
  proto_tree_add_bitmask(tree, tvb, off, hf_osd_flags, hf_osd_flags,
2225
0
             flags, ENC_LITTLE_ENDIAN);
2226
2227
0
  return off+4;
2228
0
}
2229
2230
/** Dissect a map<string,string>
2231
 */
2232
static
2233
unsigned c_dissect_kv(proto_tree *root, int hf, int hf_k, int hf_v,
2234
       tvbuff_t *tvb, unsigned off)
2235
0
{
2236
0
  proto_item *ti;
2237
0
  proto_tree *tree;
2238
0
  c_str k, v;
2239
2240
0
  ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_LITTLE_ENDIAN);
2241
0
  tree = proto_item_add_subtree(ti, ett_kv);
2242
2243
0
  off = c_dissect_str(tree, hf_k, &k, tvb, off);
2244
0
  off = c_dissect_str(tree, hf_v, &v, tvb, off);
2245
2246
0
  proto_item_append_text(ti, ", %s = %s", k.str, v.str);
2247
0
  proto_item_set_end(ti, tvb, off);
2248
2249
0
  return off;
2250
0
}
2251
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;
2258
2259
/** Dissect and 'encoded' struct.
2260
 *
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.
2265
 */
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)
2270
0
{
2271
0
  proto_item *ti;
2272
2273
0
  DISSECTOR_ASSERT_HINT(enc, "enc out parameter must be non-null.");
2274
2275
0
  enc->version = tvb_get_uint8(tvb, off);
2276
0
  ti = proto_tree_add_item(tree, hf_encoded_ver,
2277
0
         tvb, off++, 1, ENC_LITTLE_ENDIAN);
2278
  /* XXX - should we quit if this doesn't return 0? */
2279
0
  c_warn_ver(ti, enc->version, minver, maxver, data);
2280
0
  enc->compat = tvb_get_uint8(tvb, off);
2281
0
  proto_tree_add_item(tree, hf_encoded_compat,
2282
0
          tvb, off++, 1, ENC_LITTLE_ENDIAN);
2283
2284
0
  enc->size = tvb_get_letohl(tvb, off);
2285
0
  proto_tree_add_item(tree, hf_encoded_size,
2286
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2287
0
  off += 4;
2288
2289
0
  enc->end = off + enc->size;
2290
2291
0
  return off;
2292
0
}
2293
2294
35
#define C_SIZE_TIMESPEC  (4 + 4)
2295
2296
0
#define C_SIZE_EVERSION  12
2297
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_)
2302
0
{
2303
0
  proto_item *ti;
2304
0
  proto_tree *tree;
2305
0
  uint64_t ver;
2306
0
  uint32_t epoch;
2307
2308
  /** eversion_t from ceph:/src/osd/osd_types.h */
2309
2310
0
  ti   = proto_tree_add_item(root, hf, tvb, off, C_SIZE_EVERSION, ENC_NA);
2311
0
  tree = proto_item_add_subtree(ti, ett_eversion);
2312
2313
  /*** version_t ***/
2314
0
  ver = tvb_get_letoh64(tvb, off);
2315
0
  proto_tree_add_item(tree, hf_version, tvb, off, 8, ENC_LITTLE_ENDIAN);
2316
0
  off += 8;
2317
2318
  /*** epoch_t ***/
2319
0
  epoch = tvb_get_letohl(tvb, off);
2320
0
  proto_tree_add_item(tree, hf_epoch, tvb, off, 4, ENC_LITTLE_ENDIAN);
2321
0
  off += 4;
2322
2323
0
  proto_item_append_text(ti,
2324
0
             ", Version: %"PRId64
2325
0
             ", Epoch: %"PRId32,
2326
0
             ver, epoch);
2327
2328
0
  proto_item_set_end(ti, tvb, off);
2329
0
  return off;
2330
0
}
2331
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)
2336
0
{
2337
0
  proto_item *ti;
2338
0
  proto_tree *tree;
2339
0
  c_encoded enchdr;
2340
0
  c_str key, nspace;
2341
0
  int64_t hash;
2342
2343
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2344
0
  tree = proto_item_add_subtree(ti, ett_objectlocator);
2345
2346
0
  off = c_dissect_encoded(tree, &enchdr, 3, 6, tvb, off, data);
2347
2348
0
  proto_item_append_text(ti, ", Pool: %"PRId64,
2349
0
             tvb_get_letohi64(tvb, off));
2350
0
  proto_tree_add_item(tree, hf_pool, tvb, off, 8, ENC_LITTLE_ENDIAN);
2351
0
  off += 8;
2352
2353
0
  off += 4; /* Skip over preferred == -1 that old code used. */
2354
2355
0
  key.size = tvb_get_letohl(tvb, off);
2356
0
  if (key.size)
2357
0
  {
2358
0
    off = c_dissect_str(tree, hf_key, &key, tvb, off);
2359
0
    proto_item_append_text(ti, ", Key: \"%s\"", key.str);
2360
0
  }
2361
0
  else off += 4; /* If string is empty we should use hash. */
2362
2363
0
  if (enchdr.version >= 5)
2364
0
  {
2365
0
    off = c_dissect_str(tree, hf_namespace, &nspace, tvb, off);
2366
0
    if (nspace.size)
2367
0
      proto_item_append_text(ti, ", Namespace: \"%s\"", nspace.str);
2368
0
  }
2369
2370
0
  if (enchdr.version >= 6)
2371
0
  {
2372
0
    hash = tvb_get_letoh64(tvb, off);
2373
0
    if (hash >= 0)
2374
0
    {
2375
0
      proto_tree_add_item(tree, hf_hash, tvb, off, 8, ENC_LITTLE_ENDIAN);
2376
0
      proto_item_append_text(ti, ", Hash: %"PRId64, hash);
2377
0
    }
2378
0
    off += 8;
2379
0
  }
2380
0
  else hash = -1;
2381
2382
0
  if (key.size && hash >= 0)
2383
0
  {
2384
0
    proto_tree_add_expert(tree, data->pinfo, &ei_oloc_both, NULL, 0, 0);
2385
0
  }
2386
2387
0
  c_warn_size(tree, tvb, off, enchdr.end, data);
2388
0
  off = enchdr.end;
2389
2390
0
  proto_item_set_end(ti, tvb, off);
2391
0
  return off;
2392
0
}
2393
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)
2398
0
{
2399
0
  proto_item *ti, *ti2;
2400
0
  proto_tree *tree;
2401
0
  uint8_t ver;
2402
0
  int32_t preferred;
2403
2404
  /** pg_t from ceph:/src/osd/osd_types.h */
2405
2406
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2407
0
  tree = proto_item_add_subtree(ti, ett_pg);
2408
2409
0
  ver = tvb_get_uint8(tvb, off);
2410
0
  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
0
  c_warn_ver(ti2, ver, 1, 1, data);
2413
0
  off += 1;
2414
2415
0
  proto_item_append_text(ti, ", Pool: %"PRId64,
2416
0
             tvb_get_letoh64(tvb, off));
2417
0
  proto_tree_add_item(tree, hf_pgid_pool, tvb, off, 8, ENC_LITTLE_ENDIAN);
2418
0
  off += 8;
2419
2420
0
  proto_item_append_text(ti, ", Seed: %08"PRIX32,
2421
0
             tvb_get_letohl(tvb, off));
2422
0
  proto_tree_add_item(tree, hf_pgid_seed, tvb, off, 4, ENC_LITTLE_ENDIAN);
2423
0
  off += 4;
2424
2425
0
  preferred = tvb_get_letohl(tvb, off);
2426
0
  if (preferred >= 0)
2427
0
    proto_item_append_text(ti, ", Prefer: %"PRId32, preferred);
2428
0
  proto_tree_add_item(tree, hf_pgid_preferred, tvb, off, 4, ENC_LITTLE_ENDIAN);
2429
0
  off += 4;
2430
2431
0
  proto_item_set_end(ti, tvb, off);
2432
0
  return off;
2433
0
}
2434
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)
2439
0
{
2440
0
  proto_item *ti;
2441
0
  proto_tree *tree;
2442
0
  c_encoded enc;
2443
2444
  /** pg_create_t from ceph:/src/osd/osd_types.h */
2445
2446
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2447
0
  tree = proto_item_add_subtree(ti, ett_pg_create);
2448
2449
0
  off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2450
2451
0
  proto_tree_add_item(tree, hf_pg_create_epoch,
2452
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2453
0
  off += 4;
2454
2455
0
  off = c_dissect_pg(tree, hf_pg_create_parent, tvb, off, data);
2456
2457
0
  proto_tree_add_item(tree, hf_pg_create_splitbits,
2458
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2459
0
  off += 4;
2460
2461
0
  c_warn_size(tree, tvb, off, enc.end, data);
2462
0
  off = enc.end;
2463
2464
0
  proto_item_set_end(ti, tvb, off);
2465
0
  return off;
2466
0
}
2467
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)
2472
0
{
2473
0
  proto_item *ti, *ti2;
2474
0
  proto_tree *tree;
2475
0
  uint64_t inode;
2476
0
  c_str rel;
2477
0
  unsigned v;
2478
2479
  /** filepath from ceph:/src/include/filepath.h */
2480
2481
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2482
0
  tree = proto_item_add_subtree(ti, ett_filepath);
2483
2484
0
  v = tvb_get_uint8(tvb, off);
2485
0
  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
0
  c_warn_ver(ti2, v, 1, 1, data);
2488
0
  off += 1;
2489
2490
0
  inode = tvb_get_letoh64(tvb, off);
2491
0
  proto_tree_add_item(tree, hf_path_inode, tvb, off, 8, ENC_LITTLE_ENDIAN);
2492
0
  off += 8;
2493
2494
0
  off = c_dissect_str(tree, hf_path_rel, &rel, tvb, off);
2495
2496
0
  if (inode)
2497
0
    proto_item_append_text(ti, ", Inode: 0x%016"PRIu64, inode);
2498
0
  if (rel.size)
2499
0
    proto_item_append_text(ti, ", Rel: \"%s\"", rel.str);
2500
2501
0
  proto_item_set_end(ti, tvb, off);
2502
0
  return off;
2503
0
}
2504
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_)
2509
0
{
2510
0
  proto_item *ti;
2511
0
  proto_tree *tree;
2512
0
  uint64_t inode;
2513
2514
  /** MClientRequest::Release from ceph:/src/messages/MClientRequest.h */
2515
2516
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2517
0
  tree = proto_item_add_subtree(ti, ett_mds_release);
2518
2519
0
  inode = tvb_get_letoh64(tvb, off);
2520
0
  proto_tree_add_item(tree, hf_mds_release_inode,
2521
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2522
0
  off += 8;
2523
2524
0
  proto_tree_add_item(tree, hf_mds_release_capid,
2525
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2526
0
  off += 8;
2527
2528
0
  proto_tree_add_item(tree, hf_mds_release_new,
2529
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2530
0
  off += 4;
2531
2532
0
  proto_tree_add_item(tree, hf_mds_release_wanted,
2533
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2534
0
  off += 4;
2535
2536
0
  proto_tree_add_item(tree, hf_mds_release_seq,
2537
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2538
0
  off += 4;
2539
2540
0
  proto_tree_add_item(tree, hf_mds_release_seq_issue,
2541
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2542
0
  off += 4;
2543
2544
0
  proto_tree_add_item(tree, hf_mds_release_mseq,
2545
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2546
0
  off += 4;
2547
2548
0
  proto_tree_add_item(tree, hf_mds_release_dname_seq,
2549
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2550
0
  off += 4;
2551
2552
0
  off = c_dissect_str(tree, hf_mds_release_dname, NULL, tvb, off);
2553
2554
0
  proto_item_append_text(ti, ", Inode: 0x%016"PRIu64, inode);
2555
2556
0
  proto_item_set_end(ti, tvb, off);
2557
0
  return off;
2558
0
}
2559
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)
2564
0
{
2565
0
  proto_item *ti, *ti2;
2566
0
  proto_tree *tree;
2567
0
  c_encoded enc, encimpl;
2568
0
  c_hitset_params_type type;
2569
0
  uint32_t i;
2570
2571
  /** HitSet::Params from ceph:/src/osd/HitSet.h */
2572
2573
0
  ti   = proto_tree_add_item(root, hf_hitset_params, tvb, off, -1, ENC_NA);
2574
0
  tree = proto_item_add_subtree(ti, ett_hitset_params);
2575
2576
0
  off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2577
2578
0
  type = (c_hitset_params_type)tvb_get_uint8(tvb, off);
2579
0
  proto_item_append_text(ti, ", Type: %s", c_hitset_params_type_string(type));
2580
0
  ti2 = proto_tree_add_item(tree, hf_hitset_params_type,
2581
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2582
0
  off += 1;
2583
2584
0
  switch (type)
2585
0
  {
2586
0
  case C_HITSET_PARAMS_TYPE_NONE:
2587
0
    break;
2588
0
  case C_HITSET_PARAMS_TYPE_EXPLICIT_HASH:
2589
0
    off = c_dissect_encoded(tree, &encimpl, 1, 1, tvb, off, data);
2590
2591
0
    proto_tree_add_item(tree, hf_hitset_params_exphash_count,
2592
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
2593
0
    off += 8;
2594
2595
0
    i = tvb_get_letohl(tvb, off);
2596
0
    off += 4;
2597
0
    while (i--)
2598
0
    {
2599
0
      proto_tree_add_item(tree, hf_hitset_params_exphash_hit,
2600
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
2601
0
      off += 4;
2602
0
    }
2603
2604
0
    c_warn_size(tree, tvb, off, encimpl.end, data);
2605
0
    off = encimpl.end;
2606
0
    break;
2607
0
  default:
2608
0
    expert_add_info(data->pinfo, ti2, &ei_union_unknown);
2609
0
    off = enc.end; /* Skip everything. */
2610
0
  }
2611
2612
0
  c_warn_size(tree, tvb, off, enc.end, data);
2613
0
  off = enc.end;
2614
2615
0
  return off;
2616
0
}
2617
2618
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)
2623
0
{
2624
0
  proto_item *ti;
2625
0
  proto_tree *tree;
2626
0
  c_encoded enc;
2627
0
  uint64_t id;
2628
0
  c_str name;
2629
0
  char *date;
2630
2631
  /** pool_snap_info_t from ceph:/src/osd/osd_types.h */
2632
2633
0
  ti   = proto_tree_add_item(root, hf_snapinfo, tvb, off, -1, ENC_NA);
2634
0
  tree = proto_item_add_subtree(ti, ett_snapinfo);
2635
2636
0
  off = c_dissect_encoded(tree, &enc, 2, 2, tvb, off, data);
2637
2638
0
  id = tvb_get_letoh64(tvb, off);
2639
0
  proto_tree_add_item(tree, hf_snapinfo_id,
2640
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2641
0
  off += 8;
2642
2643
0
  date = c_format_timespec(tvb, off);
2644
0
  proto_tree_add_item(tree, hf_snapinfo_time,
2645
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2646
0
  off += 8;
2647
2648
0
  off = c_dissect_str(tree, hf_snapinfo_name, &name, tvb, off);
2649
2650
0
  proto_item_set_text(ti, ", ID: 0x%016"PRIX64
2651
0
          ", Name: %s, Date: %s",
2652
0
          id,
2653
0
          name.str,
2654
0
          date);
2655
2656
0
  c_warn_size(tree, tvb, off, enc.size, data);
2657
0
  off = enc.size;
2658
2659
0
  return off;
2660
0
}
2661
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)
2666
0
{
2667
0
  proto_item *ti, *ti2;
2668
0
  proto_tree *tree, *subtree;
2669
0
  c_encoded enc;
2670
0
  uint32_t i;
2671
0
  c_pgpool_type type;
2672
0
  c_pgpool_cachemode cachemode;
2673
2674
0
  static int * const flags_low[] = {
2675
0
    &hf_pgpool_flag_hashpool,
2676
0
    &hf_pgpool_flag_full,
2677
0
    &hf_pgpool_flag_fake_ec_pool,
2678
0
    NULL
2679
0
  };
2680
0
  static int * const flags_high[] = {
2681
0
    NULL
2682
0
  };
2683
2684
  /** pg_pool_t from ceph:/src/osd/osd_types.h */
2685
2686
0
  ti   = proto_tree_add_item(root, hf_pgpool, tvb, off, -1, ENC_NA);
2687
0
  tree = proto_item_add_subtree(ti, ett_pgpool);
2688
2689
0
  off = c_dissect_encoded(tree, &enc, 5, 15, tvb, off, data);
2690
2691
0
  type = (c_pgpool_type)tvb_get_uint8(tvb, off);
2692
0
  proto_tree_add_item(tree, hf_pgpool_type,
2693
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2694
0
  off += 1;
2695
2696
0
  proto_tree_add_item(tree, hf_pgpool_size,
2697
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2698
0
  off += 1;
2699
2700
0
  proto_tree_add_item(tree, hf_pgpool_crush_ruleset,
2701
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2702
0
  off += 1;
2703
2704
0
  proto_tree_add_item(tree, hf_pgpool_hash,
2705
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2706
0
  off += 1;
2707
2708
0
  proto_tree_add_item(tree, hf_pgpool_pgnum,
2709
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2710
0
  off += 4;
2711
2712
0
  proto_tree_add_item(tree, hf_pgpool_pgpnum,
2713
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2714
0
  off += 4;
2715
2716
0
  off += 4 + 4; /* Always 0 in new code.  Ignored field. */
2717
2718
0
  proto_tree_add_item(tree, hf_pgpool_changed,
2719
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2720
0
  off += 4;
2721
2722
0
  proto_tree_add_item(tree, hf_pgpool_snapseq,
2723
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2724
0
  off += 8;
2725
2726
0
  proto_tree_add_item(tree, hf_pgpool_snapepoch,
2727
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2728
0
  off += 4;
2729
2730
0
  i = tvb_get_letohl(tvb, off);
2731
0
  off += 4;
2732
0
  while (i--)
2733
0
  {
2734
0
    ti2 = proto_tree_add_item(tree, hf_pgpool_snap,
2735
0
            tvb, off, -1, ENC_NA);
2736
0
    subtree = proto_item_add_subtree(ti2, ett_pgpool_snap);
2737
2738
0
    proto_tree_add_item(subtree, hf_pgpool_snap_id,
2739
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
2740
0
    off += 8;
2741
2742
0
    off = c_dissect_snapinfo(subtree, tvb, off, data);
2743
2744
0
    proto_item_set_end(ti2, tvb, off);
2745
0
  }
2746
2747
0
  i = tvb_get_letohl(tvb, off);
2748
0
  off += 4;
2749
0
  while (i--)
2750
0
  {
2751
0
    ti2 = proto_tree_add_item(tree, hf_pgpool_snapdel,
2752
0
            tvb, off, -1, ENC_NA);
2753
0
    subtree = proto_item_add_subtree(ti2, ett_pgpool_snapdel);
2754
2755
0
    proto_tree_add_item(subtree, hf_pgpool_snapdel_from,
2756
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
2757
0
    off += 8;
2758
0
    proto_tree_add_item(subtree, hf_pgpool_snapdel_to,
2759
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
2760
0
    off += 8;
2761
2762
0
    proto_item_set_end(ti2, tvb, off);
2763
0
  }
2764
2765
0
  proto_tree_add_item(tree, hf_pgpool_uid,
2766
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2767
0
  off += 8;
2768
2769
0
  proto_tree_add_bitmask(tree, tvb, off, hf_pgpool_flags_low, hf_pgpool_flags_low,
2770
0
             flags_low, ENC_LITTLE_ENDIAN);
2771
0
  off += 4;
2772
0
  proto_tree_add_bitmask(tree, tvb, off, hf_pgpool_flags_high, hf_pgpool_flags_high,
2773
0
             flags_high, ENC_LITTLE_ENDIAN);
2774
0
  off += 4;
2775
2776
0
  proto_tree_add_item(tree, hf_pgpool_crash_reply_interval,
2777
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2778
0
  off += 4;
2779
2780
0
  proto_tree_add_item(tree, hf_pgpool_min_size,
2781
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2782
0
  off += 1;
2783
2784
0
  proto_tree_add_item(tree, hf_pgpool_quota_bytes,
2785
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2786
0
  off += 8;
2787
2788
0
  proto_tree_add_item(tree, hf_pgpool_quota_objects,
2789
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2790
0
  off += 8;
2791
2792
0
  i = tvb_get_letohl(tvb, off);
2793
0
  off += 4;
2794
0
  while (i--)
2795
0
  {
2796
0
    proto_tree_add_item(tree, hf_pgpool_tier,
2797
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
2798
0
    off += 8;
2799
0
  }
2800
2801
0
  proto_tree_add_item(tree, hf_pgpool_tierof,
2802
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2803
0
  off += 8;
2804
2805
0
  cachemode = (c_pgpool_cachemode)tvb_get_uint8(tvb, off);
2806
0
  proto_tree_add_item(tree, hf_pgpool_cachemode,
2807
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
2808
0
  off += 1;
2809
2810
0
  proto_tree_add_item(tree, hf_pgpool_readtier,
2811
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2812
0
  off += 8;
2813
2814
0
  proto_tree_add_item(tree, hf_pgpool_writetier,
2815
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2816
0
  off += 8;
2817
2818
0
  i = tvb_get_letohl(tvb, off);
2819
0
  off += 4;
2820
0
  while (i--)
2821
0
  {
2822
0
    c_str k, v;
2823
2824
0
    ti2 = proto_tree_add_item(tree, hf_pgpool_property, tvb, off, -1, ENC_NA);
2825
0
    subtree = proto_item_add_subtree(ti2, ett_pgpool_property);
2826
2827
0
    off = c_dissect_str(subtree, hf_pgpool_property_key, &k, tvb, off);
2828
0
    off = c_dissect_str(subtree, hf_pgpool_property_val, &v, tvb, off);
2829
2830
0
    proto_item_append_text(ti2, ": %s=%s", k.str, v.str);
2831
2832
0
    proto_item_set_end(ti2, tvb, off);
2833
0
  }
2834
2835
0
  off = c_dissect_hitset_params(tree, tvb, off, data);
2836
2837
0
  proto_tree_add_item(tree, hf_pgpool_hitset_period,
2838
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2839
0
  off += 4;
2840
2841
0
  proto_tree_add_item(tree, hf_pgpool_hitset_count,
2842
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2843
0
  off += 4;
2844
2845
0
  proto_tree_add_item(tree, hf_pgpool_stripewidth,
2846
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2847
0
  off += 4;
2848
2849
0
  proto_tree_add_item(tree, hf_pgpool_targetmaxsize,
2850
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2851
0
  off += 8;
2852
2853
0
  proto_tree_add_item(tree, hf_pgpool_targetmaxobj,
2854
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2855
0
  off += 8;
2856
2857
0
  proto_tree_add_item(tree, hf_pgpool_cache_targetdirtyratio,
2858
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2859
0
  off += 4;
2860
2861
0
  proto_tree_add_item(tree, hf_pgpool_cache_targetfullratio,
2862
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2863
0
  off += 4;
2864
2865
0
  proto_tree_add_item(tree, hf_pgpool_cache_flushage_min,
2866
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2867
0
  off += 4;
2868
2869
0
  proto_tree_add_item(tree, hf_pgpool_cache_evictage_min,
2870
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2871
0
  off += 4;
2872
2873
0
  off = c_dissect_str(tree, hf_pgpool_erasurecode_profile, NULL, tvb, off);
2874
2875
0
  proto_tree_add_item(tree, hf_pgpool_lastforceresend,
2876
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
2877
0
  off += 4;
2878
2879
0
  c_warn_size(tree, tvb, off, enc.end, data);
2880
0
  off = enc.end;
2881
2882
0
  proto_item_append_text(ti, ", Type: %s, Cache Mode: %s",
2883
0
             c_pgpool_type_string(type),
2884
0
             c_pgpool_cachemode_string(cachemode));
2885
2886
0
  return off;
2887
0
}
2888
2889
/** Dissect a MonMap. */
2890
static
2891
unsigned c_dissect_monmap(proto_tree *root,
2892
           tvbuff_t *tvb, unsigned off, c_pkt_data *data)
2893
0
{
2894
0
  proto_item *ti, *ti2;
2895
0
  proto_tree *tree, *subtree;
2896
0
  unsigned size, end;
2897
0
  uint32_t i;
2898
0
  c_encoded enc;
2899
0
  c_str str;
2900
0
  c_entityaddr addr;
2901
2902
  /** MonMap from ceph:/src/mon/MonMap.cc */
2903
2904
0
  size = tvb_get_letohl(tvb, off);
2905
0
  end = off + 4 + size;
2906
2907
  /* No data here. */
2908
0
  if (!size) return end;
2909
2910
0
  ti   = proto_tree_add_item(root, hf_monmap, tvb, off, size, ENC_NA);
2911
0
  tree = proto_item_add_subtree(ti, ett_mon_map);
2912
2913
0
  off += 4;
2914
2915
0
  off = c_dissect_encoded(tree, &enc, 3, 3, tvb, off, data);
2916
  /* Check the blob size and encoded size match. */
2917
0
  c_warn_size(tree, tvb, enc.end, end, data);
2918
2919
0
  proto_tree_add_item(tree, hf_monmap_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
2920
0
  off += 16;
2921
2922
0
  proto_tree_add_item(tree, hf_monmap_epoch, tvb, off, 4, ENC_LITTLE_ENDIAN);
2923
0
  off += 4;
2924
2925
0
  i = tvb_get_letohl(tvb, off);
2926
0
  off += 4;
2927
0
  while (i--)
2928
0
  {
2929
0
    ti2 = proto_tree_add_item(tree, hf_monmap_address,
2930
0
            tvb, off, -1, ENC_NA);
2931
0
    subtree = proto_item_add_subtree(ti2, ett_mon_map_address);
2932
2933
0
    off = c_dissect_str(subtree, hf_monmap_address_name, &str, tvb, off);
2934
0
    off = c_dissect_entityaddr(subtree, hf_monmap_address_addr, &addr,
2935
0
             tvb, off);
2936
2937
0
    proto_item_append_text(ti2, ", Name: %s, Address: %s",
2938
0
               str.str, addr.addr.addr_str);
2939
2940
0
    proto_item_set_end(ti2, tvb, off);
2941
0
  }
2942
2943
0
  proto_tree_add_item(tree, hf_monmap_changed, tvb, off, 8, ENC_LITTLE_ENDIAN);
2944
0
  off += 8;
2945
2946
0
  proto_tree_add_item(tree, hf_monmap_created, tvb, off, 8, ENC_LITTLE_ENDIAN);
2947
0
  off += 8;
2948
2949
0
  c_warn_size(tree, tvb, off, end, data);
2950
0
  off = end;
2951
2952
0
  return off;
2953
0
}
2954
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)
2959
0
{
2960
0
  proto_item *ti;
2961
0
  proto_tree *tree;
2962
0
  c_encoded enc;
2963
2964
  /* osd_peer_stat_t from ceph:/src/osd/osd_types.h */
2965
2966
0
  ti   = proto_tree_add_item(root, hf_osd_peerstat, tvb, off, -1, ENC_NA);
2967
0
  tree = proto_item_add_subtree(ti, ett_osd_peerstat);
2968
2969
0
  off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
2970
2971
0
  proto_tree_add_item(tree, hf_osd_peerstat_timestamp,
2972
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
2973
0
  off += 8;
2974
2975
0
  c_warn_size(tree, tvb, off, enc.end, data);
2976
0
  off = enc.end;
2977
2978
0
  proto_item_set_end(ti, tvb, off);
2979
0
  return off;
2980
0
}
2981
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_)
2986
0
{
2987
0
  proto_item *ti;
2988
0
  proto_tree *tree;
2989
0
  uint32_t i;
2990
0
  uint64_t features;
2991
2992
  /* CompatSet::FeatureSet from ceph:/src/include/FeatureSet.h */
2993
2994
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
2995
0
  tree = proto_item_add_subtree(ti, ett_featureset);
2996
2997
0
  features = tvb_get_letoh64(tvb, off);
2998
0
  proto_tree_add_item(tree, hf_featureset_mask,
2999
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3000
0
  off += 8;
3001
3002
0
  i = tvb_get_letohl(tvb, off);
3003
0
  off += 4;
3004
0
  while (i--)
3005
0
  {
3006
0
    proto_item *ti2;
3007
0
    proto_tree *subtree;
3008
0
    uint64_t val;
3009
0
    c_str name;
3010
3011
0
    ti2 = proto_tree_add_item(tree, hf_featureset_name, tvb, off, -1, ENC_NA);
3012
0
    subtree = proto_item_add_subtree(ti2, ett_featureset_name);
3013
3014
0
    val = tvb_get_letoh64(tvb, off);
3015
0
    proto_tree_add_item(subtree, hf_featureset_name_val,
3016
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3017
0
    off += 8;
3018
3019
0
    off = c_dissect_str(subtree, hf_featureset_name_name, &name, tvb, off);
3020
3021
0
    proto_item_append_text(ti2, ", Value: %"PRIu64", Name: %s",
3022
0
               val, name.str);
3023
0
    proto_item_set_end(ti2, tvb, off);
3024
0
  }
3025
3026
0
  proto_item_append_text(ti, ", Features: 0x%016"PRIX64, features);
3027
0
  proto_item_set_end(ti, tvb, off);
3028
0
  return off;
3029
0
}
3030
3031
/** Dissect a CompatSet */
3032
static
3033
unsigned c_dissect_compatset(proto_tree *root,
3034
        tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3035
0
{
3036
0
  proto_item *ti;
3037
0
  proto_tree *tree;
3038
3039
  /* CompatSet from ceph:/src/include/CompatSet.h */
3040
3041
0
  ti   = proto_tree_add_item(root, hf_compatset, tvb, off, -1, ENC_NA);
3042
0
  tree = proto_item_add_subtree(ti, ett_compatset);
3043
3044
0
  off = c_dissect_featureset(tree, hf_compatset_compat, tvb, off, data);
3045
0
  off = c_dissect_featureset(tree, hf_compatset_compatro, tvb, off, data);
3046
0
  off = c_dissect_featureset(tree, hf_compatset_incompat, tvb, off, data);
3047
3048
0
  proto_item_set_end(ti, tvb, off);
3049
0
  return off;
3050
0
}
3051
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)
3056
0
{
3057
0
  proto_item *ti;
3058
0
  proto_tree *tree;
3059
0
  c_encoded enc;
3060
0
  uint32_t role, epoch;
3061
0
  double weight;
3062
3063
  /* OSDSuperblock from ceph:/src/osd/osd_types.h */
3064
3065
0
  ti   = proto_tree_add_item(root, hf_osd_superblock, tvb, off, -1, ENC_NA);
3066
0
  tree = proto_item_add_subtree(ti, ett_osd_superblock);
3067
3068
0
  off = c_dissect_encoded(tree, &enc, 5, 6, tvb, off, data);
3069
3070
0
  proto_tree_add_item(tree, hf_osd_superblock_clusterfsid,
3071
0
          tvb, off, 16, ENC_BIG_ENDIAN);
3072
0
  off += 16;
3073
3074
0
  role = tvb_get_letohl(tvb, off);
3075
0
  proto_tree_add_item(tree, hf_osd_superblock_role,
3076
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3077
0
  off += 4;
3078
3079
0
  epoch = tvb_get_letohl(tvb, off);
3080
0
  proto_tree_add_item(tree, hf_osd_superblock_epoch,
3081
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3082
0
  off += 4;
3083
3084
0
  proto_tree_add_item(tree, hf_osd_superblock_map_old,
3085
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3086
0
  off += 4;
3087
3088
0
  proto_tree_add_item(tree, hf_osd_superblock_map_new,
3089
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3090
0
  off += 4;
3091
3092
0
  weight = tvb_get_letohieee_double(tvb, off);
3093
0
  proto_tree_add_item(tree, hf_osd_superblock_weight,
3094
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3095
0
  off += 8;
3096
3097
0
  if (enc.version >= 2)
3098
0
    off = c_dissect_compatset(tree, tvb, off, data);
3099
3100
0
  proto_tree_add_item(tree, hf_osd_superblock_clean,
3101
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3102
0
  off += 4;
3103
3104
0
  proto_tree_add_item(tree, hf_osd_superblock_mounted,
3105
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3106
0
  off += 4;
3107
3108
0
  proto_item_append_text(ti, ", Role: %"PRId32", Weight: %lf"
3109
0
             ", Boot Epoch: %"PRId32,
3110
0
             role, weight, epoch);
3111
0
  if (enc.version >= 4)
3112
0
  {
3113
0
    proto_item_append_text(ti, ", OSD FSID: %s", c_format_uuid(tvb, off));
3114
0
    proto_tree_add_item(tree, hf_osd_superblock_osdfsid,
3115
0
            tvb, off, 16, ENC_BIG_ENDIAN);
3116
0
    off += 16;
3117
0
  }
3118
3119
0
  if (enc.version >= 6)
3120
0
  {
3121
0
    proto_tree_add_item(tree, hf_osd_superblock_full,
3122
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3123
0
    off += 4;
3124
0
  }
3125
3126
0
  c_warn_size(tree, tvb, off, enc.end, data);
3127
0
  off = enc.end;
3128
3129
0
  proto_item_set_end(ti, tvb, off);
3130
0
  return off;
3131
0
}
3132
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)
3137
0
{
3138
0
  proto_item *ti, *ti2;
3139
0
  proto_tree *tree;
3140
0
  uint8_t ver;
3141
3142
  /* osd_info_t from ceph:/src/osd/OSDMap.h */
3143
3144
0
  ti   = proto_tree_add_item(root, hf, tvb, off, 25, ENC_NA);
3145
0
  tree = proto_item_add_subtree(ti, ett_osd_info);
3146
3147
0
  ver = tvb_get_uint8(tvb, off);
3148
0
  ti2 = proto_tree_add_item(tree, hf_osdinfo_ver,
3149
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
3150
  /* XXX - should we quit if this doesn't return 0? */
3151
0
  c_warn_ver(ti2, ver, 1, 1, data);
3152
0
  off += 1;
3153
3154
0
  proto_tree_add_item(tree, hf_osdinfo_lastclean_begin,
3155
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3156
0
  off += 4;
3157
3158
0
  proto_tree_add_item(tree, hf_osdinfo_lastclean_end,
3159
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3160
0
  off += 4;
3161
3162
0
  proto_tree_add_item(tree, hf_osdinfo_up_from,
3163
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3164
0
  off += 4;
3165
3166
0
  proto_tree_add_item(tree, hf_osdinfo_up_through,
3167
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3168
0
  off += 4;
3169
3170
0
  proto_tree_add_item(tree, hf_osdinfo_downat,
3171
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3172
0
  off += 4;
3173
3174
0
  proto_tree_add_item(tree, hf_osdinfo_lostat,
3175
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3176
0
  off += 4;
3177
3178
0
  return off;
3179
0
}
3180
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)
3185
0
{
3186
0
  proto_item *ti;
3187
0
  proto_tree *tree;
3188
0
  c_encoded enc;
3189
3190
  /* osd_xinfo_t from ceph:/src/osd/OSDMap.h */
3191
3192
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3193
0
  tree = proto_item_add_subtree(ti, ett_osd_xinfo);
3194
3195
0
  off = c_dissect_encoded(tree, &enc, 1, 3, tvb, off, data);
3196
3197
0
  proto_tree_add_item(tree, hf_osdxinfo_down,
3198
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3199
0
  off += 8;
3200
3201
0
  proto_tree_add_item(tree, hf_osdxinfo_laggy_probability,
3202
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3203
0
  off += 4;
3204
3205
0
  proto_tree_add_item(tree, hf_osdxinfo_laggy_interval,
3206
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3207
0
  off += 4;
3208
3209
0
  if (enc.version >= 2 )
3210
0
  {
3211
0
    off = c_dissect_features(tree, tvb, off, data);
3212
0
  }
3213
0
  if (enc.version >= 3)
3214
0
  {
3215
0
    proto_tree_add_item(tree, hf_osdxinfo_oldweight,
3216
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3217
0
    off += 4;
3218
0
  }
3219
3220
0
  c_warn_size(tree, tvb, off, enc.end, data);
3221
0
  off = enc.end;
3222
0
  proto_item_set_end(ti, tvb, off);
3223
3224
0
  return off;
3225
0
}
3226
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)
3231
0
{
3232
0
  proto_item *ti;
3233
0
  proto_tree *tree;
3234
0
  c_encoded enc;
3235
3236
  /* objectstore_perfstat_t from ceph:/src/osd/osd_types.h */
3237
3238
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3239
0
  tree = proto_item_add_subtree(ti, ett_perfstat);
3240
3241
0
  off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
3242
3243
0
  proto_tree_add_item(tree, hf_perfstat_commitlatency,
3244
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3245
0
  off += 4;
3246
3247
0
  proto_tree_add_item(tree, hf_perfstat_applylatency,
3248
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3249
0
  off += 4;
3250
3251
0
  c_warn_size(tree, tvb, off, enc.end, data);
3252
0
  off = enc.end;
3253
3254
0
  proto_item_set_end(ti, tvb, off);
3255
0
  return off;
3256
0
}
3257
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)
3262
0
{
3263
0
  proto_item *ti;
3264
0
  proto_tree *tree;
3265
0
  c_encoded enc, enc2;
3266
0
  uint32_t i;
3267
3268
  /* osd_stat_t from ceph:/src/osd/osd_types.h */
3269
3270
0
  ti   = proto_tree_add_item(root, hf_osdstat, tvb, off, -1, ENC_NA);
3271
0
  tree = proto_item_add_subtree(ti, ett_pg_stat);
3272
3273
0
  off = c_dissect_encoded(tree, &enc, 2, 4, tvb, off, data);
3274
3275
0
  proto_tree_add_item(tree, hf_osdstat_kb,
3276
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3277
0
  off += 8;
3278
3279
0
  proto_tree_add_item(tree, hf_osdstat_kbused,
3280
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3281
0
  off += 8;
3282
3283
0
  proto_tree_add_item(tree, hf_osdstat_kbavail,
3284
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3285
0
  off += 8;
3286
3287
0
  proto_tree_add_item(tree, hf_osdstat_trimqueue,
3288
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3289
0
  off += 4;
3290
3291
0
  proto_tree_add_item(tree, hf_osdstat_trimming,
3292
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3293
0
  off += 4;
3294
3295
0
  i = tvb_get_letohl(tvb, off);
3296
0
  off += 4;
3297
0
  while (i--)
3298
0
  {
3299
0
    proto_tree_add_item(tree, hf_osdstat_hbin,
3300
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3301
0
    off += 4;
3302
0
  }
3303
3304
0
  i = tvb_get_letohl(tvb, off);
3305
0
  off += 4;
3306
0
  while (i--)
3307
0
  {
3308
0
    proto_tree_add_item(tree, hf_osdstat_hbout,
3309
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3310
0
    off += 4;
3311
0
  }
3312
3313
0
  if (enc.version >= 3)
3314
0
  {
3315
0
    off = c_dissect_encoded(tree, &enc2, 1, 1, tvb, off, data);
3316
0
    i = tvb_get_letohl(tvb, off);
3317
0
    off += 4;
3318
0
    if (i >= 1)
3319
0
      proto_tree_add_item(tree, hf_osdstat_opqueue,
3320
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
3321
0
    off += 4*i; /* Skip older values because they are unitless and meaningless. */
3322
0
    c_warn_size(tree, tvb, off, enc2.end, data);
3323
0
    off = enc2.end;
3324
0
  }
3325
3326
0
  if (enc.version >= 4)
3327
0
    off = c_dissect_perfstat(tree, hf_osdstat_fsperf, tvb, off, data);
3328
3329
0
  c_warn_size(tree, tvb, off, enc.end, data);
3330
0
  off = enc.end;
3331
3332
0
  proto_item_set_end(ti, tvb, off);
3333
0
  return off;
3334
0
}
3335
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_)
3340
0
{
3341
0
  off = c_dissect_data(root, hf_crush, tvb, off);
3342
3343
0
  return off;
3344
0
}
3345
3346
/** Dissect an OSDMap. */
3347
static
3348
unsigned c_dissect_osdmap(proto_tree *root,
3349
           tvbuff_t *tvb, unsigned off, c_pkt_data *data)
3350
0
{
3351
0
  proto_item *ti, *ti2;
3352
0
  proto_tree *tree, *subtree;
3353
0
  unsigned size, end;
3354
0
  uint32_t i;
3355
0
  c_encoded enc, enc2; /* There is an outer one, and multiple inner ones. */
3356
3357
  /*** Storage for values that will be formatted and
3358
   *** added to the root nodes.
3359
   ***/
3360
0
  char *fsid;
3361
0
  char *time_created, *time_modified;
3362
3363
  /* OSDMap from ceph:/src/osd/OSDMap.cc */
3364
3365
0
  size = tvb_get_letohl(tvb, off);
3366
0
  end = off + 4 + size;
3367
3368
0
  ti   = proto_tree_add_item(root, hf_osdmap, tvb, off, size, ENC_NA);
3369
0
  tree = proto_item_add_subtree(ti, ett_osd_map);
3370
3371
0
  off += 4;
3372
3373
0
  off = c_dissect_encoded(tree, &enc, 7, 7, tvb, off, data);
3374
  /* Check the blob size and encoded size match. */
3375
0
  c_warn_size(tree, tvb, enc.end, end, data);
3376
3377
  /*** Start first inner ***/
3378
0
  ti2 = proto_tree_add_item(tree, hf_osdmap_client, tvb, off, -1, ENC_NA);
3379
0
  subtree = proto_item_add_subtree(ti2, ett_osd_map_client);
3380
3381
0
  off = c_dissect_encoded(subtree, &enc2, 1, 3, tvb, off, data);
3382
0
  proto_item_set_len(ti2, enc2.size);
3383
3384
0
  fsid = c_format_uuid(tvb, off);
3385
0
  proto_tree_add_item(subtree, hf_osdmap_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
3386
0
  off += 16;
3387
3388
0
  proto_tree_add_item(subtree, hf_osdmap_epoch,
3389
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3390
0
  off += 4;
3391
3392
0
  time_created = c_format_timespec(tvb, off);
3393
0
  proto_tree_add_item(subtree, hf_osdmap_created,
3394
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3395
0
  off += 8;
3396
3397
0
  time_modified = c_format_timespec(tvb, off);
3398
0
  proto_tree_add_item(subtree, hf_osdmap_modified,
3399
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3400
0
  off += 8;
3401
3402
0
  i = tvb_get_letohl(tvb, off);
3403
0
  off += 4;
3404
0
  while (i--)
3405
0
  {
3406
0
    proto_item *poolti;
3407
0
    proto_tree *pooltree;
3408
0
    uint64_t id;
3409
3410
0
    poolti = proto_tree_add_item(subtree, hf_osdmap_pool,
3411
0
               tvb, off, -1, ENC_NA);
3412
0
    pooltree = proto_item_add_subtree(poolti, ett_osd_map_pool);
3413
3414
0
    id = tvb_get_letoh64(tvb, off);
3415
0
    proto_tree_add_item(pooltree, hf_osdmap_pool_id,
3416
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3417
0
    off += 8;
3418
3419
0
    off = c_dissect_pgpool(pooltree, tvb, off, data);
3420
3421
0
    proto_item_append_text(poolti, ", ID: 0x%016"PRIX64, id);
3422
3423
0
    proto_item_set_end(poolti, tvb, off);
3424
0
  }
3425
3426
0
  i = tvb_get_letohl(tvb, off);
3427
0
  off += 4;
3428
0
  while (i--)
3429
0
  {
3430
0
    proto_item *nameti;
3431
0
    proto_tree *nametree;
3432
0
    uint64_t id;
3433
0
    c_str name;
3434
3435
0
    nameti = proto_tree_add_item(subtree, hf_osdmap_poolname_item,
3436
0
               tvb, off, -1, ENC_NA);
3437
0
    nametree = proto_item_add_subtree(nameti, ett_osd_map_poolname);
3438
3439
0
    id = tvb_get_letoh64(tvb, off);
3440
0
    proto_tree_add_item(nametree, hf_osdmap_pool_id,
3441
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3442
0
    off += 8;
3443
3444
0
    off = c_dissect_str(nametree, hf_osdmap_poolname, &name, tvb, off);
3445
3446
0
    proto_item_append_text(nameti,
3447
0
               ", ID: 0x%016"PRIX64", Name: %s",
3448
0
               id, name.str);
3449
0
    proto_item_set_end(nameti, tvb, off);
3450
0
  }
3451
3452
0
  proto_tree_add_item(subtree, hf_osdmap_poolmax,
3453
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3454
0
  off += 4;
3455
3456
0
  proto_tree_add_item(subtree, hf_osdmap_flags,
3457
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3458
0
  off += 4;
3459
3460
0
  proto_tree_add_item(subtree, hf_osdmap_osdmax,
3461
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3462
0
  off += 4;
3463
3464
0
  i = tvb_get_letohl(tvb, off);
3465
0
  off += 4;
3466
0
  while (i--)
3467
0
  {
3468
0
    proto_tree_add_item(subtree, hf_osdmap_osd_state,
3469
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
3470
0
    off += 1;
3471
0
  }
3472
3473
0
  i = tvb_get_letohl(tvb, off);
3474
0
  off += 4;
3475
0
  while (i--)
3476
0
  {
3477
0
    proto_tree_add_item(subtree, hf_osdmap_osd_weight,
3478
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3479
0
    off += 4;
3480
0
  }
3481
3482
0
  i = tvb_get_letohl(tvb, off);
3483
0
  off += 4;
3484
0
  while (i--)
3485
0
  {
3486
0
    off = c_dissect_entityaddr(subtree, hf_osdmap_osd_addr, NULL,
3487
0
             tvb, off);
3488
0
  }
3489
3490
0
  i = tvb_get_letohl(tvb, off);
3491
0
  off += 4;
3492
0
  while (i--)
3493
0
  {
3494
0
    uint32_t j;
3495
0
    proto_item *pgtti;
3496
0
    proto_tree *pgttree;
3497
3498
0
    pgtti = proto_tree_add_item(subtree, hf_osdmap_pgtmp,
3499
0
             tvb, off, -1, ENC_NA);
3500
0
    pgttree = proto_item_add_subtree(pgtti, ett_osd_map_pgtmp);
3501
3502
0
    off = c_dissect_pg(pgttree, hf_osdmap_pgtmp_pg, tvb, off, data);
3503
3504
0
    j = tvb_get_letohl(tvb, off);
3505
0
    off += 4;
3506
0
    while (j--)
3507
0
    {
3508
0
      proto_tree_add_item(pgttree, hf_osdmap_pgtmp_val,
3509
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
3510
0
      off += 4;
3511
0
    }
3512
3513
0
    proto_item_set_end(pgtti, tvb, off);
3514
0
  }
3515
3516
0
  i = tvb_get_letohl(tvb, off);
3517
0
  off += 4;
3518
0
  while (i--)
3519
0
  {
3520
0
    proto_item *pgtti;
3521
0
    proto_tree *pgttree;
3522
3523
0
    pgtti = proto_tree_add_item(subtree, hf_osdmap_primarytmp,
3524
0
             tvb, off, -1, ENC_NA);
3525
0
    pgttree = proto_item_add_subtree(pgtti, ett_osd_map_primarytmp);
3526
3527
0
    off = c_dissect_pg(pgttree, hf_osdmap_primarytmp_pg, tvb, off, data);
3528
3529
0
    proto_tree_add_item(pgttree, hf_osdmap_primarytmp_val,
3530
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
3531
0
    off += 4;
3532
3533
0
    proto_item_set_end(pgtti, tvb, off);
3534
0
  }
3535
3536
0
  if (enc2.version >= 2)
3537
0
  {
3538
0
    i = tvb_get_letohl(tvb, off);
3539
0
    off += 4;
3540
0
    while (i--)
3541
0
    {
3542
0
      proto_tree_add_item(subtree, hf_osdmap_osd_primaryaffinity,
3543
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
3544
0
      off += 4;
3545
0
    }
3546
0
  }
3547
3548
0
  off = c_dissect_crush(subtree, tvb, off, data);
3549
3550
0
  if (enc2.version >= 3)
3551
0
  {
3552
0
    i = tvb_get_letohl(tvb, off);
3553
0
    off += 4;
3554
0
    while (i--)
3555
0
    {
3556
0
      uint32_t j;
3557
0
      proto_item *ecti;
3558
0
      proto_tree *ectree;
3559
0
      c_str profile;
3560
3561
0
      ecti = proto_tree_add_item(subtree, hf_osdmap_erasurecodeprofile,
3562
0
               tvb, off, -1, ENC_NA);
3563
0
      ectree = proto_item_add_subtree(ecti, ett_osd_map_erasurecodeprofile);
3564
3565
0
      off = c_dissect_str(ectree, hf_osdmap_erasurecodeprofile_name, &profile,
3566
0
              tvb, off);
3567
0
      proto_item_append_text(ecti, ", Name: %s", profile.str);
3568
3569
0
      j = tvb_get_letohl(tvb, off);
3570
0
      off += 4;
3571
0
      while (j--)
3572
0
      {
3573
0
        off = c_dissect_kv(ectree, hf_osdmap_erasurecodeprofile_prop,
3574
0
               hf_osdmap_erasurecodeprofile_k,
3575
0
               hf_osdmap_erasurecodeprofile_v,
3576
0
               tvb, off);
3577
0
      }
3578
3579
0
      proto_item_set_end(ecti, tvb, off);
3580
0
    }
3581
0
  }
3582
3583
0
  c_warn_size(subtree, tvb, off, enc2.end, data);
3584
0
  off = enc2.end;
3585
  /*** End first inner ***/
3586
3587
  /*** Start second inner ***/
3588
0
  ti2 = proto_tree_add_item(tree, hf_osdmap_osd, tvb, off, -1, ENC_NA);
3589
0
  subtree = proto_item_add_subtree(ti2, ett_osd_map_osd);
3590
0
  off = c_dissect_encoded(subtree, &enc2, 1, 1, tvb, off, data);
3591
0
  proto_item_set_len(ti2, enc2.size);
3592
3593
0
  i = tvb_get_letohl(tvb, off);
3594
0
  off += 4;
3595
0
  while (i--)
3596
0
  {
3597
0
    off = c_dissect_entityaddr(subtree, hf_osdmap_hbaddr_back, NULL,
3598
0
             tvb, off);
3599
0
  }
3600
3601
0
  i = tvb_get_letohl(tvb, off);
3602
0
  off += 4;
3603
0
  while (i--)
3604
0
  {
3605
0
    off = c_dissect_osdinfo(subtree, hf_osdmap_osd_info, tvb, off, data);
3606
0
  }
3607
3608
0
  i = tvb_get_letohl(tvb, off);
3609
0
  off += 4;
3610
0
  while (i--)
3611
0
  {
3612
0
    proto_item *blti;
3613
0
    proto_tree *bltree;
3614
3615
0
    blti = proto_tree_add_item(subtree, hf_osdmap_blacklist,
3616
0
             tvb, off, -1, ENC_NA);
3617
0
    bltree = proto_item_add_subtree(blti, ett_osd_map_blacklist);
3618
3619
0
    off = c_dissect_entityaddr(bltree, hf_osdmap_blacklist_addr, NULL,
3620
0
             tvb, off);
3621
3622
0
    proto_tree_add_item(bltree, hf_osdmap_blacklist_time,
3623
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3624
0
    off += 8;
3625
3626
0
    proto_item_set_end(blti, tvb, off);
3627
0
  }
3628
3629
0
  i = tvb_get_letohl(tvb, off);
3630
0
  off += 4;
3631
0
  while (i--)
3632
0
  {
3633
0
    off = c_dissect_entityaddr(subtree, hf_osdmap_cluster_addr, NULL,
3634
0
             tvb, off);
3635
0
  }
3636
3637
0
  proto_tree_add_item(subtree, hf_osdmap_cluster_snapepoch,
3638
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3639
0
  off += 4;
3640
3641
0
  off = c_dissect_str(subtree, hf_osdmap_cluster_snap, NULL, tvb, off);
3642
3643
0
  i = tvb_get_letohl(tvb, off);
3644
0
  off += 4;
3645
0
  while (i--)
3646
0
  {
3647
0
    proto_tree_add_item(subtree, hf_osdmap_osd_uuid,
3648
0
            tvb, off, 16, ENC_LITTLE_ENDIAN);
3649
0
    off += 16;
3650
0
  }
3651
3652
0
  i = tvb_get_letohl(tvb, off);
3653
0
  off += 4;
3654
0
  while (i--)
3655
0
  {
3656
0
    off = c_dissect_osd_xinfo(subtree, hf_osdmap_osd_xinfo, tvb, off, data);
3657
0
  }
3658
3659
0
  i = tvb_get_letohl(tvb, off);
3660
0
  off += 4;
3661
0
  while (i--)
3662
0
  {
3663
0
    off = c_dissect_entityaddr(subtree, hf_osdmap_hbaddr_front, NULL,
3664
0
             tvb, off);
3665
0
  }
3666
3667
0
  c_warn_size(subtree, tvb, off, enc2.end, data);
3668
0
  off = enc2.end;
3669
  /*** End second inner ***/
3670
3671
0
  proto_item_append_text(ti, ", FSID: %s, Created: %s, Modified: %s",
3672
0
             fsid,
3673
0
             time_created, time_modified);
3674
3675
0
  c_warn_size(tree, tvb, off, end, data);
3676
0
  off = end;
3677
3678
0
  return off;
3679
0
}
3680
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)
3685
0
{
3686
0
  proto_item *ti, *ti2;
3687
0
  proto_tree *tree, *subtree;
3688
0
  unsigned size, end;
3689
0
  c_encoded enc, enc2; /* There is an outer one, and multiple inner ones. */
3690
3691
  /** OSDMap::Incremental from ceph:/src/osd/OSDMap.cc */
3692
3693
0
  size = tvb_get_letohl(tvb, off);
3694
0
  end = off + 4 + size;
3695
3696
0
  ti   = proto_tree_add_item(root, hf_osdmap_inc, tvb, off, size, ENC_NA);
3697
0
  tree = proto_item_add_subtree(ti, ett_osd_map_inc);
3698
3699
0
  off += 4;
3700
3701
0
  off = c_dissect_encoded(tree, &enc, 7, 7, tvb, off, data);
3702
  /* Check the blob size and encoded size match. */
3703
0
  c_warn_size(tree, tvb, enc.end, end, data);
3704
3705
  /*** Start first inner ***/
3706
0
  ti2 = proto_tree_add_item(tree, hf_osdmap_inc_client, tvb, off, -1, ENC_NA);
3707
0
  subtree = proto_item_add_subtree(ti2, ett_osd_map_inc_client);
3708
3709
0
  off = c_dissect_encoded(subtree, &enc2, 1, 3, tvb, off, data);
3710
0
  proto_item_set_len(ti2, enc2.size);
3711
3712
0
  proto_tree_add_item(subtree, hf_osdmap_inc_fsid, tvb, off, 16, ENC_BIG_ENDIAN);
3713
0
  off += 16;
3714
3715
  /* @TODO: Dissect. */
3716
3717
0
  c_warn_size(subtree, tvb, off, enc2.end, data);
3718
0
  off = enc2.end;
3719
  /*** End first inner ***/
3720
3721
  /*** Start second inner ***/
3722
0
  ti2 = proto_tree_add_item(tree, hf_osdmap_inc_osd, tvb, off, -1, ENC_NA);
3723
0
  subtree = proto_item_add_subtree(ti2, ett_osd_map_inc_osd);
3724
0
  off = c_dissect_encoded(subtree, &enc2, 1, 1, tvb, off, data);
3725
0
  proto_item_set_len(ti2, enc2.size);
3726
3727
  /* @TODO: Dissect. */
3728
3729
0
  c_warn_size(subtree, tvb, off, enc2.end, data);
3730
0
  off = enc2.end;
3731
  /*** End second inner ***/
3732
3733
0
  c_warn_size(tree, tvb, off, end, data);
3734
0
  off = end;
3735
3736
0
  return off;
3737
0
}
3738
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;
3744
3745
0
#define C_SIZE_OSD_OP_MIN 34
3746
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)
3751
0
{
3752
0
  proto_item *ti, *ti2;
3753
0
  proto_tree *tree;
3754
0
  c_osd_op d;
3755
3756
0
  uint64_t offset, size;
3757
0
  uint64_t trunc_size, trunc_seq;
3758
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;
3819
    };
3820
    __le32 payload_size;
3821
  } __attribute__ ((packed));
3822
  */
3823
3824
0
  d.type = (c_osd_optype)tvb_get_letohs(tvb, off);
3825
3826
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3827
0
  tree = proto_item_add_subtree(ti, ett_osd_op);
3828
3829
0
  d.type_str = c_osd_optype_string(d.type);
3830
0
  proto_item_append_text(ti, ", Type: %s", d.type_str);
3831
0
  proto_tree_add_item(tree, hf_osd_op_type, tvb, off, 2, ENC_LITTLE_ENDIAN);
3832
0
  off += 2;
3833
3834
0
  off = c_dissect_osd_flags(tree, tvb, off, data);
3835
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
  ***/
3840
3841
0
  switch (d.type)
3842
0
  {
3843
0
  case C_OSD_OP_WRITE:
3844
0
  case C_OSD_OP_WRITEFULL:
3845
0
  case C_OSD_OP_ZERO:
3846
0
  case C_OSD_OP_TRUNCATE:
3847
0
  case C_OSD_OP_DELETE:
3848
0
  case C_OSD_OP_READ:
3849
0
  case C_OSD_OP_STAT:
3850
0
    offset = tvb_get_letoh64(tvb, off);
3851
0
    proto_tree_add_item(tree, hf_osd_op_extent_off,
3852
0
            tvb, off,  8, ENC_LITTLE_ENDIAN);
3853
0
    size = tvb_get_letoh64(tvb, off+8);
3854
0
    proto_tree_add_item(tree, hf_osd_op_extent_size,
3855
0
            tvb, off+8,  8, ENC_LITTLE_ENDIAN);
3856
0
    trunc_size = tvb_get_letoh64(tvb, off+16);
3857
0
    proto_tree_add_item(tree, hf_osd_op_extent_trunc_size,
3858
0
            tvb, off+16, 8, ENC_LITTLE_ENDIAN);
3859
0
    trunc_seq = tvb_get_letohl(tvb, off+24);
3860
0
    proto_tree_add_item(tree, hf_osd_op_extent_trunc_seq,
3861
0
            tvb, off+24, 4, ENC_LITTLE_ENDIAN);
3862
3863
0
    proto_item_append_text(ti, ", Offset: %"PRIu64
3864
0
               ", Size: %"PRIu64,
3865
0
               offset, size);
3866
0
    if (trunc_seq)
3867
0
      proto_item_append_text(ti, ", Truncate To: %"PRIu64,
3868
0
                 trunc_size);
3869
0
    break;
3870
0
  default:
3871
0
    ti2 = proto_tree_add_item(tree, hf_osd_op_data, tvb, off, 28, ENC_NA);
3872
0
    expert_add_info(data->pinfo, ti2, &ei_union_unknown);
3873
0
  }
3874
3875
0
  off += 28;
3876
3877
0
  d.payload_size = tvb_get_letohl(tvb, off);
3878
0
  proto_item_append_text(ti, ", Data Length: %"PRId32,
3879
0
             d.payload_size);
3880
0
  proto_tree_add_item(tree, hf_osd_op_payload_size,
3881
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
3882
0
  off += 4;
3883
3884
0
  proto_item_set_end(ti, tvb, off);
3885
3886
0
  if (out) *out = d;
3887
0
  return off;
3888
0
}
3889
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)
3894
0
{
3895
0
  proto_item *ti;
3896
0
  proto_tree *tree;
3897
0
  c_encoded enc;
3898
3899
  /** request_redirect_t from ceph:/src/osd/osd_types.h */
3900
3901
0
  ti = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
3902
0
  tree = proto_item_add_subtree(ti, ett_redirect);
3903
3904
0
  off = c_dissect_encoded(tree, &enc, 1, 1, tvb, off, data);
3905
3906
0
  off = c_dissect_object_locator(tree, hf_osd_redirect_oloc, tvb, off, data);
3907
3908
0
  if (tvb_get_letohl(tvb, off))
3909
0
  {
3910
0
    off = c_dissect_str(tree, hf_osd_redirect_obj, NULL, tvb, off);
3911
0
  }
3912
0
  else off += 4;
3913
3914
0
  off = c_dissect_blob(tree, hf_osd_redirect_osdinstr,
3915
0
           hf_osd_redirect_osdinstr_data, hf_osd_redirect_osdinstr_len,
3916
0
           tvb, off);
3917
3918
0
  c_warn_size(tree, tvb, off, enc.end, data);
3919
0
  off = enc.end;
3920
3921
0
  proto_item_set_end(ti, tvb, off);
3922
0
  return off;
3923
0
}
3924
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)
3929
0
{
3930
0
  c_encoded enc;
3931
3932
  /** object_stat_sum_t from ceph:/src/osd/osd_types.h */
3933
3934
0
  off = c_dissect_encoded(tree, &enc, 3, 9, tvb, off, data);
3935
3936
0
  proto_tree_add_item(tree, hf_statsum_bytes,
3937
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3938
0
  off += 8;
3939
0
  proto_tree_add_item(tree, hf_statsum_objects,
3940
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3941
0
  off += 8;
3942
0
  proto_tree_add_item(tree, hf_statsum_clones,
3943
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3944
0
  off += 8;
3945
0
  proto_tree_add_item(tree, hf_statsum_copies,
3946
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3947
0
  off += 8;
3948
0
  proto_tree_add_item(tree, hf_statsum_missing,
3949
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3950
0
  off += 8;
3951
0
  proto_tree_add_item(tree, hf_statsum_degraded,
3952
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3953
0
  off += 8;
3954
0
  proto_tree_add_item(tree, hf_statsum_unfound,
3955
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3956
0
  off += 8;
3957
0
  proto_tree_add_item(tree, hf_statsum_read_bytes,
3958
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3959
0
  off += 8;
3960
0
  proto_tree_add_item(tree, hf_statsum_read_kbytes,
3961
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3962
0
  off += 8;
3963
0
  proto_tree_add_item(tree, hf_statsum_written_bytes,
3964
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3965
0
  off += 8;
3966
0
  proto_tree_add_item(tree, hf_statsum_written_kbytes,
3967
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3968
0
  off += 8;
3969
0
  proto_tree_add_item(tree, hf_statsum_scrub_errors,
3970
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
3971
0
  off += 8;
3972
3973
0
  if (enc.version >= 5)
3974
0
  {
3975
0
    proto_tree_add_item(tree, hf_statsum_recovered,
3976
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3977
0
    off += 8;
3978
0
    proto_tree_add_item(tree, hf_statsum_bytes_recovered,
3979
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3980
0
    off += 8;
3981
0
    proto_tree_add_item(tree, hf_statsum_keys_recovered,
3982
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3983
0
    off += 8;
3984
0
  }
3985
0
  if (enc.version >= 6)
3986
0
  {
3987
0
    proto_tree_add_item(tree, hf_statsum_shallow_scrub_errors,
3988
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3989
0
    off += 8;
3990
0
    proto_tree_add_item(tree, hf_statsum_deep_scrub_errors,
3991
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3992
0
    off += 8;
3993
0
  }
3994
0
  if (enc.version >= 7)
3995
0
  {
3996
0
    proto_tree_add_item(tree, hf_statsum_dirty,
3997
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
3998
0
    off += 8;
3999
0
    proto_tree_add_item(tree, hf_statsum_whiteouts,
4000
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4001
0
    off += 8;
4002
0
  }
4003
0
  if (enc.version >= 8)
4004
0
  {
4005
0
    proto_tree_add_item(tree, hf_statsum_omap,
4006
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4007
0
    off += 8;
4008
0
  }
4009
0
  if (enc.version >= 9)
4010
0
  {
4011
0
    proto_tree_add_item(tree, hf_statsum_hitset_archive,
4012
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4013
0
    off += 8;
4014
0
  }
4015
4016
0
  c_warn_size(tree, tvb, off, enc.end, data);
4017
0
  off = enc.end;
4018
4019
0
  return off;
4020
0
}
4021
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)
4026
0
{
4027
0
  proto_item *ti;
4028
0
  proto_tree *tree;
4029
0
  c_encoded enc;
4030
0
  uint32_t i;
4031
4032
  /** object_stat_collection_t from ceph:/src/osd/osd_types.h */
4033
4034
0
  ti = proto_tree_add_item(root, hf_statcollection, tvb, off, -1, ENC_NA);
4035
0
  tree = proto_item_add_subtree(ti, ett_statcollection);
4036
4037
0
  off = c_dissect_encoded(tree, &enc, 2, 2, tvb, off, data);
4038
4039
0
  off = c_dissect_statsum(tree, tvb, off, data);
4040
0
  i = tvb_get_letohl(tvb, off);
4041
0
  off += 4;
4042
0
  while (i--)
4043
0
  {
4044
0
    off = c_dissect_str(tree, key, NULL, tvb, off);
4045
0
    off = c_dissect_statsum(tree, tvb, off, data);
4046
0
  }
4047
4048
0
  c_warn_size(tree, tvb, off, enc.end, data);
4049
0
  off = enc.end;
4050
4051
0
  proto_item_set_end(ti, tvb, off);
4052
0
  return off;
4053
0
}
4054
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)
4059
0
{
4060
0
  proto_item *ti;
4061
0
  proto_tree *tree;
4062
0
  c_encoded enc;
4063
0
  uint32_t i;
4064
4065
  /* pg_stat_t from ceph:/src/osd/osd_types.h */
4066
4067
0
  ti   = proto_tree_add_item(root, hf, tvb, off, -1, ENC_NA);
4068
0
  tree = proto_item_add_subtree(ti, ett_pg_stat);
4069
4070
0
  off = c_dissect_encoded(tree, &enc, 8, 17, tvb, off, data);
4071
4072
0
  off = c_dissect_eversion(tree, hf_pg_stat_ver, tvb, off, data);
4073
4074
0
  proto_tree_add_item(tree, hf_pg_stat_seq,
4075
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4076
0
  off += 8;
4077
4078
0
  proto_tree_add_item(tree, hf_pg_stat_epoch,
4079
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4080
0
  off += 4;
4081
4082
0
  proto_tree_add_item(tree, hf_pg_stat_state,
4083
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4084
0
  off += 4;
4085
4086
0
  off = c_dissect_eversion(tree, hf_pg_stat_logstart, tvb, off, data);
4087
0
  off = c_dissect_eversion(tree, hf_pg_stat_logstartondisk, tvb, off, data);
4088
4089
0
  proto_tree_add_item(tree, hf_pg_stat_created,
4090
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4091
0
  off += 4;
4092
4093
0
  proto_tree_add_item(tree, hf_pg_stat_lastepochclean,
4094
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4095
0
  off += 4;
4096
4097
0
  off = c_dissect_pg(tree, hf_pg_stat_parent, tvb, off, data);
4098
4099
0
  proto_tree_add_item(tree, hf_pg_stat_parent_splitbits,
4100
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4101
0
  off += 4;
4102
4103
0
  off = c_dissect_eversion(tree, hf_pg_stat_lastscrub, tvb, off, data);
4104
4105
0
  proto_tree_add_item(tree, hf_pg_stat_lastscrubstamp,
4106
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4107
0
  off += 8;
4108
4109
0
  off = c_dissect_statcollection(tree, hf_pg_stat_stats, tvb, off, data);
4110
4111
0
  proto_tree_add_item(tree, hf_pg_stat_logsize,
4112
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4113
0
  off += 8;
4114
4115
0
  proto_tree_add_item(tree, hf_pg_stat_logsizeondisk,
4116
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4117
0
  off += 8;
4118
4119
0
  i = tvb_get_letohl(tvb, off);
4120
0
  off += 4;
4121
0
  while (i--)
4122
0
  {
4123
0
    proto_tree_add_item(tree, hf_pg_stat_up,
4124
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4125
0
    off += 4;
4126
0
  }
4127
4128
0
  i = tvb_get_letohl(tvb, off);
4129
0
  off += 4;
4130
0
  while (i--)
4131
0
  {
4132
0
    proto_tree_add_item(tree, hf_pg_stat_acting,
4133
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4134
0
    off += 4;
4135
0
  }
4136
4137
0
  if (enc.version >= 9)
4138
0
  {
4139
0
    proto_tree_add_item(tree, hf_pg_stat_lastfresh,
4140
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4141
0
    off += 8;
4142
4143
0
    proto_tree_add_item(tree, hf_pg_stat_lastchange,
4144
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4145
0
    off += 8;
4146
4147
0
    proto_tree_add_item(tree, hf_pg_stat_lastactive,
4148
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4149
0
    off += 8;
4150
4151
0
    proto_tree_add_item(tree, hf_pg_stat_lastclean,
4152
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4153
0
    off += 8;
4154
4155
0
    proto_tree_add_item(tree, hf_pg_stat_lastunstale,
4156
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4157
0
    off += 8;
4158
4159
0
    proto_tree_add_item(tree, hf_pg_stat_mappingepoch,
4160
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4161
0
    off += 4;
4162
0
  }
4163
0
  if (enc.version >= 10)
4164
0
  {
4165
0
    off = c_dissect_eversion(tree, hf_pg_stat_lastdeepscrub, tvb, off, data);
4166
4167
0
    proto_tree_add_item(tree, hf_pg_stat_lastdeepscrubstamp,
4168
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4169
0
    off += 8;
4170
0
  }
4171
0
  if (enc.version >= 11)
4172
0
  {
4173
0
    proto_tree_add_item(tree, hf_pg_stat_statsinvalid,
4174
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4175
0
    off += 1;
4176
0
  }
4177
0
  if (enc.version >= 12)
4178
0
  {
4179
0
    proto_tree_add_item(tree, hf_pg_stat_lastcleanscrubstamp,
4180
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4181
0
    off += 8;
4182
0
  }
4183
0
  if (enc.version >= 13)
4184
0
  {
4185
0
    proto_tree_add_item(tree, hf_pg_stat_lastbecameactive,
4186
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4187
0
    off += 8;
4188
0
  }
4189
0
  if (enc.version >= 14)
4190
0
  {
4191
0
    proto_tree_add_item(tree, hf_pg_stat_dirtystatsinvalid,
4192
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4193
0
    off += 1;
4194
0
  }
4195
0
  if (enc.version >= 15)
4196
0
  {
4197
0
    proto_tree_add_item(tree, hf_pg_stat_upprimary,
4198
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4199
0
    off += 4;
4200
4201
0
    proto_tree_add_item(tree, hf_pg_stat_actingprimary,
4202
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4203
0
    off += 4;
4204
0
  }
4205
0
  if (enc.version >= 16)
4206
0
  {
4207
0
    proto_tree_add_item(tree, hf_pg_stat_omapstatsinvalid,
4208
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4209
0
    off += 1;
4210
0
  }
4211
0
  if (enc.version >= 17)
4212
0
  {
4213
0
    proto_tree_add_item(tree, hf_pg_stat_hitsetstatsinvalid,
4214
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4215
0
    off += 1;
4216
0
  }
4217
4218
0
  c_warn_size(tree, tvb, off, enc.end, data);
4219
0
  off = enc.end;
4220
4221
0
  proto_item_set_end(ti, tvb, off);
4222
0
  return off;
4223
0
}
4224
4225
0
#define C_SIZE_PAXOS 18
4226
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_)
4231
0
{
4232
0
  proto_item *ti;
4233
0
  proto_tree *tree;
4234
4235
  /** ceph:/src/messages/PaxosServiceMessage.h */
4236
4237
0
  ti = proto_tree_add_item(root, hf_paxos, tvb, off, C_SIZE_PAXOS, ENC_NA);
4238
0
  tree = proto_item_add_subtree(ti, ett_paxos);
4239
4240
0
  proto_tree_add_item(tree, hf_paxos_ver,
4241
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4242
0
  off += 8;
4243
0
  proto_tree_add_item(tree, hf_paxos_mon,
4244
0
          tvb, off, 2, ENC_LITTLE_ENDIAN);
4245
0
  off += 2;
4246
0
  proto_tree_add_item(tree, hf_paxos_mon_tid,
4247
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4248
0
  off += 8;
4249
4250
0
  return off;
4251
0
}
4252
4253
4254
/*** Message Dissectors ***/
4255
4256
/** Used to handle unknown messages.
4257
 *
4258
 * Simply displays the front, middle and data portions as binary strings.
4259
 */
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)
4265
6
{
4266
6
  unsigned off = 0;
4267
4268
6
  c_set_type(data, c_msg_type_string(data->header.type));
4269
6
  proto_item_append_text(data->item_root,
4270
6
             ", Type: %s, Front Len: %u, Middle Len: %u, Data Len %u",
4271
6
             c_msg_type_string(data->header.type),
4272
6
             front_len, middle_len, data_len);
4273
6
  expert_add_info(data->pinfo, tree, &ei_msg_unknown);
4274
4275
6
  if (front_len)
4276
0
  {
4277
0
    proto_tree_add_item(tree, hf_msg_front, tvb, off, front_len, ENC_NA);
4278
0
    off += front_len;
4279
0
  }
4280
6
  if (middle_len)
4281
0
  {
4282
0
    proto_tree_add_item(tree, hf_msg_middle, tvb, off, middle_len, ENC_NA);
4283
0
    off += middle_len;
4284
0
  }
4285
6
  if (data_len)
4286
0
  {
4287
0
    proto_tree_add_item(tree, hf_msg_data, tvb, off, data_len, ENC_NA);
4288
0
    off += data_len;
4289
0
  }
4290
4291
6
  return off;
4292
6
}
4293
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)
4300
0
{
4301
  /* ceph:/src/messages/MPing.h */
4302
0
  c_set_type(data, "Ping");
4303
0
  return 0;
4304
0
}
4305
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)
4312
0
{
4313
0
  proto_item *ti;
4314
0
  proto_tree *tree;
4315
4316
  /* ceph:/src/messages/MMonMap.h */
4317
4318
0
  c_set_type(data, "Mon Map");
4319
4320
0
  ti = proto_tree_add_item(root, hf_msg_mon_map, tvb, 0, front_len, ENC_NA);
4321
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_map);
4322
4323
0
  return c_dissect_monmap(tree, tvb, 0, data);
4324
0
}
4325
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)
4332
0
{
4333
0
  proto_item *ti;
4334
0
  proto_tree *tree;
4335
0
  unsigned off = 0;
4336
4337
  /* ceph:/src/messages/MStatfs.h */
4338
4339
0
  c_set_type(data, "Stat FS");
4340
4341
0
  off = c_dissect_paxos(root, tvb, off, data);
4342
4343
0
  ti = proto_tree_add_item(root, hf_msg_statfs, tvb, off, front_len, ENC_NA);
4344
0
  tree = proto_item_add_subtree(ti, ett_msg_statfs);
4345
4346
0
  proto_tree_add_item(tree, hf_msg_statfs_fsid,
4347
0
          tvb, off, 16, ENC_BIG_ENDIAN);
4348
0
  off += 16;
4349
4350
0
  return off;
4351
0
}
4352
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)
4359
0
{
4360
0
  proto_item *ti;
4361
0
  proto_tree *tree;
4362
0
  unsigned off = 0;
4363
4364
  /* ceph:/src/messages/MStatfsReply.h */
4365
4366
0
  c_set_type(data, "Stat FS Reply");
4367
4368
0
  ti = proto_tree_add_item(root, hf_msg_statfsreply, tvb, off, front_len, ENC_NA);
4369
0
  tree = proto_item_add_subtree(ti, ett_msg_statfsreply);
4370
4371
0
  proto_tree_add_item(tree, hf_msg_statfsreply_fsid,
4372
0
          tvb, off, 16, ENC_BIG_ENDIAN);
4373
0
  off += 16;
4374
4375
0
  proto_tree_add_item(tree, hf_msg_statfsreply_ver,
4376
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4377
0
  off += 8;
4378
4379
0
  proto_tree_add_item(tree, hf_msg_statfsreply_kb,
4380
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4381
0
  off += 8;
4382
4383
0
  proto_tree_add_item(tree, hf_msg_statfsreply_kbused,
4384
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4385
0
  off += 8;
4386
4387
0
  proto_tree_add_item(tree, hf_msg_statfsreply_kbavail,
4388
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4389
0
  off += 8;
4390
4391
0
  proto_tree_add_item(tree, hf_msg_statfsreply_obj,
4392
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4393
0
  off += 8;
4394
4395
0
  return off;
4396
0
}
4397
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)
4404
0
{
4405
0
  proto_item *ti, *subti, *subti2;
4406
0
  proto_tree *tree, *subtree;
4407
0
  unsigned off = 0;
4408
0
  unsigned len;
4409
0
  c_str str;
4410
4411
  /* ceph:/src/messages/MMonSubscribe.h */
4412
4413
0
  c_set_type(data, "Mon Subscribe");
4414
4415
0
  ti = proto_tree_add_item(root, hf_msg_mon_sub, tvb, off, front_len, ENC_NA);
4416
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_sub);
4417
4418
0
  c_append_text(data, ti, ", To: ");
4419
4420
0
  len = tvb_get_letohl(tvb, off);
4421
0
  proto_tree_add_item(tree, hf_msg_mon_sub_item_len,
4422
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4423
0
  off += 4;
4424
0
  while (len--)
4425
0
  {
4426
    /* From ceph:/src/include/ceph_fs.h
4427
    struct ceph_mon_subscribe_item {
4428
      __le64 start;
4429
      __u8 flags;
4430
    } __attribute__ ((packed))
4431
    */
4432
4433
0
    subti = proto_tree_add_item(tree, hf_msg_mon_sub_item,
4434
0
            tvb, off, -1, ENC_NA);
4435
0
    subtree = proto_item_add_subtree(subti, ett_msg_mon_sub_item);
4436
4437
0
    off = c_dissect_str(subtree, hf_msg_mon_sub_what, &str, tvb, off);
4438
4439
0
    c_append_text(data, ti, "%s%s", str.str, len? ",":"");
4440
4441
0
    proto_item_append_text(subti, " What: %s, Starting: %"PRIu64,
4442
0
               str.str,
4443
0
               tvb_get_letoh64(tvb, off));
4444
4445
0
    proto_tree_add_item(subtree, hf_msg_mon_sub_start,
4446
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4447
0
    off += 8;
4448
4449
    /* Flags */
4450
0
    subti2 = proto_tree_add_item(subtree, hf_msg_mon_sub_flags,
4451
0
               tvb, off, 1, ENC_LITTLE_ENDIAN);
4452
    /* Reuse subtree variable for flags. */
4453
0
    subtree = proto_item_add_subtree(subti2, ett_msg_mon_sub_flags);
4454
0
    proto_tree_add_item(subtree, hf_msg_mon_sub_flags_onetime,
4455
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4456
0
    off += 1;
4457
4458
0
    proto_item_set_end(ti, tvb, off);
4459
0
  }
4460
4461
0
  return off;
4462
0
}
4463
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)
4470
0
{
4471
0
  proto_item *ti;
4472
0
  proto_tree *tree;
4473
0
  unsigned off = 0;
4474
4475
  /* ceph:/src/messages/MMonSubscribeAck.h */
4476
4477
0
  c_set_type(data, "Mon Subscribe Ack");
4478
4479
0
  ti = proto_tree_add_item(root, hf_msg_mon_sub_ack, tvb, off, front_len, ENC_NA);
4480
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_sub_ack);
4481
4482
0
  proto_tree_add_item(tree, hf_msg_mon_sub_ack_interval,
4483
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4484
0
  off += 4;
4485
0
  proto_tree_add_item(tree, hf_msg_mon_sub_ack_fsid,
4486
0
          tvb, off, 16, ENC_BIG_ENDIAN);
4487
0
  off += 16;
4488
4489
0
  return off;
4490
0
}
4491
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)
4498
0
{
4499
0
  proto_item *ti, *ti2;
4500
0
  proto_tree *tree, *subtree;
4501
0
  unsigned off = 0, expectedoff;
4502
0
  uint8_t ver;
4503
0
  uint32_t i, len;
4504
0
  c_auth_proto proto;
4505
4506
  /* ceph:/src/messages/MAuth.h */
4507
4508
0
  c_set_type(data, "Auth");
4509
4510
0
  off = c_dissect_paxos(root, tvb, off, data);
4511
4512
0
  ti = proto_tree_add_item(root, hf_msg_auth, tvb, off, front_len-off, ENC_NA);
4513
0
  tree = proto_item_add_subtree(ti, ett_msg_auth);
4514
4515
0
  proto = (c_auth_proto)tvb_get_letohl(tvb, off);
4516
0
  proto_tree_add_item(tree, hf_msg_auth_proto,
4517
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4518
0
  off += 4;
4519
4520
0
  expectedoff = off + 4 + tvb_get_letohl(tvb, off);
4521
0
  off += 4;
4522
4523
0
  switch (proto)
4524
0
  {
4525
0
  case C_AUTH_PROTO_UNKNOWN:
4526
    /* auth_payload is a set of supported protocols. */
4527
0
    ti2 = proto_tree_add_item(tree, hf_msg_auth_supportedproto,
4528
0
            tvb, off, -1, ENC_NA);
4529
0
    subtree = proto_item_add_subtree(ti2, ett_msg_auth_supportedproto);
4530
4531
0
    ver = tvb_get_uint8(tvb, off);
4532
    /* XXX - should we quit if this doesn't return 0? */
4533
0
    c_warn_ver(ti2, ver, 1, 1, data);
4534
0
    proto_tree_add_item(tree, hf_msg_auth_supportedproto_ver,
4535
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
4536
0
    off += 1;
4537
4538
0
    len = tvb_get_letohl(tvb, off);
4539
0
    off += 4;
4540
0
    for (i = 0; i < len; i++)
4541
0
    {
4542
0
      c_auth_proto sp;
4543
0
      sp = (c_auth_proto)tvb_get_letohl(tvb, off);
4544
0
      proto_item_append_text(ti2, i?",%s":": %s", c_auth_proto_string(sp));
4545
0
      proto_tree_add_item(subtree, hf_msg_auth_supportedproto_proto,
4546
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
4547
0
      off += 4;
4548
0
    }
4549
4550
0
    off = c_dissect_EntityName(subtree, tvb, off, data);
4551
4552
0
    proto_tree_add_item(subtree, hf_msg_auth_supportedproto_gid,
4553
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4554
0
    off += 8;
4555
0
    break;
4556
0
  case C_AUTH_PROTO_CEPHX:
4557
0
  {
4558
0
    c_cephx_req_type type;
4559
4560
0
    ti2 = proto_tree_add_item(tree, hf_msg_auth_cephx, tvb, off, -1, ENC_NA);
4561
0
    subtree = proto_item_add_subtree(ti2, ett_msg_auth_cephx);
4562
4563
0
    type = (c_cephx_req_type)tvb_get_letohs(tvb, off);
4564
0
    proto_tree_add_item(subtree, hf_msg_auth_cephx_req_type,
4565
0
            tvb, off, 2, ENC_LITTLE_ENDIAN);
4566
0
    off += 2;
4567
4568
0
    switch (type)
4569
0
    {
4570
0
    default:
4571
0
      expert_add_info(data->pinfo, ti2, &ei_union_unknown);
4572
0
    }
4573
4574
0
    proto_item_append_text(ti2, ", Request Type: %s",
4575
0
               c_cephx_req_type_string(type));
4576
0
    break;
4577
0
  }
4578
0
  default:
4579
0
    expert_add_info(data->pinfo, ti, &ei_union_unknown);
4580
0
  }
4581
4582
0
  c_warn_size(tree, tvb, off, expectedoff, data);
4583
0
  off = expectedoff;
4584
4585
0
  if (off+4 == front_len) { /* If there is an epoch. */
4586
0
    proto_tree_add_item(tree, hf_msg_auth_monmap_epoch,
4587
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
4588
0
    off += 4;
4589
0
  }
4590
4591
0
  c_append_text(data, ti, ", Proto: %s", c_auth_proto_string(proto));
4592
4593
0
  return off;
4594
0
}
4595
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)
4602
0
{
4603
0
  proto_item *ti;
4604
0
  proto_tree *tree;
4605
0
  unsigned off = 0, expectedoff;
4606
0
  c_auth_proto proto;
4607
4608
  /* ceph:/src/messages/MAuthReply.h */
4609
4610
0
  c_set_type(data, "Auth Reply");
4611
4612
0
  ti = proto_tree_add_item(root, hf_msg_auth_reply, tvb, off, front_len, ENC_NA);
4613
0
  tree = proto_item_add_subtree(ti, ett_msg_authreply);
4614
4615
0
  proto = (c_auth_proto)tvb_get_letohl(tvb, off);
4616
0
  proto_tree_add_item(tree, hf_msg_auth_reply_proto,
4617
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4618
0
  off += 4;
4619
0
  proto_tree_add_item(tree, hf_msg_auth_reply_result,
4620
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4621
0
  off += 4;
4622
0
  proto_tree_add_item(tree, hf_msg_auth_reply_global_id,
4623
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4624
0
  off += 8;
4625
4626
0
  expectedoff = off + 4 + tvb_get_letohl(tvb, off);
4627
0
  off += 4;
4628
4629
0
  switch (proto)
4630
0
  {
4631
0
  default:
4632
0
    expert_add_info(data->pinfo, ti, &ei_union_unknown);
4633
0
  }
4634
4635
0
  c_warn_size(tree, tvb, off, expectedoff, data);
4636
0
  off = expectedoff;
4637
4638
0
  off = c_dissect_str(tree, hf_msg_auth_reply_msg, NULL, tvb, off);
4639
4640
0
  c_append_text(data, ti, ", Proto: %s", c_auth_proto_string(proto));
4641
4642
0
  return off;
4643
0
}
4644
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)
4651
0
{
4652
0
  proto_item *ti;
4653
0
  proto_tree *tree;
4654
0
  unsigned off = 0;
4655
0
  uint64_t tid;
4656
0
  c_str what;
4657
4658
  /* ceph:/src/messages/MMonGetVersion.h */
4659
4660
0
  c_set_type(data, "Monitor Get Version");
4661
4662
0
  ti = proto_tree_add_item(root, hf_msg_mon_getversion, tvb, off, front_len, ENC_NA);
4663
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_getversion);
4664
4665
0
  tid = tvb_get_letoh64(tvb, off);
4666
0
  proto_tree_add_item(tree, hf_msg_mon_getversion_tid,
4667
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4668
0
  off += 8;
4669
4670
0
  off = c_dissect_str(tree, hf_msg_mon_getversion_what, &what, tvb, off);
4671
4672
4673
0
  c_append_text(data, ti, ", TID: %"PRIu64", What: %s",
4674
0
          tid, what.str);
4675
4676
0
  return off;
4677
0
}
4678
4679
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)
4688
0
{
4689
0
  proto_item *ti;
4690
0
  proto_tree *tree;
4691
0
  unsigned off = 0;
4692
0
  uint64_t tid;
4693
0
  uint64_t ver, veroldest;
4694
4695
  /* ceph:/src/messages/MMonGetVersionReply.h */
4696
4697
0
  c_set_type(data, "Monitor Get Version Reply");
4698
4699
0
  ti = proto_tree_add_item(root, hf_msg_mon_getversionreply, tvb, off, front_len, ENC_NA);
4700
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_getversionreply);
4701
4702
0
  tid = tvb_get_letoh64(tvb, off);
4703
0
  proto_tree_add_item(tree, hf_msg_mon_getversionreply_tid,
4704
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4705
0
  off += 8;
4706
4707
0
  ver = tvb_get_letoh64(tvb, off);
4708
0
  proto_tree_add_item(tree, hf_msg_mon_getversionreply_ver,
4709
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4710
0
  off += 8;
4711
4712
0
  veroldest = tvb_get_letoh64(tvb, off);
4713
0
  proto_tree_add_item(tree, hf_msg_mon_getversionreply_veroldest,
4714
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4715
0
  off += 8;
4716
4717
0
  c_append_text(data, ti, ", TID: %"PRIu64
4718
0
          ", Version: %"PRIu64
4719
0
          ", Oldest Version: %"PRIu64,
4720
0
          tid, ver, veroldest);
4721
4722
0
  return off;
4723
0
}
4724
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)
4731
0
{
4732
0
  proto_item *ti;
4733
0
  proto_tree *tree;
4734
0
  unsigned off = 0;
4735
4736
  /* ceph:/src/messages/MMDSMap.h */
4737
4738
0
  c_set_type(data, "MDS Map");
4739
4740
0
  ti = proto_tree_add_item(root, hf_msg_mds_map, tvb, off, front_len, ENC_NA);
4741
0
  tree = proto_item_add_subtree(ti, ett_msg_mds_map);
4742
4743
0
  proto_tree_add_item(tree, hf_msg_mds_map_fsid,
4744
0
          tvb, off, 16, ENC_BIG_ENDIAN);
4745
0
  off += 16;
4746
4747
0
  proto_tree_add_item(tree, hf_msg_mds_map_epoch,
4748
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4749
0
  off += 4;
4750
4751
  /* @TODO: Dissect map data. */
4752
4753
0
  off = c_dissect_blob(tree, hf_msg_mds_map_datai,
4754
0
           hf_msg_mds_map_data, hf_msg_mds_map_data_size,
4755
0
           tvb, off);
4756
4757
0
  return off;
4758
0
}
4759
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)
4766
0
{
4767
0
  proto_item *ti;
4768
0
  proto_tree *tree;
4769
0
  unsigned off = 0;
4770
0
  c_session_op_type op;
4771
4772
  /* ceph:/src/messages/MClientSession.h */
4773
4774
0
  c_set_type(data, "Client Session");
4775
4776
0
  ti = proto_tree_add_item(root, hf_msg_client_sess, tvb, off, front_len, ENC_NA);
4777
0
  tree = proto_item_add_subtree(ti, ett_msg_client_sess);
4778
4779
0
  op = (c_session_op_type)tvb_get_letohl(tvb, off);
4780
0
  proto_tree_add_item(tree, hf_msg_client_sess_op,
4781
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4782
0
  off += 4;
4783
4784
0
  proto_tree_add_item(tree, hf_msg_client_sess_seq,
4785
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4786
0
  off += 8;
4787
4788
0
  proto_tree_add_item(tree, hf_msg_client_sess_time,
4789
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4790
0
  off += 8;
4791
4792
0
  proto_tree_add_item(tree, hf_msg_client_sess_caps_max,
4793
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4794
0
  off += 4;
4795
4796
0
  proto_tree_add_item(tree, hf_msg_client_sess_leases_max,
4797
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4798
0
  off += 4;
4799
4800
0
  c_append_text(data, ti, ", Operation: %s", c_session_op_type_string(op));
4801
4802
0
  return off;
4803
0
}
4804
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)
4811
0
{
4812
0
  proto_item *ti;
4813
0
  proto_tree *tree;
4814
0
  unsigned off = 0;
4815
0
  uint32_t i;
4816
0
  c_mds_op_type type;
4817
4818
  /* ceph:/src/messages/MClientRequest.h */
4819
4820
0
  c_set_type(data, "Client Request");
4821
4822
0
  ti = proto_tree_add_item(root, hf_msg_client_req, tvb, off, front_len, ENC_NA);
4823
0
  tree = proto_item_add_subtree(ti, ett_msg_client_req);
4824
4825
0
  proto_tree_add_item(tree, hf_msg_client_req_oldest_tid,
4826
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4827
0
  off += 8;
4828
4829
0
  proto_tree_add_item(tree, hf_msg_client_req_mdsmap_epoch,
4830
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4831
0
  off += 4;
4832
4833
0
  proto_tree_add_item(tree, hf_msg_client_req_flags,
4834
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4835
0
  off += 4;
4836
4837
0
  proto_tree_add_item(tree, hf_msg_client_req_retry,
4838
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4839
0
  off += 1;
4840
4841
0
  proto_tree_add_item(tree, hf_msg_client_req_forward,
4842
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4843
0
  off += 1;
4844
4845
0
  i = tvb_get_letohs(tvb, off);
4846
0
  proto_tree_add_item(tree, hf_msg_client_req_releases,
4847
0
          tvb, off, 2, ENC_LITTLE_ENDIAN);
4848
0
  off += 2;
4849
4850
0
  type = (c_mds_op_type)tvb_get_letohl(tvb, off);
4851
0
  proto_tree_add_item(tree, hf_msg_client_req_op,
4852
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4853
0
  off += 4;
4854
4855
0
  proto_tree_add_item(tree, hf_msg_client_req_caller_uid,
4856
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4857
0
  off += 4;
4858
4859
0
  proto_tree_add_item(tree, hf_msg_client_req_caller_gid,
4860
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4861
0
  off += 4;
4862
4863
0
  proto_tree_add_item(tree, hf_msg_client_req_inode,
4864
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
4865
0
  off += 8;
4866
4867
0
  off += 48; /* @TODO: Message specific data. */
4868
4869
0
  off = c_dissect_path(tree, hf_msg_client_req_path_src, tvb, off, data);
4870
0
  off = c_dissect_path(tree, hf_msg_client_req_path_dst, tvb, off, data);
4871
4872
0
  while (i--)
4873
0
  {
4874
0
    off = c_dissect_mds_release(tree, hf_msg_client_req_release,
4875
0
              tvb, off, data);
4876
0
  }
4877
4878
0
  if (data->header.ver >= 2)
4879
0
  {
4880
0
    proto_tree_add_item(tree, hf_msg_client_req_time,
4881
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
4882
0
    off += 8;
4883
0
  }
4884
4885
0
  c_append_text(data, ti, ", Operation: %s", c_mds_op_type_string(type));
4886
4887
0
  return off;
4888
0
}
4889
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)
4896
0
{
4897
0
  proto_item *ti;
4898
0
  proto_tree *tree;
4899
0
  unsigned off = 0;
4900
0
  uint32_t to, fwd;
4901
0
  uint8_t resend;
4902
4903
  /* ceph:/src/messages/MClientRequestForward.h */
4904
4905
0
  c_set_type(data, "Client Request Forward");
4906
4907
0
  ti = proto_tree_add_item(root, hf_msg_client_reqfwd, tvb, off, front_len, ENC_NA);
4908
0
  tree = proto_item_add_subtree(ti, ett_msg_client_reqfwd);
4909
4910
0
  to = tvb_get_letohl(tvb, off);
4911
0
  proto_tree_add_item(tree, hf_msg_client_reqfwd_dst,
4912
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4913
0
  off += 4;
4914
4915
0
  fwd = tvb_get_letohl(tvb, off);
4916
0
  proto_tree_add_item(tree, hf_msg_client_reqfwd_fwd,
4917
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4918
0
  off += 4;
4919
4920
0
  resend = tvb_get_uint8(tvb, off);
4921
0
  proto_tree_add_item(tree, hf_msg_client_reqfwd_resend,
4922
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4923
0
  off += 1;
4924
4925
0
  c_append_text(data, ti, ", To: mds%"PRIu32", Resend: %s, "
4926
0
          "Forwards: %"PRIu32,
4927
0
          to, resend? "True":"False", fwd);
4928
4929
0
  return off;
4930
0
}
4931
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)
4938
0
{
4939
0
  proto_item *ti;
4940
0
  proto_tree *tree;
4941
0
  unsigned off = 0;
4942
0
  c_mds_op_type type;
4943
4944
  /* ceph:/src/messages/MClientReply.h */
4945
4946
0
  c_set_type(data, "Client Reply");
4947
4948
0
  ti = proto_tree_add_item(root, hf_msg_client_reply, tvb, off, front_len, ENC_NA);
4949
0
  tree = proto_item_add_subtree(ti, ett_msg_client_reply);
4950
4951
0
  type = (c_mds_op_type)tvb_get_letohl(tvb, off);
4952
0
  proto_tree_add_item(tree, hf_msg_client_reply_op,
4953
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4954
0
  off += 4;
4955
4956
0
  proto_tree_add_item(tree, hf_msg_client_reply_result,
4957
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4958
0
  off += 4;
4959
4960
0
  proto_tree_add_item(tree, hf_msg_client_reply_mdsmap_epoch,
4961
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
4962
0
  off += 4;
4963
4964
0
  proto_tree_add_item(tree, hf_msg_client_reply_safe,
4965
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4966
0
  off += 1;
4967
4968
0
  proto_tree_add_item(tree, hf_msg_client_reply_isdentry,
4969
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4970
0
  off += 1;
4971
4972
0
  proto_tree_add_item(tree, hf_msg_client_reply_istarget,
4973
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
4974
0
  off += 1;
4975
4976
  /* @TODO: Dissect these. */
4977
0
  off = c_dissect_data(tree, hf_msg_client_reply_trace, tvb, off);
4978
0
  off = c_dissect_data(tree, hf_msg_client_reply_extra, tvb, off);
4979
0
  off = c_dissect_data(tree, hf_msg_client_reply_snaps, tvb, off);
4980
4981
0
  c_append_text(data, ti, ", Operation: %s", c_mds_op_type_string(type));
4982
4983
0
  return off;
4984
0
}
4985
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)
4992
0
{
4993
0
  proto_item *ti, *ti2;
4994
0
  proto_tree *tree, *subtree;
4995
0
  unsigned off = 0;
4996
0
  uint32_t i;
4997
0
  uint32_t epoch;
4998
4999
  /* ceph:/src/messages/MOSDMap.h */
5000
5001
0
  c_set_type(data, "OSD Map");
5002
5003
0
  ti = proto_tree_add_item(root, hf_msg_osd_map, tvb, off, front_len, ENC_NA);
5004
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_map);
5005
5006
0
  proto_tree_add_item(tree, hf_msg_osd_map_fsid,
5007
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5008
0
  off += 16;
5009
5010
  /*** Incremental Items ***/
5011
0
  i = tvb_get_letohl(tvb, off);
5012
0
  proto_tree_add_item(tree, hf_msg_osd_map_inc_len,
5013
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5014
0
  c_append_text(data, ti, ", Incremental Items: %u", i);
5015
5016
0
  off += 4;
5017
0
  while (i--)
5018
0
  {
5019
0
    ti2 = proto_tree_add_item(tree, hf_msg_osd_map_inc,
5020
0
            tvb, off, -1, ENC_NA);
5021
0
    subtree = proto_item_add_subtree(ti2, ett_msg_osd_map_inc);
5022
5023
0
    epoch = tvb_get_letohl(tvb, off);
5024
0
    proto_tree_add_item(subtree, hf_msg_osd_map_epoch,
5025
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5026
0
    off += 4;
5027
5028
0
    off = c_dissect_osdmap_inc(subtree, tvb, off, data);
5029
5030
0
    proto_item_append_text(ti2, ", For Epoch: %"PRIu32, epoch);
5031
0
    proto_item_set_end(ti2, tvb, off);
5032
0
  }
5033
5034
  /*** Non-incremental Items ***/
5035
0
  i = tvb_get_letohl(tvb, off);
5036
0
  proto_tree_add_item(tree, hf_msg_osd_map_map_len,
5037
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5038
0
  c_append_text(data, ti, ", Items: %u", i);
5039
0
  off += 4;
5040
0
  while (i--)
5041
0
  {
5042
0
    ti2 = proto_tree_add_item(tree, hf_msg_osd_map_map,
5043
0
            tvb, off, -1, ENC_NA);
5044
0
    subtree = proto_item_add_subtree(ti2, ett_msg_osd_map_full);
5045
5046
0
    epoch = tvb_get_letohl(tvb, off);
5047
0
    proto_tree_add_item(subtree, hf_msg_osd_map_epoch,
5048
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5049
0
    off += 4;
5050
5051
0
    off = c_dissect_osdmap(subtree, tvb, off, data);
5052
5053
0
    proto_item_append_text(ti2, ", For Epoch: %"PRIu32, epoch);
5054
0
    proto_item_set_end(ti2, tvb, off);
5055
0
  }
5056
5057
0
  if (data->header.ver >= 2)
5058
0
  {
5059
0
    proto_tree_add_item(tree, hf_msg_osd_map_oldest,
5060
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5061
0
    off += 4;
5062
0
    proto_tree_add_item(tree, hf_msg_osd_map_newest,
5063
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5064
0
    off += 4;
5065
0
  }
5066
5067
0
  return off;
5068
0
}
5069
5070
/** OSD Operation (0x002A)
5071
 */
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)
5077
0
{
5078
0
  proto_item *ti, *ti2;
5079
0
  proto_tree *tree;
5080
0
  unsigned off = 0;
5081
0
  uint16_t opslen, i;
5082
0
  c_osd_op *ops;
5083
0
  c_str str;
5084
5085
  /* ceph:/src/messages/MOSDOp.h */
5086
5087
0
  c_set_type(data, "OSD Operation");
5088
5089
0
  ti = proto_tree_add_item(root, hf_msg_osd_op, tvb, off, front_len, ENC_NA);
5090
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_op);
5091
5092
0
  proto_tree_add_item(tree, hf_msg_osd_op_client_inc,
5093
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5094
0
  off += 4;
5095
5096
0
  proto_tree_add_item(tree, hf_msg_osd_op_osdmap_epoch,
5097
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5098
0
  off += 4;
5099
5100
0
  off = c_dissect_osd_flags(tree, tvb, off, data);
5101
5102
0
  proto_tree_add_item(tree, hf_msg_osd_op_mtime,
5103
0
          tvb, off, 8, ENC_TIME_SECS_NSECS|ENC_LITTLE_ENDIAN);
5104
0
  off += 8;
5105
5106
0
  off = c_dissect_eversion(tree, hf_msg_osd_op_reassert_version,
5107
0
         tvb, off, data);
5108
5109
0
  off = c_dissect_object_locator(tree, hf_msg_osd_op_oloc, tvb, off, data);
5110
5111
0
  off = c_dissect_pg(tree, hf_msg_osd_op_pgid, tvb, off, data);
5112
5113
0
  off = c_dissect_str(tree, hf_msg_osd_op_oid, &str, tvb, off);
5114
5115
0
  opslen = tvb_get_letohs(tvb, off);
5116
0
  c_append_text(data, ti, ", Operations: %"PRId32, opslen);
5117
0
  ti2 = proto_tree_add_item(tree, hf_msg_osd_op_ops_len,
5118
0
          tvb, off, 2, ENC_LITTLE_ENDIAN);
5119
0
  off += 2;
5120
0
  if (opslen > (tvb_reported_length(tvb)-off)/C_SIZE_OSD_OP_MIN)
5121
0
  {
5122
    /*
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.
5127
    */
5128
0
    expert_add_info(data->pinfo, ti2, &ei_sizeillogical);
5129
0
    return off;
5130
0
  }
5131
0
  ops = wmem_alloc_array(wmem_packet_scope(), c_osd_op, opslen);
5132
0
  for (i = 0; i < opslen; i++)
5133
0
  {
5134
0
    off = c_dissect_osd_op(tree, hf_msg_osd_op_op, &ops[i], tvb, off, data);
5135
0
  }
5136
5137
0
  proto_tree_add_item(tree, hf_msg_osd_op_snap_id,
5138
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5139
0
  off += 8;
5140
0
  proto_tree_add_item(tree, hf_msg_osd_op_snap_seq,
5141
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5142
0
  off += 8;
5143
5144
0
  i = tvb_get_letohl(tvb, off);
5145
0
  proto_tree_add_item(tree, hf_msg_osd_op_snaps_len,
5146
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5147
0
  off += 4;
5148
0
  while (i--)
5149
0
  {
5150
0
    proto_tree_add_item(tree, hf_msg_osd_op_snap,
5151
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5152
0
    off += 8;
5153
0
  }
5154
5155
0
  if (data->header.ver >= 4)
5156
0
  {
5157
0
    proto_tree_add_item(tree, hf_msg_osd_op_retry_attempt,
5158
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5159
0
    off += 4;
5160
0
  }
5161
5162
0
  c_warn_size(tree, tvb, off, front_len, data);
5163
5164
0
  for (i = 0; i < opslen; i++)
5165
0
  {
5166
0
    proto_tree_add_item(tree, hf_msg_osd_op_payload,
5167
0
            tvb, off, ops[i].payload_size, ENC_NA);
5168
0
    off += ops[i].payload_size;
5169
0
  }
5170
5171
0
  return off;
5172
0
}
5173
5174
/** OSD Operation Reply (0x002B)
5175
 */
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)
5181
0
{
5182
0
  proto_item *ti, *ti2;
5183
0
  proto_tree *tree;
5184
0
  unsigned off = 0;
5185
0
  c_str str;
5186
0
  uint32_t i;
5187
0
  uint32_t opslen;
5188
0
  c_osd_op *ops;
5189
5190
  /* ceph:/src/messages/MOSDOpReply.h */
5191
5192
0
  c_set_type(data, "OSD Operation Reply");
5193
5194
0
  ti = proto_tree_add_item(root, hf_msg_osd_opreply, tvb, off, front_len, ENC_NA);
5195
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_opreply);
5196
5197
0
  off = c_dissect_str(tree, hf_msg_osd_opreply_oid, &str, tvb, off);
5198
5199
0
  off = c_dissect_pg(tree, hf_msg_osd_opreply_pgid, tvb, off, data);
5200
5201
0
  off = c_dissect_osd_flags(tree, tvb, off, data);
5202
0
  off += 4; /* flags is 64 bit but the higher bits are ignored. */
5203
5204
0
  proto_tree_add_item(tree, hf_msg_osd_opreply_result,
5205
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5206
0
  off += 4;
5207
5208
0
  off = c_dissect_eversion(tree, hf_msg_osd_opreply_bad_replay_ver,
5209
0
         tvb, off, data);
5210
5211
0
  proto_tree_add_item(tree, hf_msg_osd_opreply_osdmap_epoch,
5212
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5213
0
  off += 4;
5214
5215
0
  opslen = tvb_get_letohl(tvb, off);
5216
0
  ti2 = proto_tree_add_item(tree, hf_msg_osd_opreply_ops_len,
5217
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5218
0
  off += 4;
5219
0
  if (opslen >= (tvb_reported_length(tvb)-off)/C_SIZE_OSD_OP_MIN)
5220
0
  {
5221
    /*
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.
5226
    */
5227
0
    expert_add_info(data->pinfo, ti2, &ei_sizeillogical);
5228
0
    return off;
5229
0
  }
5230
0
  ops = wmem_alloc_array(wmem_packet_scope(), c_osd_op, opslen);
5231
0
  for (i = 0; i < opslen; i++)
5232
0
  {
5233
0
    off = c_dissect_osd_op(tree, hf_msg_osd_opreply_op, &ops[i],
5234
0
               tvb, off, data);
5235
0
  }
5236
5237
0
  if (data->header.ver >= 3)
5238
0
  {
5239
0
    proto_tree_add_item(tree, hf_msg_osd_opreply_retry_attempt,
5240
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5241
0
    off += 4;
5242
0
  }
5243
5244
0
  if (data->header.ver >= 4)
5245
0
  {
5246
0
    for (i = 0; i < opslen; i++)
5247
0
    {
5248
0
      proto_tree_add_item(tree, hf_msg_osd_opreply_rval,
5249
0
              tvb, off, 4, ENC_LITTLE_ENDIAN);
5250
0
      off += 4;
5251
0
    }
5252
0
  }
5253
5254
0
  if (data->header.ver >= 5)
5255
0
  {
5256
0
    off = c_dissect_eversion(tree, hf_msg_osd_opreply_replay_ver,
5257
0
           tvb, off, data);
5258
0
    proto_tree_add_item(tree, hf_msg_osd_opreply_user_ver,
5259
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5260
0
    off += 8;
5261
0
  }
5262
5263
0
  if (data->header.ver >= 6)
5264
0
  {
5265
0
    off = c_dissect_redirect(tree, hf_msg_osd_opreply_redirect,
5266
0
           tvb, off, data);
5267
0
  }
5268
5269
0
  c_warn_size(tree, tvb, off, front_len, data);
5270
0
  off = front_len;
5271
5272
0
  if (data->header.ver >= 4)
5273
0
  {
5274
0
    for (i = 0; i < opslen; i++)
5275
0
    {
5276
0
      proto_tree_add_item(tree, hf_msg_osd_opreply_payload,
5277
0
              tvb, off, ops[i].payload_size, ENC_NA);
5278
0
      off += ops[i].payload_size;
5279
0
    }
5280
0
  }
5281
5282
0
  return off;
5283
0
}
5284
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)
5291
0
{
5292
0
  proto_item *ti;
5293
0
  proto_tree *tree;
5294
0
  unsigned off = 0;
5295
0
  int32_t code;
5296
0
  uint8_t b;
5297
5298
  /* ceph:/src/messages/MPoolOpReply.h */
5299
5300
0
  c_set_type(data, "Pool Operation Reply");
5301
5302
0
  off = c_dissect_paxos(root, tvb, off, data);
5303
5304
0
  ti = proto_tree_add_item(root, hf_msg_poolopreply, tvb, off, front_len, ENC_NA);
5305
0
  tree = proto_item_add_subtree(ti, ett_msg_poolopreply);
5306
5307
0
  proto_tree_add_item(tree, hf_msg_poolopreply_fsid,
5308
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5309
0
  off += 16;
5310
5311
0
  code = tvb_get_letohl(tvb, off);
5312
0
  proto_tree_add_item(tree, hf_msg_poolopreply_code,
5313
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5314
0
  off += 4;
5315
5316
0
  proto_tree_add_item(tree, hf_msg_poolopreply_epoch,
5317
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5318
0
  off += 4;
5319
5320
0
  b = tvb_get_uint8(tvb, off);
5321
0
  off += 1;
5322
0
  if (b)
5323
0
    off = c_dissect_blob(tree, hf_msg_poolopreply_datai,
5324
0
             hf_msg_poolopreply_data, hf_msg_poolopreply_data_size,
5325
0
             tvb, off);
5326
5327
0
  c_append_text(data, ti, ", Response Code: %"PRIu32, code);
5328
5329
0
  return off;
5330
0
}
5331
5332
/** Pool Op 0x0031
5333
 * Why this is a higher value than the reply?  Who knows?
5334
 */
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)
5340
0
{
5341
0
  proto_item *ti;
5342
0
  proto_tree *tree;
5343
0
  unsigned off = 0;
5344
0
  int32_t pool;
5345
0
  c_poolop_type type;
5346
0
  c_str name;
5347
5348
  /* ceph:/src/messages/MPoolOp.h */
5349
5350
0
  c_set_type(data, "Pool Operation");
5351
5352
0
  off = c_dissect_paxos(root, tvb, off, data);
5353
5354
0
  ti = proto_tree_add_item(root, hf_msg_poolop, tvb, off, front_len, ENC_NA);
5355
0
  tree = proto_item_add_subtree(ti, ett_msg_poolop);
5356
5357
0
  proto_tree_add_item(tree, hf_msg_poolop_fsid,
5358
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5359
0
  off += 16;
5360
5361
0
  pool = tvb_get_letohl(tvb, off);
5362
0
  proto_tree_add_item(tree, hf_msg_poolop_pool,
5363
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5364
0
  off += 4;
5365
5366
0
  if (data->header.ver < 2)
5367
0
    off = c_dissect_str(tree, hf_msg_poolop_name, &name, tvb, off);
5368
5369
0
  type = (c_poolop_type)tvb_get_letohl(tvb, off);
5370
0
  proto_tree_add_item(tree, hf_msg_poolop_type,
5371
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5372
0
  off += 4;
5373
5374
0
  proto_tree_add_item(tree, hf_msg_poolop_auid,
5375
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5376
0
  off += 8;
5377
5378
0
  proto_tree_add_item(tree, hf_msg_poolop_snapid,
5379
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5380
0
  off += 8;
5381
5382
0
  if (data->header.ver >= 2)
5383
0
    off = c_dissect_str(tree, hf_msg_poolop_name, &name, tvb, off);
5384
5385
0
  if (data->header.ver >= 4)
5386
0
  {
5387
0
    off += 1; /* Skip padding byte. */
5388
0
    proto_tree_add_item(tree, hf_msg_poolop_crush_rule,
5389
0
            tvb, off, 2, ENC_LITTLE_ENDIAN);
5390
0
    off += 2;
5391
0
  }
5392
0
  else if (data->header.ver == 3)
5393
0
  {
5394
0
    proto_tree_add_item(tree, hf_msg_poolop_crush_rule8,
5395
0
            tvb, off, 1, ENC_LITTLE_ENDIAN);
5396
0
    off += 1;
5397
0
  }
5398
5399
0
  c_append_text(data, ti,
5400
0
          ", Type: %s, Name: %s, Pool: %"PRId32,
5401
0
          c_poolop_type_string(type),
5402
0
          name.str,
5403
0
          pool);
5404
5405
0
  return off;
5406
0
}
5407
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)
5414
0
{
5415
0
  proto_item *ti;
5416
0
  proto_tree *tree, *subtree;
5417
0
  unsigned off = 0;
5418
0
  uint32_t i;
5419
0
  c_str str;
5420
5421
  /* ceph:/src/messages/MMonCommand.h */
5422
5423
0
  c_set_type(data, "Mon Command");
5424
5425
0
  off = c_dissect_paxos(root, tvb, off, data);
5426
5427
0
  ti = proto_tree_add_item(root, hf_msg_mon_cmd, tvb, off, front_len, ENC_NA);
5428
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_cmd);
5429
5430
0
  proto_tree_add_item(tree, hf_msg_mon_cmd_fsid,
5431
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5432
0
  off += 16;
5433
5434
0
  i = tvb_get_letohl(tvb, off);
5435
0
  proto_tree_add_item(tree, hf_msg_mon_cmd_arg_len,
5436
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5437
0
  off += 4;
5438
0
  while (i--)
5439
0
  {
5440
0
    ti = proto_tree_add_item(tree, hf_msg_mon_cmd_arg,
5441
0
           tvb, off, -1, ENC_NA);
5442
0
    subtree = proto_item_add_subtree(ti, ett_msg_mon_cmd_arg);
5443
5444
0
    off = c_dissect_str(subtree, hf_msg_mon_cmd_str, &str, tvb, off);
5445
5446
0
    c_append_text(data, ti, " %s", str.str);
5447
5448
0
    proto_item_set_end(ti, tvb, off);
5449
0
  }
5450
5451
0
  return off;
5452
0
}
5453
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)
5460
0
{
5461
0
  proto_item *ti;
5462
0
  proto_tree *tree, *subtree;
5463
0
  unsigned off = 0;
5464
0
  uint32_t i;
5465
5466
  /* ceph:/src/messages/MMonCommandAck.h */
5467
5468
0
  c_set_type(data, "Mon Command Result");
5469
5470
0
  off = c_dissect_paxos(root, tvb, off, data);
5471
5472
0
  ti = proto_tree_add_item(root, hf_msg_mon_cmd_ack,
5473
0
         tvb, off, front_len+data_len, ENC_NA);
5474
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_cmdack);
5475
5476
0
  proto_tree_add_item(tree, hf_msg_mon_cmd_ack_code,
5477
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5478
0
  off += 4;
5479
0
  off = c_dissect_str(tree, hf_msg_mon_cmd_ack_res, NULL, tvb, off);
5480
5481
0
  i = tvb_get_letohl(tvb, off);
5482
0
  proto_tree_add_item(tree, hf_msg_mon_cmd_ack_arg_len,
5483
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5484
0
  off += 4;
5485
0
  while (i--)
5486
0
  {
5487
0
    ti = proto_tree_add_item(tree, hf_msg_mon_cmd_ack_arg, tvb, off, -1, ENC_NA);
5488
0
    subtree = proto_item_add_subtree(ti, ett_msg_mon_cmdack_arg);
5489
5490
0
    off = c_dissect_str(subtree, hf_msg_mon_cmd_ack_arg_str, NULL,
5491
0
            tvb, off);
5492
5493
0
    proto_item_set_end(ti, tvb, off);
5494
0
  }
5495
5496
0
  c_warn_size(tree, tvb, off, front_len, data);
5497
5498
0
  proto_tree_add_item(tree, hf_msg_mon_cmd_ack_data,
5499
0
          tvb, front_len, data_len, ENC_UTF_8);
5500
5501
0
  return front_len+data_len;
5502
0
}
5503
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)
5510
0
{
5511
0
  proto_item *ti;
5512
0
  proto_tree *tree;
5513
0
  unsigned off = 0;
5514
0
  uint32_t i;
5515
0
  c_str str;
5516
5517
  /* ceph:/src/messages/MGetPoolStats.h */
5518
5519
0
  c_set_type(data, "Pool Stats");
5520
5521
0
  off = c_dissect_paxos(root, tvb, off, data);
5522
5523
0
  ti = proto_tree_add_item(root, hf_msg_poolstats, tvb, off, front_len, ENC_NA);
5524
0
  tree = proto_item_add_subtree(ti, ett_msg_poolstats);
5525
5526
0
  c_append_text(data, ti, ", For: ");
5527
5528
0
  proto_tree_add_item(tree, hf_msg_poolstats_fsid,
5529
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5530
0
  off += 16;
5531
5532
0
  i = tvb_get_letohl(tvb, off);
5533
0
  off += 4;
5534
0
  while (i--)
5535
0
  {
5536
0
    off = c_dissect_str(tree, hf_msg_poolstats_pool, &str, tvb, off);
5537
0
    c_append_text(data, ti, "%s%s", str.str, i? ",":" ");
5538
0
  }
5539
5540
0
  return off;
5541
0
}
5542
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)
5549
0
{
5550
0
  proto_item *ti, *ti2;
5551
0
  proto_tree *tree, *subtree;
5552
0
  unsigned off = 0;
5553
0
  uint32_t i;
5554
0
  c_str str;
5555
0
  c_encoded encstat;
5556
5557
  /* ceph:/src/messages/MGetPoolStatsReply.h */
5558
5559
0
  c_set_type(data, "Pool Stats Reply");
5560
5561
0
  off = c_dissect_paxos(root, tvb, off, data);
5562
5563
0
  ti = proto_tree_add_item(root, hf_msg_poolstatsreply, tvb, off, front_len, ENC_NA);
5564
0
  tree = proto_item_add_subtree(ti, ett_msg_poolstatsreply);
5565
5566
0
  c_append_text(data, ti, ", For: ");
5567
5568
0
  proto_tree_add_item(tree, hf_msg_poolstatsreply_fsid,
5569
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5570
0
  off += 16;
5571
5572
0
  i = tvb_get_letohl(tvb, off);
5573
0
  off += 4;
5574
0
  while (i--)
5575
0
  {
5576
0
    ti2 = proto_tree_add_item(tree, hf_msg_poolstatsreply_stat,
5577
0
            tvb, off, -1, ENC_NA);
5578
0
    subtree = proto_item_add_subtree(ti2, ett_msg_poolstatsreply_stat);
5579
5580
0
    off = c_dissect_str(subtree, hf_msg_poolstatsreply_pool, &str, tvb, off);
5581
0
    c_append_text(data, ti, "%s%s", str.str, i? ",":" ");
5582
0
    proto_item_append_text(ti2, ", For: %s", str.str);
5583
5584
    /*** pool_stat_t from ceph:/src/osd/osd_types.h ***/
5585
0
    off = c_dissect_encoded(subtree, &encstat, 5, 5, tvb, off, data);
5586
5587
0
    off = c_dissect_statcollection(subtree, hf_msg_poolstatsreply_pool, tvb, off, data);
5588
5589
0
    proto_tree_add_item(subtree, hf_msg_poolstatsreply_log_size,
5590
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5591
0
    off += 8;
5592
0
    proto_tree_add_item(subtree, hf_msg_poolstatsreply_log_size_ondisk,
5593
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5594
0
    off += 8;
5595
    /*** END pool_stat_t ***/
5596
0
    c_warn_size(subtree, tvb, off, encstat.end, data);
5597
0
    off = encstat.end;
5598
0
  }
5599
5600
0
  return off;
5601
0
}
5602
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)
5609
0
{
5610
0
  unsigned off = 0;
5611
5612
  /* ceph:/src/messages/MMonGlobalID.h */
5613
5614
0
  c_set_type(data, "Mon Global ID");
5615
5616
0
  off = c_dissect_paxos(root, tvb, off, data);
5617
0
  proto_tree_add_item(root, hf_msg_mon_globalid_max,
5618
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5619
0
  off += 8;
5620
5621
0
  return off;
5622
0
}
5623
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)
5630
0
{
5631
0
  proto_item *ti;
5632
0
  proto_tree *tree;
5633
0
  unsigned off = 0;
5634
0
  uint32_t i;
5635
0
  c_mon_election_type type;
5636
5637
  /* ceph:/src/messages/MMonElection.h */
5638
5639
0
  c_set_type(data, "Mon Election");
5640
5641
0
  ti = proto_tree_add_item(root, hf_msg_mon_election,
5642
0
          tvb, off, front_len, ENC_NA);
5643
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_election);
5644
5645
0
  proto_tree_add_item(tree, hf_msg_mon_election_fsid,
5646
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5647
0
  off += 16;
5648
5649
0
  type = (c_mon_election_type)tvb_get_letohl(tvb, off);
5650
0
  proto_tree_add_item(tree, hf_msg_mon_election_op,
5651
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5652
0
  off += 4;
5653
5654
0
  proto_tree_add_item(tree, hf_msg_mon_election_epoch,
5655
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5656
0
  off += 4;
5657
5658
0
  off = c_dissect_monmap(tree, tvb, off, data);
5659
5660
0
  i = tvb_get_letohl(tvb, off);
5661
0
  off += 4;
5662
0
  while (i--)
5663
0
  {
5664
0
    proto_tree_add_item(tree, hf_msg_mon_election_quorum,
5665
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5666
0
    off += 4;
5667
0
  }
5668
5669
0
  proto_tree_add_item(tree, hf_msg_mon_election_quorum_features,
5670
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5671
0
  off += 8;
5672
5673
0
  proto_tree_add_item(tree, hf_msg_mon_election_defunct_one,
5674
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5675
0
  off += 8;
5676
0
  proto_tree_add_item(tree, hf_msg_mon_election_defunct_two,
5677
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5678
0
  off += 8;
5679
5680
0
  off = c_dissect_blob(tree, hf_msg_mon_election_sharing,
5681
0
           hf_msg_mon_election_sharing_data, hf_msg_mon_election_sharing_size,
5682
0
           tvb, off);
5683
5684
0
  c_append_text(data, ti, ", Operation: %s", c_mon_election_type_string(type));
5685
5686
0
  return off;
5687
0
}
5688
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)
5695
0
{
5696
0
  proto_item *ti;
5697
0
  proto_tree *tree;
5698
0
  unsigned off = 0;
5699
0
  uint32_t i;
5700
0
  uint64_t pn;
5701
0
  c_mon_paxos_op op;
5702
5703
  /* ceph:/src/messages/MMonPaxos.h */
5704
5705
0
  c_set_type(data, "Mon Paxos");
5706
5707
0
  ti = proto_tree_add_item(root, hf_msg_mon_paxos, tvb, off, front_len, ENC_NA);
5708
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_paxos);
5709
5710
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_epoch,
5711
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5712
0
  off += 4;
5713
5714
0
  op = (c_mon_paxos_op)tvb_get_letohl(tvb, off);
5715
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_op,
5716
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5717
0
  off += 4;
5718
5719
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_first,
5720
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5721
0
  off += 8;
5722
5723
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_last,
5724
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5725
0
  off += 8;
5726
5727
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_pnfrom,
5728
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5729
0
  off += 8;
5730
5731
0
  pn = tvb_get_letoh64(tvb, off);
5732
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_pn,
5733
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5734
0
  off += 8;
5735
5736
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_pnuncommitted,
5737
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5738
0
  off += 8;
5739
5740
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_lease,
5741
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5742
0
  off += 8;
5743
5744
0
  if (data->header.ver >= 1)
5745
0
  {
5746
0
    proto_tree_add_item(tree, hf_msg_mon_paxos_sent,
5747
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5748
0
    off += 8;
5749
0
  }
5750
5751
0
  proto_tree_add_item(tree, hf_msg_mon_paxos_latest_ver,
5752
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5753
0
  off += 8;
5754
5755
0
  off = c_dissect_blob(tree, hf_msg_mon_paxos_latest_val,
5756
0
           hf_msg_mon_paxos_latest_val_data,
5757
0
           hf_msg_mon_paxos_latest_val_size,
5758
0
           tvb, off);
5759
5760
0
  i = tvb_get_letohl(tvb, off);
5761
0
  off += 4;
5762
0
  while (i--)
5763
0
  {
5764
0
    proto_item *ti2;
5765
0
    proto_tree *subtree;
5766
0
    uint64_t ver;
5767
5768
0
    ti2 = proto_tree_add_item(tree, hf_msg_mon_paxos_value, tvb, off, -1, ENC_NA);
5769
0
    subtree = proto_item_add_subtree(ti2, ett_msg_mon_paxos_value);
5770
5771
0
    ver = tvb_get_letoh64(tvb, off);
5772
0
    proto_tree_add_item(subtree, hf_msg_mon_paxos_ver,
5773
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5774
0
    off += 8;
5775
5776
0
    off = c_dissect_blob(subtree, hf_msg_mon_paxos_val,
5777
0
             hf_msg_mon_paxos_val_data, hf_msg_mon_paxos_val_size,
5778
0
             tvb, off);
5779
5780
0
    proto_item_append_text(ti2, ", Version: %"PRIu64, ver);
5781
0
    proto_item_set_end(ti2, tvb, off);
5782
0
  }
5783
5784
0
  c_append_text(data, ti, ", Op: %s, Proposal Number: %"PRIu64,
5785
0
          c_mon_paxos_op_string(op), pn);
5786
5787
0
  return off;
5788
0
}
5789
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)
5796
0
{
5797
0
  proto_item *ti;
5798
0
  proto_tree *tree;
5799
0
  unsigned off = 0;
5800
0
  uint32_t i;
5801
0
  c_mon_probe_type type;
5802
0
  c_str name;
5803
5804
  /* ceph:/src/messages/MMonProbe.h */
5805
5806
0
  c_set_type(data, "Mon Probe");
5807
5808
0
  ti = proto_tree_add_item(root, hf_msg_mon_probe, tvb, off, front_len, ENC_NA);
5809
0
  tree = proto_item_add_subtree(ti, ett_msg_mon_probe);
5810
5811
0
  proto_tree_add_item(tree, hf_msg_mon_probe_fsid,
5812
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5813
0
  off += 16;
5814
5815
0
  type = (c_mon_probe_type)tvb_get_letohl(tvb, off);
5816
0
  proto_tree_add_item(tree, hf_msg_mon_probe_type,
5817
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5818
0
  off += 4;
5819
5820
0
  off = c_dissect_str(tree, hf_msg_mon_probe_name, &name, tvb, off);
5821
5822
0
  i = tvb_get_letohl(tvb, off);
5823
0
  off += 4;
5824
0
  while (i--)
5825
0
  {
5826
0
    proto_tree_add_item(tree, hf_msg_mon_probe_quorum,
5827
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5828
0
    off += 4;
5829
0
  }
5830
5831
0
  off = c_dissect_monmap(tree, tvb, off, data);
5832
5833
0
  proto_tree_add_item(tree, hf_msg_mon_probe_ever_joined,
5834
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
5835
0
  off += 1;
5836
0
  proto_tree_add_item(tree, hf_msg_mon_probe_paxos_first_ver,
5837
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5838
0
  off += 8;
5839
0
  proto_tree_add_item(tree, hf_msg_mon_probe_paxos_last_ver,
5840
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
5841
0
  off += 8;
5842
5843
0
  if (data->header.ver >= 6)
5844
0
  {
5845
0
    proto_tree_add_item(tree, hf_msg_mon_probe_req_features,
5846
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5847
0
    off += 8;
5848
0
  }
5849
5850
0
  c_append_text(data, ti, ", Type: %s, Name: %s",
5851
0
          c_mon_probe_type_string(type),
5852
0
          name.str);
5853
5854
0
  return off;
5855
0
}
5856
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)
5863
0
{
5864
0
  proto_item *ti;
5865
0
  proto_tree *tree;
5866
0
  unsigned off = 0;
5867
0
  c_osd_ping_op op;
5868
5869
  /* ceph:/src/messages/MOSDPing.h */
5870
5871
0
  c_set_type(data, "OSD Ping");
5872
5873
0
  ti = proto_tree_add_item(root, hf_msg_osd_ping, tvb, off, front_len, ENC_NA);
5874
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_ping);
5875
5876
0
  proto_tree_add_item(tree, hf_msg_osd_ping_fsid,
5877
0
          tvb, off, 16, ENC_BIG_ENDIAN);
5878
0
  off += 16;
5879
5880
0
  proto_tree_add_item(tree, hf_msg_osd_ping_mapepoch,
5881
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5882
0
  off += 4;
5883
5884
0
  proto_tree_add_item(tree, hf_msg_osd_ping_peerepoch,
5885
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
5886
0
  off += 4;
5887
5888
0
  op = (c_osd_ping_op)tvb_get_uint8(tvb, off);
5889
0
  proto_tree_add_item(tree, hf_msg_osd_ping_op,
5890
0
          tvb, off, 1, ENC_LITTLE_ENDIAN);
5891
0
  off += 1;
5892
5893
0
  off = c_dissect_osd_peerstat(tree, tvb, off, data);
5894
5895
0
  if (data->header.ver >= 2)
5896
0
  {
5897
0
    proto_tree_add_item(tree, hf_msg_osd_ping_time,
5898
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
5899
0
    off += 8;
5900
0
  }
5901
5902
0
  c_append_text(data, ti, ", Operation: %s", c_osd_ping_op_string(op));
5903
0
  return off;
5904
0
}
5905
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)
5912
0
{
5913
0
  proto_item *ti;
5914
0
  proto_tree *tree;
5915
0
  unsigned off = 0;
5916
0
  uint32_t i;
5917
5918
  /* ceph:/src/messages/MOSDBoot.h */
5919
5920
0
  c_set_type(data, "OSD Boot");
5921
5922
0
  off = c_dissect_paxos(root, tvb, off, data);
5923
5924
0
  ti = proto_tree_add_item(root, hf_msg_osd_boot, tvb, off, front_len, ENC_NA);
5925
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_boot);
5926
5927
0
  off = c_dissect_osd_superblock(tree, tvb, off, data);
5928
5929
0
  off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_back, NULL, tvb, off);
5930
5931
0
  if (data->header.ver >= 2)
5932
0
  {
5933
0
    off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_cluster, NULL, tvb, off);
5934
0
  }
5935
0
  if (data->header.ver >= 3)
5936
0
  {
5937
0
    proto_tree_add_item(tree, hf_msg_osd_boot_epoch,
5938
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
5939
0
    off += 4;
5940
0
  }
5941
0
  if (data->header.ver >= 4)
5942
0
  {
5943
0
    off = c_dissect_entityaddr(tree, hf_msg_osd_boot_addr_front, NULL, tvb, off);
5944
0
  }
5945
0
  if (data->header.ver >= 5)
5946
0
  {
5947
0
    i = tvb_get_letohl(tvb, off);
5948
0
    off += 4;
5949
0
    while (i--)
5950
0
    {
5951
0
      off = c_dissect_kv(tree, hf_msg_osd_boot_metadata,
5952
0
             hf_msg_osd_boot_metadata_k, hf_msg_osd_boot_metadata_v,
5953
0
             tvb, off);
5954
0
    }
5955
0
  }
5956
5957
0
  return off;
5958
0
}
5959
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)
5966
0
{
5967
0
  proto_item *ti;
5968
0
  proto_tree *tree;
5969
0
  unsigned off = 0;
5970
0
  uint32_t i;
5971
5972
  /* ceph:/src/messages/MPGStats.h */
5973
5974
0
  c_set_type(data, "PG Stats");
5975
5976
0
  off = c_dissect_paxos(root, tvb, off, data);
5977
5978
0
  ti = proto_tree_add_item(root, hf_msg_pgstats, tvb, off, front_len, ENC_NA);
5979
0
  tree = proto_item_add_subtree(ti, ett_msg_pgstats);
5980
5981
0
  proto_tree_add_item(tree, hf_msg_pgstats_fsid,
5982
0
          tvb, off, 16, ENC_LITTLE_ENDIAN);
5983
0
  off += 16;
5984
5985
0
  off = c_dissect_osd_stat(tree, tvb, off, data);
5986
5987
0
  i = tvb_get_letohl(tvb, off);
5988
0
  off += 4;
5989
0
  while (i--)
5990
0
  {
5991
0
    proto_item *ti2;
5992
0
    proto_tree *subtree;
5993
5994
0
    ti2 = proto_tree_add_item(tree, hf_msg_pgstats_pgstat, tvb, off, -1, ENC_NA);
5995
0
    subtree = proto_item_add_subtree(ti2, ett_msg_pgstats_pgstat);
5996
5997
0
    off = c_dissect_pg(subtree, hf_msg_pgstats_pgstat_pg, tvb, off, data);
5998
0
    off = c_dissect_pg_stats(subtree, hf_msg_pgstats_pgstat_stat, tvb, off, data);
5999
6000
0
    proto_item_set_end(ti2, tvb, off);
6001
0
  }
6002
6003
0
  proto_tree_add_item(tree, hf_msg_pgstats_epoch,
6004
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6005
0
  off += 4;
6006
6007
0
  proto_tree_add_item(tree, hf_msg_pgstats_mapfor,
6008
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6009
0
  off += 8;
6010
6011
0
  return off;
6012
0
}
6013
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)
6020
0
{
6021
0
  proto_item *ti;
6022
0
  proto_tree *tree;
6023
0
  unsigned off = 0;
6024
0
  uint32_t i;
6025
6026
  /* ceph:/src/messages/MOSDPGCreate.h */
6027
6028
0
  c_set_type(data, "OSD PG Create");
6029
6030
0
  ti = proto_tree_add_item(root, hf_msg_osd_pg_create, tvb, off, front_len, ENC_NA);
6031
0
  tree = proto_item_add_subtree(ti, ett_msg_osd_pg_create);
6032
6033
0
  proto_tree_add_item(tree, hf_msg_osd_pg_create_epoch,
6034
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6035
0
  off += 8;
6036
6037
0
  i = tvb_get_letohl(tvb, off);
6038
0
  off += 4;
6039
0
  while (i--)
6040
0
  {
6041
0
    proto_item *ti2;
6042
0
    proto_tree *subtree;
6043
6044
0
    ti2 = proto_tree_add_item(tree, hf_msg_osd_pg_create_mkpg,
6045
0
            tvb, off, -1, ENC_NA);
6046
0
    subtree = proto_item_add_subtree(ti2, ett_msg_osd_pg_create_mkpg);
6047
6048
0
    off = c_dissect_pg(subtree, hf_msg_osd_pg_create_mkpg_pg, tvb, off, data);
6049
0
    off = c_dissect_pg_create(subtree, hf_msg_osd_pg_create_mkpg_create, tvb, off, data);
6050
6051
0
    proto_item_set_end(ti2, tvb, off);
6052
0
  }
6053
6054
0
  return off;
6055
0
}
6056
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)
6063
0
{
6064
0
  proto_item *ti;
6065
0
  proto_tree *tree;
6066
0
  unsigned off = 0;
6067
0
  c_cap_op_type op;
6068
0
  uint64_t inode, relam;
6069
0
  uint32_t snap_trace_len, xattr_len;
6070
6071
  /* ceph:/src/messages/MClientCaps.h */
6072
6073
0
  c_set_type(data, "Client Capabilities");
6074
6075
0
  ti = proto_tree_add_item(root, hf_msg_client_caps, tvb, off, front_len, ENC_NA);
6076
0
  tree = proto_item_add_subtree(ti, ett_msg_client_caps);
6077
6078
0
  op = (c_cap_op_type)tvb_get_letohl(tvb, off);
6079
0
  proto_tree_add_item(tree, hf_msg_client_caps_op,
6080
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6081
0
  off += 4;
6082
6083
0
  inode = tvb_get_letoh64(tvb, off);
6084
0
  proto_tree_add_item(tree, hf_msg_client_caps_inode,
6085
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6086
0
  off += 8;
6087
6088
0
  relam = tvb_get_letoh64(tvb, off);
6089
0
  proto_tree_add_item(tree, hf_msg_client_caps_relam,
6090
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6091
0
  off += 8;
6092
6093
0
  proto_tree_add_item(tree, hf_msg_client_caps_cap_id,
6094
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6095
0
  off += 8;
6096
6097
0
  proto_tree_add_item(tree, hf_msg_client_caps_seq,
6098
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6099
0
  off += 4;
6100
6101
0
  proto_tree_add_item(tree, hf_msg_client_caps_seq_issue,
6102
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6103
0
  off += 4;
6104
6105
0
  proto_tree_add_item(tree, hf_msg_client_caps_new,
6106
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6107
0
  off += 4;
6108
6109
0
  proto_tree_add_item(tree, hf_msg_client_caps_wanted,
6110
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6111
0
  off += 4;
6112
6113
0
  proto_tree_add_item(tree, hf_msg_client_caps_dirty,
6114
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6115
0
  off += 4;
6116
6117
0
  proto_tree_add_item(tree, hf_msg_client_caps_seq_migrate,
6118
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6119
0
  off += 4;
6120
6121
0
  proto_tree_add_item(tree, hf_msg_client_caps_snap_follows,
6122
0
          tvb, off, 8, ENC_BIG_ENDIAN);
6123
0
  off += 8;
6124
6125
0
  snap_trace_len = tvb_get_letohl(tvb, off);
6126
0
  off += 4;
6127
6128
0
  proto_tree_add_item(tree, hf_msg_client_caps_uid,
6129
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6130
0
  off += 4;
6131
6132
0
  proto_tree_add_item(tree, hf_msg_client_caps_gid,
6133
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6134
0
  off += 4;
6135
6136
0
  proto_tree_add_item(tree, hf_msg_client_caps_mode,
6137
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6138
0
  off += 4;
6139
6140
0
  proto_tree_add_item(tree, hf_msg_client_caps_nlink,
6141
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6142
0
  off += 4;
6143
6144
0
  xattr_len = tvb_get_letohl(tvb, off);
6145
0
  off += 4;
6146
6147
0
  proto_tree_add_item(tree, hf_msg_client_caps_xattr_ver,
6148
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6149
0
  off += 8;
6150
6151
0
  off += 84; /* @TODO: Union. */
6152
6153
0
  proto_tree_add_item(tree, hf_msg_client_caps_snap,
6154
0
          tvb, off, snap_trace_len, ENC_NA);
6155
0
  off += snap_trace_len;
6156
6157
0
  if (data->header.ver >= 2)
6158
0
  {
6159
0
    off = c_dissect_data(tree, hf_msg_client_caps_flock, tvb, off);
6160
0
  }
6161
6162
0
  if (data->header.ver >= 3 && op == C_CAP_OP_IMPORT)
6163
0
  {
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));
6172
    */
6173
    /* @TODO: Parse this. */
6174
0
    off += 21;
6175
0
  }
6176
6177
0
  if (data->header.ver >= 4)
6178
0
  {
6179
0
    proto_tree_add_item(tree, hf_msg_client_caps_inline_ver,
6180
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6181
0
    off += 8;
6182
0
    off = c_dissect_data(tree, hf_msg_client_caps_inline_data, tvb, off);
6183
0
  }
6184
6185
0
  c_warn_size(tree, tvb, off, front_len, data);
6186
0
  c_warn_size(tree, tvb, front_len+xattr_len, front_len+middle_len, data);
6187
6188
0
  proto_tree_add_item(tree, hf_msg_client_caps_xattr,
6189
0
          tvb, front_len, middle_len, ENC_NA);
6190
6191
0
  proto_item_append_text(ti, ", Op: %s"
6192
0
             ", Inode: 0x%016"PRIX64
6193
0
             ", Relam: 0x%"PRIX64,
6194
0
             c_cap_op_type_string(op),
6195
0
             inode, relam);
6196
6197
0
  return front_len+middle_len;
6198
0
}
6199
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)
6206
0
{
6207
0
  proto_item *ti;
6208
0
  proto_tree *tree, *subtree;
6209
0
  unsigned off = 0;
6210
0
  uint32_t i;
6211
6212
  /* ceph:/src/messages/MClientCapRelease.h */
6213
6214
0
  c_set_type(data, "Client Cap Release");
6215
6216
0
  ti = proto_tree_add_item(root, hf_msg_client_caprel, tvb, off, front_len, ENC_NA);
6217
0
  tree = proto_item_add_subtree(ti, ett_msg_client_caprel);
6218
6219
0
  i = (c_cap_op_type)tvb_get_letohl(tvb, off);
6220
0
  proto_item_append_text(ti, ", Caps: %"PRIu32, i);
6221
0
  off += 4;
6222
0
  while (i--)
6223
0
  {
6224
0
    ti = proto_tree_add_item(tree, hf_msg_client_caprel_cap, tvb, off, -1, ENC_NA);
6225
0
    subtree = proto_item_add_subtree(ti, ett_msg_client_caprel_cap);
6226
6227
0
    proto_tree_add_item(subtree, hf_msg_client_caprel_cap_inode,
6228
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6229
0
    off += 8;
6230
6231
0
    proto_tree_add_item(subtree, hf_msg_client_caprel_cap_id,
6232
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6233
0
    off += 8;
6234
6235
0
    proto_tree_add_item(subtree, hf_msg_client_caprel_cap_migrate,
6236
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
6237
0
    off += 4;
6238
6239
0
    proto_tree_add_item(subtree, hf_msg_client_caprel_cap_seq,
6240
0
            tvb, off, 4, ENC_LITTLE_ENDIAN);
6241
0
    off += 4;
6242
6243
0
    proto_item_set_end(ti, tvb, off);
6244
0
  }
6245
6246
0
  return front_len+middle_len;
6247
0
}
6248
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)
6255
0
{
6256
0
  proto_item *ti;
6257
0
  proto_tree *tree;
6258
0
  unsigned off = 0;
6259
0
  uint32_t i;
6260
0
  c_timecheck_op op;
6261
0
  uint64_t epoch, round;
6262
6263
  /* ceph:/src/messages/MTimeCheck.h */
6264
6265
0
  c_set_type(data, "Time Check");
6266
6267
0
  ti = proto_tree_add_item(root, hf_msg_timecheck, tvb, off, front_len, ENC_NA);
6268
0
  tree = proto_item_add_subtree(ti, ett_msg_timecheck);
6269
6270
0
  op = (c_timecheck_op)tvb_get_letohl(tvb, off);
6271
0
  proto_tree_add_item(tree, hf_msg_timecheck_op,
6272
0
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6273
0
  off += 4;
6274
6275
0
  epoch = tvb_get_letoh64(tvb, off);
6276
0
  proto_tree_add_item(tree, hf_msg_timecheck_epoch,
6277
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6278
0
  off += 8;
6279
6280
0
  round = tvb_get_letoh64(tvb, off);
6281
0
  proto_tree_add_item(tree, hf_msg_timecheck_round,
6282
0
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6283
0
  off += 8;
6284
6285
0
  c_append_text(data, ti, ", Operation: %s, Epoch: %"PRIu64
6286
0
          ", Round: %"PRIu64,
6287
0
          c_timecheck_op_string(op),
6288
0
          epoch, round);
6289
6290
0
  if (op == C_TIMECHECK_OP_PONG)
6291
0
  {
6292
0
    c_append_text(data, ti, ", Time: %s", c_format_timespec(tvb, off));
6293
0
    proto_tree_add_item(tree, hf_msg_timecheck_time,
6294
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6295
0
  }
6296
0
  off += 8; /* Still in the message, but zeroed and meaningless. */
6297
6298
0
  i = tvb_get_letohl(tvb, off);
6299
0
  off += 4;
6300
0
  while (i--)
6301
0
  {
6302
0
    proto_item *ti2;
6303
0
    proto_tree *subtree;
6304
0
    c_entityinst inst;
6305
0
    double skew;
6306
6307
0
    ti2 = proto_tree_add_item(tree, hf_msg_timecheck_skew, tvb, off, -1, ENC_NA);
6308
0
    subtree = proto_item_add_subtree(ti2, ett_msg_timecheck_skew);
6309
6310
0
    off = c_dissect_entityinst(subtree, hf_msg_timecheck_skew_node, &inst,
6311
0
             tvb, off, data);
6312
6313
0
    skew = tvb_get_letohieee_double(tvb, off);
6314
0
    proto_tree_add_item(subtree, hf_msg_timecheck_skew_skew,
6315
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6316
0
    off += 8;
6317
6318
0
    proto_item_append_text(ti2, ", Node: %s, Skew: %lf", inst.name.slug, skew);
6319
0
    proto_item_set_end(ti2, tvb, off);
6320
0
  }
6321
6322
0
  i = tvb_get_letohl(tvb, off);
6323
0
  off += 4;
6324
0
  while (i--)
6325
0
  {
6326
0
    proto_item *ti2;
6327
0
    proto_tree *subtree;
6328
0
    c_entityinst inst;
6329
0
    double ping;
6330
6331
0
    ti2 = proto_tree_add_item(tree, hf_msg_timecheck_latency, tvb, off, -1, ENC_NA);
6332
0
    subtree = proto_item_add_subtree(ti2, ett_msg_timecheck_latency);
6333
6334
0
    off = c_dissect_entityinst(subtree, hf_msg_timecheck_latency_node, &inst,
6335
0
             tvb, off, data);
6336
6337
0
    ping = tvb_get_letohieee_double(tvb, off);
6338
0
    proto_tree_add_item(subtree, hf_msg_timecheck_latency_latency,
6339
0
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6340
0
    off += 8;
6341
6342
0
    proto_item_append_text(ti2, ", Node: %s, Latency: %lf", inst.name.slug, ping);
6343
0
    proto_item_set_end(ti2, tvb, off);
6344
0
  }
6345
6346
0
  return off;
6347
0
}
6348
6349
/*** MSGR Dissectors ***/
6350
6351
#define C_OFF_HEAD0  0
6352
56
#define C_SIZE_HEAD0 ((64+64+16+16+16)/8)
6353
6354
56
#define C_OFF_HEAD1  C_SIZE_HEAD0
6355
20
#define C_SIZE_HEAD1 ((32+32+32+16)/8)
6356
6357
12
#define C_OFF_HEAD2  (C_OFF_HEAD1 + C_SIZE_HEAD1 + C_SIZE_ENTITY_NAME)
6358
12
#define C_SIZE_HEAD2 ((16+16+32)/8)
6359
6360
12
#define C_SIZE_HEAD  (C_OFF_HEAD2 + C_SIZE_HEAD2)
6361
6362
12
#define C_SIZE_FOOT  ((32+32+32+64+8)/8)
6363
6364
/** Dissect a MSG message.
6365
 *
6366
 * These are Ceph's business messages and are generally sent to specific
6367
 * node types.
6368
 */
6369
static
6370
unsigned c_dissect_msg(proto_tree *tree,
6371
        tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6372
6
{
6373
6
  tvbuff_t *subtvb;
6374
6
  proto_item *ti;
6375
6
  proto_tree *subtree;
6376
6
  c_msg_type type;
6377
6
  uint32_t front_len, middle_len, data_len;
6378
6
  unsigned size, parsedsize;
6379
6380
6
  front_len  = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 0);
6381
6
  middle_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 4);
6382
6
  data_len   = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 8);
6383
6384
  /*** Header ***/
6385
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
6393
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
6398
6399
    struct ceph_entity_name src;
6400
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));
6406
  */
6407
6408
6
  ti = proto_tree_add_item(tree, hf_head, tvb, off, C_SIZE_HEAD, ENC_NA);
6409
6
  subtree = proto_item_add_subtree(ti, ett_head);
6410
6411
6
  data->header.seq = tvb_get_letoh64(tvb, off);
6412
6
  proto_tree_add_item(subtree, hf_head_seq,
6413
6
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6414
6
  off += 8;
6415
6
  data->header.tid = tvb_get_letoh64(tvb, off);
6416
6
  proto_tree_add_item(subtree, hf_head_tid,
6417
6
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6418
6
  off += 8;
6419
6420
6
  data->header.type = type = (c_msg_type)tvb_get_letohs(tvb, off);
6421
6
  proto_tree_add_item(subtree, hf_head_type,
6422
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6423
6
  off += 2;
6424
6425
6
  data->header.priority = tvb_get_letohs(tvb, off);
6426
6
  proto_tree_add_item(subtree, hf_head_priority,
6427
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6428
6
  off += 2;
6429
6
  data->header.ver = tvb_get_letohs(tvb, off);
6430
6
  proto_tree_add_item(subtree, hf_head_version,
6431
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6432
6
  off += 2;
6433
6434
6
  proto_tree_add_item(subtree, hf_head_front_size,
6435
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6436
6
  off += 4;
6437
6
  proto_tree_add_item(subtree, hf_head_middle_size,
6438
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6439
6
  off += 4;
6440
6
  proto_tree_add_item(subtree, hf_head_data_size,
6441
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6442
6
  off += 4;
6443
6
  proto_tree_add_item(subtree, hf_head_data_off,
6444
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6445
6
  off += 2;
6446
6447
6
  off = c_dissect_entityname(subtree, hf_head_srcname, &data->header.src,
6448
6
           tvb, off, data);
6449
6450
  /*** Copy the data to the state structure. ***/
6451
6452
  /* Save memory by copying only if different, they are *usually* the same. */
6453
6
  if (!data->src->name.slug ||
6454
6
      strcmp(data->src->name.slug, data->header.src.slug) != 0)
6455
6
    data->src->name.slug = wmem_strdup(wmem_file_scope(),
6456
6
               data->header.src.slug);
6457
6
  if (!data->src->name.type_str ||
6458
6
      strcmp(data->src->name.type_str, data->header.src.type_str) != 0)
6459
4
    data->src->name.type_str = wmem_strdup(wmem_file_scope(),
6460
4
                   data->header.src.type_str);
6461
6462
6
  data->src->name.type = data->header.src.type;
6463
6
  data->src->name.id   = data->header.src.id;
6464
6465
6
  proto_tree_add_item(subtree, hf_head_compat_version,
6466
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6467
6
  off += 2;
6468
6
  proto_tree_add_item(subtree, hf_head_reserved,
6469
6
          tvb, off, 2, ENC_LITTLE_ENDIAN);
6470
6
  off += 2;
6471
6
  proto_tree_add_item(subtree, hf_head_crc,
6472
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6473
6
  off += 4;
6474
6475
6
  proto_item_append_text(ti, ", Type: %s, From: %s",
6476
6
             c_msg_type_string(type),
6477
6
             data->header.src.slug);
6478
6
  if (front_len ) proto_item_append_text(ti, ", Front Len: %d", front_len);
6479
6
  if (middle_len) proto_item_append_text(ti, ", Mid Len: %d",   middle_len);
6480
6
  if (data_len  ) proto_item_append_text(ti, ", Data Len: %d",  data_len);
6481
6482
  /*** Body ***/
6483
6484
6
  subtvb = tvb_new_subset_length(tvb, off, front_len+middle_len+data_len);
6485
6486
6
  switch (type)
6487
6
  {
6488
6
#define C_CALL(name) name(tree, subtvb, front_len, middle_len, data_len, data)
6489
0
#define C_HANDLE(tag, name) case tag: parsedsize = C_CALL(name); break;
6490
6491
0
  C_HANDLE(C_CEPH_MSG_PING,       c_dissect_msg_ping)
6492
0
  C_HANDLE(C_CEPH_MSG_MON_MAP,        c_dissect_msg_mon_map)
6493
0
  C_HANDLE(C_CEPH_MSG_STATFS,       c_dissect_msg_statfs)
6494
0
  C_HANDLE(C_CEPH_MSG_STATFS_REPLY,     c_dissect_msg_statfsreply)
6495
0
  C_HANDLE(C_CEPH_MSG_MON_SUBSCRIBE,      c_dissect_msg_mon_sub)
6496
0
  C_HANDLE(C_CEPH_MSG_MON_SUBSCRIBE_ACK,      c_dissect_msg_mon_sub_ack)
6497
0
  C_HANDLE(C_CEPH_MSG_AUTH,       c_dissect_msg_auth)
6498
0
  C_HANDLE(C_CEPH_MSG_AUTH_REPLY,       c_dissect_msg_auth_reply)
6499
0
  C_HANDLE(C_CEPH_MSG_MON_GET_VERSION,      c_dissect_msg_mon_getversion)
6500
0
  C_HANDLE(C_CEPH_MSG_MON_GET_VERSION_REPLY,  c_dissect_msg_mon_getversionreply)
6501
0
  C_HANDLE(C_CEPH_MSG_MDS_MAP,        c_dissect_msg_mds_map)
6502
0
  C_HANDLE(C_CEPH_MSG_CLIENT_SESSION,     c_dissect_msg_client_sess)
6503
0
  C_HANDLE(C_CEPH_MSG_CLIENT_REQUEST,     c_dissect_msg_client_req)
6504
0
  C_HANDLE(C_CEPH_MSG_CLIENT_REQUEST_FORWARD, c_dissect_msg_client_reqfwd)
6505
0
  C_HANDLE(C_CEPH_MSG_CLIENT_REPLY,     c_dissect_msg_client_reply)
6506
0
  C_HANDLE(C_CEPH_MSG_OSD_MAP,        c_dissect_msg_osd_map)
6507
0
  C_HANDLE(C_CEPH_MSG_OSD_OP,       c_dissect_msg_osd_op)
6508
0
  C_HANDLE(C_CEPH_MSG_OSD_OPREPLY,      c_dissect_msg_osd_opreply)
6509
0
  C_HANDLE(C_MSG_POOLOPREPLY,       c_dissect_msg_poolopreply)
6510
0
  C_HANDLE(C_MSG_POOLOP,          c_dissect_msg_poolop)
6511
0
  C_HANDLE(C_MSG_MON_COMMAND,       c_dissect_msg_mon_cmd)
6512
0
  C_HANDLE(C_MSG_MON_COMMAND_ACK,       c_dissect_msg_mon_cmd_ack)
6513
0
  C_HANDLE(C_MSG_GETPOOLSTATS,        c_dissect_msg_poolstats)
6514
0
  C_HANDLE(C_MSG_GETPOOLSTATSREPLY,     c_dissect_msg_poolstatsreply)
6515
0
  C_HANDLE(C_MSG_MON_GLOBAL_ID,       c_dissect_msg_mon_globalid)
6516
0
  C_HANDLE(C_MSG_MON_ELECTION,        c_dissect_msg_mon_election)
6517
0
  C_HANDLE(C_MSG_MON_PAXOS,       c_dissect_msg_mon_paxos)
6518
0
  C_HANDLE(C_MSG_MON_PROBE,       c_dissect_msg_mon_probe)
6519
0
  C_HANDLE(C_MSG_OSD_PING,        c_dissect_msg_osd_ping)
6520
0
  C_HANDLE(C_MSG_OSD_BOOT,        c_dissect_msg_osd_boot)
6521
0
  C_HANDLE(C_MSG_PGSTATS,         c_dissect_msg_pgstats)
6522
0
  C_HANDLE(C_MSG_OSD_PG_CREATE,       c_dissect_msg_osd_pg_create)
6523
0
  C_HANDLE(C_CEPH_MSG_CLIENT_CAPS,      c_dissect_msg_client_caps)
6524
0
  C_HANDLE(C_CEPH_MSG_CLIENT_CAPRELEASE,      c_dissect_msg_client_caprel)
6525
0
  C_HANDLE(C_MSG_TIMECHECK,       c_dissect_msg_timecheck)
6526
6527
6
  default:
6528
6
    parsedsize = C_CALL(c_dissect_msg_unknown);
6529
6
#undef C_CALL
6530
6
#undef C_HANDLE
6531
6
  }
6532
6533
6
  size = front_len + middle_len + data_len;
6534
6535
  /* Did the message dissector use all the data? */
6536
6
  c_warn_size(tree, tvb, off+parsedsize, off+size, data);
6537
6538
6
  off += size;
6539
6540
  /*** Footer ***/
6541
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));
6549
  */
6550
6551
6
  ti = proto_tree_add_item(tree, hf_foot, tvb, off, C_SIZE_FOOT, ENC_NA);
6552
6
  subtree = proto_item_add_subtree(ti, ett_foot);
6553
6554
6
  proto_tree_add_item(subtree, hf_foot_front_crc,
6555
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6556
6
  off += 4;
6557
6
  proto_tree_add_item(subtree, hf_foot_middle_crc,
6558
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6559
6
  off += 4;
6560
6
  proto_tree_add_item(subtree, hf_foot_data_crc,
6561
6
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6562
6
  off += 4;
6563
6564
6
  proto_tree_add_item(subtree, hf_foot_signature,
6565
6
          tvb, off, 8, ENC_LITTLE_ENDIAN);
6566
6
  off += 8;
6567
6
  off = c_dissect_flags(subtree, tvb, off, data);
6568
6569
6
  return off;
6570
6
}
6571
6572
94
#define C_SIZE_CONNECT          33
6573
153
#define C_SIZE_CONNECT_REPLY    25
6574
240
#define C_CONNECT_REPLY_OFF_OFFLEN 20
6575
0
#define C_SIZE_HELLO_S          (2*C_SIZE_ENTITY_ADDR)
6576
71
#define C_SIZE_HELLO_C          (C_SIZE_ENTITY_ADDR + C_SIZE_CONNECT)
6577
144
#define C_HELLO_OFF_AUTHLEN     (C_SIZE_ENTITY_ADDR + 28)
6578
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)
6583
23
{
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);
6595
  */
6596
6597
23
  proto_item *ti;
6598
23
  proto_tree *tree;
6599
23
  uint32_t authsize;
6600
6601
23
  authsize = tvb_get_letohl(tvb, off+28);
6602
6603
23
  ti = proto_tree_add_item(root, hf_connect, tvb, off, C_SIZE_CONNECT, ENC_NA);
6604
23
  tree = proto_item_add_subtree(ti, ett_connect);
6605
6606
23
  off = c_dissect_features(tree, tvb, off, data);
6607
6608
23
  proto_tree_add_item(tree, hf_connect_host_type,
6609
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6610
23
  off += 4;
6611
23
  proto_tree_add_item(tree, hf_connect_seq_global,
6612
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6613
23
  off += 4;
6614
23
  proto_tree_add_item(tree, hf_connect_seq,
6615
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6616
23
  off += 4;
6617
23
  proto_tree_add_item(tree, hf_connect_proto_ver,
6618
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6619
23
  off += 4;
6620
23
  proto_tree_add_item(tree, hf_connect_auth_proto,
6621
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6622
23
  off += 4;
6623
23
  proto_tree_add_item(tree, hf_connect_auth_size,
6624
23
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6625
23
  off += 4;
6626
6627
23
  off = c_dissect_flags(tree, tvb, off, data);
6628
6629
  /* @TODO: Parse auth. */
6630
23
  proto_tree_add_item(tree, hf_connect_auth,
6631
23
          tvb, off, authsize, ENC_NA);
6632
23
  off += authsize;
6633
6634
23
  return off;
6635
23
}
6636
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)
6641
68
{
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));
6652
  */
6653
6654
68
  proto_item *ti;
6655
68
  proto_tree *tree;
6656
68
  uint32_t authsize;
6657
6658
68
  authsize = tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6659
6660
68
  c_set_type(data, "Connect Reply");
6661
6662
68
  ti = proto_tree_add_item(root, hf_connect_reply,
6663
68
         tvb, off, C_SIZE_CONNECT_REPLY, ENC_NA);
6664
68
  tree = proto_item_add_subtree(ti, ett_connect_reply);
6665
6666
68
  off = c_dissect_features(tree, tvb, off, data);
6667
6668
68
  proto_tree_add_item(tree, hf_connect_seq_global,
6669
68
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6670
68
  off += 4;
6671
68
  proto_tree_add_item(tree, hf_connect_seq,
6672
68
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6673
68
  off += 4;
6674
68
  proto_tree_add_item(tree, hf_connect_proto_ver,
6675
68
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6676
68
  off += 4;
6677
68
  proto_tree_add_item(tree, hf_connect_auth_size,
6678
68
          tvb, off, 4, ENC_LITTLE_ENDIAN);
6679
68
  off += 4;
6680
6681
68
  off = c_dissect_flags(tree, tvb, off, data);
6682
6683
  /* @TODO: Parse auth. */
6684
68
  proto_tree_add_item(tree, hf_connect_auth,
6685
68
          tvb, off, authsize, ENC_NA);
6686
68
  off += authsize;
6687
6688
68
  return off;
6689
68
}
6690
6691
/** Do the connection initiation dance.
6692
 *
6693
 * This handles the data that is sent before the protocol is actually started.
6694
 */
6695
static
6696
unsigned c_dissect_new(proto_tree *tree,
6697
        tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6698
29
{
6699
29
  int bansize;
6700
6701
  /*
6702
    Since the packet is larger than the max banner length we can read it
6703
    all in safely.
6704
  */
6705
29
  G_STATIC_ASSERT(C_BANNER_SIZE+1 <= C_BANNER_SIZE_MIN+C_SIZE_HELLO_C);
6706
29
  G_STATIC_ASSERT(C_BANNER_SIZE+1 <= C_BANNER_SIZE_MIN+C_SIZE_HELLO_S);
6707
6708
29
  if (tvb_memeql(tvb, off, C_BANNER, C_BANNER_SIZE_MIN) != 0)
6709
3
    return C_INVALID;
6710
6711
26
  bansize = tvb_strnlen(tvb, off, C_BANNER_SIZE+1);
6712
26
  if (bansize != C_BANNER_SIZE) /* Note -1 != C_BANNER_SIZE */
6713
3
    return C_INVALID;
6714
6715
23
  proto_tree_add_item(tree, hf_banner, tvb, off, bansize, ENC_ASCII);
6716
23
  off += bansize;
6717
6718
23
  c_set_type(data, "Connect");
6719
6720
23
  if (c_from_server(data))
6721
0
    off = c_dissect_entityaddr(tree, hf_server_info, NULL, tvb, off);
6722
6723
23
  off = c_dissect_entityaddr(tree, hf_client_info, NULL, tvb, off);
6724
6725
23
  if (c_from_client(data))
6726
23
    off = c_dissect_connect(tree, tvb, off, data);
6727
6728
23
  data->src->state = C_STATE_OPEN;
6729
6730
23
  return off;
6731
26
}
6732
6733
static
6734
bool c_unknowntagnext(tvbuff_t *tvb, unsigned off)
6735
8.66k
{
6736
8.66k
  if (!tvb_bytes_exist(tvb, off, 1)) return false;
6737
6738
8.65k
  return (try_val_to_str_ext(tvb_get_uint8(tvb, off), &c_tag_strings_ext) == NULL);
6739
8.66k
}
6740
6741
/* Dissect a MSGR message.
6742
 *
6743
 * MSGR is Ceph's outer message protocol.
6744
 */
6745
static
6746
unsigned c_dissect_msgr(proto_tree *tree,
6747
         tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6748
290
{
6749
290
  proto_item *ti;
6750
290
  c_tag tag;
6751
290
  unsigned unknowntagcount = 1;
6752
6753
290
  tag = (c_tag)tvb_get_uint8(tvb, off);
6754
290
  ti = proto_tree_add_item(tree, hf_tag, tvb, off, 1, ENC_LITTLE_ENDIAN);
6755
290
  off += 1;
6756
6757
290
  switch (tag)
6758
290
  {
6759
5
  case C_TAG_READY:
6760
24
  case C_TAG_RESETSESSION:
6761
32
  case C_TAG_WAIT:
6762
54
  case C_TAG_RETRY_SESSION:
6763
54
  case C_TAG_RETRY_GLOBAL:
6764
55
  case C_TAG_BADPROTOVER:
6765
55
  case C_TAG_BADAUTHORIZER:
6766
66
  case C_TAG_FEATURES:
6767
66
    off = c_dissect_connect_reply(tree, tvb, off, data);
6768
66
    break;
6769
2
  case C_TAG_SEQ:
6770
2
    off = c_dissect_connect_reply(tree, tvb, off, data);
6771
2
    proto_tree_add_item(tree, hf_seq_existing,
6772
2
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6773
2
    off += 8;
6774
6775
2
    data->dst->state = C_STATE_SEQ;
6776
2
    break;
6777
5
  case C_TAG_CLOSE:
6778
5
    c_set_type(data, "CLOSE");
6779
5
    data->src->state = C_STATE_NEW;
6780
5
    break;
6781
6
  case C_TAG_MSG:
6782
6
    off = c_dissect_msg(tree, tvb, off, data);
6783
6
    break;
6784
23
  case C_TAG_ACK:
6785
23
    c_set_type(data, "ACK");
6786
23
    proto_item_append_text(data->item_root, ", Seq: %u",
6787
23
               tvb_get_letohl(tvb, off));
6788
23
    proto_tree_add_item(tree, hf_ack,
6789
23
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6790
23
    off += 8;
6791
23
    break;
6792
1
  case C_TAG_KEEPALIVE:
6793
1
    c_set_type(data, "KEEPALIVE");
6794
    /* No data. */
6795
1
    break;
6796
12
  case C_TAG_KEEPALIVE2:
6797
35
  case C_TAG_KEEPALIVE2_ACK:
6798
35
    c_set_type(data, "KEEPALIVE2");
6799
35
    proto_tree_add_item(tree, hf_keepalive_time,
6800
35
            tvb, off, 8, ENC_LITTLE_ENDIAN);
6801
35
    off += 8;
6802
35
    break;
6803
152
  default:
6804
    /*
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.
6811
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.
6816
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.
6822
    */
6823
6824
    /* Batch multiple unknowns together. */
6825
4.33k
    while (c_unknowntagnext(tvb, off)) {
6826
4.17k
      off++;
6827
4.17k
      unknowntagcount++;
6828
4.17k
    }
6829
6830
152
    c_set_type(data, wmem_strdup_printf(wmem_packet_scope(),
6831
152
                "UNKNOWN x%u",
6832
152
                unknowntagcount));
6833
152
    expert_add_info(data->pinfo, ti, &ei_tag_unknown);
6834
290
  }
6835
6836
290
  return off;
6837
290
}
6838
6839
/* Dissect a Protocol Data Unit
6840
 */
6841
static
6842
unsigned c_dissect_pdu(proto_tree *root,
6843
        tvbuff_t *tvb, unsigned off, c_pkt_data *data)
6844
319
{
6845
319
  proto_item *ti, *tif;
6846
319
  proto_tree *tree, *tree_filter;
6847
6848
319
  ti = proto_tree_add_item(root, proto_ceph, tvb, off, -1, ENC_NA);
6849
319
  tree = proto_item_add_subtree(ti, ett_ceph);
6850
6851
319
  data->item_root = ti;
6852
6853
319
  tif = proto_tree_add_item(tree, hf_filter_data, tvb, off, -1, ENC_NA);
6854
319
  tree_filter = proto_item_add_subtree(tif, ett_filter_data);
6855
6856
319
  switch (data->src->state)
6857
319
  {
6858
29
    case C_STATE_NEW:
6859
29
      off = c_dissect_new(tree, tvb, off, data);
6860
29
      break;
6861
0
    case C_STATE_SEQ:
6862
0
      c_set_type(data, "Sequence Number");
6863
0
      proto_item_append_text(data->item_root, ", Seq: %"PRIu64,
6864
0
                 tvb_get_letoh64(tvb, off));
6865
0
      proto_tree_add_item(tree, hf_seq_new, tvb, off, 8, ENC_LITTLE_ENDIAN);
6866
0
      off += 8;
6867
0
      data->src->state = C_STATE_OPEN;
6868
0
      break;
6869
290
    default:
6870
290
      off = c_dissect_msgr(tree, tvb, off, data);
6871
319
  }
6872
6873
319
  if (tree_filter) {
6874
319
    proto_item *fi;
6875
319
    const char *srcn, *dstn;
6876
6877
    /* Provide readable defaults. */
6878
319
    srcn = data->src->name.slug? data->src->name.slug : "Unknown";
6879
319
    dstn = data->dst->name.slug? data->dst->name.slug : "Unknown";
6880
6881
    /*** General Filter Data ***/
6882
319
    fi = proto_tree_add_string(tree_filter, hf_src_slug,
6883
319
             NULL, 0, 0, srcn);
6884
319
    proto_item_set_generated(fi);
6885
319
    fi = proto_tree_add_uint(tree_filter, hf_src_type,
6886
319
           NULL, 0, 0, data->src->name.type);
6887
319
    proto_item_set_generated(fi);
6888
319
    fi = proto_tree_add_string(tree_filter, hf_dst_slug,
6889
319
             NULL, 0, 0, dstn);
6890
319
    proto_item_set_generated(fi);
6891
319
    fi = proto_tree_add_uint(tree_filter, hf_dst_type,
6892
319
           NULL, 0, 0, data->dst->name.type);
6893
319
    proto_item_set_generated(fi);
6894
6895
319
    proto_item_set_end(tif, tvb, off);
6896
319
  }
6897
6898
319
  proto_item_set_end(ti,  tvb, off);
6899
6900
319
  return off;
6901
319
}
6902
6903
static
6904
unsigned c_pdu_end(tvbuff_t *tvb, packet_info *pinfo, unsigned off, c_pkt_data *data)
6905
407
{
6906
407
  c_inet  af;
6907
6908
  /*
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.
6913
   */
6914
407
  if (data->convd->client.port == 0xFFFF) {
6915
62
    if (!tvb_bytes_exist(tvb, off, C_BANNER_SIZE + C_SIZE_ENTITY_ADDR + 8 + 2))
6916
23
      return C_NEEDMORE;
6917
6918
    /* We have enough to determine client vs. server */
6919
39
    af = (c_inet)tvb_get_ntohs(tvb, off + C_BANNER_SIZE + C_SIZE_ENTITY_ADDR + 8);
6920
39
    if (af != C_IPv4 && af != C_IPv6) {
6921
      /* Client */
6922
39
      copy_address_wmem(wmem_file_scope(), &data->convd->client.addr, &pinfo->src);
6923
39
      data->convd->client.port = pinfo->srcport;
6924
39
      copy_address_wmem(wmem_file_scope(), &data->convd->server.addr, &pinfo->dst);
6925
39
      data->convd->server.port = pinfo->destport;
6926
39
      data->src = &data->convd->client;
6927
39
      data->dst = &data->convd->server;
6928
39
    } else {
6929
      /* Server */
6930
0
      copy_address_wmem(wmem_file_scope(), &data->convd->server.addr, &pinfo->src);
6931
0
      data->convd->server.port = pinfo->srcport;
6932
0
      copy_address_wmem(wmem_file_scope(), &data->convd->client.addr, &pinfo->dst);
6933
0
      data->convd->client.port = pinfo->destport;
6934
0
      data->src = &data->convd->server;
6935
0
      data->dst = &data->convd->client;
6936
0
    }
6937
39
  }
6938
6939
384
  switch (data->src->state)
6940
384
  {
6941
73
  case C_STATE_NEW:
6942
73
    if (c_from_client(data))
6943
73
    {
6944
73
      if (!tvb_bytes_exist(tvb, off+C_BANNER_SIZE+C_HELLO_OFF_AUTHLEN, 4))
6945
2
        return C_NEEDMORE;
6946
71
      return off + C_BANNER_SIZE + C_SIZE_HELLO_C
6947
71
           + tvb_get_letohl(tvb, off+C_BANNER_SIZE+C_HELLO_OFF_AUTHLEN);
6948
73
    }
6949
0
    else
6950
0
      return off + C_BANNER_SIZE + C_SIZE_HELLO_S;
6951
0
  case C_STATE_SEQ:
6952
0
    return off + 8;
6953
311
  default:
6954
311
    switch ((c_tag)tvb_get_uint8(tvb, off++))
6955
311
    {
6956
10
    case C_TAG_READY:
6957
34
    case C_TAG_RESETSESSION:
6958
44
    case C_TAG_WAIT:
6959
70
    case C_TAG_RETRY_SESSION:
6960
71
    case C_TAG_RETRY_GLOBAL:
6961
74
    case C_TAG_BADPROTOVER:
6962
74
    case C_TAG_BADAUTHORIZER:
6963
85
    case C_TAG_FEATURES:
6964
85
      if (!tvb_bytes_exist(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN, 4))
6965
2
        return C_NEEDMORE;
6966
83
      return off + C_SIZE_CONNECT_REPLY
6967
83
           + tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6968
2
    case C_TAG_SEQ:
6969
2
      if (!tvb_bytes_exist(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN, 4))
6970
0
        return C_NEEDMORE;
6971
2
      return off + C_SIZE_CONNECT_REPLY + 8
6972
2
           + tvb_get_letohl(tvb, off+C_CONNECT_REPLY_OFF_OFFLEN);
6973
5
    case C_TAG_CLOSE:
6974
5
      return off;
6975
8
    case C_TAG_MSG:
6976
8
    {
6977
8
      uint32_t front_len, middle_len, data_len;
6978
6979
8
      if (!tvb_bytes_exist(tvb, off+C_OFF_HEAD1, C_SIZE_HEAD1))
6980
2
        return C_NEEDMORE;
6981
6982
6
      front_len  = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 0);
6983
6
      middle_len = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 4);
6984
6
      data_len   = tvb_get_letohl(tvb, off + C_OFF_HEAD1 + 8);
6985
6986
6
      return off + C_SIZE_HEAD+front_len+middle_len+data_len+C_SIZE_FOOT;
6987
8
    }
6988
23
    case C_TAG_ACK:
6989
23
      return off + 8;
6990
1
    case C_TAG_KEEPALIVE:
6991
1
      return off;
6992
12
    case C_TAG_KEEPALIVE2:
6993
35
    case C_TAG_KEEPALIVE2_ACK:
6994
35
      return off+C_SIZE_TIMESPEC;
6995
152
    default:
6996
4.33k
      while (c_unknowntagnext(tvb, off))
6997
4.17k
        off++;
6998
6999
152
      return off;
7000
311
    }
7001
384
  }
7002
384
}
7003
7004
static
7005
int dissect_ceph(tvbuff_t *tvb, packet_info *pinfo,
7006
     proto_tree *tree, void *pdata _U_)
7007
99
{
7008
99
  unsigned off, offt, offt2;
7009
99
  c_pkt_data data;
7010
7011
99
  col_set_str(pinfo->cinfo, COL_PROTOCOL, "Ceph");
7012
99
  col_clear(pinfo->cinfo, COL_INFO);
7013
7014
99
  off = 0;
7015
412
  while (off < tvb_reported_length(tvb))
7016
407
  {
7017
407
    c_pkt_data_init(&data, pinfo, off);
7018
7019
    /* Save snapshot before dissection changes it. */
7020
    /*
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.
7024
    */
7025
407
    if (off)
7026
308
      c_pkt_data_save(&data, pinfo, off);
7027
7028
407
    offt = c_pdu_end(tvb, pinfo, off, &data);
7029
407
    if (offt == C_INVALID)
7030
0
    {
7031
0
      return 0;
7032
0
    }
7033
407
    if (offt == C_NEEDMORE) /* Need more data to determine PDU length. */
7034
29
    {
7035
29
      pinfo->desegment_offset = off;
7036
29
      pinfo->desegment_len  = DESEGMENT_ONE_MORE_SEGMENT;
7037
29
      return 1;
7038
29
    }
7039
378
    if (offt > tvb_reported_length(tvb)) /* Know PDU length, get rest */
7040
59
    {
7041
59
      pinfo->desegment_offset = off;
7042
59
      pinfo->desegment_len  = offt - tvb_reported_length(tvb);
7043
59
      return 1;
7044
59
    }
7045
7046
    /*
7047
      If we didn't save above, save now.  This is a complete PDU so
7048
      we need to save the state.
7049
    */
7050
319
    if (!off)
7051
37
      c_pkt_data_save(&data, pinfo, off);
7052
7053
319
    col_append_sep_str(pinfo->cinfo, COL_INFO, " | ", "");
7054
319
    col_set_fence(pinfo->cinfo, COL_INFO);
7055
7056
319
    offt2 = c_dissect_pdu(tree, tvb, off, &data);
7057
319
    if (!offt2) return 0;
7058
313
    DISSECTOR_ASSERT_CMPINT(offt2, ==, offt);
7059
7060
313
    off = offt;
7061
313
  }
7062
7063
5
  return off; /* Perfect Fit. */
7064
99
}
7065
7066
/** An old style dissector proxy.
7067
 *
7068
 * Proxies the old style dissector interface to the new style.
7069
 */
7070
static
7071
int dissect_ceph_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
7072
56
{
7073
56
  dissect_ceph(tvb, pinfo, tree, data);
7074
56
  return tvb_captured_length(tvb);
7075
56
}
7076
7077
static
7078
bool dissect_ceph_heur(tvbuff_t *tvb, packet_info *pinfo,
7079
         proto_tree *tree, void *data)
7080
2.40k
{
7081
2.40k
  conversation_t *conv;
7082
7083
2.40k
  if (tvb_memeql(tvb, 0, C_BANNER, C_BANNER_SIZE_MIN) != 0) return false;
7084
7085
  /*** It's ours! ***/
7086
7087
43
  conv = find_or_create_conversation(pinfo);
7088
  /* Mark it as ours. */
7089
43
  conversation_set_dissector(conv, ceph_handle);
7090
7091
43
  dissect_ceph(tvb, pinfo, tree, data);
7092
43
  return true;
7093
2.40k
}
7094
7095
/* Register the protocol with Wireshark.
7096
 */
7097
void
7098
proto_register_ceph(void)
7099
14
{
7100
14
  expert_module_t *expert_ceph;
7101
7102
14
  static hf_register_info hf[] = {
7103
14
    { &hf_filter_data, {
7104
14
      "Filter Data", "ceph.filter",
7105
14
      FT_NONE, BASE_NONE, NULL, 0,
7106
14
      "A bunch of properties for convenient filtering.", HFILL
7107
14
    } },
7108
14
    { &hf_node_id, {
7109
14
      "ID", "ceph.node_id",
7110
14
      FT_UINT64, BASE_DEC, NULL, 0,
7111
14
      "The numeric ID of the node.", HFILL
7112
14
    } },
7113
14
    { &hf_node_type, {
7114
14
      "Source Node Type", "ceph.node_type",
7115
14
      FT_UINT32, BASE_HEX, VALS(c_node_type_strings), 0,
7116
14
      "The type of source node.", HFILL
7117
14
    } },
7118
14
    { &hf_node_nonce, {
7119
14
      "Nonce", "ceph.node_nonce",
7120
14
      FT_UINT32, BASE_HEX, NULL, 0,
7121
14
      "Meaningless number to differentiate between nodes on "
7122
14
      "the same system.", HFILL
7123
14
    } },
7124
14
    { &hf_entityinst_name, {
7125
14
      "Name", "ceph.entityinst.name",
7126
14
      FT_NONE, BASE_NONE, NULL, 0,
7127
14
      NULL, HFILL
7128
14
    } },
7129
14
    { &hf_entityinst_addr, {
7130
14
      "Address", "ceph.entityinst.addr",
7131
14
      FT_NONE, BASE_NONE, NULL, 0,
7132
14
      NULL, HFILL
7133
14
    } },
7134
14
    { &hf_EntityName, {
7135
14
      "Entity Name", "ceph.EntityName",
7136
14
      FT_NONE, BASE_NONE, NULL, 0,
7137
14
      NULL, HFILL
7138
14
    } },
7139
14
    { &hf_EntityName_type, {
7140
14
      "Type", "ceph.EntityName.type",
7141
14
      FT_UINT32, BASE_HEX, NULL, 0,
7142
14
      NULL, HFILL
7143
14
    } },
7144
14
    { &hf_EntityName_id, {
7145
14
      "ID", "ceph.EntityName.id",
7146
14
      FT_STRING, BASE_NONE, NULL, 0,
7147
14
      NULL, HFILL
7148
14
    } },
7149
14
    { &hf_src_slug, {
7150
14
      "Source Node Name", "ceph.src",
7151
14
      FT_STRING, BASE_NONE, NULL, 0,
7152
14
      NULL, HFILL
7153
14
    } },
7154
14
    { &hf_src_type, {
7155
14
      "Source Node Type", "ceph.src.type",
7156
14
      FT_UINT8, BASE_HEX, VALS(c_node_type_abbr_strings), 0,
7157
14
      NULL, HFILL
7158
14
    } },
7159
14
    { &hf_dst_slug, {
7160
14
      "Destination Node Name", "ceph.dst",
7161
14
      FT_STRING, BASE_NONE, NULL, 0,
7162
14
      NULL, HFILL
7163
14
    } },
7164
14
    { &hf_dst_type, {
7165
14
      "Destination Node Type", "ceph.dst.type",
7166
14
      FT_UINT8, BASE_HEX, VALS(c_node_type_abbr_strings), 0,
7167
14
      NULL, HFILL
7168
14
    } },
7169
14
    { &hf_banner, {
7170
14
      "Version", "ceph.ver",
7171
14
      FT_STRINGZ, BASE_NONE, NULL, 0,
7172
14
      "The protocol version string.", HFILL
7173
14
    } },
7174
14
    { &hf_client_info, {
7175
14
      "Client's Identity", "ceph.client_info",
7176
14
      FT_NONE, BASE_NONE, NULL, 0,
7177
14
      NULL, HFILL
7178
14
    } },
7179
14
    { &hf_server_info, {
7180
14
      "Server's Identity", "ceph.server_info",
7181
14
      FT_NONE, BASE_NONE, NULL, 0,
7182
14
      NULL, HFILL
7183
14
    } },
7184
14
    { &hf_sockaddr, {
7185
14
      "Network Address", "ceph.sockaddr",
7186
14
      FT_NONE, BASE_NONE, NULL, 0,
7187
14
      NULL, HFILL
7188
14
    } },
7189
14
    { &hf_inet_family, {
7190
14
      "Address Family", "ceph.af",
7191
14
      FT_UINT16, BASE_HEX, VALS(c_inet_strings), 0,
7192
14
      "The address family of the client as seen by the server.", HFILL
7193
14
    } },
7194
14
    { &hf_port, {
7195
14
      "Port", "ceph.client.port",
7196
14
      FT_UINT16, BASE_DEC, NULL, 0,
7197
14
      "The port of the client as seen by the server.", HFILL
7198
14
    } },
7199
14
    { &hf_addr_ipv4, {
7200
14
      "IPv4 Address", "ceph.client.ip4",
7201
14
      FT_IPv4, BASE_NONE, NULL, 0,
7202
14
      "The IP address of the client as seen by the server.", HFILL
7203
14
    } },
7204
14
    { &hf_addr_ipv6, {
7205
14
      "IPv6 Address", "ceph.client.ipv6",
7206
14
      FT_IPv6, BASE_NONE, NULL, 0,
7207
14
      "The IP address of the client as seen by the server.", HFILL
7208
14
    } },
7209
14
    { &hf_data_data, {
7210
14
      "Data", "ceph.data.data",
7211
14
      FT_BYTES, BASE_NONE, NULL, 0,
7212
14
      NULL, HFILL
7213
14
    } },
7214
14
    { &hf_data_size, {
7215
14
      "Size", "ceph.data.size",
7216
14
      FT_UINT32, BASE_DEC, NULL, 0,
7217
14
      NULL, HFILL
7218
14
    } },
7219
14
    { &hf_string_data, {
7220
14
      "Data", "ceph.string.data",
7221
14
      FT_STRING, BASE_NONE, NULL, 0,
7222
14
      NULL, HFILL
7223
14
    } },
7224
14
    { &hf_string_size, {
7225
14
      "Size", "ceph.string.size",
7226
14
      FT_UINT32, BASE_DEC, NULL, 0,
7227
14
      NULL, HFILL
7228
14
    } },
7229
14
    { &hf_keepalive_time, {
7230
14
      "Timestamp", "ceph.keepalive.time",
7231
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7232
14
      NULL, HFILL
7233
14
    } },
7234
14
    { &hf_encoded_ver, {
7235
14
      "Encoding Version", "ceph.enc.ver",
7236
14
      FT_UINT8, BASE_DEC, NULL, 0,
7237
14
      NULL, HFILL
7238
14
    } },
7239
14
    { &hf_encoded_compat, {
7240
14
      "Minimum compatible version", "ceph.enc.compat",
7241
14
      FT_UINT8, BASE_DEC, NULL, 0,
7242
14
      NULL, HFILL
7243
14
    } },
7244
14
    { &hf_encoded_size, {
7245
14
      "Size", "ceph.nanoseconds",
7246
14
      FT_UINT32, BASE_DEC, NULL, 0,
7247
14
      "Size of encoded message.", HFILL
7248
14
    } },
7249
14
    { &hf_version, {
7250
14
      "Version", "ceph.version",
7251
14
      FT_UINT64, BASE_DEC, NULL, 0,
7252
14
      NULL, HFILL
7253
14
    } },
7254
14
    { &hf_epoch, {
7255
14
      "Epoch", "ceph.epoch",
7256
14
      FT_UINT32, BASE_DEC, NULL, 0,
7257
14
      NULL, HFILL
7258
14
    } },
7259
14
    { &hf_pool, {
7260
14
      "Pool", "ceph.pool",
7261
14
      FT_INT64, BASE_DEC, NULL, 0,
7262
14
      NULL, HFILL
7263
14
    } },
7264
14
    { &hf_key, {
7265
14
      "Object Key", "ceph.key",
7266
14
      FT_STRING, BASE_NONE, NULL, 0,
7267
14
      NULL, HFILL
7268
14
    } },
7269
14
    { &hf_namespace, {
7270
14
      "Namespace", "ceph.namespace",
7271
14
      FT_STRING, BASE_NONE, NULL, 0,
7272
14
      NULL, HFILL
7273
14
    } },
7274
14
    { &hf_hash, {
7275
14
      "Object Hash", "ceph.hash",
7276
14
      FT_INT64, BASE_DEC, NULL, 0,
7277
14
      NULL, HFILL
7278
14
    } },
7279
14
    { &hf_pgid_ver, {
7280
14
      "Placement Group Version", "ceph.pg.ver",
7281
14
      FT_UINT8, BASE_DEC, NULL, 0,
7282
14
      NULL, HFILL
7283
14
    } },
7284
14
    { &hf_pgid_pool, {
7285
14
      "Pool", "ceph.pg.pool",
7286
14
      FT_UINT64, BASE_HEX, NULL, 0,
7287
14
      NULL, HFILL
7288
14
    } },
7289
14
    { &hf_pgid_seed, {
7290
14
      "Seed", "ceph.pg.seed",
7291
14
      FT_UINT32, BASE_HEX, NULL, 0,
7292
14
      NULL, HFILL
7293
14
    } },
7294
14
    { &hf_pgid_preferred, {
7295
14
      "Preferred", "ceph.pg.preferred",
7296
14
      FT_INT32, BASE_DEC, NULL, 0,
7297
14
      NULL, HFILL
7298
14
    } },
7299
14
    { &hf_pg_create_epoch, {
7300
14
      "Epoch Created", "ceph.pg_create.epoch",
7301
14
      FT_UINT32, BASE_DEC, NULL, 0,
7302
14
      NULL, HFILL
7303
14
    } },
7304
14
    { &hf_pg_create_parent, {
7305
14
      "Parent", "ceph.pg_create.parent",
7306
14
      FT_NONE, BASE_NONE, NULL, 0,
7307
14
      NULL, HFILL
7308
14
    } },
7309
14
    { &hf_pg_create_splitbits, {
7310
14
      "Split Bits", "ceph.pg_create.splitbits",
7311
14
      FT_INT32, BASE_DEC, NULL, 0,
7312
14
      NULL, HFILL
7313
14
    } },
7314
14
    { &hf_path_ver, {
7315
14
      "Encoding Version", "ceph.path.ver",
7316
14
      FT_UINT8, BASE_HEX, NULL, 0,
7317
14
      NULL, HFILL
7318
14
    } },
7319
14
    { &hf_path_inode, {
7320
14
      "Inode", "ceph.path.inode",
7321
14
      FT_UINT64, BASE_HEX, NULL, 0,
7322
14
      NULL, HFILL
7323
14
    } },
7324
14
    { &hf_path_rel, {
7325
14
      "Relative component", "ceph.path.rel",
7326
14
      FT_STRING, BASE_NONE, NULL, 0,
7327
14
      NULL, HFILL
7328
14
    } },
7329
14
    { &hf_mds_release_inode, {
7330
14
      "Inode", "ceph.mds_release.inode",
7331
14
      FT_UINT64, BASE_HEX, NULL, 0,
7332
14
      NULL, HFILL
7333
14
    } },
7334
14
    { &hf_mds_release_capid, {
7335
14
      "Capability ID", "ceph.mds_release.capid",
7336
14
      FT_UINT64, BASE_HEX, NULL, 0,
7337
14
      NULL, HFILL
7338
14
    } },
7339
14
    { &hf_mds_release_new, {
7340
14
      "New Capabilities", "ceph.mds_release.new",
7341
14
      FT_UINT32, BASE_HEX, NULL, 0,
7342
14
      NULL, HFILL
7343
14
    } },
7344
14
    { &hf_mds_release_wanted, {
7345
14
      "Wanted Capabilities", "ceph.mds_release.wanted",
7346
14
      FT_UINT32, BASE_HEX, NULL, 0,
7347
14
      NULL, HFILL
7348
14
    } },
7349
14
    { &hf_mds_release_seq, {
7350
14
      "Seq", "ceph.mds_release.seq",
7351
14
      FT_UINT32, BASE_HEX, NULL, 0,
7352
14
      NULL, HFILL
7353
14
    } },
7354
14
    { &hf_mds_release_seq_issue, {
7355
14
      "Seq Issue", "ceph.mds_release.seq_issue",
7356
14
      FT_UINT32, BASE_HEX, NULL, 0,
7357
14
      NULL, HFILL
7358
14
    } },
7359
14
    { &hf_mds_release_mseq, {
7360
14
      "Migration Sequence", "ceph.mds_release.mseq",
7361
14
      FT_UINT32, BASE_HEX, NULL, 0,
7362
14
      NULL, HFILL
7363
14
    } },
7364
14
    { &hf_mds_release_dname_seq, {
7365
14
      "DName Seq", "ceph.mds_release.dname_seq",
7366
14
      FT_UINT32, BASE_HEX, NULL, 0,
7367
14
      NULL, HFILL
7368
14
    } },
7369
14
    { &hf_mds_release_dname, {
7370
14
      "DName", "ceph.mds_release.dname",
7371
14
      FT_STRING, BASE_NONE, NULL, 0,
7372
14
      NULL, HFILL
7373
14
    } },
7374
14
    { &hf_hitset_params, {
7375
14
      "HitSet Parameters", "ceph.hitset_params",
7376
14
      FT_NONE, BASE_NONE, NULL, 0,
7377
14
      NULL, HFILL
7378
14
    } },
7379
14
    { &hf_hitset_params_type, {
7380
14
      "Type", "ceph.hitset_params.type",
7381
14
      FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_hitset_params_type_strings_ext, 0,
7382
14
      NULL, HFILL
7383
14
    } },
7384
14
    { &hf_hitset_params_exphash_count, {
7385
14
      "Count", "ceph.hitset_params.exphash.count",
7386
14
      FT_UINT64, BASE_DEC, NULL, 0,
7387
14
      NULL, HFILL
7388
14
    } },
7389
14
    { &hf_hitset_params_exphash_hit, {
7390
14
      "Hit", "ceph.hitset_params.exphash.hit",
7391
14
      FT_UINT32, BASE_DEC, NULL, 0,
7392
14
      NULL, HFILL
7393
14
    } },
7394
14
    { &hf_snapinfo, {
7395
14
      "Snapshot Info", "ceph.snapinfo",
7396
14
      FT_NONE, BASE_NONE, NULL, 0,
7397
14
      NULL, HFILL
7398
14
    } },
7399
14
    { &hf_snapinfo_id, {
7400
14
      "ID", "ceph.snapinfo.id",
7401
14
      FT_UINT64, BASE_HEX, NULL, 0,
7402
14
      NULL, HFILL
7403
14
    } },
7404
14
    { &hf_snapinfo_time, {
7405
14
      "Timestamp", "ceph.snapinfo.timestamp",
7406
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7407
14
      NULL, HFILL
7408
14
    } },
7409
14
    { &hf_snapinfo_name, {
7410
14
      "Name", "ceph.snapinfo.name",
7411
14
      FT_STRING, BASE_NONE, NULL, 0,
7412
14
      NULL, HFILL
7413
14
    } },
7414
14
    { &hf_pgpool, {
7415
14
      "Placement Group Pool", "ceph.pgpool",
7416
14
      FT_NONE, BASE_NONE, NULL, 0,
7417
14
      NULL, HFILL
7418
14
    } },
7419
14
    { &hf_pgpool_type, {
7420
14
      "Type", "ceph.pgpool.type",
7421
14
      FT_UINT8, BASE_HEX, VALS(c_pgpool_type_strings), 0,
7422
14
      NULL, HFILL
7423
14
    } },
7424
14
    { &hf_pgpool_size, {
7425
14
      "Size", "ceph.pgpool.size",
7426
14
      FT_UINT8, BASE_DEC, NULL, 0,
7427
14
      NULL, HFILL
7428
14
    } },
7429
14
    { &hf_pgpool_crush_ruleset, {
7430
14
      "CRUSH Ruleset", "ceph.pgpool.crush_ruleset",
7431
14
      FT_UINT8, BASE_DEC, NULL, 0,
7432
14
      NULL, HFILL
7433
14
    } },
7434
14
    { &hf_pgpool_hash, {
7435
14
      "Object Hash", "ceph.pgpool.hash",
7436
14
      FT_UINT8, BASE_HEX, NULL, 0,
7437
14
      NULL, HFILL
7438
14
    } },
7439
14
    { &hf_pgpool_pgnum, {
7440
14
      "PG Count", "ceph.pgpool.pgnum",
7441
14
      FT_UINT32, BASE_DEC, NULL, 0,
7442
14
      NULL, HFILL
7443
14
    } },
7444
14
    { &hf_pgpool_pgpnum, {
7445
14
      "PGP Count", "ceph.pgpool.pgpnum",
7446
14
      FT_UINT32, BASE_DEC, NULL, 0,
7447
14
      NULL, HFILL
7448
14
    } },
7449
14
    { &hf_pgpool_changed, {
7450
14
      "Last Changed", "ceph.pgpool.changed",
7451
14
      FT_UINT32, BASE_DEC, NULL, 0,
7452
14
      NULL, HFILL
7453
14
    } },
7454
14
    { &hf_pgpool_snapseq, {
7455
14
      "Snap Sequence", "ceph.pgpool.snapseq",
7456
14
      FT_UINT64, BASE_HEX, NULL, 0,
7457
14
      NULL, HFILL
7458
14
    } },
7459
14
    { &hf_pgpool_snapepoch, {
7460
14
      "Epoch", "ceph.pgpool.snapepoch",
7461
14
      FT_UINT32, BASE_DEC, NULL, 0,
7462
14
      NULL, HFILL
7463
14
    } },
7464
14
    { &hf_pgpool_snap, {
7465
14
      "Snapshot", "ceph.pgpool.snap",
7466
14
      FT_NONE, BASE_NONE, NULL, 0,
7467
14
      NULL, HFILL
7468
14
    } },
7469
14
    { &hf_pgpool_snap_id, {
7470
14
      "ID", "ceph.pgpool.snap.id",
7471
14
      FT_UINT64, BASE_HEX, NULL, 0,
7472
14
      NULL, HFILL
7473
14
    } },
7474
14
    { &hf_pgpool_snapdel, {
7475
14
      "Deleted Snapshots", "ceph.pgpool.snapdel",
7476
14
      FT_NONE, BASE_NONE, NULL, 0,
7477
14
      NULL, HFILL
7478
14
    } },
7479
14
    { &hf_pgpool_snapdel_from, {
7480
14
      "From", "ceph.pgpool.snapdel.from",
7481
14
      FT_UINT64, BASE_HEX, NULL, 0,
7482
14
      NULL, HFILL
7483
14
    } },
7484
14
    { &hf_pgpool_snapdel_to, {
7485
14
      "To", "ceph.pgpool.snapdel.to",
7486
14
      FT_UINT64, BASE_HEX, NULL, 0,
7487
14
      NULL, HFILL
7488
14
    } },
7489
14
    { &hf_pgpool_uid, {
7490
14
      "User ID", "ceph.pgpool.uid",
7491
14
      FT_UINT64, BASE_DEC, NULL, 0,
7492
14
      NULL, HFILL
7493
14
    } },
7494
14
    { &hf_pgpool_flags_low, {
7495
14
      "Flags", "ceph.pgpool.flags",
7496
14
      FT_UINT32, BASE_HEX, NULL, 0,
7497
14
      NULL, HFILL
7498
14
    } },
7499
14
    { &hf_pgpool_flags_high, {
7500
14
      "Flags", "ceph.pgpool.flags",
7501
14
      FT_UINT32, BASE_HEX, NULL, 0,
7502
14
      NULL, HFILL
7503
14
    } },
7504
14
    { &hf_pgpool_crash_reply_interval, {
7505
14
      "Crash Replay Interval", "ceph.pgpool.crash_reply_interval",
7506
14
      FT_UINT32, BASE_DEC, NULL, 0,
7507
14
      "Seconds to allow clients to replay ACKed but "
7508
14
      "unCOMMITted requests.", HFILL
7509
14
    } },
7510
14
    { &hf_pgpool_min_size, {
7511
14
      "Minimum number of OSDs", "ceph.pgpool.min_size",
7512
14
      FT_UINT8, BASE_DEC, NULL, 0,
7513
14
      NULL, HFILL
7514
14
    } },
7515
14
    { &hf_pgpool_quota_bytes, {
7516
14
      "Maximum number of bytes", "ceph.pgpool.quota_bytes",
7517
14
      FT_UINT64, BASE_DEC, NULL, 0,
7518
14
      NULL, HFILL
7519
14
    } },
7520
14
    { &hf_pgpool_quota_objects, {
7521
14
      "Maximum number of objects", "ceph.pgpool.quota_objects",
7522
14
      FT_UINT64, BASE_DEC, NULL, 0,
7523
14
      NULL, HFILL
7524
14
    } },
7525
14
    { &hf_pgpool_tier, {
7526
14
      "Tier", "ceph.msg.tier",
7527
14
      FT_UINT64, BASE_HEX, NULL, 0,
7528
14
      "A pool that is a tier of this tier.", HFILL
7529
14
    } },
7530
14
    { &hf_pgpool_tierof, {
7531
14
      "Tier of", "ceph.pgpool.tierof",
7532
14
      FT_UINT64, BASE_HEX, NULL, 0,
7533
14
      "The pool that this pool is a tier of.", HFILL
7534
14
    } },
7535
14
    { &hf_pgpool_cachemode, {
7536
14
      "Cache Mode", "ceph.pgpool.cache_mode",
7537
14
      FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_pgpool_cachemode_strings_ext, 0,
7538
14
      NULL, HFILL
7539
14
    } },
7540
14
    { &hf_pgpool_readtier, {
7541
14
      "Read Tier", "ceph.pgpool.read_tier",
7542
14
      FT_UINT64, BASE_HEX, NULL, 0,
7543
14
      NULL, HFILL
7544
14
    } },
7545
14
    { &hf_pgpool_writetier, {
7546
14
      "Write Tier", "ceph.pgpool.write_tier",
7547
14
      FT_UINT64, BASE_HEX, NULL, 0,
7548
14
      NULL, HFILL
7549
14
    } },
7550
14
    { &hf_pgpool_property, {
7551
14
      "Property", "ceph.pgpool.property",
7552
14
      FT_NONE, BASE_NONE, NULL, 0,
7553
14
      NULL, HFILL
7554
14
    } },
7555
14
    { &hf_pgpool_property_key, {
7556
14
      "Key", "ceph.pgpool.property.key",
7557
14
      FT_STRING, BASE_NONE, NULL, 0,
7558
14
      NULL, HFILL
7559
14
    } },
7560
14
    { &hf_pgpool_property_val, {
7561
14
      "Value", "ceph.pgpool.property.val",
7562
14
      FT_STRING, BASE_NONE, NULL, 0,
7563
14
      NULL, HFILL
7564
14
    } },
7565
14
    { &hf_pgpool_hitset_period, {
7566
14
      "HitSet Period", "ceph.hitset_period",
7567
14
      FT_UINT32, BASE_DEC, NULL, 0,
7568
14
      "The period of HitSet segments in seconds.", HFILL
7569
14
    } },
7570
14
    { &hf_pgpool_hitset_count, {
7571
14
      "HitSet count", "ceph.pgpool.hitset_count",
7572
14
      FT_UINT32, BASE_DEC, NULL, 0,
7573
14
      "The number of HitSet periods to retain.", HFILL
7574
14
    } },
7575
14
    { &hf_pgpool_stripewidth, {
7576
14
      "Stripe Width", "ceph.pgpool.stripewidth",
7577
14
      FT_UINT32, BASE_DEC, NULL, 0,
7578
14
      NULL, HFILL
7579
14
    } },
7580
14
    { &hf_pgpool_targetmaxsize, {
7581
14
      "Target Maximum Bytes", "ceph.pgpool.targetmaxsize",
7582
14
      FT_UINT64, BASE_DEC, NULL, 0,
7583
14
      NULL, HFILL
7584
14
    } },
7585
14
    { &hf_pgpool_targetmaxobj, {
7586
14
      "Target Maximum Objects", "ceph.pgpool.targetmaxobj",
7587
14
      FT_UINT64, BASE_DEC, NULL, 0,
7588
14
      NULL, HFILL
7589
14
    } },
7590
14
    { &hf_pgpool_cache_targetdirtyratio, {
7591
14
      "Cache Target Dirty Ratio", "ceph.pgpool.cache.targetdirtyratio",
7592
14
      FT_UINT32, BASE_DEC, NULL, 0,
7593
14
      "Fraction of cache to leave dirty.", HFILL
7594
14
    } },
7595
14
    { &hf_pgpool_cache_targetfullratio, {
7596
14
      "Cache Target Full Ratio", "ceph.msg.targetfullratio",
7597
14
      FT_UINT32, BASE_DEC, NULL, 0,
7598
14
      "Fraction of target to fill before evicting in earnest.", HFILL
7599
14
    } },
7600
14
    { &hf_pgpool_cache_flushage_min, {
7601
14
      "Cache Minimum Flush Age", "ceph.pgpool.cache.flushage_min",
7602
14
      FT_UINT32, BASE_DEC, NULL, 0,
7603
14
      NULL, HFILL
7604
14
    } },
7605
14
    { &hf_pgpool_cache_evictage_min, {
7606
14
      "Cache Minimum Evict Age", "ceph.pgpool.cache.evictage_min",
7607
14
      FT_UINT32, BASE_DEC, NULL, 0,
7608
14
      NULL, HFILL
7609
14
    } },
7610
14
    { &hf_pgpool_erasurecode_profile, {
7611
14
      "Erasure Code Profile", "ceph.pgpool.erasurecode_profile",
7612
14
      FT_STRING, BASE_NONE, NULL, 0,
7613
14
      NULL, HFILL
7614
14
    } },
7615
14
    { &hf_pgpool_lastforceresend, {
7616
14
      "Last Force Resend", "ceph.pgpool.lastforceresend",
7617
14
      FT_UINT32, BASE_DEC, NULL, 0,
7618
14
      "Last epoch that forced clients to resend.", HFILL
7619
14
    } },
7620
14
    { &hf_pgpool_flag_hashpool, {
7621
14
      "Hash Seed and Pool Together", "ceph.pgpool.flag.hashpool",
7622
14
      FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_HASHPSPOOL,
7623
14
      NULL, HFILL
7624
14
    } },
7625
14
    { &hf_pgpool_flag_full, {
7626
14
      "Pool Full", "ceph.pgpool.flag.full",
7627
14
      FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_FULL,
7628
14
      NULL, HFILL
7629
14
    } },
7630
14
    { &hf_pgpool_flag_fake_ec_pool, {
7631
14
      "Fake Erasure-Coded Pool", "ceph.pgpool.flag.fake_ec_pool",
7632
14
      FT_BOOLEAN, 32, NULL, C_PGPOOL_FLAG_FAKE_EC_POOL,
7633
14
      NULL, HFILL
7634
14
    } },
7635
14
    { &hf_monmap, {
7636
14
      "Monmap", "ceph.monmap.data",
7637
14
      FT_NONE, BASE_NONE, NULL, 0,
7638
14
      NULL, HFILL
7639
14
    } },
7640
14
    { &hf_monmap_fsid, {
7641
14
      "FSID", "ceph.monmap.fsid",
7642
14
      FT_GUID, BASE_NONE, NULL, 0,
7643
14
      NULL, HFILL
7644
14
    } },
7645
14
    { &hf_monmap_epoch, {
7646
14
      "Epoch", "ceph.monmap.epoch",
7647
14
      FT_UINT32, BASE_DEC, NULL, 0,
7648
14
      NULL, HFILL
7649
14
    } },
7650
14
    { &hf_monmap_address, {
7651
14
      "Monitor Address", "ceph.monmap.address",
7652
14
      FT_NONE, BASE_NONE, NULL, 0,
7653
14
      NULL, HFILL
7654
14
    } },
7655
14
    { &hf_monmap_address_name, {
7656
14
      "Name", "ceph.monmap.address.name",
7657
14
      FT_STRING, BASE_NONE, NULL, 0,
7658
14
      NULL, HFILL
7659
14
    } },
7660
14
    { &hf_monmap_address_addr, {
7661
14
      "Address", "ceph.monmap.address.addr",
7662
14
      FT_NONE, BASE_NONE, NULL, 0,
7663
14
      NULL, HFILL
7664
14
    } },
7665
14
    { &hf_monmap_changed, {
7666
14
      "Last Changed", "ceph.monmap.changed",
7667
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7668
14
      NULL, HFILL
7669
14
    } },
7670
14
    { &hf_monmap_created, {
7671
14
      "Time Created", "ceph.monmap.created",
7672
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7673
14
      NULL, HFILL
7674
14
    } },
7675
14
    { &hf_pg_stat_ver, {
7676
14
      "Version", "ceph.pg_stat.ver",
7677
14
      FT_NONE, BASE_NONE, NULL, 0,
7678
14
      NULL, HFILL
7679
14
    } },
7680
14
    { &hf_pg_stat_seq, {
7681
14
      "Reported Sequence Number", "ceph.pg_stat.seq",
7682
14
      FT_UINT64, BASE_DEC, NULL, 0,
7683
14
      NULL, HFILL
7684
14
    } },
7685
14
    { &hf_pg_stat_epoch, {
7686
14
      "Reported Epoch", "ceph.pg_stat.epoch",
7687
14
      FT_UINT32, BASE_DEC, NULL, 0,
7688
14
      NULL, HFILL
7689
14
    } },
7690
14
    { &hf_pg_stat_state, {
7691
14
      "State", "ceph.pg_stat.state",
7692
14
      FT_UINT32, BASE_DEC, NULL, 0,
7693
14
      NULL, HFILL
7694
14
    } },
7695
14
    { &hf_pg_stat_logstart, {
7696
14
      "Log Start", "ceph.pg_stat.logstart",
7697
14
      FT_NONE, BASE_NONE, NULL, 0,
7698
14
      NULL, HFILL
7699
14
    } },
7700
14
    { &hf_pg_stat_logstartondisk, {
7701
14
      "On-disk Log Start", "ceph.pg_stat.logstartondisk",
7702
14
      FT_NONE, BASE_NONE, NULL, 0,
7703
14
      NULL, HFILL
7704
14
    } },
7705
14
    { &hf_pg_stat_created, {
7706
14
      "Created", "ceph.pg_stat.created",
7707
14
      FT_UINT32, BASE_DEC, NULL, 0,
7708
14
      NULL, HFILL
7709
14
    } },
7710
14
    { &hf_pg_stat_lastepochclean, {
7711
14
      "Last Epoch Clean", "ceph.pg_stat.lastepochclean",
7712
14
      FT_UINT32, BASE_DEC, NULL, 0,
7713
14
      NULL, HFILL
7714
14
    } },
7715
14
    { &hf_pg_stat_parent, {
7716
14
      "Parent", "ceph.pg_stat.parent",
7717
14
      FT_NONE, BASE_NONE, NULL, 0,
7718
14
      NULL, HFILL
7719
14
    } },
7720
14
    { &hf_pg_stat_parent_splitbits, {
7721
14
      "Parent Split Bits", "ceph.pg_stat.parent_splitbits",
7722
14
      FT_UINT32, BASE_HEX, NULL, 0,
7723
14
      NULL, HFILL
7724
14
    } },
7725
14
    { &hf_pg_stat_lastscrub, {
7726
14
      "Last Scrub", "ceph.pg_stat.lastscrub",
7727
14
      FT_NONE, BASE_NONE, NULL, 0,
7728
14
      NULL, HFILL
7729
14
    } },
7730
14
    { &hf_pg_stat_lastscrubstamp, {
7731
14
      "Last Scrub Timestamp", "ceph.pg_stat.lastscrubstamp",
7732
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7733
14
      NULL, HFILL
7734
14
    } },
7735
14
    { &hf_pg_stat_stats, {
7736
14
      "Stats", "ceph.pg_stat.stats",
7737
14
      FT_NONE, BASE_NONE, NULL, 0,
7738
14
      NULL, HFILL
7739
14
    } },
7740
14
    { &hf_pg_stat_logsize, {
7741
14
      "Log Size", "ceph.pg_stat.logsize",
7742
14
      FT_UINT64, BASE_DEC, NULL, 0,
7743
14
      NULL, HFILL
7744
14
    } },
7745
14
    { &hf_pg_stat_logsizeondisk, {
7746
14
      "Log Size On-disk", "ceph.pg_stat.logsizeondisk",
7747
14
      FT_UINT64, BASE_DEC, NULL, 0,
7748
14
      NULL, HFILL
7749
14
    } },
7750
14
    { &hf_pg_stat_up, {
7751
14
      "Up", "ceph.pg_stat.up",
7752
14
      FT_UINT32, BASE_DEC, NULL, 0,
7753
14
      NULL, HFILL
7754
14
    } },
7755
14
    { &hf_pg_stat_acting, {
7756
14
      "Acting", "ceph.pg_stat.acting",
7757
14
      FT_UINT32, BASE_DEC, NULL, 0,
7758
14
      NULL, HFILL
7759
14
    } },
7760
14
    { &hf_pg_stat_lastfresh, {
7761
14
      "Last Fresh", "ceph.pg_stat.lastfresh",
7762
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7763
14
      NULL, HFILL
7764
14
    } },
7765
14
    { &hf_pg_stat_lastchange, {
7766
14
      "Last Change", "ceph.pg_stat.lastchange",
7767
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7768
14
      NULL, HFILL
7769
14
    } },
7770
14
    { &hf_pg_stat_lastactive, {
7771
14
      "Last Active", "ceph.pg_stat.lastactive",
7772
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7773
14
      NULL, HFILL
7774
14
    } },
7775
14
    { &hf_pg_stat_lastclean, {
7776
14
      "Last Clean", "ceph.pg_stat.lastclean",
7777
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7778
14
      NULL, HFILL
7779
14
    } },
7780
14
    { &hf_pg_stat_lastunstale, {
7781
14
      "Last Not Stale", "ceph.pg_stat.lastunstale",
7782
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7783
14
      NULL, HFILL
7784
14
    } },
7785
14
    { &hf_pg_stat_mappingepoch, {
7786
14
      "Mapping Epoch", "ceph.pg_stat.mappingepoch",
7787
14
      FT_UINT32, BASE_DEC, NULL, 0,
7788
14
      NULL, HFILL
7789
14
    } },
7790
14
    { &hf_pg_stat_lastdeepscrub, {
7791
14
      "Last Deep Scrub", "ceph.pg_stat.lastdeepscrub",
7792
14
      FT_NONE, BASE_NONE, NULL, 0,
7793
14
      NULL, HFILL
7794
14
    } },
7795
14
    { &hf_pg_stat_lastdeepscrubstamp, {
7796
14
      "Time of Last Deep Scrub", "ceph.pg_stat.lastdeepscrubstamp",
7797
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7798
14
      NULL, HFILL
7799
14
    } },
7800
14
    { &hf_pg_stat_statsinvalid, {
7801
14
      "Stats Invalid", "ceph.pg_stat.statsinvalid",
7802
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
7803
14
      NULL, HFILL
7804
14
    } },
7805
14
    { &hf_pg_stat_lastcleanscrubstamp, {
7806
14
      "Time of Last Clean Scrub", "ceph.pg_stat.lastcleanscrubstamp",
7807
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7808
14
      NULL, HFILL
7809
14
    } },
7810
14
    { &hf_pg_stat_lastbecameactive, {
7811
14
      "Last Became Active", "ceph.pg_stat.lastbecameactive",
7812
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7813
14
      NULL, HFILL
7814
14
    } },
7815
14
    { &hf_pg_stat_dirtystatsinvalid, {
7816
14
      "Dirty Stats Invalid", "ceph.pg_stat.dirtystatusinvalid",
7817
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
7818
14
      NULL, HFILL
7819
14
    } },
7820
14
    { &hf_pg_stat_upprimary, {
7821
14
      "Up Primary", "ceph.pg_stat.upprimary",
7822
14
      FT_INT32, BASE_DEC, NULL, 0,
7823
14
      NULL, HFILL
7824
14
    } },
7825
14
    { &hf_pg_stat_actingprimary, {
7826
14
      "Acting Primary", "ceph.pg_stat.actingprimary",
7827
14
      FT_INT32, BASE_DEC, NULL, 0,
7828
14
      NULL, HFILL
7829
14
    } },
7830
14
    { &hf_pg_stat_omapstatsinvalid, {
7831
14
      "OMap Stats Invalid", "ceph.pg_stat.omapstatsinvalid",
7832
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
7833
14
      NULL, HFILL
7834
14
    } },
7835
14
    { &hf_pg_stat_hitsetstatsinvalid, {
7836
14
      "HitSet Stats Invalid", "ceph.pg_stat.hitsetstatsinvalid",
7837
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
7838
14
      NULL, HFILL
7839
14
    } },
7840
14
    { &hf_osd_superblock, {
7841
14
      "Superblock", "ceph.osd_superblock",
7842
14
      FT_NONE, BASE_NONE, NULL, 0,
7843
14
      NULL, HFILL
7844
14
    } },
7845
14
    { &hf_osd_superblock_clusterfsid, {
7846
14
      "Cluster FSID", "ceph.osd_superblock.fsid",
7847
14
      FT_GUID, BASE_NONE, NULL, 0,
7848
14
      NULL, HFILL
7849
14
    } },
7850
14
    { &hf_osd_superblock_role, {
7851
14
      "Role", "ceph.osd_superblock.role",
7852
14
      FT_INT32, BASE_DEC, NULL, 0,
7853
14
      NULL, HFILL
7854
14
    } },
7855
14
    { &hf_osd_superblock_epoch, {
7856
14
      "Epoch", "ceph.osd_superblock.epoch",
7857
14
      FT_UINT32, BASE_DEC, NULL, 0,
7858
14
      NULL, HFILL
7859
14
    } },
7860
14
    { &hf_osd_superblock_map_old, {
7861
14
      "Oldest Map", "ceph.osd_superblock.map_old",
7862
14
      FT_UINT32, BASE_DEC, NULL, 0,
7863
14
      NULL, HFILL
7864
14
    } },
7865
14
    { &hf_osd_superblock_map_new, {
7866
14
      "Newest Map", "ceph.osd_superblock.map_new",
7867
14
      FT_UINT32, BASE_DEC, NULL, 0,
7868
14
      NULL, HFILL
7869
14
    } },
7870
14
    { &hf_osd_superblock_weight, {
7871
14
      "Weight", "ceph.osd_superblock.weight",
7872
14
      FT_DOUBLE, BASE_NONE, NULL, 0,
7873
14
      NULL, HFILL
7874
14
    } },
7875
14
    { &hf_osd_superblock_mounted, {
7876
14
      "Mounted", "ceph.osd_superblock.mounted",
7877
14
      FT_UINT32, BASE_DEC, NULL, 0,
7878
14
      "Last epoch mounted.", HFILL
7879
14
    } },
7880
14
    { &hf_osd_superblock_osdfsid, {
7881
14
      "OSD FSID", "ceph.osd_superblock.osdfsid",
7882
14
      FT_GUID, BASE_NONE, NULL, 0,
7883
14
      NULL, HFILL
7884
14
    } },
7885
14
    { &hf_osd_superblock_clean, {
7886
14
      "Clean Through", "ceph.osd_superblock.clean",
7887
14
      FT_UINT32, BASE_DEC, NULL, 0,
7888
14
      "Last epoch active and clean.", HFILL
7889
14
    } },
7890
14
    { &hf_osd_superblock_full, {
7891
14
      "Last Marked Full", "ceph.osd_superblock.full",
7892
14
      FT_UINT32, BASE_DEC, NULL, 0,
7893
14
      "Last epoch OSDMap was marked full.", HFILL
7894
14
    } },
7895
14
    { &hf_osdinfo_ver, {
7896
14
      "Encoding Version", "ceph.osdinfo.ver",
7897
14
      FT_UINT8, BASE_DEC, NULL, 0,
7898
14
      NULL, HFILL
7899
14
    } },
7900
14
    { &hf_osdinfo_lastclean_begin, {
7901
14
      "Last Clean Begin", "ceph.osdinfo.lastclean.begin",
7902
14
      FT_UINT32, BASE_DEC, NULL, 0,
7903
14
      "The start of the last interval that ended with "
7904
14
      "a clean shutdown.", HFILL
7905
14
    } },
7906
14
    { &hf_osdinfo_lastclean_end, {
7907
14
      "Last Clean End", "ceph.osdinfo.lastclean.end",
7908
14
      FT_UINT32, BASE_DEC, NULL, 0,
7909
14
      "The end of the last interval that ended with a "
7910
14
      "clean shutdown.", HFILL
7911
14
    } },
7912
14
    { &hf_osdinfo_up_from, {
7913
14
      "Up From", "ceph.osdinfo.up.from",
7914
14
      FT_UINT32, BASE_DEC, NULL, 0,
7915
14
      "Epoch OSD was marked up.", HFILL
7916
14
    } },
7917
14
    { &hf_osdinfo_up_through, {
7918
14
      "Up Through", "ceph.osdinfo.up.through",
7919
14
      FT_UINT32, BASE_DEC, NULL, 0,
7920
14
      "Last epoch before OSD died.", HFILL
7921
14
    } },
7922
14
    { &hf_osdinfo_downat, {
7923
14
      "Down At", "ceph.osdinfo.downat",
7924
14
      FT_UINT32, BASE_DEC, NULL, 0,
7925
14
      "First epoch after OSD died.", HFILL
7926
14
    } },
7927
14
    { &hf_osdinfo_lostat, {
7928
14
      "Lost At", "ceph.osdinfo.lostat",
7929
14
      FT_UINT32, BASE_DEC, NULL, 0,
7930
14
      "Last epoch where the data was decided \"lost\".", HFILL
7931
14
    } },
7932
14
    { &hf_osdxinfo_down, {
7933
14
      "Down At", "ceph.osdxinfo.downat",
7934
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
7935
14
      "Time when OSD was last marked down.", HFILL
7936
14
    } },
7937
14
    { &hf_osdxinfo_laggy_probability, {
7938
14
      "Laggy Probability", "ceph.osdxinfo.laggy.probability",
7939
14
      FT_UINT32, BASE_DEC, NULL, 0,
7940
14
      "Probability that the OSD is laggy. (out of 0xFFFFFFFF)", HFILL
7941
14
    } },
7942
14
    { &hf_osdxinfo_laggy_interval, {
7943
14
      "Laggy Interval", "ceph.osdxinfo.laggy.interval",
7944
14
      FT_UINT32, BASE_DEC, NULL, 0,
7945
14
      "Average interval between being marked laggy and recovering.", HFILL
7946
14
    } },
7947
14
    { &hf_osdxinfo_oldweight, {
7948
14
      "Old Weight", "ceph.osdxinfo.oldweight",
7949
14
      FT_UINT32, BASE_DEC, NULL, 0,
7950
14
      NULL, HFILL
7951
14
    } },
7952
14
    { &hf_perfstat_commitlatency, {
7953
14
      "Commit Latency", "ceph.perfstat.commitlatency",
7954
14
      FT_UINT32, BASE_DEC, NULL, 0,
7955
14
      NULL, HFILL
7956
14
    } },
7957
14
    { &hf_perfstat_applylatency, {
7958
14
      "Apply Latency", "ceph.perfstat.applylatency",
7959
14
      FT_UINT32, BASE_DEC, NULL, 0,
7960
14
      NULL, HFILL
7961
14
    } },
7962
14
    { &hf_osdstat, {
7963
14
      "OSD Stats", "ceph.osdstat",
7964
14
      FT_NONE, BASE_NONE, NULL, 0,
7965
14
      NULL, HFILL
7966
14
    } },
7967
14
    { &hf_osdstat_kb, {
7968
14
      "KiB", "ceph.osdstat.kb",
7969
14
      FT_UINT64, BASE_DEC, NULL, 0,
7970
14
      NULL, HFILL
7971
14
    } },
7972
14
    { &hf_osdstat_kbused, {
7973
14
      "KiB Used", "ceph.osdstat.kbused",
7974
14
      FT_UINT64, BASE_DEC, NULL, 0,
7975
14
      NULL, HFILL
7976
14
    } },
7977
14
    { &hf_osdstat_kbavail, {
7978
14
      "KiB Available", "ceph.osdstat.kbavail",
7979
14
      FT_UINT64, BASE_DEC, NULL, 0,
7980
14
      NULL, HFILL
7981
14
    } },
7982
14
    { &hf_osdstat_trimqueue, {
7983
14
      "Trim Queue", "ceph.osdstat.trimqueue",
7984
14
      FT_UINT32, BASE_DEC, NULL, 0,
7985
14
      NULL, HFILL
7986
14
    } },
7987
14
    { &hf_osdstat_hbin, {
7988
14
      "Heartbeats In", "ceph.osdstat.hbin",
7989
14
      FT_UINT32, BASE_DEC, NULL, 0,
7990
14
      NULL, HFILL
7991
14
    } },
7992
14
    { &hf_osdstat_hbout, {
7993
14
      "Heartbeats Out", "ceph.osdstat.hbout",
7994
14
      FT_UINT32, BASE_DEC, NULL, 0,
7995
14
      NULL, HFILL
7996
14
    } },
7997
14
    { &hf_osdstat_opqueue, {
7998
14
      "Op Queue", "ceph.osdstat.opqueue",
7999
14
      FT_UINT32, BASE_DEC, NULL, 0,
8000
14
      NULL, HFILL
8001
14
    } },
8002
14
    { &hf_osdstat_fsperf, {
8003
14
      "Filesystem Performance", "ceph.osdstat.fsperf",
8004
14
      FT_NONE, BASE_NONE, NULL, 0,
8005
14
      NULL, HFILL
8006
14
    } },
8007
14
    { &hf_osdstat_trimming, {
8008
14
      "Number Trimming", "ceph.osdstat.trimming",
8009
14
      FT_UINT32, BASE_DEC, NULL, 0,
8010
14
      NULL, HFILL
8011
14
    } },
8012
14
    { &hf_osdmap, {
8013
14
      "OSD Map", "ceph.osdmap",
8014
14
      FT_NONE, BASE_NONE, NULL, 0,
8015
14
      NULL, HFILL
8016
14
    } },
8017
14
    { &hf_osdmap_client, {
8018
14
      "Client-Usable Data", "ceph.osdmap.client",
8019
14
      FT_NONE, BASE_NONE, NULL, 0,
8020
14
      NULL, HFILL
8021
14
    } },
8022
14
    { &hf_osdmap_fsid, {
8023
14
      "FSID", "ceph.osdmap.fsid",
8024
14
      FT_GUID, BASE_NONE, NULL, 0,
8025
14
      NULL, HFILL
8026
14
    } },
8027
14
    { &hf_osdmap_epoch, {
8028
14
      "Epoch", "ceph.osdmap.epoch",
8029
14
      FT_UINT32, BASE_DEC, NULL, 0,
8030
14
      NULL, HFILL
8031
14
    } },
8032
14
    { &hf_osdmap_created, {
8033
14
      "Time Created", "ceph.osdmap.created",
8034
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8035
14
      NULL, HFILL
8036
14
    } },
8037
14
    { &hf_osdmap_modified, {
8038
14
      "Last Modified", "ceph.osdmap.modified",
8039
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8040
14
      NULL, HFILL
8041
14
    } },
8042
14
    { &hf_osdmap_pool, {
8043
14
      "Pool", "ceph.osdmap.pool",
8044
14
      FT_NONE, BASE_NONE, NULL, 0,
8045
14
      NULL, HFILL
8046
14
    } },
8047
14
    { &hf_osdmap_pool_id, {
8048
14
      "ID", "ceph.osdmap.pool.id",
8049
14
      FT_UINT64, BASE_HEX, NULL, 0,
8050
14
      NULL, HFILL
8051
14
    } },
8052
14
    { &hf_osdmap_poolname_item, {
8053
14
      "Pool Name", "ceph.osdmap.poolname.item",
8054
14
      FT_NONE, BASE_NONE, NULL, 0,
8055
14
      NULL, HFILL
8056
14
    } },
8057
14
    { &hf_osdmap_poolname, {
8058
14
      "Name", "ceph.osdmap.poolname",
8059
14
      FT_STRING, BASE_NONE, NULL, 0,
8060
14
      NULL, HFILL
8061
14
    } },
8062
14
    { &hf_osdmap_poolmax, {
8063
14
      "Highest Pool ID", "ceph.osdmap.poolmax",
8064
14
      FT_INT32, BASE_DEC, NULL, 0,
8065
14
      NULL, HFILL
8066
14
    } },
8067
14
    { &hf_osdmap_flags, {
8068
14
      "Flags", "ceph.osdmap.flags",
8069
14
      FT_UINT32, BASE_HEX, NULL, 0,
8070
14
      NULL, HFILL
8071
14
    } },
8072
14
    { &hf_osdmap_osdmax, {
8073
14
      "Highest OSD Number", "ceph.osdmap.osdmax",
8074
14
      FT_INT32, BASE_DEC, NULL, 0,
8075
14
      NULL, HFILL
8076
14
    } },
8077
14
    { &hf_osdmap_osd_state, {
8078
14
      "OSD State", "ceph.osdmap.osd.state",
8079
14
      FT_UINT8, BASE_HEX, NULL, 0,
8080
14
      NULL, HFILL
8081
14
    } },
8082
14
    { &hf_osdmap_osd_weight, {
8083
14
      "OSD Weight", "ceph.osdmap.osd.weight",
8084
14
      FT_UINT32, BASE_DEC, NULL, 0,
8085
14
      NULL, HFILL
8086
14
    } },
8087
14
    { &hf_osdmap_osd_addr, {
8088
14
      "OSD Address", "ceph.osdmap.address",
8089
14
      FT_NONE, BASE_NONE, NULL, 0,
8090
14
      NULL, HFILL
8091
14
    } },
8092
14
    { &hf_osdmap_pgtmp, {
8093
14
      "Temporary Placement Group Mapping", "ceph.osdmap.pgtmp",
8094
14
      FT_NONE, BASE_NONE, NULL, 0,
8095
14
      NULL, HFILL
8096
14
    } },
8097
14
    { &hf_osdmap_pgtmp_pg, {
8098
14
      "Placement Group", "ceph.osdmap.pgtmp.pg",
8099
14
      FT_NONE, BASE_NONE, NULL, 0,
8100
14
      NULL, HFILL
8101
14
    } },
8102
14
    { &hf_osdmap_pgtmp_val, {
8103
14
      "Value", "ceph.osdmap.pgtmp.val",
8104
14
      FT_UINT32, BASE_DEC, NULL, 0,
8105
14
      NULL, HFILL
8106
14
    } },
8107
14
    { &hf_osdmap_primarytmp, {
8108
14
      "Temporary Primary Mapping", "ceph.osdmap.primarytmp",
8109
14
      FT_NONE, BASE_NONE, NULL, 0,
8110
14
      NULL, HFILL
8111
14
    } },
8112
14
    { &hf_osdmap_primarytmp_pg, {
8113
14
      "Placement Group", "ceph.osdmap.primarytmp.pg",
8114
14
      FT_NONE, BASE_NONE, NULL, 0,
8115
14
      NULL, HFILL
8116
14
    } },
8117
14
    { &hf_osdmap_primarytmp_val, {
8118
14
      "Value", "ceph.osdmap.primarytmp.val",
8119
14
      FT_UINT32, BASE_DEC, NULL, 0,
8120
14
      NULL, HFILL
8121
14
    } },
8122
14
    { &hf_osdmap_osd_primaryaffinity, {
8123
14
      "Primary Affinity", "ceph.osdmap.osd.primaryaffinity",
8124
14
      FT_UINT32, BASE_DEC, NULL, 0,
8125
14
      NULL, HFILL
8126
14
    } },
8127
14
    { &hf_crush, {
8128
14
      "CRUSH Rules", "ceph.crush",
8129
14
      FT_NONE, BASE_NONE, NULL, 0,
8130
14
      NULL, HFILL
8131
14
    } },
8132
14
    { &hf_osd_peerstat, {
8133
14
      "Peer Stat", "ceph.osd.peerstat",
8134
14
      FT_NONE, BASE_NONE, NULL, 0,
8135
14
      NULL, HFILL
8136
14
    } },
8137
14
    { &hf_osd_peerstat_timestamp, {
8138
14
      "Timestamp", "ceph.osd.peerstat.timestamp",
8139
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8140
14
      NULL, HFILL
8141
14
    } },
8142
14
    { &hf_featureset_mask, {
8143
14
      "Feature Mask", "ceph.featureset.mask",
8144
14
      FT_UINT64, BASE_DEC, NULL, 0,
8145
14
      NULL, HFILL
8146
14
    } },
8147
14
    { &hf_featureset_name, {
8148
14
      "Name", "ceph.featureset.name",
8149
14
      FT_NONE, BASE_NONE, NULL, 0,
8150
14
      NULL, HFILL
8151
14
    } },
8152
14
    { &hf_featureset_name_val, {
8153
14
      "Value", "ceph.featureset.name.val",
8154
14
      FT_UINT64, BASE_DEC, NULL, 0,
8155
14
      NULL, HFILL
8156
14
    } },
8157
14
    { &hf_featureset_name_name, {
8158
14
      "Name", "ceph.featureset.name.name",
8159
14
      FT_STRING, BASE_NONE, NULL, 0,
8160
14
      NULL, HFILL
8161
14
    } },
8162
14
    { &hf_compatset, {
8163
14
      "Compat Set", "ceph.compatset",
8164
14
      FT_NONE, BASE_NONE, NULL, 0,
8165
14
      NULL, HFILL
8166
14
    } },
8167
14
    { &hf_compatset_compat, {
8168
14
      "Compatible", "ceph.compatset.compat",
8169
14
      FT_NONE, BASE_NONE, NULL, 0,
8170
14
      NULL, HFILL
8171
14
    } },
8172
14
    { &hf_compatset_compatro, {
8173
14
      "Read-Only Compatible", "ceph.compatset.rocompat",
8174
14
      FT_NONE, BASE_NONE, NULL, 0,
8175
14
      NULL, HFILL
8176
14
    } },
8177
14
    { &hf_compatset_incompat, {
8178
14
      "Incompatible", "ceph.compatset.incompat",
8179
14
      FT_NONE, BASE_NONE, NULL, 0,
8180
14
      NULL, HFILL
8181
14
    } },
8182
14
    { &hf_osdmap_erasurecodeprofile, {
8183
14
      "Erasure Code Profile", "ceph.osdmap.erasurecodeprofile",
8184
14
      FT_NONE, BASE_NONE, NULL, 0,
8185
14
      NULL, HFILL
8186
14
    } },
8187
14
    { &hf_osdmap_erasurecodeprofile_name, {
8188
14
      "Profile Name", "ceph.osdmap.erasurecodeprofile.name",
8189
14
      FT_STRING, BASE_NONE, NULL, 0,
8190
14
      NULL, HFILL
8191
14
    } },
8192
14
    { &hf_osdmap_erasurecodeprofile_prop, {
8193
14
      "Property", "ceph.osdmap.erasurecodeprofile.prop",
8194
14
      FT_NONE, BASE_NONE, NULL, 0,
8195
14
      NULL, HFILL
8196
14
    } },
8197
14
    { &hf_osdmap_erasurecodeprofile_k, {
8198
14
      "Key", "ceph.osdmap.erasurecodeprofile.key",
8199
14
      FT_STRING, BASE_NONE, NULL, 0,
8200
14
      NULL, HFILL
8201
14
    } },
8202
14
    { &hf_osdmap_erasurecodeprofile_v, {
8203
14
      "Value", "ceph.osdmap.erasurecodeprofile.value",
8204
14
      FT_STRING, BASE_NONE, NULL, 0,
8205
14
      NULL, HFILL
8206
14
    } },
8207
14
    { &hf_osdmap_osd, {
8208
14
      "OSD-Only Data", "ceph.osdmap.osd",
8209
14
      FT_NONE, BASE_NONE, NULL, 0,
8210
14
      NULL, HFILL
8211
14
    } },
8212
14
    { &hf_osdmap_hbaddr_back, {
8213
14
      "Cluster-side Heartbeat Address", "ceph.osdmap.nbbackaddr",
8214
14
      FT_NONE, BASE_NONE, NULL, 0,
8215
14
      "The address checked to ensure the OSD is reachable by "
8216
14
      "the cluster.", HFILL
8217
14
    } },
8218
14
    { &hf_osdmap_osd_info, {
8219
14
      "OSD Info", "ceph.osdmap.osd.info",
8220
14
      FT_NONE, BASE_NONE, NULL, 0,
8221
14
      NULL, HFILL
8222
14
    } },
8223
14
    { &hf_osdmap_blacklist, {
8224
14
      "Blacklist", "ceph.osdmap.blacklist",
8225
14
      FT_NONE, BASE_NONE, NULL, 0,
8226
14
      NULL, HFILL
8227
14
    } },
8228
14
    { &hf_osdmap_blacklist_addr, {
8229
14
      "Address", "ceph.osdmap.blacklist.addr",
8230
14
      FT_NONE, BASE_NONE, NULL, 0,
8231
14
      NULL, HFILL
8232
14
    } },
8233
14
    { &hf_osdmap_blacklist_time, {
8234
14
      "Time", "ceph.osdmap.blacklist.time",
8235
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
8236
14
      NULL, HFILL
8237
14
    } },
8238
14
    { &hf_osdmap_cluster_addr, {
8239
14
      "Cluster Address", "ceph.osdmap.cluster.addr",
8240
14
      FT_NONE, BASE_NONE, NULL, 0,
8241
14
      NULL, HFILL
8242
14
    } },
8243
14
    { &hf_osdmap_cluster_snapepoch, {
8244
14
      "Cluster Snapshot Epoch", "ceph.osdmap.cluster.snapepoch",
8245
14
      FT_UINT32, BASE_DEC, NULL, 0,
8246
14
      NULL, HFILL
8247
14
    } },
8248
14
    { &hf_osdmap_cluster_snap, {
8249
14
      "Cluster Snapshot", "ceph.osdmap.cluster.snap",
8250
14
      FT_STRING, BASE_NONE, NULL, 0,
8251
14
      NULL, HFILL
8252
14
    } },
8253
14
    { &hf_osdmap_osd_uuid, {
8254
14
      "OSD UUID", "ceph.osdmap.osd.uuid",
8255
14
      FT_GUID, BASE_NONE, NULL, 0,
8256
14
      NULL, HFILL
8257
14
    } },
8258
14
    { &hf_osdmap_osd_xinfo, {
8259
14
      "OSD xinfo", "ceph.osdmap.osd.xinfo",
8260
14
      FT_NONE, BASE_NONE, NULL, 0,
8261
14
      NULL, HFILL
8262
14
    } },
8263
14
    { &hf_osdmap_hbaddr_front, {
8264
14
      "Client-side Heartbeat Address", "ceph.osdmap.hbfrontaddr",
8265
14
      FT_NONE, BASE_NONE, NULL, 0,
8266
14
      "The address checked to ensure the OSD is reachable "
8267
14
      "by the client.", HFILL
8268
14
    } },
8269
14
    { &hf_osdmap_inc, {
8270
14
      "Incremental OSD Map", "ceph.osdmap_inc",
8271
14
      FT_NONE, BASE_NONE, NULL, 0,
8272
14
      NULL, HFILL
8273
14
    } },
8274
14
    { &hf_osdmap_inc_client, {
8275
14
      "Client-Usable Data", "ceph.osdmap_inc.client",
8276
14
      FT_NONE, BASE_NONE, NULL, 0,
8277
14
      NULL, HFILL
8278
14
    } },
8279
14
    { &hf_osdmap_inc_fsid, {
8280
14
      "FSID", "ceph.osdmap_inc.fsid",
8281
14
      FT_GUID, BASE_NONE, NULL, 0,
8282
14
      NULL, HFILL
8283
14
    } },
8284
14
    { &hf_osdmap_inc_osd, {
8285
14
      "OSD-Only Data", "ceph.osdmap_inc.osd",
8286
14
      FT_NONE, BASE_NONE, NULL, 0,
8287
14
      NULL, HFILL
8288
14
    } },
8289
14
    { &hf_connect, {
8290
14
      "Connection Negotiation", "ceph.connect",
8291
14
      FT_NONE, BASE_NONE, NULL, 0,
8292
14
      NULL, HFILL
8293
14
    } },
8294
14
    { &hf_features_low, {
8295
14
      "Features", "ceph.connect.features.low",
8296
14
      FT_UINT32, BASE_HEX, NULL, 0,
8297
14
      NULL, HFILL
8298
14
    } },
8299
14
    { &hf_features_high, {
8300
14
      "Features", "ceph.connect.features.high",
8301
14
      FT_UINT32, BASE_HEX, NULL, 0,
8302
14
      NULL, HFILL
8303
14
    } },
8304
14
    { &hf_feature_uid, {
8305
14
      "UID", "ceph.features.uid",
8306
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_UID,
8307
14
      NULL, HFILL
8308
14
    } },
8309
14
    { &hf_feature_nosrcaddr, {
8310
14
      "NOSRCADDR", "ceph.features.nosrcaddr",
8311
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_NOSRCADDR,
8312
14
      NULL, HFILL
8313
14
    } },
8314
14
    { &hf_feature_monclockcheck, {
8315
14
      "MONCLOCKCHECK", "ceph.features.monclockcheck",
8316
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONCLOCKCHECK,
8317
14
      NULL, HFILL
8318
14
    } },
8319
14
    { &hf_feature_flock, {
8320
14
      "FLOCK", "ceph.features.flock",
8321
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_FLOCK,
8322
14
      NULL, HFILL
8323
14
    } },
8324
14
    { &hf_feature_subscribe2, {
8325
14
      "SUBSCRIBE2", "ceph.features.subscribe2",
8326
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_SUBSCRIBE2,
8327
14
      NULL, HFILL
8328
14
    } },
8329
14
    { &hf_feature_monnames, {
8330
14
      "MONNAMES", "ceph.features.monnames",
8331
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONNAMES,
8332
14
      NULL, HFILL
8333
14
    } },
8334
14
    { &hf_feature_reconnect_seq, {
8335
14
      "RECONNECT_SEQ", "ceph.features.reconnect_seq",
8336
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_RECONNECT_SEQ,
8337
14
      NULL, HFILL
8338
14
    } },
8339
14
    { &hf_feature_dirlayouthash, {
8340
14
      "DIRLAYOUTHASH", "ceph.features.dirlayouthash",
8341
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_DIRLAYOUTHASH,
8342
14
      NULL, HFILL
8343
14
    } },
8344
14
    { &hf_feature_objectlocator, {
8345
14
      "OBJECTLOCATOR", "ceph.features.objectlocator",
8346
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OBJECTLOCATOR,
8347
14
      NULL, HFILL
8348
14
    } },
8349
14
    { &hf_feature_pgid64, {
8350
14
      "PGID64", "ceph.features.pgid64",
8351
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_PGID64,
8352
14
      NULL, HFILL
8353
14
    } },
8354
14
    { &hf_feature_incsubosdmap, {
8355
14
      "INCSUBOSDMAP", "ceph.features.incsubosdmap",
8356
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_INCSUBOSDMAP,
8357
14
      NULL, HFILL
8358
14
    } },
8359
14
    { &hf_feature_pgpool3, {
8360
14
      "PGPOOL3", "ceph.features.pgpool3",
8361
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_PGPOOL3,
8362
14
      NULL, HFILL
8363
14
    } },
8364
14
    { &hf_feature_osdreplymux, {
8365
14
      "OSDREPLYMUX", "ceph.features.osdreplymux",
8366
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDREPLYMUX,
8367
14
      NULL, HFILL
8368
14
    } },
8369
14
    { &hf_feature_osdenc, {
8370
14
      "OSDENC", "ceph.features.osdenc",
8371
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDENC,
8372
14
      NULL, HFILL
8373
14
    } },
8374
14
    { &hf_feature_omap, {
8375
14
      "OMAP", "ceph.features.omap",
8376
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OMAP,
8377
14
      NULL, HFILL
8378
14
    } },
8379
14
    { &hf_feature_monenc, {
8380
14
      "MONENC", "ceph.features.monenc",
8381
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MONENC,
8382
14
      NULL, HFILL
8383
14
    } },
8384
14
    { &hf_feature_query_t, {
8385
14
      "QUERY_T", "ceph.features.query_t",
8386
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_QUERY_T,
8387
14
      NULL, HFILL
8388
14
    } },
8389
14
    { &hf_feature_indep_pg_map, {
8390
14
      "INDEP_PG_MAP", "ceph.features.indep_pg_map",
8391
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_INDEP_PG_MAP,
8392
14
      NULL, HFILL
8393
14
    } },
8394
14
    { &hf_feature_crush_tunables, {
8395
14
      "CRUSH_TUNABLES", "ceph.features.crush_tunables",
8396
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES,
8397
14
      NULL, HFILL
8398
14
    } },
8399
14
    { &hf_feature_chunky_scrub, {
8400
14
      "CHUNKY_SCRUB", "ceph.features.chunky_scrub",
8401
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CHUNKY_SCRUB,
8402
14
      NULL, HFILL
8403
14
    } },
8404
14
    { &hf_feature_mon_nullroute, {
8405
14
      "MON_NULLROUTE", "ceph.features.mon_nullroute",
8406
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_NULLROUTE,
8407
14
      NULL, HFILL
8408
14
    } },
8409
14
    { &hf_feature_mon_gv, {
8410
14
      "MON_GV", "ceph.features.mon_gv",
8411
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_GV,
8412
14
      NULL, HFILL
8413
14
    } },
8414
14
    { &hf_feature_backfill_reservation, {
8415
14
      "BACKFILL_RESERVATION", "ceph.features.backfill_reservation",
8416
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_BACKFILL_RESERVATION,
8417
14
      NULL, HFILL
8418
14
    } },
8419
14
    { &hf_feature_msg_auth, {
8420
14
      "MSG_AUTH", "ceph.features.msg_auth",
8421
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MSG_AUTH,
8422
14
      NULL, HFILL
8423
14
    } },
8424
14
    { &hf_feature_recovery_reservation, {
8425
14
      "RECOVERY_RESERVATION", "ceph.features.recovery_reservation",
8426
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_RECOVERY_RESERVATION,
8427
14
      NULL, HFILL
8428
14
    } },
8429
14
    { &hf_feature_crush_tunables2, {
8430
14
      "CRUSH_TUNABLES2", "ceph.features.crush_tunables2",
8431
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES2,
8432
14
      NULL, HFILL
8433
14
    } },
8434
14
    { &hf_feature_createpoolid, {
8435
14
      "CREATEPOOLID", "ceph.features.createpoolid",
8436
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CREATEPOOLID,
8437
14
      NULL, HFILL
8438
14
    } },
8439
14
    { &hf_feature_reply_create_inode, {
8440
14
      "REPLY_CREATE_INODE", "ceph.features.reply_create_inode",
8441
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_REPLY_CREATE_INODE,
8442
14
      NULL, HFILL
8443
14
    } },
8444
14
    { &hf_feature_osd_hbmsgs, {
8445
14
      "OSD_HBMSGS", "ceph.features.osd_hbmsgs",
8446
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_HBMSGS,
8447
14
      NULL, HFILL
8448
14
    } },
8449
14
    { &hf_feature_mdsenc, {
8450
14
      "MDSENC", "ceph.features.mdsenc",
8451
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MDSENC,
8452
14
      NULL, HFILL
8453
14
    } },
8454
14
    { &hf_feature_osdhashpspool, {
8455
14
      "OSDHASHPSPOOL", "ceph.features.osdhashpspool",
8456
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDHASHPSPOOL,
8457
14
      NULL, HFILL
8458
14
    } },
8459
14
    { &hf_feature_mon_single_paxos, {
8460
14
      "MON_SINGLE_PAXOS", "ceph.features.mon_single_paxos",
8461
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_SINGLE_PAXOS,
8462
14
      NULL, HFILL
8463
14
    } },
8464
14
    { &hf_feature_osd_snapmapper, {
8465
14
      "OSD_SNAPMAPPER", "ceph.features.osd_snapmapper",
8466
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_SNAPMAPPER,
8467
14
      NULL, HFILL
8468
14
    } },
8469
14
    { &hf_feature_mon_scrub, {
8470
14
      "MON_SCRUB", "ceph.features.mon_scrub",
8471
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MON_SCRUB,
8472
14
      NULL, HFILL
8473
14
    } },
8474
14
    { &hf_feature_osd_packed_recovery, {
8475
14
      "OSD_PACKED_RECOVERY", "ceph.features.osd_packed_recovery",
8476
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_PACKED_RECOVERY,
8477
14
      NULL, HFILL
8478
14
    } },
8479
14
    { &hf_feature_osd_cachepool, {
8480
14
      "OSD_CACHEPOOL", "ceph.features.osd_cachepool",
8481
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_CACHEPOOL,
8482
14
      NULL, HFILL
8483
14
    } },
8484
14
    { &hf_feature_crush_v2, {
8485
14
      "CRUSH_V2", "ceph.features.crush_v2",
8486
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_V2,
8487
14
      NULL, HFILL
8488
14
    } },
8489
14
    { &hf_feature_export_peer, {
8490
14
      "EXPORT_PEER", "ceph.features.export_peer",
8491
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_EXPORT_PEER,
8492
14
      NULL, HFILL
8493
14
    } },
8494
14
    { &hf_feature_osd_erasure_codes, {
8495
14
      "OSD_ERASURE_CODES", "ceph.features.osd_erasure_codes",
8496
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_ERASURE_CODES,
8497
14
      NULL, HFILL
8498
14
    } },
8499
14
    { &hf_feature_osd_tmap2omap, {
8500
14
      "OSD_TMAP2OMAP", "ceph.features.osd_tmap2omap",
8501
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_TMAP2OMAP,
8502
14
      NULL, HFILL
8503
14
    } },
8504
14
    { &hf_feature_osdmap_enc, {
8505
14
      "OSDMAP_ENC", "ceph.features.osdmap_enc",
8506
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSDMAP_ENC,
8507
14
      NULL, HFILL
8508
14
    } },
8509
14
    { &hf_feature_mds_inline_data, {
8510
14
      "MDS_INLINE_DATA", "ceph.features.mds_inline_data",
8511
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MDS_INLINE_DATA,
8512
14
      NULL, HFILL
8513
14
    } },
8514
14
    { &hf_feature_crush_tunables3, {
8515
14
      "CRUSH_TUNABLES3", "ceph.features.crush_tunables3",
8516
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_CRUSH_TUNABLES3,
8517
14
      NULL, HFILL
8518
14
    } },
8519
14
    { &hf_feature_osd_primary_affinity, {
8520
14
      "OSD_PRIMARY_AFFINITY", "ceph.features.osd_primary_affinity",
8521
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_OSD_PRIMARY_AFFINITY,
8522
14
      NULL, HFILL
8523
14
    } },
8524
14
    { &hf_feature_msgr_keepalive2, {
8525
14
      "MSGR_KEEPALIVE2", "ceph.features.msgr_keepalive2",
8526
14
      FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), C_FEATURE_MSGR_KEEPALIVE2,
8527
14
      NULL, HFILL
8528
14
    } },
8529
14
    { &hf_feature_reserved, {
8530
14
      "RESERVED", "ceph.features.reserved",
8531
14
      FT_BOOLEAN, 32, TFS(&tfs_set_notset), C_FEATURE_RESERVED,
8532
14
      NULL, HFILL
8533
14
    } },
8534
14
    { &hf_connect_host_type, {
8535
14
      "Host Type", "ceph.connect.host",
8536
14
      FT_UINT32, BASE_HEX, VALS(c_node_type_strings), 0,
8537
14
      "The type of host.", HFILL
8538
14
    } },
8539
14
    { &hf_connect_seq_global, {
8540
14
      "Global Sequence Number", "ceph.connect.global_seq",
8541
14
      FT_UINT32, BASE_DEC, NULL, 0,
8542
14
      "The number of connections initiated by this host.", HFILL
8543
14
    } },
8544
14
    { &hf_connect_seq, {
8545
14
      "Sequence Number", "ceph.connect.seq",
8546
14
      FT_UINT32, BASE_DEC, NULL, 0,
8547
14
      "The number of connections initiated this session.", HFILL
8548
14
    } },
8549
14
    { &hf_connect_proto_ver, {
8550
14
      "Protocol Version", "ceph.connect.ver",
8551
14
      FT_UINT32, BASE_DEC, NULL, 0,
8552
14
      "The protocol version to use.", HFILL
8553
14
    } },
8554
14
    { &hf_connect_auth_proto, {
8555
14
      "Authentication Protocol", "ceph.connect.auth.proto",
8556
14
      FT_UINT32, BASE_DEC, NULL, 0,
8557
14
      "The authentication protocol to use.", HFILL
8558
14
    } },
8559
14
    { &hf_connect_auth_size, {
8560
14
      "Authentication Size", "ceph.connect.auth.size",
8561
14
      FT_UINT32, BASE_DEC, NULL, 0,
8562
14
      "The size of the authentication.", HFILL
8563
14
    } },
8564
14
    { &hf_connect_auth, {
8565
14
      "Authentication", "ceph.connect.auth",
8566
14
      FT_BYTES, BASE_NONE, NULL, 0,
8567
14
      "Authentication data.", HFILL
8568
14
    } },
8569
14
    { &hf_flags, {
8570
14
      "Flags", "ceph.connect.flags",
8571
14
      FT_UINT8, BASE_HEX, NULL, 0,
8572
14
      NULL, HFILL
8573
14
    } },
8574
14
    { &hf_flag_lossy, {
8575
14
      "Lossy", "ceph.flags.lossy",
8576
14
      FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), C_FLAG_LOSSY,
8577
14
      "Messages may be safely dropped.", HFILL
8578
14
    } },
8579
14
    { &hf_osd_flags, {
8580
14
      "OSD Flags", "ceph.osd_flags",
8581
14
      FT_UINT32, BASE_HEX, NULL, 0,
8582
14
      NULL, HFILL
8583
14
    } },
8584
14
    { &hf_osd_flag_ack, {
8585
14
      "ACK", "ceph.osd_flags.ack",
8586
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ACK,
8587
14
      "want (or is) \"ack\" ack", HFILL
8588
14
    } },
8589
14
    { &hf_osd_flag_onnvram, {
8590
14
      "ACK on NVRAM", "ceph.osd_flags.onnvram",
8591
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ONNVRAM,
8592
14
      "want (or is) \"onnvram\" ack", HFILL
8593
14
    } },
8594
14
    { &hf_osd_flag_ondisk, {
8595
14
      "ACK on DISK", "ceph.osd_flags.ondisk",
8596
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ONDISK,
8597
14
      "want (or is) \"ondisk\" ack", HFILL
8598
14
    } },
8599
14
    { &hf_osd_flag_retry, {
8600
14
      "Retry", "ceph.osd_flags.retry",
8601
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_RETRY,
8602
14
      "resend attempt", HFILL
8603
14
    } },
8604
14
    { &hf_osd_flag_read, {
8605
14
      "Read", "ceph.osd_flags.read",
8606
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_READ,
8607
14
      "op may read", HFILL
8608
14
    } },
8609
14
    { &hf_osd_flag_write, {
8610
14
      "Write", "ceph.osd_flags.write",
8611
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_WRITE,
8612
14
      "op may write", HFILL
8613
14
    } },
8614
14
    { &hf_osd_flag_ordersnap, {
8615
14
      "ORDERSNAP", "ceph.osd_flags.ordersnap",
8616
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ORDERSNAP,
8617
14
      "EOLDSNAP if snapc is out of order", HFILL
8618
14
    } },
8619
14
    { &hf_osd_flag_peerstat_old, {
8620
14
      "PEERSTAT_OLD", "ceph.osd_flags.peerstat_old",
8621
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PEERSTAT_OLD,
8622
14
      "DEPRECATED msg includes osd_peer_stat", HFILL
8623
14
    } },
8624
14
    { &hf_osd_flag_balance_reads, {
8625
14
      "BALANCE_READS", "ceph.osd_flags.balance_reads",
8626
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_BALANCE_READS,
8627
14
      NULL, HFILL
8628
14
    } },
8629
14
    { &hf_osd_flag_parallelexec, {
8630
14
      "PARALLELEXEC", "ceph.osd_flags.parallelexec",
8631
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PARALLELEXEC,
8632
14
      "execute op in parallel", HFILL
8633
14
    } },
8634
14
    { &hf_osd_flag_pgop, {
8635
14
      "PGOP", "ceph.osd_flags.pgop",
8636
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_PGOP,
8637
14
      "pg op, no object", HFILL
8638
14
    } },
8639
14
    { &hf_osd_flag_exec, {
8640
14
      "EXEC", "ceph.osd_flags.exec",
8641
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_EXEC,
8642
14
      "op may exec", HFILL
8643
14
    } },
8644
14
    { &hf_osd_flag_exec_public, {
8645
14
      "EXEC_PUBLIC", "ceph.osd_flags.exec_public",
8646
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_EXEC_PUBLIC,
8647
14
      "DEPRECATED op may exec (public)", HFILL
8648
14
    } },
8649
14
    { &hf_osd_flag_localize_reads, {
8650
14
      "LOCALIZE_READS", "ceph.osd_flags.localize_reads",
8651
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_LOCALIZE_READS,
8652
14
      "read from nearby replica, if any", HFILL
8653
14
    } },
8654
14
    { &hf_osd_flag_rwordered, {
8655
14
      "RWORDERED", "ceph.osd_flags.rwordered",
8656
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_RWORDERED,
8657
14
      "order wrt concurrent reads", HFILL
8658
14
    } },
8659
14
    { &hf_osd_flag_ignore_cache, {
8660
14
      "IGNORE_CACHE", "ceph.osd_flags.ignore_cache",
8661
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_IGNORE_CACHE,
8662
14
      "ignore cache logic", HFILL
8663
14
    } },
8664
14
    { &hf_osd_flag_skiprwlocks, {
8665
14
      "SKIPRWLOCKS", "ceph.osd_flags.skiprwlocks",
8666
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_SKIPRWLOCKS,
8667
14
      "skip rw locks", HFILL
8668
14
    } },
8669
14
    { &hf_osd_flag_ignore_overlay, {
8670
14
      "IGNORE_OVERLAY", "ceph.osd_flags.ignore_overlay",
8671
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_IGNORE_OVERLAY,
8672
14
      "ignore pool overlay", HFILL
8673
14
    } },
8674
14
    { &hf_osd_flag_flush, {
8675
14
      "FLUSH", "ceph.osd_flags.flush",
8676
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_FLUSH,
8677
14
      "this is part of flush", HFILL
8678
14
    } },
8679
14
    { &hf_osd_flag_map_snap_clone, {
8680
14
      "MAP_SNAP_CLONE", "ceph.osd_flags.map_snap_clone",
8681
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_MAP_SNAP_CLONE,
8682
14
      "map snap direct to clone id", HFILL
8683
14
    } },
8684
14
    { &hf_osd_flag_enforce_snapc, {
8685
14
      "ENFORCE_SNAPC", "ceph.osd_flags.enforce_snapc",
8686
14
      FT_BOOLEAN, 32, TFS(&tfs_yes_no), C_OSD_FLAG_ENFORCE_SNAPC,
8687
14
      "use snapc provided even if pool uses pool snaps", HFILL
8688
14
    } },
8689
14
    { &hf_osd_op_type, {
8690
14
      "Operation", "ceph.osd_op.op",
8691
14
      FT_UINT16, BASE_HEX|BASE_EXT_STRING, &c_osd_optype_strings_ext, 0,
8692
14
      NULL, HFILL
8693
14
    } },
8694
14
    { &hf_osd_op_data, {
8695
14
      "Operation Specific Data", "ceph.osd_op.data",
8696
14
      FT_BYTES, BASE_NONE, NULL, 0,
8697
14
      NULL, HFILL
8698
14
    } },
8699
14
    { &hf_osd_op_extent_off, {
8700
14
      "Offset", "ceph.osd_op.extent.offset",
8701
14
      FT_UINT64, BASE_DEC, NULL, 0,
8702
14
      NULL, HFILL
8703
14
    } },
8704
14
    { &hf_osd_op_extent_size, {
8705
14
      "Size", "ceph.osd_op.extent.size",
8706
14
      FT_UINT64, BASE_DEC, NULL, 0,
8707
14
      NULL, HFILL
8708
14
    } },
8709
14
    { &hf_osd_op_extent_trunc_size, {
8710
14
      "Truncate Size", "ceph.osd_op.extent.trunc_size",
8711
14
      FT_UINT64, BASE_DEC, NULL, 0,
8712
14
      NULL, HFILL
8713
14
    } },
8714
14
    { &hf_osd_op_extent_trunc_seq, {
8715
14
      "Truncate Sequence", "ceph.osd_op.extent.trunc_seq",
8716
14
      FT_UINT64, BASE_DEC, NULL, 0,
8717
14
      NULL, HFILL
8718
14
    } },
8719
14
    { &hf_osd_op_payload_size, {
8720
14
      "Payload Size", "ceph.osd_op.payload_size",
8721
14
      FT_UINT32, BASE_DEC, NULL, 0,
8722
14
      NULL, HFILL
8723
14
    } },
8724
14
    { &hf_osd_redirect_oloc, {
8725
14
      "Object Locater", "ceph.osd_redirect.oloc",
8726
14
      FT_NONE, BASE_NONE, NULL, 0,
8727
14
      NULL, HFILL
8728
14
    } },
8729
14
    { &hf_osd_redirect_obj, {
8730
14
      "Object Name", "ceph.osd_redirect.obj",
8731
14
      FT_BYTES, BASE_NONE, NULL, 0,
8732
14
      "Redirect to this object.", HFILL
8733
14
    } },
8734
14
    { &hf_osd_redirect_osdinstr, {
8735
14
      "OSD Instructions", "ceph.osd_redirect.osd_instructions",
8736
14
      FT_NONE, BASE_NONE, NULL, 0,
8737
14
      "Instructions to pass to the new target.", HFILL
8738
14
    } },
8739
14
    { &hf_osd_redirect_osdinstr_data, {
8740
14
      "Data", "ceph.osd_redirect.osd_instructions_data",
8741
14
      FT_BYTES, BASE_NONE, NULL, 0,
8742
14
      NULL, HFILL
8743
14
    } },
8744
14
    { &hf_osd_redirect_osdinstr_len, {
8745
14
      "Length", "ceph.osd_redirect.osd_instructions_len",
8746
14
      FT_UINT32, BASE_DEC, NULL, 0,
8747
14
      NULL, HFILL
8748
14
    } },
8749
14
    { &hf_statsum_bytes, {
8750
14
      "Bytes", "ceph.statsum.bytes",
8751
14
      FT_UINT64, BASE_DEC, NULL, 0,
8752
14
      "The space used in bytes.", HFILL
8753
14
    } },
8754
14
    { &hf_statsum_objects, {
8755
14
      "Objects", "ceph.statsum.objects",
8756
14
      FT_UINT64, BASE_DEC, NULL, 0,
8757
14
      "The number of logical objects.", HFILL
8758
14
    } },
8759
14
    { &hf_statsum_clones, {
8760
14
      "Clones", "ceph.statsum.clones",
8761
14
      FT_UINT64, BASE_DEC, NULL, 0,
8762
14
      NULL, HFILL
8763
14
    } },
8764
14
    { &hf_statsum_copies, {
8765
14
      "Copies", "ceph.statsum.copies",
8766
14
      FT_UINT64, BASE_DEC, NULL, 0,
8767
14
      "The total number of objects including redundant "
8768
14
      "copies (objects*replicas).", HFILL
8769
14
    } },
8770
14
    { &hf_statsum_missing, {
8771
14
      "Missing Objects", "ceph.statsum.missing",
8772
14
      FT_UINT64, BASE_DEC, NULL, 0,
8773
14
      NULL, HFILL
8774
14
    } },
8775
14
    { &hf_statsum_degraded, {
8776
14
      "Degraded Objects", "ceph.statsum.degraded",
8777
14
      FT_UINT64, BASE_DEC, NULL, 0,
8778
14
      "Number of objects that are on at least one OSD but "
8779
14
      "less then they should be.", HFILL
8780
14
    } },
8781
14
    { &hf_statsum_unfound, {
8782
14
      "Unfound Objects", "ceph.statsum.unfound",
8783
14
      FT_UINT64, BASE_DEC, NULL, 0,
8784
14
      "Number of objects with no copies.", HFILL
8785
14
    } },
8786
14
    { &hf_statsum_read_bytes, {
8787
14
      "Bytes Read", "ceph.statsum.read_bytes",
8788
14
      FT_UINT64, BASE_DEC, NULL, 0,
8789
14
      NULL, HFILL
8790
14
    } },
8791
14
    { &hf_statsum_read_kbytes, {
8792
14
      "Kibibytes Read", "ceph.statsum.read_kbytes",
8793
14
      FT_UINT64, BASE_DEC, NULL, 0,
8794
14
      "The number of KiB (2^10) read.", HFILL
8795
14
    } },
8796
14
    { &hf_statsum_written_bytes, {
8797
14
      "Bytes Written", "ceph.statsum.written_bytes",
8798
14
      FT_UINT64, BASE_DEC, NULL, 0,
8799
14
      NULL, HFILL
8800
14
    } },
8801
14
    { &hf_statsum_written_kbytes, {
8802
14
      "Kibibytes Written", "ceph.statsum.written_kbytes",
8803
14
      FT_UINT64, BASE_DEC, NULL, 0,
8804
14
      "The number of KiB (2^10) written.", HFILL
8805
14
    } },
8806
14
    { &hf_statsum_scrub_errors, {
8807
14
      "Scrub Errors", "ceph.statsum.scrub_errors",
8808
14
      FT_UINT64, BASE_DEC, NULL, 0,
8809
14
      "Total scrub errors. (shallow+deep)", HFILL
8810
14
    } },
8811
14
    { &hf_statsum_recovered, {
8812
14
      "Recovered Objects", "ceph.statsum.recovered",
8813
14
      FT_UINT64, BASE_DEC, NULL, 0,
8814
14
      NULL, HFILL
8815
14
    } },
8816
14
    { &hf_statsum_bytes_recovered, {
8817
14
      "Recovered Bytes", "ceph.statsum.bytes_recovered",
8818
14
      FT_UINT64, BASE_DEC, NULL, 0,
8819
14
      NULL, HFILL
8820
14
    } },
8821
14
    { &hf_statsum_keys_recovered, {
8822
14
      "Keys Recovered", "ceph.statsum.keys_recovered",
8823
14
      FT_UINT64, BASE_DEC, NULL, 0,
8824
14
      NULL, HFILL
8825
14
    } },
8826
14
    { &hf_statsum_shallow_scrub_errors, {
8827
14
      "Shallow Scrub Errors", "ceph.statsum.shallow_scrub_errors",
8828
14
      FT_UINT64, BASE_DEC, NULL, 0,
8829
14
      NULL, HFILL
8830
14
    } },
8831
14
    { &hf_statsum_deep_scrub_errors, {
8832
14
      "Deep Scrub Errors", "ceph.statsum.deep_scrub_errors",
8833
14
      FT_UINT64, BASE_DEC, NULL, 0,
8834
14
      NULL, HFILL
8835
14
    } },
8836
14
    { &hf_statsum_dirty, {
8837
14
      "Dirty Objects", "ceph.statsum.dirty",
8838
14
      FT_UINT64, BASE_DEC, NULL, 0,
8839
14
      NULL, HFILL
8840
14
    } },
8841
14
    { &hf_statsum_whiteouts, {
8842
14
      "Whiteouts", "ceph.statsum.whiteouts",
8843
14
      FT_UINT64, BASE_DEC, NULL, 0,
8844
14
      NULL, HFILL
8845
14
    } },
8846
14
    { &hf_statsum_omap, {
8847
14
      "OMAP Objects", "ceph.statsum.omap",
8848
14
      FT_UINT64, BASE_DEC, NULL, 0,
8849
14
      NULL, HFILL
8850
14
    } },
8851
14
    { &hf_statsum_hitset_archive, {
8852
14
      "Hit Set Archive", "ceph.statsum.hitset_archive",
8853
14
      FT_UINT64, BASE_DEC, NULL, 0,
8854
14
      NULL, HFILL
8855
14
    } },
8856
14
    { &hf_connect_reply, {
8857
14
      "Connection Negotiation Reply", "ceph.connect_reply",
8858
14
      FT_NONE, BASE_NONE, NULL, 0,
8859
14
      NULL, HFILL
8860
14
    } },
8861
14
    { &hf_tag, {
8862
14
      "Tag", "ceph.tag",
8863
14
      FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_tag_strings_ext, 0,
8864
14
      NULL, HFILL
8865
14
    } },
8866
14
    { &hf_ack, {
8867
14
      "Acknowledgment", "ceph.ack",
8868
14
      FT_UINT64, BASE_DEC, NULL, 0,
8869
14
      NULL, HFILL
8870
14
    } },
8871
14
    { &hf_seq_existing, {
8872
14
      "Existing Sequence Number", "ceph.seq_existing",
8873
14
      FT_UINT64, BASE_DEC, NULL, 0,
8874
14
      NULL, HFILL
8875
14
    } },
8876
14
    { &hf_seq_new, {
8877
14
      "Newly Acknowledged Sequence Number", "ceph.seq_new",
8878
14
      FT_UINT64, BASE_DEC, NULL, 0,
8879
14
      NULL, HFILL
8880
14
    } },
8881
14
    { &hf_head, {
8882
14
      "Message Header", "ceph.head",
8883
14
      FT_NONE, BASE_NONE, NULL, 0,
8884
14
      NULL, HFILL
8885
14
    } },
8886
14
    { &hf_head_seq, {
8887
14
      "Sequence Number", "ceph.seq",
8888
14
      FT_UINT64, BASE_DEC, NULL, 0,
8889
14
      NULL, HFILL
8890
14
    } },
8891
14
    { &hf_head_tid, {
8892
14
      "Transaction ID", "ceph.tid",
8893
14
      FT_UINT64, BASE_DEC, NULL, 0,
8894
14
      NULL, HFILL
8895
14
    } },
8896
14
    { &hf_head_type, {
8897
14
      "Type", "ceph.type",
8898
14
      FT_UINT16, BASE_HEX|BASE_EXT_STRING, &c_msg_type_strings_ext, 0,
8899
14
      "Message type.", HFILL
8900
14
    } },
8901
14
    { &hf_head_priority, {
8902
14
      "Priority", "ceph.priority",
8903
14
      FT_UINT16, BASE_DEC, NULL, 0,
8904
14
      "The priority of this message, higher the more urgent.", HFILL
8905
14
    } },
8906
14
    { &hf_head_version, {
8907
14
      "Version", "ceph.head_version",
8908
14
      FT_UINT16, BASE_DEC, NULL, 0,
8909
14
      NULL, HFILL
8910
14
    } },
8911
14
    { &hf_head_front_size, {
8912
14
      "Front Size", "ceph.front_size",
8913
14
      FT_UINT32, BASE_DEC, NULL, 0,
8914
14
      NULL, HFILL
8915
14
    } },
8916
14
    { &hf_head_middle_size, {
8917
14
      "Middle Size", "ceph.middle_size",
8918
14
      FT_UINT32, BASE_DEC, NULL, 0,
8919
14
      NULL, HFILL
8920
14
    } },
8921
14
    { &hf_head_data_size, {
8922
14
      "Data Size", "ceph.data_size",
8923
14
      FT_UINT32, BASE_DEC, NULL, 0,
8924
14
      NULL, HFILL
8925
14
    } },
8926
14
    { &hf_head_data_off, {
8927
14
      "Data Offset", "ceph.data_off",
8928
14
      FT_UINT16, BASE_DEC, NULL, 0,
8929
14
      NULL, HFILL
8930
14
    } },
8931
14
    { &hf_head_srcname, {
8932
14
      "Source Name", "ceph.node",
8933
14
      FT_NONE, BASE_NONE, NULL, 0,
8934
14
      NULL, HFILL
8935
14
    } },
8936
14
    { &hf_head_compat_version, {
8937
14
      "Compatibility Version", "ceph.compat_version",
8938
14
      FT_UINT64, BASE_DEC, NULL, 0,
8939
14
      "The oldest code that can probably decode this message.", HFILL
8940
14
    } },
8941
14
    { &hf_head_reserved, {
8942
14
      "Reserved", "ceph.reserved",
8943
14
      FT_UINT16, BASE_HEX, NULL, 0,
8944
14
      NULL, HFILL
8945
14
    } },
8946
14
    { &hf_head_crc, {
8947
14
      "CRC Checksum", "ceph.crc",
8948
14
      FT_UINT32, BASE_HEX, NULL, 0,
8949
14
      NULL, HFILL
8950
14
    } },
8951
14
    { &hf_foot, {
8952
14
      "Message Footer", "ceph.foot",
8953
14
      FT_NONE, BASE_NONE, NULL, 0,
8954
14
      NULL, HFILL
8955
14
    } },
8956
14
    { &hf_foot_front_crc, {
8957
14
      "Front Checksum", "ceph.foot.front_crc",
8958
14
      FT_UINT32, BASE_HEX, NULL, 0,
8959
14
      NULL, HFILL
8960
14
    } },
8961
14
    { &hf_foot_middle_crc, {
8962
14
      "Middle Checksum", "ceph.foot.middle_crc",
8963
14
      FT_UINT32, BASE_HEX, NULL, 0,
8964
14
      NULL, HFILL
8965
14
    } },
8966
14
    { &hf_foot_data_crc, {
8967
14
      "Data Checksum", "ceph.foot.data_crc",
8968
14
      FT_UINT32, BASE_HEX, NULL, 0,
8969
14
      NULL, HFILL
8970
14
    } },
8971
14
    { &hf_foot_signature, {
8972
14
      "Signature", "ceph.foot.signature",
8973
14
      FT_UINT64, BASE_HEX, NULL, 0,
8974
14
      NULL, HFILL
8975
14
    } },
8976
14
    { &hf_msg_front, {
8977
14
      "Front", "ceph.front",
8978
14
      FT_BYTES, BASE_NONE, NULL, 0,
8979
14
      NULL, HFILL
8980
14
    } },
8981
14
    { &hf_msg_middle, {
8982
14
      "Middle", "ceph.mid",
8983
14
      FT_BYTES, BASE_NONE, NULL, 0,
8984
14
      NULL, HFILL
8985
14
    } },
8986
14
    { &hf_msg_data, {
8987
14
      "Data", "ceph.data",
8988
14
      FT_BYTES, BASE_NONE, NULL, 0,
8989
14
      NULL, HFILL
8990
14
    } },
8991
14
    { &hf_statcollection, {
8992
14
      "Stats", "ceph.statcollection",
8993
14
      FT_NONE, BASE_NONE, NULL, 0,
8994
14
      NULL, HFILL
8995
14
    } },
8996
14
    { &hf_paxos, {
8997
14
      "Paxos Message", "ceph.paxos",
8998
14
      FT_NONE, BASE_NONE, NULL, 0,
8999
14
      NULL, HFILL
9000
14
    } },
9001
14
    { &hf_paxos_ver, {
9002
14
      "Paxos Version", "ceph.paxos.ver",
9003
14
      FT_UINT64, BASE_DEC, NULL, 0,
9004
14
      NULL, HFILL
9005
14
    } },
9006
14
    { &hf_paxos_mon, {
9007
14
      "Mon", "ceph.paxos.mon",
9008
14
      FT_INT16, BASE_DEC, NULL, 0,
9009
14
      NULL, HFILL
9010
14
    } },
9011
14
    { &hf_paxos_mon_tid, {
9012
14
      "Mon Transaction ID", "ceph.paxos.tid",
9013
14
      FT_UINT64, BASE_DEC, NULL, 0,
9014
14
      NULL, HFILL
9015
14
    } },
9016
14
    { &hf_msg_mon_map, {
9017
14
      "Mon Map Message", "ceph.msg.mon_map",
9018
14
      FT_NONE, BASE_NONE, NULL, 0,
9019
14
      NULL, HFILL
9020
14
    } },
9021
14
    { &hf_msg_statfs, {
9022
14
      "Stat Filesystem", "ceph.msg.statfs",
9023
14
      FT_NONE, BASE_NONE, NULL, 0,
9024
14
      NULL, HFILL
9025
14
    } },
9026
14
    { &hf_msg_statfs_fsid, {
9027
14
      "FSID", "ceph.msg.statfs.fsid",
9028
14
      FT_GUID, BASE_NONE, NULL, 0,
9029
14
      NULL, HFILL
9030
14
    } },
9031
14
    { &hf_msg_statfsreply, {
9032
14
      "Stat Filesystem Reply", "ceph.msg.statfsreply",
9033
14
      FT_NONE, BASE_NONE, NULL, 0,
9034
14
      NULL, HFILL
9035
14
    } },
9036
14
    { &hf_msg_statfsreply_fsid, {
9037
14
      "FSID", "ceph.msg.statfsreply.fsid",
9038
14
      FT_GUID, BASE_NONE, NULL, 0,
9039
14
      NULL, HFILL
9040
14
    } },
9041
14
    { &hf_msg_statfsreply_ver, {
9042
14
      "Version", "ceph.msg.statfsreply.ver",
9043
14
      FT_UINT64, BASE_DEC, NULL, 0,
9044
14
      NULL, HFILL
9045
14
    } },
9046
14
    { &hf_msg_statfsreply_kb, {
9047
14
      "Kibibytes", "ceph.msg.statfsreply.kb",
9048
14
      FT_UINT64, BASE_DEC, NULL, 0,
9049
14
      NULL, HFILL
9050
14
    } },
9051
14
    { &hf_msg_statfsreply_kbused, {
9052
14
      "Kibibytes Used", "ceph.msg.statfsreply.kbused",
9053
14
      FT_UINT64, BASE_DEC, NULL, 0,
9054
14
      NULL, HFILL
9055
14
    } },
9056
14
    { &hf_msg_statfsreply_kbavail, {
9057
14
      "Kibibytes Available", "ceph.msg.statfsreply.kbavail",
9058
14
      FT_UINT64, BASE_DEC, NULL, 0,
9059
14
      NULL, HFILL
9060
14
    } },
9061
14
    { &hf_msg_statfsreply_obj, {
9062
14
      "Number of Objects", "ceph.msg.statfsreply.obj",
9063
14
      FT_UINT64, BASE_DEC, NULL, 0,
9064
14
      NULL, HFILL
9065
14
    } },
9066
14
    { &hf_msg_mon_sub, {
9067
14
      "Mon Subscribe Message", "ceph.msg.mon_sub",
9068
14
      FT_NONE, BASE_NONE, NULL, 0,
9069
14
      NULL, HFILL
9070
14
    } },
9071
14
    { &hf_msg_mon_sub_item, {
9072
14
      "Subscription Item", "ceph.msg.mon_sub.item",
9073
14
      FT_NONE, BASE_NONE, NULL, 0,
9074
14
      NULL, HFILL
9075
14
    } },
9076
14
    { &hf_msg_mon_sub_item_len, {
9077
14
      "Number of items", "ceph.msg.mon_sub.item_len",
9078
14
      FT_UINT32, BASE_DEC, NULL, 0,
9079
14
      NULL, HFILL
9080
14
    } },
9081
14
    { &hf_msg_mon_sub_what, {
9082
14
      "What", "ceph.msg.mon_sub.what",
9083
14
      FT_STRING, BASE_NONE, NULL, 0,
9084
14
      "What to subscribe to.", HFILL
9085
14
    } },
9086
14
    { &hf_msg_mon_sub_start, {
9087
14
      "Start Time", "ceph.msg.mon_sub.start",
9088
14
      FT_UINT64, BASE_DEC, NULL, 0,
9089
14
      NULL, HFILL
9090
14
    } },
9091
14
    { &hf_msg_mon_sub_flags, {
9092
14
      "Flags", "ceph.msg.mon_sub.flags",
9093
14
      FT_UINT8, BASE_HEX, NULL, 0,
9094
14
      NULL, HFILL
9095
14
    } },
9096
14
    { &hf_msg_mon_sub_flags_onetime, {
9097
14
      "One Time", "ceph.msg.mon_sub.flags.onetime",
9098
14
      FT_BOOLEAN, 8, TFS(&tfs_yes_no), C_MON_SUB_FLAG_ONETIME,
9099
14
      NULL, HFILL
9100
14
    } },
9101
14
    { &hf_msg_mon_sub_ack, {
9102
14
      "Subscription Acknowledgment", "ceph.msg.mon_sub_ack",
9103
14
      FT_NONE, BASE_NONE, NULL, 0,
9104
14
      NULL, HFILL
9105
14
    } },
9106
14
    { &hf_msg_mon_sub_ack_interval, {
9107
14
      "Interval", "ceph.msg.mon_sub_ack.interval",
9108
14
      FT_UINT32, BASE_DEC, NULL, 0,
9109
14
      NULL, HFILL
9110
14
    } },
9111
14
    { &hf_msg_mon_sub_ack_fsid, {
9112
14
      "FSID", "ceph.msg.mon_sub_ack.fsid",
9113
14
      FT_GUID, BASE_NONE, NULL, 0,
9114
14
      NULL, HFILL
9115
14
    } },
9116
14
    { &hf_msg_auth, {
9117
14
      "Auth Message", "ceph.msg.auth",
9118
14
      FT_NONE, BASE_NONE, NULL, 0,
9119
14
      NULL, HFILL
9120
14
    } },
9121
14
    { &hf_msg_auth_proto, {
9122
14
      "Protocol", "ceph.msg.auth.proto",
9123
14
      FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9124
14
      NULL, HFILL
9125
14
    } },
9126
14
    { &hf_msg_auth_supportedproto, {
9127
14
      "Supported Protocols", "ceph.msg.auth.supportedproto",
9128
14
      FT_NONE, BASE_NONE, NULL, 0,
9129
14
      NULL, HFILL
9130
14
    } },
9131
14
    { &hf_msg_auth_supportedproto_ver, {
9132
14
      "Encoding Version", "ceph.msg.auth.supportedproto.ver",
9133
14
      FT_UINT8, BASE_DEC, NULL, 0,
9134
14
      NULL, HFILL
9135
14
    } },
9136
14
    { &hf_msg_auth_supportedproto_proto, {
9137
14
      "Supported Protocol", "ceph.msg.auth.supportedproto.proto",
9138
14
      FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9139
14
      NULL, HFILL
9140
14
    } },
9141
14
    { &hf_msg_auth_supportedproto_gid, {
9142
14
      "Global ID", "ceph.msg.auth.supportedproto.gid",
9143
14
      FT_UINT64, BASE_HEX, NULL, 0,
9144
14
      NULL, HFILL
9145
14
    } },
9146
14
    { &hf_msg_auth_cephx, {
9147
14
      "CephX", "ceph.msg.auth.cephx",
9148
14
      FT_NONE, BASE_NONE, NULL, 0,
9149
14
      NULL, HFILL
9150
14
    } },
9151
14
    { &hf_msg_auth_cephx_req_type, {
9152
14
      "Type", "ceph.msg.auth.cephx.req.type",
9153
14
      FT_UINT16, BASE_HEX, VALS(c_cephx_req_type_strings), 0,
9154
14
      NULL, HFILL
9155
14
    } },
9156
14
    { &hf_msg_auth_monmap_epoch, {
9157
14
      "Monmap epoch", "ceph.msg.auth.monmap_epoch",
9158
14
      FT_UINT32, BASE_DEC, NULL, 0,
9159
14
      NULL, HFILL
9160
14
    } },
9161
14
    { &hf_msg_auth_reply, {
9162
14
      "Auth Reply Message", "ceph.msg.auth_reply",
9163
14
      FT_NONE, BASE_NONE, NULL, 0,
9164
14
      NULL, HFILL
9165
14
    } },
9166
14
    { &hf_msg_auth_reply_proto, {
9167
14
      "Protocol", "ceph.msg.auth_reply.proto",
9168
14
      FT_UINT32, BASE_HEX, VALS(c_auth_proto_strings), 0,
9169
14
      NULL, HFILL
9170
14
    } },
9171
14
    { &hf_msg_auth_reply_result, {
9172
14
      "Result", "ceph.msg.auth_reply.result",
9173
14
      FT_INT32, BASE_DEC, NULL, 0,
9174
14
      NULL, HFILL
9175
14
    } },
9176
14
    { &hf_msg_auth_reply_global_id, {
9177
14
      "Global ID", "ceph.msg.auth_reply.id",
9178
14
      FT_UINT64, BASE_HEX, NULL, 0,
9179
14
      NULL, HFILL
9180
14
    } },
9181
14
    { &hf_msg_auth_reply_msg, {
9182
14
      "Message", "ceph.msg.auth_reply.msg",
9183
14
      FT_STRING, BASE_NONE, NULL, 0,
9184
14
      NULL, HFILL
9185
14
    } },
9186
14
    { &hf_msg_mon_getversion, {
9187
14
      "Get Version", "ceph.msg.mon.getversion",
9188
14
      FT_NONE, BASE_NONE, NULL, 0,
9189
14
      NULL, HFILL
9190
14
    } },
9191
14
    { &hf_msg_mon_getversion_tid, {
9192
14
      "Transaction ID", "ceph.msg.mon.getversion.tid",
9193
14
      FT_UINT64, BASE_DEC, NULL, 0,
9194
14
      NULL, HFILL
9195
14
    } },
9196
14
    { &hf_msg_mon_getversion_what, {
9197
14
      "What", "ceph.msg.mon.getversion.what",
9198
14
      FT_STRING, BASE_NONE, NULL, 0,
9199
14
      NULL, HFILL
9200
14
    } },
9201
14
    { &hf_msg_mon_getversionreply, {
9202
14
      "Get Version Reply", "ceph.msg.mon.getversionreply",
9203
14
      FT_NONE, BASE_NONE, NULL, 0,
9204
14
      NULL, HFILL
9205
14
    } },
9206
14
    { &hf_msg_mon_getversionreply_tid, {
9207
14
      "Transaction ID", "ceph.msg.mon.getversionreply.tid",
9208
14
      FT_UINT64, BASE_DEC, NULL, 0,
9209
14
      NULL, HFILL
9210
14
    } },
9211
14
    { &hf_msg_mon_getversionreply_ver, {
9212
14
      "Version", "ceph.msg.mon.getversionreply.ver",
9213
14
      FT_UINT64, BASE_DEC, NULL, 0,
9214
14
      NULL, HFILL
9215
14
    } },
9216
14
    { &hf_msg_mon_getversionreply_veroldest, {
9217
14
      "Oldest Version", "ceph.msg.mon.getversionreply.veroldest",
9218
14
      FT_UINT64, BASE_DEC, NULL, 0,
9219
14
      NULL, HFILL
9220
14
    } },
9221
14
    { &hf_msg_mds_map, {
9222
14
      "OSD Map Message", "ceph.msg.osd_map",
9223
14
      FT_NONE, BASE_NONE, NULL, 0,
9224
14
      NULL, HFILL
9225
14
    } },
9226
14
    { &hf_msg_mds_map_fsid, {
9227
14
      "FSID", "ceph.msg.osd_map.fsid",
9228
14
      FT_GUID, BASE_NONE, NULL, 0,
9229
14
      NULL, HFILL
9230
14
    } },
9231
14
    { &hf_msg_mds_map_epoch, {
9232
14
      "Epoch", "ceph.msg.osd_map.epoch",
9233
14
      FT_UINT32, BASE_DEC, NULL, 0,
9234
14
      NULL, HFILL
9235
14
    } },
9236
14
    { &hf_msg_mds_map_datai, {
9237
14
      "OSD Map Data", "ceph.msg.osd_map.datai",
9238
14
      FT_NONE, BASE_NONE, NULL, 0,
9239
14
      NULL, HFILL
9240
14
    } },
9241
14
    { &hf_msg_mds_map_data, {
9242
14
      "Data", "ceph.msg.osd_map.data",
9243
14
      FT_BYTES, BASE_NONE, NULL, 0,
9244
14
      NULL, HFILL
9245
14
    } },
9246
14
    { &hf_msg_mds_map_data_size, {
9247
14
      "Size", "ceph.msg.osd_map.size",
9248
14
      FT_UINT32, BASE_DEC, NULL, 0,
9249
14
      NULL, HFILL
9250
14
    } },
9251
14
    { &hf_msg_client_sess, {
9252
14
      "Client Session", "ceph.msg.client_sess",
9253
14
      FT_NONE, BASE_NONE, NULL, 0,
9254
14
      NULL, HFILL
9255
14
    } },
9256
14
    { &hf_msg_client_sess_op, {
9257
14
      "Operation", "ceph.msg.client_sess.op",
9258
14
      FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_session_op_type_strings_ext, 0,
9259
14
      NULL, HFILL
9260
14
    } },
9261
14
    { &hf_msg_client_sess_seq, {
9262
14
      "Sequence Number", "ceph.msg.client_sess.seq",
9263
14
      FT_UINT64, BASE_DEC, NULL, 0,
9264
14
      NULL, HFILL
9265
14
    } },
9266
14
    { &hf_msg_client_sess_time, {
9267
14
      "Timestamp", "ceph.msg.client_sess.time",
9268
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9269
14
      NULL, HFILL
9270
14
    } },
9271
14
    { &hf_msg_client_sess_caps_max, {
9272
14
      "Maximum Capabilities", "ceph.msg.client_sess.caps_max",
9273
14
      FT_UINT32, BASE_DEC, NULL, 0,
9274
14
      NULL, HFILL
9275
14
    } },
9276
14
    { &hf_msg_client_sess_leases_max, {
9277
14
      "Maximum Leases", "ceph.msg.client_sess.leases_max",
9278
14
      FT_UINT32, BASE_DEC, NULL, 0,
9279
14
      NULL, HFILL
9280
14
    } },
9281
14
    { &hf_msg_client_req, {
9282
14
      "Client Request", "ceph.msg.client_req",
9283
14
      FT_NONE, BASE_NONE, NULL, 0,
9284
14
      NULL, HFILL
9285
14
    } },
9286
14
    { &hf_msg_client_req_oldest_tid, {
9287
14
      "Oldest TID", "ceph.msg.client_req.oldest_tid",
9288
14
      FT_UINT64, BASE_DEC, NULL, 0,
9289
14
      NULL, HFILL
9290
14
    } },
9291
14
    { &hf_msg_client_req_mdsmap_epoch, {
9292
14
      "MDS Map Epoch", "ceph.msg.client_req.mdsmap_epoch",
9293
14
      FT_UINT32, BASE_DEC, NULL, 0,
9294
14
      NULL, HFILL
9295
14
    } },
9296
14
    { &hf_msg_client_req_flags, {
9297
14
      "Flags", "ceph.msg.client_req.flags",
9298
14
      FT_UINT32, BASE_HEX, NULL, 0,
9299
14
      NULL, HFILL
9300
14
    } },
9301
14
    { &hf_msg_client_req_retry, {
9302
14
      "Number of Retries", "ceph.msg.client_req.retry",
9303
14
      FT_UINT8, BASE_DEC, NULL, 0,
9304
14
      NULL, HFILL
9305
14
    } },
9306
14
    { &hf_msg_client_req_forward, {
9307
14
      "Number of Forwards", "ceph.msg.client_req.forward",
9308
14
      FT_UINT8, BASE_DEC, NULL, 0,
9309
14
      NULL, HFILL
9310
14
    } },
9311
14
    { &hf_msg_client_req_releases, {
9312
14
      "Number of Releases", "ceph.msg.client_req.releases",
9313
14
      FT_UINT16, BASE_DEC, NULL, 0,
9314
14
      NULL, HFILL
9315
14
    } },
9316
14
    { &hf_msg_client_req_op, {
9317
14
      "Operation", "ceph.msg.client_req.op",
9318
14
      FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_mds_op_type_strings_ext, 0,
9319
14
      NULL, HFILL
9320
14
    } },
9321
14
    { &hf_msg_client_req_caller_uid, {
9322
14
      "Caller User ID", "ceph.msg.client_req.caller_uid",
9323
14
      FT_UINT32, BASE_DEC, NULL, 0,
9324
14
      NULL, HFILL
9325
14
    } },
9326
14
    { &hf_msg_client_req_caller_gid, {
9327
14
      "Caller Group ID", "ceph.msg.client_req.caller_gid",
9328
14
      FT_UINT32, BASE_DEC, NULL, 0,
9329
14
      NULL, HFILL
9330
14
    } },
9331
14
    { &hf_msg_client_req_inode, {
9332
14
      "Inode", "ceph.msg.client_req.inode",
9333
14
      FT_UINT64, BASE_DEC, NULL, 0,
9334
14
      NULL, HFILL
9335
14
    } },
9336
14
    { &hf_msg_client_req_path_src, {
9337
14
      "Path", "ceph.msg.client_req.path_src",
9338
14
      FT_NONE, BASE_NONE, NULL, 0,
9339
14
      NULL, HFILL
9340
14
    } },
9341
14
    { &hf_msg_client_req_path_dst, {
9342
14
      "Second Path", "ceph.msg.client_req.path_dst",
9343
14
      FT_NONE, BASE_NONE, NULL, 0,
9344
14
      NULL, HFILL
9345
14
    } },
9346
14
    { &hf_msg_client_req_release, {
9347
14
      "Release", "ceph.msg.client_req.release",
9348
14
      FT_NONE, BASE_NONE, NULL, 0,
9349
14
      NULL, HFILL
9350
14
    } },
9351
14
    { &hf_msg_client_req_time, {
9352
14
      "Timestamp", "ceph.msg.client_req.time",
9353
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9354
14
      NULL, HFILL
9355
14
    } },
9356
14
    { &hf_msg_client_reqfwd, {
9357
14
      "Client Request Forward", "ceph.msg.client_reqfwd",
9358
14
      FT_NONE, BASE_NONE, NULL, 0,
9359
14
      NULL, HFILL
9360
14
    } },
9361
14
    { &hf_msg_client_reqfwd_dst, {
9362
14
      "Destination MDS", "ceph.msg.client_reqfwd.dst",
9363
14
      FT_UINT32, BASE_DEC, NULL, 0,
9364
14
      NULL, HFILL
9365
14
    } },
9366
14
    { &hf_msg_client_reqfwd_fwd, {
9367
14
      "Number of Forwards", "ceph.msg.client_reqfwd.fwd",
9368
14
      FT_UINT32, BASE_DEC, NULL, 0,
9369
14
      NULL, HFILL
9370
14
    } },
9371
14
    { &hf_msg_client_reqfwd_resend, {
9372
14
      "Resend", "ceph.msg.client_reqfwd.resend",
9373
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
9374
14
      "Does the client have to resend the request?", HFILL
9375
14
    } },
9376
14
    { &hf_msg_client_reply, {
9377
14
      "Client Reply", "ceph.msg.client_reply",
9378
14
      FT_NONE, BASE_NONE, NULL, 0,
9379
14
      NULL, HFILL
9380
14
    } },
9381
14
    { &hf_msg_client_reply_op, {
9382
14
      "Operation", "ceph.msg.client_reply.op",
9383
14
      FT_UINT32, BASE_DEC|BASE_EXT_STRING, &c_mds_op_type_strings_ext, 0,
9384
14
      NULL, HFILL
9385
14
    } },
9386
14
    { &hf_msg_client_reply_result, {
9387
14
      "Result", "ceph.msg.client_reply.result",
9388
14
      FT_UINT32, BASE_DEC, NULL, 0,
9389
14
      NULL, HFILL
9390
14
    } },
9391
14
    { &hf_msg_client_reply_mdsmap_epoch, {
9392
14
      "MDS Map Epoch", "ceph.msg.client_reply.mdsmap_epoch",
9393
14
      FT_UINT32, BASE_DEC, NULL, 0,
9394
14
      NULL, HFILL
9395
14
    } },
9396
14
    { &hf_msg_client_reply_isdentry, {
9397
14
      "Is Dentry", "ceph.msg.client_reply.isdentry",
9398
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
9399
14
      NULL, HFILL
9400
14
    } },
9401
14
    { &hf_msg_client_reply_istarget, {
9402
14
      "Is Target", "ceph.msg.client_reply.istarget",
9403
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
9404
14
      NULL, HFILL
9405
14
    } },
9406
14
    { &hf_msg_client_reply_trace, {
9407
14
      "Trace", "ceph.msg.client_reply.trace",
9408
14
      FT_NONE, BASE_NONE, NULL, 0,
9409
14
      NULL, HFILL
9410
14
    } },
9411
14
    { &hf_msg_client_reply_extra, {
9412
14
      "Extra", "ceph.msg.client_reply.extra",
9413
14
      FT_NONE, BASE_NONE, NULL, 0,
9414
14
      NULL, HFILL
9415
14
    } },
9416
14
    { &hf_msg_client_reply_snaps, {
9417
14
      "Snapshots", "ceph.msg.client_reply.snaps",
9418
14
      FT_NONE, BASE_NONE, NULL, 0,
9419
14
      NULL, HFILL
9420
14
    } },
9421
14
    { &hf_msg_client_reply_safe, {
9422
14
      "Committed to Permanent Storage", "ceph.msg.client_reply.safe",
9423
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
9424
14
      NULL, HFILL
9425
14
    } },
9426
14
    { &hf_msg_osd_map, {
9427
14
      "OSD Map Message", "ceph.msg.osd_map",
9428
14
      FT_NONE, BASE_NONE, NULL, 0,
9429
14
      NULL, HFILL
9430
14
    } },
9431
14
    { &hf_msg_osd_map_fsid, {
9432
14
      "FSID", "ceph.msg.osd_map.fsid",
9433
14
      FT_GUID, BASE_NONE, NULL, 0,
9434
14
      NULL, HFILL
9435
14
    } },
9436
14
    { &hf_msg_osd_map_inc, {
9437
14
      "Incremental Map", "ceph.msg.osd_map.inc",
9438
14
      FT_NONE, BASE_NONE, NULL, 0,
9439
14
      NULL, HFILL
9440
14
    } },
9441
14
    { &hf_msg_osd_map_inc_len, {
9442
14
      "Incremental Map Count", "ceph.msg.osd_map.inc_len",
9443
14
      FT_UINT32, BASE_DEC, NULL, 0,
9444
14
      NULL, HFILL
9445
14
    } },
9446
14
    { &hf_msg_osd_map_map, {
9447
14
      "Map", "ceph.msg.osd_map.map",
9448
14
      FT_NONE, BASE_NONE, NULL, 0,
9449
14
      NULL, HFILL
9450
14
    } },
9451
14
    { &hf_msg_osd_map_map_len, {
9452
14
      "Map Count", "ceph.msg.osd_map.map_size",
9453
14
      FT_UINT32, BASE_DEC, NULL, 0,
9454
14
      NULL, HFILL
9455
14
    } },
9456
14
    { &hf_msg_osd_map_epoch, {
9457
14
      "Epoch", "ceph.msg.osd_map.epoch",
9458
14
      FT_UINT32, BASE_DEC, NULL, 0,
9459
14
      NULL, HFILL
9460
14
    } },
9461
14
    { &hf_msg_osd_map_oldest, {
9462
14
      "Oldest Map", "ceph.msg.osd_map.oldest",
9463
14
      FT_UINT32, BASE_DEC, NULL, 0,
9464
14
      NULL, HFILL
9465
14
    } },
9466
14
    { &hf_msg_osd_map_newest, {
9467
14
      "Newest Map", "ceph.msg.osd_map.newest",
9468
14
      FT_UINT32, BASE_DEC, NULL, 0,
9469
14
      NULL, HFILL
9470
14
    } },
9471
14
    { &hf_msg_osd_op, {
9472
14
      "OSD Operation", "ceph.msg.osd_op",
9473
14
      FT_NONE, BASE_NONE, NULL, 0,
9474
14
      NULL, HFILL
9475
14
    } },
9476
14
    { &hf_msg_osd_op_client_inc, {
9477
14
      "Client Inc", "ceph.msg.osd_op.client_inc",
9478
14
      FT_UINT32, BASE_DEC, NULL, 0,
9479
14
      NULL, HFILL
9480
14
    } },
9481
14
    { &hf_msg_osd_op_osdmap_epoch, {
9482
14
      "OSD Map Epoch", "ceph.msg.osd_op.osdmap_epoch",
9483
14
      FT_UINT32, BASE_DEC, NULL, 0,
9484
14
      NULL, HFILL
9485
14
    } },
9486
14
    { &hf_msg_osd_op_mtime, {
9487
14
      "Modification Time", "ceph.msg.osd_op.mtime",
9488
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9489
14
      NULL, HFILL
9490
14
    } },
9491
14
    { &hf_msg_osd_op_reassert_version, {
9492
14
      "Reassert Version", "ceph.msg.osd_op.reassert_version",
9493
14
      FT_NONE, BASE_NONE, NULL, 0,
9494
14
      NULL, HFILL
9495
14
    } },
9496
14
    { &hf_msg_osd_op_oloc, {
9497
14
      "Object Locater", "ceph.msg.osd_op.oloc",
9498
14
      FT_NONE, BASE_NONE, NULL, 0,
9499
14
      NULL, HFILL
9500
14
    } },
9501
14
    { &hf_msg_osd_op_pgid, {
9502
14
      "Placement Group ID", "ceph.msg.osd_op.pgid",
9503
14
      FT_NONE, BASE_NONE, NULL, 0,
9504
14
      NULL, HFILL
9505
14
    } },
9506
14
    { &hf_msg_osd_op_oid, {
9507
14
      "Object ID", "ceph.msg.osd_op.oid",
9508
14
      FT_STRING, BASE_NONE, NULL, 0,
9509
14
      NULL, HFILL
9510
14
    } },
9511
14
    { &hf_msg_osd_op_ops_len, {
9512
14
      "Operation Count", "ceph.msg.osd_op.ops_len",
9513
14
      FT_UINT16, BASE_DEC, NULL, 0,
9514
14
      NULL, HFILL
9515
14
    } },
9516
14
    { &hf_msg_osd_op_op, {
9517
14
      "Operation", "ceph.msg.osd_op.op",
9518
14
      FT_NONE, BASE_NONE, NULL, 0,
9519
14
      NULL, HFILL
9520
14
    } },
9521
14
    { &hf_msg_osd_op_snap_id, {
9522
14
      "Snapshot ID", "ceph.msg.osd_op.snap_id",
9523
14
      FT_UINT64, BASE_DEC, NULL, 0,
9524
14
      NULL, HFILL
9525
14
    } },
9526
14
    { &hf_msg_osd_op_snap_seq, {
9527
14
      "Snapshot Sequence", "ceph.msg.osd_op.snap_seq",
9528
14
      FT_UINT64, BASE_DEC, NULL, 0,
9529
14
      NULL, HFILL
9530
14
    } },
9531
14
    { &hf_msg_osd_op_snaps_len, {
9532
14
      "Snapshot Count", "ceph.msg.osd_op.snaps_len",
9533
14
      FT_UINT32, BASE_DEC, NULL, 0,
9534
14
      NULL, HFILL
9535
14
    } },
9536
14
    { &hf_msg_osd_op_snap, {
9537
14
      "Snapshot", "ceph.msg.osd_op.snaps",
9538
14
      FT_UINT64, BASE_DEC, NULL, 0,
9539
14
      NULL, HFILL
9540
14
    } },
9541
14
    { &hf_msg_osd_op_retry_attempt, {
9542
14
      "Retry Attempt", "ceph.msg.osd_op.retry",
9543
14
      FT_INT32, BASE_DEC, NULL, 0,
9544
14
      NULL, HFILL
9545
14
    } },
9546
14
    { &hf_msg_osd_op_payload, {
9547
14
      "Operation Payload", "ceph.msg.osd_op.op_payload",
9548
14
      FT_BYTES, BASE_NONE, NULL, 0,
9549
14
      NULL, HFILL
9550
14
    } },
9551
14
    { &hf_msg_osd_opreply, {
9552
14
      "OSD Operation Reply", "ceph.msg.osd_opreply",
9553
14
      FT_NONE, BASE_NONE, NULL, 0,
9554
14
      NULL, HFILL
9555
14
    } },
9556
14
    { &hf_msg_osd_opreply_oid, {
9557
14
      "Object ID", "ceph.msg.osd_opreply.oid",
9558
14
      FT_STRING, BASE_NONE, NULL, 0,
9559
14
      NULL, HFILL
9560
14
    } },
9561
14
    { &hf_msg_osd_opreply_pgid, {
9562
14
      "Placement Group ID", "ceph.msg.osd_opreply.pgid",
9563
14
      FT_NONE, BASE_NONE, NULL, 0,
9564
14
      NULL, HFILL
9565
14
    } },
9566
14
    { &hf_msg_osd_opreply_result, {
9567
14
      "Result", "ceph.msg.osd_opreply.result",
9568
14
      FT_INT32, BASE_DEC, NULL, 0,
9569
14
      NULL, HFILL
9570
14
    } },
9571
14
    { &hf_msg_osd_opreply_bad_replay_ver, {
9572
14
      "Bad Replay Version", "ceph.msg.osd_opreply.bad_replay_ver",
9573
14
      FT_NONE, BASE_NONE, NULL, 0,
9574
14
      NULL, HFILL
9575
14
    } },
9576
14
    { &hf_msg_osd_opreply_replay_ver, {
9577
14
      "Replay Version", "ceph.msg.osd_opreply.replay_ver",
9578
14
      FT_NONE, BASE_NONE, NULL, 0,
9579
14
      NULL, HFILL
9580
14
    } },
9581
14
    { &hf_msg_osd_opreply_user_ver, {
9582
14
      "User Version", "ceph.msg.osd_opreply.user_ver",
9583
14
      FT_UINT64, BASE_DEC, NULL, 0,
9584
14
      NULL, HFILL
9585
14
    } },
9586
14
    { &hf_msg_osd_opreply_redirect, {
9587
14
      "Redirect", "ceph.msg.osd_opreply.redirect",
9588
14
      FT_NONE, BASE_NONE, NULL, 0,
9589
14
      NULL, HFILL
9590
14
    } },
9591
14
    { &hf_msg_osd_opreply_osdmap_epoch, {
9592
14
      "OSD Map Epoch", "ceph.msg.osd_opreply.osdmap_epoch",
9593
14
      FT_UINT32, BASE_DEC, NULL, 0,
9594
14
      NULL, HFILL
9595
14
    } },
9596
14
    { &hf_msg_osd_opreply_ops_len, {
9597
14
      "Operation Count", "ceph.msg.osd_opreply.ops_len",
9598
14
      FT_UINT32, BASE_DEC, NULL, 0,
9599
14
      NULL, HFILL
9600
14
    } },
9601
14
    { &hf_msg_osd_opreply_op, {
9602
14
      "Operation", "ceph.msg.osd_opreply.op",
9603
14
      FT_NONE, BASE_NONE, NULL, 0,
9604
14
      NULL, HFILL
9605
14
    } },
9606
14
    { &hf_msg_osd_opreply_retry_attempt, {
9607
14
      "Retry Attempt", "ceph.msg.osd_opreply.retry",
9608
14
      FT_INT32, BASE_DEC, NULL, 0,
9609
14
      NULL, HFILL
9610
14
    } },
9611
14
    { &hf_msg_osd_opreply_rval, {
9612
14
      "Operation Return Value", "ceph.msg.osd_opreply.rval",
9613
14
      FT_INT32, BASE_DEC, NULL, 0,
9614
14
      NULL, HFILL
9615
14
    } },
9616
14
    { &hf_msg_osd_opreply_payload, {
9617
14
      "Operation Result", "ceph.msg.osd_opreply.payload",
9618
14
      FT_BYTES, BASE_NONE, NULL, 0,
9619
14
      NULL, HFILL
9620
14
    } },
9621
14
    { &hf_msg_poolopreply, {
9622
14
      "Pool Operation", "ceph.msg.poolopreply",
9623
14
      FT_NONE, BASE_NONE, NULL, 0,
9624
14
      NULL, HFILL
9625
14
    } },
9626
14
    { &hf_msg_poolopreply_fsid, {
9627
14
      "FSID", "ceph.msg.poolopreply.fsid",
9628
14
      FT_GUID, BASE_NONE, NULL, 0,
9629
14
      NULL, HFILL
9630
14
    } },
9631
14
    { &hf_msg_poolopreply_code, {
9632
14
      "Response Code", "ceph.msg.poolopreply.code",
9633
14
      FT_UINT32, BASE_DEC, NULL, 0,
9634
14
      NULL, HFILL
9635
14
    } },
9636
14
    { &hf_msg_poolopreply_epoch, {
9637
14
      "Epoch", "ceph.msg.poolopreply.epoch",
9638
14
      FT_UINT32, BASE_DEC, NULL, 0,
9639
14
      NULL, HFILL
9640
14
    } },
9641
14
    { &hf_msg_poolopreply_datai, {
9642
14
      "Data", "ceph.msg.poolopreply.datai",
9643
14
      FT_UINT32, BASE_DEC, NULL, 0,
9644
14
      NULL, HFILL
9645
14
    } },
9646
14
    { &hf_msg_poolopreply_data, {
9647
14
      "Data", "ceph.msg.poolopreply.data",
9648
14
      FT_BYTES, BASE_NONE, NULL, 0,
9649
14
      NULL, HFILL
9650
14
    } },
9651
14
    { &hf_msg_poolopreply_data_size, {
9652
14
      "Size", "ceph.msg.poolopreply.data_size",
9653
14
      FT_UINT32, BASE_DEC, NULL, 0,
9654
14
      NULL, HFILL
9655
14
    } },
9656
14
    { &hf_msg_poolop, {
9657
14
      "Pool Operation", "ceph.msg.poolop",
9658
14
      FT_NONE, BASE_NONE, NULL, 0,
9659
14
      NULL, HFILL
9660
14
    } },
9661
14
    { &hf_msg_poolop_fsid, {
9662
14
      "FSID", "ceph.msg.poolop.fsid",
9663
14
      FT_GUID, BASE_NONE, NULL, 0,
9664
14
      NULL, HFILL
9665
14
    } },
9666
14
    { &hf_msg_poolop_pool, {
9667
14
      "Pool", "ceph.msg.poolop.pool",
9668
14
      FT_UINT32, BASE_DEC, NULL, 0,
9669
14
      NULL, HFILL
9670
14
    } },
9671
14
    { &hf_msg_poolop_type, {
9672
14
      "Type", "ceph.msg.poolop.type",
9673
14
      FT_UINT32, BASE_HEX, VALS(c_poolop_type_strings), 0,
9674
14
      NULL, HFILL
9675
14
    } },
9676
14
    { &hf_msg_poolop_auid, {
9677
14
      "AUID", "ceph.msg.poolop.auid",
9678
14
      FT_UINT64, BASE_DEC, NULL, 0,
9679
14
      NULL, HFILL
9680
14
    } },
9681
14
    { &hf_msg_poolop_snapid, {
9682
14
      "Snapshot ID", "ceph.msg.poolop.snap",
9683
14
      FT_UINT64, BASE_DEC, NULL, 0,
9684
14
      NULL, HFILL
9685
14
    } },
9686
14
    { &hf_msg_poolop_name, {
9687
14
      "Name", "ceph.msg.poolop.name",
9688
14
      FT_STRING, BASE_NONE, NULL, 0,
9689
14
      NULL, HFILL
9690
14
    } },
9691
14
    { &hf_msg_poolop_crush_rule, {
9692
14
      "Crush Rule", "ceph.msg.poolop.crush_rule",
9693
14
      FT_UINT16, BASE_DEC, NULL, 0,
9694
14
      NULL, HFILL
9695
14
    } },
9696
14
    { &hf_msg_poolop_crush_rule8, {
9697
14
      "Crush Rule", "ceph.msg.poolop.crush_rule",
9698
14
      FT_UINT8, BASE_DEC, NULL, 0,
9699
14
      NULL, HFILL
9700
14
    } },
9701
14
    { &hf_msg_mon_cmd, {
9702
14
      "Mon Command", "ceph.msg.mon_cmd",
9703
14
      FT_NONE, BASE_NONE, NULL, 0,
9704
14
      NULL, HFILL
9705
14
    } },
9706
14
    { &hf_msg_mon_cmd_fsid, {
9707
14
      "FSID", "ceph.msg.mon_cmd.fsid",
9708
14
      FT_GUID, BASE_NONE, NULL, 0,
9709
14
      NULL, HFILL
9710
14
    } },
9711
14
    { &hf_msg_mon_cmd_arg, {
9712
14
      "Argument", "ceph.msg.mon_cmd.arg",
9713
14
      FT_NONE, BASE_NONE, NULL, 0,
9714
14
      NULL, HFILL
9715
14
    } },
9716
14
    { &hf_msg_mon_cmd_arg_len, {
9717
14
      "Argument Count", "ceph.msg.mon_cmd.arg_len",
9718
14
      FT_UINT32, BASE_DEC, NULL, 0,
9719
14
      NULL, HFILL
9720
14
    } },
9721
14
    { &hf_msg_mon_cmd_str, {
9722
14
      "String", "ceph.msg.mon_cmd.str",
9723
14
      FT_STRING, BASE_NONE, NULL, 0,
9724
14
      NULL, HFILL
9725
14
    } },
9726
14
    { &hf_msg_mon_cmd_ack, {
9727
14
      "Mon Command Result", "ceph.msg.mon_cmd_ack",
9728
14
      FT_NONE, BASE_NONE, NULL, 0,
9729
14
      NULL, HFILL
9730
14
    } },
9731
14
    { &hf_msg_mon_cmd_ack_code, {
9732
14
      "Result Code", "ceph.msg.mon_cmd_ack.code",
9733
14
      FT_INT32, BASE_DEC, NULL, 0,
9734
14
      NULL, HFILL
9735
14
    } },
9736
14
    { &hf_msg_mon_cmd_ack_res, {
9737
14
      "Result String", "ceph.msg.mon_cmd_ack.result",
9738
14
      FT_STRING, BASE_NONE, NULL, 0,
9739
14
      NULL, HFILL
9740
14
    } },
9741
14
    { &hf_msg_mon_cmd_ack_arg, {
9742
14
      "Argument", "ceph.msg.mon_cmd_ack.arg",
9743
14
      FT_NONE, BASE_NONE, NULL, 0,
9744
14
      NULL, HFILL
9745
14
    } },
9746
14
    { &hf_msg_mon_cmd_ack_arg_len, {
9747
14
      "Argument Count", "ceph.msg.mon_cmd_ack.arg_len",
9748
14
      FT_UINT32, BASE_DEC, NULL, 0,
9749
14
      NULL, HFILL
9750
14
    } },
9751
14
    { &hf_msg_mon_cmd_ack_arg_str, {
9752
14
      "String", "ceph.msg.mon_cmd_ack.str",
9753
14
      FT_STRING, BASE_NONE, NULL, 0,
9754
14
      NULL, HFILL
9755
14
    } },
9756
14
    { &hf_msg_mon_cmd_ack_data, {
9757
14
      "Data", "ceph.msg.mon_cmd_ack.data",
9758
14
      FT_STRING, BASE_NONE, NULL, 0,
9759
14
      NULL, HFILL
9760
14
    } },
9761
14
    { &hf_msg_poolstats, {
9762
14
      "Pool Stats", "ceph.msg.poolstats",
9763
14
      FT_NONE, BASE_NONE, NULL, 0,
9764
14
      NULL, HFILL
9765
14
    } },
9766
14
    { &hf_msg_poolstats_fsid, {
9767
14
      "FSID", "ceph.msg.poolstats.fsid",
9768
14
      FT_GUID, BASE_NONE, NULL, 0,
9769
14
      NULL, HFILL
9770
14
    } },
9771
14
    { &hf_msg_poolstats_pool, {
9772
14
      "Pool", "ceph.msg.poolstats.pool",
9773
14
      FT_STRING, BASE_NONE, NULL, 0,
9774
14
      NULL, HFILL
9775
14
    } },
9776
14
    { &hf_msg_poolstatsreply, {
9777
14
      "Pool Stats", "ceph.msg.poolstatsreply",
9778
14
      FT_NONE, BASE_NONE, NULL, 0,
9779
14
      NULL, HFILL
9780
14
    } },
9781
14
    { &hf_msg_poolstatsreply_fsid, {
9782
14
      "FSID", "ceph.msg.poolstatsreply.fsid",
9783
14
      FT_GUID, BASE_NONE, NULL, 0,
9784
14
      NULL, HFILL
9785
14
    } },
9786
14
    { &hf_msg_poolstatsreply_stat, {
9787
14
      "Stats", "ceph.msg.poolstatsreply.pool.stat",
9788
14
      FT_NONE, BASE_NONE, NULL, 0,
9789
14
      NULL, HFILL
9790
14
    } },
9791
14
    { &hf_msg_poolstatsreply_pool, {
9792
14
      "Pool", "ceph.msg.poolstatsreply.pool",
9793
14
      FT_STRING, BASE_NONE, NULL, 0,
9794
14
      NULL, HFILL
9795
14
    } },
9796
14
    { &hf_msg_poolstatsreply_log_size, {
9797
14
      "Log Size", "ceph.msg.poolstatsreply.log_size",
9798
14
      FT_INT64, BASE_DEC, NULL, 0,
9799
14
      NULL, HFILL
9800
14
    } },
9801
14
    { &hf_msg_poolstatsreply_log_size_ondisk, {
9802
14
      "On-Disk Log Size", "ceph.msg.poolstatsreply.log_size_ondisk",
9803
14
      FT_INT64, BASE_DEC, NULL, 0,
9804
14
      NULL, HFILL
9805
14
    } },
9806
14
    { &hf_msg_mon_globalid_max, {
9807
14
      "Old Max ID", "ceph.msg.mon.globalid.max",
9808
14
      FT_UINT64, BASE_HEX, NULL, 0,
9809
14
      NULL, HFILL
9810
14
    } },
9811
14
    { &hf_msg_mon_election, {
9812
14
      "Monitor Election", "ceph.msg.mon_election",
9813
14
      FT_NONE, BASE_NONE, NULL, 0,
9814
14
      NULL, HFILL
9815
14
    } },
9816
14
    { &hf_msg_mon_election_fsid, {
9817
14
      "FSID", "ceph.msg.mon_election.fsid",
9818
14
      FT_GUID, BASE_NONE, NULL, 0,
9819
14
      NULL, HFILL
9820
14
    } },
9821
14
    { &hf_msg_mon_election_op, {
9822
14
      "Type", "ceph.msg.mon_election.op",
9823
14
      FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_election_type_strings_ext, 0,
9824
14
      NULL, HFILL
9825
14
    } },
9826
14
    { &hf_msg_mon_election_epoch, {
9827
14
      "Epoch", "ceph.msg.mon_election.epoch",
9828
14
      FT_UINT32, BASE_DEC, NULL, 0,
9829
14
      NULL, HFILL
9830
14
    } },
9831
14
    { &hf_msg_mon_election_quorum, {
9832
14
      "Quorum", "ceph.msg.mon_election.quorum",
9833
14
      FT_INT64, BASE_DEC, NULL, 0,
9834
14
      NULL, HFILL
9835
14
    } },
9836
14
    { &hf_msg_mon_election_quorum_features, {
9837
14
      "Epoch", "ceph.msg.mon_election.quorum_features",
9838
14
      FT_UINT64, BASE_HEX, NULL, 0,
9839
14
      NULL, HFILL
9840
14
    } },
9841
14
    { &hf_msg_mon_election_defunct_one, {
9842
14
      "Defunct One", "ceph.msg.mon_election.defunct_one",
9843
14
      FT_UINT64, BASE_DEC, NULL, 0,
9844
14
      NULL, HFILL
9845
14
    } },
9846
14
    { &hf_msg_mon_election_defunct_two, {
9847
14
      "Defunct Two", "ceph.msg.mon_election.defunct_two",
9848
14
      FT_UINT64, BASE_DEC, NULL, 0,
9849
14
      NULL, HFILL
9850
14
    } },
9851
14
    { &hf_msg_mon_election_sharing, {
9852
14
      "Sharing", "ceph.msg.mon_election.sharing",
9853
14
      FT_NONE, BASE_NONE, NULL, 0,
9854
14
      NULL, HFILL
9855
14
    } },
9856
14
    { &hf_msg_mon_election_sharing_data, {
9857
14
      "Data", "ceph.msg.mon_election.sharing_data",
9858
14
      FT_BYTES, BASE_NONE, NULL, 0,
9859
14
      NULL, HFILL
9860
14
    } },
9861
14
    { &hf_msg_mon_election_sharing_size, {
9862
14
      "Size", "ceph.msg.mon_election.sharing_size",
9863
14
      FT_UINT32, BASE_DEC, NULL, 0,
9864
14
      NULL, HFILL
9865
14
    } },
9866
14
    { &hf_msg_mon_paxos, {
9867
14
      "Paxos", "ceph.msg.mon_paxos",
9868
14
      FT_NONE, BASE_NONE, NULL, 0,
9869
14
      NULL, HFILL
9870
14
    } },
9871
14
    { &hf_msg_mon_paxos_epoch, {
9872
14
      "Epoch", "ceph.msg.mon_paxos.epoch",
9873
14
      FT_UINT32, BASE_DEC, NULL, 0,
9874
14
      NULL, HFILL
9875
14
    } },
9876
14
    { &hf_msg_mon_paxos_op, {
9877
14
      "Op", "ceph.msg.mon_paxos.op",
9878
14
      FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_paxos_op_strings_ext, 0,
9879
14
      NULL, HFILL
9880
14
    } },
9881
14
    { &hf_msg_mon_paxos_first, {
9882
14
      "First Committed", "ceph.msg.mon_paxos.first",
9883
14
      FT_UINT64, BASE_DEC, NULL, 0,
9884
14
      NULL, HFILL
9885
14
    } },
9886
14
    { &hf_msg_mon_paxos_last, {
9887
14
      "Last Committed", "ceph.msg.mon_paxos.last",
9888
14
      FT_UINT64, BASE_DEC, NULL, 0,
9889
14
      NULL, HFILL
9890
14
    } },
9891
14
    { &hf_msg_mon_paxos_pnfrom, {
9892
14
      "Greatest Seen Proposal Number", "ceph.msg.mon_paxos.pnfrom",
9893
14
      FT_UINT64, BASE_DEC, NULL, 0,
9894
14
      NULL, HFILL
9895
14
    } },
9896
14
    { &hf_msg_mon_paxos_pn, {
9897
14
      "Proposal Number", "ceph.msg.mon_paxos.pn",
9898
14
      FT_UINT64, BASE_DEC, NULL, 0,
9899
14
      NULL, HFILL
9900
14
    } },
9901
14
    { &hf_msg_mon_paxos_pnuncommitted, {
9902
14
      "Previous Proposal Number", "ceph.msg.mon_paxos.pnuncommitted",
9903
14
      FT_UINT64, BASE_DEC, NULL, 0,
9904
14
      NULL, HFILL
9905
14
    } },
9906
14
    { &hf_msg_mon_paxos_lease, {
9907
14
      "Lease Timestamp", "ceph.msg.mon_paxos.lease",
9908
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9909
14
      NULL, HFILL
9910
14
    } },
9911
14
    { &hf_msg_mon_paxos_sent, {
9912
14
      "Sent Timestamp", "ceph.msg.mon_paxos.sent",
9913
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
9914
14
      NULL, HFILL
9915
14
    } },
9916
14
    { &hf_msg_mon_paxos_latest_ver, {
9917
14
      "Latest Version", "ceph.msg.mon_paxos.latest_ver",
9918
14
      FT_UINT64, BASE_DEC, NULL, 0,
9919
14
      NULL, HFILL
9920
14
    } },
9921
14
    { &hf_msg_mon_paxos_latest_val, {
9922
14
      "Latest Value", "ceph.msg.mon_paxos.latest_val",
9923
14
      FT_NONE, BASE_NONE, NULL, 0,
9924
14
      NULL, HFILL
9925
14
    } },
9926
14
    { &hf_msg_mon_paxos_latest_val_data, {
9927
14
      "Data", "ceph.msg.mon_paxos.latest_val.data",
9928
14
      FT_BYTES, BASE_NONE, NULL, 0,
9929
14
      NULL, HFILL
9930
14
    } },
9931
14
    { &hf_msg_mon_paxos_latest_val_size, {
9932
14
      "Size", "ceph.msg.mon_paxos.latest_val.size",
9933
14
      FT_UINT32, BASE_DEC, NULL, 0,
9934
14
      NULL, HFILL
9935
14
    } },
9936
14
    { &hf_msg_mon_paxos_value, {
9937
14
      "Proposal", "ceph.msg.mon_paxos.value",
9938
14
      FT_NONE, BASE_NONE, NULL, 0,
9939
14
      NULL, HFILL
9940
14
    } },
9941
14
    { &hf_msg_mon_paxos_ver, {
9942
14
      "Version", "ceph.msg.mon_paxos.ver",
9943
14
      FT_UINT64, BASE_DEC, NULL, 0,
9944
14
      NULL, HFILL
9945
14
    } },
9946
14
    { &hf_msg_mon_paxos_val, {
9947
14
      "Value", "ceph.msg.mon_paxos.val",
9948
14
      FT_NONE, BASE_NONE, NULL, 0,
9949
14
      NULL, HFILL
9950
14
    } },
9951
14
    { &hf_msg_mon_paxos_val_data, {
9952
14
      "Data", "ceph.msg.mon_paxos.val.data",
9953
14
      FT_BYTES, BASE_NONE, NULL, 0,
9954
14
      NULL, HFILL
9955
14
    } },
9956
14
    { &hf_msg_mon_paxos_val_size, {
9957
14
      "Size", "ceph.msg.mon_paxos.val.size",
9958
14
      FT_UINT32, BASE_DEC, NULL, 0,
9959
14
      NULL, HFILL
9960
14
    } },
9961
14
    { &hf_msg_mon_probe, {
9962
14
      "Monitor Probe", "ceph.msg.mon_probe",
9963
14
      FT_NONE, BASE_NONE, NULL, 0,
9964
14
      NULL, HFILL
9965
14
    } },
9966
14
    { &hf_msg_mon_probe_fsid, {
9967
14
      "FSID", "ceph.msg.mon_probe.fsid",
9968
14
      FT_GUID, BASE_NONE, NULL, 0,
9969
14
      NULL, HFILL
9970
14
    } },
9971
14
    { &hf_msg_mon_probe_type, {
9972
14
      "Type", "ceph.msg.mon_probe.type",
9973
14
      FT_INT32, BASE_DEC|BASE_EXT_STRING, &c_mon_probe_type_strings_ext, 0,
9974
14
      NULL, HFILL
9975
14
    } },
9976
14
    { &hf_msg_mon_probe_name, {
9977
14
      "Name", "ceph.msg.mon_probe.name",
9978
14
      FT_STRING, BASE_NONE, NULL, 0,
9979
14
      NULL, HFILL
9980
14
    } },
9981
14
    { &hf_msg_mon_probe_quorum, {
9982
14
      "Quorum", "ceph.msg.mon_probe.quorum",
9983
14
      FT_INT32, BASE_DEC, NULL, 0,
9984
14
      NULL, HFILL
9985
14
    } },
9986
14
    { &hf_msg_mon_probe_paxos_first_ver, {
9987
14
      "Paxos First Version", "ceph.msg.mon_probe.paxos_first_ver",
9988
14
      FT_UINT64, BASE_DEC, NULL, 0,
9989
14
      NULL, HFILL
9990
14
    } },
9991
14
    { &hf_msg_mon_probe_paxos_last_ver, {
9992
14
      "Paxos Last Version", "ceph.msg.mon_probe.paxos_last_ver",
9993
14
      FT_UINT64, BASE_DEC, NULL, 0,
9994
14
      NULL, HFILL
9995
14
    } },
9996
14
    { &hf_msg_mon_probe_ever_joined, {
9997
14
      "Has Ever Joined?", "ceph.msg.mon_probe.has_ever_joined",
9998
14
      FT_BOOLEAN, BASE_NONE, NULL, 0,
9999
14
      NULL, HFILL
10000
14
    } },
10001
14
    { &hf_msg_mon_probe_req_features, {
10002
14
      "Required Features", "ceph.msg.mon_probe.required_features",
10003
14
      FT_UINT64, BASE_HEX, NULL, 0,
10004
14
      NULL, HFILL
10005
14
    } },
10006
14
    { &hf_msg_osd_ping, {
10007
14
      "OSD Ping", "ceph.msg.osd.ping",
10008
14
      FT_NONE, BASE_NONE, NULL, 0,
10009
14
      NULL, HFILL
10010
14
    } },
10011
14
    { &hf_msg_osd_ping_fsid, {
10012
14
      "FSID", "ceph.msg.osd.ping.fsid",
10013
14
      FT_GUID, BASE_NONE, NULL, 0,
10014
14
      NULL, HFILL
10015
14
    } },
10016
14
    { &hf_msg_osd_ping_mapepoch, {
10017
14
      "OSD Map Epoch", "ceph.msg.osd.ping.mapepoch",
10018
14
      FT_UINT32, BASE_DEC, NULL, 0,
10019
14
      NULL, HFILL
10020
14
    } },
10021
14
    { &hf_msg_osd_ping_peerepoch, {
10022
14
      "Peer as of Epoch", "ceph.msg.osd.ping.peerepoch",
10023
14
      FT_UINT32, BASE_DEC, NULL, 0,
10024
14
      NULL, HFILL
10025
14
    } },
10026
14
    { &hf_msg_osd_ping_op, {
10027
14
      "Operation", "ceph.msg.osd.ping.op",
10028
14
      FT_UINT8, BASE_HEX|BASE_EXT_STRING, &c_osd_ping_op_strings_ext, 0,
10029
14
      NULL, HFILL
10030
14
    } },
10031
14
    { &hf_msg_osd_ping_time, {
10032
14
      "Timestamp", "ceph.msg.osd.ping.time",
10033
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10034
14
      NULL, HFILL
10035
14
    } },
10036
14
    { &hf_msg_osd_boot, {
10037
14
      "OSD Boot", "ceph.msg.osd_boot",
10038
14
      FT_NONE, BASE_NONE, NULL, 0,
10039
14
      NULL, HFILL
10040
14
    } },
10041
14
    { &hf_msg_osd_boot_addr_back, {
10042
14
      "Back Address", "ceph.msg.osd_boot.addr.back",
10043
14
      FT_NONE, BASE_NONE, NULL, 0,
10044
14
      NULL, HFILL
10045
14
    } },
10046
14
    { &hf_msg_osd_boot_addr_cluster, {
10047
14
      "Cluster Address", "ceph.msg.osd_boot.addr.cluster",
10048
14
      FT_NONE, BASE_NONE, NULL, 0,
10049
14
      NULL, HFILL
10050
14
    } },
10051
14
    { &hf_msg_osd_boot_epoch, {
10052
14
      "Boot Epoch", "ceph.msg.osd_boot.epoch",
10053
14
      FT_UINT32, BASE_DEC, NULL, 0,
10054
14
      NULL, HFILL
10055
14
    } },
10056
14
    { &hf_msg_osd_boot_addr_front, {
10057
14
      "Front Address", "ceph.msg.osd_boot.addr.front",
10058
14
      FT_NONE, BASE_NONE, NULL, 0,
10059
14
      NULL, HFILL
10060
14
    } },
10061
14
    { &hf_msg_osd_boot_metadata, {
10062
14
      "Metadata", "ceph.msg.osd_boot.metadata",
10063
14
      FT_NONE, BASE_NONE, NULL, 0,
10064
14
      NULL, HFILL
10065
14
    } },
10066
14
    { &hf_msg_osd_boot_metadata_k, {
10067
14
      "Key", "ceph.msg.osd_boot.metadata.k",
10068
14
      FT_STRING, BASE_NONE, NULL, 0,
10069
14
      NULL, HFILL
10070
14
    } },
10071
14
    { &hf_msg_osd_boot_metadata_v, {
10072
14
      "Value", "ceph.msg.osd_boot.metadata.v",
10073
14
      FT_STRING, BASE_NONE, NULL, 0,
10074
14
      NULL, HFILL
10075
14
    } },
10076
14
    { &hf_msg_pgstats, {
10077
14
      "Placement Group Stats", "ceph.msg.pgstats",
10078
14
      FT_NONE, BASE_NONE, NULL, 0,
10079
14
      NULL, HFILL
10080
14
    } },
10081
14
    { &hf_msg_pgstats_fsid, {
10082
14
      "FSID", "ceph.msg.pgstats.fsid",
10083
14
      FT_GUID, BASE_NONE, NULL, 0,
10084
14
      NULL, HFILL
10085
14
    } },
10086
14
    { &hf_msg_pgstats_pgstat, {
10087
14
      "PG Stats", "ceph.msg.pgstats.pgstat",
10088
14
      FT_NONE, BASE_NONE, NULL, 0,
10089
14
      NULL, HFILL
10090
14
    } },
10091
14
    { &hf_msg_pgstats_pgstat_pg, {
10092
14
      "Placement Group", "ceph.msg.pgstats.pgstat.pg",
10093
14
      FT_NONE, BASE_NONE, NULL, 0,
10094
14
      NULL, HFILL
10095
14
    } },
10096
14
    { &hf_msg_pgstats_pgstat_stat, {
10097
14
      "Stats", "ceph.msg.pgstats.pgstat.stat",
10098
14
      FT_NONE, BASE_NONE, NULL, 0,
10099
14
      NULL, HFILL
10100
14
    } },
10101
14
    { &hf_msg_pgstats_epoch, {
10102
14
      "Epoch", "ceph.msg.pgstats.epoch",
10103
14
      FT_UINT32, BASE_DEC, NULL, 0,
10104
14
      NULL, HFILL
10105
14
    } },
10106
14
    { &hf_msg_pgstats_mapfor, {
10107
14
      "Has Map For", "ceph.msg.pgstats.mapfor",
10108
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10109
14
      NULL, HFILL
10110
14
    } },
10111
14
    { &hf_msg_osd_pg_create, {
10112
14
      "PG Create", "ceph.msg.osd.pg.create",
10113
14
      FT_NONE, BASE_NONE, NULL, 0,
10114
14
      NULL, HFILL
10115
14
    } },
10116
14
    { &hf_msg_osd_pg_create_epoch, {
10117
14
      "Epoch", "ceph.msg.osd.pg.create.epoch",
10118
14
      FT_UINT64, BASE_DEC, NULL, 0,
10119
14
      NULL, HFILL
10120
14
    } },
10121
14
    { &hf_msg_osd_pg_create_mkpg, {
10122
14
      "Creation Request", "ceph.msg.osd.pg.create.mkpg",
10123
14
      FT_NONE, BASE_NONE, NULL, 0,
10124
14
      NULL, HFILL
10125
14
    } },
10126
14
    { &hf_msg_osd_pg_create_mkpg_pg, {
10127
14
      "PG", "ceph.msg.osd.pg.create.mkpg.pg",
10128
14
      FT_NONE, BASE_NONE, NULL, 0,
10129
14
      NULL, HFILL
10130
14
    } },
10131
14
    { &hf_msg_osd_pg_create_mkpg_create, {
10132
14
      "Creation Options", "ceph.msg.osd.pg.create.mkpg.create",
10133
14
      FT_NONE, BASE_NONE, NULL, 0,
10134
14
      NULL, HFILL
10135
14
    } },
10136
14
    { &hf_msg_client_caps, {
10137
14
      "Client Caps", "ceph.msg.client_caps",
10138
14
      FT_NONE, BASE_NONE, NULL, 0,
10139
14
      NULL, HFILL
10140
14
    } },
10141
14
    { &hf_msg_client_caps_op, {
10142
14
      "Operation", "ceph.msg.client_caps.op",
10143
14
      FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_cap_op_type_strings_ext, 0,
10144
14
      NULL, HFILL
10145
14
    } },
10146
14
    { &hf_msg_client_caps_inode, {
10147
14
      "Inode", "ceph.msg.client_caps.inode",
10148
14
      FT_UINT64, BASE_HEX, NULL, 0,
10149
14
      NULL, HFILL
10150
14
    } },
10151
14
    { &hf_msg_client_caps_relam, {
10152
14
      "Relam", "ceph.msg.client_caps.relam",
10153
14
      FT_UINT64, BASE_DEC, NULL, 0,
10154
14
      NULL, HFILL
10155
14
    } },
10156
14
    { &hf_msg_client_caps_cap_id, {
10157
14
      "Cap ID", "ceph.msg.client_caps.cap_id",
10158
14
      FT_UINT64, BASE_HEX, NULL, 0,
10159
14
      NULL, HFILL
10160
14
    } },
10161
14
    { &hf_msg_client_caps_seq, {
10162
14
      "Sequence", "ceph.msg.client_caps.seq",
10163
14
      FT_UINT32, BASE_DEC, NULL, 0,
10164
14
      NULL, HFILL
10165
14
    } },
10166
14
    { &hf_msg_client_caps_seq_issue, {
10167
14
      "Issue Sequence", "ceph.msg.client_caps.seq_issue",
10168
14
      FT_UINT32, BASE_DEC, NULL, 0,
10169
14
      NULL, HFILL
10170
14
    } },
10171
14
    { &hf_msg_client_caps_new, {
10172
14
      "New Capabilities", "ceph.msg.client_caps.new",
10173
14
      FT_UINT32, BASE_HEX, NULL, 0,
10174
14
      NULL, HFILL
10175
14
    } },
10176
14
    { &hf_msg_client_caps_wanted, {
10177
14
      "Wanted Capabilities", "ceph.msg.client_caps.wanted",
10178
14
      FT_UINT32, BASE_DEC, NULL, 0,
10179
14
      NULL, HFILL
10180
14
    } },
10181
14
    { &hf_msg_client_caps_dirty, {
10182
14
      "Dirty Capabilities", "ceph.msg.client_caps.dirty",
10183
14
      FT_UINT32, BASE_DEC, NULL, 0,
10184
14
      NULL, HFILL
10185
14
    } },
10186
14
    { &hf_msg_client_caps_seq_migrate, {
10187
14
      "Migrate Sequence", "ceph.msg.client_caps_seq.migrate",
10188
14
      FT_UINT32, BASE_DEC, NULL, 0,
10189
14
      NULL, HFILL
10190
14
    } },
10191
14
    { &hf_msg_client_caps_snap_follows, {
10192
14
      "Snapshot Follows", "ceph.msg.client_caps.snap_follows",
10193
14
      FT_UINT64, BASE_DEC, NULL, 0,
10194
14
      NULL, HFILL
10195
14
    } },
10196
14
    { &hf_msg_client_caps_uid, {
10197
14
      "User ID", "ceph.msg.client_caps.uid",
10198
14
      FT_UINT32, BASE_DEC, NULL, 0,
10199
14
      NULL, HFILL
10200
14
    } },
10201
14
    { &hf_msg_client_caps_gid, {
10202
14
      "Group ID", "ceph.msg.client_caps.gid",
10203
14
      FT_UINT32, BASE_DEC, NULL, 0,
10204
14
      NULL, HFILL
10205
14
    } },
10206
14
    { &hf_msg_client_caps_mode, {
10207
14
      "Mode", "ceph.msg.client_caps.mode",
10208
14
      FT_UINT32, BASE_DEC, NULL, 0,
10209
14
      NULL, HFILL
10210
14
    } },
10211
14
    { &hf_msg_client_caps_nlink, {
10212
14
      "Number of Links", "ceph.msg.client_caps.nlink",
10213
14
      FT_UINT32, BASE_DEC, NULL, 0,
10214
14
      NULL, HFILL
10215
14
    } },
10216
14
    { &hf_msg_client_caps_xattr_ver, {
10217
14
      "Xattr Version", "ceph.msg.client_caps.xattr_ver",
10218
14
      FT_UINT64, BASE_DEC, NULL, 0,
10219
14
      NULL, HFILL
10220
14
    } },
10221
14
    { &hf_msg_client_caps_snap, {
10222
14
      "Snapshot Data", "ceph.msg.client_caps.snap",
10223
14
      FT_BYTES, BASE_NONE, NULL, 0,
10224
14
      NULL, HFILL
10225
14
    } },
10226
14
    { &hf_msg_client_caps_flock, {
10227
14
      "Flock", "ceph.msg.client_caps.flock",
10228
14
      FT_NONE, BASE_NONE, NULL, 0,
10229
14
      NULL, HFILL
10230
14
    } },
10231
14
    { &hf_msg_client_caps_inline_ver, {
10232
14
      "Inline Version", "ceph.msg.client_caps.inline_ver",
10233
14
      FT_UINT64, BASE_DEC, NULL, 0,
10234
14
      NULL, HFILL
10235
14
    } },
10236
14
    { &hf_msg_client_caps_inline_data, {
10237
14
      "Inline Data", "ceph.msg.client_caps.inline_data",
10238
14
      FT_NONE, BASE_NONE, NULL, 0,
10239
14
      NULL, HFILL
10240
14
    } },
10241
14
    { &hf_msg_client_caps_xattr, {
10242
14
      "Xattr", "ceph.msg.client_caps.xattr",
10243
14
      FT_BYTES, BASE_NONE, NULL, 0,
10244
14
      NULL, HFILL
10245
14
    } },
10246
14
    { &hf_msg_client_caprel, {
10247
14
      "Capability Release", "ceph.msg.client_caprel",
10248
14
      FT_NONE, BASE_NONE, NULL, 0,
10249
14
      NULL, HFILL
10250
14
    } },
10251
14
    { &hf_msg_client_caprel_cap, {
10252
14
      "Capability", "ceph.msg.client_caprel.cap",
10253
14
      FT_NONE, BASE_NONE, NULL, 0,
10254
14
      NULL, HFILL
10255
14
    } },
10256
14
    { &hf_msg_client_caprel_cap_inode, {
10257
14
      "Inode", "ceph.msg.client_caprel.cap.inode",
10258
14
      FT_UINT64, BASE_HEX, NULL, 0,
10259
14
      NULL, HFILL
10260
14
    } },
10261
14
    { &hf_msg_client_caprel_cap_id, {
10262
14
      "Capability ID", "ceph.msg.client_caprel.cap.id",
10263
14
      FT_UINT64, BASE_HEX, NULL, 0,
10264
14
      NULL, HFILL
10265
14
    } },
10266
14
    { &hf_msg_client_caprel_cap_migrate, {
10267
14
      "Migrate Sequence", "ceph.msg.client_caprel_cap.migrate",
10268
14
      FT_UINT32, BASE_DEC, NULL, 0,
10269
14
      NULL, HFILL
10270
14
    } },
10271
14
    { &hf_msg_client_caprel_cap_seq, {
10272
14
      "Sequence", "ceph.msg.client_caprel_cap.seq",
10273
14
      FT_UINT32, BASE_DEC, NULL, 0,
10274
14
      NULL, HFILL
10275
14
    } },
10276
14
    { &hf_msg_timecheck, {
10277
14
      "Timecheck", "ceph.msg.timecheck",
10278
14
      FT_NONE, BASE_NONE, NULL, 0,
10279
14
      NULL, HFILL
10280
14
    } },
10281
14
    { &hf_msg_timecheck_op, {
10282
14
      "Operation", "ceph.msg.timecheck.op",
10283
14
      FT_UINT32, BASE_HEX|BASE_EXT_STRING, &c_timecheck_op_strings_ext, 0,
10284
14
      NULL, HFILL
10285
14
    } },
10286
14
    { &hf_msg_timecheck_epoch, {
10287
14
      "Epoch", "ceph.msg.timecheck.epoch",
10288
14
      FT_UINT64, BASE_DEC, NULL, 0,
10289
14
      NULL, HFILL
10290
14
    } },
10291
14
    { &hf_msg_timecheck_round, {
10292
14
      "Round", "ceph.msg.timecheck.round",
10293
14
      FT_UINT64, BASE_DEC, NULL, 0,
10294
14
      NULL, HFILL
10295
14
    } },
10296
14
    { &hf_msg_timecheck_time, {
10297
14
      "Time", "ceph.msg.timecheck.time",
10298
14
      FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
10299
14
      NULL, HFILL
10300
14
    } },
10301
14
    { &hf_msg_timecheck_skew, {
10302
14
      "Skew", "ceph.msg.timecheck.skew",
10303
14
      FT_NONE, BASE_NONE, NULL, 0,
10304
14
      NULL, HFILL
10305
14
    } },
10306
14
    { &hf_msg_timecheck_skew_node, {
10307
14
      "Node", "ceph.msg.timecheck.skew.node",
10308
14
      FT_NONE, BASE_NONE, NULL, 0,
10309
14
      NULL, HFILL
10310
14
    } },
10311
14
    { &hf_msg_timecheck_skew_skew, {
10312
14
      "Skew", "ceph.msg.timecheck.skew.skew",
10313
14
      FT_DOUBLE, BASE_NONE, NULL, 0,
10314
14
      NULL, HFILL
10315
14
    } },
10316
14
    { &hf_msg_timecheck_latency, {
10317
14
      "Latency", "ceph.msg.timecheck.latency",
10318
14
      FT_NONE, BASE_NONE, NULL, 0,
10319
14
      NULL, HFILL
10320
14
    } },
10321
14
    { &hf_msg_timecheck_latency_node, {
10322
14
      "Node", "ceph.msg.timecheck.latency.node",
10323
14
      FT_NONE, BASE_NONE, NULL, 0,
10324
14
      NULL, HFILL
10325
14
    } },
10326
14
    { &hf_msg_timecheck_latency_latency, {
10327
14
      "Latency", "ceph.msg.timecheck.latency.latency",
10328
14
      FT_DOUBLE, BASE_NONE, NULL, 0,
10329
14
      NULL, HFILL
10330
14
    } },
10331
14
  };
10332
10333
  /* Setup protocol subtree array */
10334
14
  static int *ett[] = {
10335
14
    &ett_ceph,
10336
14
    &ett_data,
10337
14
    &ett_str,
10338
14
    &ett_blob,
10339
14
    &ett_sockaddr,
10340
14
    &ett_entityaddr,
10341
14
    &ett_entityname,
10342
14
    &ett_EntityName,
10343
14
    &ett_entityinst,
10344
14
    &ett_kv,
10345
14
    &ett_eversion,
10346
14
    &ett_objectlocator,
10347
14
    &ett_pg,
10348
14
    &ett_pg_create,
10349
14
    &ett_filepath,
10350
14
    &ett_mds_release,
10351
14
    &ett_hitset_params,
10352
14
    &ett_snapinfo,
10353
14
    &ett_pgpool,
10354
14
    &ett_pgpool_snap,
10355
14
    &ett_pgpool_snapdel,
10356
14
    &ett_pgpool_property,
10357
14
    &ett_mon_map,
10358
14
    &ett_mon_map_address,
10359
14
    &ett_osd_peerstat,
10360
14
    &ett_featureset,
10361
14
    &ett_featureset_name,
10362
14
    &ett_compatset,
10363
14
    &ett_osd_superblock,
10364
14
    &ett_osd_info,
10365
14
    &ett_osd_xinfo,
10366
14
    &ett_perfstat,
10367
14
    &ett_osdstat,
10368
14
    &ett_pg_stat,
10369
14
    &ett_osd_map,
10370
14
    &ett_osd_map_client,
10371
14
    &ett_osd_map_pool,
10372
14
    &ett_osd_map_poolname,
10373
14
    &ett_osd_map_pgtmp,
10374
14
    &ett_osd_map_primarytmp,
10375
14
    &ett_osd_map_erasurecodeprofile,
10376
14
    &ett_osd_map_osd,
10377
14
    &ett_osd_map_blacklist,
10378
14
    &ett_osd_map_inc,
10379
14
    &ett_osd_map_inc_client,
10380
14
    &ett_osd_map_inc_osd,
10381
14
    &ett_osd_op,
10382
14
    &ett_redirect,
10383
14
    &ett_statcollection,
10384
14
    &ett_paxos,
10385
14
    &ett_msg_mon_map,
10386
14
    &ett_msg_statfs,
10387
14
    &ett_msg_statfsreply,
10388
14
    &ett_msg_mon_sub,
10389
14
    &ett_msg_mon_sub_item,
10390
14
    &ett_msg_mon_sub_flags,
10391
14
    &ett_msg_mon_sub_ack,
10392
14
    &ett_msg_auth,
10393
14
    &ett_msg_auth_supportedproto,
10394
14
    &ett_msg_auth_cephx,
10395
14
    &ett_msg_authreply,
10396
14
    &ett_msg_mon_getversion,
10397
14
    &ett_msg_mon_getversionreply,
10398
14
    &ett_msg_mds_map,
10399
14
    &ett_msg_client_sess,
10400
14
    &ett_msg_client_req,
10401
14
    &ett_msg_client_reqfwd,
10402
14
    &ett_msg_client_reply,
10403
14
    &ett_msg_osd_map,
10404
14
    &ett_msg_osd_map_inc,
10405
14
    &ett_msg_osd_map_full,
10406
14
    &ett_msg_osd_op,
10407
14
    &ett_msg_osd_opreply,
10408
14
    &ett_msg_poolopreply,
10409
14
    &ett_msg_poolop,
10410
14
    &ett_msg_mon_cmd,
10411
14
    &ett_msg_mon_cmd_arg,
10412
14
    &ett_msg_mon_cmdack,
10413
14
    &ett_msg_mon_cmdack_arg,
10414
14
    &ett_msg_poolstats,
10415
14
    &ett_msg_poolstatsreply,
10416
14
    &ett_msg_poolstatsreply_stat,
10417
14
    &ett_msg_mon_election,
10418
14
    &ett_msg_mon_paxos,
10419
14
    &ett_msg_mon_paxos_value,
10420
14
    &ett_msg_mon_probe,
10421
14
    &ett_msg_osd_ping,
10422
14
    &ett_msg_osd_boot,
10423
14
    &ett_msg_pgstats,
10424
14
    &ett_msg_pgstats_pgstat,
10425
14
    &ett_msg_osd_pg_create,
10426
14
    &ett_msg_osd_pg_create_mkpg,
10427
14
    &ett_msg_client_caps,
10428
14
    &ett_msg_client_caprel,
10429
14
    &ett_msg_client_caprel_cap,
10430
14
    &ett_msg_timecheck,
10431
14
    &ett_msg_timecheck_skew,
10432
14
    &ett_msg_timecheck_latency,
10433
14
    &ett_head,
10434
14
    &ett_foot,
10435
14
    &ett_connect,
10436
14
    &ett_connect_reply,
10437
14
    &ett_filter_data,
10438
14
  };
10439
10440
  /* Expert info items. */
10441
14
  static ei_register_info ei[] = {
10442
14
    { &ei_unused, {
10443
14
      "ceph.unused", PI_UNDECODED, PI_WARN,
10444
14
      "Unused data in message. This usually indicates an error by the "
10445
14
      "sender or a bug in the dissector.", EXPFILL
10446
14
    } },
10447
14
    { &ei_overrun, {
10448
14
      "ceph.overrun", PI_UNDECODED, PI_WARN,
10449
14
      "There was less data then expected. This usually indicates an "
10450
14
      "error by the sender or a bug in the dissector.", EXPFILL
10451
14
    } },
10452
14
    { &ei_tag_unknown, {
10453
14
      "ceph.tag_unknown", PI_UNDECODED, PI_ERROR,
10454
14
      "Unknown tag. This is either an error by the sender or an "
10455
14
      "indication that the dissector is out of date.", EXPFILL
10456
14
    } },
10457
14
    { &ei_msg_unknown, {
10458
14
      "ceph.msg_unknown", PI_UNDECODED, PI_WARN,
10459
14
      "Unknown message type. This most likely means that the dissector "
10460
14
      "is out of date. However, it could also be an error by the "
10461
14
      "sender.", EXPFILL
10462
14
    } },
10463
14
    { &ei_union_unknown, {
10464
14
      "ceph.union_unknown", PI_UNDECODED, PI_WARN,
10465
14
      "This data's meaning depends on other information in the message "
10466
14
      "but the dissector doesn't know what type it is.", EXPFILL
10467
14
    } },
10468
14
    { &ei_ver_tooold, {
10469
14
      "ceph.ver.tooold", PI_UNDECODED, PI_WARN,
10470
14
      "This data is in an older format that is not supported by the "
10471
14
      "dissector.", EXPFILL
10472
14
    } },
10473
14
    { &ei_ver_toonew, {
10474
14
      "ceph.ver.toonew", PI_UNDECODED, PI_WARN,
10475
14
      "This data is in a newer format that is not supported by the "
10476
14
      "dissector.", EXPFILL
10477
14
    } },
10478
14
    { &ei_oloc_both, {
10479
14
      "ceph.oloc.both", PI_MALFORMED, PI_ERROR,
10480
14
      "Only one of the key or hash should be present, however both are.",
10481
14
      EXPFILL
10482
14
    } },
10483
#if 0
10484
    { &ei_banner_invalid, {
10485
      "ceph.banner.invalid", PI_MALFORMED, PI_ERROR,
10486
      "Banner was invalid.", EXPFILL
10487
    } },
10488
#endif
10489
14
    { &ei_sizeillogical, {
10490
14
      "ceph.sizeillogical", PI_MALFORMED, PI_ERROR,
10491
14
      "The claimed size is impossible.", EXPFILL
10492
14
    } },
10493
14
  };
10494
10495
  /* Register the protocol name and description */
10496
14
  proto_ceph = proto_register_protocol("Ceph", "Ceph", "ceph");
10497
10498
  /* Required function calls to register the header fields and subtrees */
10499
14
  proto_register_field_array(proto_ceph, hf, array_length(hf));
10500
14
  proto_register_subtree_array(ett, array_length(ett));
10501
14
  expert_ceph = expert_register_protocol(proto_ceph);
10502
14
  expert_register_field_array(expert_ceph, ei, array_length(ei));
10503
10504
14
  ceph_handle = register_dissector("ceph", dissect_ceph_old, proto_ceph);
10505
14
}
10506
10507
void
10508
proto_reg_handoff_ceph(void)
10509
14
{
10510
14
  heur_dissector_add("tcp", dissect_ceph_heur, "Ceph over TCP", "ceph_tcp", proto_ceph, HEURISTIC_ENABLE);
10511
14
}
10512
10513
/*
10514
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
10515
 *
10516
 * Local variables:
10517
 * c-basic-offset: 8
10518
 * tab-width: 8
10519
 * indent-tabs-mode: t
10520
 * End:
10521
 *
10522
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
10523
 * :indentSize=8:tabSize=8:noTabs=false:
10524
 */