Whamcloud - gitweb
d150ce96b69acdd3c9714515213ebc58823a197b
[fs/lustre-release.git] / lustre / contrib / wireshark / packet-lustre.c
1 /* packet-lustre.c
2  * Lustre 1.6 dissection (http://www.lustre.org/)
3  * Author: Laurent George <george@ocre.cea.fr>
4  * based on packet-agentx.c and packet-afs.c
5  * partially generated by Pidl
6  * 20080903
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1999 Gerald Combs
10  *
11  * C-Syle: 2 space indents
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  *
27  * Copyright (c) 2011, 2013, Intel Corporation.
28  */
29
30 #ifdef HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33
34
35 #include <glib.h>
36 #include <string.h>
37 #include <epan/packet.h>
38
39 #include <epan/dissectors/packet-windows-common.h>
40
41 const true_false_string lnet_flags_set_truth = { "Set", "Unset" };
42
43 /* --------------------------------------------------------------------------------------- */
44 /* def and macro to know where we are the the lustre payload */
45 #define LUSTRE_MAGIC_OFFSET 8
46 #define LUSTRE_MSG_MAGIC_V1 0x0BD00BD0
47 #define LUSTRE_MSG_MAGIC_V2 0x0BD00BD3
48
49 #define LUSTRE_BUFCOUNT_OFF ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) ? 0 : 60)
50 #define LUSTRE_BUFCOUNT ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) \
51     ? (tvb_get_letohl(tvb, LUSTRE_BUFCOUNT_OFF)) : ((tvb_get_letohl(tvb, LUSTRE_BUFCOUNT_OFF))) )
52 /* remark : BUFLENOFF don't have the same meaning if it's for v1 or v2
53  * v1 : LUSTRE_BUFLEN_OFF = offset buflen[0] - 4 bytes.
54  * v2 : LUSTRE_BUFLEN_OFF = offset buflen[0]
55  */
56 #define LUSTRE_BUFLEN_OFF ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) ? 32 : 60)
57
58 /* LUSTRE_BUFFER_LEN(buffnum) */
59 #define LUSTRE_BUFFER_LEN(_n) (LUSTRE_BUFCOUNT <= (_n) ? 0 \
60                                : tvb_get_letohl(tvb, LUSTRE_BUFLEN_OFF+\
61                                                 sizeof(guint32)*(_n)))
62
63 #define LUSTRE_REQ_REC_OFF                     1 /* normal request record offset */
64 #define LUSTRE_REPLY_REC_OFF                   1 /* normal reply record offset */
65
66 #define LUSTRE_DLM_INTENT_IT_OFF               2 /* intent lock it offset */
67 #define LUSTRE_DLM_INTENT_REC_OFF              3 /* intent lock record offset */
68 #define LUSTRE_DLM_LOCKREPLY_OFF               1 /* lockrep offset */
69 #define LUSTRE_DLM_REPLY_REC_OFF               2 /* reply record offset */
70 /* --------------------------------------------------------------------------------------- */
71
72
73 #define LUSTRE_PTLRPC_MSG_VERSION  0x00000003
74 #define LUSTRE_VERSION_MASK 0xffff0000
75 #define LUSTRE_OBD_VERSION  0x00010000
76 #define LUSTRE_MDS_VERSION  0x00020000
77 #define LUSTRE_OST_VERSION  0x00030000
78 #define LUSTRE_DLM_VERSION  0x00040000
79 #define LUSTRE_LOG_VERSION  0x00050000
80 #define LUSTRE_MGS_VERSION  0x00060000
81
82
83
84 #define LOV_MAGIC_V1      0x0BD10BD0
85 #define LOV_MAGIC         LOV_MAGIC_V1
86 #define LOV_MAGIC_JOIN_V1 0x0BD20BD0
87
88 /* defined in lustre/include/lustre/lustre_idl.h */
89 typedef enum {
90         CONNMGR_REQUEST_PORTAL = 1,
91         CONNMGR_REPLY_PORTAL = 2,
92         OSC_REQUEST_PORTAL = 3,
93         OSC_REPLY_PORTAL = 4,
94         OSC_BULK_PORTAL = 5,
95         OST_IO_PORTAL = 6,
96         OST_CREATE_PORTAL = 7,
97         OST_BULK_PORTAL = 8,
98         MDC_REQUEST_PORTAL = 9,
99         MDC_REPLY_PORTAL = 10,
100         MDC_BULK_PORTAL = 11,
101         MDS_REQUEST_PORTAL = 12,
102         MDS_REPLY_PORTAL = 13,
103         MDS_BULK_PORTAL = 14,
104         LDLM_CB_REQUEST_PORTAL = 15,
105         LDLM_CB_REPLY_PORTAL = 16,
106         LDLM_CANCEL_REQUEST_PORTAL = 17,
107         LDLM_CANCEL_REPLY_PORTAL = 18,
108         PTLBD_REQUEST_PORTAL = 19,
109         PTLBD_REPLY_PORTAL = 20,
110         PTLBD_BULK_PORTAL = 21,
111         MDS_SETATTR_PORTAL = 22,
112         MDS_READPAGE_PORTAL = 23,
113         MDS_MDS_PORTAL = 24,
114         MGC_REPLY_PORTAL = 25,
115         MGS_REQUEST_PORTAL = 26,
116         MGS_REPLY_PORTAL = 27,
117         OST_REQUEST_PORTAL = 28,
118         FLD_REQUEST_PORTAL = 29,
119         SEQ_METADATA_PORTAL = 30,
120         SEQ_DATA_PORTAL = 31,
121         SEQ_CONTROLLER_PORTAL = 32,
122         MGS_BULK_PORTAL = 33
123 } portal_index_t;
124
125 static const value_string portal_indices[] = {
126         { CONNMGR_REQUEST_PORTAL, "CONNMGR_REQUEST_PORTAL"},
127         { CONNMGR_REPLY_PORTAL , "CONNMGR_REPLY_PORTAL"},
128         { OSC_REQUEST_PORTAL , "OSC_REQUEST_PORTAL(obsolete)"},
129         { OSC_REPLY_PORTAL , "OSC_REPLY_PORTAL"},
130         { OSC_BULK_PORTAL , "OSC_BULK_PORTAL(obsolete)"},
131         { OST_IO_PORTAL , "OST_IO_PORTAL"},
132         { OST_CREATE_PORTAL , "OST_CREATE_PORTAL"},
133         { OST_BULK_PORTAL , "OST_BULK_PORTAL"},
134         { MDC_REQUEST_PORTAL , "MDC_REQUEST_PORTAL(obsolete)"},
135         { MDC_REPLY_PORTAL , "MDC_REPLY_PORTAL"},
136         { MDC_BULK_PORTAL , "MDC_BULK_PORTAL(obsolete)"},
137         { MDS_REQUEST_PORTAL , "MDS_REQUEST_PORTAL"},
138         { MDS_REPLY_PORTAL , "MDS_REPLY_PORTAL(obsolete)"},
139         { MDS_BULK_PORTAL , "MDS_BULK_PORTAL"},
140         { LDLM_CB_REQUEST_PORTAL , "LDLM_CB_REQUEST_PORTAL"},
141         { LDLM_CB_REPLY_PORTAL , "LDLM_CB_REPLY_PORTAL"},
142         { LDLM_CANCEL_REQUEST_PORTAL , "LDLM_CANCEL_REQUEST_PORTAL"},
143         { LDLM_CANCEL_REPLY_PORTAL , "LDLM_CANCEL_REPLY_PORTAL"},
144         { PTLBD_REQUEST_PORTAL , "PTLBD_REQUEST_PORTAL(obsolete)"},
145         { PTLBD_REPLY_PORTAL , "PTLBD_REPLY_PORTAL(obsolete)"},
146         { PTLBD_BULK_PORTAL , "PTLBD_BULK_PORTAL(obsolete)"},
147         { MDS_SETATTR_PORTAL , "MDS_SETATTR_PORTAL"},
148         { MDS_READPAGE_PORTAL , "MDS_READPAGE_PORTAL"},
149         { MDS_MDS_PORTAL, "MDS_MDS_PORTAL"},
150         { MGC_REPLY_PORTAL , "MGC_REPLY_PORTAL"},
151         { MGS_REQUEST_PORTAL , "MGS_REQUEST_PORTAL"},
152         { MGS_REPLY_PORTAL , "MGS_REPLY_PORTAL"},
153         { OST_REQUEST_PORTAL , "OST_REQUEST_PORTAL"},
154         { FLD_REQUEST_PORTAL , "FLD_REQUEST_PORTAL"},
155         { SEQ_METADATA_PORTAL, "SEQ_METADATA_PORTAL"},
156         { SEQ_DATA_PORTAL, "SEQ_DATA_PORTAL"},
157         { SEQ_CONTROLLER_PORTAL, "SEQ_CONTROLLER_PORTAL"},
158         { MGS_BULK_PORTAL, "MGS_BULK_PORTAL"}
159 };
160
161 typedef enum {
162   OST_REPLY      =  0,       /* reply ? */
163   OST_GETATTR    =  1,
164   OST_SETATTR    =  2,
165   OST_READ       =  3,
166   OST_WRITE      =  4,
167   OST_CREATE     =  5,
168   OST_DESTROY    =  6,
169   OST_GET_INFO   =  7,
170   OST_CONNECT    =  8,
171   OST_DISCONNECT =  9,
172   OST_PUNCH      = 10,
173   OST_OPEN       = 11,
174   OST_CLOSE      = 12,
175   OST_STATFS     = 13,
176   /*      OST_SAN_READ   = 14,    deprecated */
177   /*      OST_SAN_WRITE  = 15,    deprecated */
178   OST_SYNC       = 16,
179   OST_SET_INFO   = 17,
180   OST_QUOTACHECK = 18,
181   OST_QUOTACTL   = 19,
182   OST_QUOTA_ADJUST_QUNIT = 20,
183   OST_LAST_OPC
184 } ost_cmd_t ;
185
186
187 typedef enum {
188   OBD_PING = 400,
189   OBD_LOG_CANCEL,
190   OBD_QC_CALLBACK,
191   OBD_LAST_OPC
192 } obd_cmd_t;
193 #define OBD_FIRST_OPC OBD_PING
194
195 /* must be coherent with same declaration
196  * in lustre/include/lustre/lustre_idl.h
197  */
198 typedef enum {
199   MDS_GETATTR      = 33,
200   MDS_GETATTR_NAME = 34,
201   MDS_CLOSE        = 35,
202   MDS_REINT        = 36,
203   MDS_READPAGE     = 37,
204   MDS_CONNECT      = 38,
205   MDS_DISCONNECT   = 39,
206   MDS_GETSTATUS    = 40,
207   MDS_STATFS       = 41,
208   MDS_PIN          = 42,
209   MDS_UNPIN        = 43,
210   MDS_SYNC         = 44,
211   MDS_DONE_WRITING = 45,
212   MDS_SET_INFO     = 46,
213   MDS_QUOTACHECK   = 47,
214   MDS_QUOTACTL     = 48,
215   MDS_GETXATTR     = 49,
216   MDS_SETXATTR     = 50,
217   MDS_WRITEPAGE    = 51,
218   MDS_IS_SUBDIR    = 52,
219   MDS_GET_INFO     = 53,
220   MDS_LAST_OPC
221 } mds_cmd_t;
222
223 #define IT_OPEN     0x0001
224 #define IT_CREAT    0x0002
225 #define IT_READDIR  0x0004
226 #define IT_GETATTR  0x0008
227 #define IT_LOOKUP   0x0010
228 #define IT_UNLINK   0x0020
229 #define IT_GETXATTR 0x0040
230 #define IT_EXEC     0x0080
231 #define IT_PIN      0x0100
232
233
234
235 #define MDS_FIRST_OPC MDS_GETATTR
236 #define LDLM_FIRST_OPC LDLM_ENQUEUE
237
238 typedef enum {
239   REINT_SETATTR  = 1,
240   REINT_CREATE   = 2,
241   REINT_LINK     = 3,
242   REINT_UNLINK   = 4,
243   REINT_RENAME   = 5,
244   REINT_OPEN     = 6,
245   REINT_SETXATTR = 7,
246   //      REINT_CLOSE    = 8,
247   //      REINT_WRITE    = 9,
248   REINT_MAX
249 } mds_reint_t;
250
251 typedef enum {
252   LDLM_ENQUEUE     = 101,
253   LDLM_CONVERT     = 102,
254   LDLM_CANCEL      = 103,
255   LDLM_BL_CALLBACK = 104,
256   LDLM_CP_CALLBACK = 105,
257   LDLM_GL_CALLBACK = 106,
258   LDLM_LAST_OPC
259 } ldlm_cmd_t;
260 #define LDLM_FIRST_OPC LDLM_ENQUEUE
261
262 enum seq_rpc_opc {
263   SEQ_QUERY        = 700,
264   SEQ_LAST_OPC,
265   SEQ_FIRST_OPC    = SEQ_QUERY
266 };
267
268 enum fld_rpc_opc {
269   FLD_QUERY        = 900,
270   FLD_LAST_OPC,
271   FLD_FIRST_OPC    = FLD_QUERY
272 };
273
274 #define  WIRESHARK_COMPILE
275 #include "lustre_dlm_flags.h"
276
277 #define LDLM_ENQUEUE (101)
278 #define LDLM_CONVERT (102)
279 #define LDLM_CANCEL (103)
280 #define LDLM_BL_CALLBACK (104)
281 #define LDLM_CP_CALLBACK (105)
282 #define LDLM_GL_CALLBACK (106)
283 #define LCK_MINMODE (0)
284 #define LCK_EX (1)
285 #define LCK_PW (2)
286 #define LCK_PR (4)
287 #define LCK_CW (8)
288 #define LCK_CR (16)
289 #define LCK_NL (32)
290 #define LCK_GROUP (64)
291 #define LDLM_PLAIN (10)
292 #define LDLM_EXTENT (11)
293 #define LDLM_FLOCK (12)
294 #define LDLM_IBITS (13)
295 //#define MGS_CONNECT (250)
296 #define OBD_PING (400)
297
298 /*
299  * Opcodes for mountconf (mgs and mgc)
300  */
301 typedef enum {
302   MGS_CONNECT = 250,
303   MGS_DISCONNECT,
304   MGS_EXCEPTION,         /* node died, etc. */
305   MGS_TARGET_REG,        /* whenever target starts up */
306   MGS_TARGET_DEL,
307   MGS_SET_INFO,
308   MGS_CONFIG_READ,
309   MGS_LAST_OPC
310 } mgs_cmd_t;
311 #define MGS_FIRST_OPC MGS_CONNECT
312
313 /* llog protocol */
314 typedef enum {
315   LLOG_ORIGIN_HANDLE_CREATE       = 501,
316   LLOG_ORIGIN_HANDLE_NEXT_BLOCK   = 502,
317   LLOG_ORIGIN_HANDLE_READ_HEADER  = 503,
318   LLOG_ORIGIN_HANDLE_WRITE_REC    = 504,
319   LLOG_ORIGIN_HANDLE_CLOSE        = 505,
320   LLOG_ORIGIN_CONNECT             = 506,
321   LLOG_CATINFO                    = 507,  /* for lfs catinfo */
322   LLOG_ORIGIN_HANDLE_PREV_BLOCK   = 508,
323   LLOG_ORIGIN_HANDLE_DESTROY      = 509,  /* for destroy llog object*/
324   LLOG_LAST_OPC
325 } llog_cmd_t;
326
327 #define LLOG_FIRST_OPC LLOG_ORIGIN_HANDLE_CREATE
328 /*flag for the LLOG*/
329 #define LLOG_OP_MAGIC 0x10600000
330 #define LLOG_OP_MASK  0xfff00000
331
332 typedef enum {
333   LLOG_PAD_MAGIC   = LLOG_OP_MAGIC | 0x00000,
334   OST_SZ_REC       = LLOG_OP_MAGIC | 0x00f00,
335   OST_RAID1_REC    = LLOG_OP_MAGIC | 0x01000,
336   MDS_UNLINK_REC   = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_UNLINK,
337   MDS_SETATTR_REC  = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_SETATTR,
338   OBD_CFG_REC      = LLOG_OP_MAGIC | 0x20000,
339   PTL_CFG_REC      = LLOG_OP_MAGIC | 0x30000, /* obsolete */
340   LLOG_GEN_REC     = LLOG_OP_MAGIC | 0x40000,
341   LLOG_JOIN_REC    = LLOG_OP_MAGIC | 0x50000, /* obsolete */
342   LLOG_HDR_MAGIC   = LLOG_OP_MAGIC | 0x45539,
343   LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
344 } llog_op_type;
345
346 /* LLOG flag */
347 /*defined in lustre/include/lustre/lustre_idl.h*/
348 #define LLOG_F_ZAP_WHEN_EMPTY   0x1
349 #define LLOG_F_IS_CAT           0x2
350 #define LLOG_F_IS_PLAIN         0x4
351
352 #define PTL_RPC_MSG_REQUEST 4711
353 #define PTL_RPC_MSG_ERR 4712
354 #define PTL_RPC_MSG_REPLY 4713
355
356
357 /* Ett declarations */
358 static gint ett_lustre_llog_log_llh_flags = -1 ;
359 static gint ett_lustre = -1;
360 static gint ett_lustre_lustre_handle_cookie = -1;
361 static gint ett_lustre_lustre_msg_v1 = -1;
362 static gint ett_lustre_lustre_handle_v1 = -1;
363 static gint ett_lustre_lustre_msg_v2 = -1;
364 static gint ett_lustre_ptlrpc_body = -1;
365 static gint ett_lustre_lustre_handle_v2 = -1;
366 static gint ett_lustre_obd_connect_data = -1;
367 static gint ett_lustre_lov_mds_md_v1 = -1;
368 static gint ett_lustre_lov_ost_data_v1 = -1;
369 static gint ett_lustre_obd_statfs = -1;
370 static gint ett_lustre_obd_ioobj = -1;
371 static gint ett_lustre_niobuf_remote = -1;
372 static gint ett_lustre_ost_lvb = -1;
373 static gint ett_lustre_ll_fid = -1;
374 static gint ett_lustre_mdt_body = -1;
375 static gint ett_lustre_mdt_rec_setattr = -1;
376 static gint ett_lustre_mdt_rec_create = -1;
377 static gint ett_lustre_mdt_rec_link = -1;
378 static gint ett_lustre_mdt_rec_unlink = -1;
379 static gint ett_lustre_mdt_rec_rename = -1;
380 static gint ett_lustre_mdt_rec_setxattr = -1;
381 static gint ett_lustre_obd_quotactl = -1;
382 static gint ett_lustre_obd_dqinfo = -1;
383 static gint ett_lustre_obd_dqblk = -1;
384 static gint ett_lustre_quota_adjust_qunit = -1;
385 static gint ett_lustre_lov_desc = -1;
386 static gint ett_lustre_obd_uuid = -1;
387 static gint ett_lustre_ldlm_res_id = -1;
388 static gint ett_lustre_ldlm_extent = -1;
389 static gint ett_lustre_ldlm_inodebits = -1;
390 static gint ett_lustre_ldlm_flock = -1;
391 static gint ett_lustre_ldlm_intent_opc = -1;
392 static gint ett_lustre_ldlm_resource_desc = -1;
393 static gint ett_lustre_ldlm_lock_desc = -1;
394 static gint ett_lustre_ldlm_request = -1;
395 static gint ett_lustre_lustre_handle = -1;
396 static gint ett_lustre_ldlm_reply = -1;
397 static gint ett_lustre_mgs_send_param = -1;
398 static gint ett_lustre_mgs_target_info = -1;
399 static gint ett_lustre_mgs_config_body = -1;
400 static gint ett_lustre_mgs_config_res = -1;
401 static gint ett_lustre_cfg_marker = -1;
402 static gint ett_lustre_llog_catid = -1;
403 static gint ett_lustre_llog_rec_hdr = -1;
404 static gint ett_lustre_llog_logid_rec = -1;
405 static gint ett_lustre_llog_logid = -1;
406 static gint ett_lustre_llog_rec_tail = -1;
407 static gint ett_lustre_lov_mds_md = -1;
408 static gint ett_lustre_llog_unlink_rec = -1;
409 static gint ett_lustre_llog_setattr_rec = -1;
410 static gint ett_lustre_llog_size_change_rec = -1;
411 static gint ett_lustre_llog_gen_rec = -1;
412 static gint ett_lustre_llog_log_hdr = -1;
413 static gint ett_lustre_llog_cookie = -1;
414 static gint ett_lustre_llogd_body = -1;
415 static gint ett_lustre_llogd_conn_body = -1;
416 static gint ett_lustre_llog_gen = -1;
417 static gint ett_lustre_obdo = -1;
418 static gint ett_lustre_ost_body = -1;
419 static gint ett_lustre_qunit_data = -1;
420 static gint ett_lustre_qunit_data_old2 = -1;
421 static gint ett_lustre_qunit_data_old = -1;
422 static gint ett_lustre_ldlm_lock_flags = -1 ;
423 static gint ett_lustre_seq_range = -1;
424 static gint ett_lustre_fld_range = -1;
425 static gint ett_lustre_mdt_ioepoch = -1;
426 static gint ett_lustre_capa = -1;
427 static gint ett_lustre_acl = -1;
428
429 /* -----------------------------------------------*/
430 /* Header field declarations */
431 static int hf_lustre_ptlrpc_body_pb = -1 ;
432 static int hf_lustre_ost_body = -1 ;
433 static int hf_lustre_obd_statfs = -1 ;
434 static int hf_lustre_obd_quotactl = -1 ;
435 static int hf_lustre_quota_adjust_qunit = -1 ;
436 static int hf_lustre_extra_padding = -1 ;
437 static int hf_lustre_ldlm_reply = -1 ;
438 static int hf_lustre_ldlm_request = -1 ;
439 static int hf_lustre_obd_uuid = -1 ;
440 static int hf_lustre_obd_connect_data = -1 ;
441 static int hf_lustre_ldlm_intent = -1;
442 static int hf_lustre_obd_ioobj = -1 ;
443 static int hf_lustre_niobuf_remote = -1 ;
444 static int hf_lustre_ost_key = -1 ;
445 static int hf_lustre_nio= -1 ;
446 static int hf_lustre_ost_val= -1;
447 static int hf_lustre_llogd_body = -1;
448 static int hf_lustre_llogd_log_hdr= -1;
449 static int hf_lustre_llog_logid_rec =-1 ;
450 static int hf_lustre_llogd_chunk= -1;
451 static int hf_lustre_llogd_keyword= -1;
452 static int hf_lustre_llogd_client= -1;
453 static int hf_lustre_llogd_name= -1;
454
455 static int hf_lustre_mds_xattr_name = -1;
456 static int hf_lustre_lov_mds_md_v1= -1;
457 static int hf_lustre_llog_cookie= -1;
458 static int hf_lustre_mds_md_data= -1;
459 static int hf_lustre_mds_reint_opcode= -1;
460 static int hf_lustre_mds_xattr_eadata = -1;
461
462 static int hf_lustre_reint_name= -1;
463 static int hf_lustre_reint_old_name= -1;
464 static int hf_lustre_reint_new_name= -1;
465
466 static int hf_lustre_mgs_target_info = -1 ;
467 static int hf_lustre_mgs_send_param = -1;
468
469 static int hf_lustre_mgs_config_body = -1;
470 static int hf_lustre_mgs_config_body_name = -1;
471 static int hf_lustre_mgs_config_body_offset = -1;
472 static int hf_lustre_mgs_config_body_type = -1;
473 static int hf_lustre_mgs_config_body_reserved = -1;
474 static int hf_lustre_mgs_config_body_bits = -1;
475 static int hf_lustre_mgs_config_body_units = -1;
476
477 static int hf_lustre_mgs_config_res = -1;
478 static int hf_lustre_mgs_config_res_offset = -1;
479 static int hf_lustre_mgs_config_res_size = -1;
480
481 static int hf_lustre_ost_lvb = -1 ;
482
483 #define hf_lustre_ldlm_ast_discard_data hf_lustre_ldlm_fl_ast_discard_data
484
485 static int hf_lustre_mdt_body = -1 ;
486 static int hf_lustre_mdt_body_fid1 = -1;
487 static int hf_lustre_mdt_body_fid2 = -1;
488 static int hf_lustre_mdt_body_handle = -1;
489 static int hf_lustre_mdt_body_valid = -1;
490 static int hf_lustre_mdt_body_size = -1;
491 static int hf_lustre_mdt_body_mtime = -1;
492 static int hf_lustre_mdt_body_atime = -1;
493 static int hf_lustre_mdt_body_ctime = -1;
494 static int hf_lustre_mdt_body_blocks = -1;
495 static int hf_lustre_mdt_body_ioepoch = -1;
496 static int hf_lustre_mdt_body_ino = -1;
497 static int hf_lustre_mdt_body_fsuid = -1;
498 static int hf_lustre_mdt_body_fsgid = -1;
499 static int hf_lustre_mdt_body_capability = -1;
500 static int hf_lustre_mdt_body_mode = -1;
501 static int hf_lustre_mdt_body_uid = -1;
502 static int hf_lustre_mdt_body_gid = -1;
503 static int hf_lustre_mdt_body_flags = -1;
504 static int hf_lustre_mdt_body_rdev = -1;
505 static int hf_lustre_mdt_body_nlink = -1;
506 static int hf_lustre_mdt_body_generation = -1;
507 static int hf_lustre_mdt_body_suppgid = -1;
508 static int hf_lustre_mdt_body_eadatasize = -1;
509 static int hf_lustre_mdt_body_aclsize = -1;
510 static int hf_lustre_mdt_body_max_mdsize = -1;
511 static int hf_lustre_mdt_body_max_cookiesize = -1;
512 static int hf_lustre_mdt_body_uid_h = -1;
513 static int hf_lustre_mdt_body_gid_h = -1;
514 static int hf_lustre_mdt_body_padding_5 = -1;
515 static int hf_lustre_mdt_body_padding_6 = -1;
516 static int hf_lustre_mdt_body_padding_7 = -1;
517 static int hf_lustre_mdt_body_padding_8 = -1;
518 static int hf_lustre_mdt_body_padding_9 = -1;
519 static int hf_lustre_mdt_body_padding_10 = -1;
520
521 static int hf_lustre_mdt_rec_setattr = -1 ;
522 static int hf_lustre_mdt_rec_setattr_sa_opcode = -1;
523 static int hf_lustre_mdt_rec_setattr_sa_cap = -1;
524 static int hf_lustre_mdt_rec_setattr_sa_fsuid = -1;
525 static int hf_lustre_mdt_rec_setattr_sa_fsuid_h = -1;
526 static int hf_lustre_mdt_rec_setattr_sa_fsgid = -1;
527 static int hf_lustre_mdt_rec_setattr_sa_fsgid_h = -1;
528 static int hf_lustre_mdt_rec_setattr_sa_suppgid = -1;
529 static int hf_lustre_mdt_rec_setattr_sa_suppgid_h = -1;
530 static int hf_lustre_mdt_rec_setattr_sa_padding_1 = -1;
531 static int hf_lustre_mdt_rec_setattr_sa_padding_1_h = -1;
532 static int hf_lustre_mdt_rec_setattr_sa_fid = -1;
533 static int hf_lustre_mdt_rec_setattr_sa_valid = -1;
534 static int hf_lustre_mdt_rec_setattr_sa_uid = -1;
535 static int hf_lustre_mdt_rec_setattr_sa_gid = -1;
536 static int hf_lustre_mdt_rec_setattr_sa_size = -1;
537 static int hf_lustre_mdt_rec_setattr_sa_blocks = -1;
538 static int hf_lustre_mdt_rec_setattr_sa_mtime = -1;
539 static int hf_lustre_mdt_rec_setattr_sa_atime = -1;
540 static int hf_lustre_mdt_rec_setattr_sa_ctime = -1;
541 static int hf_lustre_mdt_rec_setattr_sa_attr_flags = -1;
542 static int hf_lustre_mdt_rec_setattr_sa_mode = -1;
543 static int hf_lustre_mdt_rec_setattr_sa_padding_2 = -1;
544 static int hf_lustre_mdt_rec_setattr_sa_padding_3 = -1;
545 static int hf_lustre_mdt_rec_setattr_sa_padding_4 = -1;
546 static int hf_lustre_mdt_rec_setattr_sa_padding_5 = -1;
547
548 static int hf_lustre_mdt_rec_create = -1 ;
549 static int hf_lustre_mdt_rec_create_cr_opcode = -1;
550 static int hf_lustre_mdt_rec_create_cr_cap = -1;
551 static int hf_lustre_mdt_rec_create_cr_fsuid = -1;
552 static int hf_lustre_mdt_rec_create_cr_fsuid_h = -1;
553 static int hf_lustre_mdt_rec_create_cr_fsgid = -1;
554 static int hf_lustre_mdt_rec_create_cr_fsgid_h = -1;
555 static int hf_lustre_mdt_rec_create_cr_suppgid1 = -1;
556 static int hf_lustre_mdt_rec_create_cr_suppgid1_h = -1;
557 static int hf_lustre_mdt_rec_create_cr_suppgid2 = -1;
558 static int hf_lustre_mdt_rec_create_cr_suppgid2_h = -1;
559 static int hf_lustre_mdt_rec_create_cr_fid1 = -1;
560 static int hf_lustre_mdt_rec_create_cr_fid2 = -1;
561 static int hf_lustre_mdt_rec_create_cr_old_handle = -1;
562 static int hf_lustre_mdt_rec_create_cr_time = -1;
563 static int hf_lustre_mdt_rec_create_cr_rdev = -1;
564 static int hf_lustre_mdt_rec_create_cr_ioepoch = -1;
565 static int hf_lustre_mdt_rec_create_cr_padding_1 = -1;
566 static int hf_lustre_mdt_rec_create_cr_mode = -1;
567 static int hf_lustre_mdt_rec_create_cr_bias = -1;
568 static int hf_lustre_mdt_rec_create_cr_flags_l = -1;
569 static int hf_lustre_mdt_rec_create_cr_flags_h = -1;
570 static int hf_lustre_mdt_rec_create_cr_umask = -1;
571 static int hf_lustre_mdt_rec_create_cr_padding_4 = -1;
572
573 static int hf_lustre_mdt_rec_link = -1 ;
574 static int hf_lustre_mdt_rec_link_lk_opcode = -1;
575 static int hf_lustre_mdt_rec_link_lk_cap = -1;
576 static int hf_lustre_mdt_rec_link_lk_fsuid = -1;
577 static int hf_lustre_mdt_rec_link_lk_fsuid_h = -1;
578 static int hf_lustre_mdt_rec_link_lk_fsgid = -1;
579 static int hf_lustre_mdt_rec_link_lk_fsgid_h = -1;
580 static int hf_lustre_mdt_rec_link_lk_suppgid1 = -1;
581 static int hf_lustre_mdt_rec_link_lk_suppgid1_h = -1;
582 static int hf_lustre_mdt_rec_link_lk_suppgid2 = -1;
583 static int hf_lustre_mdt_rec_link_lk_suppgid2_h = -1;
584 static int hf_lustre_mdt_rec_link_lk_fid1 = -1;
585 static int hf_lustre_mdt_rec_link_lk_fid2 = -1;
586 static int hf_lustre_mdt_rec_link_lk_time = -1;
587 static int hf_lustre_mdt_rec_link_lk_padding_1 = -1;
588 static int hf_lustre_mdt_rec_link_lk_padding_2 = -1;
589 static int hf_lustre_mdt_rec_link_lk_padding_3 = -1;
590 static int hf_lustre_mdt_rec_link_lk_padding_4 = -1;
591 static int hf_lustre_mdt_rec_link_lk_bias = -1;
592 static int hf_lustre_mdt_rec_link_lk_padding_5 = -1;
593 static int hf_lustre_mdt_rec_link_lk_padding_6 = -1;
594 static int hf_lustre_mdt_rec_link_lk_padding_7 = -1;
595 static int hf_lustre_mdt_rec_link_lk_padding_8 = -1;
596 static int hf_lustre_mdt_rec_link_lk_padding_9 = -1;
597
598 static int hf_lustre_mdt_rec_unlink = -1 ;
599 static int hf_lustre_mdt_rec_unlink_ul_opcode = -1;
600 static int hf_lustre_mdt_rec_unlink_ul_cap = -1;
601 static int hf_lustre_mdt_rec_unlink_ul_fsuid = -1;
602 static int hf_lustre_mdt_rec_unlink_ul_fsuid_h = -1;
603 static int hf_lustre_mdt_rec_unlink_ul_fsgid = -1;
604 static int hf_lustre_mdt_rec_unlink_ul_fsgid_h = -1;
605 static int hf_lustre_mdt_rec_unlink_ul_suppgid1 = -1;
606 static int hf_lustre_mdt_rec_unlink_ul_suppgid1_h = -1;
607 static int hf_lustre_mdt_rec_unlink_ul_suppgid2 = -1;
608 static int hf_lustre_mdt_rec_unlink_ul_suppgid2_h = -1;
609 static int hf_lustre_mdt_rec_unlink_ul_fid1 = -1;
610 static int hf_lustre_mdt_rec_unlink_ul_fid2 = -1;
611 static int hf_lustre_mdt_rec_unlink_ul_time = -1;
612 static int hf_lustre_mdt_rec_unlink_ul_padding_2 = -1;
613 static int hf_lustre_mdt_rec_unlink_ul_padding_3 = -1;
614 static int hf_lustre_mdt_rec_unlink_ul_padding_4 = -1;
615 static int hf_lustre_mdt_rec_unlink_ul_padding_5 = -1;
616 static int hf_lustre_mdt_rec_unlink_ul_bias = -1;
617 static int hf_lustre_mdt_rec_unlink_ul_mode = -1;
618 static int hf_lustre_mdt_rec_unlink_ul_padding_6 = -1;
619 static int hf_lustre_mdt_rec_unlink_ul_padding_7 = -1;
620 static int hf_lustre_mdt_rec_unlink_ul_padding_8 = -1;
621 static int hf_lustre_mdt_rec_unlink_ul_padding_9 = -1;
622
623 static int hf_lustre_mdt_rec_rename = -1 ;
624 static int hf_lustre_mdt_rec_rename_rn_opcode = -1;
625 static int hf_lustre_mdt_rec_rename_rn_cap = -1;
626 static int hf_lustre_mdt_rec_rename_rn_fsuid = -1;
627 static int hf_lustre_mdt_rec_rename_rn_fsuid_h = -1;
628 static int hf_lustre_mdt_rec_rename_rn_fsgid = -1;
629 static int hf_lustre_mdt_rec_rename_rn_fsgid_h = -1;
630 static int hf_lustre_mdt_rec_rename_rn_suppgid1 = -1;
631 static int hf_lustre_mdt_rec_rename_rn_suppgid1_h = -1;
632 static int hf_lustre_mdt_rec_rename_rn_suppgid2 = -1;
633 static int hf_lustre_mdt_rec_rename_rn_suppgid2_h = -1;
634 static int hf_lustre_mdt_rec_rename_rn_fid1 = -1;
635 static int hf_lustre_mdt_rec_rename_rn_fid2 = -1;
636 static int hf_lustre_mdt_rec_rename_rn_time = -1;
637 static int hf_lustre_mdt_rec_rename_rn_padding_1 = -1;
638 static int hf_lustre_mdt_rec_rename_rn_padding_2 = -1;
639 static int hf_lustre_mdt_rec_rename_rn_padding_3 = -1;
640 static int hf_lustre_mdt_rec_rename_rn_padding_4 = -1;
641 static int hf_lustre_mdt_rec_rename_rn_bias = -1;
642 static int hf_lustre_mdt_rec_rename_rn_mode = -1;
643 static int hf_lustre_mdt_rec_rename_rn_padding_5 = -1;
644 static int hf_lustre_mdt_rec_rename_rn_padding_6 = -1;
645 static int hf_lustre_mdt_rec_rename_rn_padding_7 = -1;
646 static int hf_lustre_mdt_rec_rename_rn_padding_8 = -1;
647
648 static int hf_lustre_mdt_rec_setxattr = -1 ;
649 static int hf_lustre_mdt_rec_setxattr_sx_opcode = -1;
650 static int hf_lustre_mdt_rec_setxattr_sx_cap = -1;
651 static int hf_lustre_mdt_rec_setxattr_sx_fsuid = -1;
652 static int hf_lustre_mdt_rec_setxattr_sx_fsuid_h = -1;
653 static int hf_lustre_mdt_rec_setxattr_sx_fsgid = -1;
654 static int hf_lustre_mdt_rec_setxattr_sx_fsgid_h = -1;
655 static int hf_lustre_mdt_rec_setxattr_sx_suppgid1 = -1;
656 static int hf_lustre_mdt_rec_setxattr_sx_suppgid1_h = -1;
657 static int hf_lustre_mdt_rec_setxattr_sx_suppgid2 = -1;
658 static int hf_lustre_mdt_rec_setxattr_sx_suppgid2_h = -1;
659 static int hf_lustre_mdt_rec_setxattr_sx_fid = -1;
660 static int hf_lustre_mdt_rec_setxattr_sx_padding_1 = -1;
661 static int hf_lustre_mdt_rec_setxattr_sx_padding_2 = -1;
662 static int hf_lustre_mdt_rec_setxattr_sx_padding_3 = -1;
663 static int hf_lustre_mdt_rec_setxattr_sx_valid = -1;
664 static int hf_lustre_mdt_rec_setxattr_sx_time = -1;
665 static int hf_lustre_mdt_rec_setxattr_sx_padding_5 = -1;
666 static int hf_lustre_mdt_rec_setxattr_sx_padding_6 = -1;
667 static int hf_lustre_mdt_rec_setxattr_sx_padding_7 = -1;
668 static int hf_lustre_mdt_rec_setxattr_sx_size = -1;
669 static int hf_lustre_mdt_rec_setxattr_sx_flags = -1;
670 static int hf_lustre_mdt_rec_setxattr_sx_padding_8 = -1;
671 static int hf_lustre_mdt_rec_setxattr_sx_padding_9 = -1;
672 static int hf_lustre_mdt_rec_setxattr_sx_padding_10 = -1;
673 static int hf_lustre_mdt_rec_setxattr_sx_padding_11 = -1;
674
675 static int hf_lustre_seq_opc = -1;
676 static int hf_lustre_seq_range = -1;
677 static int hf_lustre_seq_range_start = -1;
678 static int hf_lustre_seq_range_end = -1;
679 static int hf_lustre_seq_range_index = -1;
680 static int hf_lustre_seq_range_flags = -1;
681
682 static int hf_lustre_fld_opc = -1;
683 static int hf_lustre_fld_range = -1;
684 static int hf_lustre_fld_range_start = -1;
685 static int hf_lustre_fld_range_end = -1;
686 static int hf_lustre_fld_range_index = -1;
687 static int hf_lustre_fld_range_flags = -1;
688
689 static int hf_lustre_mdt_ioepoch = -1;
690 static int hf_lustre_mdt_ioepoch_handle = -1;
691 static int hf_lustre_mdt_ioepoch_ioepoch = -1;
692 static int hf_lustre_mdt_ioepoch_flags = -1;
693 static int hf_lustre_mdt_ioepoch_padding = -1;
694
695 static int hf_lustre_capa = -1;
696 static int hf_lustre_capa_fid = -1;
697 static int hf_lustre_capa_opc = -1;
698 static int hf_lustre_capa_uid = -1;
699 static int hf_lustre_capa_gid = -1;
700 static int hf_lustre_capa_flags = -1;
701 static int hf_lustre_capa_keyid = -1;
702 static int hf_lustre_capa_timeout = -1;
703 static int hf_lustre_capa_expiry = -1;
704 static int hf_lustre_capa_hmac = -1;
705
706 static int hf_lustre_acl = -1;
707
708 static int hf_lustre_lustre_handle_cookie = -1;
709 static int hf_lustre_ptlrpc_body_pb_last_committed = -1;
710 static int hf_lustre_ptlrpc_body_pb_version = -1;
711 static int hf_lustre_lustre_msg_v1_lm_bufcount = -1;
712 static int hf_lustre_obd_ioobj_ioo_id = -1;
713 static int hf_lustre_ptlrpc_body_pb_slv = -1;
714 static int hf_lustre_ptlrpc_body_pb_pre_version = -1;
715 static int hf_lustre_ptlrpc_body_pb_padding = -1;
716 static int hf_lustre_ptlrpc_body_pb_jobid = -1;
717 static int hf_lustre_lustre_msg_v1_lm_handle = -1;
718 static int hf_lustre_ost_lvb_lvb_atime = -1;
719 static int hf_lustre_ptlrpc_body_pb_timeout = -1;
720 static int hf_lustre_obd_statfs_os_bavail = -1;
721 static int hf_lustre_obd_statfs_os_bsize = -1;
722 static int hf_lustre_lustre_msg_v2_lm_repsize = -1;
723 static int hf_lustre_lov_mds_md_v1_lmm_stripe_size = -1;
724 static int hf_lustre_lustre_msg_v1_lm_last_xid = -1;
725 static int hf_lustre_ll_fid_f_type = -1;
726 static int hf_lustre_lustre_msg_v2_lm_cksum = -1;
727 static int hf_lustre_lustre_msg_v2_lm_buflens = -1;
728 static int hf_lustre_lustre_msg_v1_lm_status = -1;
729 static int hf_lustre_lustre_msg_v1_lm_type = -1;
730 static int hf_lustre_niobuf_remote_len = -1;
731 static int hf_lustre_lov_mds_md_v1_lmm_magic = -1;
732 static int hf_lustre_ptlrpc_body_pb_op_flags = -1;
733 static int hf_lustre_ost_lvb_lvb_ctime = -1;
734 static int hf_lustre_ptlrpc_body_pb_type = -1;
735 static int hf_lustre_obd_connect_data_ocd_nllg = -1;
736 static int hf_lustre_obd_connect_data_ocd_nllu = -1;
737 static int hf_lustre_ll_fid_generation = -1;
738 static int hf_lustre_ost_lvb_lvb_mtime = -1;
739 static int hf_lustre_obd_connect_data_ocd_ibits_known = -1;
740 static int hf_lustre_lustre_msg_v2_lm_padding_3 = -1;
741 static int hf_lustre_ptlrpc_body_pb_flags = -1;
742 static int hf_lustre_obd_statfs_os_spare4 = -1;
743 static int hf_lustre_obd_connect_data_ocd_group = -1;
744 static int hf_lustre_lov_ost_data_v1_l_object_seq = -1;
745 static int hf_lustre_lov_mds_md_v1_lmm_object_seq = -1;
746 static int hf_lustre_obd_connect_data_ocd_brw_size = -1;
747 static int hf_lustre_ptlrpc_body_pb_limit = -1;
748 static int hf_lustre_obd_statfs_os_maxbytes = -1;
749 static int hf_lustre_obd_statfs_os_spare5 = -1;
750 static int hf_lustre_lustre_msg_v2_lm_flags = -1;
751 static int hf_lustre_obd_statfs_os_ffree = -1;
752 static int hf_lustre_obd_statfs_os_files = -1;
753 static int hf_lustre_lov_mds_md_v1_lmm_stripe_count = -1;
754 static int hf_lustre_lustre_msg_v1_lm_flags = -1;
755 static int hf_lustre_lustre_msg_v1_lm_last_committed = -1;
756 static int hf_lustre_obd_statfs_os_spare9 = -1;
757 static int hf_lustre_obd_connect_data_ocd_index = -1;
758 static int hf_lustre_opnum = -1;
759 static int hf_lustre_lustre_msg_v1_lm_buflens = -1;
760 static int hf_lustre_obd_statfs_os_spare1 = -1;
761 static int hf_lustre_obd_statfs_os_spare8 = -1;
762 static int hf_lustre_lustre_msg_v1_lm_conn_cnt = -1;
763 static int hf_lustre_ptlrpc_body_pb_transno = -1;
764 static int hf_lustre_ptlrpc_body_pb_service_time = -1;
765 static int hf_lustre_ptlrpc_body_pb_conn_cnt = -1;
766 static int hf_lustre_ptlrpc_body_pb_opc = -1;
767 static int hf_lustre_obd_connect_data_ocd_connect_flags = -1;
768 static int hf_lustre_lov_ost_data_v1_l_object_id = -1;
769 static int hf_lustre_lov_ost_data_v1_l_ost_gen = -1;
770 static int hf_lustre_obd_statfs_os_bfree = -1;
771 static int hf_lustre_obd_connect_data_ocd_version = -1;
772 static int hf_lustre_lov_mds_md_v1_lmm_objects = -1;
773 static int hf_lustre_obd_statfs_os_namelen = -1;
774 static int hf_lustre_obd_statfs_os_blocks = -1;
775 static int hf_lustre_lustre_msg_v2_lm_secflvr = -1;
776 static int hf_lustre_lustre_msg_v1_lm_transno = -1;
777 static int hf_lustre_lov_mds_md_v1_lmm_pattern = -1;
778 static int hf_lustre_lustre_msg_v1_lm_opc = -1;
779 static int hf_lustre_obd_connect_data_ocd_grant = -1;
780 static int hf_lustre_obd_ioobj_ioo_bufcnt = -1;
781 static int hf_lustre_lustre_msg_v1_lm_version = -1;
782 static int hf_lustre_obd_statfs_os_spare7 = -1;
783 static int hf_lustre_obd_statfs_os_fsid = -1;
784 static int hf_lustre_obd_connect_data_ocd_cksum_types = -1;
785 static int hf_lustre_ost_lvb_lvb_size = -1;
786 static int hf_lustre_obd_statfs_os_type = -1;
787 static int hf_lustre_obd_statfs_os_spare6 = -1;
788 static int hf_lustre_obd_statfs_os_state = -1;
789 static int hf_lustre_obd_statfs_os_spare3 = -1;
790 static int hf_lustre_lustre_msg_v2_lm_magic = -1;
791 static int hf_lustre_lov_mds_md_v1_lmm_object_id = -1;
792 static int hf_lustre_ptlrpc_body_pb_last_seen = -1;
793 static int hf_lustre_obd_ioobj_ioo_max_brw = -1;
794 static int hf_lustre_ptlrpc_body_pb_last_xid = -1;
795 static int hf_lustre_ptlrpc_body_pb_status = -1;
796 static int hf_lustre_niobuf_remote_flags = -1;
797 static int hf_lustre_ll_fid_id = -1;
798 static int hf_lustre_ost_lvb_lvb_blocks = -1;
799 static int hf_lustre_lustre_msg_v2_lm_padding_2 = -1;
800 static int hf_lustre_obd_connect_data_padding1 = -1;
801 static int hf_lustre_lov_ost_data_v1_l_ost_idx = -1;
802 static int hf_lustre_obd_connect_data_padding2 = -1;
803 static int hf_lustre_obd_ioobj_ioo_seq = -1;
804 static int hf_lustre_niobuf_remote_offset=-1;
805 static int hf_lustre_obd_statfs_os_spare2 = -1;
806 static int hf_lustre_lustre_msg_v2_lm_bufcount = -1;
807 static int hf_lustre_ptlrpc_body_pb_handle = -1;
808 static int hf_lustre_obd_connect_data_ocd_transno = -1;
809 static int hf_lustre_lustre_msg_v1_lm_magic = -1;
810 static int hf_lustre_llog_unlink_rec_lur_tail = -1;
811 static int hf_lustre_llog_size_change_rec_lsc_io_epoch = -1;
812 static int hf_lustre_mgs_target_info_mti_flags = -1;
813 static int hf_lustre_ldlm_reply_lock_policy_res1 = -1;
814 static int hf_lustre_llogd_body_lgd_len = -1;
815 static int hf_lustre_qunit_data_old_qd_id = -1;
816 static int hf_lustre_llog_logid_rec_padding1 = -1;
817 static int hf_lustre_quota_adjust_qunit_padding1 = -1;
818 static int hf_lustre_llog_size_change_rec_lsc_fid = -1;
819 static int hf_lustre_llog_rec_hdr_padding = -1;
820 static int hf_lustre_obdo_o_nlink = -1;
821 static int hf_lustre_ldlm_extent_gid = -1;
822 static int hf_lustre_obdo_o_uid = -1;
823 static int hf_lustre_obdo_o_valid = -1;
824 static int hf_lustre_ldlm_reply_lock_flags = -1;
825 static int hf_lustre_obdo_o_misc = -1;
826
827 static int hf_lustre_ldlm_request_lock_handle = -1;
828 static int hf_lustre_llog_logid_lgl_oid = -1;
829 static int hf_lustre_ldlm_inodebits_bits = -1;
830 static int hf_lustre_llog_log_hdr_llh_count = -1;
831 static int hf_lustre_llog_gen_rec_lgr_tail = -1;
832 static int hf_lustre_llog_catid_lci_padding3 = -1;
833 static int hf_lustre_qunit_data_qd_qunit = -1;
834 static int hf_lustre_llog_setattr_rec_padding = -1;
835 static int hf_lustre_llog_cookie_lgc_lgl = -1;
836 static int hf_lustre_obd_quotactl_qc_dqinfo = -1;
837 static int hf_lustre_llog_log_hdr_llh_bitmap = -1;
838 static int hf_lustre_obd_quotactl_qc_stat = -1;
839 static int hf_lustre_qunit_data_old2_qd_id = -1;
840 static int hf_lustre_llog_logid_rec_padding2 = -1;
841 static int hf_lustre_llog_logid_rec_padding5 = -1;
842 static int hf_lustre_ldlm_intent_opc = -1;
843 static int hf_lustre_llog_rec_hdr_lrh_type = -1;
844 static int hf_lustre_llog_rec_hdr_lrh_len = -1;
845 static int hf_lustre_llog_setattr_rec_lsr_uid = -1;
846 static int hf_lustre_lov_desc_ld_padding_1 = -1;
847 static int hf_lustre_obdo_o_padding_4 = -1;
848 static int hf_lustre_mgs_target_info_padding = -1;
849 static int hf_lustre_obd_quotactl_qc_dqblk = -1;
850 static int hf_lustre_llogd_conn_body_lgdc_gen = -1;
851 static int hf_lustre_llog_log_hdr_llh_tail = -1;
852 static int hf_lustre_obdo_o_size = -1;
853 static int hf_lustre_ldlm_extent_start = -1;
854 static int hf_lustre_llog_size_change_rec_lsc_hdr = -1;
855 static int hf_lustre_llog_logid_lgl_oseq = -1;
856 static int hf_lustre_llog_cookie_lgc_padding = -1;
857 static int hf_lustre_qunit_data_old_qd_type = -1;
858 static int hf_lustre_ldlm_flock_blocking_export = -1;
859 static int hf_lustre_lov_desc_ld_pattern = -1;
860 static int hf_lustre_qunit_data_qd_id = -1;
861 static int hf_lustre_mgs_target_info_mti_fsname = -1;
862 static int hf_lustre_ldlm_request_lock_flags = -1;
863 static int hf_lustre_obdo_o_mode = -1;
864 static int hf_lustre_mgs_target_info_mti_svname = -1;
865 static int hf_lustre_llogd_body_lgd_logid = -1;
866 static int hf_lustre_llog_log_hdr_llh_size = -1;
867 static int hf_lustre_obdo_o_handle = -1;
868 static int hf_lustre_obdo_o_atime = -1;
869 static int hf_lustre_quota_adjust_qunit_qaq_id = -1;
870 static int hf_lustre_ldlm_lock_desc_l_policy_data = -1;
871 static int hf_lustre_obd_quotactl_qc_cmd = -1;
872 static int hf_lustre_qunit_data_padding = -1;
873 static int hf_lustre_quota_adjust_qunit_qaq_flags = -1;
874 static int hf_lustre_ldlm_lock_desc_l_granted_mode = -1;
875 static int hf_lustre_obdo_o_seq = -1;
876 static int hf_lustre_obdo_o_gid = -1;
877 static int hf_lustre_llog_catid_lci_logid = -1;
878 static int hf_lustre_llog_rec_tail_lrt_index = -1;
879 static int hf_lustre_lov_desc_ld_default_stripe_count = -1;
880 static int hf_lustre_ldlm_resource_desc_lr_padding = -1;
881 static int hf_lustre_cfg_marker_cm_vers = -1;
882 static int hf_lustre_llog_unlink_rec_lur_hdr = -1;
883 static int hf_lustre_llogd_body_lgd_index = -1;
884 static int hf_lustre_cfg_marker_cm_tgtname = -1;
885 static int hf_lustre_llog_setattr_rec_lsr_ogen = -1;
886 static int hf_lustre_llog_logid_rec_lid_hdr = -1;
887 static int hf_lustre_obdo_o_ioepoch = -1;
888 static int hf_lustre_ost_body_oa = -1;
889 static int hf_lustre_llog_logid_rec_padding3 = -1;
890 static int hf_lustre_llog_log_hdr_llh_flags = -1;
891 static int hf_lustre_llog_setattr_rec_lsr_oid = -1;
892 static int hf_lustre_llog_size_change_rec_padding = -1;
893 static int hf_lustre_mgs_target_info_mti_config_ver = -1;
894 static int hf_lustre_cfg_marker_cm_createtime = -1;
895 static int hf_lustre_qunit_data_old_qd_count = -1;
896 static int hf_lustre_llog_catid_lci_padding1 = -1;
897 static int hf_lustre_lov_desc_ld_active_tgt_count = -1;
898 static int hf_lustre_obdo_o_lcookie = -1;
899 static int hf_lustre_llog_gen_rec_lgr_gen = -1;
900 static int hf_lustre_obdo_o_id = -1;
901 static int hf_lustre_mgs_target_info_mti_uuid = -1;
902 static int hf_lustre_llog_rec_hdr_lrh_index = -1;
903 static int hf_lustre_llog_setattr_rec_lsr_hdr = -1;
904 static int hf_lustre_mgs_target_info_mti_stripe_index = -1;
905 static int hf_lustre_llog_gen_conn_cnt = -1;
906 static int hf_lustre_obdo_o_padding_6 = -1;
907 static int hf_lustre_llog_cookie_lgc_index = -1;
908 static int hf_lustre_lov_desc_ld_uuid = -1;
909 static int hf_lustre_ldlm_reply_lock_desc = -1;
910 static int hf_lustre_lov_desc_ld_padding_0 = -1;
911 static int hf_lustre_llog_unlink_rec_lur_ogen = -1;
912 static int hf_lustre_cfg_marker_cm_flags = -1;
913 static int hf_lustre_obdo_o_padding_3 = -1;
914 static int hf_lustre_ldlm_request_lock_desc = -1;
915 static int hf_lustre_obdo_o_flags = -1;
916 static int hf_lustre_mgs_target_info_mti_params = -1;
917 static int hf_lustre_llog_logid_lgl_ogen = -1;
918 static int hf_lustre_cfg_marker_cm_comment = -1;
919 static int hf_lustre_llog_unlink_rec_lur_oid = -1;
920 static int hf_lustre_qunit_data_qd_count = -1;
921 static int hf_lustre_obdo_o_mtime = -1;
922 static int hf_lustre_obdo_o_blksize = -1;
923 static int hf_lustre_ldlm_res_id_name = -1;
924 static int hf_lustre_ldlm_reply_lock_handle = -1;
925 static int hf_lustre_llogd_body_lgd_saved_index = -1;
926 static int hf_lustre_qunit_data_old_qd_isblk = -1;
927 static int hf_lustre_obdo_o_blocks = -1;
928 static int hf_lustre_lov_desc_ld_padding_2 = -1;
929 static int hf_lustre_llog_logid_rec_lid_tail = -1;
930 static int hf_lustre_obdo_o_grant = -1;
931 static int hf_lustre_obdo_o_uid_h = -1;
932 static int hf_lustre_obdo_o_gid_h = -1;
933 static int hf_lustre_quota_adjust_qunit_qaq_iunit_sz = -1;
934 static int hf_lustre_llog_unlink_rec_padding = -1;
935 static int hf_lustre_ldlm_lock_desc_l_req_mode = -1;
936 static int hf_lustre_ldlm_extent_end = -1;
937 static int hf_lustre_llog_gen_rec_lgr_hdr = -1;
938 static int hf_lustre_llogd_body_lgd_llh_flags = -1;
939 static int hf_lustre_llog_log_hdr_llh_cat_idx = -1;
940 static int hf_lustre_llog_log_hdr_llh_bitmap_offset=-1;
941 static int hf_lustre_ldlm_reply_lock_padding = -1;
942 static int hf_lustre_obd_quotactl_qc_id = -1;
943 static int hf_lustre_llog_logid_rec_padding4 = -1;
944 static int hf_lustre_llog_setattr_rec_lsr_gid = -1;
945 static int hf_lustre_obd_quotactl_qc_type = -1;
946 static int hf_lustre_cfg_marker_padding = -1;
947 static int hf_lustre_mgs_target_info_mti_nids = -1;
948 static int hf_lustre_obdo_o_stripe_idx = -1;
949 static int hf_lustre_llogd_conn_body_lgdc_logid = -1;
950 static int hf_lustre_ldlm_flock_blocking_pid = -1;
951 static int hf_lustre_lov_desc_ld_tgt_count = -1;
952 static int hf_lustre_llogd_body_lgd_cur_offset=-1;
953 static int hf_lustre_qunit_data_old2_qd_count = -1;
954 static int hf_lustre_qunit_data_old2_qd_flags = -1;
955 static int hf_lustre_ldlm_flock_start = -1;
956 static int hf_lustre_quota_adjust_qunit_qaq_bunit_sz = -1;
957 static int hf_lustre_ldlm_flock_pid = -1;
958 static int hf_lustre_lov_desc_ld_default_stripe_size = -1;
959 static int hf_lustre_llog_log_hdr_llh_tgtuuid = -1;
960 static int hf_lustre_cfg_marker_cm_step = -1;
961 static int hf_lustre_mgs_send_param_mgs_param = -1;
962 static int hf_lustre_lov_desc_ld_default_stripe_offset=-1;
963 static int hf_lustre_ldlm_resource_desc_lr_name = -1;
964 static int hf_lustre_llog_rec_tail_lrt_len = -1;
965 static int hf_lustre_llog_log_hdr_llh_timestamp = -1;
966 static int hf_lustre_llog_catid_lci_padding2 = -1;
967 static int hf_lustre_llogd_conn_body_lgdc_ctxt_idx = -1;
968 static int hf_lustre_cfg_marker_cm_canceltime = -1;
969 static int hf_lustre_mgs_target_info_mti_lustre_ver = -1;
970 static int hf_lustre_obdo_o_parent_ver = -1;
971 static int hf_lustre_qunit_data_qd_flags = -1;
972 static int hf_lustre_llog_logid_rec_lid_id = -1;
973 static int hf_lustre_obdo_o_parent_oid = -1;
974 static int hf_lustre_llog_gen_mnt_cnt = -1;
975 static int hf_lustre_llog_size_change_rec_lsc_tail = -1;
976 static int hf_lustre_obdo_o_padding_5 = -1;
977 static int hf_lustre_ldlm_lock_desc_l_resource = -1;
978 static int hf_lustre_obdo_o_parent_seq = -1;
979 static int hf_lustre_ldlm_request_lock_count = -1;
980 static int hf_lustre_ldlm_flock_end = -1;
981 static int hf_lustre_mgs_target_info_mti_nid_count = -1;
982 static int hf_lustre_obdo_o_ctime = -1;
983 static int hf_lustre_ldlm_reply_lock_policy_res2 = -1;
984 static int hf_lustre_llogd_body_lgd_ctxt_idx = -1;
985 static int hf_lustre_lov_desc_ld_qos_maxage = -1;
986 static int hf_lustre_ldlm_resource_desc_lr_type = -1;
987 static int hf_lustre_llog_setattr_rec_lsr_tail = -1;
988 static int hf_lustre_llog_cookie_lgc_subsys = -1;
989 static int hf_lustre_llog_log_hdr_llh_hdr = -1;
990 static int hf_lustre_llog_log_hdr_llh_reserved = -1;
991
992 /* Header field declarations for field from lustre_user.h*/
993 static int hf_lustre_obd_dqinfo_dqi_valid = -1;
994 static int hf_lustre_obd_dqblk_dqb_isoftlimit = -1;
995 static int hf_lustre_obd_dqblk_dqb_bhardlimit = -1;
996 static int hf_lustre_obd_dqblk_dqb_curspace = -1;
997 static int hf_lustre_obd_dqblk_dqb_itime = -1;
998 static int hf_lustre_obd_dqblk_dqb_valid = -1;
999 static int hf_lustre_obd_dqinfo_dqi_igrace = -1;
1000 static int hf_lustre_obd_dqinfo_dqi_bgrace = -1;
1001 static int hf_lustre_obd_dqblk_padding = -1;
1002 static int hf_lustre_obd_dqblk_dqb_curinodes = -1;
1003 static int hf_lustre_obd_dqblk_dqb_bsoftlimit = -1;
1004 static int hf_lustre_obd_dqinfo_dqi_flags = -1;
1005 static int hf_lustre_obd_dqblk_dqb_btime = -1;
1006 static int hf_lustre_obd_dqblk_dqb_ihardlimit = -1;
1007 static int hf_lustre_ldlm_intent_opc_open     = -1 ;
1008 static int hf_lustre_ldlm_intent_opc_creat    = -1;
1009 static int hf_lustre_ldlm_intent_opc_readdir  = -1;
1010 static int hf_lustre_ldlm_intent_opc_getattr  = -1;
1011 static int hf_lustre_ldlm_intent_opc_lookup   = -1;
1012 static int hf_lustre_ldlm_intent_opc_unlink   = -1;
1013 static int hf_lustre_ldlm_intent_opc_getxattr = -1;
1014 static int hf_lustre_ldlm_intent_opc_exec     = -1;
1015 static int hf_lustre_ldlm_intent_opc_pin      = -1;
1016 static int hf_lustre_llog_hdr_llh_flag_zap_when_empty = -1;
1017 static int hf_lustre_llog_hdr_llh_flag_is_cat = -1;
1018 static int hf_lustre_llog_hdr_llh_flag_is_play = -1;
1019 /* --------------------------------------------------------------------*/
1020
1021
1022 /* proto declaration */
1023 static gint proto_lustre = -1;
1024
1025
1026
1027
1028 static int ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint64 intent_opc _U_) ;
1029 static int lustre_dissect_element_ldlm_lock_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_);
1030 static int add_extra_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_) ;
1031
1032
1033 /* ======================================================================== */
1034 /*the value_string*/
1035 const value_string lustre_ldlm_opcode[] = {
1036   { IT_OPEN    ,   "IT_OPEN    "},
1037   { IT_CREAT   ,   "IT_CREAT   "},
1038   { IT_READDIR ,   "IT_READDIR "},
1039   { IT_GETATTR ,   "IT_GETATTR "},
1040   { IT_LOOKUP  ,   "IT_LOOKUP  "},
1041   { IT_UNLINK  ,   "IT_UNLINK  "},
1042   { IT_GETXATTR,   "IT_GETXATTR"},
1043   { IT_EXEC    ,   "IT_EXEC    "},
1044   { IT_PIN     ,   "IT_PIN     "},
1045   { 0, NULL }
1046 };
1047
1048 const value_string lustre_lov_magic[] = {
1049   { LOV_MAGIC_V1,   "LOV_MAGIC_V1" },
1050   {0, NULL}
1051 };
1052
1053 const value_string lustre_llog_op_type[] = {
1054   {LLOG_PAD_MAGIC   ,"LLOG_PAD_MAGIC  "},
1055   {OST_SZ_REC       ,"OST_SZ_REC      "},
1056   {OST_RAID1_REC    ,"OST_RAID1_REC   "},
1057   {MDS_UNLINK_REC   ,"MDS_UNLINK_REC  "},
1058   {MDS_SETATTR_REC  ,"MDS_SETATTR_REC "},
1059   {OBD_CFG_REC      ,"OBD_CFG_REC     "},
1060   {PTL_CFG_REC      ,"PTL_CFG_REC     "},
1061   {LLOG_GEN_REC     ,"LLOG_GEN_REC    "},
1062   {LLOG_JOIN_REC    ,"LLOG_JOIN_REC   "},
1063   {LLOG_HDR_MAGIC   ,"LLOG_HDR_MAGIC  "},
1064   {LLOG_LOGID_MAGIC ,"LLOG_LOGID_MAGIC"},
1065   { 0, NULL }
1066 };
1067
1068 const value_string lustre_llog_hdr_llh_flags[]= {
1069   {LLOG_F_ZAP_WHEN_EMPTY , "LLOhdr_llh_G_F_ZAP_WHEN_EMPTY"},
1070   {LLOG_F_IS_CAT         , "LLOhdr_llh_G_F_IS_CAT"},
1071   {LLOG_F_IS_PLAIN       , "LLOG_F_IS_PLAIN"},
1072   { 0, NULL }
1073 };
1074
1075 const value_string lustre_mds_flags_vals[] = {
1076   {0x1,        "LUSTRE_BFLAG_UNCOMMITTED_WRITES"},
1077   {0x80000000, "LUSTRE_BFLAG_EXT_FLAGS"},   /* == EXT3_RESERVED_FL */
1078   {0x00000008, "LUSTRE_SYNC_FL        "},   /* Synchronous updates */
1079   {0x00000010, "LUSTRE_IMMUTABLE_FL   "},   /* Immutable file */
1080   {0x00000020, "LUSTRE_APPEND_FL      "},   /* writes to file may only append */
1081   {0x00000080, "LUSTRE_NOATIME_FL     "},   /* do not update atime */
1082   {0x00010000, "LUSTRE_DIRSYNC_FL     "},   /* dirsync behaviour (dir only) */
1083   { 0, NULL }
1084 };
1085
1086 const value_string lustre_mgs_config_body_types[] = {
1087   { 0,  "CONFIG" },
1088   { 1,  "SPTLRPC" },
1089   { 2,  "RECOVER" },
1090   { 3,  "MAX" },
1091   { 0, NULL }
1092 };
1093
1094 const value_string lustre_LMTypes[] = {
1095   { PTL_RPC_MSG_REQUEST, "request"},
1096   { PTL_RPC_MSG_ERR , "error"},
1097   { PTL_RPC_MSG_REPLY , "reply"},
1098   { 0, NULL }
1099 };
1100
1101 const value_string lustre_mds_reint_t_vals[] = {
1102   { REINT_SETATTR, "REINT_SETATTR" },
1103   { REINT_CREATE, "REINT_CREATE" },
1104   { REINT_LINK, "REINT_LINK" },
1105   { REINT_UNLINK, "REINT_UNLINK" },
1106   { REINT_RENAME, "REINT_RENAME" },
1107   { REINT_OPEN, "REINT_OPEN" },
1108   { REINT_SETXATTR, "REINT_SETXATTR" },
1109   { 0, NULL }
1110 };
1111 const value_string lustre_op_codes[] = {
1112   /*OST Opcodes*/
1113   {0 , "OST_REPLY"},
1114   {1 , "OST_GETATTR"},
1115   {2 , "OST_SETATTR"},
1116   {3 , "OST_READ"},
1117   {4 , "OST_WRITE"},
1118   {5 , "OST_CREATE"},
1119   {6 , "OST_DESTROY"},
1120   {7 , "OST_GET_INFO"},
1121   {8 , "OST_CONNECT"},
1122   {9 , "OST_DISCONNECT"},
1123   {10 , "OST_PUNCH"},
1124   {11 , "OST_OPEN"},
1125   {12 , "OST_CLOSE"},
1126   {13 , "OST_STATFS"},
1127   {14 , "OST_SAN_READ(deprecated)"},
1128   {15 , "OST_SAN_WRITE(deprecated)"},
1129   {16 , "OST_SYNC"},
1130   {17 , "OST_SET_INFO"},
1131   {18 , "OST_QUOTACHECK"},
1132   {19 , "OST_QUOTACTL"},
1133   {20 , "OST_LAST_OPC"},
1134   /*MDS Opcodes*/
1135   {33 , "MDS_GETATTR"},
1136   {34 , "MDS_GETATTR_NAME"},
1137   {35 , "MDS_CLOSE"},
1138   {36 , "MDS_REINT"},
1139   {37 , "MDS_READPAGE"},
1140   {38 , "MDS_CONNECT"},
1141   {39 , "MDS_DISCONNECT"},
1142   {40 , "MDS_GETSTATUS"},
1143   {41 , "MDS_STATFS"},
1144   {42 , "MDS_PIN"},
1145   {43 , "MDS_UNPIN"},
1146   {44 , "MDS_SYNC"},
1147   {45 , "MDS_DONE_WRITING"},
1148   {46 , "MDS_SET_INFO"},
1149   {47 , "MDS_QUOTACHECK"},
1150   {48 , "MDS_QUOTACTL"},
1151   {49 , "MDS_GETXATTR"},
1152   {50 , "MDS_SETXATTR"},
1153   {51 , "MDS_LAST_OPC"},
1154   /*LDLM Opcodes*/
1155   {101 , "LDLM_ENQUEUE"},
1156   {102 , "LDLM_CONVERT"},
1157   {103 , "LDLM_CANCEL"},
1158   {104 , "LDLM_BL_CALLBACK"},
1159   {105 , "LDLM_CP_CALLBACK"},
1160   {106 , "LDLM_GL_CALLBACK"},
1161   {107 , "LDLM_LAST_OPC"},
1162   /*MGS Opcodes*/
1163   {250 , "MGS_CONNECT"},
1164   {251 , "MGS_DISCONNECT"},
1165   {252 , "MGS_EXCEPTION"},
1166   {253 , "MGS_TARGET_REG"},
1167   {254 , "MGS_TARGET_DEL"},
1168   {255 , "MGS_SET_INFO"},
1169   {256 , "MGS_CONFIG_READ"},
1170   {257 , "MGS_LAST_OPC"},
1171   /*OBD Opcodes*/
1172   {400 , "OBD_PING"},
1173   {401 , "OBD_LOG_CANCEL"},
1174   {402 , "OBD_QC_CALLBACK"},
1175   {403 , "OBD_LAST_OPC"},
1176   /* LLOG opcodes */
1177   { 501, "LLOG_ORIGIN_HANDLE_CREATE"},
1178   { 502, "LLOG_ORIGIN_HANDLE_NEXT_BLOCK"},
1179   { 503, "LLOG_ORIGIN_HANDLE_READ_HEADER"},
1180   { 504, "LLOG_ORIGIN_HANDLE_WRITE_REC"},
1181   { 505, "LLOG_ORIGIN_HANDLE_CLOSE"},
1182   { 506, "LLOG_ORIGIN_CONNECT"},
1183   { 507, "LLOG_CATINFO"},
1184   { 508, "LLOG_ORIGIN_HANDLE_PREV_BLOCK"},
1185   { 509, "LLOG_ORIGIN_HANDLE_DESTROY"},
1186   /* SEQ RPC opcodes */
1187   { 700, "SEQ_QUERY"},
1188   { 701, "SEQ_LAST_OPC"},
1189   /* FLD RPC opcodes */
1190   { 900, "FLD_QUERY"},
1191   { 901, "FLD_LAST_OPC"},
1192   { 0, NULL }
1193 };
1194 /*const value_string lustre_ldlm_mode_t_vals[] = {*/
1195 /*    { LCK_MINMODE, "MINMODE" },*/
1196 /*    { LCK_EX, "EX" },*/
1197 /*    { LCK_PW, "PW" },*/
1198 /*    { LCK_PR, "PR" },*/
1199 /*    { LCK_CW, "CW" },*/
1200 /*    { LCK_CR, "CR" },*/
1201 /*    { LCK_NL, "NL" },*/
1202 /*    { LCK_GROUP, "GROUP" },*/
1203 /*    { 0, NULL }*/
1204 /*};*/
1205
1206 /* detailled version the information came from : http://wiki.lustre.org/images/e/e5/LustreInternals_Architecture.pdf */
1207 const value_string lustre_ldlm_mode_t_vals[] = {
1208   { LCK_MINMODE, "MINMODE" },
1209   { LCK_EX, "Exclusive" },
1210   { LCK_PW, "Protected Write" },
1211   { LCK_PR, "Protected Read" },
1212   { LCK_CW, "Concurrent Write" },
1213   { LCK_CR, "Concurrent Read" },
1214   { LCK_NL, "Null" },
1215   { LCK_GROUP, "GROUP" },
1216   { 0, NULL }
1217 };
1218
1219 const value_string lustre_ldlm_type_t_vals[] = {
1220   { LDLM_PLAIN, "LDLM_PLAIN" },
1221   { LDLM_EXTENT,"LDLM_EXTENT" },
1222   { LDLM_FLOCK, "LDLM_FLOCK" },
1223   { LDLM_IBITS, "LDLM_IBITS" },
1224   { 0, NULL }
1225 };
1226
1227
1228 const value_string lustre_llog_cmd_t_vals[] = {
1229   { LLOG_ORIGIN_HANDLE_CREATE, "LLOG_ORIGIN_HANDLE_CREATE" },
1230   { LLOG_ORIGIN_HANDLE_NEXT_BLOCK, "LLOG_ORIGIN_HANDLE_NEXT_BLOCK" },
1231   { LLOG_ORIGIN_HANDLE_READ_HEADER, "LLOG_ORIGIN_HANDLE_READ_HEADER" },
1232   { LLOG_ORIGIN_HANDLE_WRITE_REC, "LLOG_ORIGIN_HANDLE_WRITE_REC" },
1233   { LLOG_ORIGIN_HANDLE_CLOSE, "LLOG_ORIGIN_HANDLE_CLOSE" },
1234   { LLOG_ORIGIN_CONNECT, "LLOG_ORIGIN_CONNECT" },
1235   { LLOG_CATINFO, "LLOG_CATINFO" },
1236   { LLOG_ORIGIN_HANDLE_PREV_BLOCK, "LLOG_ORIGIN_HANDLE_PREV_BLOCK" },
1237   { LLOG_ORIGIN_HANDLE_DESTROY, "LLOG_ORIGIN_HANDLE_DESTROY" },
1238   { 0, NULL }
1239 };
1240
1241 #ifndef ENABLE_STATIC
1242 const gchar version[] = VERSION;
1243
1244 /* Start the functions we need for the plugin stuff */
1245
1246 void
1247 plugin_register(void)
1248 {
1249         extern void proto_register_dcerpc_lustre(void);
1250
1251         proto_register_dcerpc_lustre();
1252 }
1253
1254 void
1255 plugin_reg_handoff(void)
1256 {
1257         extern void proto_reg_handoff_lustre(void);
1258
1259         proto_reg_handoff_lustre();
1260 }
1261 #endif
1262
1263
1264 /* ------------------------------------------------------------------- */
1265 /*                display  functions                                   */
1266 /* ------------------------------------------------------------------- */
1267 /* display str in left corner and in COL */
1268 /* TODO : do we need to use inline here ?*/
1269 /* @gint col :  the col where we add the information */
1270 inline static void display_info_str(proto_item *pi, column_info *cinfo, gint col, const gchar* str)
1271 {
1272   if (NULL !=pi)
1273     proto_item_append_text(pi, str);
1274
1275   if (NULL !=cinfo)
1276     if (check_col(cinfo, col))
1277       col_append_str(cinfo, col, str);
1278 }
1279
1280 /*
1281  * Need to be (re)written
1282  */
1283 static void display_info_fstr(proto_item *pi, column_info *cinfo, gint col, const char* format, const gchar * str){
1284
1285   if (NULL !=pi){
1286     //va_start(ap, format);
1287     proto_item_append_text(pi, format, str);
1288     //va_end(ap);
1289   }
1290
1291   if (NULL !=cinfo){
1292     if (check_col(cinfo, col)){
1293       //   va_list ap;
1294       //  va_start(ap, format);
1295       col_append_fstr(cinfo, col,  format, str);
1296       // va_end(ap);
1297     }
1298   }
1299 }
1300
1301
1302 /* ------------------------------ basic dissect functions ------------------------      */
1303 static int
1304 dissect_uint64
1305 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1306 {
1307   proto_tree_add_item(tree, hfindex, tvb, offset, 8, TRUE);
1308   return offset+8;
1309 }
1310
1311 static int
1312 dissect_uint32
1313 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1314 {
1315   proto_tree_add_item(tree, hfindex, tvb, offset, 4, TRUE);
1316   return offset+4;
1317 }
1318
1319 static int
1320 dissect_uint16
1321 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1322 {
1323   proto_tree_add_item(tree, hfindex, tvb, offset, 2, TRUE);
1324   return offset+2;
1325 }
1326
1327 static int
1328 dissect_uint8
1329 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1330 {
1331   proto_tree_add_item(tree, hfindex, tvb, offset, 1, TRUE);
1332   return offset+1;
1333 }
1334 /* -------------------------------------------------------------------------    */
1335
1336 /* dissect raw data */
1337 static int
1338 lustre_dissect_element_data(tvbuff_t *tvb _U_, int offset _U_,
1339                             packet_info *pinfo _U_, proto_tree *parent_tree _U_,
1340                             int hf_index _U_, guint32 buf_num)
1341 {
1342   proto_item *item = NULL;
1343
1344   guint32 data_len;
1345   int old_offset;
1346
1347   old_offset = offset;
1348
1349   data_len = LUSTRE_BUFFER_LEN(buf_num);
1350   if (data_len == 0)
1351     return offset;
1352
1353   proto_tree_add_item(parent_tree, hf_index, tvb, offset, data_len, TRUE);
1354
1355   offset += data_len;
1356   proto_item_set_len(item, offset-old_offset);
1357   offset = add_extra_padding(tvb, offset, pinfo, parent_tree);
1358
1359   return offset;
1360 }
1361
1362 int
1363 lustre_dissect_struct_hmac(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
1364                            proto_tree *parent_tree _U_, int hf_index _U_, int max_length)
1365 {
1366   int i;
1367   int val;
1368   proto_item *item = NULL;
1369
1370   item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 0, TRUE);
1371   for (i=0; i < max_length; ++i) {
1372     val = tvb_get_guint8(tvb, offset+i);
1373     proto_item_append_text(item, (i) ? "%02x" : ": %#02x", val);
1374   }
1375
1376   offset += max_length;
1377   proto_item_set_len(item, max_length);
1378   return offset;
1379 }
1380
1381 /* ------------------------------------------------------------------------ */
1382
1383
1384
1385 /* IDL: struct lustre_handle { */
1386 /* IDL:         uint64 cookie; */
1387 /* IDL: } */
1388
1389 static int
1390 lustre_dissect_element_handle_cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1391 {
1392   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lustre_handle_cookie);
1393
1394   return offset;
1395 }
1396
1397 int
1398 lustre_dissect_struct_handle_cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1399 {
1400   proto_item *item = NULL;
1401   proto_tree *tree = NULL;
1402   int old_offset;
1403
1404   old_offset=offset;
1405
1406   if (parent_tree) {
1407     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1408     tree = proto_item_add_subtree(item, ett_lustre_lustre_handle_cookie);
1409   }
1410
1411   offset=lustre_dissect_element_handle_cookie(tvb, offset, pinfo, tree);
1412
1413
1414   proto_item_set_len(item, offset-old_offset);
1415
1416   return offset;
1417 }
1418
1419 /* IDL: struct obd_connect_data { */
1420 /* IDL:         uint64 ocd_connect_flags; */
1421 /* IDL:         uint32 ocd_version; */
1422 /* IDL:         uint32 ocd_grant; */
1423 /* IDL:         uint32 ocd_index; */
1424 /* IDL:         uint32 ocd_brw_size; */
1425 /* IDL:         uint64 ocd_ibits_known; */
1426 /* IDL:         uint32 ocd_nllu; */
1427 /* IDL:         uint32 ocd_nllg; */
1428 /* IDL:         uint64 ocd_transno; */
1429 /* IDL:         uint32 ocd_group; */
1430 /* IDL:         uint32 ocd_cksum_types; */
1431 /* IDL:         uint64 padding1; */
1432 /* IDL:         uint64 padding2; */
1433 /* IDL: } */
1434
1435 static int
1436 lustre_dissect_element_obd_connect_data_ocd_connect_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1437 {
1438   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_connect_flags);
1439
1440   return offset;
1441 }
1442
1443 static int
1444 lustre_dissect_element_obd_connect_data_ocd_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1445 {
1446   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_version);
1447
1448   return offset;
1449 }
1450
1451 static int
1452 lustre_dissect_element_obd_connect_data_ocd_grant(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1453 {
1454   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_grant);
1455
1456   return offset;
1457 }
1458
1459 static int
1460 lustre_dissect_element_obd_connect_data_ocd_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1461 {
1462   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_index);
1463
1464   return offset;
1465 }
1466
1467 static int
1468 lustre_dissect_element_obd_connect_data_ocd_brw_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1469 {
1470   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_brw_size);
1471
1472   return offset;
1473 }
1474
1475 static int
1476 lustre_dissect_element_obd_connect_data_ocd_ibits_known(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1477 {
1478   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_ibits_known);
1479
1480   return offset;
1481 }
1482
1483 static int
1484 lustre_dissect_element_obd_connect_data_ocd_nllu(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1485 {
1486   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_nllu);
1487
1488   return offset;
1489 }
1490
1491 static int
1492 lustre_dissect_element_obd_connect_data_ocd_nllg(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1493 {
1494   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_nllg);
1495
1496   return offset;
1497 }
1498
1499 static int
1500 lustre_dissect_element_obd_connect_data_ocd_transno(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1501 {
1502   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_transno);
1503
1504   return offset;
1505 }
1506
1507 static int
1508 lustre_dissect_element_obd_connect_data_ocd_group(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1509 {
1510   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_group);
1511
1512   return offset;
1513 }
1514
1515 static int
1516 lustre_dissect_element_obd_connect_data_ocd_cksum_types(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1517 {
1518   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_cksum_types);
1519
1520   return offset;
1521 }
1522
1523 static int
1524 lustre_dissect_element_obd_connect_data_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1525 {
1526   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_padding1);
1527
1528   return offset;
1529 }
1530
1531 static int
1532 lustre_dissect_element_obd_connect_data_padding2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1533 {
1534   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_padding2);
1535
1536   return offset;
1537 }
1538
1539 static int
1540 lustre_dissect_struct_obd_connect_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1541 {
1542   proto_item *item = NULL;
1543   proto_tree *tree = NULL;
1544   int old_offset;
1545
1546
1547
1548   old_offset=offset;
1549
1550   if (parent_tree) {
1551     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1552     tree = proto_item_add_subtree(item, ett_lustre_obd_connect_data);
1553   }
1554
1555   offset=lustre_dissect_element_obd_connect_data_ocd_connect_flags(tvb, offset, pinfo, tree);
1556
1557   offset=lustre_dissect_element_obd_connect_data_ocd_version(tvb, offset, pinfo, tree);
1558
1559   offset=lustre_dissect_element_obd_connect_data_ocd_grant(tvb, offset, pinfo, tree);
1560
1561   offset=lustre_dissect_element_obd_connect_data_ocd_index(tvb, offset, pinfo, tree);
1562
1563   offset=lustre_dissect_element_obd_connect_data_ocd_brw_size(tvb, offset, pinfo, tree);
1564
1565   offset=lustre_dissect_element_obd_connect_data_ocd_ibits_known(tvb, offset, pinfo, tree);
1566
1567   offset=lustre_dissect_element_obd_connect_data_ocd_nllu(tvb, offset, pinfo, tree);
1568
1569   offset=lustre_dissect_element_obd_connect_data_ocd_nllg(tvb, offset, pinfo, tree);
1570
1571   offset=lustre_dissect_element_obd_connect_data_ocd_transno(tvb, offset, pinfo, tree);
1572
1573   offset=lustre_dissect_element_obd_connect_data_ocd_group(tvb, offset, pinfo, tree);
1574
1575   offset=lustre_dissect_element_obd_connect_data_ocd_cksum_types(tvb, offset, pinfo, tree);
1576
1577   offset=lustre_dissect_element_obd_connect_data_padding1(tvb, offset, pinfo, tree);
1578
1579   offset=lustre_dissect_element_obd_connect_data_padding2(tvb, offset, pinfo, tree);
1580
1581
1582   proto_item_set_len(item, offset-old_offset);
1583
1584   return offset;
1585 }
1586
1587
1588 /* IDL: struct lov_ost_data_v1 { */
1589 /* IDL:         uint64 l_object_id; */
1590 /* IDL:         uint64 l_object_seq; */
1591 /* IDL:         uint32 l_ost_gen; */
1592 /* IDL:         uint32 l_ost_idx; */
1593 /* IDL: } */
1594
1595 static int
1596 lustre_dissect_element_lov_ost_data_v1_l_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1597 {
1598   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_object_id);
1599
1600   return offset;
1601 }
1602
1603 static int
1604 lustre_dissect_element_lov_ost_data_v1_l_object_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1605 {
1606   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_object_seq);
1607
1608   return offset;
1609 }
1610
1611 static int
1612 lustre_dissect_element_lov_ost_data_v1_l_ost_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1613 {
1614   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_ost_gen);
1615
1616   return offset;
1617 }
1618
1619 static int
1620 lustre_dissect_element_lov_ost_data_v1_l_ost_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1621 {
1622   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_ost_idx);
1623
1624   return offset;
1625 }
1626
1627 int
1628 lustre_dissect_struct_lov_ost_data_v1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1629 {
1630   proto_item *item = NULL;
1631   proto_tree *tree = NULL;
1632   int old_offset;
1633
1634
1635
1636   old_offset=offset;
1637
1638   if (parent_tree) {
1639     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1640     tree = proto_item_add_subtree(item, ett_lustre_lov_ost_data_v1);
1641   }
1642
1643   offset=lustre_dissect_element_lov_ost_data_v1_l_object_id(tvb, offset, pinfo, tree);
1644
1645   offset=lustre_dissect_element_lov_ost_data_v1_l_object_seq(tvb, offset, pinfo, tree);
1646
1647   offset=lustre_dissect_element_lov_ost_data_v1_l_ost_gen(tvb, offset, pinfo, tree);
1648
1649   offset=lustre_dissect_element_lov_ost_data_v1_l_ost_idx(tvb, offset, pinfo, tree);
1650
1651
1652   proto_item_set_len(item, offset-old_offset);
1653
1654   return offset;
1655 }
1656
1657 /* IDL: struct lov_mds_md_v1 { */
1658 /* IDL:         uint32 lmm_magic; */
1659 /* IDL:         uint32 lmm_pattern; */
1660 /* IDL:         uint64 lmm_object_id; */
1661 /* IDL:         uint64 lmm_object_seq; */
1662 /* IDL:         uint32 lmm_stripe_size; */
1663 /* IDL:         uint32 lmm_stripe_count; */
1664 /* IDL:         struct lov_ost_data_v1 { */
1665 /* IDL: } lmm_objects[0]; <-- en fait on en a lmm_stripe_count */
1666 /* IDL: } */
1667
1668 static int
1669 lustre_dissect_element_lov_mds_md_v1_lmm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1670 {
1671   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_magic);
1672
1673   return offset;
1674 }
1675
1676 static int
1677 lustre_dissect_element_lov_mds_md_v1_lmm_pattern(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1678 {
1679   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_pattern);
1680
1681   return offset;
1682 }
1683
1684 static int
1685 lustre_dissect_element_lov_mds_md_v1_lmm_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1686 {
1687   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_object_id);
1688
1689   return offset;
1690 }
1691
1692 static int
1693 lustre_dissect_element_lov_mds_md_v1_lmm_object_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1694 {
1695   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_object_seq);
1696
1697   return offset;
1698 }
1699
1700 static int
1701 lustre_dissect_element_lov_mds_md_v1_lmm_stripe_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1702 {
1703   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_stripe_size);
1704
1705   return offset;
1706 }
1707
1708 static int
1709 lustre_dissect_element_lov_mds_md_v1_lmm_stripe_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1710 {
1711   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_stripe_count);
1712
1713   return offset;
1714 }
1715
1716 static int
1717 lustre_dissect_element_lov_mds_md_v1_lmm_objects_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1718 {
1719   offset=lustre_dissect_struct_lov_ost_data_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1_lmm_objects);
1720   return offset;
1721 }
1722
1723 static int
1724 lustre_dissect_element_lov_mds_md_v1_lmm_objects(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int num)
1725 {
1726   int i;
1727   /*g_print("num = %d", num);*/
1728   for (i = 0; i < num; i++){
1729     offset=lustre_dissect_element_lov_mds_md_v1_lmm_objects_(tvb, offset, pinfo, tree);
1730   }
1731
1732   return offset;
1733 }
1734
1735
1736
1737 int
1738 lustre_dissect_struct_lov_mds_md_v1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1739 {
1740   proto_item *item = NULL;
1741   proto_tree *tree = NULL;
1742   int old_offset;
1743
1744   guint32 stripe_count ;
1745
1746
1747   old_offset=offset;
1748
1749   if (parent_tree) {
1750     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1751     tree = proto_item_add_subtree(item, ett_lustre_lov_mds_md_v1);
1752   }
1753
1754   offset=lustre_dissect_element_lov_mds_md_v1_lmm_magic(tvb, offset, pinfo, tree);
1755
1756   offset=lustre_dissect_element_lov_mds_md_v1_lmm_pattern(tvb, offset, pinfo, tree);
1757
1758   offset=lustre_dissect_element_lov_mds_md_v1_lmm_object_id(tvb, offset, pinfo, tree);
1759
1760   offset=lustre_dissect_element_lov_mds_md_v1_lmm_object_seq(tvb, offset, pinfo, tree);
1761
1762   offset=lustre_dissect_element_lov_mds_md_v1_lmm_stripe_size(tvb, offset, pinfo, tree);
1763
1764   stripe_count = tvb_get_letohl(tvb,offset);
1765   offset=lustre_dissect_element_lov_mds_md_v1_lmm_stripe_count(tvb, offset, pinfo, tree);
1766
1767   offset=lustre_dissect_element_lov_mds_md_v1_lmm_objects(tvb, offset, pinfo, tree, stripe_count);
1768
1769
1770   proto_item_set_len(item, offset-old_offset);
1771
1772   return offset;
1773 }
1774
1775 int
1776 lustre_dissect_struct_lov_mds_md(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
1777                                  proto_tree *parent_tree _U_,
1778                                  int hf_index _U_, int buff_num _U_)
1779 {
1780   int magic;
1781
1782   if(LUSTRE_BUFFER_LEN(buff_num) == 0)
1783     return offset;
1784
1785   magic=tvb_get_letohl(tvb, offset); /* TODO : replace this with a macro */
1786   switch(magic) {
1787   case LOV_MAGIC_V1:
1788     offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,parent_tree,
1789                                                hf_index);
1790     break;
1791   default:
1792     offset=lustre_dissect_element_data(tvb, offset, pinfo, parent_tree,
1793                                        hf_lustre_extra_padding, buff_num);
1794     break;
1795   };
1796
1797   return offset;
1798 }
1799
1800
1801
1802 /* IDL: struct obd_statfs { */
1803 /* IDL:         uint64 os_type; */
1804 /* IDL:         uint64 os_blocks; */
1805 /* IDL:         uint64 os_bfree; */
1806 /* IDL:         uint64 os_bavail; */
1807 /* IDL:         uint64 os_files; */
1808 /* IDL:         uint64 os_ffree; */
1809 /* IDL:         uint8 os_fsid[40]; */
1810 /* IDL:         uint32 os_bsize; */
1811 /* IDL:         uint32 os_namelen; */
1812 /* IDL:         uint64 os_maxbytes; */
1813 /* IDL:         uint32 os_state; */
1814 /* IDL:         uint32 os_spare1; */
1815 /* IDL:         uint32 os_spare2; */
1816 /* IDL:         uint32 os_spare3; */
1817 /* IDL:         uint32 os_spare4; */
1818 /* IDL:         uint32 os_spare5; */
1819 /* IDL:         uint32 os_spare6; */
1820 /* IDL:         uint32 os_spare7; */
1821 /* IDL:         uint32 os_spare8; */
1822 /* IDL:         uint32 os_spare9; */
1823 /* IDL: } */
1824
1825 static int
1826 lustre_dissect_element_obd_statfs_os_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1827 {
1828   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_type);
1829
1830   return offset;
1831 }
1832
1833 static int
1834 lustre_dissect_element_obd_statfs_os_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1835 {
1836   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_blocks);
1837
1838   return offset;
1839 }
1840
1841 static int
1842 lustre_dissect_element_obd_statfs_os_bfree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1843 {
1844   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bfree);
1845
1846   return offset;
1847 }
1848
1849 static int
1850 lustre_dissect_element_obd_statfs_os_bavail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1851 {
1852   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bavail);
1853
1854   return offset;
1855 }
1856
1857 static int
1858 lustre_dissect_element_obd_statfs_os_files(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1859 {
1860   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_files);
1861
1862   return offset;
1863 }
1864
1865 static int
1866 lustre_dissect_element_obd_statfs_os_ffree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1867 {
1868   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_ffree);
1869
1870   return offset;
1871 }
1872
1873 static int
1874 lustre_dissect_element_obd_statfs_os_fsid_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1875 {
1876   offset=dissect_uint8(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_fsid);
1877
1878   return offset;
1879 }
1880
1881 static int
1882 lustre_dissect_element_obd_statfs_os_fsid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1883 {
1884   int i;
1885   for (i = 0; i < 40; i++)
1886     offset=lustre_dissect_element_obd_statfs_os_fsid_(tvb, offset, pinfo, tree);
1887
1888   return offset;
1889 }
1890
1891
1892
1893 static int
1894 lustre_dissect_element_obd_statfs_os_bsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1895 {
1896   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bsize);
1897
1898   return offset;
1899 }
1900
1901 static int
1902 lustre_dissect_element_obd_statfs_os_namelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1903 {
1904   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_namelen);
1905
1906   return offset;
1907 }
1908
1909 static int
1910 lustre_dissect_element_obd_statfs_os_maxbytes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1911 {
1912   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_maxbytes);
1913
1914   return offset;
1915 }
1916
1917 static int
1918 lustre_dissect_element_obd_statfs_os_state(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1919 {
1920   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_state);
1921
1922   return offset;
1923 }
1924
1925 static int
1926 lustre_dissect_element_obd_statfs_os_spare1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1927 {
1928   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare1);
1929
1930   return offset;
1931 }
1932
1933 static int
1934 lustre_dissect_element_obd_statfs_os_spare2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1935 {
1936   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare2);
1937
1938   return offset;
1939 }
1940
1941 static int
1942 lustre_dissect_element_obd_statfs_os_spare3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1943 {
1944   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare3);
1945
1946   return offset;
1947 }
1948
1949 static int
1950 lustre_dissect_element_obd_statfs_os_spare4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1951 {
1952   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare4);
1953
1954   return offset;
1955 }
1956
1957 static int
1958 lustre_dissect_element_obd_statfs_os_spare5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1959 {
1960   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare5);
1961
1962   return offset;
1963 }
1964
1965 static int
1966 lustre_dissect_element_obd_statfs_os_spare6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1967 {
1968   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare6);
1969
1970   return offset;
1971 }
1972
1973 static int
1974 lustre_dissect_element_obd_statfs_os_spare7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1975 {
1976   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare7);
1977
1978   return offset;
1979 }
1980
1981 static int
1982 lustre_dissect_element_obd_statfs_os_spare8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1983 {
1984   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare8);
1985
1986   return offset;
1987 }
1988
1989 static int
1990 lustre_dissect_element_obd_statfs_os_spare9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1991 {
1992   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare9);
1993
1994   return offset;
1995 }
1996
1997 int
1998 lustre_dissect_struct_obd_statfs(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1999 {
2000   proto_item *item = NULL;
2001   proto_tree *tree = NULL;
2002   int old_offset;
2003
2004
2005
2006   old_offset=offset;
2007
2008   if (parent_tree) {
2009     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2010     tree = proto_item_add_subtree(item, ett_lustre_obd_statfs);
2011   }
2012
2013   offset=lustre_dissect_element_obd_statfs_os_type(tvb, offset, pinfo, tree);
2014
2015   offset=lustre_dissect_element_obd_statfs_os_blocks(tvb, offset, pinfo, tree);
2016
2017   offset=lustre_dissect_element_obd_statfs_os_bfree(tvb, offset, pinfo, tree);
2018
2019   offset=lustre_dissect_element_obd_statfs_os_bavail(tvb, offset, pinfo, tree);
2020
2021   offset=lustre_dissect_element_obd_statfs_os_files(tvb, offset, pinfo, tree);
2022
2023   offset=lustre_dissect_element_obd_statfs_os_ffree(tvb, offset, pinfo, tree);
2024
2025   offset=lustre_dissect_element_obd_statfs_os_fsid(tvb, offset, pinfo, tree);
2026
2027   offset=lustre_dissect_element_obd_statfs_os_bsize(tvb, offset, pinfo, tree);
2028
2029   offset=lustre_dissect_element_obd_statfs_os_namelen(tvb, offset, pinfo, tree);
2030
2031   offset=lustre_dissect_element_obd_statfs_os_maxbytes(tvb, offset, pinfo, tree);
2032
2033   offset=lustre_dissect_element_obd_statfs_os_state(tvb, offset, pinfo, tree);
2034
2035   offset=lustre_dissect_element_obd_statfs_os_spare1(tvb, offset, pinfo, tree);
2036
2037   offset=lustre_dissect_element_obd_statfs_os_spare2(tvb, offset, pinfo, tree);
2038
2039   offset=lustre_dissect_element_obd_statfs_os_spare3(tvb, offset, pinfo, tree);
2040
2041   offset=lustre_dissect_element_obd_statfs_os_spare4(tvb, offset, pinfo, tree);
2042
2043   offset=lustre_dissect_element_obd_statfs_os_spare5(tvb, offset, pinfo, tree);
2044
2045   offset=lustre_dissect_element_obd_statfs_os_spare6(tvb, offset, pinfo, tree);
2046
2047   offset=lustre_dissect_element_obd_statfs_os_spare7(tvb, offset, pinfo, tree);
2048
2049   offset=lustre_dissect_element_obd_statfs_os_spare8(tvb, offset, pinfo, tree);
2050
2051   offset=lustre_dissect_element_obd_statfs_os_spare9(tvb, offset, pinfo, tree);
2052
2053
2054   proto_item_set_len(item, offset-old_offset);
2055
2056   return offset;
2057 }
2058
2059 /* IDL: struct obd_ioobj { */
2060 /* IDL:         uint64 ioo_id; */
2061 /* IDL:         uint64 ioo_seq; */
2062 /* IDL:         uint32 ioo_max_brw; */
2063 /* IDL:         uint32 ioo_bufcnt; */
2064 /* IDL: } */
2065
2066 static int
2067 lustre_dissect_element_obd_ioobj_ioo_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2068 {
2069   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_id);
2070
2071   return offset;
2072 }
2073
2074 static int
2075 lustre_dissect_element_obd_ioobj_ioo_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2076 {
2077   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_seq);
2078
2079   return offset;
2080 }
2081
2082 static int
2083 lustre_dissect_element_obd_ioobj_ioo_max_brw(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2084 {
2085   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_max_brw);
2086
2087   return offset;
2088 }
2089
2090 static int
2091 lustre_dissect_element_obd_ioobj_ioo_bufcnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2092 {
2093   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_bufcnt);
2094
2095   return offset;
2096 }
2097
2098 int
2099 lustre_dissect_struct_obd_ioobj(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2100 {
2101   proto_item *item = NULL;
2102   proto_tree *tree = NULL;
2103   int old_offset;
2104
2105
2106
2107   old_offset=offset;
2108
2109   if (parent_tree) {
2110     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2111     tree = proto_item_add_subtree(item, ett_lustre_obd_ioobj);
2112   }
2113
2114   offset=lustre_dissect_element_obd_ioobj_ioo_id(tvb, offset, pinfo, tree);
2115
2116   offset=lustre_dissect_element_obd_ioobj_ioo_seq(tvb, offset, pinfo, tree);
2117
2118   offset=lustre_dissect_element_obd_ioobj_ioo_max_brw(tvb, offset, pinfo, tree);
2119
2120   offset=lustre_dissect_element_obd_ioobj_ioo_bufcnt(tvb, offset, pinfo, tree);
2121
2122
2123   proto_item_set_len(item, offset-old_offset);
2124
2125   return offset;
2126 }
2127
2128 /* IDL: struct niobuf_remote { */
2129 /* IDL:         uint64 offset; */
2130 /* IDL:         uint32 len; */
2131 /* IDL:         uint32 flags; */
2132 /* IDL: } */
2133
2134 static int
2135 lustre_dissect_element_niobuf_remote_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2136 {
2137   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_offset);
2138
2139   return offset;
2140 }
2141
2142 static int
2143 lustre_dissect_element_niobuf_remote_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2144 {
2145   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_len);
2146
2147   return offset;
2148 }
2149
2150 static int
2151 lustre_dissect_element_niobuf_remote_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2152 {
2153   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_flags);
2154
2155   return offset;
2156 }
2157
2158 int
2159 lustre_dissect_struct_niobuf_remote(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2160 {
2161   proto_item *item = NULL;
2162   proto_tree *tree = NULL;
2163   int old_offset;
2164
2165
2166
2167   old_offset=offset;
2168
2169   if (parent_tree) {
2170     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2171     tree = proto_item_add_subtree(item, ett_lustre_niobuf_remote);
2172   }
2173
2174   offset=lustre_dissect_element_niobuf_remote_offset(tvb, offset, pinfo, tree);
2175
2176   offset=lustre_dissect_element_niobuf_remote_len(tvb, offset, pinfo, tree);
2177
2178   offset=lustre_dissect_element_niobuf_remote_flags(tvb, offset, pinfo, tree);
2179
2180
2181   proto_item_set_len(item, offset-old_offset);
2182
2183   return offset;
2184 }
2185
2186 /* IDL: struct ost_lvb { */
2187 /* IDL:         uint64 lvb_size; */
2188 /* IDL:         uint64 lvb_mtime; */
2189 /* IDL:         uint64 lvb_atime; */
2190 /* IDL:         uint64 lvb_ctime; */
2191 /* IDL:         uint64 lvb_blocks; */
2192 /* IDL: } */
2193
2194 static int
2195 lustre_dissect_element_ost_lvb_lvb_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2196 {
2197   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ost_lvb_lvb_size);
2198
2199   return offset;
2200 }
2201
2202 static int
2203 lustre_dissect_element_ost_lvb_lvb_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2204 {
2205   nstime_t ns;
2206   /* timestamp */
2207   ns.secs = tvb_get_letohl(tvb,offset);
2208   ns.nsecs=0;
2209   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_mtime, tvb, offset, 8, &ns );
2210   offset+=8;
2211   return offset;
2212 }
2213
2214 static int
2215 lustre_dissect_element_ost_lvb_lvb_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2216 {
2217   nstime_t ns;
2218   /* timestamp */
2219   ns.secs = tvb_get_letohl(tvb,offset);
2220   ns.nsecs=0;
2221   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_atime, tvb, offset, 8, &ns );
2222   offset+=8;
2223
2224   return offset;
2225 }
2226
2227 static int
2228 lustre_dissect_element_ost_lvb_lvb_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2229 {
2230   nstime_t ns;
2231   /* timestamp */
2232   ns.secs = tvb_get_letohl(tvb,offset);
2233   ns.nsecs=0;
2234   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_ctime, tvb, offset, 8, &ns );
2235   offset+=8;
2236
2237   return offset;
2238 }
2239
2240 static int
2241 lustre_dissect_element_ost_lvb_lvb_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2242 {
2243   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ost_lvb_lvb_blocks);
2244
2245   return offset;
2246 }
2247
2248 int
2249 lustre_dissect_struct_ost_lvb(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2250 {
2251   proto_item *item = NULL;
2252   proto_tree *tree = NULL;
2253   int old_offset;
2254
2255
2256
2257   old_offset=offset;
2258
2259   if (parent_tree) {
2260     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2261     tree = proto_item_add_subtree(item, ett_lustre_ost_lvb);
2262   }
2263
2264   offset=lustre_dissect_element_ost_lvb_lvb_size(tvb, offset, pinfo, tree);
2265
2266   offset=lustre_dissect_element_ost_lvb_lvb_mtime(tvb, offset, pinfo, tree);
2267
2268   offset=lustre_dissect_element_ost_lvb_lvb_atime(tvb, offset, pinfo, tree);
2269
2270   offset=lustre_dissect_element_ost_lvb_lvb_ctime(tvb, offset, pinfo, tree);
2271
2272   offset=lustre_dissect_element_ost_lvb_lvb_blocks(tvb, offset, pinfo, tree);
2273
2274
2275   proto_item_set_len(item, offset-old_offset);
2276
2277   return offset;
2278 }
2279
2280
2281 /* IDL: struct ll_fid { */
2282 /* IDL:         uint64 id; */
2283 /* IDL:         uint32 generation; */
2284 /* IDL:         uint32 f_type; */
2285 /* IDL: } */
2286
2287 static int
2288 lustre_dissect_element_ll_fid_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2289 {
2290   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ll_fid_id);
2291
2292   return offset;
2293 }
2294
2295 static int
2296 lustre_dissect_element_ll_fid_generation(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2297 {
2298   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ll_fid_generation);
2299
2300   return offset;
2301 }
2302
2303 static int
2304 lustre_dissect_element_ll_fid_f_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2305 {
2306   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ll_fid_f_type);
2307
2308   return offset;
2309 }
2310
2311 int
2312 lustre_dissect_struct_lu_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2313 {
2314   proto_item *item = NULL;
2315   proto_tree *tree = NULL;
2316   int old_offset;
2317
2318   old_offset=offset;
2319
2320   if (parent_tree) {
2321     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2322     tree = proto_item_add_subtree(item, ett_lustre_ll_fid);
2323   }
2324
2325   offset=lustre_dissect_element_ll_fid_id(tvb, offset, pinfo, tree);
2326
2327   offset=lustre_dissect_element_ll_fid_generation(tvb, offset, pinfo, tree);
2328
2329   offset=lustre_dissect_element_ll_fid_f_type(tvb, offset, pinfo, tree);
2330
2331
2332   proto_item_set_len(item, offset-old_offset);
2333
2334   return offset;
2335 }
2336
2337 /* IDL: struct obd_dqinfo { */
2338 /* IDL:   uint64 dqi_bgrace; */
2339 /* IDL:   uint64 dqi_igrace; */
2340 /* IDL:   uint32 dqi_flags; */
2341 /* IDL:   uint32 dqi_valid; */
2342 /* IDL: } */
2343
2344 static int
2345 lustre_dissect_element_obd_dqinfo_dqi_bgrace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2346 {
2347   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_bgrace);
2348
2349   return offset;
2350 }
2351
2352 static int
2353 lustre_dissect_element_obd_dqinfo_dqi_igrace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2354 {
2355   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_igrace);
2356
2357   return offset;
2358 }
2359
2360 static int
2361 lustre_dissect_element_obd_dqinfo_dqi_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2362 {
2363   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_flags);
2364
2365   return offset;
2366 }
2367
2368 static int
2369 lustre_dissect_element_obd_dqinfo_dqi_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2370 {
2371   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_valid);
2372
2373   return offset;
2374 }
2375
2376 int
2377 lustre_dissect_struct_obd_dqinfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2378 {
2379   proto_item *item = NULL;
2380   proto_tree *tree = NULL;
2381   int old_offset;
2382
2383
2384
2385   old_offset = offset;
2386
2387   if (parent_tree) {
2388     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2389     tree = proto_item_add_subtree(item, ett_lustre_obd_dqinfo);
2390   }
2391
2392   offset = lustre_dissect_element_obd_dqinfo_dqi_bgrace(tvb, offset, pinfo, tree);
2393
2394   offset = lustre_dissect_element_obd_dqinfo_dqi_igrace(tvb, offset, pinfo, tree);
2395
2396   offset = lustre_dissect_element_obd_dqinfo_dqi_flags(tvb, offset, pinfo, tree);
2397
2398   offset = lustre_dissect_element_obd_dqinfo_dqi_valid(tvb, offset, pinfo, tree);
2399
2400
2401   proto_item_set_len(item, offset-old_offset);
2402
2403   return offset;
2404 }
2405
2406 /* IDL: struct obd_dqblk { */
2407 /* IDL:         uint64 dqb_bhardlimit; */
2408 /* IDL:         uint64 dqb_bsoftlimit; */
2409 /* IDL:         uint64 dqb_curspace; */
2410 /* IDL:         uint64 dqb_ihardlimit; */
2411 /* IDL:         uint64 dqb_isoftlimit; */
2412 /* IDL:         uint64 dqb_curinodes; */
2413 /* IDL:         uint64 dqb_btime; */
2414 /* IDL:         uint64 dqb_itime; */
2415 /* IDL:         uint32 dqb_valid; */
2416 /* IDL:         uint32 padding; */
2417 /* IDL: } */
2418
2419 static int
2420 lustre_dissect_element_obd_dqblk_dqb_bhardlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2421 {
2422   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_bhardlimit);
2423
2424   return offset;
2425 }
2426
2427 static int
2428 lustre_dissect_element_obd_dqblk_dqb_bsoftlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2429 {
2430   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_bsoftlimit);
2431
2432   return offset;
2433 }
2434
2435 static int
2436 lustre_dissect_element_obd_dqblk_dqb_curspace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2437 {
2438   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_curspace);
2439
2440   return offset;
2441 }
2442
2443 static int
2444 lustre_dissect_element_obd_dqblk_dqb_ihardlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2445 {
2446   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_ihardlimit);
2447
2448   return offset;
2449 }
2450
2451 static int
2452 lustre_dissect_element_obd_dqblk_dqb_isoftlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2453 {
2454   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_isoftlimit);
2455
2456   return offset;
2457 }
2458
2459 static int
2460 lustre_dissect_element_obd_dqblk_dqb_curinodes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2461 {
2462   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_curinodes);
2463
2464   return offset;
2465 }
2466
2467 static int
2468 lustre_dissect_element_obd_dqblk_dqb_btime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2469 {
2470
2471   nstime_t ns;
2472   /* timestamp */
2473   ns.secs = tvb_get_letohl(tvb,offset);
2474   ns.nsecs=0;
2475   proto_tree_add_time(tree, hf_lustre_obd_dqblk_dqb_btime, tvb, offset, 8, &ns );
2476   offset+=8;
2477   return offset;
2478 }
2479
2480 static int
2481 lustre_dissect_element_obd_dqblk_dqb_itime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2482 {
2483   nstime_t ns;
2484   /* timestamp */
2485   ns.secs = tvb_get_letohl(tvb,offset);
2486   ns.nsecs=0;
2487   proto_tree_add_time(tree, hf_lustre_obd_dqblk_dqb_itime, tvb, offset, 8, &ns );
2488   offset+=8;
2489
2490   return offset;
2491 }
2492
2493 static int
2494 lustre_dissect_element_obd_dqblk_dqb_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2495 {
2496   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_valid);
2497
2498   return offset;
2499 }
2500
2501 static int
2502 lustre_dissect_element_obd_dqblk_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2503 {
2504   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_padding);
2505
2506   return offset;
2507 }
2508
2509 int
2510 lustre_dissect_struct_obd_dqblk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2511 {
2512   proto_item *item = NULL;
2513   proto_tree *tree = NULL;
2514   int old_offset;
2515
2516
2517
2518   old_offset = offset;
2519
2520   if (parent_tree) {
2521     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2522     tree = proto_item_add_subtree(item, ett_lustre_obd_dqblk);
2523   }
2524
2525   offset = lustre_dissect_element_obd_dqblk_dqb_bhardlimit(tvb, offset, pinfo, tree);
2526
2527   offset = lustre_dissect_element_obd_dqblk_dqb_bsoftlimit(tvb, offset, pinfo, tree);
2528
2529   offset = lustre_dissect_element_obd_dqblk_dqb_curspace(tvb, offset, pinfo, tree);
2530
2531   offset = lustre_dissect_element_obd_dqblk_dqb_ihardlimit(tvb, offset, pinfo, tree);
2532
2533   offset = lustre_dissect_element_obd_dqblk_dqb_isoftlimit(tvb, offset, pinfo, tree);
2534
2535   offset = lustre_dissect_element_obd_dqblk_dqb_curinodes(tvb, offset, pinfo, tree);
2536
2537   offset = lustre_dissect_element_obd_dqblk_dqb_btime(tvb, offset, pinfo, tree);
2538
2539   offset = lustre_dissect_element_obd_dqblk_dqb_itime(tvb, offset, pinfo, tree);
2540
2541   offset = lustre_dissect_element_obd_dqblk_dqb_valid(tvb, offset, pinfo, tree);
2542
2543   offset = lustre_dissect_element_obd_dqblk_padding(tvb, offset, pinfo, tree);
2544
2545
2546   proto_item_set_len(item, offset-old_offset);
2547
2548   return offset;
2549 }
2550
2551
2552 /* IDL: struct obd_quotactl { */
2553 /* IDL:         uint32 qc_cmd; */
2554 /* IDL:         uint32 qc_type; */
2555 /* IDL:         uint32 qc_id; */
2556 /* IDL:         uint32 qc_stat; */
2557 /* IDL:         struct obd_dqinfo { */
2558 /* IDL: } qc_dqinfo; */
2559 /* IDL:         struct obd_dqblk { */
2560 /* IDL: } qc_dqblk; */
2561 /* IDL: } */
2562
2563 static int
2564 lustre_dissect_element_obd_quotactl_qc_cmd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2565 {
2566   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_cmd);
2567
2568   return offset;
2569 }
2570
2571 static int
2572 lustre_dissect_element_obd_quotactl_qc_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2573 {
2574   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_type);
2575
2576   return offset;
2577 }
2578
2579 static int
2580 lustre_dissect_element_obd_quotactl_qc_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2581 {
2582   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_id);
2583
2584   return offset;
2585 }
2586
2587 static int
2588 lustre_dissect_element_obd_quotactl_qc_stat(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2589 {
2590   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_stat);
2591
2592   return offset;
2593 }
2594
2595
2596
2597 static int
2598 lustre_dissect_element_obd_quotactl_qc_dqblk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2599 {
2600   offset=lustre_dissect_struct_obd_dqblk(tvb,offset,pinfo,tree,hf_lustre_obd_quotactl_qc_dqblk);
2601   return offset;
2602 }
2603
2604 static int
2605 lustre_dissect_element_obd_quotactl_qc_dqinfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2606 {
2607   offset=lustre_dissect_struct_obd_dqinfo(tvb,offset,pinfo,tree,hf_lustre_obd_quotactl_qc_dqinfo);
2608   return offset;
2609 }
2610
2611 int
2612 lustre_dissect_struct_obd_quotactl(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2613 {
2614   proto_item *item = NULL;
2615   proto_tree *tree = NULL;
2616   int old_offset;
2617
2618   old_offset=offset;
2619
2620   if (parent_tree) {
2621     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2622     tree = proto_item_add_subtree(item, ett_lustre_obd_quotactl);
2623   }
2624
2625   offset=lustre_dissect_element_obd_quotactl_qc_cmd(tvb, offset, pinfo, tree);
2626
2627   offset=lustre_dissect_element_obd_quotactl_qc_type(tvb, offset, pinfo, tree);
2628
2629   offset=lustre_dissect_element_obd_quotactl_qc_id(tvb, offset, pinfo, tree);
2630
2631   offset=lustre_dissect_element_obd_quotactl_qc_stat(tvb, offset, pinfo, tree);
2632
2633   offset=lustre_dissect_element_obd_quotactl_qc_dqinfo(tvb, offset, pinfo, tree);
2634
2635   offset=lustre_dissect_element_obd_quotactl_qc_dqblk(tvb, offset, pinfo, tree);
2636
2637
2638   proto_item_set_len(item, offset-old_offset);
2639
2640   return offset;
2641 }
2642
2643
2644 /* IDL: struct quota_adjust_qunit { */
2645 /* IDL:         uint32 qaq_flags; */
2646 /* IDL:         uint32 qaq_id; */
2647 /* IDL:         uint64 qaq_bunit_sz; */
2648 /* IDL:         uint64 qaq_iunit_sz; */
2649 /* IDL:         uint64 padding1; */
2650 /* IDL: } */
2651
2652 static int
2653 lustre_dissect_element_quota_adjust_qunit_qaq_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2654 {
2655   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_flags);
2656
2657   return offset;
2658 }
2659
2660 static int
2661 lustre_dissect_element_quota_adjust_qunit_qaq_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2662 {
2663   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_id);
2664
2665   return offset;
2666 }
2667
2668 static int
2669 lustre_dissect_element_quota_adjust_qunit_qaq_bunit_sz(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2670 {
2671   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_bunit_sz);
2672
2673   return offset;
2674 }
2675
2676 static int
2677 lustre_dissect_element_quota_adjust_qunit_qaq_iunit_sz(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2678 {
2679   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_iunit_sz);
2680
2681   return offset;
2682 }
2683
2684 static int
2685 lustre_dissect_element_quota_adjust_qunit_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2686 {
2687   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_padding1);
2688
2689   return offset;
2690 }
2691
2692 int
2693 lustre_dissect_struct_quota_adjust_qunit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2694 {
2695   proto_item *item = NULL;
2696   proto_tree *tree = NULL;
2697   int old_offset;
2698
2699
2700
2701   old_offset=offset;
2702
2703   if (parent_tree) {
2704     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2705     tree = proto_item_add_subtree(item, ett_lustre_quota_adjust_qunit);
2706   }
2707
2708   offset=lustre_dissect_element_quota_adjust_qunit_qaq_flags(tvb, offset, pinfo, tree);
2709
2710   offset=lustre_dissect_element_quota_adjust_qunit_qaq_id(tvb, offset, pinfo, tree);
2711
2712   offset=lustre_dissect_element_quota_adjust_qunit_qaq_bunit_sz(tvb, offset, pinfo, tree);
2713
2714   offset=lustre_dissect_element_quota_adjust_qunit_qaq_iunit_sz(tvb, offset, pinfo, tree);
2715
2716   offset=lustre_dissect_element_quota_adjust_qunit_padding1(tvb, offset, pinfo, tree);
2717
2718
2719   proto_item_set_len(item, offset-old_offset);
2720
2721   return offset;
2722 }
2723
2724 /* IDL: struct mdt_body { */
2725 /* IDL:         struct lu_fid { */
2726 /* IDL: } fid1; */
2727 /* IDL:         struct lu_fid { */
2728 /* IDL: } fid2; */
2729 /* IDL:         struct lustre_handle { */
2730 /* IDL: } handle; */
2731 /* IDL:         uint64 valid; */
2732 /* IDL:         uint64 size; */
2733 /* IDL:         uint64 mtime; */
2734 /* IDL:         uint64 atime; */
2735 /* IDL:         uint64 ctime; */
2736 /* IDL:         uint64 blocks; */
2737 /* IDL:         uint64 ioepoch; */
2738 /* IDL:         uint64 ino; */
2739 /* IDL:         uint32 fsuid; */
2740 /* IDL:         uint32 fsgid; */
2741 /* IDL:         uint32 capability; */
2742 /* IDL:         uint32 mode; */
2743 /* IDL:         uint32 uid; */
2744 /* IDL:         uint32 gid; */
2745 /* IDL:         uint32 flags; */
2746 /* IDL:         uint32 rdev; */
2747 /* IDL:         uint32 nlink; */
2748 /* IDL:         uint32 generation; */
2749 /* IDL:         uint32 suppgid; */
2750 /* IDL:         uint32 eadatasize; */
2751 /* IDL:         uint32 aclsize; */
2752 /* IDL:         uint32 max_mdsize; */
2753 /* IDL:         uint32 max_cookiesize; */
2754 /* IDL:         uint32 uid_h; */
2755 /* IDL:         uint32 gid_h; */
2756 /* IDL:         uint32 padding_5; */
2757 /* IDL:         uint64 padding_6; */
2758 /* IDL:         uint64 padding_7; */
2759 /* IDL:         uint64 padding_8; */
2760 /* IDL:         uint64 padding_9; */
2761 /* IDL:         uint64 padding_10; */
2762 /* IDL: } */
2763
2764 static int
2765 lustre_dissect_element_mdt_body_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2766 {
2767   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_body_fid1);
2768   return offset;
2769 }
2770
2771 static int
2772 lustre_dissect_element_mdt_body_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2773 {
2774   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_body_fid2);
2775   return offset;
2776 }
2777
2778 static int
2779 lustre_dissect_element_mdt_body_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2780 {
2781   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_mdt_body_handle);
2782
2783   return offset;
2784 }
2785
2786 static int
2787 lustre_dissect_element_mdt_body_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2788 {
2789   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_valid);
2790
2791   return offset;
2792 }
2793
2794 static int
2795 lustre_dissect_element_mdt_body_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2796 {
2797   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_size);
2798
2799   return offset;
2800 }
2801
2802 static int
2803 lustre_dissect_element_mdt_body_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2804 {
2805   nstime_t ns;
2806   /* timestamp */
2807   ns.secs = tvb_get_letohl(tvb,offset);
2808   ns.nsecs=0;
2809   proto_tree_add_time(tree, hf_lustre_mdt_body_mtime, tvb, offset, 8, &ns );
2810   offset+=8;
2811   return offset;
2812 }
2813
2814 static int
2815 lustre_dissect_element_mdt_body_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2816 {
2817   nstime_t ns;
2818   /* timestamp */
2819   ns.secs = tvb_get_letohl(tvb,offset);
2820   ns.nsecs=0;
2821   proto_tree_add_time(tree, hf_lustre_mdt_body_atime, tvb, offset, 8, &ns );
2822   offset+=8;
2823
2824   return offset;
2825 }
2826
2827 static int
2828 lustre_dissect_element_mdt_body_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2829 {
2830   nstime_t ns;
2831   /* timestamp */
2832   ns.secs = tvb_get_letohl(tvb,offset);
2833   ns.nsecs=0;
2834   proto_tree_add_time(tree, hf_lustre_mdt_body_ctime, tvb, offset, 8, &ns );
2835   offset+=8;
2836   return offset;
2837 }
2838
2839 static int
2840 lustre_dissect_element_mdt_body_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2841 {
2842   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_blocks);
2843
2844   return offset;
2845 }
2846
2847 static int
2848 lustre_dissect_element_mdt_body_ioepoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2849 {
2850   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_ioepoch);
2851
2852   return offset;
2853 }
2854
2855 static int
2856 lustre_dissect_element_mdt_body_ino(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2857 {
2858   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_ino);
2859
2860   return offset;
2861 }
2862
2863 static int
2864 lustre_dissect_element_mdt_body_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2865 {
2866   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_fsuid);
2867
2868   return offset;
2869 }
2870
2871 static int
2872 lustre_dissect_element_mdt_body_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2873 {
2874   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_fsgid);
2875
2876   return offset;
2877 }
2878
2879 static int
2880 lustre_dissect_element_mdt_body_capability(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2881 {
2882   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_capability);
2883
2884   return offset;
2885 }
2886
2887 static int
2888 lustre_dissect_element_mdt_body_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2889 {
2890   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_mode);
2891
2892   return offset;
2893 }
2894
2895 static int
2896 lustre_dissect_element_mdt_body_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2897 {
2898   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_uid);
2899
2900   return offset;
2901 }
2902
2903 static int
2904 lustre_dissect_element_mdt_body_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2905 {
2906   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_gid);
2907
2908   return offset;
2909 }
2910
2911 static int
2912 lustre_dissect_element_mdt_body_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2913 {
2914   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_flags);
2915
2916   return offset;
2917 }
2918
2919 static int
2920 lustre_dissect_element_mdt_body_rdev(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2921 {
2922   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_rdev);
2923
2924   return offset;
2925 }
2926
2927 static int
2928 lustre_dissect_element_mdt_body_nlink(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2929 {
2930   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_nlink);
2931
2932   return offset;
2933 }
2934
2935 static int
2936 lustre_dissect_element_mdt_body_generation(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2937 {
2938   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_generation);
2939
2940   return offset;
2941 }
2942
2943 static int
2944 lustre_dissect_element_mdt_body_suppgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2945 {
2946   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_suppgid);
2947
2948   return offset;
2949 }
2950
2951 static int
2952 lustre_dissect_element_mdt_body_eadatasize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2953 {
2954   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_eadatasize);
2955
2956   return offset;
2957 }
2958
2959 static int
2960 lustre_dissect_element_mdt_body_aclsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2961 {
2962   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_aclsize);
2963
2964   return offset;
2965 }
2966
2967 static int
2968 lustre_dissect_element_mdt_body_max_mdsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2969 {
2970   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_max_mdsize);
2971
2972   return offset;
2973 }
2974
2975 static int
2976 lustre_dissect_element_mdt_body_max_cookiesize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2977 {
2978   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_max_cookiesize);
2979
2980   return offset;
2981 }
2982
2983 static int
2984 lustre_dissect_element_mdt_body_uid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2985 {
2986   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_uid_h);
2987
2988   return offset;
2989 }
2990
2991 static int
2992 lustre_dissect_element_mdt_body_gid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2993 {
2994   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_gid_h);
2995
2996   return offset;
2997 }
2998
2999 static int
3000 lustre_dissect_element_mdt_body_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3001 {
3002   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_5);
3003
3004   return offset;
3005 }
3006
3007 static int
3008 lustre_dissect_element_mdt_body_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3009 {
3010   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_6);
3011
3012   return offset;
3013 }
3014
3015 static int
3016 lustre_dissect_element_mdt_body_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3017 {
3018   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_7);
3019
3020   return offset;
3021 }
3022
3023 static int
3024 lustre_dissect_element_mdt_body_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3025 {
3026   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_8);
3027
3028   return offset;
3029 }
3030
3031 static int
3032 lustre_dissect_element_mdt_body_padding_9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3033 {
3034   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_9);
3035
3036   return offset;
3037 }
3038
3039 static int
3040 lustre_dissect_element_mdt_body_padding_10(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3041 {
3042   offset= dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_10);
3043
3044   return offset;
3045 }
3046
3047 int
3048 lustre_dissect_struct_mdt_body(tvbuff_t *tvb _U_, int offset _U_,
3049                                packet_info *pinfo _U_,
3050                                proto_tree *parent_tree _U_,
3051                                int hf_index _U_)
3052 {
3053   proto_item *item = NULL;
3054   proto_tree *tree = NULL;
3055   int old_offset;
3056
3057
3058   old_offset=offset;
3059
3060   if (parent_tree) {
3061     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3062     tree = proto_item_add_subtree(item, ett_lustre_mdt_body);
3063   }
3064
3065   offset=lustre_dissect_element_mdt_body_fid1(tvb, offset, pinfo, tree);
3066
3067   offset=lustre_dissect_element_mdt_body_fid2(tvb, offset, pinfo, tree);
3068
3069   offset=lustre_dissect_element_mdt_body_handle(tvb, offset, pinfo, tree);
3070
3071   offset=lustre_dissect_element_mdt_body_valid(tvb, offset, pinfo, tree);
3072
3073   offset=lustre_dissect_element_mdt_body_size(tvb, offset, pinfo, tree);
3074
3075   offset=lustre_dissect_element_mdt_body_mtime(tvb, offset, pinfo, tree);
3076
3077   offset=lustre_dissect_element_mdt_body_atime(tvb, offset, pinfo, tree);
3078
3079   offset=lustre_dissect_element_mdt_body_ctime(tvb, offset, pinfo, tree);
3080
3081   offset=lustre_dissect_element_mdt_body_blocks(tvb, offset, pinfo, tree);
3082
3083   offset=lustre_dissect_element_mdt_body_ioepoch(tvb, offset, pinfo, tree);
3084
3085   offset=lustre_dissect_element_mdt_body_ino(tvb, offset, pinfo, tree);
3086
3087   offset=lustre_dissect_element_mdt_body_fsuid(tvb, offset, pinfo, tree);
3088
3089   offset=lustre_dissect_element_mdt_body_fsgid(tvb, offset, pinfo, tree);
3090
3091   offset=lustre_dissect_element_mdt_body_capability(tvb, offset, pinfo, tree);
3092
3093   offset=lustre_dissect_element_mdt_body_mode(tvb, offset, pinfo, tree);
3094
3095   offset=lustre_dissect_element_mdt_body_uid(tvb, offset, pinfo, tree);
3096
3097   offset=lustre_dissect_element_mdt_body_gid(tvb, offset, pinfo, tree);
3098
3099   offset=lustre_dissect_element_mdt_body_flags(tvb, offset, pinfo, tree);
3100
3101   offset=lustre_dissect_element_mdt_body_rdev(tvb, offset, pinfo, tree);
3102
3103   offset=lustre_dissect_element_mdt_body_nlink(tvb, offset, pinfo, tree);
3104
3105   offset=lustre_dissect_element_mdt_body_generation(tvb, offset, pinfo, tree);
3106
3107   offset=lustre_dissect_element_mdt_body_suppgid(tvb, offset, pinfo, tree);
3108
3109   offset=lustre_dissect_element_mdt_body_eadatasize(tvb, offset, pinfo, tree);
3110
3111   offset=lustre_dissect_element_mdt_body_aclsize(tvb, offset, pinfo, tree);
3112
3113   offset=lustre_dissect_element_mdt_body_max_mdsize(tvb, offset, pinfo, tree);
3114
3115   offset=lustre_dissect_element_mdt_body_max_cookiesize(tvb, offset, pinfo, tree);
3116
3117   offset=lustre_dissect_element_mdt_body_uid_h(tvb, offset, pinfo, tree);
3118
3119   offset=lustre_dissect_element_mdt_body_gid_h(tvb, offset, pinfo, tree);
3120
3121   offset=lustre_dissect_element_mdt_body_padding_5(tvb, offset, pinfo, tree);
3122
3123   offset=lustre_dissect_element_mdt_body_padding_6(tvb, offset, pinfo, tree);
3124
3125   offset=lustre_dissect_element_mdt_body_padding_7(tvb, offset, pinfo, tree);
3126
3127   offset=lustre_dissect_element_mdt_body_padding_8(tvb, offset, pinfo, tree);
3128
3129   offset=lustre_dissect_element_mdt_body_padding_9(tvb, offset, pinfo, tree);
3130
3131   offset=lustre_dissect_element_mdt_body_padding_10(tvb, offset, pinfo, tree);
3132
3133
3134   proto_item_set_len(item, offset-old_offset);
3135
3136   return offset;
3137 }
3138
3139 /* I don't find where this struct appear on wire.. need to search mdc_setattr_pack() */
3140 /* IDL: struct mdt_rec_setattr { */
3141 /* IDL:         uint32 sa_opcode; */
3142 /* IDL:         uint32 sa_cap; */
3143 /* IDL:         uint32 sa_fsuid; */
3144 /* IDL:         uint32 sa_fsuid_h; */
3145 /* IDL:         uint32 sa_fsgid; */
3146 /* IDL:         uint32 sa_fsgid_h; */
3147 /* IDL:         uint32 sa_suppgid; */
3148 /* IDL:         uint32 sa_suppgid_h; */
3149 /* IDL:         uint32 sa_padding_1; */
3150 /* IDL:         uint32 sa_padding_1_h; */
3151 /* IDL:         struct lu_fid { */
3152 /* IDL: } sa_fid; */
3153 /* IDL:         uint64 sa_valid; */
3154 /* IDL:         uint32 sa_uid; */
3155 /* IDL:         uint32 sa_gid; */
3156 /* IDL:         uint64 sa_size; */
3157 /* IDL:         uint64 sa_blocks; */
3158 /* IDL:         uint64 sa_mtime; */
3159 /* IDL:         uint64 sa_atime; */
3160 /* IDL:         uint64 sa_ctime; */
3161 /* IDL:         uint32 sa_attr_flags; */
3162 /* IDL:         uint32 sa_mode; */
3163 /* IDL:         uint32 sa_padding_2; */
3164 /* IDL:         uint32 sa_padding_3; */
3165 /* IDL:         uint32 sa_padding_4; */
3166 /* IDL:         uint32 sa_padding_5; */
3167 /* IDL: } */
3168
3169 static int
3170 lustre_dissect_element_mdt_rec_setattr_sa_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3171 {
3172   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_opcode);
3173
3174   return offset;
3175 }
3176
3177 static int
3178 lustre_dissect_element_mdt_rec_setattr_sa_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3179 {
3180   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_cap);
3181
3182   return offset;
3183 }
3184
3185 static int
3186 lustre_dissect_element_mdt_rec_setattr_sa_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3187 {
3188   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsuid);
3189
3190   return offset;
3191 }
3192
3193 static int
3194 lustre_dissect_element_mdt_rec_setattr_sa_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3195 {
3196   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsuid_h);
3197
3198   return offset;
3199 }
3200
3201 static int
3202 lustre_dissect_element_mdt_rec_setattr_sa_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3203 {
3204   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsgid);
3205
3206   return offset;
3207 }
3208
3209 static int
3210 lustre_dissect_element_mdt_rec_setattr_sa_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3211 {
3212   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsgid_h);
3213
3214   return offset;
3215 }
3216
3217 static int
3218 lustre_dissect_element_mdt_rec_setattr_sa_suppgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3219 {
3220   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_suppgid);
3221
3222   return offset;
3223 }
3224
3225 static int
3226 lustre_dissect_element_mdt_rec_setattr_sa_suppgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3227 {
3228   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_suppgid_h);
3229
3230   return offset;
3231 }
3232
3233 static int
3234 lustre_dissect_element_mdt_rec_setattr_sa_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3235 {
3236   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_1);
3237
3238   return offset;
3239 }
3240
3241 static int
3242 lustre_dissect_element_mdt_rec_setattr_sa_padding_1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3243 {
3244   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_1_h);
3245
3246   return offset;
3247 }
3248
3249 static int
3250 lustre_dissect_element_mdt_rec_setattr_sa_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3251 {
3252   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_setattr_sa_fid);
3253
3254   return offset;
3255 }
3256
3257 static int
3258 lustre_dissect_element_mdt_rec_setattr_sa_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3259 {
3260   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_valid);
3261
3262   return offset;
3263 }
3264
3265 static int
3266 lustre_dissect_element_mdt_rec_setattr_sa_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3267 {
3268   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_uid);
3269
3270   return offset;
3271 }
3272
3273 static int
3274 lustre_dissect_element_mdt_rec_setattr_sa_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3275 {
3276   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_gid);
3277
3278   return offset;
3279 }
3280
3281 static int
3282 lustre_dissect_element_mdt_rec_setattr_sa_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3283 {
3284   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_size);
3285
3286   return offset;
3287 }
3288
3289 static int
3290 lustre_dissect_element_mdt_rec_setattr_sa_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3291 {
3292   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_blocks);
3293
3294   return offset;
3295 }
3296
3297 static int
3298 lustre_dissect_element_mdt_rec_setattr_sa_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3299 {
3300
3301   nstime_t ns;
3302   /* timestamp */
3303   ns.secs = tvb_get_letohl(tvb,offset);
3304   ns.nsecs=0;
3305   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_mtime, tvb, offset, 8, &ns );
3306   offset+=8;
3307   return offset;
3308 }
3309
3310 static int
3311 lustre_dissect_element_mdt_rec_setattr_sa_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3312 {
3313   nstime_t ns;
3314   /* timestamp */
3315   ns.secs = tvb_get_letohl(tvb,offset);
3316   ns.nsecs=0;
3317   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_atime, tvb, offset, 8, &ns );
3318   offset+=8;
3319   return offset;
3320 }
3321
3322 static int
3323 lustre_dissect_element_mdt_rec_setattr_sa_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3324 {
3325   nstime_t ns;
3326   /* timestamp */
3327   ns.secs = tvb_get_letohl(tvb,offset);
3328   ns.nsecs=0;
3329   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_ctime, tvb, offset, 8, &ns );
3330   offset+=8;
3331   return offset;
3332 }
3333
3334 static int
3335 lustre_dissect_element_mdt_rec_setattr_sa_attr_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3336 {
3337   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_attr_flags);
3338
3339   return offset;
3340 }
3341
3342 static int
3343 lustre_dissect_element_mdt_rec_setattr_sa_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3344 {
3345   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_mode);
3346
3347   return offset;
3348 }
3349
3350 static int
3351 lustre_dissect_element_mdt_rec_setattr_sa_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3352 {
3353   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_2);
3354
3355   return offset;
3356 }
3357
3358 static int
3359 lustre_dissect_element_mdt_rec_setattr_sa_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3360 {
3361   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_3);
3362
3363   return offset;
3364 }
3365
3366 static int
3367 lustre_dissect_element_mdt_rec_setattr_sa_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3368 {
3369   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_4);
3370
3371   return offset;
3372 }
3373
3374 static int
3375 lustre_dissect_element_mdt_rec_setattr_sa_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3376 {
3377   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_5);
3378
3379   return offset;
3380 }
3381
3382 int
3383 lustre_dissect_struct_mdt_rec_setattr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
3384 {
3385   proto_item *item = NULL;
3386   proto_tree *tree = NULL;
3387   int old_offset;
3388
3389   guint32 sa_opcode ;
3390
3391
3392   old_offset=offset;
3393
3394   if (parent_tree) {
3395     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3396     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_setattr);
3397   }
3398   sa_opcode=tvb_get_letohl(tvb,offset);
3399   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(sa_opcode, lustre_mds_reint_t_vals, "Unknown sa_opc"));
3400
3401   offset=lustre_dissect_element_mdt_rec_setattr_sa_opcode(tvb, offset, pinfo, tree);
3402
3403   offset=lustre_dissect_element_mdt_rec_setattr_sa_cap(tvb, offset, pinfo, tree);
3404
3405   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsuid(tvb, offset, pinfo, tree);
3406
3407   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsuid_h(tvb, offset, pinfo, tree);
3408
3409   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsgid(tvb, offset, pinfo, tree);
3410
3411   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsgid_h(tvb, offset, pinfo, tree);
3412
3413   offset=lustre_dissect_element_mdt_rec_setattr_sa_suppgid(tvb, offset, pinfo, tree);
3414
3415   offset=lustre_dissect_element_mdt_rec_setattr_sa_suppgid_h(tvb, offset, pinfo, tree);
3416
3417   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_1(tvb, offset, pinfo, tree);
3418
3419   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_1_h(tvb, offset, pinfo, tree);
3420
3421   offset=lustre_dissect_element_mdt_rec_setattr_sa_fid(tvb, offset, pinfo, tree);
3422
3423   offset=lustre_dissect_element_mdt_rec_setattr_sa_valid(tvb, offset, pinfo, tree);
3424
3425   offset=lustre_dissect_element_mdt_rec_setattr_sa_uid(tvb, offset, pinfo, tree);
3426
3427   offset=lustre_dissect_element_mdt_rec_setattr_sa_gid(tvb, offset, pinfo, tree);
3428
3429   offset=lustre_dissect_element_mdt_rec_setattr_sa_size(tvb, offset, pinfo, tree);
3430
3431   offset=lustre_dissect_element_mdt_rec_setattr_sa_blocks(tvb, offset, pinfo, tree);
3432
3433   offset=lustre_dissect_element_mdt_rec_setattr_sa_mtime(tvb, offset, pinfo, tree);
3434
3435   offset=lustre_dissect_element_mdt_rec_setattr_sa_atime(tvb, offset, pinfo, tree);
3436
3437   offset=lustre_dissect_element_mdt_rec_setattr_sa_ctime(tvb, offset, pinfo, tree);
3438
3439   offset=lustre_dissect_element_mdt_rec_setattr_sa_attr_flags(tvb, offset, pinfo, tree);
3440
3441   offset=lustre_dissect_element_mdt_rec_setattr_sa_mode(tvb, offset, pinfo, tree);
3442
3443   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_2(tvb, offset, pinfo, tree);
3444
3445   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_3(tvb, offset, pinfo, tree);
3446
3447   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_4(tvb, offset, pinfo, tree);
3448
3449   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_5(tvb, offset, pinfo, tree);
3450
3451
3452   proto_item_set_len(item, offset-old_offset);
3453
3454   return offset;
3455 }
3456
3457 /* IDL: struct mdt_rec_create { */
3458 /* IDL:         uint32 cr_opcode; */
3459 /* IDL:         uint32 cr_cap; */
3460 /* IDL:         uint32 cr_fsuid; */
3461 /* IDL:         uint32 cr_fsuid_h; */
3462 /* IDL:         uint32 cr_fsgid; */
3463 /* IDL:         uint32 cr_fsgid_h; */
3464 /* IDL:         uint32 cr_suppgid1; */
3465 /* IDL:         uint32 cr_suppgid1_h; */
3466 /* IDL:         uint32 cr_suppgid2; */
3467 /* IDL:         uint32 cr_suppgid2_h; */
3468 /* IDL:         struct lu_fid { */
3469 /* IDL: } cr_fid1; */
3470 /* IDL:         struct lu_fid { */
3471 /* IDL: } cr_fid2; */
3472 /* IDL:         struct lustre_handle { */
3473 /* IDL: } cr_old_handle; */
3474 /* IDL:         uint64 cr_time; */
3475 /* IDL:         uint64 cr_rdev; */
3476 /* IDL:         uint64 cr_ioepoch; */
3477 /* IDL:         uint64 cr_padding_1; */
3478 /* IDL:         uint32 cr_mode; */
3479 /* IDL:         uint32 cr_bias; */
3480 /* IDL:         uint32 cr_flags_l; */
3481 /* IDL:         uint32 cr_flags_h; */
3482 /* IDL:         uint32 cr_umask; */
3483 /* IDL:         uint32 cr_padding_4; */
3484 /* IDL: } */
3485
3486 static int
3487 lustre_dissect_element_mdt_rec_create_cr_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3488 {
3489   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_opcode);
3490
3491   return offset;
3492 }
3493
3494 static int
3495 lustre_dissect_element_mdt_rec_create_cr_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3496 {
3497   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_cap);
3498
3499   return offset;
3500 }
3501
3502 static int
3503 lustre_dissect_element_mdt_rec_create_cr_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3504 {
3505   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_fsuid);
3506
3507   return offset;
3508 }
3509
3510 static int
3511 lustre_dissect_element_mdt_rec_create_cr_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3512 {
3513   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_fsuid_h);
3514
3515   return offset;
3516 }
3517
3518 static int
3519 lustre_dissect_element_mdt_rec_create_cr_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3520 {
3521   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_fsgid);
3522
3523   return offset;
3524 }
3525
3526 static int
3527 lustre_dissect_element_mdt_rec_create_cr_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3528 {
3529   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_fsgid_h);
3530
3531   return offset;
3532 }
3533
3534 static int
3535 lustre_dissect_element_mdt_rec_create_cr_suppgid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3536 {
3537   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_suppgid1);
3538
3539   return offset;
3540 }
3541
3542 static int
3543 lustre_dissect_element_mdt_rec_create_cr_suppgid1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3544 {
3545   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_suppgid1_h);
3546
3547   return offset;
3548 }
3549
3550 static int
3551 lustre_dissect_element_mdt_rec_create_cr_suppgid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3552 {
3553   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_suppgid2);
3554
3555   return offset;
3556 }
3557
3558 static int
3559 lustre_dissect_element_mdt_rec_create_cr_suppgid2_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3560 {
3561   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_suppgid2_h);
3562
3563   return offset;
3564 }
3565
3566 static int
3567 lustre_dissect_element_mdt_rec_create_cr_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3568 {
3569   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_create_cr_fid1);
3570   return offset;
3571 }
3572
3573 static int
3574 lustre_dissect_element_mdt_rec_create_cr_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3575 {
3576   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_create_cr_fid2);
3577   return offset;
3578 }
3579
3580 static int
3581 lustre_dissect_element_mdt_rec_create_cr_old_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3582 {
3583   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_create_cr_old_handle);
3584   return offset;
3585 }
3586
3587 static int
3588 lustre_dissect_element_mdt_rec_create_cr_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3589 {
3590   nstime_t ns;
3591   /* timestamp */
3592   ns.secs = tvb_get_letohl(tvb,offset);
3593   ns.nsecs=0;
3594   proto_tree_add_time(tree, hf_lustre_mdt_rec_create_cr_time, tvb, offset, 8, &ns );
3595   offset+=8;
3596   return offset;
3597
3598 }
3599
3600 static int
3601 lustre_dissect_element_mdt_rec_create_cr_rdev(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3602 {
3603   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_rdev);
3604
3605   return offset;
3606 }
3607
3608 static int
3609 lustre_dissect_element_mdt_rec_create_cr_ioepoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3610 {
3611   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_ioepoch);
3612
3613   return offset;
3614 }
3615
3616 static int
3617 lustre_dissect_element_mdt_rec_create_cr_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3618 {
3619   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_padding_1);
3620
3621   return offset;
3622 }
3623
3624 static int
3625 lustre_dissect_element_mdt_rec_create_cr_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3626 {
3627   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_mode);
3628
3629   return offset;
3630 }
3631
3632 static int
3633 lustre_dissect_element_mdt_rec_create_cr_bias(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3634 {
3635   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_bias);
3636
3637   return offset;
3638 }
3639
3640 static int
3641 lustre_dissect_element_mdt_rec_create_cr_flags_l(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3642 {
3643   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_flags_l);
3644
3645   return offset;
3646 }
3647
3648 static int
3649 lustre_dissect_element_mdt_rec_create_cr_flags_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3650 {
3651   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_flags_h);
3652
3653   return offset;
3654 }
3655
3656 static int
3657 lustre_dissect_element_mdt_rec_create_cr_umask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3658 {
3659   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_umask);
3660
3661   return offset;
3662 }
3663
3664 static int
3665 lustre_dissect_element_mdt_rec_create_cr_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3666 {
3667   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_create_cr_padding_4);
3668
3669   return offset;
3670 }
3671
3672 int
3673 lustre_dissect_struct_mdt_rec_create(tvbuff_t *tvb _U_, int offset _U_,
3674                                      packet_info *pinfo _U_,
3675                                      proto_tree *parent_tree _U_,
3676                                      int hf_index _U_)
3677 {
3678   proto_item *item = NULL;
3679   proto_tree *tree = NULL;
3680   int old_offset;
3681   guint32 cr_opcode ;
3682
3683   old_offset=offset;
3684
3685   if (parent_tree) {
3686     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3687     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_create);
3688   }
3689   cr_opcode=tvb_get_letohl(tvb,offset);
3690   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(cr_opcode, lustre_mds_reint_t_vals, "Unknown cr_opc"));
3691
3692   offset=lustre_dissect_element_mdt_rec_create_cr_opcode(tvb, offset, pinfo, tree);
3693
3694   offset=lustre_dissect_element_mdt_rec_create_cr_cap(tvb, offset, pinfo, tree);
3695
3696   offset=lustre_dissect_element_mdt_rec_create_cr_fsuid(tvb, offset, pinfo, tree);
3697
3698   offset=lustre_dissect_element_mdt_rec_create_cr_fsuid_h(tvb, offset, pinfo, tree);
3699
3700   offset=lustre_dissect_element_mdt_rec_create_cr_fsgid(tvb, offset, pinfo, tree);
3701
3702   offset=lustre_dissect_element_mdt_rec_create_cr_fsgid_h(tvb, offset, pinfo, tree);
3703
3704   offset=lustre_dissect_element_mdt_rec_create_cr_suppgid1(tvb, offset, pinfo, tree);
3705
3706   offset=lustre_dissect_element_mdt_rec_create_cr_suppgid1_h(tvb, offset, pinfo, tree);
3707
3708   offset=lustre_dissect_element_mdt_rec_create_cr_suppgid2(tvb, offset, pinfo, tree);
3709
3710   offset=lustre_dissect_element_mdt_rec_create_cr_suppgid2_h(tvb, offset, pinfo, tree);
3711
3712   offset=lustre_dissect_element_mdt_rec_create_cr_fid1(tvb, offset, pinfo, tree);
3713
3714   offset=lustre_dissect_element_mdt_rec_create_cr_fid2(tvb, offset, pinfo, tree);
3715
3716   offset=lustre_dissect_element_mdt_rec_create_cr_old_handle(tvb, offset, pinfo, tree);
3717
3718   offset=lustre_dissect_element_mdt_rec_create_cr_time(tvb, offset, pinfo, tree);
3719
3720   offset=lustre_dissect_element_mdt_rec_create_cr_rdev(tvb, offset, pinfo, tree);
3721
3722   offset=lustre_dissect_element_mdt_rec_create_cr_ioepoch(tvb, offset, pinfo, tree);
3723
3724   offset=lustre_dissect_element_mdt_rec_create_cr_padding_1(tvb, offset, pinfo, tree);
3725
3726   offset=lustre_dissect_element_mdt_rec_create_cr_mode(tvb, offset, pinfo, tree);
3727
3728   offset=lustre_dissect_element_mdt_rec_create_cr_bias(tvb, offset, pinfo, tree);
3729
3730   offset=lustre_dissect_element_mdt_rec_create_cr_flags_l(tvb, offset, pinfo, tree);
3731
3732   offset=lustre_dissect_element_mdt_rec_create_cr_flags_h(tvb, offset, pinfo, tree);
3733
3734   offset=lustre_dissect_element_mdt_rec_create_cr_umask(tvb, offset, pinfo, tree);
3735
3736   offset=lustre_dissect_element_mdt_rec_create_cr_padding_4(tvb, offset, pinfo, tree);
3737
3738   proto_item_set_len(item, offset-old_offset);
3739
3740   return offset;
3741 }
3742
3743 /* TODO : find where this structure appear ! */
3744 /* IDL: struct mdt_rec_link { */
3745 /* IDL:         uint32 lk_opcode; */
3746 /* IDL:         uint32 lk_cap; */
3747 /* IDL:         uint32 lk_fsuid; */
3748 /* IDL:         uint32 lk_fsuid_h; */
3749 /* IDL:         uint32 lk_fsgid; */
3750 /* IDL:         uint32 lk_fsgid_h; */
3751 /* IDL:         uint32 lk_suppgid1; */
3752 /* IDL:         uint32 lk_suppgid1_h; */
3753 /* IDL:         uint32 lk_suppgid2; */
3754 /* IDL:         uint32 lk_suppgid2_h; */
3755 /* IDL:         struct lu_fid { */
3756 /* IDL: } lk_fid1; */
3757 /* IDL:         struct lu_fid { */
3758 /* IDL: } lk_fid2; */
3759 /* IDL:         uint64 lk_time; */
3760 /* IDL:         uint64 lk_padding_1; */
3761 /* IDL:         uint64 lk_padding_2; */
3762 /* IDL:         uint64 lk_padding_3; */
3763 /* IDL:         uint64 lk_padding_4; */
3764 /* IDL:         uint32 lk_bias; */
3765 /* IDL:         uint32 lk_padding_5; */
3766 /* IDL:         uint32 lk_padding_6; */
3767 /* IDL:         uint32 lk_padding_7; */
3768 /* IDL:         uint32 lk_padding_8; */
3769 /* IDL:         uint32 lk_padding_9; */
3770 /* IDL: } */
3771
3772 static int
3773 lustre_dissect_element_mdt_rec_link_lk_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3774 {
3775   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_opcode);
3776
3777   return offset;
3778 }
3779
3780 static int
3781 lustre_dissect_element_mdt_rec_link_lk_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3782 {
3783   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_cap);
3784
3785   return offset;
3786 }
3787
3788 static int
3789 lustre_dissect_element_mdt_rec_link_lk_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3790 {
3791   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_fsuid);
3792
3793   return offset;
3794 }
3795
3796 static int
3797 lustre_dissect_element_mdt_rec_link_lk_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3798 {
3799   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_fsuid_h);
3800
3801   return offset;
3802 }
3803
3804 static int
3805 lustre_dissect_element_mdt_rec_link_lk_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3806 {
3807   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_fsgid);
3808
3809   return offset;
3810 }
3811
3812 static int
3813 lustre_dissect_element_mdt_rec_link_lk_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3814 {
3815   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_fsgid_h);
3816
3817   return offset;
3818 }
3819
3820 static int
3821 lustre_dissect_element_mdt_rec_link_lk_suppgid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3822 {
3823   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_suppgid1);
3824
3825   return offset;
3826 }
3827
3828 static int
3829 lustre_dissect_element_mdt_rec_link_lk_suppgid1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3830 {
3831   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_suppgid1_h);
3832
3833   return offset;
3834 }
3835
3836 static int
3837 lustre_dissect_element_mdt_rec_link_lk_suppgid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3838 {
3839   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_suppgid2);
3840
3841   return offset;
3842 }
3843
3844 static int
3845 lustre_dissect_element_mdt_rec_link_lk_suppgid2_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3846 {
3847   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_suppgid2_h);
3848
3849   return offset;
3850 }
3851
3852 static int
3853 lustre_dissect_element_mdt_rec_link_lk_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3854 {
3855   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_link_lk_fid1);
3856   return offset;
3857 }
3858
3859 static int
3860 lustre_dissect_element_mdt_rec_link_lk_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3861 {
3862   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_link_lk_fid2);
3863   return offset;
3864 }
3865
3866 static int
3867 lustre_dissect_element_mdt_rec_link_lk_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3868 {
3869   nstime_t ns;
3870   /* timestamp */
3871   ns.secs = tvb_get_letohl(tvb,offset);
3872   ns.nsecs=0;
3873   proto_tree_add_time(tree, hf_lustre_mdt_rec_link_lk_time, tvb, offset, 8, &ns );
3874   offset+=8;
3875   return offset;
3876 }
3877
3878 static int
3879 lustre_dissect_element_mdt_rec_link_lk_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3880 {
3881   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_1);
3882
3883   return offset;
3884 }
3885
3886 static int
3887 lustre_dissect_element_mdt_rec_link_lk_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3888 {
3889   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_2);
3890
3891   return offset;
3892 }
3893
3894 static int
3895 lustre_dissect_element_mdt_rec_link_lk_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3896 {
3897   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_3);
3898
3899   return offset;
3900 }
3901
3902 static int
3903 lustre_dissect_element_mdt_rec_link_lk_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3904 {
3905   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_4);
3906
3907   return offset;
3908 }
3909
3910 static int
3911 lustre_dissect_element_mdt_rec_link_lk_bias(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3912 {
3913   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_bias);
3914
3915   return offset;
3916 }
3917
3918 static int
3919 lustre_dissect_element_mdt_rec_link_lk_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3920 {
3921   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_5);
3922
3923   return offset;
3924 }
3925
3926 static int
3927 lustre_dissect_element_mdt_rec_link_lk_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3928 {
3929   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_6);
3930
3931   return offset;
3932 }
3933
3934 static int
3935 lustre_dissect_element_mdt_rec_link_lk_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3936 {
3937   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_7);
3938
3939   return offset;
3940 }
3941
3942 static int
3943 lustre_dissect_element_mdt_rec_link_lk_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3944 {
3945   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_8);
3946
3947   return offset;
3948 }
3949
3950 static int
3951 lustre_dissect_element_mdt_rec_link_lk_padding_9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3952 {
3953   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_link_lk_padding_9);
3954
3955   return offset;
3956 }
3957
3958 int
3959 lustre_dissect_struct_mdt_rec_link(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
3960 {
3961   proto_item *item = NULL;
3962   proto_tree *tree = NULL;
3963   int old_offset;
3964
3965   guint32 lk_opcode ;
3966
3967
3968   old_offset=offset;
3969
3970   if (parent_tree) {
3971     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3972     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_link);
3973   }
3974   lk_opcode=tvb_get_letohl(tvb,offset);
3975   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(lk_opcode, lustre_mds_reint_t_vals, "Unknown lk_opc"));
3976
3977   offset=lustre_dissect_element_mdt_rec_link_lk_opcode(tvb, offset, pinfo, tree);
3978
3979   offset=lustre_dissect_element_mdt_rec_link_lk_cap(tvb, offset, pinfo, tree);
3980
3981   offset=lustre_dissect_element_mdt_rec_link_lk_fsuid(tvb, offset, pinfo, tree);
3982
3983   offset=lustre_dissect_element_mdt_rec_link_lk_fsuid_h(tvb, offset, pinfo, tree);
3984
3985   offset=lustre_dissect_element_mdt_rec_link_lk_fsgid(tvb, offset, pinfo, tree);
3986
3987   offset=lustre_dissect_element_mdt_rec_link_lk_fsgid_h(tvb, offset, pinfo, tree);
3988
3989   offset=lustre_dissect_element_mdt_rec_link_lk_suppgid1(tvb, offset, pinfo, tree);
3990
3991   offset=lustre_dissect_element_mdt_rec_link_lk_suppgid1_h(tvb, offset, pinfo, tree);
3992
3993   offset=lustre_dissect_element_mdt_rec_link_lk_suppgid2(tvb, offset, pinfo, tree);
3994
3995   offset=lustre_dissect_element_mdt_rec_link_lk_suppgid2_h(tvb, offset, pinfo, tree);
3996
3997   offset=lustre_dissect_element_mdt_rec_link_lk_fid1(tvb, offset, pinfo, tree);
3998
3999   offset=lustre_dissect_element_mdt_rec_link_lk_fid2(tvb, offset, pinfo, tree);
4000
4001   offset=lustre_dissect_element_mdt_rec_link_lk_time(tvb, offset, pinfo, tree);
4002
4003   offset=lustre_dissect_element_mdt_rec_link_lk_padding_1(tvb, offset, pinfo, tree);
4004
4005   offset=lustre_dissect_element_mdt_rec_link_lk_padding_2(tvb, offset, pinfo, tree);
4006
4007   offset=lustre_dissect_element_mdt_rec_link_lk_padding_3(tvb, offset, pinfo, tree);
4008
4009   offset=lustre_dissect_element_mdt_rec_link_lk_padding_4(tvb, offset, pinfo, tree);
4010
4011   offset=lustre_dissect_element_mdt_rec_link_lk_bias(tvb, offset, pinfo, tree);
4012
4013   offset=lustre_dissect_element_mdt_rec_link_lk_padding_5(tvb, offset, pinfo, tree);
4014
4015   offset=lustre_dissect_element_mdt_rec_link_lk_padding_6(tvb, offset, pinfo, tree);
4016
4017   offset=lustre_dissect_element_mdt_rec_link_lk_padding_7(tvb, offset, pinfo, tree);
4018
4019   offset=lustre_dissect_element_mdt_rec_link_lk_padding_8(tvb, offset, pinfo, tree);
4020
4021   offset=lustre_dissect_element_mdt_rec_link_lk_padding_9(tvb, offset, pinfo, tree);
4022
4023
4024   proto_item_set_len(item, offset-old_offset);
4025
4026   return offset;
4027 }
4028
4029 /* IDL: struct mdt_rec_unlink { */
4030 /* IDL:         uint32 ul_opcode; */
4031 /* IDL:         uint32 ul_cap; */
4032 /* IDL:         uint32 ul_fsuid; */
4033 /* IDL:         uint32 ul_fsuid_h; */
4034 /* IDL:         uint32 ul_fsgid; */
4035 /* IDL:         uint32 ul_fsgid_h; */
4036 /* IDL:         uint32 ul_suppgid1; */
4037 /* IDL:         uint32 ul_suppgid1_h; */
4038 /* IDL:         uint32 ul_suppgid2; */
4039 /* IDL:         uint32 ul_suppgid2_h; */
4040 /* IDL:         struct lu_fid { */
4041 /* IDL: } ul_fid1; */
4042 /* IDL:         struct lu_fid { */
4043 /* IDL: } ul_fid2; */
4044 /* IDL:         uint64 ul_time; */
4045 /* IDL:         uint64 ul_padding_2; */
4046 /* IDL:         uint64 ul_padding_3; */
4047 /* IDL:         uint64 ul_padding_4; */
4048 /* IDL:         uint64 ul_padding_5; */
4049 /* IDL:         uint32 ul_bias; */
4050 /* IDL:         uint32 ul_mode; */
4051 /* IDL:         uint32 ul_padding_6; */
4052 /* IDL:         uint32 ul_padding_7; */
4053 /* IDL:         uint32 ul_padding_8; */
4054 /* IDL:         uint32 ul_padding_9; */
4055 /* IDL: } */
4056
4057 static int
4058 lustre_dissect_element_mdt_rec_unlink_ul_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4059 {
4060   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_opcode);
4061
4062   return offset;
4063 }
4064
4065 static int
4066 lustre_dissect_element_mdt_rec_unlink_ul_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4067 {
4068   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_cap);
4069
4070   return offset;
4071 }
4072
4073 static int
4074 lustre_dissect_element_mdt_rec_unlink_ul_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4075 {
4076   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_fsuid);
4077
4078   return offset;
4079 }
4080
4081 static int
4082 lustre_dissect_element_mdt_rec_unlink_ul_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4083 {
4084   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_fsuid_h);
4085
4086   return offset;
4087 }
4088
4089 static int
4090 lustre_dissect_element_mdt_rec_unlink_ul_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4091 {
4092   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_fsgid);
4093
4094   return offset;
4095 }
4096
4097 static int
4098 lustre_dissect_element_mdt_rec_unlink_ul_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4099 {
4100   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_fsgid_h);
4101
4102   return offset;
4103 }
4104
4105 static int
4106 lustre_dissect_element_mdt_rec_unlink_ul_suppgid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4107 {
4108   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_suppgid1);
4109
4110   return offset;
4111 }
4112
4113 static int
4114 lustre_dissect_element_mdt_rec_unlink_ul_suppgid1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4115 {
4116   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_suppgid1_h);
4117
4118   return offset;
4119 }
4120
4121 static int
4122 lustre_dissect_element_mdt_rec_unlink_ul_suppgid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4123 {
4124   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_suppgid2);
4125
4126   return offset;
4127 }
4128
4129 static int
4130 lustre_dissect_element_mdt_rec_unlink_ul_suppgid2_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4131 {
4132   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_suppgid2_h);
4133
4134   return offset;
4135 }
4136
4137 static int
4138 lustre_dissect_element_mdt_rec_unlink_ul_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4139 {
4140   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_unlink_ul_fid1);
4141   return offset;
4142 }
4143
4144 static int
4145 lustre_dissect_element_mdt_rec_unlink_ul_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4146 {
4147   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_unlink_ul_fid2);
4148   return offset;
4149 }
4150
4151 static int
4152 lustre_dissect_element_mdt_rec_unlink_ul_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4153 {
4154   nstime_t ns;
4155   /* timestamp */
4156   ns.secs = tvb_get_letohl(tvb,offset);
4157   ns.nsecs=0;
4158   proto_tree_add_time(tree,hf_lustre_mdt_rec_unlink_ul_time , tvb, offset, 8, &ns );
4159   offset+=8;
4160   return offset;
4161 }
4162
4163 static int
4164 lustre_dissect_element_mdt_rec_unlink_ul_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4165 {
4166   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_2);
4167
4168   return offset;
4169 }
4170
4171 static int
4172 lustre_dissect_element_mdt_rec_unlink_ul_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4173 {
4174   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_3);
4175
4176   return offset;
4177 }
4178
4179 static int
4180 lustre_dissect_element_mdt_rec_unlink_ul_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4181 {
4182   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_4);
4183
4184   return offset;
4185 }
4186
4187 static int
4188 lustre_dissect_element_mdt_rec_unlink_ul_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4189 {
4190   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_5);
4191
4192   return offset;
4193 }
4194
4195 static int
4196 lustre_dissect_element_mdt_rec_unlink_ul_bias(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4197 {
4198   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_bias);
4199
4200   return offset;
4201 }
4202
4203 static int
4204 lustre_dissect_element_mdt_rec_unlink_ul_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4205 {
4206   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_mode);
4207
4208   return offset;
4209 }
4210
4211 static int
4212 lustre_dissect_element_mdt_rec_unlink_ul_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4213 {
4214   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_6);
4215
4216   return offset;
4217 }
4218
4219 static int
4220 lustre_dissect_element_mdt_rec_unlink_ul_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4221 {
4222   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_7);
4223
4224   return offset;
4225 }
4226
4227 static int
4228 lustre_dissect_element_mdt_rec_unlink_ul_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4229 {
4230   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_8);
4231
4232   return offset;
4233 }
4234
4235 static int
4236 lustre_dissect_element_mdt_rec_unlink_ul_padding_9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4237 {
4238   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_unlink_ul_padding_9);
4239
4240   return offset;
4241 }
4242
4243 int
4244 lustre_dissect_struct_mdt_rec_unlink(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
4245 {
4246   proto_item *item = NULL;
4247   proto_tree *tree = NULL;
4248   int old_offset;
4249
4250   guint32 ul_opcode ;
4251
4252
4253   old_offset=offset;
4254
4255   if (parent_tree) {
4256     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
4257     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_unlink);
4258   }
4259
4260   ul_opcode=tvb_get_letohl(tvb,offset);
4261   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(ul_opcode, lustre_mds_reint_t_vals, "Unknown ul_opc"));
4262
4263   offset=lustre_dissect_element_mdt_rec_unlink_ul_opcode(tvb, offset, pinfo, tree);
4264
4265   offset=lustre_dissect_element_mdt_rec_unlink_ul_cap(tvb, offset, pinfo, tree);
4266
4267   offset=lustre_dissect_element_mdt_rec_unlink_ul_fsuid(tvb, offset, pinfo, tree);
4268
4269   offset=lustre_dissect_element_mdt_rec_unlink_ul_fsuid_h(tvb, offset, pinfo, tree);
4270
4271   offset=lustre_dissect_element_mdt_rec_unlink_ul_fsgid(tvb, offset, pinfo, tree);
4272
4273   offset=lustre_dissect_element_mdt_rec_unlink_ul_fsgid_h(tvb, offset, pinfo, tree);
4274
4275   offset=lustre_dissect_element_mdt_rec_unlink_ul_suppgid1(tvb, offset, pinfo, tree);
4276
4277   offset=lustre_dissect_element_mdt_rec_unlink_ul_suppgid1_h(tvb, offset, pinfo, tree);
4278
4279   offset=lustre_dissect_element_mdt_rec_unlink_ul_suppgid2(tvb, offset, pinfo, tree);
4280
4281   offset=lustre_dissect_element_mdt_rec_unlink_ul_suppgid2_h(tvb, offset, pinfo, tree);
4282
4283   offset=lustre_dissect_element_mdt_rec_unlink_ul_fid1(tvb, offset, pinfo, tree);
4284
4285   offset=lustre_dissect_element_mdt_rec_unlink_ul_fid2(tvb, offset, pinfo, tree);
4286
4287   offset=lustre_dissect_element_mdt_rec_unlink_ul_time(tvb, offset, pinfo, tree);
4288
4289   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_2(tvb, offset, pinfo, tree);
4290
4291   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_3(tvb, offset, pinfo, tree);
4292
4293   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_4(tvb, offset, pinfo, tree);
4294
4295   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_5(tvb, offset, pinfo, tree);
4296
4297   offset=lustre_dissect_element_mdt_rec_unlink_ul_bias(tvb, offset, pinfo, tree);
4298
4299   offset=lustre_dissect_element_mdt_rec_unlink_ul_mode(tvb, offset, pinfo, tree);
4300
4301   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_6(tvb, offset, pinfo, tree);
4302
4303   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_7(tvb, offset, pinfo, tree);
4304
4305   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_8(tvb, offset, pinfo, tree);
4306
4307   offset=lustre_dissect_element_mdt_rec_unlink_ul_padding_9(tvb, offset, pinfo, tree);
4308
4309
4310   proto_item_set_len(item, offset-old_offset);
4311
4312   return offset;
4313 }
4314
4315 /* IDL: struct mdt_rec_rename { */
4316 /* IDL:         uint32 rn_opcode; */
4317 /* IDL:         uint32 rn_fsuid; */
4318 /* IDL:         uint32 rn_fsgid; */
4319 /* IDL:         uint32 rn_cap; */
4320 /* IDL:         uint32 rn_suppgid1; */
4321 /* IDL:         uint32 rn_suppgid2; */
4322 /* IDL:         struct ll_fid { */
4323 /* IDL: } rn_fid1; */
4324 /* IDL:         struct ll_fid { */
4325 /* IDL: } rn_fid2; */
4326 /* IDL:         uint64 rn_time; */
4327 /* IDL:         uint32 rn_padding_1; */
4328 /* IDL:         uint32 rn_padding_2; */
4329 /* IDL:         uint32 rn_padding_3; */
4330 /* IDL:         uint32 rn_padding_4; */
4331 /* IDL: } */
4332
4333 static int
4334 lustre_dissect_element_mdt_rec_rename_rn_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4335 {
4336   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_opcode);
4337
4338   return offset;
4339 }
4340
4341 static int
4342 lustre_dissect_element_mdt_rec_rename_rn_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4343 {
4344   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_cap);
4345
4346   return offset;
4347 }
4348
4349 static int
4350 lustre_dissect_element_mdt_rec_rename_rn_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4351 {
4352   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_fsuid);
4353
4354   return offset;
4355 }
4356
4357 static int
4358 lustre_dissect_element_mdt_rec_rename_rn_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4359 {
4360   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_fsuid_h);
4361
4362   return offset;
4363 }
4364
4365 static int
4366 lustre_dissect_element_mdt_rec_rename_rn_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4367 {
4368   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_fsgid);
4369
4370   return offset;
4371 }
4372
4373 static int
4374 lustre_dissect_element_mdt_rec_rename_rn_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4375 {
4376   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_fsgid_h);
4377
4378   return offset;
4379 }
4380
4381 static int
4382 lustre_dissect_element_mdt_rec_rename_rn_suppgid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4383 {
4384   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_suppgid1);
4385
4386   return offset;
4387 }
4388
4389 static int
4390 lustre_dissect_element_mdt_rec_rename_rn_suppgid1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4391 {
4392   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_suppgid1_h);
4393
4394   return offset;
4395 }
4396
4397 static int
4398 lustre_dissect_element_mdt_rec_rename_rn_suppgid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4399 {
4400   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_suppgid2);
4401
4402   return offset;
4403 }
4404
4405 static int
4406 lustre_dissect_element_mdt_rec_rename_rn_suppgid2_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4407 {
4408   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_suppgid2_h);
4409
4410   return offset;
4411 }
4412
4413 static int
4414 lustre_dissect_element_mdt_rec_rename_rn_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4415 {
4416   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_rename_rn_fid1);
4417   return offset;
4418 }
4419
4420 static int
4421 lustre_dissect_element_mdt_rec_rename_rn_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4422 {
4423   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_rename_rn_fid2);
4424   return offset;
4425 }
4426
4427 static int
4428 lustre_dissect_element_mdt_rec_rename_rn_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4429 {
4430   nstime_t ns;
4431   /* timestamp */
4432   ns.secs = tvb_get_letohl(tvb,offset);
4433   ns.nsecs=0;
4434   proto_tree_add_time(tree, hf_lustre_mdt_rec_rename_rn_time, tvb, offset, 8, &ns );
4435   offset+=8;
4436   return offset;
4437 }
4438
4439 static int
4440 lustre_dissect_element_mdt_rec_rename_rn_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4441 {
4442   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_1);
4443
4444   return offset;
4445 }
4446
4447 static int
4448 lustre_dissect_element_mdt_rec_rename_rn_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4449 {
4450   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_2);
4451
4452   return offset;
4453 }
4454
4455 static int
4456 lustre_dissect_element_mdt_rec_rename_rn_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4457 {
4458   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_3);
4459
4460   return offset;
4461 }
4462
4463 static int
4464 lustre_dissect_element_mdt_rec_rename_rn_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4465 {
4466   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_4);
4467
4468   return offset;
4469 }
4470
4471 static int
4472 lustre_dissect_element_mdt_rec_rename_rn_bias(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4473 {
4474   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_bias);
4475
4476   return offset;
4477 }
4478
4479 static int
4480 lustre_dissect_element_mdt_rec_rename_rn_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4481 {
4482   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_mode);
4483
4484   return offset;
4485 }
4486
4487 static int
4488 lustre_dissect_element_mdt_rec_rename_rn_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4489 {
4490   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_5);
4491
4492   return offset;
4493 }
4494
4495 static int
4496 lustre_dissect_element_mdt_rec_rename_rn_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4497 {
4498   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_6);
4499
4500   return offset;
4501 }
4502
4503 static int
4504 lustre_dissect_element_mdt_rec_rename_rn_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4505 {
4506   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_7);
4507
4508   return offset;
4509 }
4510
4511 static int
4512 lustre_dissect_element_mdt_rec_rename_rn_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4513 {
4514   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_rename_rn_padding_8);
4515
4516   return offset;
4517 }
4518
4519 int
4520 lustre_dissect_struct_mdt_rec_rename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
4521 {
4522   proto_item *item = NULL;
4523   proto_tree *tree = NULL;
4524   int old_offset;
4525
4526   guint32 rn_opcode ;
4527
4528
4529   old_offset=offset;
4530
4531   if (parent_tree) {
4532     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
4533     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_rename);
4534   }
4535
4536   rn_opcode=tvb_get_letohl(tvb,offset);
4537   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(rn_opcode, lustre_mds_reint_t_vals, "Unknown rn_opc"));
4538
4539   offset=lustre_dissect_element_mdt_rec_rename_rn_opcode(tvb, offset, pinfo, tree);
4540
4541   offset=lustre_dissect_element_mdt_rec_rename_rn_cap(tvb, offset, pinfo, tree);
4542
4543   offset=lustre_dissect_element_mdt_rec_rename_rn_fsuid(tvb, offset, pinfo, tree);
4544
4545   offset=lustre_dissect_element_mdt_rec_rename_rn_fsuid_h(tvb, offset, pinfo, tree);
4546
4547   offset=lustre_dissect_element_mdt_rec_rename_rn_fsgid(tvb, offset, pinfo, tree);
4548
4549   offset=lustre_dissect_element_mdt_rec_rename_rn_fsgid_h(tvb, offset, pinfo, tree);
4550
4551   offset=lustre_dissect_element_mdt_rec_rename_rn_suppgid1(tvb, offset, pinfo, tree);
4552
4553   offset=lustre_dissect_element_mdt_rec_rename_rn_suppgid1_h(tvb, offset, pinfo, tree);
4554
4555   offset=lustre_dissect_element_mdt_rec_rename_rn_suppgid2(tvb, offset, pinfo, tree);
4556
4557   offset=lustre_dissect_element_mdt_rec_rename_rn_suppgid2_h(tvb, offset, pinfo, tree);
4558
4559   offset=lustre_dissect_element_mdt_rec_rename_rn_fid1(tvb, offset, pinfo, tree);
4560
4561   offset=lustre_dissect_element_mdt_rec_rename_rn_fid2(tvb, offset, pinfo, tree);
4562
4563   offset=lustre_dissect_element_mdt_rec_rename_rn_time(tvb, offset, pinfo, tree);
4564
4565   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_1(tvb, offset, pinfo, tree);
4566
4567   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_2(tvb, offset, pinfo, tree);
4568
4569   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_3(tvb, offset, pinfo, tree);
4570
4571   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_4(tvb, offset, pinfo, tree);
4572
4573   offset=lustre_dissect_element_mdt_rec_rename_rn_bias(tvb, offset, pinfo, tree);
4574
4575   offset=lustre_dissect_element_mdt_rec_rename_rn_mode(tvb, offset, pinfo, tree);
4576
4577   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_5(tvb, offset, pinfo, tree);
4578
4579   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_6(tvb, offset, pinfo, tree);
4580
4581   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_7(tvb, offset, pinfo, tree);
4582
4583   offset=lustre_dissect_element_mdt_rec_rename_rn_padding_8(tvb, offset, pinfo, tree);
4584
4585
4586   proto_item_set_len(item, offset-old_offset);
4587
4588   return offset;
4589 }
4590
4591 /* I don't find where this struct appear on wire.. need to search mdc_setxattr_pack() */
4592 /* IDL: struct mdt_rec_setxattr { */
4593 /* IDL:         uint32 sx_opcode; */
4594 /* IDL:         uint32 sx_cap; */
4595 /* IDL:         uint32 sx_fsuid; */
4596 /* IDL:         uint32 sx_fsuid_h; */
4597 /* IDL:         uint32 sx_fsgid; */
4598 /* IDL:         uint32 sx_fsgid_h; */
4599 /* IDL:         uint32 sx_suppgid1; */
4600 /* IDL:         uint32 sx_suppgid1_h; */
4601 /* IDL:         uint32 sx_suppgid2; */
4602 /* IDL:         uint32 sx_suppgid2_h; */
4603 /* IDL:         struct lu_fid { */
4604 /* IDL: } sx_fid; */
4605 /* IDL:         uint64 sx_padding_1; */
4606 /* IDL:         uint32 sx_padding_2; */
4607 /* IDL:         uint32 sx_padding_3; */
4608 /* IDL:         uint64 sx_valid; */
4609 /* IDL:         uint64 sx_time; */
4610 /* IDL:         uint64 sx_padding_5; */
4611 /* IDL:         uint64 sx_padding_6; */
4612 /* IDL:         uint64 sx_padding_7; */
4613 /* IDL:         uint32 sx_size; */
4614 /* IDL:         uint32 sx_flags; */
4615 /* IDL:         uint32 sx_padding_8; */
4616 /* IDL:         uint32 sx_padding_9; */
4617 /* IDL:         uint32 sx_padding_10; */
4618 /* IDL:         uint32 sx_padding_11; */
4619 /* IDL: } */
4620
4621 static int
4622 lustre_dissect_element_mdt_rec_setxattr_sx_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4623 {
4624   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_opcode);
4625
4626   return offset;
4627 }
4628
4629 static int
4630 lustre_dissect_element_mdt_rec_setxattr_sx_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4631 {
4632   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_cap);
4633
4634   return offset;
4635 }
4636
4637 static int
4638 lustre_dissect_element_mdt_rec_setxattr_sx_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4639 {
4640   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_fsuid);
4641
4642   return offset;
4643 }
4644
4645 static int
4646 lustre_dissect_element_mdt_rec_setxattr_sx_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4647 {
4648   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_fsuid_h);
4649
4650   return offset;
4651 }
4652
4653 static int
4654 lustre_dissect_element_mdt_rec_setxattr_sx_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4655 {
4656   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_fsgid);
4657
4658   return offset;
4659 }
4660
4661 static int
4662 lustre_dissect_element_mdt_rec_setxattr_sx_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4663 {
4664   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_fsgid_h);
4665
4666   return offset;
4667 }
4668
4669 static int
4670 lustre_dissect_element_mdt_rec_setxattr_sx_suppgid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4671 {
4672   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_suppgid1);
4673
4674   return offset;
4675 }
4676
4677 static int
4678 lustre_dissect_element_mdt_rec_setxattr_sx_suppgid1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4679 {
4680   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_suppgid1_h);
4681
4682   return offset;
4683 }
4684
4685 static int
4686 lustre_dissect_element_mdt_rec_setxattr_sx_suppgid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4687 {
4688   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_suppgid2);
4689
4690   return offset;
4691 }
4692
4693 static int
4694 lustre_dissect_element_mdt_rec_setxattr_sx_suppgid2_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4695 {
4696   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_suppgid2_h);
4697
4698   return offset;
4699 }
4700
4701 static int
4702 lustre_dissect_element_mdt_rec_setxattr_sx_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4703 {
4704   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_setxattr_sx_fid);
4705
4706   return offset;
4707 }
4708
4709 static int
4710 lustre_dissect_element_mdt_rec_setxattr_sx_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4711 {
4712   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_1);
4713
4714   return offset;
4715 }
4716
4717 static int
4718 lustre_dissect_element_mdt_rec_setxattr_sx_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4719 {
4720   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_2);
4721
4722   return offset;
4723 }
4724
4725 static int
4726 lustre_dissect_element_mdt_rec_setxattr_sx_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4727 {
4728   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_3);
4729
4730   return offset;
4731 }
4732
4733 static int
4734 lustre_dissect_element_mdt_rec_setxattr_sx_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4735 {
4736   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_valid);
4737
4738   return offset;
4739 }
4740
4741 static int
4742 lustre_dissect_element_mdt_rec_setxattr_sx_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4743 {
4744
4745   nstime_t ns;
4746   /* timestamp */
4747   ns.secs = tvb_get_letohl(tvb,offset);
4748   ns.nsecs=0;
4749   proto_tree_add_time(tree, hf_lustre_mdt_rec_setxattr_sx_time, tvb, offset, 8, &ns );
4750   offset+=8;
4751   return offset;
4752 }
4753
4754 static int
4755 lustre_dissect_element_mdt_rec_setxattr_sx_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4756 {
4757   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_5);
4758
4759   return offset;
4760 }
4761
4762 static int
4763 lustre_dissect_element_mdt_rec_setxattr_sx_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4764 {
4765   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_6);
4766
4767   return offset;
4768 }
4769
4770 static int
4771 lustre_dissect_element_mdt_rec_setxattr_sx_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4772 {
4773   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_7);
4774
4775   return offset;
4776 }
4777
4778 static int
4779 lustre_dissect_element_mdt_rec_setxattr_sx_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4780 {
4781   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_size);
4782
4783   return offset;
4784 }
4785
4786 static int
4787 lustre_dissect_element_mdt_rec_setxattr_sx_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4788 {
4789   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_flags);
4790
4791   return offset;
4792 }
4793
4794 static int
4795 lustre_dissect_element_mdt_rec_setxattr_sx_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4796 {
4797   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_8);
4798
4799   return offset;
4800 }
4801
4802 static int
4803 lustre_dissect_element_mdt_rec_setxattr_sx_padding_9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4804 {
4805   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_9);
4806
4807   return offset;
4808 }
4809
4810 static int
4811 lustre_dissect_element_mdt_rec_setxattr_sx_padding_10(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4812 {
4813   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_10);
4814
4815   return offset;
4816 }
4817
4818 static int
4819 lustre_dissect_element_mdt_rec_setxattr_sx_padding_11(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4820 {
4821   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setxattr_sx_padding_11);
4822
4823   return offset;
4824 }
4825
4826 int
4827  lustre_dissect_struct_mdt_rec_setxattr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
4828 {
4829   proto_item *item = NULL;
4830   proto_tree *tree = NULL;
4831   int old_offset;
4832
4833   guint32 sx_opcode ;
4834
4835
4836   old_offset=offset;
4837
4838   if (parent_tree) {
4839     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
4840     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_setxattr);
4841   }
4842   sx_opcode=tvb_get_letohl(tvb,offset);
4843   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(sx_opcode, lustre_mds_reint_t_vals, "Unknown sx_opc"));
4844
4845   offset=lustre_dissect_element_mdt_rec_setxattr_sx_opcode(tvb, offset, pinfo, tree);
4846
4847   offset=lustre_dissect_element_mdt_rec_setxattr_sx_cap(tvb, offset, pinfo, tree);
4848
4849   offset=lustre_dissect_element_mdt_rec_setxattr_sx_fsuid(tvb, offset, pinfo, tree);
4850
4851   offset=lustre_dissect_element_mdt_rec_setxattr_sx_fsuid_h(tvb, offset, pinfo, tree);
4852
4853   offset=lustre_dissect_element_mdt_rec_setxattr_sx_fsgid(tvb, offset, pinfo, tree);
4854
4855   offset=lustre_dissect_element_mdt_rec_setxattr_sx_fsgid_h(tvb, offset, pinfo, tree);
4856
4857   offset=lustre_dissect_element_mdt_rec_setxattr_sx_suppgid1(tvb, offset, pinfo, tree);
4858
4859   offset=lustre_dissect_element_mdt_rec_setxattr_sx_suppgid1_h(tvb, offset, pinfo, tree);
4860
4861   offset=lustre_dissect_element_mdt_rec_setxattr_sx_suppgid2(tvb, offset, pinfo, tree);
4862
4863   offset=lustre_dissect_element_mdt_rec_setxattr_sx_suppgid2_h(tvb, offset, pinfo, tree);
4864
4865   offset=lustre_dissect_element_mdt_rec_setxattr_sx_fid(tvb, offset, pinfo, tree);
4866
4867   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_1(tvb, offset, pinfo, tree);
4868
4869   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_2(tvb, offset, pinfo, tree);
4870
4871   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_3(tvb, offset, pinfo, tree);
4872
4873   offset=lustre_dissect_element_mdt_rec_setxattr_sx_valid(tvb, offset, pinfo, tree);
4874
4875   offset=lustre_dissect_element_mdt_rec_setxattr_sx_time(tvb, offset, pinfo, tree);
4876
4877   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_5(tvb, offset, pinfo, tree);
4878
4879   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_6(tvb, offset, pinfo, tree);
4880
4881   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_7(tvb, offset, pinfo, tree);
4882
4883   offset=lustre_dissect_element_mdt_rec_setxattr_sx_size(tvb, offset, pinfo, tree);
4884
4885   offset=lustre_dissect_element_mdt_rec_setxattr_sx_flags(tvb, offset, pinfo, tree);
4886
4887   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_8(tvb, offset, pinfo, tree);
4888
4889   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_9(tvb, offset, pinfo, tree);
4890
4891   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_10(tvb, offset, pinfo, tree);
4892
4893   offset=lustre_dissect_element_mdt_rec_setxattr_sx_padding_11(tvb, offset, pinfo, tree);
4894
4895
4896   proto_item_set_len(item, offset-old_offset);
4897
4898   return offset;
4899 }
4900
4901
4902 /* TODO : find where this structure appear */
4903
4904 /* IDL: struct lov_desc { */
4905 /* IDL:         uint32 ld_tgt_count; */
4906 /* IDL:         uint32 ld_active_tgt_count; */
4907 /* IDL:         uint32 ld_default_stripe_count; */
4908 /* IDL:         uint32 ld_pattern; */
4909 /* IDL:         uint64 ld_default_stripe_size; */
4910 /* IDL:         uint64 ld_default_stripe_offset; */
4911 /* IDL:         uint32 ld_padding_0; */
4912 /* IDL:         uint32 ld_qos_maxage; */
4913 /* IDL:         uint32 ld_padding_1; */
4914 /* IDL:         uint32 ld_padding_2; */
4915 /* IDL:         struct obd_uuid { */
4916 /* IDL: } ld_uuid; */
4917 /* IDL: } */
4918
4919 static int
4920 lustre_dissect_element_lov_desc_ld_tgt_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4921 {
4922   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_tgt_count);
4923
4924   return offset;
4925 }
4926
4927 static int
4928 lustre_dissect_element_lov_desc_ld_active_tgt_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4929 {
4930   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_active_tgt_count);
4931
4932   return offset;
4933 }
4934
4935 static int
4936 lustre_dissect_element_lov_desc_ld_default_stripe_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4937 {
4938   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_default_stripe_count);
4939
4940   return offset;
4941 }
4942
4943 static int
4944 lustre_dissect_element_lov_desc_ld_pattern(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4945 {
4946   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_pattern);
4947
4948   return offset;
4949 }
4950
4951 static int
4952 lustre_dissect_element_lov_desc_ld_default_stripe_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4953 {
4954   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_default_stripe_size);
4955
4956   return offset;
4957 }
4958
4959 static int
4960 lustre_dissect_element_lov_desc_ld_default_stripe_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4961 {
4962   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_default_stripe_offset);
4963
4964   return offset;
4965 }
4966
4967 static int
4968 lustre_dissect_element_lov_desc_ld_padding_0(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4969 {
4970   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_padding_0);
4971
4972   return offset;
4973 }
4974
4975 static int
4976 lustre_dissect_element_lov_desc_ld_qos_maxage(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4977 {
4978   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_qos_maxage);
4979
4980   return offset;
4981 }
4982
4983 static int
4984 lustre_dissect_element_lov_desc_ld_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4985 {
4986   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_padding_1);
4987
4988   return offset;
4989 }
4990
4991 static int
4992 lustre_dissect_element_lov_desc_ld_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
4993 {
4994   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_desc_ld_padding_2);
4995
4996   return offset;
4997 }
4998
4999 static int
5000 lustre_dissect_element_lov_desc_ld_uuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5001 {
5002   //offset=lustre_dissect_struct_HASH(0x85bade8)(tvb,offset,pinfo,tree,hf_lustre_lov_desc_ld_uuid);
5003   return offset;
5004 }
5005
5006 int
5007 lustre_dissect_struct_lov_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5008 {
5009   proto_item *item = NULL;
5010   proto_tree *tree = NULL;
5011   int old_offset;
5012
5013
5014
5015   old_offset=offset;
5016
5017   if (parent_tree) {
5018     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5019     tree = proto_item_add_subtree(item, ett_lustre_lov_desc);
5020   }
5021
5022   offset=lustre_dissect_element_lov_desc_ld_tgt_count(tvb, offset, pinfo, tree);
5023
5024   offset=lustre_dissect_element_lov_desc_ld_active_tgt_count(tvb, offset, pinfo, tree);
5025
5026   offset=lustre_dissect_element_lov_desc_ld_default_stripe_count(tvb, offset, pinfo, tree);
5027
5028   offset=lustre_dissect_element_lov_desc_ld_pattern(tvb, offset, pinfo, tree);
5029
5030   offset=lustre_dissect_element_lov_desc_ld_default_stripe_size(tvb, offset, pinfo, tree);
5031
5032   offset=lustre_dissect_element_lov_desc_ld_default_stripe_offset(tvb, offset, pinfo, tree);
5033
5034   offset=lustre_dissect_element_lov_desc_ld_padding_0(tvb, offset, pinfo, tree);
5035
5036   offset=lustre_dissect_element_lov_desc_ld_qos_maxage(tvb, offset, pinfo, tree);
5037
5038   offset=lustre_dissect_element_lov_desc_ld_padding_1(tvb, offset, pinfo, tree);
5039
5040   offset=lustre_dissect_element_lov_desc_ld_padding_2(tvb, offset, pinfo, tree);
5041
5042   offset=lustre_dissect_element_lov_desc_ld_uuid(tvb, offset, pinfo, tree);
5043
5044
5045   proto_item_set_len(item, offset-old_offset);
5046
5047   return offset;
5048 }
5049
5050 /* IDL: struct obd_uuid { */
5051 /*        char uuid[40]; */
5052 /* IDL: } */
5053
5054 static int
5055 lustre_dissect_struct_obd_uuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5056 {
5057   /* the lenght of the string is 40 bytes max, with  \0 inside */
5058   proto_tree_add_item(parent_tree, hf_index, tvb, offset, 40, TRUE);
5059
5060   offset+=40;
5061   return offset;
5062 }
5063
5064
5065
5066 /* IDL: struct ldlm_res_id { */
5067 /* IDL:         uint64 name[4]; */
5068 /* IDL: } */
5069
5070 static int
5071 lustre_dissect_element_ldlm_res_id_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5072 {
5073   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_res_id_name);
5074
5075   return offset;
5076 }
5077
5078 static int
5079 lustre_dissect_element_ldlm_res_id_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5080 {
5081   int i;
5082   for (i = 0; i < 4; i++)
5083     offset=lustre_dissect_element_ldlm_res_id_name_(tvb, offset, pinfo, tree);
5084
5085   return offset;
5086 }
5087
5088
5089
5090 int
5091 lustre_dissect_struct_ldlm_res_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5092 {
5093   proto_item *item = NULL;
5094   proto_tree *tree = NULL;
5095   int old_offset;
5096
5097
5098
5099   old_offset=offset;
5100
5101   if (parent_tree) {
5102     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5103     tree = proto_item_add_subtree(item, ett_lustre_ldlm_res_id);
5104   }
5105
5106   offset=lustre_dissect_element_ldlm_res_id_name(tvb, offset, pinfo, tree);
5107
5108
5109   proto_item_set_len(item, offset-old_offset);
5110
5111   return offset;
5112 }
5113
5114
5115 /* IDL: enum { */
5116 /* IDL:         LCK_MINMODE=0, */
5117 /* IDL:         LCK_EX=1, */
5118 /* IDL:         LCK_PW=2, */
5119 /* IDL:         LCK_PR=4, */
5120 /* IDL:         LCK_CW=8, */
5121 /* IDL:         LCK_CR=16, */
5122 /* IDL:         LCK_NL=32, */
5123 /* IDL:         LCK_GROUP=64, */
5124 /* IDL:         LCK_MAXMODE, */
5125 /* IDL: } */
5126
5127 int
5128 lustre_dissect_enum_ldlm_mode_t(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_)
5129 {
5130   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_index);
5131   return offset;
5132 }
5133
5134
5135 /* IDL: enum { */
5136 /* IDL:         LDLM_PLAIN=10, */
5137 /* IDL:         LDLM_EXTENT=11, */
5138 /* IDL:         LDLM_FLOCK=12, */
5139 /* IDL:         LDLM_IBITS=13, */
5140 /* IDL:         LDLM_MAX_TYPE, */
5141 /* IDL: } */
5142
5143 int
5144 lustre_dissect_enum_ldlm_type_t(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_)
5145 {
5146   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_resource_desc_lr_type );
5147   return offset;
5148 }
5149
5150 /* IDL: struct ldlm_extent { */
5151 /* IDL:         uint64 start; */
5152 /* IDL:         uint64 end; */
5153 /* IDL:         uint64 gid; */
5154 /* IDL: } */
5155
5156 static int
5157 lustre_dissect_element_ldlm_extent_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5158 {
5159   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_extent_start);
5160
5161   return offset;
5162 }
5163
5164 static int
5165 lustre_dissect_element_ldlm_extent_end(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5166 {
5167   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_extent_end);
5168
5169   return offset;
5170 }
5171
5172 static int
5173 lustre_dissect_element_ldlm_extent_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5174 {
5175   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_extent_gid);
5176
5177   return offset;
5178 }
5179
5180 int
5181 lustre_dissect_struct_ldlm_extent(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5182 {
5183   proto_item *item = NULL;
5184   proto_tree *tree = NULL;
5185   int old_offset;
5186
5187
5188
5189   old_offset=offset;
5190
5191   if (parent_tree) {
5192     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5193     tree = proto_item_add_subtree(item, ett_lustre_ldlm_extent);
5194   }
5195
5196   offset=lustre_dissect_element_ldlm_extent_start(tvb, offset, pinfo, tree);
5197
5198   offset=lustre_dissect_element_ldlm_extent_end(tvb, offset, pinfo, tree);
5199
5200   offset=lustre_dissect_element_ldlm_extent_gid(tvb, offset, pinfo, tree);
5201
5202
5203   proto_item_set_len(item, offset-old_offset);
5204
5205   return offset;
5206 }
5207
5208 /* IDL: struct ldlm_inodebits { */
5209 /* IDL:         uint64 bits; */
5210 /* IDL: } */
5211
5212 static int
5213 lustre_dissect_element_ldlm_inodebits_bits(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5214 {
5215   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_inodebits_bits);
5216
5217   return offset;
5218 }
5219
5220 int
5221 lustre_dissect_struct_ldlm_inodebits(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5222 {
5223   proto_item *item = NULL;
5224   proto_tree *tree = NULL;
5225   int old_offset;
5226
5227
5228
5229   old_offset=offset;
5230
5231   if (parent_tree) {
5232     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5233     tree = proto_item_add_subtree(item, ett_lustre_ldlm_inodebits);
5234   }
5235
5236   offset=lustre_dissect_element_ldlm_inodebits_bits(tvb, offset, pinfo, tree);
5237
5238
5239   proto_item_set_len(item, offset-old_offset);
5240
5241   return offset;
5242 }
5243
5244 /* IDL: struct ldlm_flock { */
5245 /* IDL:         uint64 start; */
5246 /* IDL:         uint64 end; */
5247 /* IDL:         uint64 blocking_export; */
5248 /* IDL:         uint32 blocking_pid; */
5249 /* IDL:         uint32 pid; */
5250 /* IDL: } */
5251
5252 static int
5253 lustre_dissect_element_ldlm_flock_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5254 {
5255   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_flock_start);
5256
5257   return offset;
5258 }
5259
5260 static int
5261 lustre_dissect_element_ldlm_flock_end(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5262 {
5263   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_flock_end);
5264
5265   return offset;
5266 }
5267
5268 static int
5269 lustre_dissect_element_ldlm_flock_blocking_export(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5270 {
5271   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_flock_blocking_export);
5272
5273   return offset;
5274 }
5275
5276 static int
5277 lustre_dissect_element_ldlm_flock_blocking_pid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5278 {
5279   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_flock_blocking_pid);
5280
5281   return offset;
5282 }
5283
5284 static int
5285 lustre_dissect_element_ldlm_flock_pid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5286 {
5287   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_flock_pid);
5288
5289   return offset;
5290 }
5291
5292 int
5293 lustre_dissect_struct_ldlm_flock(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5294 {
5295   proto_item *item = NULL;
5296   proto_tree *tree = NULL;
5297   int old_offset;
5298
5299
5300
5301   old_offset=offset;
5302
5303   if (parent_tree) {
5304     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5305     tree = proto_item_add_subtree(item, ett_lustre_ldlm_flock);
5306   }
5307
5308   offset=lustre_dissect_element_ldlm_flock_start(tvb, offset, pinfo, tree);
5309
5310   offset=lustre_dissect_element_ldlm_flock_end(tvb, offset, pinfo, tree);
5311
5312   offset=lustre_dissect_element_ldlm_flock_blocking_export(tvb, offset, pinfo, tree);
5313
5314   offset=lustre_dissect_element_ldlm_flock_blocking_pid(tvb, offset, pinfo, tree);
5315
5316   offset=lustre_dissect_element_ldlm_flock_pid(tvb, offset, pinfo, tree);
5317
5318
5319   proto_item_set_len(item, offset-old_offset);
5320
5321   return offset;
5322 }
5323
5324 /* IDL: struct ldlm_intent { */
5325 /* IDL:         uint64 opc; */
5326 /* IDL: } */
5327
5328 static int
5329 lustre_dissect_element_ldlm_intent_opc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5330 {
5331   guint32 opcode;
5332   /* this opcode is like a flag*/
5333   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_open    );
5334   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_creat   );
5335   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_readdir );
5336   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_getattr );
5337   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_lookup  );
5338   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_unlink  );
5339   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_getxattr);
5340   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_exec    );
5341   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_intent_opc_pin     );
5342   opcode = tvb_get_letohl(tvb,offset);
5343
5344   display_info_str(tree->parent, pinfo->cinfo, COL_INFO, "[ intent :");
5345   if(opcode & IT_OPEN    ){
5346     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " open");
5347     proto_item_append_text(tree, " open" );
5348   }
5349   if(opcode & IT_CREAT   ){
5350     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " create");
5351     proto_item_append_text(tree, " create" );
5352   }
5353   if(opcode & IT_READDIR ){
5354     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " readdir");
5355     proto_item_append_text(tree, " readdir" );
5356   }
5357   if(opcode & IT_GETATTR ){
5358     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " getattr");
5359     proto_item_append_text(tree, " getattr" );
5360   }
5361   if(opcode & IT_LOOKUP  ){
5362     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " lookup");
5363     proto_item_append_text(tree, " lookup" );
5364   }
5365   if(opcode & IT_UNLINK  ){
5366     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " unlink");
5367     proto_item_append_text(tree, " unlink" );
5368   }
5369   if(opcode & IT_GETXATTR){
5370     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " getxattr");
5371     proto_item_append_text(tree, " getxattr" );
5372   }
5373   if(opcode & IT_EXEC    ){
5374     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " exec");
5375     proto_item_append_text(tree, " exec" );
5376   }
5377   if(opcode & IT_PIN     ){
5378     display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " pin");
5379     proto_item_append_text(tree, " pin" );
5380   }
5381
5382   display_info_str(tree->parent, pinfo->cinfo, COL_INFO, " ]");
5383   offset+=8;
5384   return offset;
5385 }
5386
5387 int
5388 lustre_dissect_struct_ldlm_intent(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5389 {
5390   guint64 intent_opc;
5391   proto_item * opcode_item = NULL;
5392   proto_tree * opcode_tree = NULL;
5393
5394   intent_opc = tvb_get_letoh64(tvb,offset);
5395   if (parent_tree){
5396     opcode_item = proto_tree_add_item(parent_tree, hf_lustre_ldlm_intent_opc, tvb, offset, 8, TRUE);
5397     opcode_tree = proto_item_add_subtree(opcode_item, ett_lustre_ldlm_intent_opc);
5398   }
5399
5400   offset=lustre_dissect_element_ldlm_intent_opc(tvb, offset, pinfo, opcode_tree);
5401
5402   offset=ldlm_opcode_process(tvb, offset, pinfo, parent_tree, intent_opc);
5403
5404   return offset;
5405 }
5406
5407 /* IDL: struct ldlm_resource_desc { */
5408 /* IDL:         ldlm_type_t lr_type; */
5409 /* IDL:         uint32 lr_padding; */
5410 /* IDL:         struct ldlm_res_id { */
5411 /* IDL: } lr_name; */
5412 /* IDL: } */
5413
5414 static int
5415 lustre_dissect_element_ldlm_resource_desc_lr_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5416 {
5417   /*    offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_resource_desc_lr_type);*/
5418   offset=lustre_dissect_enum_ldlm_type_t(tvb, offset, pinfo, tree,  hf_lustre_ldlm_resource_desc_lr_type);
5419   return offset;
5420 }
5421
5422 static int
5423 lustre_dissect_element_ldlm_resource_desc_lr_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5424 {
5425   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_resource_desc_lr_padding);
5426
5427   return offset;
5428 }
5429
5430 static int
5431 lustre_dissect_element_ldlm_resource_desc_lr_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5432 {
5433   offset=lustre_dissect_struct_ldlm_res_id(tvb,offset,pinfo,tree,hf_lustre_ldlm_resource_desc_lr_name);
5434   return offset;
5435 }
5436
5437 int
5438 lustre_dissect_struct_ldlm_resource_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5439 {
5440   proto_item *item = NULL;
5441   proto_tree *tree = NULL;
5442   int old_offset;
5443
5444
5445
5446   old_offset=offset;
5447
5448   if (parent_tree) {
5449     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5450     tree = proto_item_add_subtree(item, ett_lustre_ldlm_resource_desc);
5451   }
5452
5453   offset=lustre_dissect_element_ldlm_resource_desc_lr_type(tvb, offset, pinfo, tree);
5454
5455   offset=lustre_dissect_element_ldlm_resource_desc_lr_padding(tvb, offset, pinfo, tree);
5456
5457   offset=lustre_dissect_element_ldlm_resource_desc_lr_name(tvb, offset, pinfo, tree);
5458
5459
5460   proto_item_set_len(item, offset-old_offset);
5461
5462   return offset;
5463 }
5464
5465
5466 /* IDL: struct ldlm_lock_desc { */
5467 /* IDL:         struct ldlm_resource_desc { */
5468 /* IDL: } l_resource; */
5469 /* IDL:         ldlm_mode_t l_req_mode; */
5470 /* IDL:         ldlm_mode_t l_granted_mode; */
5471 /* IDL:         ldlm_policy_data_t l_policy_data; */
5472 /* IDL: } */
5473
5474 static int
5475 lustre_dissect_element_ldlm_lock_desc_l_resource(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5476 {
5477   offset=lustre_dissect_struct_ldlm_resource_desc(tvb,offset,pinfo,tree,hf_lustre_ldlm_lock_desc_l_resource);
5478   return offset;
5479 }
5480
5481 static int
5482 lustre_dissect_element_ldlm_lock_desc_l_req_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5483 {
5484   offset=lustre_dissect_enum_ldlm_mode_t(tvb, offset, pinfo, tree,  hf_lustre_ldlm_lock_desc_l_req_mode);
5485
5486   return offset;
5487 }
5488
5489 static int
5490 lustre_dissect_element_ldlm_lock_desc_l_granted_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5491 {
5492   offset=lustre_dissect_enum_ldlm_mode_t(tvb, offset, pinfo, tree,  hf_lustre_ldlm_lock_desc_l_granted_mode);
5493
5494   return offset;
5495 }
5496
5497 static int
5498 lustre_dissect_element_ldlm_lock_desc_l_policy_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5499 {
5500
5501   guint32 lr_type; /* type of the lock */
5502
5503   lr_type = tvb_get_letohl(tvb,offset - 48 ); /* TODO  : find another way that using -48 */
5504
5505   /* this section must be check with lustre code, possible mistake here */
5506   switch(lr_type){
5507     case LDLM_PLAIN:
5508     case LDLM_FLOCK:
5509       offset=lustre_dissect_struct_ldlm_flock(tvb,offset,pinfo,tree,hf_lustre_ldlm_lock_desc_l_policy_data);
5510       break;
5511     case LDLM_EXTENT :
5512       offset= lustre_dissect_struct_ldlm_extent(tvb,offset,pinfo,tree,hf_lustre_ldlm_lock_desc_l_policy_data);
5513       /* add an extra padding 8 bytes */
5514       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5515       break;
5516     case LDLM_IBITS:
5517       offset=lustre_dissect_struct_ldlm_inodebits(tvb,offset,pinfo,tree,hf_lustre_ldlm_lock_desc_l_policy_data);
5518       /* add an extra padding 24 bytes */
5519       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5520       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5521       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5522       break;
5523     default:
5524       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5525       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5526       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5527       offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
5528       break;
5529   }
5530   return offset;
5531 }
5532
5533 int
5534 lustre_dissect_struct_ldlm_lock_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5535 {
5536   proto_item *item = NULL;
5537   proto_tree *tree = NULL;
5538   int old_offset;
5539
5540   guint32 lock_req_mode;
5541
5542
5543   old_offset=offset;
5544
5545   if (parent_tree) {
5546     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5547     tree = proto_item_add_subtree(item, ett_lustre_ldlm_lock_desc);
5548   }
5549
5550   offset=lustre_dissect_element_ldlm_lock_desc_l_resource(tvb, offset, pinfo, tree);
5551
5552   lock_req_mode = tvb_get_letohl(tvb,offset);
5553
5554   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(lock_req_mode, lustre_ldlm_mode_t_vals, "Unknown lock"));
5555
5556   offset=lustre_dissect_element_ldlm_lock_desc_l_req_mode(tvb, offset, pinfo, tree);
5557
5558   offset=lustre_dissect_element_ldlm_lock_desc_l_granted_mode(tvb, offset, pinfo, tree);
5559
5560   offset=lustre_dissect_element_ldlm_lock_desc_l_policy_data(tvb, offset, pinfo, tree);
5561
5562
5563   proto_item_set_len(item, offset-old_offset);
5564
5565   return offset;
5566 }
5567
5568
5569 /* IDL: struct ldlm_request { */
5570 /* IDL:         uint32 lock_flags; */
5571 /* IDL:         uint32 lock_count; */
5572 /* IDL:         struct ldlm_lock_desc { */
5573 /* IDL: } lock_desc; */
5574 /* IDL:         struct lustre_handle { */
5575 /* IDL: } lock_handle[2]; */
5576 /* IDL: } */
5577
5578
5579
5580 static int
5581 lustre_dissect_element_ldlm_request_lock_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5582 {
5583   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_request_lock_count);
5584
5585   return offset;
5586 }
5587
5588 static int
5589 lustre_dissect_element_ldlm_request_lock_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5590 {
5591   offset=lustre_dissect_struct_ldlm_lock_desc(tvb,offset,pinfo,tree,hf_lustre_ldlm_request_lock_desc);
5592   return offset;
5593 }
5594
5595
5596
5597 static int
5598 lustre_dissect_element_ldlm_request_lock_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5599 {
5600   /*if (check_col(pinfo->cinfo, COL_INFO)) */
5601   /*    col_append_fstr(pinfo->cinfo, COL_INFO, " ldlm cookie : %" G_GINT64_MODIFIER "u", tvb_get_letoh64(tvb,offset) );*/
5602
5603   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_ldlm_request_lock_handle);
5604   return offset;
5605 }
5606
5607 static int
5608 lustre_dissect_element_ldlm_request_lock_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int num_locks _U_)
5609 {
5610   int i;
5611   if (num_locks < 2)
5612     num_locks = 2;
5613   for (i = 0; i < num_locks; i++)
5614     offset=lustre_dissect_element_ldlm_request_lock_handle_(tvb, offset, pinfo, tree);
5615
5616   return offset;
5617 }
5618
5619 int
5620 lustre_dissect_struct_ldlm_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5621 {
5622   proto_item *item = NULL;
5623   proto_tree *tree = NULL;
5624   int old_offset;
5625   /* guint32 lock_flag; */
5626   /* guint32 ldlm_type; */
5627   guint32 num_locks = 2;
5628
5629   old_offset=offset;
5630
5631   if (parent_tree) {
5632     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5633     tree = proto_item_add_subtree(item, ett_lustre_ldlm_request);
5634   }
5635
5636   /* lock_flag = tvb_get_letohl(tvb,offset); */
5637   offset=lustre_dissect_element_ldlm_lock_flags(tvb, offset, pinfo, tree,
5638                                                 hf_lustre_ldlm_request_lock_flags);
5639
5640   num_locks = tvb_get_letohl(tvb,offset);
5641   offset=lustre_dissect_element_ldlm_request_lock_count(tvb, offset, pinfo, tree);
5642
5643   /* ldlm_type = (EXTENT, PLAIN, ou IBITS) */
5644   /* ldlm_type = tvb_get_letohl(tvb,offset); */
5645   offset=lustre_dissect_element_ldlm_request_lock_desc(tvb, offset, pinfo, tree);
5646   offset=lustre_dissect_element_ldlm_request_lock_handle(tvb, offset, pinfo, tree, num_locks);
5647
5648   proto_item_set_len(item, offset-old_offset);
5649
5650   return offset;
5651 }
5652
5653
5654 /* IDL: struct ldlm_reply { */
5655 /* IDL:         uint32 lock_flags; */
5656 /* IDL:         uint32 lock_padding; */
5657 /* IDL:         struct ldlm_lock_desc { */
5658 /* IDL: } lock_desc; */
5659 /* IDL:         struct lustre_handle { */
5660 /* IDL: } lock_handle; */
5661 /* IDL:         uint64 lock_policy_res1; */
5662 /* IDL:         uint64 lock_policy_res2; */
5663 /* IDL: } */
5664
5665 static int
5666 lustre_dissect_element_ldlm_lock_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5667 {
5668   proto_item *item = NULL;
5669   proto_tree *tree = NULL;
5670
5671   if (parent_tree) {
5672     item = proto_tree_add_item(parent_tree,hf_index, tvb, offset, 4, TRUE);
5673     tree = proto_item_add_subtree(item, ett_lustre_ldlm_lock_flags);
5674   }
5675   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_ast_discard_data);
5676   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_deny_on_contention);
5677   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_bl_done           );
5678   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_bl_ast            );
5679   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_atomic_cb         );
5680   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_cleaned           );
5681   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_cp_reqd           );
5682   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_cancel_on_block   );
5683   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_no_lru            );
5684   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_kms_ignore        );
5685   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_lvb_ready         );
5686   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_test_lock         );
5687   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_block_nowait      );
5688   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_no_timeout        );
5689   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_discard_data      );
5690   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_warn              );
5691   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_local             );
5692   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_canceling         );
5693   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_has_intent        );
5694   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_failed            );
5695   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_local_only        );
5696   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_intent_only       );
5697   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_replay            );
5698   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_cancel            );
5699   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_wait_noreproc     );
5700   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_ast_sent          );
5701   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_cbpending         );
5702   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_block_wait        );
5703   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_block_conv        );
5704   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_block_granted     );
5705   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ldlm_fl_lock_changed      );
5706   return offset;
5707 }
5708
5709 static int
5710 lustre_dissect_element_ldlm_reply_lock_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5711 {
5712   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_ldlm_reply_lock_padding);
5713
5714   return offset;
5715 }
5716
5717 static int
5718 lustre_dissect_element_ldlm_reply_lock_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5719 {
5720   offset=lustre_dissect_struct_ldlm_lock_desc(tvb,offset,pinfo,tree,hf_lustre_ldlm_reply_lock_desc);
5721   return offset;
5722 }
5723
5724 static int
5725 lustre_dissect_element_ldlm_reply_lock_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5726 {
5727   /*if (check_col(pinfo->cinfo, COL_INFO)) */
5728   /*        col_append_fstr(pinfo->cinfo, COL_INFO, " ldlm cookie : %" G_GINT64_MODIFIER "u", tvb_get_letoh64(tvb,offset) );*/
5729
5730   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_ldlm_reply_lock_handle);
5731   return offset;
5732 }
5733
5734 static int
5735 lustre_dissect_element_ldlm_reply_lock_policy_res1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5736 {
5737   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_reply_lock_policy_res1);
5738
5739   return offset;
5740 }
5741
5742 static int
5743 lustre_dissect_element_ldlm_reply_lock_policy_res2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5744 {
5745   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_ldlm_reply_lock_policy_res2);
5746
5747   return offset;
5748 }
5749
5750 int
5751 lustre_dissect_struct_ldlm_reply(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_, guint32 * ldlm_type _U_ )
5752 {
5753   proto_item *item = NULL;
5754   proto_tree *tree = NULL;
5755   int old_offset;
5756   /* guint32 lock_flag; */
5757
5758   old_offset=offset;
5759
5760   if (parent_tree) {
5761     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5762     tree = proto_item_add_subtree(item, ett_lustre_ldlm_reply);
5763   }
5764
5765   /* lock_flag = tvb_get_letohl(tvb,offset); */
5766   offset=lustre_dissect_element_ldlm_lock_flags(tvb, offset, pinfo, tree, hf_lustre_ldlm_reply_lock_flags);
5767
5768   offset=lustre_dissect_element_ldlm_reply_lock_padding(tvb, offset, pinfo, tree);
5769
5770   if (ldlm_type != NULL)
5771     *ldlm_type = tvb_get_letohl(tvb,offset);
5772   offset=lustre_dissect_element_ldlm_reply_lock_desc(tvb, offset, pinfo, tree);
5773
5774   offset=lustre_dissect_element_ldlm_reply_lock_handle(tvb, offset, pinfo, tree);
5775
5776   offset=lustre_dissect_element_ldlm_reply_lock_policy_res1(tvb, offset, pinfo, tree);
5777
5778   offset=lustre_dissect_element_ldlm_reply_lock_policy_res2(tvb, offset, pinfo, tree);
5779
5780   proto_item_set_len(item, offset-old_offset);
5781
5782   return offset;
5783 }
5784
5785
5786
5787
5788 /* IDL: struct mgs_send_param { */
5789 /* IDL:         uint8 mgs_param[1024]; */
5790 /* IDL: } */
5791
5792
5793
5794 static int
5795 lustre_dissect_element_mgs_send_param_mgs_param_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5796 {
5797   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_mgs_send_param_mgs_param);
5798
5799   return offset;
5800 }
5801
5802 static int
5803 lustre_dissect_element_mgs_send_param_mgs_param(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5804 {
5805   int i;
5806   for (i = 0; i < 1024; i++)
5807     offset=lustre_dissect_element_mgs_send_param_mgs_param_(tvb, offset, pinfo, tree);
5808
5809   return offset;
5810 }
5811
5812 int
5813 lustre_dissect_struct_mgs_send_param(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5814 {
5815   proto_item *item = NULL;
5816   proto_tree *tree = NULL;
5817   int old_offset;
5818
5819
5820   old_offset=offset;
5821
5822   if (parent_tree) {
5823     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5824     tree = proto_item_add_subtree(item, ett_lustre_mgs_send_param);
5825   }
5826
5827   offset=lustre_dissect_element_mgs_send_param_mgs_param(tvb, offset, pinfo, tree);
5828
5829
5830   proto_item_set_len(item, offset-old_offset);
5831
5832   return offset;
5833 }
5834
5835 /* IDL: struct mgs_config_body {
5836  * IDL:        char     mcb_name[64];
5837  * IDL:        __u64    mcb_offset;
5838  * IDL:        __u16    mcb_type;
5839  * IDL:        __u8     mcb_reserved;
5840  * IDL:        __u8     mcb_bits;
5841  * IDL:        __u32    mcb_units;
5842  * IDL: };
5843  */
5844 int
5845 lustre_dissect_element_mgs_config_body_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5846 {
5847     int string_len = 64;
5848     proto_tree_add_item(parent_tree, hf_index, tvb, offset, string_len, TRUE);
5849     display_info_fstr(parent_tree, pinfo->cinfo, COL_INFO, " name : %s",
5850                       (const gchar *) tvb_get_string(tvb,offset,string_len) );
5851     offset+=string_len;
5852
5853     return offset;
5854 }
5855
5856 int
5857 lustre_dissect_struct_mgs_config_body(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5858 {
5859   proto_item *item = NULL;
5860   proto_tree *tree = NULL;
5861   int old_offset;
5862
5863
5864   old_offset=offset;
5865
5866   if (parent_tree) {
5867     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5868     tree = proto_item_add_subtree(item, ett_lustre_mgs_config_body);
5869   }
5870
5871   offset=lustre_dissect_element_mgs_config_body_name(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_name);
5872
5873   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_offset);
5874   offset=dissect_uint16(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_type);
5875   offset=dissect_uint8(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_reserved);
5876   offset=dissect_uint8(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_bits);
5877   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_mgs_config_body_units);
5878
5879   proto_item_set_len(item, offset-old_offset);
5880
5881   return offset;
5882 }
5883
5884 /* IDL: struct mgs_config_res {
5885  * IDL:        __u64    mcr_offset;
5886  * IDL:        __u64    mcr_size;
5887  * IDL: };
5888  */
5889 int
5890 lustre_dissect_struct_mgs_config_res(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
5891 {
5892   proto_item *item = NULL;
5893   proto_tree *tree = NULL;
5894   int old_offset;
5895
5896   old_offset=offset;
5897
5898   if (parent_tree) {
5899     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
5900     tree = proto_item_add_subtree(item, ett_lustre_mgs_config_res);
5901   }
5902
5903   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mgs_config_res_offset);
5904   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mgs_config_res_size);
5905
5906   proto_item_set_len(item, offset-old_offset);
5907
5908   return offset;
5909 }
5910
5911
5912 /* IDL: struct mgs_target_info { */
5913 /* IDL:         uint32 mti_lustre_ver; */
5914 /* IDL:         uint32 mti_stripe_index; */
5915 /* IDL:         uint32 mti_config_ver; */
5916 /* IDL:         uint32 mti_flags; */
5917 /* IDL:         uint32 mti_nid_count; */
5918 /* IDL:         uint32 padding; */
5919 /* IDL:         uint8 mti_fsname[64]; */
5920 /* IDL:         uint8 mti_svname[64]; */
5921 /* IDL:         uint8 mti_uuid[40]; */
5922 /* IDL:         uint64 mti_nids[32]; */
5923 /* IDL:         uint8 mti_params[4096]; */
5924 /* IDL: } */
5925
5926 static int
5927 lustre_dissect_element_mgs_target_info_mti_lustre_ver(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5928 {
5929   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_lustre_ver);
5930
5931   return offset;
5932 }
5933
5934 static int
5935 lustre_dissect_element_mgs_target_info_mti_stripe_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5936 {
5937   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_stripe_index);
5938
5939   return offset;
5940 }
5941
5942 static int
5943 lustre_dissect_element_mgs_target_info_mti_config_ver(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5944 {
5945   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_config_ver);
5946
5947   return offset;
5948 }
5949
5950 static int
5951 lustre_dissect_element_mgs_target_info_mti_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5952 {
5953   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_flags);
5954
5955   return offset;
5956 }
5957
5958 static int
5959 lustre_dissect_element_mgs_target_info_mti_nid_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5960 {
5961   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_nid_count);
5962
5963   return offset;
5964 }
5965
5966 static int
5967 lustre_dissect_element_mgs_target_info_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5968 {
5969   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_padding);
5970
5971   return offset;
5972 }
5973
5974 static int
5975 lustre_dissect_element_mgs_target_info_mti_fsname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5976 {
5977   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_fsname);
5978
5979   return offset;
5980 }
5981
5982 static int
5983 lustre_dissect_element_mgs_target_info_mti_fsname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5984 {
5985   int i;
5986   for (i = 0; i < 64; i++)
5987     offset=lustre_dissect_element_mgs_target_info_mti_fsname_(tvb, offset, pinfo, tree);
5988
5989   return offset;
5990 }
5991
5992
5993
5994
5995
5996 static int
5997 lustre_dissect_element_mgs_target_info_mti_svname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
5998 {
5999   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_svname);
6000
6001   return offset;
6002 }
6003
6004 static int
6005 lustre_dissect_element_mgs_target_info_mti_svname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6006 {
6007   int i;
6008   for (i = 0; i < 64; i++)
6009     offset=lustre_dissect_element_mgs_target_info_mti_svname_(tvb, offset, pinfo, tree);
6010
6011   return offset;
6012 }
6013
6014 static int
6015 lustre_dissect_element_mgs_target_info_mti_uuid_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6016 {
6017   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_uuid);
6018
6019   return offset;
6020 }
6021
6022 static int
6023 lustre_dissect_element_mgs_target_info_mti_uuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6024 {
6025   int i;
6026   for (i = 0; i < 40; i++)
6027     offset=lustre_dissect_element_mgs_target_info_mti_uuid_(tvb, offset, pinfo, tree);
6028
6029   return offset;
6030 }
6031
6032
6033
6034
6035
6036 static int
6037 lustre_dissect_element_mgs_target_info_mti_nids_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6038 {
6039   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_nids);
6040
6041   return offset;
6042 }
6043
6044 static int
6045 lustre_dissect_element_mgs_target_info_mti_nids(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6046 {
6047   int i;
6048   for (i = 0; i < 32; i++)
6049     offset=lustre_dissect_element_mgs_target_info_mti_nids_(tvb, offset, pinfo, tree);
6050
6051   return offset;
6052 }
6053
6054
6055
6056 static int
6057 lustre_dissect_element_mgs_target_info_mti_params_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6058 {
6059   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_mgs_target_info_mti_params);
6060
6061   return offset;
6062 }
6063
6064 static int
6065 lustre_dissect_element_mgs_target_info_mti_params(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6066 {
6067   int i;
6068   for (i = 0; i < 4096; i++)
6069     offset=lustre_dissect_element_mgs_target_info_mti_params_(tvb, offset, pinfo, tree);
6070
6071   return offset;
6072 }
6073
6074 int
6075 lustre_dissect_struct_mgs_target_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6076 {
6077   proto_item *item = NULL;
6078   proto_tree *tree = NULL;
6079   int old_offset;
6080
6081
6082
6083   old_offset=offset;
6084
6085   if (parent_tree) {
6086     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6087     tree = proto_item_add_subtree(item, ett_lustre_mgs_target_info);
6088   }
6089
6090   offset=lustre_dissect_element_mgs_target_info_mti_lustre_ver(tvb, offset, pinfo, tree);
6091
6092   offset=lustre_dissect_element_mgs_target_info_mti_stripe_index(tvb, offset, pinfo, tree);
6093
6094   offset=lustre_dissect_element_mgs_target_info_mti_config_ver(tvb, offset, pinfo, tree);
6095
6096   offset=lustre_dissect_element_mgs_target_info_mti_flags(tvb, offset, pinfo, tree);
6097
6098   offset=lustre_dissect_element_mgs_target_info_mti_nid_count(tvb, offset, pinfo, tree);
6099
6100   offset=lustre_dissect_element_mgs_target_info_padding(tvb, offset, pinfo, tree);
6101
6102   offset=lustre_dissect_element_mgs_target_info_mti_fsname(tvb, offset, pinfo, tree);
6103
6104   offset=lustre_dissect_element_mgs_target_info_mti_svname(tvb, offset, pinfo, tree);
6105
6106   offset=lustre_dissect_element_mgs_target_info_mti_uuid(tvb, offset, pinfo, tree);
6107
6108   offset=lustre_dissect_element_mgs_target_info_mti_nids(tvb, offset, pinfo, tree);
6109
6110   offset=lustre_dissect_element_mgs_target_info_mti_params(tvb, offset, pinfo, tree);
6111
6112
6113   proto_item_set_len(item, offset-old_offset);
6114
6115   return offset;
6116 }
6117
6118 /* IDL: struct cfg_marker { */
6119 /* IDL:         uint32 cm_step; */
6120 /* IDL:         uint32 cm_flags; */
6121 /* IDL:         uint32 cm_vers; */
6122 /* IDL:         uint32 padding; */
6123 /* IDL:         time_t cm_createtime; */
6124 /* IDL:         time_t cm_canceltime; */
6125 /* IDL:         uint8 cm_tgtname[64]; */
6126 /* IDL:         uint8 cm_comment[64]; */
6127 /* IDL: } */
6128
6129 static int
6130 lustre_dissect_element_cfg_marker_cm_step(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6131 {
6132   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_cm_step);
6133
6134   return offset;
6135 }
6136
6137 static int
6138 lustre_dissect_element_cfg_marker_cm_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6139 {
6140   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_cm_flags);
6141
6142   return offset;
6143 }
6144
6145 static int
6146 lustre_dissect_element_cfg_marker_cm_vers(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6147 {
6148   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_cm_vers);
6149
6150   return offset;
6151 }
6152
6153 static int
6154 lustre_dissect_element_cfg_marker_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6155 {
6156   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_padding);
6157
6158   return offset;
6159 }
6160
6161 static int
6162 lustre_dissect_element_cfg_marker_cm_createtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6163 {
6164   //offset=dissect_ndr_time_t(tvb, offset, pinfo,tree,  hf_lustre_cfg_marker_cm_createtime );
6165   /*g_print("function lustre_dissect_element_cfg_marker_cm_createtime don't work\n");*/
6166   return offset;
6167 }
6168
6169 static int
6170 lustre_dissect_element_cfg_marker_cm_canceltime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6171 {
6172   //offset=dissect_ndr_time_t(tvb, offset, pinfo,tree,  hf_lustre_cfg_marker_cm_canceltime);
6173
6174   /*g_print("element_cfg_marker_cm_canceltime\n");*/
6175   return offset;
6176 }
6177
6178
6179
6180 static int
6181 lustre_dissect_element_cfg_marker_cm_tgtname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6182 {
6183   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_cm_tgtname);
6184
6185   return offset;
6186 }
6187
6188 static int
6189 lustre_dissect_element_cfg_marker_cm_tgtname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6190 {
6191   int i;
6192   for (i = 0; i < 64; i++)
6193     offset=lustre_dissect_element_cfg_marker_cm_tgtname_(tvb, offset, pinfo, tree);
6194
6195   return offset;
6196 }
6197
6198
6199
6200 static int
6201 lustre_dissect_element_cfg_marker_cm_comment_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6202 {
6203   offset=dissect_uint8(tvb, offset, pinfo, tree,  hf_lustre_cfg_marker_cm_comment);
6204
6205   return offset;
6206 }
6207
6208 static int
6209 lustre_dissect_element_cfg_marker_cm_comment(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6210 {
6211   int i;
6212   for (i = 0; i < 64; i++)
6213     offset=lustre_dissect_element_cfg_marker_cm_comment_(tvb, offset, pinfo, tree);
6214
6215   return offset;
6216 }
6217
6218 int
6219 lustre_dissect_struct_cfg_marker(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6220 {
6221   proto_item *item = NULL;
6222   proto_tree *tree = NULL;
6223   int old_offset;
6224
6225
6226
6227   old_offset=offset;
6228
6229   if (parent_tree) {
6230     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6231     tree = proto_item_add_subtree(item, ett_lustre_cfg_marker);
6232   }
6233
6234   offset=lustre_dissect_element_cfg_marker_cm_step(tvb, offset, pinfo, tree);
6235
6236   offset=lustre_dissect_element_cfg_marker_cm_flags(tvb, offset, pinfo, tree);
6237
6238   offset=lustre_dissect_element_cfg_marker_cm_vers(tvb, offset, pinfo, tree);
6239
6240   offset=lustre_dissect_element_cfg_marker_padding(tvb, offset, pinfo, tree);
6241
6242   offset=lustre_dissect_element_cfg_marker_cm_createtime(tvb, offset, pinfo, tree);
6243
6244   offset=lustre_dissect_element_cfg_marker_cm_canceltime(tvb, offset, pinfo, tree);
6245
6246   offset=lustre_dissect_element_cfg_marker_cm_tgtname(tvb, offset, pinfo, tree);
6247
6248   offset=lustre_dissect_element_cfg_marker_cm_comment(tvb, offset, pinfo, tree);
6249
6250
6251   proto_item_set_len(item, offset-old_offset);
6252
6253   return offset;
6254 }
6255
6256
6257
6258 /* IDL: struct llog_logid { */
6259 /* IDL:         uint64 lgl_oid; */
6260 /* IDL:         uint64 lgl_oseq; */
6261 /* IDL:         uint32 lgl_ogen; */
6262 /* IDL: } */
6263
6264 static int
6265 lustre_dissect_element_llog_logid_lgl_oid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6266 {
6267   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_lgl_oid);
6268
6269   return offset;
6270 }
6271
6272 static int
6273 lustre_dissect_element_llog_logid_lgl_oseq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6274 {
6275   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_lgl_oseq);
6276
6277   return offset;
6278 }
6279
6280 static int
6281 lustre_dissect_element_llog_logid_lgl_ogen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6282 {
6283   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_lgl_ogen);
6284
6285   return offset;
6286 }
6287
6288 int
6289 lustre_dissect_struct_llog_logid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6290 {
6291   proto_item *item = NULL;
6292   proto_tree *tree = NULL;
6293   int old_offset;
6294
6295
6296
6297   old_offset=offset;
6298
6299   if (parent_tree) {
6300     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6301     tree = proto_item_add_subtree(item, ett_lustre_llog_logid);
6302   }
6303
6304   offset=lustre_dissect_element_llog_logid_lgl_oid(tvb, offset, pinfo, tree);
6305
6306   offset=lustre_dissect_element_llog_logid_lgl_oseq(tvb, offset, pinfo, tree);
6307
6308   offset=lustre_dissect_element_llog_logid_lgl_ogen(tvb, offset, pinfo, tree);
6309
6310
6311   proto_item_set_len(item, offset-old_offset);
6312
6313   return offset;
6314 }
6315
6316 /* I don't know when this structure is used on network */
6317 /* IDL: struct llog_catid { */
6318 /* IDL:         struct llog_logid { */
6319 /* IDL: } lci_logid; */
6320 /* IDL:         uint32 lci_padding1; */
6321 /* IDL:         uint32 lci_padding2; */
6322 /* IDL:         uint32 lci_padding3; */
6323 /* IDL: } */
6324
6325 static int
6326 lustre_dissect_element_llog_catid_lci_logid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6327 {
6328   //offset=lustre_dissect_struct_HASH(0x85cc76c)(tvb,offset,pinfo,tree,hf_lustre_llog_catid_lci_logid);
6329
6330   /*g_print("llog_catid_lci_logid bug\n");*/
6331   return offset;
6332 }
6333
6334 static int
6335 lustre_dissect_element_llog_catid_lci_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6336 {
6337   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_catid_lci_padding1);
6338
6339   return offset;
6340 }
6341
6342 static int
6343 lustre_dissect_element_llog_catid_lci_padding2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6344 {
6345   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_catid_lci_padding2);
6346
6347   return offset;
6348 }
6349
6350 static int
6351 lustre_dissect_element_llog_catid_lci_padding3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6352 {
6353   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_catid_lci_padding3);
6354
6355   return offset;
6356 }
6357
6358 int
6359 lustre_dissect_struct_llog_catid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6360 {
6361   proto_item *item = NULL;
6362   proto_tree *tree = NULL;
6363   int old_offset;
6364
6365
6366
6367   old_offset=offset;
6368
6369   if (parent_tree) {
6370     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6371     tree = proto_item_add_subtree(item, ett_lustre_llog_catid);
6372   }
6373
6374   offset=lustre_dissect_element_llog_catid_lci_logid(tvb, offset, pinfo, tree);
6375
6376   offset=lustre_dissect_element_llog_catid_lci_padding1(tvb, offset, pinfo, tree);
6377
6378   offset=lustre_dissect_element_llog_catid_lci_padding2(tvb, offset, pinfo, tree);
6379
6380   offset=lustre_dissect_element_llog_catid_lci_padding3(tvb, offset, pinfo, tree);
6381
6382
6383   proto_item_set_len(item, offset-old_offset);
6384
6385   return offset;
6386 }
6387
6388 /* IDL: struct llog_rec_hdr { */
6389 /* IDL:         uint32 lrh_len; */
6390 /* IDL:         uint32 lrh_index; */
6391 /* IDL:         uint32 lrh_type; */
6392 /* IDL:         uint32 padding; */
6393 /* IDL: } */
6394
6395 static int
6396 lustre_dissect_element_llog_rec_hdr_lrh_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6397 {
6398   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_hdr_lrh_len);
6399
6400   return offset;
6401 }
6402
6403 static int
6404 lustre_dissect_element_llog_rec_hdr_lrh_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6405 {
6406   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_hdr_lrh_index);
6407
6408   return offset;
6409 }
6410
6411 static int
6412 lustre_dissect_element_llog_rec_hdr_lrh_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6413 {
6414   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_hdr_lrh_type);
6415
6416   return offset;
6417 }
6418
6419 static int
6420 lustre_dissect_element_llog_rec_hdr_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6421 {
6422   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_hdr_padding);
6423
6424   return offset;
6425 }
6426
6427 int
6428 lustre_dissect_struct_llog_rec_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6429 {
6430   proto_item *item = NULL;
6431   proto_tree *tree = NULL;
6432   int old_offset;
6433
6434
6435
6436   old_offset=offset;
6437
6438   if (parent_tree) {
6439     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6440     tree = proto_item_add_subtree(item, ett_lustre_llog_rec_hdr);
6441   }
6442
6443   offset=lustre_dissect_element_llog_rec_hdr_lrh_len(tvb, offset, pinfo, tree);
6444
6445   offset=lustre_dissect_element_llog_rec_hdr_lrh_index(tvb, offset, pinfo, tree);
6446
6447   offset=lustre_dissect_element_llog_rec_hdr_lrh_type(tvb, offset, pinfo, tree);
6448
6449   offset=lustre_dissect_element_llog_rec_hdr_padding(tvb, offset, pinfo, tree);
6450
6451
6452   proto_item_set_len(item, offset-old_offset);
6453
6454   return offset;
6455 }
6456
6457 /* IDL: struct llog_rec_tail { */
6458 /* IDL:         uint32 lrt_len; */
6459 /* IDL:         uint32 lrt_index; */
6460 /* IDL: } */
6461
6462 static int
6463 lustre_dissect_element_llog_rec_tail_lrt_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6464 {
6465   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_tail_lrt_len);
6466
6467   return offset;
6468 }
6469
6470 static int
6471 lustre_dissect_element_llog_rec_tail_lrt_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6472 {
6473   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_rec_tail_lrt_index);
6474
6475   return offset;
6476 }
6477
6478 int
6479 lustre_dissect_struct_llog_rec_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6480 {
6481   proto_item *item = NULL;
6482   proto_tree *tree = NULL;
6483   int old_offset;
6484
6485
6486
6487   old_offset=offset;
6488
6489   if (parent_tree) {
6490     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6491     tree = proto_item_add_subtree(item, ett_lustre_llog_rec_tail);
6492   }
6493
6494   offset=lustre_dissect_element_llog_rec_tail_lrt_len(tvb, offset, pinfo, tree);
6495
6496   offset=lustre_dissect_element_llog_rec_tail_lrt_index(tvb, offset, pinfo, tree);
6497
6498
6499   proto_item_set_len(item, offset-old_offset);
6500
6501   return offset;
6502 }
6503
6504 /* IDL: struct llog_logid_rec { */
6505 /* IDL:         struct llog_rec_hdr { */
6506 /* IDL: } lid_hdr; */
6507 /* IDL:         struct llog_logid { */
6508 /* IDL: } lid_id; */
6509 /* IDL:         uint32 padding1; */
6510 /* IDL:         uint32 padding2; */
6511 /* IDL:         uint32 padding3; */
6512 /* IDL:         uint32 padding4; */
6513 /* IDL:         uint32 padding5; */
6514 /* IDL:         struct llog_rec_tail { */
6515 /* IDL: } lid_tail; */
6516 /* IDL: } */
6517
6518 static int
6519 lustre_dissect_element_llog_logid_rec_lid_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6520 {
6521   offset=lustre_dissect_struct_llog_rec_hdr(tvb,offset,pinfo,tree,hf_lustre_llog_logid_rec_lid_hdr);
6522   return offset;
6523 }
6524
6525 static int
6526 lustre_dissect_element_llog_logid_rec_lid_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6527 {
6528   offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_llog_logid_rec_lid_id);
6529   return offset;
6530 }
6531
6532 static int
6533 lustre_dissect_element_llog_logid_rec_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6534 {
6535   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_rec_padding1);
6536
6537   return offset;
6538 }
6539
6540 static int
6541 lustre_dissect_element_llog_logid_rec_padding2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6542 {
6543   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_rec_padding2);
6544
6545   return offset;
6546 }
6547
6548 static int
6549 lustre_dissect_element_llog_logid_rec_padding3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6550 {
6551   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_rec_padding3);
6552
6553   return offset;
6554 }
6555
6556 static int
6557 lustre_dissect_element_llog_logid_rec_padding4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6558 {
6559   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_rec_padding4);
6560
6561   return offset;
6562 }
6563
6564 static int
6565 lustre_dissect_element_llog_logid_rec_padding5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6566 {
6567   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_logid_rec_padding5);
6568
6569   return offset;
6570 }
6571
6572 static int
6573 lustre_dissect_element_llog_logid_rec_lid_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6574 {
6575   offset=lustre_dissect_struct_llog_rec_tail(tvb,offset,pinfo,tree,hf_lustre_llog_logid_rec_lid_tail);
6576   return offset;
6577 }
6578
6579 int
6580 lustre_dissect_struct_llog_logid_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6581 {
6582   proto_item *item = NULL;
6583   proto_tree *tree = NULL;
6584   int old_offset;
6585
6586
6587
6588   old_offset=offset;
6589
6590   if (parent_tree) {
6591     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6592     tree = proto_item_add_subtree(item, ett_lustre_llog_logid_rec);
6593   }
6594
6595   offset=lustre_dissect_element_llog_logid_rec_lid_hdr(tvb, offset, pinfo, tree);
6596
6597   offset=lustre_dissect_element_llog_logid_rec_lid_id(tvb, offset, pinfo, tree);
6598
6599   offset=lustre_dissect_element_llog_logid_rec_padding1(tvb, offset, pinfo, tree);
6600
6601   offset=lustre_dissect_element_llog_logid_rec_padding2(tvb, offset, pinfo, tree);
6602
6603   offset=lustre_dissect_element_llog_logid_rec_padding3(tvb, offset, pinfo, tree);
6604
6605   offset=lustre_dissect_element_llog_logid_rec_padding4(tvb, offset, pinfo, tree);
6606
6607   offset=lustre_dissect_element_llog_logid_rec_padding5(tvb, offset, pinfo, tree);
6608
6609   offset=lustre_dissect_element_llog_logid_rec_lid_tail(tvb, offset, pinfo, tree);
6610
6611
6612   proto_item_set_len(item, offset-old_offset);
6613
6614   return offset;
6615 }
6616
6617
6618
6619
6620 /* IDL: struct llog_unlink_rec { */
6621 /* IDL:         struct llog_rec_hdr { */
6622 /* IDL: } lur_hdr; */
6623 /* IDL:         uint64 lur_oid; */
6624 /* IDL:         uint32 lur_ogen; */
6625 /* IDL:         uint32 padding; */
6626 /* IDL:         struct llog_rec_tail { */
6627 /* IDL: } lur_tail; */
6628 /* IDL: } */
6629
6630 static int
6631 lustre_dissect_element_llog_unlink_rec_lur_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6632 {
6633   //offset=lustre_dissect_struct_HASH(0x85d8730)(tvb,offset,pinfo,tree,hf_lustre_llog_unlink_rec_lur_hdr);
6634   return offset;
6635 }
6636
6637 static int
6638 lustre_dissect_element_llog_unlink_rec_lur_oid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6639 {
6640   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_unlink_rec_lur_oid);
6641
6642   return offset;
6643 }
6644
6645 static int
6646 lustre_dissect_element_llog_unlink_rec_lur_ogen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6647 {
6648   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_unlink_rec_lur_ogen);
6649
6650   return offset;
6651 }
6652
6653 static int
6654 lustre_dissect_element_llog_unlink_rec_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6655 {
6656   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_unlink_rec_padding);
6657
6658   return offset;
6659 }
6660
6661 static int
6662 lustre_dissect_element_llog_unlink_rec_lur_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6663 {
6664   //offset=lustre_dissect_struct_HASH(0x85d9664)(tvb,offset,pinfo,tree,hf_lustre_llog_unlink_rec_lur_tail);
6665   return offset;
6666 }
6667
6668 int
6669 lustre_dissect_struct_llog_unlink_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6670 {
6671   proto_item *item = NULL;
6672   proto_tree *tree = NULL;
6673   int old_offset;
6674
6675
6676
6677   old_offset=offset;
6678
6679   if (parent_tree) {
6680     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6681     tree = proto_item_add_subtree(item, ett_lustre_llog_unlink_rec);
6682   }
6683
6684   offset=lustre_dissect_element_llog_unlink_rec_lur_hdr(tvb, offset, pinfo, tree);
6685
6686   offset=lustre_dissect_element_llog_unlink_rec_lur_oid(tvb, offset, pinfo, tree);
6687
6688   offset=lustre_dissect_element_llog_unlink_rec_lur_ogen(tvb, offset, pinfo, tree);
6689
6690   offset=lustre_dissect_element_llog_unlink_rec_padding(tvb, offset, pinfo, tree);
6691
6692   offset=lustre_dissect_element_llog_unlink_rec_lur_tail(tvb, offset, pinfo, tree);
6693
6694
6695   proto_item_set_len(item, offset-old_offset);
6696
6697   return offset;
6698 }
6699
6700
6701
6702 /* IDL: struct llog_setattr_rec { */
6703 /* IDL:         struct llog_rec_hdr { */
6704 /* IDL: } lsr_hdr; */
6705 /* IDL:         uint64 lsr_oid; */
6706 /* IDL:         uint32 lsr_ogen; */
6707 /* IDL:         uint32 lsr_uid; */
6708 /* IDL:         uint32 lsr_gid; */
6709 /* IDL:         uint32 padding; */
6710 /* IDL:         struct llog_rec_tail { */
6711 /* IDL: } lsr_tail; */
6712 /* IDL: } */
6713
6714 static int
6715 lustre_dissect_element_llog_setattr_rec_lsr_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6716 {
6717   //offset=lustre_dissect_struct_HASH(0x85da2f0)(tvb,offset,pinfo,tree,hf_lustre_llog_setattr_rec_lsr_hdr);
6718   return offset;
6719 }
6720
6721 static int
6722 lustre_dissect_element_llog_setattr_rec_lsr_oid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6723 {
6724   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_setattr_rec_lsr_oid);
6725
6726   return offset;
6727 }
6728
6729 static int
6730 lustre_dissect_element_llog_setattr_rec_lsr_ogen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6731 {
6732   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_setattr_rec_lsr_ogen);
6733
6734   return offset;
6735 }
6736
6737 static int
6738 lustre_dissect_element_llog_setattr_rec_lsr_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6739 {
6740   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_setattr_rec_lsr_uid);
6741
6742   return offset;
6743 }
6744
6745 static int
6746 lustre_dissect_element_llog_setattr_rec_lsr_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6747 {
6748   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_setattr_rec_lsr_gid);
6749
6750   return offset;
6751 }
6752
6753 static int
6754 lustre_dissect_element_llog_setattr_rec_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6755 {
6756   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_setattr_rec_padding);
6757
6758   return offset;
6759 }
6760
6761 static int
6762 lustre_dissect_element_llog_setattr_rec_lsr_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6763 {
6764   //offset=lustre_dissect_struct_HASH(0x85db3d4)(tvb,offset,pinfo,tree,hf_lustre_llog_setattr_rec_lsr_tail);
6765   return offset;
6766 }
6767
6768 int
6769 lustre_dissect_struct_llog_setattr_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6770 {
6771   proto_item *item = NULL;
6772   proto_tree *tree = NULL;
6773   int old_offset;
6774
6775
6776
6777   old_offset=offset;
6778
6779   if (parent_tree) {
6780     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6781     tree = proto_item_add_subtree(item, ett_lustre_llog_setattr_rec);
6782   }
6783
6784   offset=lustre_dissect_element_llog_setattr_rec_lsr_hdr(tvb, offset, pinfo, tree);
6785
6786   offset=lustre_dissect_element_llog_setattr_rec_lsr_oid(tvb, offset, pinfo, tree);
6787
6788   offset=lustre_dissect_element_llog_setattr_rec_lsr_ogen(tvb, offset, pinfo, tree);
6789
6790   offset=lustre_dissect_element_llog_setattr_rec_lsr_uid(tvb, offset, pinfo, tree);
6791
6792   offset=lustre_dissect_element_llog_setattr_rec_lsr_gid(tvb, offset, pinfo, tree);
6793
6794   offset=lustre_dissect_element_llog_setattr_rec_padding(tvb, offset, pinfo, tree);
6795
6796   offset=lustre_dissect_element_llog_setattr_rec_lsr_tail(tvb, offset, pinfo, tree);
6797
6798
6799   proto_item_set_len(item, offset-old_offset);
6800
6801   return offset;
6802 }
6803
6804
6805
6806
6807 /* IDL: struct llog_size_change_rec { */
6808 /* IDL:         struct llog_rec_hdr { */
6809 /* IDL: } lsc_hdr; */
6810 /* IDL:         struct ll_fid { */
6811 /* IDL: } lsc_fid; */
6812 /* IDL:         uint32 lsc_io_epoch; */
6813 /* IDL:         uint32 padding; */
6814 /* IDL:         struct llog_rec_tail { */
6815 /* IDL: } lsc_tail; */
6816 /* IDL: } */
6817
6818 static int
6819 lustre_dissect_element_llog_size_change_rec_lsc_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6820 {
6821   //offset=lustre_dissect_struct_HASH(0x85dc458)(tvb,offset,pinfo,tree,hf_lustre_llog_size_change_rec_lsc_hdr);
6822   return offset;
6823 }
6824
6825 static int
6826 lustre_dissect_element_llog_size_change_rec_lsc_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6827 {
6828   //offset=lustre_dissect_struct_HASH(0x85dc5a8)(tvb,offset,pinfo,tree,hf_lustre_llog_size_change_rec_lsc_fid);
6829   return offset;
6830 }
6831
6832 static int
6833 lustre_dissect_element_llog_size_change_rec_lsc_io_epoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6834 {
6835   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_size_change_rec_lsc_io_epoch);
6836
6837   return offset;
6838 }
6839
6840 static int
6841 lustre_dissect_element_llog_size_change_rec_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6842 {
6843   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_size_change_rec_padding);
6844
6845   return offset;
6846 }
6847
6848 static int
6849 lustre_dissect_element_llog_size_change_rec_lsc_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6850 {
6851   //offset=lustre_dissect_struct_HASH(0x85dd384)(tvb,offset,pinfo,tree,hf_lustre_llog_size_change_rec_lsc_tail);
6852   // TODO: to be corrected !
6853   return offset;
6854 }
6855
6856 int
6857 lustre_dissect_struct_llog_size_change_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6858 {
6859   proto_item *item = NULL;
6860   proto_tree *tree = NULL;
6861   int old_offset;
6862
6863
6864
6865   old_offset=offset;
6866
6867   if (parent_tree) {
6868     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6869     tree = proto_item_add_subtree(item, ett_lustre_llog_size_change_rec);
6870   }
6871
6872   offset=lustre_dissect_element_llog_size_change_rec_lsc_hdr(tvb, offset, pinfo, tree);
6873
6874   offset=lustre_dissect_element_llog_size_change_rec_lsc_fid(tvb, offset, pinfo, tree);
6875
6876   offset=lustre_dissect_element_llog_size_change_rec_lsc_io_epoch(tvb, offset, pinfo, tree);
6877
6878   offset=lustre_dissect_element_llog_size_change_rec_padding(tvb, offset, pinfo, tree);
6879
6880   offset=lustre_dissect_element_llog_size_change_rec_lsc_tail(tvb, offset, pinfo, tree);
6881
6882
6883   proto_item_set_len(item, offset-old_offset);
6884
6885   return offset;
6886 }
6887
6888
6889
6890
6891 /* IDL: struct llog_gen { */
6892 /* IDL:         uint64 mnt_cnt; */
6893 /* IDL:         uint64 conn_cnt; */
6894 /* IDL: } */
6895
6896 static int
6897 lustre_dissect_element_llog_gen_mnt_cnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6898 {
6899   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_gen_mnt_cnt);
6900
6901   return offset;
6902 }
6903
6904 static int
6905 lustre_dissect_element_llog_gen_conn_cnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6906 {
6907   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llog_gen_conn_cnt);
6908
6909   return offset;
6910 }
6911
6912 int
6913 lustre_dissect_struct_llog_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6914 {
6915   proto_item *item = NULL;
6916   proto_tree *tree = NULL;
6917   int old_offset;
6918
6919
6920
6921   old_offset=offset;
6922
6923   if (parent_tree) {
6924     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6925     tree = proto_item_add_subtree(item, ett_lustre_llog_gen);
6926   }
6927
6928   offset=lustre_dissect_element_llog_gen_mnt_cnt(tvb, offset, pinfo, tree);
6929
6930   offset=lustre_dissect_element_llog_gen_conn_cnt(tvb, offset, pinfo, tree);
6931
6932
6933   proto_item_set_len(item, offset-old_offset);
6934
6935   return offset;
6936 }
6937
6938 /* IDL: struct llog_gen_rec { */
6939 /* IDL:         struct llog_rec_hdr { */
6940 /* IDL: } lgr_hdr; */
6941 /* IDL:         struct llog_gen { */
6942 /* IDL: } lgr_gen; */
6943 /* IDL:         struct llog_rec_tail { */
6944 /* IDL: } lgr_tail; */
6945 /* IDL: } */
6946
6947 static int
6948 lustre_dissect_element_llog_gen_rec_lgr_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6949 {
6950   //offset=lustre_dissect_struct_HASH(0x85de2e4)(tvb,offset,pinfo,tree,hf_lustre_llog_gen_rec_lgr_hdr);
6951   // TODO: to be corrected !
6952   return offset;
6953 }
6954
6955 static int
6956 lustre_dissect_element_llog_gen_rec_lgr_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6957 {
6958   //offset=lustre_dissect_struct_HASH(0x85de434)(tvb,offset,pinfo,tree,hf_lustre_llog_gen_rec_lgr_gen);
6959   // TODO: to be corrected !
6960   return offset;
6961 }
6962
6963 static int
6964 lustre_dissect_element_llog_gen_rec_lgr_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
6965 {
6966   //offset=lustre_dissect_struct_HASH(0x85df3f8)(tvb,offset,pinfo,tree,hf_lustre_llog_gen_rec_lgr_tail);
6967   // TODO: to be corrected !
6968   return offset;
6969 }
6970
6971 int
6972 lustre_dissect_struct_llog_gen_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
6973 {
6974   proto_item *item = NULL;
6975   proto_tree *tree = NULL;
6976   int old_offset;
6977
6978
6979
6980   old_offset=offset;
6981
6982   if (parent_tree) {
6983     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
6984     tree = proto_item_add_subtree(item, ett_lustre_llog_gen_rec);
6985   }
6986
6987   offset=lustre_dissect_element_llog_gen_rec_lgr_hdr(tvb, offset, pinfo, tree);
6988
6989   offset=lustre_dissect_element_llog_gen_rec_lgr_gen(tvb, offset, pinfo, tree);
6990
6991   offset=lustre_dissect_element_llog_gen_rec_lgr_tail(tvb, offset, pinfo, tree);
6992
6993
6994   proto_item_set_len(item, offset-old_offset);
6995
6996   return offset;
6997 }
6998
6999
7000
7001
7002 /* IDL: struct llog_log_hdr { */
7003 /* IDL:         struct llog_rec_hdr { */
7004 /* IDL: } llh_hdr; */
7005 /* IDL:         uint64 llh_timestamp; */
7006 /* IDL:         uint32 llh_count; */
7007 /* IDL:         uint32 llh_bitmap_offset; */
7008 /* IDL:         uint32 llh_size; */
7009 /* IDL:         uint32 llh_flags; */
7010 /* IDL:         uint32 llh_cat_idx; */
7011 /* IDL:         struct obd_uuid { */
7012 /* IDL: } llh_tgtuuid; */
7013 /* IDL:         uint32 llh_reserved[1]; */
7014 /* IDL:         uint32 llh_bitmap[2024]; */
7015 /* IDL:         struct llog_rec_tail { */
7016 /* IDL: } llh_tail; */
7017 /* IDL: } */
7018
7019 static int
7020 lustre_dissect_element_llog_log_hdr_llh_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7021 {
7022   offset=lustre_dissect_struct_llog_rec_hdr(tvb,offset,pinfo,tree,hf_lustre_llog_log_hdr_llh_hdr);
7023   return offset;
7024 }
7025
7026 static int
7027 lustre_dissect_element_llog_log_hdr_llh_timestamp(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7028 {
7029   nstime_t ns;
7030   ns.secs = tvb_get_letohl(tvb,offset);
7031   ns.nsecs=0;
7032   proto_tree_add_time(tree, hf_lustre_llog_log_hdr_llh_timestamp, tvb, offset, 8, &ns );
7033   offset+=8;
7034   return offset;
7035 }
7036
7037 static int
7038 lustre_dissect_element_llog_log_hdr_llh_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7039 {
7040   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_count);
7041
7042   return offset;
7043 }
7044
7045 static int
7046 lustre_dissect_element_llog_log_hdr_llh_bitmap_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7047 {
7048   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_bitmap_offset);
7049
7050   return offset;
7051 }
7052
7053 static int
7054 lustre_dissect_element_llog_log_hdr_llh_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7055 {
7056   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_size);
7057
7058   return offset;
7059 }
7060
7061
7062
7063 static int
7064 lustre_dissect_element_llog_log_llh_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7065 {
7066   proto_item *item = NULL;
7067   proto_tree *tree = NULL;
7068
7069   if (parent_tree) {
7070     item = proto_tree_add_item(parent_tree,hf_index, tvb, offset, 4, TRUE);
7071     tree = proto_item_add_subtree(item, ett_lustre_llog_log_llh_flags);
7072   }
7073   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_llog_hdr_llh_flag_zap_when_empty);
7074   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_llog_hdr_llh_flag_is_cat);
7075   dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_llog_hdr_llh_flag_is_play);
7076
7077   offset+=4;
7078   return offset;
7079 }
7080
7081 static int
7082 lustre_dissect_element_llog_log_hdr_llh_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7083 {
7084   //    offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_flags);
7085   offset=lustre_dissect_element_llog_log_llh_flags(tvb, offset, pinfo, tree, hf_lustre_llog_log_hdr_llh_flags);
7086   return offset;
7087 }
7088
7089 static int
7090 lustre_dissect_element_llog_log_hdr_llh_cat_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7091 {
7092   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_cat_idx);
7093
7094   return offset;
7095 }
7096
7097 static int
7098 lustre_dissect_element_llog_log_hdr_llh_tgtuuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7099 {
7100   offset=lustre_dissect_struct_obd_uuid(tvb,offset,pinfo,tree,hf_lustre_llog_log_hdr_llh_tgtuuid);
7101   return offset;
7102 }
7103
7104 static int
7105 lustre_dissect_element_llog_log_hdr_llh_reserved_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7106 {
7107   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_reserved);
7108
7109   return offset;
7110 }
7111
7112 static int
7113 lustre_dissect_element_llog_log_hdr_llh_reserved(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7114 {
7115   int i;
7116   for (i = 0; i < 1; i++)
7117     offset=lustre_dissect_element_llog_log_hdr_llh_reserved_(tvb, offset, pinfo, tree);
7118
7119   return offset;
7120 }
7121
7122 static int
7123 lustre_dissect_element_llog_log_hdr_llh_bitmap_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7124 {
7125   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_log_hdr_llh_bitmap);
7126
7127   return offset;
7128 }
7129
7130
7131 static int
7132 lustre_dissect_element_llog_log_hdr_llh_bitmap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7133 {
7134   int i;
7135   for (i = 0; i < 2024; i++)
7136     offset=lustre_dissect_element_llog_log_hdr_llh_bitmap_(tvb, offset, pinfo, tree);
7137
7138   return offset;
7139 }
7140
7141
7142
7143 static int
7144 lustre_dissect_element_llog_log_hdr_llh_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7145 {
7146   offset=lustre_dissect_struct_llog_rec_tail(tvb,offset,pinfo,tree,hf_lustre_llog_log_hdr_llh_tail);
7147   return offset;
7148 }
7149
7150 int
7151 lustre_dissect_struct_llog_log_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7152 {
7153   proto_item *item = NULL;
7154   proto_tree *tree = NULL;
7155   int old_offset;
7156
7157
7158
7159   old_offset=offset;
7160
7161   if (parent_tree) {
7162     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7163     tree = proto_item_add_subtree(item, ett_lustre_llog_log_hdr);
7164   }
7165
7166   offset=lustre_dissect_element_llog_log_hdr_llh_hdr(tvb, offset, pinfo, tree);
7167
7168   offset=lustre_dissect_element_llog_log_hdr_llh_timestamp(tvb, offset, pinfo, tree);
7169
7170   offset=lustre_dissect_element_llog_log_hdr_llh_count(tvb, offset, pinfo, tree);
7171
7172   offset=lustre_dissect_element_llog_log_hdr_llh_bitmap_offset(tvb, offset, pinfo, tree);
7173
7174   offset=lustre_dissect_element_llog_log_hdr_llh_size(tvb, offset, pinfo, tree);
7175
7176   offset=lustre_dissect_element_llog_log_hdr_llh_flags(tvb, offset, pinfo, tree);
7177
7178   offset=lustre_dissect_element_llog_log_hdr_llh_cat_idx(tvb, offset, pinfo, tree);
7179
7180   offset=lustre_dissect_element_llog_log_hdr_llh_tgtuuid(tvb, offset, pinfo, tree);
7181
7182   offset=lustre_dissect_element_llog_log_hdr_llh_reserved(tvb, offset, pinfo, tree);
7183
7184   offset=lustre_dissect_element_llog_log_hdr_llh_bitmap(tvb, offset, pinfo, tree);
7185
7186   offset=lustre_dissect_element_llog_log_hdr_llh_tail(tvb, offset, pinfo, tree);
7187
7188
7189   proto_item_set_len(item, offset-old_offset);
7190
7191   return offset;
7192 }
7193
7194
7195
7196
7197 /* IDL: struct llog_cookie { */
7198 /* IDL:         struct llog_logid { */
7199 /* IDL: } lgc_lgl; */
7200 /* IDL:         uint32 lgc_subsys; */
7201 /* IDL:         uint32 lgc_index; */
7202 /* IDL:         uint32 lgc_padding; */
7203 /* IDL: } */
7204
7205 static int
7206 lustre_dissect_element_llog_cookie_lgc_lgl(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7207 {
7208   offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_llog_cookie_lgc_lgl);
7209   return offset;
7210 }
7211
7212 static int
7213 lustre_dissect_element_llog_cookie_lgc_subsys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7214 {
7215   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_cookie_lgc_subsys);
7216
7217   return offset;
7218 }
7219
7220 static int
7221 lustre_dissect_element_llog_cookie_lgc_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7222 {
7223   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_cookie_lgc_index);
7224
7225   return offset;
7226 }
7227
7228 static int
7229 lustre_dissect_element_llog_cookie_lgc_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7230 {
7231   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llog_cookie_lgc_padding);
7232
7233   return offset;
7234 }
7235
7236 int
7237 lustre_dissect_struct_llog_cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7238 {
7239   proto_item *item = NULL;
7240   proto_tree *tree = NULL;
7241   int old_offset;
7242
7243
7244
7245   old_offset=offset;
7246
7247   if (parent_tree) {
7248     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7249     tree = proto_item_add_subtree(item, ett_lustre_llog_cookie);
7250   }
7251
7252   offset=lustre_dissect_element_llog_cookie_lgc_lgl(tvb, offset, pinfo, tree);
7253
7254   offset=lustre_dissect_element_llog_cookie_lgc_subsys(tvb, offset, pinfo, tree);
7255
7256   offset=lustre_dissect_element_llog_cookie_lgc_index(tvb, offset, pinfo, tree);
7257
7258   offset=lustre_dissect_element_llog_cookie_lgc_padding(tvb, offset, pinfo, tree);
7259
7260
7261   proto_item_set_len(item, offset-old_offset);
7262
7263   return offset;
7264 }
7265
7266
7267
7268 /* IDL: struct llogd_body { */
7269 /* IDL:         struct llog_logid { */
7270 /* IDL: } lgd_logid; */
7271 /* IDL:         uint32 lgd_ctxt_idx; */
7272 /* IDL:         uint32 lgd_llh_flags; */
7273 /* IDL:         uint32 lgd_index; */
7274 /* IDL:         uint32 lgd_saved_index; */
7275 /* IDL:         uint32 lgd_len; */
7276 /* IDL:         uint64 lgd_cur_offset; */
7277 /* IDL: } */
7278
7279 static int
7280 lustre_dissect_element_llogd_body_lgd_logid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7281 {
7282   offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_llogd_body_lgd_logid);
7283   return offset;
7284 }
7285
7286 static int
7287 lustre_dissect_element_llogd_body_lgd_ctxt_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7288 {
7289   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_ctxt_idx);
7290
7291   return offset;
7292 }
7293
7294 static int
7295 lustre_dissect_element_llogd_body_lgd_llh_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7296 {
7297   //offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_llh_flags);
7298
7299   offset=lustre_dissect_element_llog_log_llh_flags(tvb, offset, pinfo, tree, hf_lustre_llogd_body_lgd_llh_flags);
7300
7301   return offset;
7302 }
7303
7304 static int
7305 lustre_dissect_element_llogd_body_lgd_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7306 {
7307   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_index);
7308
7309   return offset;
7310 }
7311
7312 static int
7313 lustre_dissect_element_llogd_body_lgd_saved_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7314 {
7315   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_saved_index);
7316
7317   return offset;
7318 }
7319
7320 static int
7321 lustre_dissect_element_llogd_body_lgd_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7322 {
7323   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_len);
7324
7325   return offset;
7326 }
7327
7328 static int
7329 lustre_dissect_element_llogd_body_lgd_cur_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7330 {
7331   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_llogd_body_lgd_cur_offset);
7332
7333   return offset;
7334 }
7335
7336 int
7337 lustre_dissect_struct_llogd_body(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7338 {
7339   proto_item *item = NULL;
7340   proto_tree *tree = NULL;
7341   int old_offset;
7342
7343
7344
7345   old_offset=offset;
7346
7347   if (parent_tree) {
7348     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7349     tree = proto_item_add_subtree(item, ett_lustre_llogd_body);
7350   }
7351
7352   offset=lustre_dissect_element_llogd_body_lgd_logid(tvb, offset, pinfo, tree);
7353
7354   offset=lustre_dissect_element_llogd_body_lgd_ctxt_idx(tvb, offset, pinfo, tree);
7355
7356   offset=lustre_dissect_element_llogd_body_lgd_llh_flags(tvb, offset, pinfo, tree);
7357
7358   offset=lustre_dissect_element_llogd_body_lgd_index(tvb, offset, pinfo, tree);
7359
7360   offset=lustre_dissect_element_llogd_body_lgd_saved_index(tvb, offset, pinfo, tree);
7361
7362   offset=lustre_dissect_element_llogd_body_lgd_len(tvb, offset, pinfo, tree);
7363
7364   offset=lustre_dissect_element_llogd_body_lgd_cur_offset(tvb, offset, pinfo, tree);
7365
7366
7367   proto_item_set_len(item, offset-old_offset);
7368
7369   return offset;
7370 }
7371
7372
7373 /* TODO : find when this Structure appear on the wire */
7374 /* IDL: struct llogd_conn_body { */
7375 /* IDL:         struct llog_gen { */
7376 /* IDL: } lgdc_gen; */
7377 /* IDL:         struct llog_logid { */
7378 /* IDL: } lgdc_logid; */
7379 /* IDL:         uint32 lgdc_ctxt_idx; */
7380 /* IDL: } */
7381
7382 static int
7383 lustre_dissect_element_llogd_conn_body_lgdc_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7384 {
7385   //offset=lustre_dissect_struct_HASH(0x85e6038)(tvb,offset,pinfo,tree,hf_lustre_llogd_conn_body_lgdc_gen);
7386   return offset;
7387 }
7388
7389 static int
7390 lustre_dissect_element_llogd_conn_body_lgdc_logid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7391 {
7392   //offset=lustre_dissect_struct_HASH(0x85e6188)(tvb,offset,pinfo,tree,hf_lustre_llogd_conn_body_lgdc_logid);
7393   return offset;
7394 }
7395
7396 static int
7397 lustre_dissect_element_llogd_conn_body_lgdc_ctxt_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7398 {
7399   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_llogd_conn_body_lgdc_ctxt_idx);
7400
7401   return offset;
7402 }
7403
7404 int
7405 lustre_dissect_struct_llogd_conn_body(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7406 {
7407   proto_item *item = NULL;
7408   proto_tree *tree = NULL;
7409   int old_offset;
7410
7411
7412
7413   old_offset=offset;
7414
7415   if (parent_tree) {
7416     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7417     tree = proto_item_add_subtree(item, ett_lustre_llogd_conn_body);
7418   }
7419
7420   offset=lustre_dissect_element_llogd_conn_body_lgdc_gen(tvb, offset, pinfo, tree);
7421
7422   offset=lustre_dissect_element_llogd_conn_body_lgdc_logid(tvb, offset, pinfo, tree);
7423
7424   offset=lustre_dissect_element_llogd_conn_body_lgdc_ctxt_idx(tvb, offset, pinfo, tree);
7425
7426
7427   proto_item_set_len(item, offset-old_offset);
7428
7429   return offset;
7430 }
7431
7432 /* IDL: struct obdo { */
7433 /* IDL:         uint64 o_valid; */
7434 /* IDL:         uint64 o_id; */
7435 /* IDL:         uint64 o_seq; */
7436 /* IDL:         uint64 o_parent_seq; */
7437 /* IDL:         uint64 o_size; */
7438 /* IDL:         uint64 o_mtime; */
7439 /* IDL:         uint64 o_atime; */
7440 /* IDL:         uint64 o_ctime; */
7441 /* IDL:         uint64 o_blocks; */
7442 /* IDL:         uint64 o_grant; */
7443 /* IDL:         uint32 o_blksize; */
7444 /* IDL:         uint32 o_mode; */
7445 /* IDL:         uint32 o_uid; */
7446 /* IDL:         uint32 o_gid; */
7447 /* IDL:         uint32 o_flags; */
7448 /* IDL:         uint32 o_nlink; */
7449 /* IDL:         uint32 o_parent_oid; */
7450 /* IDL:         uint32 o_misc; */
7451 /* IDL:         uint64 o_ioepoch; */
7452 /* IDL:         uint32 o_stripe_idx; */
7453 /* IDL:         uint32 o_parent_ver; */
7454 /* IDL:         struct lustre_handle { */
7455 /* IDL: } o_handle; */
7456 /* IDL:         struct llog_cookie { */
7457 /* IDL: } o_lcookie; */
7458 /* IDL:         uint32 o_uid_h; */
7459 /* IDL:         uint32 o_gid_h; */
7460 /* IDL:         uint64 o_padding_3; */
7461 /* IDL:         uint64 o_padding_4; */
7462 /* IDL:         uint64 o_padding_5; */
7463 /* IDL:         uint64 o_padding_6; */
7464 /* IDL: } */
7465
7466 static int
7467 lustre_dissect_element_obdo_o_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7468 {
7469   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_valid);
7470
7471   return offset;
7472 }
7473
7474 static int
7475 lustre_dissect_element_obdo_o_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7476 {
7477   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_id);
7478
7479   return offset;
7480 }
7481
7482 static int
7483 lustre_dissect_element_obdo_o_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7484 {
7485   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_seq);
7486
7487   return offset;
7488 }
7489
7490 static int
7491 lustre_dissect_element_obdo_o_parent_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7492 {
7493   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_parent_seq);
7494
7495   return offset;
7496 }
7497
7498 static int
7499 lustre_dissect_element_obdo_o_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7500 {
7501   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_size);
7502
7503   return offset;
7504 }
7505
7506 static int
7507 lustre_dissect_element_obdo_o_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7508 {
7509   nstime_t ns;
7510   /* timestamp */
7511   ns.secs = tvb_get_letohl(tvb,offset);
7512   ns.nsecs=0;
7513   proto_tree_add_time(tree, hf_lustre_obdo_o_mtime, tvb, offset, 8, &ns );
7514   offset+=8;
7515   return offset;
7516 }
7517
7518 static int
7519 lustre_dissect_element_obdo_o_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7520 {
7521   nstime_t ns;
7522   /* timestamp */
7523   ns.secs = tvb_get_letohl(tvb,offset);
7524   ns.nsecs=0;
7525   proto_tree_add_time(tree, hf_lustre_obdo_o_atime, tvb, offset, 8, &ns );
7526   offset+=8;
7527   return offset;
7528
7529 }
7530
7531 static int
7532 lustre_dissect_element_obdo_o_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7533 {
7534   nstime_t ns;
7535   /* timestamp */
7536   ns.secs = tvb_get_letohl(tvb,offset);
7537   ns.nsecs=0;
7538   proto_tree_add_time(tree, hf_lustre_obdo_o_ctime, tvb, offset, 8, &ns );
7539   offset+=8;
7540   return offset;
7541 }
7542
7543 static int
7544 lustre_dissect_element_obdo_o_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7545 {
7546   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_blocks);
7547
7548   return offset;
7549 }
7550
7551 static int
7552 lustre_dissect_element_obdo_o_grant(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7553 {
7554   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_grant);
7555
7556   return offset;
7557 }
7558
7559 static int
7560 lustre_dissect_element_obdo_o_blksize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7561 {
7562   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_blksize);
7563
7564   return offset;
7565 }
7566
7567 static int
7568 lustre_dissect_element_obdo_o_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7569 {
7570   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_mode);
7571
7572   return offset;
7573 }
7574
7575 static int
7576 lustre_dissect_element_obdo_o_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7577 {
7578   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_uid);
7579
7580   return offset;
7581 }
7582
7583 static int
7584 lustre_dissect_element_obdo_o_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7585 {
7586   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_gid);
7587
7588   return offset;
7589 }
7590
7591 static int
7592 lustre_dissect_element_obdo_o_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7593 {
7594   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_flags);
7595   /* TODO rajouter Ã§a  , faire une fonction générique qui s'occupe de tous les flags d'un tableau. */
7596   /*   LOBDFlags = {*/
7597   /*0x00000001 : "OBD_FL_INLINEDATA",*/
7598   /*0x00000002 : "OBD_FL_OBDMDEXISTS",*/
7599   /*0x00000004 : "OBD_FL_DELORPHAN",*/
7600   /*0x00000008 : "OBD_FL_NORPC",*/
7601   /*0x00000010 : "OBD_FL_IDONLY",*/
7602   /*0x00000020 : "OBD_FL_RECREATE_OBJS",*/
7603   /*0x00000040 : "OBD_FL_DEBUG_CHECK",*/
7604   /*0x00000100 : "OBD_FL_NO_USRQUOTA",*/
7605   /*0x00000200 : "OBD_FL_NO_GRPQUOTA",*/
7606   /*0x00000400 : "OBD_FL_CREATE_CROW",*/
7607   /*0x00000800 : "OBD_FL_SRVLOCK",*/
7608   //}
7609   return offset;
7610 }
7611
7612 static int
7613 lustre_dissect_element_obdo_o_nlink(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7614 {
7615   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_nlink);
7616
7617   return offset;
7618 }
7619
7620 static int
7621 lustre_dissect_element_obdo_o_parent_oid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7622 {
7623   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_parent_oid);
7624
7625   return offset;
7626 }
7627
7628 static int
7629 lustre_dissect_element_obdo_o_misc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7630 {
7631   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_misc);
7632
7633   return offset;
7634 }
7635
7636 static int
7637 lustre_dissect_element_obdo_o_ioepoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7638 {
7639   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_ioepoch);
7640
7641   return offset;
7642 }
7643
7644 static int
7645 lustre_dissect_element_obdo_o_stripe_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7646 {
7647   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_stripe_idx);
7648
7649   return offset;
7650 }
7651
7652 static int
7653 lustre_dissect_element_obdo_o_parent_ver(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7654 {
7655   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_parent_ver);
7656
7657   return offset;
7658 }
7659
7660 static int
7661 lustre_dissect_element_obdo_o_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7662 {
7663   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_obdo_o_handle);
7664   return offset;
7665 }
7666
7667 static int
7668 lustre_dissect_element_obdo_o_lcookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7669 {
7670   offset=lustre_dissect_struct_llog_cookie(tvb,offset,pinfo,tree,hf_lustre_obdo_o_lcookie);
7671   return offset;
7672 }
7673
7674 static int
7675 lustre_dissect_element_obdo_o_uid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7676 {
7677   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_uid_h);
7678
7679   return offset;
7680 }
7681
7682 static int
7683 lustre_dissect_element_obdo_o_gid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7684 {
7685   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_gid_h);
7686
7687   return offset;
7688 }
7689
7690 static int
7691 lustre_dissect_element_obdo_o_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7692 {
7693   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_padding_3);
7694
7695   return offset;
7696 }
7697
7698 static int
7699 lustre_dissect_element_obdo_o_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7700 {
7701   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_padding_4);
7702
7703   return offset;
7704 }
7705
7706 static int
7707 lustre_dissect_element_obdo_o_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7708 {
7709   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_padding_5);
7710
7711   return offset;
7712 }
7713
7714 static int
7715 lustre_dissect_element_obdo_o_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7716 {
7717   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_obdo_o_padding_6);
7718
7719   return offset;
7720 }
7721
7722 int
7723 lustre_dissect_struct_obdo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7724 {
7725   proto_item *item = NULL;
7726   proto_tree *tree = NULL;
7727   int old_offset;
7728
7729
7730   old_offset=offset;
7731
7732   if (parent_tree) {
7733     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7734     tree = proto_item_add_subtree(item, ett_lustre_obdo);
7735   }
7736
7737   offset=lustre_dissect_element_obdo_o_valid(tvb, offset, pinfo, tree);
7738
7739   offset=lustre_dissect_element_obdo_o_id(tvb, offset, pinfo, tree);
7740
7741   offset=lustre_dissect_element_obdo_o_seq(tvb, offset, pinfo, tree);
7742
7743   offset=lustre_dissect_element_obdo_o_parent_seq(tvb, offset, pinfo, tree);
7744
7745   offset=lustre_dissect_element_obdo_o_size(tvb, offset, pinfo, tree);
7746
7747   offset=lustre_dissect_element_obdo_o_mtime(tvb, offset, pinfo, tree);
7748
7749   offset=lustre_dissect_element_obdo_o_atime(tvb, offset, pinfo, tree);
7750
7751   offset=lustre_dissect_element_obdo_o_ctime(tvb, offset, pinfo, tree);
7752
7753   offset=lustre_dissect_element_obdo_o_blocks(tvb, offset, pinfo, tree);
7754
7755   offset=lustre_dissect_element_obdo_o_grant(tvb, offset, pinfo, tree);
7756
7757   offset=lustre_dissect_element_obdo_o_blksize(tvb, offset, pinfo, tree);
7758
7759   offset=lustre_dissect_element_obdo_o_mode(tvb, offset, pinfo, tree);
7760
7761   offset=lustre_dissect_element_obdo_o_uid(tvb, offset, pinfo, tree);
7762
7763   offset=lustre_dissect_element_obdo_o_gid(tvb, offset, pinfo, tree);
7764
7765   offset=lustre_dissect_element_obdo_o_flags(tvb, offset, pinfo, tree);
7766
7767   offset=lustre_dissect_element_obdo_o_nlink(tvb, offset, pinfo, tree);
7768
7769   offset=lustre_dissect_element_obdo_o_parent_oid(tvb, offset, pinfo, tree);
7770
7771   offset=lustre_dissect_element_obdo_o_misc(tvb, offset, pinfo, tree);
7772
7773   offset=lustre_dissect_element_obdo_o_ioepoch(tvb, offset, pinfo, tree);
7774
7775   offset=lustre_dissect_element_obdo_o_stripe_idx(tvb, offset, pinfo, tree);
7776
7777   offset=lustre_dissect_element_obdo_o_parent_ver(tvb, offset, pinfo, tree);
7778
7779   offset=lustre_dissect_element_obdo_o_handle(tvb, offset, pinfo, tree);
7780
7781   offset=lustre_dissect_element_obdo_o_lcookie(tvb, offset, pinfo, tree);
7782
7783   offset=lustre_dissect_element_obdo_o_uid_h(tvb, offset, pinfo, tree);
7784
7785   offset=lustre_dissect_element_obdo_o_gid_h(tvb, offset, pinfo, tree);
7786
7787   offset=lustre_dissect_element_obdo_o_padding_3(tvb, offset, pinfo, tree);
7788
7789   offset=lustre_dissect_element_obdo_o_padding_4(tvb, offset, pinfo, tree);
7790
7791   offset=lustre_dissect_element_obdo_o_padding_5(tvb, offset, pinfo, tree);
7792
7793   offset=lustre_dissect_element_obdo_o_padding_6(tvb, offset, pinfo, tree);
7794
7795
7796   proto_item_set_len(item, offset-old_offset);
7797
7798   return offset;
7799 }
7800
7801
7802
7803 /* IDL: struct ost_body { */
7804 /* IDL:         struct obdo { */
7805 /* IDL: } oa; */
7806 /* IDL: } */
7807
7808 static int
7809 lustre_dissect_element_ost_body_oa(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7810 {
7811   offset=lustre_dissect_struct_obdo(tvb,offset,pinfo,tree,hf_lustre_ost_body_oa);
7812   return offset;
7813 }
7814
7815 int
7816 lustre_dissect_struct_ost_body(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7817 {
7818   proto_item *item = NULL;
7819   proto_tree *tree = NULL;
7820   int old_offset;
7821
7822   old_offset=offset;
7823
7824   if (parent_tree) {
7825     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7826     tree = proto_item_add_subtree(item, ett_lustre_ost_body);
7827   }
7828
7829   offset=lustre_dissect_element_ost_body_oa(tvb, offset, pinfo, tree);
7830
7831   proto_item_set_len(item, offset-old_offset);
7832
7833   return offset;
7834 }
7835
7836
7837 /* TODO : find when this Structure appear on the wire */
7838 /* IDL: struct qunit_data { */
7839 /* IDL:         uint32 qd_id; */
7840 /* IDL:         uint32 qd_flags; */
7841 /* IDL:         uint64 qd_count; */
7842 /* IDL:         uint64 qd_qunit; */
7843 /* IDL:         uint64 padding; */
7844 /* IDL: } */
7845
7846 static int
7847 lustre_dissect_element_qunit_data_qd_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7848 {
7849   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_qd_id);
7850
7851   return offset;
7852 }
7853
7854 static int
7855 lustre_dissect_element_qunit_data_qd_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7856 {
7857   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_qd_flags);
7858
7859   return offset;
7860 }
7861
7862 static int
7863 lustre_dissect_element_qunit_data_qd_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7864 {
7865   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_qd_count);
7866
7867   return offset;
7868 }
7869
7870 static int
7871 lustre_dissect_element_qunit_data_qd_qunit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7872 {
7873   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_qd_qunit);
7874
7875   return offset;
7876 }
7877
7878 static int
7879 lustre_dissect_element_qunit_data_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7880 {
7881   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_padding);
7882
7883   return offset;
7884 }
7885
7886 int
7887 lustre_dissect_struct_qunit_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7888 {
7889   proto_item *item = NULL;
7890   proto_tree *tree = NULL;
7891   int old_offset;
7892
7893
7894
7895   old_offset=offset;
7896
7897   if (parent_tree) {
7898     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7899     tree = proto_item_add_subtree(item, ett_lustre_qunit_data);
7900   }
7901
7902   offset=lustre_dissect_element_qunit_data_qd_id(tvb, offset, pinfo, tree);
7903
7904   offset=lustre_dissect_element_qunit_data_qd_flags(tvb, offset, pinfo, tree);
7905
7906   offset=lustre_dissect_element_qunit_data_qd_count(tvb, offset, pinfo, tree);
7907
7908   offset=lustre_dissect_element_qunit_data_qd_qunit(tvb, offset, pinfo, tree);
7909
7910   offset=lustre_dissect_element_qunit_data_padding(tvb, offset, pinfo, tree);
7911
7912
7913   proto_item_set_len(item, offset-old_offset);
7914
7915   return offset;
7916 }
7917
7918 /* TODO : find when this Structure appear on the wire */
7919 /* IDL: struct qunit_data_old2 { */
7920 /* IDL:         uint32 qd_id; */
7921 /* IDL:         uint32 qd_flags; */
7922 /* IDL:         uint64 qd_count; */
7923 /* IDL: } */
7924
7925 static int
7926 lustre_dissect_element_qunit_data_old2_qd_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7927 {
7928   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old2_qd_id);
7929
7930   return offset;
7931 }
7932
7933 static int
7934 lustre_dissect_element_qunit_data_old2_qd_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7935 {
7936   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old2_qd_flags);
7937
7938   return offset;
7939 }
7940
7941 static int
7942 lustre_dissect_element_qunit_data_old2_qd_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7943 {
7944   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old2_qd_count);
7945
7946   return offset;
7947 }
7948
7949 int
7950 lustre_dissect_struct_qunit_data_old2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
7951 {
7952   proto_item *item = NULL;
7953   proto_tree *tree = NULL;
7954   int old_offset;
7955
7956
7957
7958   old_offset=offset;
7959
7960   if (parent_tree) {
7961     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
7962     tree = proto_item_add_subtree(item, ett_lustre_qunit_data_old2);
7963   }
7964
7965   offset=lustre_dissect_element_qunit_data_old2_qd_id(tvb, offset, pinfo, tree);
7966
7967   offset=lustre_dissect_element_qunit_data_old2_qd_flags(tvb, offset, pinfo, tree);
7968
7969   offset=lustre_dissect_element_qunit_data_old2_qd_count(tvb, offset, pinfo, tree);
7970
7971
7972   proto_item_set_len(item, offset-old_offset);
7973
7974   return offset;
7975 }
7976
7977 /* TODO : find when this Structure appear on the wire */
7978 /* IDL: struct qunit_data_old { */
7979 /* IDL:         uint32 qd_id; */
7980 /* IDL:         uint32 qd_type; */
7981 /* IDL:         uint32 qd_count; */
7982 /* IDL:         uint32 qd_isblk; */
7983 /* IDL: } */
7984
7985 static int
7986 lustre_dissect_element_qunit_data_old_qd_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7987 {
7988   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old_qd_id);
7989
7990   return offset;
7991 }
7992
7993 static int
7994 lustre_dissect_element_qunit_data_old_qd_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
7995 {
7996   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old_qd_type);
7997
7998   return offset;
7999 }
8000
8001 static int
8002 lustre_dissect_element_qunit_data_old_qd_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
8003 {
8004   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old_qd_count);
8005
8006   return offset;
8007 }
8008
8009 static int
8010 lustre_dissect_element_qunit_data_old_qd_isblk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
8011 {
8012   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_qunit_data_old_qd_isblk);
8013
8014   return offset;
8015 }
8016
8017 int
8018 lustre_dissect_struct_qunit_data_old(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
8019 {
8020   proto_item *item = NULL;
8021   proto_tree *tree = NULL;
8022   int old_offset;
8023
8024
8025
8026   old_offset=offset;
8027
8028   if (parent_tree) {
8029     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
8030     tree = proto_item_add_subtree(item, ett_lustre_qunit_data_old);
8031   }
8032
8033   offset=lustre_dissect_element_qunit_data_old_qd_id(tvb, offset, pinfo, tree);
8034
8035   offset=lustre_dissect_element_qunit_data_old_qd_type(tvb, offset, pinfo, tree);
8036
8037   offset=lustre_dissect_element_qunit_data_old_qd_count(tvb, offset, pinfo, tree);
8038
8039   offset=lustre_dissect_element_qunit_data_old_qd_isblk(tvb, offset, pinfo, tree);
8040
8041
8042   proto_item_set_len(item, offset-old_offset);
8043
8044   return offset;
8045 }
8046
8047 int
8048 lustre_dissect_struct_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_ )
8049 {
8050   offset=dissect_uint32(tvb, offset, pinfo, parent_tree,  hf_index);
8051   /* Pad out to 8 bytes */
8052   offset=add_extra_padding(tvb,offset,pinfo,parent_tree);
8053
8054   return offset;
8055 }
8056
8057 int
8058 lustre_dissect_struct_seq_range(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
8059 {
8060   proto_item *item = NULL;
8061   proto_tree *tree = NULL;
8062   int old_offset;
8063
8064   old_offset=offset;
8065
8066   if (parent_tree) {
8067     item = proto_tree_add_item(parent_tree, hf_lustre_seq_range, tvb, offset, -1, TRUE);
8068     tree = proto_item_add_subtree(item, ett_lustre_seq_range);
8069   }
8070
8071   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_seq_range_start);
8072   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_seq_range_end);
8073   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_seq_range_index);
8074   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_seq_range_flags);
8075
8076   if (item)
8077     proto_item_set_len(item, offset-old_offset);
8078
8079   return offset;
8080 }
8081
8082 int
8083 lustre_dissect_struct_fld_range(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
8084 {
8085   proto_item *item = NULL;
8086   proto_tree *tree = NULL;
8087   int old_offset;
8088
8089   old_offset=offset;
8090
8091   if (parent_tree) {
8092     item = proto_tree_add_item(parent_tree, hf_lustre_fld_range, tvb, offset, -1, TRUE);
8093     tree = proto_item_add_subtree(item, ett_lustre_fld_range);
8094   }
8095
8096   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_fld_range_start);
8097   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_fld_range_end);
8098   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_fld_range_index);
8099   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_fld_range_flags);
8100
8101   if (item)
8102     proto_item_set_len(item, offset-old_offset);
8103
8104   return offset;
8105 }
8106
8107 int
8108 lustre_dissect_struct_mdt_ioepoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
8109 {
8110   proto_item *item = NULL;
8111   proto_tree *tree = NULL;
8112   int old_offset;
8113
8114   old_offset=offset;
8115
8116   if (parent_tree) {
8117     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
8118     tree = proto_item_add_subtree(item, ett_lustre_mdt_ioepoch);
8119   }
8120
8121   offset=lustre_dissect_struct_handle_cookie(tvb, offset, pinfo, tree, hf_lustre_mdt_ioepoch_handle);
8122   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mdt_ioepoch_ioepoch);
8123   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_mdt_ioepoch_flags);
8124   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_mdt_ioepoch_padding);
8125
8126   if (item)
8127     proto_item_set_len(item, offset-old_offset);
8128   return offset;
8129 }
8130
8131 /* IDL: struct lustre_capa {
8132  * IDL:         struct lu_fid   lc_fid;
8133  * IDL:         __u64           lc_opc;
8134  * IDL:         __u64           lc_uid;
8135  * IDL:         __u64           lc_gid;
8136  * IDL:         __u32           lc_flags;
8137  * IDL:         __u32           lc_keyid;
8138  * IDL:         __u32           lc_timeout;
8139  * IDL:         __u32           lc_expiry;
8140  * IDL:         __u8            lc_hmac[64];
8141  * IDL: } __attribute__((packed));
8142  */
8143
8144 /** lustre_capa::lc_opc */
8145 /* enum { */
8146 /*         CAPA_OPC_BODY_WRITE   = 1<<0,  **< write object data  */
8147 /*         CAPA_OPC_BODY_READ    = 1<<1,  **< read object data  */
8148 /*         CAPA_OPC_INDEX_LOOKUP = 1<<2,  **< lookup object fid  */
8149 /*         CAPA_OPC_INDEX_INSERT = 1<<3,  **< insert object fid  */
8150 /*         CAPA_OPC_INDEX_DELETE = 1<<4,  **< delete object fid  */
8151 /*         CAPA_OPC_OSS_WRITE    = 1<<5,  **< write oss object data  */
8152 /*         CAPA_OPC_OSS_READ     = 1<<6,  **< read oss object data */
8153 /*         CAPA_OPC_OSS_TRUNC    = 1<<7,  **< truncate oss object */
8154 /*         CAPA_OPC_OSS_DESTROY  = 1<<8,  **< destroy oss object  */
8155 /*         CAPA_OPC_META_WRITE   = 1<<9,  **< write object meta data */
8156 /*         CAPA_OPC_META_READ    = 1<<10, **< read object meta data  */
8157 /* }; */
8158
8159 int
8160 lustre_dissect_element_capa_opc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
8161 {
8162   /* TODO - pick apart bits */
8163   offset = dissect_uint64(tvb, offset, pinfo, parent_tree, hf_lustre_capa_opc);
8164   return offset;
8165 }
8166
8167 int
8168 lustre_dissect_element_capa_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
8169 {
8170   /* TODO - pick apart flags */
8171   offset=dissect_uint32(tvb,offset,pinfo,parent_tree,hf_lustre_capa_flags);
8172   return offset;
8173 }
8174
8175 int
8176 lustre_dissect_struct_capa(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
8177                            proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_num)
8178 {
8179   proto_item *item = NULL;
8180   proto_tree *tree = NULL;
8181   int old_offset;
8182   int data_len;
8183
8184   old_offset=offset;
8185
8186   data_len = LUSTRE_BUFFER_LEN(buf_num);
8187   if (data_len == 0)
8188     return offset;
8189
8190   if (parent_tree) {
8191     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
8192     tree = proto_item_add_subtree(item, ett_lustre_capa);
8193   }
8194
8195   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_capa_fid);
8196
8197   offset=lustre_dissect_element_capa_opc(tvb,offset,pinfo,tree);
8198
8199   offset=dissect_uint64(tvb,offset,pinfo,tree,hf_lustre_capa_uid);
8200
8201   offset=dissect_uint64(tvb,offset,pinfo,tree,hf_lustre_capa_gid);
8202
8203   offset=lustre_dissect_element_capa_flags(tvb,offset,pinfo,tree);
8204
8205   offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_keyid);
8206
8207   offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_timeout);
8208
8209   offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_expiry);
8210
8211   offset=lustre_dissect_struct_hmac(tvb,offset,pinfo,tree, hf_lustre_capa_hmac, 64);
8212
8213   if (item)
8214     proto_item_set_len(item, offset-old_offset);
8215   return offset;
8216 }
8217
8218
8219 int
8220 lustre_dissect_struct_acl(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_num)
8221 {
8222   proto_item *item = NULL;
8223   proto_tree *tree = NULL;
8224   int old_offset;
8225   int data_len;
8226
8227   old_offset=offset;
8228
8229   data_len = LUSTRE_BUFFER_LEN(buf_num);
8230   if (data_len == 0)
8231     return offset;
8232
8233   if (parent_tree) {
8234     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
8235     tree = proto_item_add_subtree(item, ett_lustre_acl);
8236   }
8237
8238   proto_tree_add_item(tree, hf_index, tvb, offset, data_len, TRUE);
8239
8240   offset+=data_len;
8241
8242   offset=add_extra_padding(tvb,offset,pinfo,tree);
8243
8244   if (item)
8245     proto_item_set_len(item, offset-old_offset);
8246
8247   return offset;
8248 }
8249
8250
8251 /* ------------------------------------------------------------------------- */
8252 /* dissect string .
8253  * the length of the string is the current buflen
8254  * @tvb the packet buff
8255  * @offset the current offset
8256  * @pinfo
8257  * @parent_tree
8258  * @hf_index : the corresponding header field
8259  * @buf_num  : the corresponding bufnumber of the string (we use it to
8260  * determine the string length), must respect : 0<bufnum<=bufmax_in_paquet
8261  */
8262 static int
8263 lustre_dissect_element_string (tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_num)
8264 {
8265   proto_item *item = NULL;
8266   int old_offset;
8267   guint32 string_len;
8268
8269   old_offset=offset;
8270
8271   /* if (parent_tree) {
8272    *   item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
8273    *   tree = proto_item_add_subtree(item, ett_lustre);
8274    * }
8275    */
8276
8277   string_len = LUSTRE_BUFFER_LEN(buf_num);
8278   if(string_len == 0)
8279     return offset;
8280
8281   /*    g_print("buf_num:%d (max:%d) BUFLEN_OFF:%#x strlen:%d\n",
8282         buf_num, LUSTRE_BUFCOUNT,
8283         LUSTRE_BUFLEN_OFF, string_len);*/
8284
8285   proto_tree_add_item(parent_tree, hf_index, tvb, offset, string_len, TRUE);
8286   if(string_len>1)
8287     display_info_fstr(parent_tree, pinfo->cinfo, COL_INFO, " filename : %s",
8288                       (const gchar *) tvb_get_string(tvb,offset,string_len) );
8289
8290   offset+=string_len;
8291   proto_item_set_len(item, offset-old_offset);
8292   offset=add_extra_padding(tvb,offset,pinfo,parent_tree); /* after a string we must be aligned to 8 bytes. */
8293
8294   return offset;
8295 }
8296
8297 /* ------------------------------------------------------------------------- */
8298
8299
8300 /* Process REINT opcode requests */
8301 static int reint_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_)
8302 {
8303   guint32 opcode  ;
8304
8305   opcode = tvb_get_letohl(tvb,offset);
8306
8307   switch(opcode){
8308     case  REINT_SETATTR:
8309       /* 2.x+ [rec_setattr][capa1][mdt_epoch][eadata][cookie_data][ldlm_request] */
8310       /* old? [rec_setattr][ldlm_request] */
8311       offset=lustre_dissect_struct_mdt_rec_setattr(tvb, offset, pinfo, tree,
8312                                                    hf_lustre_mdt_rec_setattr);
8313       if (LUSTRE_BUFCOUNT > 2) {
8314         offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8315                                           hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8316         if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+2) > 0)
8317           offset=lustre_dissect_struct_mdt_ioepoch(tvb, offset, pinfo, tree,
8318                                                    hf_lustre_mdt_ioepoch);
8319         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree,
8320                                            hf_lustre_mds_xattr_eadata,
8321                                            LUSTRE_REQ_REC_OFF+3);
8322         if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+4) > 0)
8323           offset=lustre_dissect_struct_llog_cookie(tvb,offset,pinfo,tree,hf_lustre_llog_cookie);
8324       }
8325       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree,
8326                                                 hf_lustre_ldlm_request);
8327       break;
8328     case REINT_CREATE :
8329       /* [rec_create][filename][tgt.. Ã  0 pour l'instant][ldlm_request] */
8330       offset=lustre_dissect_struct_mdt_rec_create(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_create);
8331       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8332       offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_name, LUSTRE_REQ_REC_OFF+2);
8333       /* REINT_CREATE_SLAVE / SYM / RMT_ACL */
8334       if (LUSTRE_BUFCOUNT > 4) {
8335         /* for CREATE_SYM this is actually name of target - encoded in mdt_rec_create.cr_mode */
8336         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_reint_name, LUSTRE_REQ_REC_OFF+3);
8337         offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree,
8338                                                   hf_lustre_ldlm_request);
8339       }
8340       break;
8341     case  REINT_LINK:
8342       /*[mdt_rec_link][filename][ldlm_req] */
8343       offset=lustre_dissect_struct_mdt_rec_link(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_link);
8344       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8345       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+2);
8346       offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_old_name, LUSTRE_REQ_REC_OFF+3);
8347       if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+4) > 0)
8348       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8349       break;
8350     case  REINT_UNLINK:
8351       /* reint_unlink_client: [mdt_rec_unlink][capa1][filename][ldlm_req] */
8352       offset=lustre_dissect_struct_mdt_rec_unlink(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_unlink);
8353       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8354       if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+2) == 112) {
8355         /* TODO : ugly .. but for now we have to do this */
8356         offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl);
8357
8358       } else {
8359         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_name, LUSTRE_REQ_REC_OFF+2);
8360         offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8361       }
8362       break;
8363     case  REINT_RENAME: /*mds_rename_unpack : [mdt_rec_rename][filename source][filename target_name][ldlm_request] */
8364       offset=lustre_dissect_struct_mdt_rec_rename(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_rename);
8365       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8366       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+2);
8367       offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_old_name, LUSTRE_REQ_REC_OFF+3);
8368       offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_new_name, LUSTRE_REQ_REC_OFF+4);
8369       if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+5) > 0)
8370         offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8371       break;
8372     case  REINT_OPEN: /* [rec_create][filename][eadata] */
8373       offset=lustre_dissect_struct_mdt_rec_create(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_create);
8374       offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_name, LUSTRE_REQ_REC_OFF+1);
8375       offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_mds_xattr_eadata, LUSTRE_REQ_REC_OFF+2);
8376       break;
8377     case  REINT_SETXATTR:
8378       /* 2.x+ [rec_setxattr][capa1][name][eadata] */
8379       /* old? [rec_setxattr][ldlm_request] */
8380       offset=lustre_dissect_struct_mdt_rec_setxattr(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_setxattr);
8381       if (LUSTRE_BUFCOUNT > 2) {
8382         offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8383                                           hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8384         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_mds_xattr_name, LUSTRE_REQ_REC_OFF+2);
8385         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_mds_xattr_eadata,
8386                                            LUSTRE_REQ_REC_OFF+3);
8387         if (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+4) > 0)
8388           offset=lustre_dissect_struct_llog_cookie(tvb,offset,pinfo,tree,hf_lustre_llog_cookie);
8389       } else if (LUSTRE_BUFCOUNT == 2)
8390         offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree,
8391                                                   hf_lustre_ldlm_request);
8392       break;
8393     default:
8394       break;
8395
8396   }
8397
8398   return offset ;
8399 }
8400
8401
8402 /* dissect a connect message */
8403 static int
8404 lustre_dissect_generic_connect(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
8405 {
8406   /*TODO : add a cuuid and target uid */
8407   offset=lustre_dissect_struct_obd_uuid(tvb, offset, pinfo, tree, hf_lustre_obd_uuid);
8408   offset=lustre_dissect_struct_obd_uuid(tvb, offset, pinfo, tree, hf_lustre_obd_uuid);
8409   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_mdt_body_handle);
8410   offset=lustre_dissect_struct_obd_connect_data(tvb,offset,pinfo,tree,hf_lustre_obd_connect_data);
8411   return offset;
8412 }
8413
8414 static int
8415 lustre_ost_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8416 {
8417   guint32 i ;
8418
8419   switch (opc){
8420     case OST_REPLY: /* obsolete so nothing */
8421       break;
8422     case OST_GETATTR:
8423       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8424       if (pb_type == PTL_RPC_MSG_REQUEST)
8425           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8426       break;
8427     case OST_SETATTR:
8428       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8429       if (pb_type == PTL_RPC_MSG_REQUEST)
8430           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8431       break;
8432     case OST_READ: /* [OST_BODY][obd_ioobj][niobuf_remote] for request, [OST_BODY] for reply */
8433       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8434       if(pb_type==PTL_RPC_MSG_REQUEST){
8435         offset=lustre_dissect_struct_obd_ioobj(tvb, offset, pinfo, tree,   hf_lustre_obd_ioobj);
8436         offset=lustre_dissect_struct_niobuf_remote(tvb,offset,pinfo, tree, hf_lustre_niobuf_remote);
8437       }
8438       break;
8439     case OST_WRITE:
8440       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree,
8441                                             hf_lustre_ost_body);
8442       if(pb_type==PTL_RPC_MSG_REQUEST) {
8443         for (i = 0; i < (LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+1))/24; i++)
8444           offset=lustre_dissect_struct_obd_ioobj(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj);
8445         offset=lustre_dissect_struct_niobuf_remote(tvb,offset,pinfo, tree, hf_lustre_obd_ioobj);
8446       }
8447       if(pb_type==PTL_RPC_MSG_REPLY) { /* niocount *[uint32], but niocount is in request message, so
8448                                           we use the bufcount */
8449         for (i = 0; i < LUSTRE_BUFCOUNT-2; i++) /* -2 because we have already dissect 2 buffers : ptl + ost */
8450           offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_nio);
8451         offset=add_extra_padding(tvb, offset, pinfo, tree);
8452       }
8453       break;
8454     case OST_CREATE:
8455       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8456       if (pb_type == PTL_RPC_MSG_REQUEST)
8457           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8458       break;
8459     case OST_DESTROY:
8460       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8461       if(pb_type==PTL_RPC_MSG_REQUEST) {/* [ost_body][ldlm_req][capa] */
8462         if ( LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF +1) != 0)
8463           offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request);
8464         offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REPLY_REC_OFF+2);
8465       }
8466       break;
8467     case OST_GET_INFO:
8468       if(pb_type==PTL_RPC_MSG_REQUEST) /* [key] */
8469         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_key, LUSTRE_REQ_REC_OFF);
8470       if (pb_type==PTL_RPC_MSG_REPLY)
8471         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_val, LUSTRE_REQ_REC_OFF); /* val */
8472       break;
8473     case OST_CONNECT:
8474       if (pb_type==PTL_RPC_MSG_REQUEST) /* [targetuuid][clientuuid][lustre_handle][obd_connect_data] */
8475         offset=lustre_dissect_generic_connect(tvb,offset,pinfo,tree);
8476       if (pb_type==PTL_RPC_MSG_REPLY)
8477         offset=lustre_dissect_struct_obd_connect_data(tvb,offset,pinfo,tree,hf_lustre_obd_connect_data);
8478       break;
8479     case OST_DISCONNECT: /* [nothing] */
8480       break;
8481     case OST_PUNCH: /* [ost_body] */
8482       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8483       if (pb_type == PTL_RPC_MSG_REQUEST)
8484           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8485       break;
8486     case OST_OPEN: /* [nothing] in the code maybee obsolete */
8487       break;
8488     case OST_CLOSE: /* [nothing] in the code maybee obsolete */
8489       break;
8490     case OST_STATFS: /* [obd_statfs] */
8491       if (pb_type==PTL_RPC_MSG_REPLY)
8492           offset=lustre_dissect_struct_obd_statfs(tvb, offset, pinfo, tree, hf_lustre_obd_statfs) ;
8493       break;
8494     case OST_SYNC:
8495       /*[ost_body] in both case */
8496       offset=lustre_dissect_struct_ost_body(tvb, offset, pinfo, tree, hf_lustre_ost_body) ;
8497       if (pb_type == PTL_RPC_MSG_REQUEST)
8498           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+1);
8499       break;
8500     case OST_SET_INFO:
8501       if(pb_type==PTL_RPC_MSG_REQUEST)
8502       {
8503         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_key, LUSTRE_REQ_REC_OFF); /* key  */
8504         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_val, LUSTRE_REQ_REC_OFF+1); /* val */
8505       }
8506       /* if Key = "evict_by_nid" --> need to be process.. TODO */
8507       break;
8508     case OST_QUOTACHECK:
8509       if(pb_type==PTL_RPC_MSG_REQUEST)
8510         offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl) ;
8511       /* nothing in reply */
8512       break;
8513     case OST_QUOTACTL:
8514       /*[obd_quotactl in both case]*/
8515       offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl) ;
8516     case OST_QUOTA_ADJUST_QUNIT:
8517       /* [quota_adjust_qunit] in both case ? */
8518       offset=lustre_dissect_struct_quota_adjust_qunit(tvb, offset, pinfo, tree, hf_lustre_quota_adjust_qunit) ;
8519   };
8520   return offset;
8521 }
8522
8523 static int
8524 lustre_mds_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8525 {
8526   switch (opc){
8527     case MDS_DISCONNECT:
8528       /*[nothing]*/
8529       break;
8530     case MDS_GETSTATUS:
8531       /*request: [mds body]*/
8532       /*reply:   [mds body][capa] */
8533       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8534       if (pb_type == PTL_RPC_MSG_REPLY)
8535           offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REPLY_REC_OFF+1);
8536       break;
8537     case MDS_SETXATTR:
8538       if(pb_type==PTL_RPC_MSG_REQUEST)
8539         /* [mds body] */
8540         offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8541       /*if(reply) : [nothing]*/
8542       break;
8543     case MDS_GETXATTR:
8544       /*request: [mds body][capa][xattr name]*/
8545       /*reply:   [mds body][eadata] - ommited on error */
8546       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8547       if(pb_type==PTL_RPC_MSG_REQUEST) {
8548         offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REPLY_REC_OFF+1);
8549         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_mds_xattr_name, LUSTRE_REQ_REC_OFF+2);
8550       }
8551       if (pb_type == PTL_RPC_MSG_REPLY)
8552         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_mds_xattr_eadata, LUSTRE_REQ_REC_OFF+1);
8553       break;
8554     case MDS_GETATTR:
8555       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body);
8556       if (pb_type == PTL_RPC_MSG_REPLY) { /*  [mdt_md][acl][capa1][capa2] */
8557         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree,
8558                                              hf_lustre_mds_md_data,
8559                                              LUSTRE_REPLY_REC_OFF+1);
8560         offset=lustre_dissect_struct_acl(tvb, offset, pinfo, tree,
8561                                          hf_lustre_acl, LUSTRE_REPLY_REC_OFF+3);
8562         offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8563                                           hf_lustre_capa,
8564                                           LUSTRE_REPLY_REC_OFF+4);
8565         offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8566                                           hf_lustre_capa,
8567                                           LUSTRE_REPLY_REC_OFF+5);
8568       }
8569       break;
8570     case MDS_GETATTR_NAME:
8571       if(pb_type==PTL_RPC_MSG_REQUEST)
8572         /*[mdt_body]*/
8573         offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8574       /*[nothing in reply]*/
8575       break;
8576     case MDS_DONE_WRITING:
8577       /*[mdt_body]*/
8578       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8579       break;
8580     case MDS_PIN: /* repbody.. */
8581       /*[mdt_body]*/
8582       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8583       break;
8584     case MDS_SYNC:
8585       /*[mdt_body]*/
8586       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8587       break;
8588
8589     case MDS_CLOSE:
8590       if(pb_type==PTL_RPC_MSG_REQUEST)
8591       { /* [mdt_ioepoch][rec_reint][capa1] */
8592         offset=lustre_dissect_struct_mdt_ioepoch(tvb, offset, pinfo, tree, hf_lustre_mdt_ioepoch);
8593
8594         if(LUSTRE_BUFFER_LEN(LUSTRE_REQ_REC_OFF+1) > 0)
8595           offset=lustre_dissect_struct_mdt_rec_setattr(tvb, offset, pinfo, tree, hf_lustre_mdt_rec_setattr);
8596
8597         offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+2);
8598       }
8599       if(pb_type==PTL_RPC_MSG_REPLY)
8600       { /* [mdt_body][md][cookie][capa1][capa2] */
8601         offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8602         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_mds_md_data, LUSTRE_REPLY_REC_OFF+1);
8603         if(LUSTRE_BUFFER_LEN(LUSTRE_REPLY_REC_OFF+2) > 0)
8604           offset=lustre_dissect_struct_llog_cookie(tvb,offset,pinfo,tree,hf_lustre_llog_cookie);
8605         offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+3);
8606         offset=lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REQ_REC_OFF+4);
8607       }
8608       break;
8609
8610     case MDS_STATFS:
8611       if(pb_type==PTL_RPC_MSG_REPLY)
8612         /*[obd_statfs]*/
8613         offset=lustre_dissect_struct_obd_statfs(tvb, offset, pinfo, tree, hf_lustre_obd_statfs) ;
8614       /*in request : [nothing]*/
8615       break;
8616
8617     case MDS_READPAGE:
8618       /* [mdt_body] but with some different interpration, need to modify the hf :  TODO  */
8619       offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8620       break;
8621
8622     case MDS_REINT:
8623       /* the structure depend on the intent_opcode */
8624       if(pb_type==PTL_RPC_MSG_REQUEST)
8625         offset=reint_opcode_process(tvb, offset, pinfo, tree);
8626
8627       if(pb_type==PTL_RPC_MSG_REPLY) {
8628         /* [mdt_body][mdt_md][??][capa1][capa2] */
8629         offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
8630
8631         offset=lustre_dissect_struct_lov_mds_md(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1, LUSTRE_REPLY_REC_OFF+1);
8632
8633         if(LUSTRE_BUFFER_LEN(LUSTRE_REPLY_REC_OFF+2) > 0)
8634           /* open : ...[ACL]...
8635            * unlink, rename : ...[log_cookies]... */
8636           offset=lustre_dissect_element_data(tvb, offset, pinfo, tree,
8637                                              hf_lustre_mds_xattr_eadata,
8638                                              LUSTRE_REPLY_REC_OFF+2);
8639
8640         lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REPLY_REC_OFF+3);
8641         lustre_dissect_struct_capa(tvb,offset,pinfo,tree, hf_lustre_capa, LUSTRE_REPLY_REC_OFF+4);
8642       }
8643       break;
8644     case MDS_SET_INFO:
8645       if(pb_type==PTL_RPC_MSG_REQUEST){
8646         /*[key][val]*/
8647         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_key,LUSTRE_REQ_REC_OFF); /* key  */
8648         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_ost_val, LUSTRE_REQ_REC_OFF+1); /* val */
8649         //offset=add_extra_padding(tvb,offset,pinfo,tree);
8650       }
8651       /*nothing en reply*/
8652       break;
8653     case MDS_QUOTACHECK:
8654       /* [obd_quotactl] */
8655       if(pb_type==PTL_RPC_MSG_REQUEST)
8656         offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl) ;
8657       break;
8658     case MDS_QUOTACTL:
8659       /* [obd_quotactl] in both case*/
8660       offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl) ;
8661       break;
8662     case MDS_CONNECT:
8663       if (pb_type==PTL_RPC_MSG_REQUEST) /* [targetuuid][clientuuid][lustre_handle][obd_connect_data] */
8664         offset=lustre_dissect_generic_connect(tvb,offset,pinfo,tree);
8665       if (pb_type==PTL_RPC_MSG_REPLY || pb_type == PTL_RPC_MSG_ERR) /*[obd_connect_data]*/
8666         offset=lustre_dissect_struct_obd_connect_data(tvb,offset,pinfo,tree,hf_lustre_obd_connect_data);
8667       break;
8668     default:
8669       break;
8670   };
8671
8672   return offset;
8673
8674 }
8675
8676
8677 static int
8678 lustre_ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8679 {
8680   switch (opc) {
8681   case LDLM_ENQUEUE:
8682     /* [ldlm_request] if we have one more buffer it's
8683      * [intent_opcode] and the opcode give us the corresponding
8684      * intent structure [intent] */
8685     if (pb_type==PTL_RPC_MSG_REQUEST) {
8686       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree,
8687                                                 hf_lustre_ldlm_request);
8688       if (LUSTRE_BUFCOUNT>=3)
8689         offset=lustre_dissect_struct_ldlm_intent(tvb, offset, pinfo, tree,
8690                                                  hf_lustre_ldlm_intent);
8691     }
8692     if (pb_type==PTL_RPC_MSG_REPLY) {
8693       guint32 ldlm_type;
8694       /*[ldlm_reply]*/
8695       offset=lustre_dissect_struct_ldlm_reply(tvb, offset, pinfo, tree,
8696                                               hf_lustre_ldlm_reply,
8697                                               &ldlm_type);
8698       /* check if we're done processing */
8699       if (LUSTRE_BUFCOUNT <= 2)
8700           break;
8701
8702       if (LUSTRE_BUFFER_LEN(LUSTRE_REPLY_REC_OFF) == 40)
8703         /* TODO :this code need to be check and test, the
8704          * lustre corresponding code isn't explicit, so not
8705          * sure to have this buffer, but in example it works
8706          * fine
8707          */
8708         offset=lustre_dissect_struct_ost_lvb(tvb, offset, pinfo, tree,
8709                                              hf_lustre_ost_lvb);
8710
8711       else if (ldlm_type == LDLM_EXTENT) {
8712         offset=lustre_dissect_struct_lov_mds_md(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1,
8713                                                 LUSTRE_DLM_REPLY_REC_OFF);
8714         break;
8715       }
8716
8717       if (LUSTRE_BUFFER_LEN(LUSTRE_DLM_REPLY_REC_OFF) > 0)
8718         offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree,
8719                                               hf_lustre_mdt_body);
8720       offset=lustre_dissect_struct_lov_mds_md(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1,
8721                                               LUSTRE_DLM_INTENT_REC_OFF);
8722
8723       /* ldlm_intent_server : ACL */
8724       offset=lustre_dissect_struct_acl(tvb, offset, pinfo, tree,
8725                                        hf_lustre_acl, LUSTRE_DLM_INTENT_REC_OFF+1);
8726
8727       /* ldlm_intent_open_server : [capa1][capa2] */
8728       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8729                                         hf_lustre_capa, LUSTRE_DLM_INTENT_REC_OFF+2);
8730       offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree,
8731                                         hf_lustre_capa, LUSTRE_DLM_INTENT_REC_OFF+3);
8732     }
8733     break;
8734
8735   case LDLM_CONVERT:
8736     if(pb_type==PTL_RPC_MSG_REQUEST) /*[ldlm_request]*/
8737       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8738     if(pb_type==PTL_RPC_MSG_REPLY) /*[ldlm_reply]*/
8739       offset=lustre_dissect_struct_ldlm_reply(tvb, offset, pinfo, tree, hf_lustre_ldlm_reply, NULL) ;
8740     break;
8741
8742   case LDLM_CANCEL:
8743     if(pb_type==PTL_RPC_MSG_REQUEST) /*[ldlm_request]*/
8744       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8745     break;
8746
8747   case LDLM_BL_CALLBACK:
8748     if(pb_type==PTL_RPC_MSG_REQUEST) /*[ldlm_request]*/
8749       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8750     break;
8751
8752   case LDLM_CP_CALLBACK:
8753     if(pb_type==PTL_RPC_MSG_REQUEST){
8754       /*[ldlm_request] if the third buffer exist we have [lvb data] so it's [ost_lvb] : TODO :
8755        * check that */
8756       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8757       if(LUSTRE_BUFFER_LEN(LUSTRE_DLM_REPLY_REC_OFF) > 0)
8758         offset=lustre_dissect_struct_ost_lvb(tvb,offset,pinfo,tree,hf_lustre_ost_lvb);
8759     }
8760     /*reply : [nothing] */
8761     break;
8762
8763   case LDLM_GL_CALLBACK:
8764     if(pb_type==PTL_RPC_MSG_REQUEST) { /*[ldlm_request] [lvb (for gl_desc)]*/
8765       offset=lustre_dissect_struct_ldlm_request(tvb, offset, pinfo, tree, hf_lustre_ldlm_request) ;
8766       if(LUSTRE_BUFFER_LEN(LUSTRE_DLM_REPLY_REC_OFF) > 0)
8767         offset=lustre_dissect_struct_ost_lvb(tvb,offset,pinfo,tree,hf_lustre_ost_lvb);
8768     }
8769     if(pb_type==PTL_RPC_MSG_REPLY) /* [ost_lvb] */
8770       offset=lustre_dissect_struct_ost_lvb(tvb, offset, pinfo, tree, hf_lustre_ost_lvb);
8771     break;
8772
8773   default :
8774     break;
8775   }
8776   return offset;
8777 }
8778
8779 static int
8780 lustre_mgs_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8781 {
8782   switch (opc){
8783     case MGS_CONNECT :
8784       if (pb_type==PTL_RPC_MSG_REQUEST) /* [targetuuid][clientuuid][lustre_handle][obd_connect_data] */
8785         offset=lustre_dissect_generic_connect(tvb,offset,pinfo,tree);
8786       if (pb_type==PTL_RPC_MSG_REPLY) /*[obd_connect_data]*/
8787         offset=lustre_dissect_struct_obd_connect_data(tvb,offset,pinfo,tree,hf_lustre_obd_connect_data);
8788       break;
8789     case MGS_DISCONNECT :
8790       /*[nothing]*/
8791       break;
8792     case MGS_EXCEPTION :        /* node died, etc. */
8793       /*[nothing]*/
8794       break;
8795     case MGS_TARGET_REG:
8796       /*[mgs_target_info], mgs_handler.c mgs_handle_target_reg()  called whenever a target startup*/
8797       offset=lustre_dissect_struct_mgs_target_info(tvb, offset, pinfo, tree, hf_lustre_mgs_target_info);
8798       break;
8799     case MGS_TARGET_DEL:
8800       /*[nothing]*/
8801       break;
8802     case MGS_SET_INFO:
8803       /*[mgs_send_param], mgs_set_info_rpc()*/
8804       offset=lustre_dissect_struct_mgs_send_param(tvb,offset,pinfo,tree,hf_lustre_mgs_send_param);
8805       break;
8806     case MGS_CONFIG_READ:
8807       if (pb_type==PTL_RPC_MSG_REQUEST) /* [config_body] */
8808         offset=lustre_dissect_struct_mgs_config_body(tvb,offset,pinfo,tree,hf_lustre_mgs_config_body);
8809       if (pb_type==PTL_RPC_MSG_REPLY)   /* [config_res] */
8810         offset=lustre_dissect_struct_mgs_config_res(tvb,offset,pinfo,tree,hf_lustre_mgs_config_res);
8811       break;
8812     default:
8813       break;
8814   };
8815   return offset;
8816 }
8817
8818 static int
8819 lustre_odb_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8820 {
8821   switch(opc){
8822     case OBD_PING :
8823       /*[nothing]*/
8824       break;
8825     case OBD_LOG_CANCEL:
8826       /*[nothing]*/
8827       break;
8828     case OBD_QC_CALLBACK:
8829       if(pb_type==PTL_RPC_MSG_REQUEST)
8830         offset=lustre_dissect_struct_obd_quotactl(tvb, offset, pinfo, tree, hf_lustre_obd_quotactl);
8831       /*if (request)  : [nothing]*/
8832       break;
8833     default:
8834       break;
8835   };
8836   return offset;
8837 }
8838
8839 static int
8840 lustre_llog_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8841 {
8842   switch(opc){
8843     case LLOG_ORIGIN_HANDLE_CREATE     : /* in handler.c */
8844       /*[llogd_body]  (reply and request)*/
8845       offset=lustre_dissect_struct_llogd_body(tvb, offset, pinfo, tree, hf_lustre_llogd_body);
8846       if(pb_type==PTL_RPC_MSG_REQUEST) /* [filename] */
8847         if (LUSTRE_BUFCOUNT>2)
8848           offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_llogd_name,
8849                                                LUSTRE_REQ_REC_OFF+1);
8850       break;
8851     case LLOG_ORIGIN_HANDLE_NEXT_BLOCK :/* in handler.c */
8852       /* [llogd_body][eadata]
8853        * the size of second buf is LLOG_CHKUNK_SIZE, so it's maybee only bulk data */
8854       offset=lustre_dissect_struct_llogd_body(tvb, offset, pinfo, tree, hf_lustre_llogd_body);
8855       if(pb_type==PTL_RPC_MSG_REPLY)
8856         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_llogd_chunk,
8857                                            LUSTRE_REPLY_REC_OFF+1);
8858       break;
8859     case LLOG_ORIGIN_HANDLE_READ_HEADER:/* in handler.c */
8860       if(pb_type==PTL_RPC_MSG_REQUEST){
8861         /* [llogd_body][llog_log_hdr] */
8862         offset=lustre_dissect_struct_llogd_body(tvb, offset, pinfo, tree, hf_lustre_llogd_body);
8863         if(LUSTRE_BUFCOUNT>2)
8864           offset=lustre_dissect_struct_llog_log_hdr(tvb, offset, pinfo, tree,
8865               hf_lustre_llogd_log_hdr);
8866       }
8867       if(pb_type==PTL_RPC_MSG_REPLY) /* [llog_log_hdr] */
8868         offset=lustre_dissect_struct_llog_log_hdr(tvb, offset, pinfo, tree,
8869             hf_lustre_llogd_log_hdr);
8870       break;
8871     case LLOG_ORIGIN_HANDLE_WRITE_REC  : /* I think this is obsolete */
8872       /*[nothing]*/
8873       break;
8874     case LLOG_ORIGIN_HANDLE_CLOSE      :/* handler.c */
8875       /*[nothing]*/
8876       break;
8877     case LLOG_ORIGIN_CONNECT           : /* ost_handler.c */
8878       /*[nothing]*/
8879     case LLOG_CATINFO                  : /*in handler.c */
8880       if(pb_type==PTL_RPC_MSG_REQUEST){
8881         /* [keyword][if keyword=config  [char*] else [nothing]] */
8882         offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_llogd_keyword,
8883                                              LUSTRE_REQ_REC_OFF);
8884         if (strcmp((const char *)tvb_get_string(tvb, LUSTRE_REQ_REC_OFF,
8885                                                 tvb_get_letohl(tvb,
8886                                                                LUSTRE_BUFLEN_OFF + 4 *
8887                                                                LUSTRE_REQ_REC_OFF)),
8888                    "config") == 0)
8889           /* if(keyword == "config") */
8890           offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_llogd_client,
8891                                                LUSTRE_REQ_REC_OFF+1);
8892       }
8893       if(pb_type==PTL_RPC_MSG_REPLY)
8894         /*[buf] sizeof =  llog_chunk_size*/
8895         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_llogd_chunk,
8896             LUSTRE_REPLY_REC_OFF + 1 );
8897       /* TODO TODO : check if it's note a catid */
8898       break;
8899     case LLOG_ORIGIN_HANDLE_PREV_BLOCK : /* in handler.c */
8900       /* [llogd_body] in both case */
8901       offset=lustre_dissect_struct_llogd_body(tvb, offset, pinfo, tree, hf_lustre_llogd_body);
8902       if(pb_type==PTL_RPC_MSG_REPLY)
8903         /*[buf] size of llog_chunk_size*/
8904         offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_llogd_chunk,
8905             LUSTRE_REPLY_REC_OFF + 1 );
8906       break;
8907     case LLOG_ORIGIN_HANDLE_DESTROY    : /* in handler.c */
8908       /*[llogd_body] in both case*/
8909       offset=lustre_dissect_struct_llogd_body(tvb, offset, pinfo, tree, hf_lustre_llogd_body);
8910       break;
8911     default:
8912       break;
8913   };
8914
8915   return offset;
8916 }
8917
8918 static int
8919 lustre_seq_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
8920                           proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8921 {
8922   switch (opc) {
8923   case SEQ_QUERY:
8924     if (pb_type == PTL_RPC_MSG_REQUEST)
8925       offset=lustre_dissect_struct_seq(tvb, offset, pinfo, tree, hf_lustre_seq_opc);
8926     offset=lustre_dissect_struct_seq_range(tvb, offset, pinfo, tree);
8927     break;
8928
8929   default:
8930     g_print("error: SEQ Opcode: %d unknown\n", opc);
8931     if (check_col(pinfo->cinfo, COL_INFO))
8932       col_append_str(pinfo->cinfo, COL_PROTOCOL, "BUG");
8933     break;
8934   };
8935
8936   return offset;
8937 }
8938
8939 static int
8940 lustre_fld_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
8941                           proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8942 {
8943   switch (opc) {
8944   case FLD_QUERY:
8945     if (pb_type == PTL_RPC_MSG_REQUEST)
8946       offset=lustre_dissect_struct_seq(tvb, offset, pinfo, tree, hf_lustre_fld_opc);
8947     offset=lustre_dissect_struct_seq_range(tvb, offset, pinfo, tree);
8948     break;
8949
8950   default:
8951     g_print("error: FLD Opcode: %d unknown\n", opc);
8952     if (check_col(pinfo->cinfo, COL_INFO))
8953       col_append_str(pinfo->cinfo, COL_PROTOCOL, "BUG");
8954     break;
8955   };
8956
8957   return offset;
8958 }
8959
8960
8961 /* process lustre opcode :
8962    check if opcode is in range_opcode, and call the corresponding opcode process function */
8963 static int
8964 lustre_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint32 opc _U_, guint32 pb_type)
8965 {
8966   /* No more buffers to process */
8967   if (LUSTRE_BUFCOUNT == 1)
8968     return offset;
8969
8970   if (opc <= OST_LAST_OPC) /* OST opcodes */
8971     offset=lustre_ost_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8972
8973   if ( (opc >= MDS_FIRST_OPC) &&  (opc < MDS_LAST_OPC )) /* MDS opcodes */
8974     offset=lustre_mds_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8975
8976   if ( (opc >= LDLM_FIRST_OPC) && (opc < LDLM_LAST_OPC) ) /*LDLM Opcodes*/
8977     offset=lustre_ldlm_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8978
8979   if( (opc>= MGS_FIRST_OPC) && (opc <= MGS_LAST_OPC)) /* MGS Opcodes */
8980     offset=lustre_mgs_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8981
8982   if( (opc>= OBD_FIRST_OPC) && (opc<=OBD_LAST_OPC)) /* ODB Opcodes */
8983     offset=lustre_odb_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8984
8985   if( (opc>=LLOG_FIRST_OPC) && (opc<=LLOG_LAST_OPC)) /* LLOG Opcodes */
8986     offset=lustre_llog_opcode_process( tvb , offset ,pinfo ,  tree , opc , pb_type) ;
8987
8988   if( (opc >= SEQ_FIRST_OPC) && (opc <= SEQ_LAST_OPC) ) /* SEQ Opcodes */
8989     offset=lustre_seq_opcode_process(tvb, offset, pinfo, tree, opc, pb_type);
8990
8991   if( (opc >= FLD_FIRST_OPC) && (opc <= FLD_LAST_OPC) ) /* FLD Opcodes */
8992     offset=lustre_fld_opcode_process(tvb, offset, pinfo, tree, opc, pb_type);
8993
8994   return offset;
8995 }
8996
8997 /* ----------------------------------------------- */
8998 /* add an extra padding to be aligned to 8bytes */
8999 static int
9000 add_extra_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_)
9001 {
9002   guint32 padding_len;
9003
9004   padding_len = (8- offset%8)%8;
9005   if(padding_len){
9006     proto_tree_add_item(tree, hf_lustre_extra_padding , tvb, offset, padding_len, TRUE);
9007     offset+=padding_len;
9008   }
9009   return offset;
9010 }
9011 /* ----------------------------------------------- */
9012
9013 static int
9014 ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
9015                     proto_tree * tree _U_, guint64 intent_opc _U_)
9016 {
9017   /* all corresponding code is in mdc_locks.c in function mdc_enqueue() */
9018   /* if 0x0003 we have CREAT + OPEN
9019    */
9020   if (intent_opc & IT_OPEN) {
9021     /* mdc_intent_open_pack(), d'où [opcode][mdc_rec_create][capa1][capa2][name][eada] */
9022     offset=lustre_dissect_struct_mdt_rec_create(tvb, offset, pinfo, tree,
9023                                                 hf_lustre_mdt_rec_create);
9024     offset=lustre_dissect_element_string(tvb, offset, pinfo, tree,
9025                                          hf_lustre_reint_name,
9026                                          LUSTRE_DLM_INTENT_REC_OFF+3);
9027     offset=lustre_dissect_element_data(tvb, offset, pinfo, tree,
9028                                        hf_lustre_mds_xattr_eadata,
9029                                        LUSTRE_DLM_INTENT_REC_OFF+4);
9030   }
9031
9032   if (intent_opc & IT_UNLINK){
9033     /* mdc_intent_unlink_pack(), d'où [opcode][mdt_rec_unlink][capa][name] */
9034     offset=lustre_dissect_struct_mdt_rec_unlink(tvb, offset, pinfo, tree,
9035                                                 hf_lustre_mdt_rec_unlink);
9036     offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa,
9037                                       LUSTRE_DLM_INTENT_REC_OFF+1);
9038     offset=lustre_dissect_element_string(tvb, offset, pinfo, tree,
9039                                          hf_lustre_reint_name,
9040                                          LUSTRE_DLM_INTENT_REC_OFF+2);
9041   }
9042   if (intent_opc & IT_GETATTR){
9043     /* mdc_intent_lookup_pack, d'où [mdt_body][capa][name] */
9044     offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body) ;
9045     offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa,
9046                                       LUSTRE_DLM_INTENT_REC_OFF+1);
9047     offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_name,
9048                                          LUSTRE_DLM_INTENT_REC_OFF+2);
9049   }
9050
9051   if (intent_opc & IT_LOOKUP){
9052     /* mdc_intent_lookup_pack, d'où [mdt_body][capa][name] */
9053     offset=lustre_dissect_struct_mdt_body(tvb, offset, pinfo, tree, hf_lustre_mdt_body);
9054     offset=lustre_dissect_struct_capa(tvb, offset, pinfo, tree, hf_lustre_capa,
9055                                       LUSTRE_DLM_INTENT_REC_OFF+1);
9056     offset=lustre_dissect_element_string(tvb, offset, pinfo, tree, hf_lustre_reint_name,
9057                                          LUSTRE_DLM_INTENT_REC_OFF+2);
9058   }
9059   return offset;
9060 }
9061
9062
9063
9064 /* ----------------------------------------------- */
9065 /* function to test if the packet is entirely dissected  add BUG in PROTOCOL COL when it's not*/
9066 static void
9067 sanity_check(tvbuff_t *tvb, packet_info *pinfo, guint32 val_offset _U_)
9068 {
9069   guint32 somme_buflen = 0 ;
9070   guint32 i ;
9071
9072   /* magic_number = tvb_get_letohl(tvb, 8); */
9073
9074   for (i=0;i<LUSTRE_BUFCOUNT;i++)
9075     somme_buflen += tvb_get_letohl(tvb, LUSTRE_BUFLEN_OFF +
9076         4 * i ) + (8- tvb_get_letohl(tvb, LUSTRE_BUFLEN_OFF+4 * i)%8)%8; /* we add the
9077                                                                             corresponding
9078                                                                             extra padding,
9079                                                                             because extra
9080                                                                             padding isn't
9081                                                                             count in buflen
9082                                                                             */
9083
9084   if(val_offset!=somme_buflen){
9085     /*g_print("somme_buflen=%d, val_offset = %d \n",somme_buflen,val_offset);*/
9086     if (check_col(pinfo->cinfo, COL_INFO)) {
9087       col_append_str(pinfo->cinfo, COL_PROTOCOL, "BUG");
9088     }
9089   }
9090
9091 }
9092
9093
9094 /* IDL: struct lustre_msg_v1 { */
9095 /* IDL:   struct lustre_handle { */
9096 /* IDL: } lm_handle; */
9097 /* IDL:   uint32 lm_magic; */
9098 /* IDL:   uint32 lm_type; */
9099 /* IDL:   uint32 lm_version; */
9100 /* IDL:   uint32 lm_opc; */
9101 /* IDL:   uint64 lm_last_xid; */
9102 /* IDL:   uint64 lm_last_committed; */
9103 /* IDL:   uint64 lm_transno; */
9104 /* IDL:   uint32 lm_status; */
9105 /* IDL:   uint32 lm_flags; */
9106 /* IDL:   uint32 lm_conn_cnt; */
9107 /* IDL:   uint32 lm_bufcount; */
9108 /* IDL:   uint32 lm_buflens[0]; */
9109 /* IDL: } */
9110
9111
9112 static int
9113 lustre_dissect_element_msg_v1_lm_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9114 {
9115   /*TODO : replace with a v1 handle*/
9116   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_lustre_msg_v1_lm_handle);
9117   return offset;
9118 }
9119
9120 static int
9121 lustre_dissect_element_msg_v1_lm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9122 {
9123   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_magic);
9124
9125   return offset;
9126 }
9127
9128 static int
9129 lustre_dissect_element_msg_v1_lm_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9130 {
9131   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_type);
9132
9133   return offset;
9134 }
9135
9136 static int
9137 lustre_dissect_element_msg_v1_lm_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9138 {
9139   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_version);
9140
9141   return offset;
9142 }
9143
9144 static int
9145 lustre_dissect_element_msg_v1_lm_opc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9146 {
9147   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_opc);
9148
9149   return offset;
9150 }
9151
9152 static int
9153 lustre_dissect_element_msg_v1_lm_last_xid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9154 {
9155   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_last_xid);
9156
9157   return offset;
9158 }
9159
9160 static int
9161 lustre_dissect_element_msg_v1_lm_last_committed(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9162 {
9163   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_last_committed);
9164
9165   return offset;
9166 }
9167
9168 static int
9169 lustre_dissect_element_msg_v1_lm_transno(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9170 {
9171   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_transno);
9172
9173   return offset;
9174 }
9175
9176 static int
9177 lustre_dissect_element_msg_v1_lm_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9178 {
9179   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_status);
9180
9181   return offset;
9182 }
9183
9184 static int
9185 lustre_dissect_element_msg_v1_lm_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9186 {
9187   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_flags);
9188
9189   return offset;
9190 }
9191
9192 static int
9193 lustre_dissect_element_msg_v1_lm_conn_cnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9194 {
9195   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_conn_cnt);
9196
9197   return offset;
9198 }
9199
9200 static int
9201 lustre_dissect_element_msg_v1_lm_bufcount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9202 {
9203   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_bufcount);
9204
9205   return offset;
9206 }
9207
9208 static int
9209 lustre_dissect_element_msg_v1_lm_buflens_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9210 {
9211   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v1_lm_buflens);
9212
9213   return offset;
9214 }
9215
9216 static int
9217 lustre_dissect_element_msg_v1_lm_buflens(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9218 {
9219   guint32 bufcount ;
9220   gboolean extra_padding ;
9221   guint i;
9222
9223   bufcount=tvb_get_letohl(tvb, offset-4); /* TODO : replace with a macro */
9224
9225   if (bufcount & 1) /* we add an extra padding if bufcount is odd */
9226     extra_padding = 1 ;
9227   else
9228     extra_padding = 0 ;
9229
9230   for (i=0;i<bufcount;i++) {
9231     offset=lustre_dissect_element_msg_v1_lm_buflens_(tvb, offset, pinfo, tree);
9232   }
9233   if (extra_padding)
9234   {
9235     offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
9236   }
9237
9238   return offset;
9239 }
9240
9241
9242
9243 int
9244 lustre_dissect_struct_msg_v1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
9245 {
9246   proto_item *item = NULL;
9247   proto_tree *tree = NULL;
9248   int old_offset;
9249   guint32 opc ; /* opcode */
9250   guint32 pb_type; /* type : {request, reply, error} */
9251
9252
9253
9254   old_offset=offset;
9255   tree=parent_tree;
9256   // if (parent_tree) {
9257   //     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
9258   //     tree = proto_item_add_subtree(item, ett_lustre_lustre_msg_v1);
9259   // }
9260
9261   offset=lustre_dissect_element_msg_v1_lm_handle(tvb, offset, pinfo, tree);
9262
9263   offset=lustre_dissect_element_msg_v1_lm_magic(tvb, offset, pinfo, tree);
9264
9265   pb_type = tvb_get_letohl(tvb, offset);
9266   offset=lustre_dissect_element_msg_v1_lm_type(tvb, offset, pinfo, tree);
9267
9268   offset=lustre_dissect_element_msg_v1_lm_version(tvb, offset, pinfo, tree);
9269   opc = tvb_get_letohl(tvb, offset);
9270   offset=lustre_dissect_element_msg_v1_lm_opc(tvb, offset, pinfo, tree);
9271
9272   offset=lustre_dissect_element_msg_v1_lm_last_xid(tvb, offset, pinfo, tree);
9273
9274   offset=lustre_dissect_element_msg_v1_lm_last_committed(tvb, offset, pinfo, tree);
9275
9276   offset=lustre_dissect_element_msg_v1_lm_transno(tvb, offset, pinfo, tree);
9277
9278   offset=lustre_dissect_element_msg_v1_lm_status(tvb, offset, pinfo, tree);
9279
9280   offset=lustre_dissect_element_msg_v1_lm_flags(tvb, offset, pinfo, tree);
9281
9282   offset=lustre_dissect_element_msg_v1_lm_conn_cnt(tvb, offset, pinfo, tree);
9283
9284   offset=lustre_dissect_element_msg_v1_lm_bufcount(tvb, offset, pinfo, tree);
9285
9286   offset=lustre_dissect_element_msg_v1_lm_buflens(tvb, offset, pinfo, tree);
9287
9288
9289   proto_item_set_len(item, offset-old_offset);
9290
9291   /* display some nice infos */
9292   display_info_str(parent_tree, pinfo->cinfo, COL_INFO, val_to_str(opc, lustre_op_codes, "Unknown"));
9293   display_info_fstr(parent_tree, pinfo->cinfo,COL_INFO, " %s ", val_to_str(pb_type, lustre_LMTypes, "Unknown"));
9294
9295   offset=lustre_opcode_process(tvb, offset, pinfo, tree, opc, pb_type);
9296
9297   return offset;
9298 }
9299
9300 /* IDL: struct ptlrpc_body { */
9301 /* IDL:   struct lustre_handle { */
9302 /* IDL: } pb_handle; */
9303 /* IDL:   uint32 pb_type; */
9304 /* IDL:   uint32 pb_version; */
9305 /* IDL:   uint32 pb_opc; */
9306 /* IDL:   uint32 pb_status; */
9307 /* IDL:   uint64 pb_last_xid; */
9308 /* IDL:   uint64 pb_last_seen; */
9309 /* IDL:   uint64 pb_last_committed; */
9310 /* IDL:   uint64 pb_transno; */
9311 /* IDL:   uint32 pb_flags; */
9312 /* IDL:   uint32 pb_op_flags; */
9313 /* IDL:   uint32 pb_conn_cnt; */
9314 /* IDL:   uint32 pb_timeout; */
9315 /* IDL:   uint32 pb_service_time; */
9316 /* IDL:   uint32 pb_limit; */
9317 /* IDL:   uint64 pb_slv; */
9318 /* IDL: } */
9319
9320 static int
9321 lustre_dissect_element_ptlrpc_body_pb_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9322 {
9323   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_ptlrpc_body_pb_handle);
9324
9325   return offset;
9326 }
9327
9328 static int
9329 lustre_dissect_element_ptlrpc_body_pb_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9330 {
9331   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_type);
9332
9333   return offset;
9334 }
9335
9336 static int
9337 lustre_dissect_element_ptlrpc_body_pb_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9338 {
9339   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_version);
9340
9341   return offset;
9342 }
9343
9344 static int
9345 lustre_dissect_element_ptlrpc_body_pb_opc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9346 {
9347   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_opc);
9348
9349   return offset;
9350 }
9351
9352 static int
9353 lustre_dissect_element_ptlrpc_body_pb_status(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9354 {
9355   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_status);
9356
9357   return offset;
9358 }
9359
9360 static int
9361 lustre_dissect_element_ptlrpc_body_pb_last_xid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9362 {
9363   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_last_xid);
9364
9365   return offset;
9366 }
9367
9368 static int
9369 lustre_dissect_element_ptlrpc_body_pb_last_seen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9370 {
9371   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_last_seen);
9372
9373   return offset;
9374 }
9375
9376 static int
9377 lustre_dissect_element_ptlrpc_body_pb_last_committed(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9378 {
9379   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_last_committed);
9380
9381   return offset;
9382 }
9383
9384 static int
9385 lustre_dissect_element_ptlrpc_body_pb_transno(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9386 {
9387   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_transno);
9388
9389   return offset;
9390 }
9391
9392 static int
9393 lustre_dissect_element_ptlrpc_body_pb_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9394 {
9395   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_flags);
9396
9397   return offset;
9398 }
9399
9400 static int
9401 lustre_dissect_element_ptlrpc_body_pb_op_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9402 {
9403   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_op_flags);
9404
9405   return offset;
9406 }
9407
9408 static int
9409 lustre_dissect_element_ptlrpc_body_pb_conn_cnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9410 {
9411   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_conn_cnt);
9412
9413   return offset;
9414 }
9415
9416 static int
9417 lustre_dissect_element_ptlrpc_body_pb_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9418 {
9419   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_timeout);
9420
9421   return offset;
9422 }
9423
9424 static int
9425 lustre_dissect_element_ptlrpc_body_pb_service_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9426 {
9427   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_service_time);
9428
9429   return offset;
9430 }
9431
9432 static int
9433 lustre_dissect_element_ptlrpc_body_pb_limit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9434 {
9435   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_limit);
9436
9437   return offset;
9438 }
9439
9440 static int
9441 lustre_dissect_element_ptlrpc_body_pb_slv(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9442 {
9443   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_slv);
9444
9445   return offset;
9446 }
9447
9448 static int
9449 lustre_dissect_element_ptlrpc_body_pb_pre_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9450 {
9451   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_pre_version);
9452
9453   return offset;
9454 }
9455
9456 static int
9457 lustre_dissect_element_ptlrpc_body_pb_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9458 {
9459   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ptlrpc_body_pb_padding);
9460
9461   return offset;
9462 }
9463
9464 static int
9465 lustre_dissect_element_ptlrpc_body_pb_jobid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_)
9466 {
9467
9468   /* the lenght of the string is 32 bytes max, with  \0 inside */
9469   proto_tree_add_item(parent_tree, hf_lustre_ptlrpc_body_pb_jobid, tvb, offset, 32, TRUE);
9470
9471   offset+=32;
9472   return offset;
9473 }
9474
9475
9476 static int
9477 lustre_dissect_struct_ptlrpc_body(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_len _U_ )
9478 {
9479   proto_item *item = NULL;
9480   proto_tree *tree = NULL;
9481   int old_offset, i;
9482   guint32 opc, pb_type, pb_version;
9483
9484   old_offset=offset;
9485
9486   if (parent_tree) {
9487     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
9488     tree = proto_item_add_subtree(item, ett_lustre_ptlrpc_body);
9489   }
9490
9491   offset=lustre_dissect_element_ptlrpc_body_pb_handle(tvb, offset, pinfo, tree);
9492
9493   pb_type = tvb_get_letohl(tvb, offset);
9494   //g_print("msg_v2_lm_type_offset = %d \n" , offset) ;
9495
9496   offset=lustre_dissect_element_ptlrpc_body_pb_type(tvb, offset, pinfo, tree);
9497
9498   pb_version = tvb_get_letohl(tvb, offset) & ~LUSTRE_VERSION_MASK;
9499   //g_print("msg_v2_version_offset %d : version == %d \n", offset, pb_version);
9500   offset=lustre_dissect_element_ptlrpc_body_pb_version(tvb, offset, pinfo, tree);
9501
9502   // g_print("msg_v2_opcode_offset %d  \n", offset);
9503   opc = tvb_get_letohl(tvb, offset);
9504   offset=lustre_dissect_element_ptlrpc_body_pb_opc(tvb, offset, pinfo, tree);
9505
9506   offset=lustre_dissect_element_ptlrpc_body_pb_status(tvb, offset, pinfo, tree);
9507
9508   offset=lustre_dissect_element_ptlrpc_body_pb_last_xid(tvb, offset, pinfo, tree);
9509
9510   offset=lustre_dissect_element_ptlrpc_body_pb_last_seen(tvb, offset, pinfo, tree);
9511
9512   offset=lustre_dissect_element_ptlrpc_body_pb_last_committed(tvb, offset, pinfo, tree);
9513
9514   offset=lustre_dissect_element_ptlrpc_body_pb_transno(tvb, offset, pinfo, tree);
9515
9516   offset=lustre_dissect_element_ptlrpc_body_pb_flags(tvb, offset, pinfo, tree);
9517
9518   offset=lustre_dissect_element_ptlrpc_body_pb_op_flags(tvb, offset, pinfo, tree);
9519
9520   offset=lustre_dissect_element_ptlrpc_body_pb_conn_cnt(tvb, offset, pinfo, tree);
9521
9522   offset=lustre_dissect_element_ptlrpc_body_pb_timeout(tvb, offset, pinfo, tree);
9523
9524   offset=lustre_dissect_element_ptlrpc_body_pb_service_time(tvb, offset, pinfo, tree);
9525
9526   offset=lustre_dissect_element_ptlrpc_body_pb_limit(tvb, offset, pinfo, tree);
9527
9528   offset=lustre_dissect_element_ptlrpc_body_pb_slv(tvb, offset, pinfo, tree);
9529
9530   /* pb_pre_versions */
9531   for(i = 0; i < 4; ++i) {
9532     offset=lustre_dissect_element_ptlrpc_body_pb_pre_version(tvb, offset, pinfo, tree);
9533   }
9534
9535   for(i = 0; i < 4; ++i) {
9536     offset=lustre_dissect_element_ptlrpc_body_pb_padding(tvb, offset, pinfo, tree);
9537   }
9538
9539   if (pb_version == LUSTRE_PTLRPC_MSG_VERSION && offset-old_offset < buf_len) {
9540     offset=lustre_dissect_element_ptlrpc_body_pb_jobid(tvb, offset, pinfo, tree);
9541   }
9542
9543   if (offset-old_offset != buf_len) {
9544     g_print("ptlbody offset-old:%d buf_len:%d\n",
9545             offset-old_offset, buf_len);
9546     col_append_str(pinfo->cinfo, COL_PROTOCOL, "BUG");
9547   }
9548
9549   proto_item_set_len(item, offset-old_offset);
9550
9551   /* display some nice infos */
9552   display_info_str(parent_tree, pinfo->cinfo, COL_INFO, val_to_str(opc, lustre_op_codes, "Unknown"));
9553   display_info_fstr(parent_tree, pinfo->cinfo,COL_INFO, " %s ", val_to_str(pb_type, lustre_LMTypes, "Unknown"));
9554
9555   /* on utilise parent_tree pour bien distinguer les différents buffers (relatifs Ã  bufcount + buflen), il s'agit d'un choix de présentation */
9556   offset=lustre_opcode_process(tvb, offset, pinfo, parent_tree, opc, pb_type);
9557
9558   sanity_check(tvb,pinfo,offset-old_offset);
9559   return offset;
9560 }
9561
9562
9563
9564 /* IDL: struct lustre_msg_v2 { */
9565 /* IDL:   uint32 lm_bufcount; */
9566 /* IDL:   uint32 lm_secflvr; */
9567 /* IDL:   uint32 lm_magic; */
9568 /* IDL:   uint32 lm_repsize; */
9569 /* IDL:   uint32 lm_cksum; */
9570 /* IDL:   uint32 lm_flags; */
9571 /* IDL:   uint32 lm_padding_2; */
9572 /* IDL:   uint32 lm_padding_3; */
9573 /* IDL:   uint32 lm_buflens[0]; */
9574 /* IDL: } */
9575
9576 static int
9577 lustre_dissect_element_msg_v2_lm_bufcount(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9578 {
9579   proto_tree_add_item(tree, hf_lustre_lustre_msg_v2_lm_bufcount, tvb, offset, 4, TRUE);
9580   offset += 4 ;
9581   return offset;
9582 }
9583
9584 static int
9585 lustre_dissect_element_msg_v2_lm_secflvr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9586 {
9587   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_secflvr);
9588
9589   return offset;
9590 }
9591
9592 static int
9593 lustre_dissect_element_msg_v2_lm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9594 {
9595   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_magic);
9596
9597   return offset;
9598 }
9599
9600 static int
9601 lustre_dissect_element_msg_v2_lm_repsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9602 {
9603   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_repsize);
9604
9605   return offset;
9606 }
9607
9608 static int
9609 lustre_dissect_element_msg_v2_lm_cksum(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9610 {
9611   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_cksum);
9612
9613   return offset;
9614 }
9615
9616 static int
9617 lustre_dissect_element_msg_v2_lm_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9618 {
9619   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_flags);
9620
9621   return offset;
9622 }
9623
9624 static int
9625 lustre_dissect_element_msg_v2_lm_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9626 {
9627   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_padding_2);
9628
9629   return offset;
9630 }
9631
9632 static int
9633 lustre_dissect_element_msg_v2_lm_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9634 {
9635   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_padding_3);
9636
9637   return offset;
9638 }
9639
9640
9641
9642 static int
9643 lustre_dissect_element_msg_v2_lm_buflens_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
9644 {
9645   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lustre_msg_v2_lm_buflens);
9646
9647   return offset;
9648 }
9649
9650 int
9651 lustre_dissect_struct_msg_v2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
9652 {
9653   proto_item *item = NULL;
9654   proto_tree *tree = NULL;
9655   guint32 bufcount ;
9656   int old_offset;
9657   guint32 i ;
9658   guint32 buf_len_offset;
9659   guint32 current_buf_len ;
9660   gboolean extra_padding ;
9661
9662
9663   old_offset=offset;
9664   /* to get a light display */
9665   tree=parent_tree;
9666   //  if (parent_tree) {
9667   //      item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
9668   //      tree = proto_item_add_subtree(item, ett_lustre_lustre_msg_v2);
9669   //  }
9670
9671   bufcount = tvb_get_letohl(tvb,offset);
9672   offset=lustre_dissect_element_msg_v2_lm_bufcount(tvb, offset, pinfo, tree);
9673
9674   offset=lustre_dissect_element_msg_v2_lm_secflvr(tvb, offset, pinfo, tree);
9675
9676   offset=lustre_dissect_element_msg_v2_lm_magic(tvb, offset, pinfo, tree);
9677
9678   offset=lustre_dissect_element_msg_v2_lm_repsize(tvb, offset, pinfo, tree);
9679
9680   offset=lustre_dissect_element_msg_v2_lm_cksum(tvb, offset, pinfo, tree);
9681
9682   offset=lustre_dissect_element_msg_v2_lm_flags(tvb, offset, pinfo, tree);
9683
9684   offset=lustre_dissect_element_msg_v2_lm_padding_2(tvb, offset, pinfo, tree);
9685
9686   offset=lustre_dissect_element_msg_v2_lm_padding_3(tvb, offset, pinfo, tree);
9687
9688
9689
9690   if (bufcount & 1) /* we add an extra padding if bufcount is odd */
9691     extra_padding = 1 ;
9692   else
9693     extra_padding = 0 ;
9694
9695   buf_len_offset=offset ;
9696   for (i=0;i<bufcount;i++) {
9697     offset=lustre_dissect_element_msg_v2_lm_buflens_(tvb, offset, pinfo, tree);
9698   }
9699
9700   if (extra_padding)
9701   {
9702     offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_extra_padding);
9703   }
9704
9705   current_buf_len = tvb_get_letohl(tvb, buf_len_offset);
9706   offset=lustre_dissect_struct_ptlrpc_body(tvb,offset, pinfo, tree, hf_lustre_ptlrpc_body_pb, current_buf_len);
9707
9708   proto_item_set_len(item, offset-old_offset);
9709
9710   return offset;
9711 }
9712
9713
9714 static void
9715 dissect_lustre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
9716 {
9717   if (check_col(pinfo->cinfo, COL_PROTOCOL))
9718     col_set_str(pinfo->cinfo, COL_PROTOCOL, "Lustre");
9719
9720   /*light display*/
9721   if (check_col(pinfo->cinfo, COL_INFO))
9722     col_set_str(pinfo->cinfo, COL_INFO, "");
9723   /*    guint32 magic_number ; */
9724   /*    magic_number = tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET);   */
9725   /*    switch (magic_number)*/
9726   /*    {*/
9727   /*        case LUSTRE_MSG_MAGIC_V1:*/
9728   /*            col_append_fstr(pinfo->cinfo, COL_INFO, " V1 ");*/
9729   /*            break;*/
9730   /*        case LUSTRE_MSG_MAGIC_V2:*/
9731   /*            col_append_fstr(pinfo->cinfo, COL_INFO, " V2 ");*/
9732   /*            break;*/
9733   /*        default:*/
9734   /*            break;*/
9735   /*    }*/
9736
9737   if (tree) {
9738
9739     guint32 magic_number ;
9740     guint32 offset = 0;
9741     proto_item *ti  = NULL ;
9742     proto_tree * lustre_tree = NULL ;
9743
9744     ti = proto_tree_add_item(tree,proto_lustre,tvb,0,-1,FALSE);
9745     lustre_tree = proto_item_add_subtree(ti,ett_lustre);
9746
9747     magic_number = tvb_get_letohl(tvb, 8);
9748
9749     switch (magic_number){
9750       case LUSTRE_MSG_MAGIC_V1:
9751         /* put some nice info*/
9752         proto_item_append_text(lustre_tree, " V1 ");
9753         offset=lustre_dissect_struct_msg_v1(tvb, offset, pinfo, lustre_tree, proto_lustre ) ;
9754         break;
9755       case LUSTRE_MSG_MAGIC_V2:
9756         /* put some nice info*/
9757         proto_item_append_text(lustre_tree, " V2 ");
9758         offset=lustre_dissect_struct_msg_v2(tvb, offset, pinfo, lustre_tree,  proto_lustre ) ;
9759         break;
9760       default:
9761         break;
9762     }
9763   }
9764 }
9765
9766 void proto_register_dcerpc_lustre(void)
9767 {
9768   static hf_register_info hf[] = {
9769     { &hf_lustre_mdt_body,
9770       { "mdt body", "lustre.mdt_body", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
9771     { &hf_lustre_mdt_body_fid1,
9772       { "Fid1", "lustre.mdt_body.fid1", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9773     { &hf_lustre_mdt_body_fid2,
9774       { "Fid2", "lustre.mdt_body.fid2", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9775     { &hf_lustre_mdt_body_handle,
9776       { "Handle", "lustre.mdt_body.handle", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9777     { &hf_lustre_mdt_body_valid,
9778       { "Valid", "lustre.mdt_body.valid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9779     { &hf_lustre_mdt_body_size,
9780       { "Size", "lustre.mdt_body.size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9781     { &hf_lustre_mdt_body_mtime,
9782       { "Mtime", "lustre.mdt_body.mtime",FT_ABSOLUTE_TIME,
9783                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9784     { &hf_lustre_mdt_body_atime,
9785       { "Atime", "lustre.mdt_body.atime",FT_ABSOLUTE_TIME,
9786                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9787     { &hf_lustre_mdt_body_ctime,
9788       { "Ctime", "lustre.mdt_body.ctime",FT_ABSOLUTE_TIME,
9789                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9790     { &hf_lustre_mdt_body_blocks,
9791       { "Blocks", "lustre.mdt_body.blocks", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9792     { &hf_lustre_mdt_body_ioepoch,
9793       { "Ioepoch", "lustre.mdt_body.ioepoch", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9794     { &hf_lustre_mdt_body_ino,
9795       { "Ino", "lustre.mdt_body.ino", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9796     { &hf_lustre_mdt_body_fsuid,
9797       { "Fsuid", "lustre.mdt_body.fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9798     { &hf_lustre_mdt_body_fsgid,
9799       { "Fsgid", "lustre.mdt_body.fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9800     { &hf_lustre_mdt_body_capability,
9801       { "Capability", "lustre.mdt_body.capability", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9802     { &hf_lustre_mdt_body_mode,
9803       { "Mode", "lustre.mdt_body.mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
9804     { &hf_lustre_mdt_body_uid,
9805       { "Uid", "lustre.mdt_body.uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9806     { &hf_lustre_mdt_body_gid,
9807       { "Gid", "lustre.mdt_body.gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9808     { &hf_lustre_mdt_body_flags,
9809       { "Flags", "lustre.mdt_body.flags", FT_UINT32, BASE_HEX, VALS(lustre_mds_flags_vals) , 0, "", HFILL }},
9810     { &hf_lustre_mdt_body_rdev,
9811       { "Rdev", "lustre.mdt_body.rdev", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9812     { &hf_lustre_mdt_body_nlink,
9813       { "Nlink", "lustre.mdt_body.nlink", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9814     { &hf_lustre_mdt_body_generation,
9815       { "Generation", "lustre.mdt_body.generation", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9816     { &hf_lustre_mdt_body_suppgid,
9817       { "Suppgid", "lustre.mdt_body.suppgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9818     { &hf_lustre_mdt_body_eadatasize,
9819       { "Eadatasize", "lustre.mdt_body.eadatasize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9820     { &hf_lustre_mdt_body_aclsize,
9821       { "Aclsize", "lustre.mdt_body.aclsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9822     { &hf_lustre_mdt_body_max_mdsize,
9823       { "Max Mdsize", "lustre.mdt_body.max_mdsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9824     { &hf_lustre_mdt_body_max_cookiesize,
9825       { "Max Cookiesize", "lustre.mdt_body.max_cookiesize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9826     { &hf_lustre_mdt_body_uid_h,
9827       { "Uid H", "lustre.mdt_body.uid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9828     { &hf_lustre_mdt_body_gid_h,
9829       { "Gid H", "lustre.mdt_body.gid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9830     { &hf_lustre_mdt_body_padding_5,
9831       { "Padding 5", "lustre.mdt_body.padding_5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9832     { &hf_lustre_mdt_body_padding_6,
9833       { "Padding 6", "lustre.mdt_body.padding_6", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9834     { &hf_lustre_mdt_body_padding_7,
9835       { "Padding 7", "lustre.mdt_body.padding_7", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9836     { &hf_lustre_mdt_body_padding_8,
9837       { "Padding 8", "lustre.mdt_body.padding_8", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9838     { &hf_lustre_mdt_body_padding_9,
9839       { "Padding 9", "lustre.mdt_body.padding_9", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9840     { &hf_lustre_mdt_body_padding_10,
9841       { "Padding 10", "lustre.mdt_body.padding_10", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9842
9843     { &hf_lustre_mdt_rec_setattr,
9844       { "mdt rec setattr", "lustre.mdt_rec_setattr", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
9845     { &hf_lustre_mdt_rec_setattr_sa_opcode,
9846       { "Sa Opcode", "lustre.mdt_rec_setattr.sa_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals), 0, "", HFILL }},
9847     { &hf_lustre_mdt_rec_setattr_sa_cap,
9848       { "Sa Cap", "lustre.mdt_rec_setattr.sa_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9849     { &hf_lustre_mdt_rec_setattr_sa_fsuid,
9850       { "Sa Fsuid", "lustre.mdt_rec_setattr.sa_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9851     { &hf_lustre_mdt_rec_setattr_sa_fsuid_h,
9852       { "Sa Fsuid H", "lustre.mdt_rec_setattr.sa_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9853     { &hf_lustre_mdt_rec_setattr_sa_fsgid,
9854       { "Sa Fsgid", "lustre.mdt_rec_setattr.sa_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9855     { &hf_lustre_mdt_rec_setattr_sa_fsgid_h,
9856       { "Sa Fsgid H", "lustre.mdt_rec_setattr.sa_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9857     { &hf_lustre_mdt_rec_setattr_sa_suppgid,
9858       { "Sa Suppgid", "lustre.mdt_rec_setattr.sa_suppgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9859     { &hf_lustre_mdt_rec_setattr_sa_suppgid_h,
9860       { "Sa Suppgid H", "lustre.mdt_rec_setattr.sa_suppgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9861     { &hf_lustre_mdt_rec_setattr_sa_padding_1,
9862       { "Sa Padding 1", "lustre.mdt_rec_setattr.sa_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9863     { &hf_lustre_mdt_rec_setattr_sa_padding_1_h,
9864       { "Sa Padding 1 H", "lustre.mdt_rec_setattr.sa_padding_1_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9865     { &hf_lustre_mdt_rec_setattr_sa_fid,
9866       { "Sa Fid", "lustre.mdt_rec_setattr.sa_fid", FT_NONE,
9867                     BASE_NONE, NULL, 0, "", HFILL } },
9868     { &hf_lustre_mdt_rec_setattr_sa_valid,
9869       { "Sa Valid", "lustre.mdt_rec_setattr.sa_valid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9870     { &hf_lustre_mdt_rec_setattr_sa_uid,
9871       { "Sa Uid", "lustre.mdt_rec_setattr.sa_uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9872     { &hf_lustre_mdt_rec_setattr_sa_gid,
9873       { "Sa Gid", "lustre.mdt_rec_setattr.sa_gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9874     { &hf_lustre_mdt_rec_setattr_sa_size,
9875       { "Sa Size", "lustre.mdt_rec_setattr.sa_size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9876     { &hf_lustre_mdt_rec_setattr_sa_blocks,
9877       { "Sa Blocks", "lustre.mdt_rec_setattr.sa_blocks", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9878     { &hf_lustre_mdt_rec_setattr_sa_mtime,
9879       { "Sa Mtime", "lustre.mdt_rec_setattr.sa_mtime",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9880     { &hf_lustre_mdt_rec_setattr_sa_atime,
9881       { "Sa Atime", "lustre.mdt_rec_setattr.sa_atime",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9882     { &hf_lustre_mdt_rec_setattr_sa_ctime,
9883       { "Sa Ctime", "lustre.mdt_rec_setattr.sa_ctime",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9884     { &hf_lustre_mdt_rec_setattr_sa_attr_flags,
9885       { "Sa Attr Flags", "lustre.mdt_rec_setattr.sa_attr_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9886     { &hf_lustre_mdt_rec_setattr_sa_mode,
9887       { "Sa Mode", "lustre.mdt_rec_setattr.sa_mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
9888     { &hf_lustre_mdt_rec_setattr_sa_padding_2,
9889       { "Sa Padding 2", "lustre.mdt_rec_setattr.sa_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9890     { &hf_lustre_mdt_rec_setattr_sa_padding_3,
9891       { "Sa Padding 3", "lustre.mdt_rec_setattr.sa_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9892     { &hf_lustre_mdt_rec_setattr_sa_padding_4,
9893       { "Sa Padding 4", "lustre.mdt_rec_setattr.sa_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9894     { &hf_lustre_mdt_rec_setattr_sa_padding_5,
9895       { "Sa Padding 5", "lustre.mdt_rec_setattr.sa_padding_5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9896
9897     { &hf_lustre_mdt_rec_create,
9898       { "mdt rec create", "lustre.mdt_rec_create", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
9899     { &hf_lustre_mdt_rec_create_cr_opcode,
9900       { "Cr Opcode", "lustre.mdt_rec_create.cr_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals), 0, "", HFILL }},
9901     { &hf_lustre_mdt_rec_create_cr_cap,
9902       { "Cr Cap", "lustre.mdt_rec_create.cr_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9903     { &hf_lustre_mdt_rec_create_cr_fsuid,
9904       { "Cr Fsuid", "lustre.mdt_rec_create.cr_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9905     { &hf_lustre_mdt_rec_create_cr_fsuid_h,
9906       { "Cr Fsuid H", "lustre.mdt_rec_create.cr_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9907     { &hf_lustre_mdt_rec_create_cr_fsgid,
9908       { "Cr Fsgid", "lustre.mdt_rec_create.cr_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9909     { &hf_lustre_mdt_rec_create_cr_fsgid_h,
9910       { "Cr Fsgid H", "lustre.mdt_rec_create.cr_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9911     { &hf_lustre_mdt_rec_create_cr_suppgid1,
9912       { "Cr Suppgid1", "lustre.mdt_rec_create.cr_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9913     { &hf_lustre_mdt_rec_create_cr_suppgid1_h,
9914       { "Cr Suppgid1 H", "lustre.mdt_rec_create.cr_suppgid1_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9915     { &hf_lustre_mdt_rec_create_cr_suppgid2,
9916       { "Cr Suppgid2", "lustre.mdt_rec_create.cr_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9917     { &hf_lustre_mdt_rec_create_cr_suppgid2_h,
9918       { "Cr Suppgid2 H", "lustre.mdt_rec_create.cr_suppgid2_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9919     { &hf_lustre_mdt_rec_create_cr_fid1,
9920       { "Cr Fid1", "lustre.mdt_rec_create.cr_fid1", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9921     { &hf_lustre_mdt_rec_create_cr_fid2,
9922       { "Cr Fid2", "lustre.mdt_rec_create.cr_fid2", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9923     { &hf_lustre_mdt_rec_create_cr_old_handle,
9924       { "Cr Old Handle", "lustre.mdt_rec_create.cr_old_handle", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
9925     { &hf_lustre_mdt_rec_create_cr_time,
9926       { "Cr Time", "lustre.mdt_rec_create.cr_time",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9927     { &hf_lustre_mdt_rec_create_cr_rdev,
9928       { "Cr Rdev", "lustre.mdt_rec_create.cr_rdev", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9929     { &hf_lustre_mdt_rec_create_cr_ioepoch,
9930       { "Cr Ioepoch", "lustre.mdt_rec_create.cr_ioepoch", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9931     { &hf_lustre_mdt_rec_create_cr_padding_1,
9932       { "Cr Padding 1", "lustre.mdt_rec_create.cr_padding_1", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
9933     { &hf_lustre_mdt_rec_create_cr_mode,
9934       { "Cr Mode", "lustre.mdt_rec_create.cr_mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
9935     { &hf_lustre_mdt_rec_create_cr_bias,
9936       { "Cr Bias", "lustre.mdt_rec_create.cr_bias", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9937     { &hf_lustre_mdt_rec_create_cr_flags_l,
9938       { "Cr Flags L", "lustre.mdt_rec_create.cr_flags_l", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9939     { &hf_lustre_mdt_rec_create_cr_flags_h,
9940       { "Cr Flags H", "lustre.mdt_rec_create.cr_flags_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9941     { &hf_lustre_mdt_rec_create_cr_umask,
9942       { "Cr Umask", "lustre.mdt_rec_create.cr_umask", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
9943     { &hf_lustre_mdt_rec_create_cr_padding_4,
9944       { "Cr Padding 4", "lustre.mdt_rec_create.cr_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9945
9946     { &hf_lustre_mdt_rec_link,
9947       { "mdt rec link", "lustre.mdt_rec_link", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
9948     { &hf_lustre_mdt_rec_link_lk_opcode,
9949       { "Lk Opcode", "lustre.mdt_rec_link.lk_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals) , 0, "", HFILL }},
9950     { &hf_lustre_mdt_rec_link_lk_cap,
9951       { "Lk Cap", "lustre.mdt_rec_link.lk_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9952     { &hf_lustre_mdt_rec_link_lk_fsuid,
9953       { "Lk Fsuid", "lustre.mdt_rec_link.lk_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9954     { &hf_lustre_mdt_rec_link_lk_fsuid_h,
9955       { "Lk Fsuid H", "lustre.mdt_rec_link.lk_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9956     { &hf_lustre_mdt_rec_link_lk_fsgid,
9957       { "Lk Fsgid", "lustre.mdt_rec_link.lk_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9958     { &hf_lustre_mdt_rec_link_lk_fsgid_h,
9959       { "Lk Fsgid H", "lustre.mdt_rec_link.lk_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9960     { &hf_lustre_mdt_rec_link_lk_suppgid1,
9961       { "Lk Suppgid1", "lustre.mdt_rec_link.lk_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9962     { &hf_lustre_mdt_rec_link_lk_suppgid1_h,
9963       { "Lk Suppgid1 H", "lustre.mdt_rec_link.lk_suppgid1_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9964     { &hf_lustre_mdt_rec_link_lk_suppgid2,
9965       { "Lk Suppgid2", "lustre.mdt_rec_link.lk_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9966     { &hf_lustre_mdt_rec_link_lk_suppgid2_h,
9967       { "Lk Suppgid2 H", "lustre.mdt_rec_link.lk_suppgid2_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9968     { &hf_lustre_mdt_rec_link_lk_fid1,
9969       { "Lk Fid1", "lustre.mdt_rec_link.lk_fid1", FT_NONE,
9970                     BASE_NONE, NULL, 0, "", HFILL } },
9971     { &hf_lustre_mdt_rec_link_lk_fid2,
9972       { "Lk Fid2", "lustre.mdt_rec_link.lk_fid2", FT_NONE,
9973                     BASE_NONE, NULL, 0, "", HFILL } },
9974     { &hf_lustre_mdt_rec_link_lk_time,
9975       { "Lk Time", "lustre.mdt_rec_link.lk_time",FT_ABSOLUTE_TIME,
9976                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
9977     { &hf_lustre_mdt_rec_link_lk_padding_1,
9978       { "Lk Padding 1", "lustre.mdt_rec_link.lk_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9979     { &hf_lustre_mdt_rec_link_lk_padding_2,
9980       { "Lk Padding 2", "lustre.mdt_rec_link.lk_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9981     { &hf_lustre_mdt_rec_link_lk_padding_3,
9982       { "Lk Padding 3", "lustre.mdt_rec_link.lk_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9983     { &hf_lustre_mdt_rec_link_lk_padding_4,
9984       { "Lk Padding 4", "lustre.mdt_rec_link.lk_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9985     { &hf_lustre_mdt_rec_link_lk_bias,
9986       { "Lk Bias", "lustre.mdt_rec_link.lk_bias", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9987     { &hf_lustre_mdt_rec_link_lk_padding_5,
9988       { "Lk Padding 5", "lustre.mdt_rec_link.lk_padding_5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9989     { &hf_lustre_mdt_rec_link_lk_padding_6,
9990       { "Lk Padding 6", "lustre.mdt_rec_link.lk_padding_6", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9991     { &hf_lustre_mdt_rec_link_lk_padding_7,
9992       { "Lk Padding 7", "lustre.mdt_rec_link.lk_padding_7", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9993     { &hf_lustre_mdt_rec_link_lk_padding_8,
9994       { "Lk Padding 8", "lustre.mdt_rec_link.lk_padding_8", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9995     { &hf_lustre_mdt_rec_link_lk_padding_9,
9996       { "Lk Padding 9", "lustre.mdt_rec_link.lk_padding_9", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
9997
9998     { &hf_lustre_mdt_rec_unlink,
9999       { "mdt rec unlink", "lustre.mdt_rec_unlink", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10000     { &hf_lustre_mdt_rec_unlink_ul_opcode,
10001       { "Ul Opcode", "lustre.mdt_rec_unlink.ul_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals) , 0, "", HFILL }},
10002     { &hf_lustre_mdt_rec_unlink_ul_cap,
10003       { "Ul Cap", "lustre.mdt_rec_unlink.ul_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10004     { &hf_lustre_mdt_rec_unlink_ul_fsuid,
10005       { "Ul Fsuid", "lustre.mdt_rec_unlink.ul_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10006     { &hf_lustre_mdt_rec_unlink_ul_fsuid_h,
10007       { "Ul Fsuid H", "lustre.mdt_rec_unlink.ul_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10008     { &hf_lustre_mdt_rec_unlink_ul_fsgid,
10009       { "Ul Fsgid", "lustre.mdt_rec_unlink.ul_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10010     { &hf_lustre_mdt_rec_unlink_ul_fsgid_h,
10011       { "Ul Fsgid H", "lustre.mdt_rec_unlink.ul_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10012     { &hf_lustre_mdt_rec_unlink_ul_suppgid1,
10013       { "Ul Suppgid1", "lustre.mdt_rec_unlink.ul_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10014     { &hf_lustre_mdt_rec_unlink_ul_suppgid1_h,
10015       { "Ul Suppgid1 H", "lustre.mdt_rec_unlink.ul_suppgid1_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10016     { &hf_lustre_mdt_rec_unlink_ul_suppgid2,
10017       { "Ul Suppgid2", "lustre.mdt_rec_unlink.ul_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10018     { &hf_lustre_mdt_rec_unlink_ul_suppgid2_h,
10019       { "Ul Suppgid2 H", "lustre.mdt_rec_unlink.ul_suppgid2_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10020     { &hf_lustre_mdt_rec_unlink_ul_fid1,
10021       { "Ul Fid1", "lustre.mdt_rec_unlink.ul_fid1", FT_NONE,
10022                     BASE_NONE, NULL, 0, "", HFILL } },
10023     { &hf_lustre_mdt_rec_unlink_ul_fid2,
10024       { "Ul Fid2", "lustre.mdt_rec_unlink.ul_fid2", FT_NONE,
10025                     BASE_NONE, NULL, 0, "", HFILL } },
10026     { &hf_lustre_mdt_rec_unlink_ul_time,
10027       { "Ul Time", "lustre.mdt_rec_unlink.ul_time",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10028     { &hf_lustre_mdt_rec_unlink_ul_padding_2,
10029       { "Ul Padding 2", "lustre.mdt_rec_unlink.ul_padding_2", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10030     { &hf_lustre_mdt_rec_unlink_ul_padding_3,
10031       { "Ul Padding 3", "lustre.mdt_rec_unlink.ul_padding_3", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10032     { &hf_lustre_mdt_rec_unlink_ul_padding_4,
10033       { "Ul Padding 4", "lustre.mdt_rec_unlink.ul_padding_4", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10034     { &hf_lustre_mdt_rec_unlink_ul_padding_5,
10035       { "Ul Padding 5", "lustre.mdt_rec_unlink.ul_padding_5", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10036     { &hf_lustre_mdt_rec_unlink_ul_bias,
10037       { "Ul Bias", "lustre.mdt_rec_unlink.ul_bias", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10038     { &hf_lustre_mdt_rec_unlink_ul_mode,
10039       { "Ul Mode", "lustre.mdt_rec_unlink.ul_mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
10040     { &hf_lustre_mdt_rec_unlink_ul_padding_6,
10041       { "Ul Padding 6", "lustre.mdt_rec_unlink.ul_padding_6", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10042     { &hf_lustre_mdt_rec_unlink_ul_padding_7,
10043       { "Ul Padding 7", "lustre.mdt_rec_unlink.ul_padding_7", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10044     { &hf_lustre_mdt_rec_unlink_ul_padding_8,
10045       { "Ul Padding 8", "lustre.mdt_rec_unlink.ul_padding_8", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10046     { &hf_lustre_mdt_rec_unlink_ul_padding_9,
10047       { "Ul Padding 9", "lustre.mdt_rec_unlink.ul_padding_9", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10048
10049     { &hf_lustre_mdt_rec_rename,
10050       { "mdt rec rename", "lustre.mdt_rec_rename", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10051     { &hf_lustre_mdt_rec_rename_rn_opcode,
10052       { "Rn Opcode", "lustre.mdt_rec_rename.rn_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals) , 0, "", HFILL }},
10053     { &hf_lustre_mdt_rec_rename_rn_cap,
10054       { "Rn Cap", "lustre.mdt_rec_rename.rn_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10055     { &hf_lustre_mdt_rec_rename_rn_fsuid,
10056       { "Rn Fsuid", "lustre.mdt_rec_rename.rn_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10057     { &hf_lustre_mdt_rec_rename_rn_fsuid_h,
10058       { "Rn Fsuid H", "lustre.mdt_rec_rename.rn_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10059     { &hf_lustre_mdt_rec_rename_rn_fsgid,
10060       { "Rn Fsgid", "lustre.mdt_rec_rename.rn_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10061     { &hf_lustre_mdt_rec_rename_rn_fsgid_h,
10062       { "Rn Fsgid H", "lustre.mdt_rec_rename.rn_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10063     { &hf_lustre_mdt_rec_rename_rn_suppgid1,
10064       { "Rn Suppgid1", "lustre.mdt_rec_rename.rn_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10065     { &hf_lustre_mdt_rec_rename_rn_suppgid1_h,
10066       { "Rn Suppgid1 H", "lustre.mdt_rec_rename.rn_suppgid1_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10067     { &hf_lustre_mdt_rec_rename_rn_suppgid2,
10068       { "Rn Suppgid2", "lustre.mdt_rec_rename.rn_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10069     { &hf_lustre_mdt_rec_rename_rn_suppgid2_h,
10070       { "Rn Suppgid2 H", "lustre.mdt_rec_rename.rn_suppgid2_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10071     { &hf_lustre_mdt_rec_rename_rn_fid1,
10072       { "Rn Fid1", "lustre.mdt_rec_rename.rn_fid1", FT_NONE,
10073                     BASE_NONE, NULL, 0, "", HFILL } },
10074     { &hf_lustre_mdt_rec_rename_rn_fid2,
10075       { "Rn Fid2", "lustre.mdt_rec_rename.rn_fid2", FT_NONE,
10076                     BASE_NONE, NULL, 0, "", HFILL } },
10077     { &hf_lustre_mdt_rec_rename_rn_time,
10078       { "Rn Time", "lustre.mdt_rec_rename.rn_time",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10079     { &hf_lustre_mdt_rec_rename_rn_padding_1,
10080       { "Rn Padding 1", "lustre.mdt_rec_rename.rn_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10081     { &hf_lustre_mdt_rec_rename_rn_padding_2,
10082       { "Rn Padding 2", "lustre.mdt_rec_rename.rn_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10083     { &hf_lustre_mdt_rec_rename_rn_padding_3,
10084       { "Rn Padding 3", "lustre.mdt_rec_rename.rn_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10085     { &hf_lustre_mdt_rec_rename_rn_padding_4,
10086       { "Rn Padding 4", "lustre.mdt_rec_rename.rn_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10087     { &hf_lustre_mdt_rec_rename_rn_bias,
10088       { "Rn Bias", "lustre.mdt_rec_rename.rn_bias", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10089     { &hf_lustre_mdt_rec_rename_rn_mode,
10090       { "Rn Mode", "lustre.mdt_rec_rename.rn_mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
10091     { &hf_lustre_mdt_rec_rename_rn_padding_5,
10092       { "Rn Padding 5", "lustre.mdt_rec_rename.rn_padding_5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10093     { &hf_lustre_mdt_rec_rename_rn_padding_6,
10094       { "Rn Padding 6", "lustre.mdt_rec_rename.rn_padding_6", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10095     { &hf_lustre_mdt_rec_rename_rn_padding_7,
10096       { "Rn Padding 7", "lustre.mdt_rec_rename.rn_padding_7", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10097     { &hf_lustre_mdt_rec_rename_rn_padding_8,
10098       { "Rn Padding 8", "lustre.mdt_rec_rename.rn_padding_8", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10099
10100     { &hf_lustre_mdt_rec_setxattr,
10101       { "mdt rec setxattr", "lustre.mdt_rec_setxattr", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10102     { &hf_lustre_mdt_rec_setxattr_sx_opcode,
10103       { "Sx Opcode", "lustre.mdt_rec_setxattr.sx_opcode", FT_UINT32, BASE_DEC, VALS(lustre_mds_reint_t_vals), 0, "", HFILL }},
10104     { &hf_lustre_mdt_rec_setxattr_sx_cap,
10105       { "Sx Cap", "lustre.mdt_rec_setxattr.sx_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10106     { &hf_lustre_mdt_rec_setxattr_sx_fsuid,
10107       { "Sx Fsuid", "lustre.mdt_rec_setxattr.sx_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10108     { &hf_lustre_mdt_rec_setxattr_sx_fsuid_h,
10109       { "Sx Fsuid H", "lustre.mdt_rec_setxattr.sx_fsuid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10110     { &hf_lustre_mdt_rec_setxattr_sx_fsgid,
10111       { "Sx Fsgid", "lustre.mdt_rec_setxattr.sx_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10112     { &hf_lustre_mdt_rec_setxattr_sx_fsgid_h,
10113       { "Sx Fsgid H", "lustre.mdt_rec_setxattr.sx_fsgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10114     { &hf_lustre_mdt_rec_setxattr_sx_suppgid1,
10115       { "Sx Suppgid1", "lustre.mdt_rec_setxattr.sx_suppgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10116     { &hf_lustre_mdt_rec_setxattr_sx_suppgid1_h,
10117       { "Sx Suppgid1 H", "lustre.mdt_rec_setxattr.sx_suppgid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10118     { &hf_lustre_mdt_rec_setxattr_sx_suppgid2,
10119       { "Sx Suppgid2", "lustre.mdt_rec_setxattr.sx_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10120     { &hf_lustre_mdt_rec_setxattr_sx_suppgid2_h,
10121       { "Sx Suppgid2 H", "lustre.mdt_rec_setxattr.sx_suppgid2_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10122     { &hf_lustre_mdt_rec_setxattr_sx_fid,
10123       { "Sx Fid", "lustre.mdt_rec_setxattr.sx_fid", FT_NONE,
10124                     BASE_NONE, NULL, 0, "", HFILL } },
10125     { &hf_lustre_mdt_rec_setxattr_sx_padding_1,
10126       { "Sx Padding 1", "lustre.mdt_rec_setxattr.sx_padding_1", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10127     { &hf_lustre_mdt_rec_setxattr_sx_padding_2,
10128       { "Sx Padding 2", "lustre.mdt_rec_setxattr.sx_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10129     { &hf_lustre_mdt_rec_setxattr_sx_padding_3,
10130       { "Sx Padding 3", "lustre.mdt_rec_setxattr.sx_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10131     { &hf_lustre_mdt_rec_setxattr_sx_valid,
10132       { "Sx Valid", "lustre.mdt_rec_setxattr.sx_valid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10133     { &hf_lustre_mdt_rec_setxattr_sx_time,
10134       { "Sx Time", "lustre.mdt_rec_setxattr.sx_time",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10135     { &hf_lustre_mdt_rec_setxattr_sx_padding_5,
10136       { "Sx Padding 5", "lustre.mdt_rec_setxattr.sx_padding_5", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10137     { &hf_lustre_mdt_rec_setxattr_sx_padding_6,
10138       { "Sx Padding 6", "lustre.mdt_rec_setxattr.sx_padding_6", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10139     { &hf_lustre_mdt_rec_setxattr_sx_padding_7,
10140       { "Sx Padding 7", "lustre.mdt_rec_setxattr.sx_padding_7", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10141     { &hf_lustre_mdt_rec_setxattr_sx_size,
10142       { "Sx Size", "lustre.mdt_rec_setxattr.sx_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10143     { &hf_lustre_mdt_rec_setxattr_sx_flags,
10144       { "Sx Flags", "lustre.mdt_rec_setxattr.sx_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10145     { &hf_lustre_mdt_rec_setxattr_sx_padding_8,
10146       { "Sx Padding 8", "lustre.mdt_rec_setxattr.sx_padding_8", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10147     { &hf_lustre_mdt_rec_setxattr_sx_padding_9,
10148       { "Sx Padding 9", "lustre.mdt_rec_setxattr.sx_padding_9", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10149     { &hf_lustre_mdt_rec_setxattr_sx_padding_10,
10150       { "Sx Padding 10", "lustre.mdt_rec_setxattr.sx_padding_10", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10151     { &hf_lustre_mdt_rec_setxattr_sx_padding_11,
10152       { "Sx Padding 11", "lustre.mdt_rec_setxattr.sx_padding_11", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10153
10154     { &hf_lustre_lustre_handle_cookie,
10155       { "Cookie", "lustre.lustre_handle.cookie", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10156     { &hf_lustre_ptlrpc_body_pb_last_committed,
10157       { "Pb Last Committed", "lustre.ptlrpc_body.pb_last_committed", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10158     { &hf_lustre_ptlrpc_body_pb_version,
10159       { "Pb Version", "lustre.ptlrpc_body.pb_version", FT_UINT32, BASE_DEC, NULL, ~LUSTRE_VERSION_MASK, "", HFILL }},
10160     { &hf_lustre_lustre_msg_v1_lm_bufcount,
10161       { "Lm Bufcount", "lustre.lustre_msg_v1.lm_bufcount", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10162     { &hf_lustre_obd_ioobj_ioo_id,
10163       { "Ioo Id", "lustre.obd_ioobj.ioo_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10164     { &hf_lustre_ptlrpc_body_pb_slv,
10165       { "Pb Slv", "lustre.ptlrpc_body.pb_slv", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10166
10167     { &hf_lustre_ptlrpc_body_pb_pre_version,
10168       { "Pb Pre-Version", "lustre.ptlrpc_body.pb_pre_version", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10169     { &hf_lustre_ptlrpc_body_pb_padding,
10170       { "Pb Padding", "lustre.ptlrpc_body.pb_padding", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10171     { &hf_lustre_ptlrpc_body_pb_jobid,
10172       { "Pb JobId", "lustre.ptlrpc_body.pb_jobid", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10173
10174     { &hf_lustre_lustre_msg_v1_lm_handle,
10175       { "Lm Handle", "lustre.lustre_msg_v1.lm_handle", FT_NONE,
10176                     BASE_NONE, NULL, 0, "", HFILL } },
10177     { &hf_lustre_ost_lvb_lvb_atime,
10178       { "Lvb Atime", "lustre.ost_lvb.lvb_atime",FT_ABSOLUTE_TIME,
10179                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10180     { &hf_lustre_ptlrpc_body_pb_timeout,
10181       { "Pb Timeout", "lustre.ptlrpc_body.pb_timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10182     { &hf_lustre_obd_statfs_os_bavail,
10183       { "Os Bavail", "lustre.obd_statfs.os_bavail", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10184     { &hf_lustre_obd_statfs_os_bsize,
10185       { "Os Bsize", "lustre.obd_statfs.os_bsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10186     { &hf_lustre_lustre_msg_v2_lm_repsize,
10187       { "Lm Repsize", "lustre.lustre_msg_v2.lm_repsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10188     { &hf_lustre_lov_mds_md_v1_lmm_stripe_size,
10189       { "Lmm Stripe Size", "lustre.lov_mds_md_v1.lmm_stripe_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10190     { &hf_lustre_lustre_msg_v1_lm_last_xid,
10191       { "Lm Last Xid", "lustre.lustre_msg_v1.lm_last_xid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10192     { &hf_lustre_ll_fid_f_type,
10193       { "F Type", "lustre.ll_fid.f_type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10194     { &hf_lustre_lustre_msg_v2_lm_cksum,
10195       { "Lm Cksum", "lustre.lustre_msg_v2.lm_cksum", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10196     { &hf_lustre_lustre_msg_v2_lm_buflens,
10197       { "Lm Buflens", "lustre.lustre_msg_v2.lm_buflens", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10198     { &hf_lustre_lustre_msg_v1_lm_status,
10199       { "Lm Status", "lustre.lustre_msg_v1.lm_status", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10200     { &hf_lustre_lustre_msg_v1_lm_type,
10201       { "Lm Type", "lustre.lustre_msg_v1.lm_type", FT_UINT32, BASE_DEC, VALS(lustre_LMTypes), 0, "", HFILL }},
10202     { &hf_lustre_niobuf_remote_len,
10203       { "Len", "lustre.niobuf_remote.len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10204     { &hf_lustre_lov_mds_md_v1_lmm_magic,
10205       { "Lmm Magic", "lustre.lov_mds_md_v1.lmm_magic", FT_UINT32, BASE_HEX, VALS(lustre_lov_magic) , 0, "", HFILL }},
10206     { &hf_lustre_ptlrpc_body_pb_op_flags,
10207       { "Pb Op Flags", "lustre.ptlrpc_body.pb_op_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10208     { &hf_lustre_ost_lvb_lvb_ctime,
10209       { "Lvb Ctime", "lustre.ost_lvb.lvb_ctime",FT_ABSOLUTE_TIME,
10210                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10211     { &hf_lustre_ptlrpc_body_pb_type,
10212       { "Pb Type", "lustre.ptlrpc_body.pb_type", FT_UINT32, BASE_DEC, VALS(lustre_LMTypes), 0, "", HFILL }},
10213     { &hf_lustre_obd_connect_data_ocd_nllg,
10214       { "Ocd Nllg", "lustre.obd_connect_data.ocd_nllg", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10215     { &hf_lustre_obd_connect_data_ocd_nllu,
10216       { "Ocd Nllu", "lustre.obd_connect_data.ocd_nllu", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10217     { &hf_lustre_ll_fid_generation,
10218       { "Generation", "lustre.ll_fid.generation", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10219     { &hf_lustre_ost_lvb_lvb_mtime,
10220       { "Lvb Mtime", "lustre.ost_lvb.lvb_mtime",FT_ABSOLUTE_TIME,
10221                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10222     { &hf_lustre_obd_connect_data_ocd_ibits_known,
10223       { "Ocd Ibits Known", "lustre.obd_connect_data.ocd_ibits_known", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10224     { &hf_lustre_lustre_msg_v2_lm_padding_3,
10225       { "Lm Padding 3", "lustre.lustre_msg_v2.lm_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10226     { &hf_lustre_ptlrpc_body_pb_flags,
10227       { "Pb Flags", "lustre.ptlrpc_body.pb_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10228     { &hf_lustre_obd_statfs_os_spare4,
10229       { "Os Spare4", "lustre.obd_statfs.os_spare4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10230     { &hf_lustre_obd_connect_data_ocd_group,
10231       { "Ocd Group", "lustre.obd_connect_data.ocd_group", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10232     { &hf_lustre_lov_ost_data_v1_l_object_seq,
10233       { "L Object SEQ", "lustre.lov_ost_data_v1.l_object_seq", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10234     { &hf_lustre_lov_mds_md_v1_lmm_object_seq,
10235       { "Lmm Object SEQ", "lustre.lov_mds_md_v1.lmm_object_seq", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10236     { &hf_lustre_obd_connect_data_ocd_brw_size,
10237       { "Ocd Brw Size", "lustre.obd_connect_data.ocd_brw_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10238     { &hf_lustre_ptlrpc_body_pb_limit,
10239       { "Pb Limit", "lustre.ptlrpc_body.pb_limit", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10240     { &hf_lustre_obd_statfs_os_maxbytes,
10241       { "Os Maxbytes", "lustre.obd_statfs.os_maxbytes", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10242     { &hf_lustre_obd_statfs_os_spare5,
10243       { "Os Spare5", "lustre.obd_statfs.os_spare5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10244     { &hf_lustre_lustre_msg_v2_lm_flags,
10245       { "Lm Flags", "lustre.lustre_msg_v2.lm_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10246     { &hf_lustre_obd_statfs_os_ffree,
10247       { "Os Ffree", "lustre.obd_statfs.os_ffree", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10248     { &hf_lustre_obd_statfs_os_files,
10249       { "Os Files", "lustre.obd_statfs.os_files", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10250     { &hf_lustre_lov_mds_md_v1_lmm_stripe_count,
10251       { "Lmm Stripe Count", "lustre.lov_mds_md_v1.lmm_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10252     { &hf_lustre_lustre_msg_v1_lm_flags,
10253       { "Lm Flags", "lustre.lustre_msg_v1.lm_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10254     { &hf_lustre_lustre_msg_v1_lm_last_committed,
10255       { "Lm Last Committed", "lustre.lustre_msg_v1.lm_last_committed", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10256     { &hf_lustre_obd_statfs_os_spare9,
10257       { "Os Spare9", "lustre.obd_statfs.os_spare9", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10258     { &hf_lustre_obd_connect_data_ocd_index,
10259       { "Ocd Index", "lustre.obd_connect_data.ocd_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10260     { &hf_lustre_lustre_msg_v1_lm_buflens,
10261       { "Lm Buflens", "lustre.lustre_msg_v1.lm_buflens", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10262     { &hf_lustre_obd_statfs_os_spare1,
10263       { "Os Spare1", "lustre.obd_statfs.os_spare1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10264     { &hf_lustre_obd_statfs_os_spare8,
10265       { "Os Spare8", "lustre.obd_statfs.os_spare8", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10266     { &hf_lustre_lustre_msg_v1_lm_conn_cnt,
10267       { "Lm Conn Cnt", "lustre.lustre_msg_v1.lm_conn_cnt", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10268     { &hf_lustre_ptlrpc_body_pb_transno,
10269       { "Pb Transno", "lustre.ptlrpc_body.pb_transno", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10270     { &hf_lustre_ptlrpc_body_pb_service_time,
10271       { "Pb Service Time", "lustre.ptlrpc_body.pb_service_time",FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10272     { &hf_lustre_ptlrpc_body_pb_conn_cnt,
10273       { "Pb Conn Cnt", "lustre.ptlrpc_body.pb_conn_cnt", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10274     { &hf_lustre_ptlrpc_body_pb_opc,
10275       { "Pb Opc", "lustre.ptlrpc_body.pb_opc", FT_UINT32, BASE_DEC, VALS(lustre_op_codes), 0, "", HFILL }},
10276     { &hf_lustre_obd_connect_data_ocd_connect_flags,
10277       { "Ocd Connect Flags", "lustre.obd_connect_data.ocd_connect_flags", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10278     { &hf_lustre_lov_ost_data_v1_l_object_id,
10279       { "L Object Id", "lustre.lov_ost_data_v1.l_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10280     { &hf_lustre_lov_ost_data_v1_l_ost_gen,
10281       { "L Ost Gen", "lustre.lov_ost_data_v1.l_ost_gen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10282     { &hf_lustre_obd_statfs_os_bfree,
10283       { "Os Bfree", "lustre.obd_statfs.os_bfree", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10284     { &hf_lustre_obd_connect_data_ocd_version,
10285       { "Ocd Version", "lustre.obd_connect_data.ocd_version", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10286     { &hf_lustre_lov_mds_md_v1_lmm_objects,
10287       { "Lmm Objects", "lustre.lov_mds_md_v1.lmm_objects", FT_NONE,
10288                     BASE_NONE, NULL, 0, "", HFILL } },
10289     { &hf_lustre_obd_statfs_os_namelen,
10290       { "Os Namelen", "lustre.obd_statfs.os_namelen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10291     { &hf_lustre_obd_statfs_os_blocks,
10292       { "Os Blocks", "lustre.obd_statfs.os_blocks", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10293     { &hf_lustre_lustre_msg_v2_lm_secflvr,
10294       { "Lm Secflvr", "lustre.lustre_msg_v2.lm_secflvr", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10295     { &hf_lustre_lustre_msg_v1_lm_transno,
10296       { "Lm Transno", "lustre.lustre_msg_v1.lm_transno", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10297     { &hf_lustre_lov_mds_md_v1_lmm_pattern,
10298       { "Lmm Pattern", "lustre.lov_mds_md_v1.lmm_pattern", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10299     { &hf_lustre_lustre_msg_v1_lm_opc,
10300       { "Lm Opc", "lustre.lustre_msg_v1.lm_opc", FT_UINT32, BASE_DEC, VALS(lustre_op_codes), 0, "", HFILL }},
10301     { &hf_lustre_obd_connect_data_ocd_grant,
10302       { "Ocd Grant", "lustre.obd_connect_data.ocd_grant", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10303     { &hf_lustre_obd_ioobj_ioo_bufcnt,
10304       { "Ioo Bufcnt", "lustre.obd_ioobj.ioo_bufcnt", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10305     { &hf_lustre_lustre_msg_v1_lm_version,
10306       { "Lm Version", "lustre.lustre_msg_v1.lm_version", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10307     { &hf_lustre_obd_statfs_os_spare7,
10308       { "Os Spare7", "lustre.obd_statfs.os_spare7", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10309     { &hf_lustre_obd_statfs_os_fsid,
10310       { "Os Fsid", "lustre.obd_statfs.os_fsid", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10311     { &hf_lustre_obd_connect_data_ocd_cksum_types,
10312       { "Ocd Cksum Types", "lustre.obd_connect_data.ocd_cksum_types", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10313     { &hf_lustre_ost_lvb_lvb_size,
10314       { "Lvb Size", "lustre.ost_lvb.lvb_size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10315     { &hf_lustre_obd_statfs_os_type,
10316       { "Os Type", "lustre.obd_statfs.os_type", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10317     { &hf_lustre_obd_statfs_os_spare6,
10318       { "Os Spare6", "lustre.obd_statfs.os_spare6", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10319     { &hf_lustre_obd_statfs_os_state,
10320       { "Os State", "lustre.obd_statfs.os_state", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10321     { &hf_lustre_obd_statfs_os_spare3,
10322       { "Os Spare3", "lustre.obd_statfs.os_spare3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10323     { &hf_lustre_lustre_msg_v2_lm_magic,
10324       { "Lm Magic", "lustre.lustre_msg_v2.lm_magic", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
10325     { &hf_lustre_lov_mds_md_v1_lmm_object_id,
10326       { "Lmm Object Id", "lustre.lov_mds_md_v1.lmm_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10327     { &hf_lustre_ptlrpc_body_pb_last_seen,
10328       { "Pb Last Seen", "lustre.ptlrpc_body.pb_last_seen", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10329     { &hf_lustre_obd_ioobj_ioo_max_brw,  /* TODO : create the
10330                                                    corresponding value_string */
10331                   { "Ioo Max BRW Size", "lustre.obd_ioobj.ioo_max_brw", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
10332     { &hf_lustre_ptlrpc_body_pb_last_xid,
10333       { "Pb Last Xid", "lustre.ptlrpc_body.pb_last_xid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10334     { &hf_lustre_ptlrpc_body_pb_status,
10335       { "Pb Status", "lustre.ptlrpc_body.pb_status", FT_INT32, BASE_DEC, NULL, 0, "", HFILL }},
10336     { &hf_lustre_niobuf_remote_flags,
10337       { "Flags", "lustre.niobuf_remote.flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10338     { &hf_lustre_ll_fid_id,
10339       { "Id", "lustre.ll_fid.id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10340     { &hf_lustre_ost_lvb_lvb_blocks,
10341       { "Lvb Blocks", "lustre.ost_lvb.lvb_blocks", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10342     { &hf_lustre_lustre_msg_v2_lm_padding_2,
10343       { "Lm Padding 2", "lustre.lustre_msg_v2.lm_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10344     { &hf_lustre_obd_connect_data_padding1,
10345       { "Padding1", "lustre.obd_connect_data.padding1", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10346     { &hf_lustre_lov_ost_data_v1_l_ost_idx,
10347       { "L Ost Idx", "lustre.lov_ost_data_v1.l_ost_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10348     { &hf_lustre_obd_connect_data_padding2,
10349       { "Padding2", "lustre.obd_connect_data.padding2", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10350     { &hf_lustre_obd_ioobj_ioo_seq,
10351       { "Ioo Gr", "lustre.obd_ioobj.ioo_seq", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10352     { &hf_lustre_niobuf_remote_offset,
10353       { "Offset", "lustre.niobuf_remote.offset", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10354     { &hf_lustre_obd_statfs_os_spare2,
10355       { "Os Spare2", "lustre.obd_statfs.os_spare2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10356     { &hf_lustre_lustre_msg_v2_lm_bufcount,
10357       { "Lm Bufcount", "lustre.lustre_msg_v2.lm_bufcount", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10358     { &hf_lustre_ptlrpc_body_pb_handle,
10359       { "Pb Handle", "lustre.ptlrpc_body.pb_handle", FT_NONE,
10360                     BASE_NONE, NULL, 0, "", HFILL } },
10361     { &hf_lustre_obd_connect_data_ocd_transno,
10362       { "Ocd Transno", "lustre.obd_connect_data.ocd_transno", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10363     { &hf_lustre_lustre_msg_v1_lm_magic,
10364       { "Lm Magic", "lustre.lustre_msg_v1.lm_magic", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10365     { &hf_lustre_ptlrpc_body_pb,
10366       { "ptl rpc", "lustre.ptlrpc_body", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
10367
10368     { &hf_lustre_obd_uuid,
10369       { "obd uid name", "lustre.obd_uid", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10370     { &hf_lustre_obd_connect_data ,
10371       { "obd connect data", "lustre.obd_connect_data", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10372
10373     { &hf_lustre_ldlm_intent,
10374       { "ldlm intent", "lustre.ldlm_intent", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10375
10376     { &hf_lustre_obd_ioobj,
10377       { "lustre obd ioobj", "lustre.obd_ioobj", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10378     { &hf_lustre_niobuf_remote,
10379       { "lustre niobuf remote", "lustre.niobuf_remote", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10380     { &hf_lustre_ost_key,
10381       { "lustre ost key", "lustre.ost_key", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10382     { &hf_lustre_ost_val,
10383       { "lustre ost val", "lustre.ost_val", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10384     { &hf_lustre_llogd_chunk,
10385       { "lustre llogd chunk", "lustre.llogd_chunk", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10386     { &hf_lustre_llogd_keyword,
10387       { "lustre llogd keyword", "lustre.llogd_keyword", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10388     { &hf_lustre_llogd_client,
10389       { "lustre llogd client", "lustre.llogd_client", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10390     { &hf_lustre_llogd_name,
10391       { "lustre llogd name", "lustre.llogd_name", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10392     { &hf_lustre_llogd_log_hdr,
10393       { "lustre llogd log hdr", "lustre.llogd_log_hdr", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10394     { &hf_lustre_llog_logid_rec,
10395       { "lustre llog logid rec", "lustre.llog_logid_rec", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10396
10397     { &hf_lustre_llogd_body,
10398       { "lustre llogd body", "lustre.llogd_body", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
10399     { &hf_lustre_nio,
10400       { "lustre nio", "lustre.nio", FT_STRING, BASE_NONE, NULL , 0 , "", HFILL}},
10401     { &hf_lustre_ost_body,
10402       { "ost body", "lustre.ost_body", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
10403     { &hf_lustre_obd_statfs,
10404       { "obd statfs", "lustre.obd_statfs", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
10405     { &hf_lustre_obd_quotactl,
10406       { "obd quotactl", "lustre.obd_quotacl", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
10407     { &hf_lustre_quota_adjust_qunit,
10408       { "obd quota adjust qunit", "lustre.quota_adjust_qunit", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL }},
10409     { &hf_lustre_llog_unlink_rec_lur_tail,
10410       { "Lur Tail", "lustre.llog_unlink_rec.lur_tail", FT_NONE,
10411                     BASE_NONE, NULL, 0, "", HFILL } },
10412     { &hf_lustre_llog_size_change_rec_lsc_io_epoch,
10413       { "Lsc Io Epoch", "lustre.llog_size_change_rec.lsc_io_epoch", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10414     { &hf_lustre_mgs_target_info_mti_flags,
10415       { "Mti Flags", "lustre.mgs_target_info.mti_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10416     { &hf_lustre_ldlm_reply_lock_policy_res1,
10417       { "Lock Policy Res1", "lustre.ldlm_reply.lock_policy_res1", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10418     { &hf_lustre_llogd_body_lgd_len,
10419       { "Lgd Len", "lustre.llogd_body.lgd_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10420     { &hf_lustre_qunit_data_old_qd_id,
10421       { "Qd Id", "lustre.qunit_data_old.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10422     { &hf_lustre_llog_logid_rec_padding1,
10423       { "Padding1", "lustre.llog_logid_rec.padding1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10424     { &hf_lustre_quota_adjust_qunit_padding1,
10425       { "Padding1", "lustre.quota_adjust_qunit.padding1", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10426     { &hf_lustre_llog_size_change_rec_lsc_fid,
10427       { "Lsc Fid", "lustre.llog_size_change_rec.lsc_fid", FT_NONE,
10428                     BASE_NONE, NULL, 0, "", HFILL } },
10429     { &hf_lustre_llog_rec_hdr_padding,
10430       { "Padding", "lustre.llog_rec_hdr.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10431     { &hf_lustre_obdo_o_nlink,
10432       { "O Nlink", "lustre.obdo.o_nlink", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10433     { &hf_lustre_ldlm_extent_gid,
10434       { "Gid", "lustre.ldlm_extent.gid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10435     { &hf_lustre_obdo_o_uid,
10436       { "O Uid", "lustre.obdo.o_uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10437     { &hf_lustre_mds_xattr_name,
10438       { "mds xattr name", "lustre.mds_xattr_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10439     { &hf_lustre_lov_mds_md_v1,
10440       { "lov mds md v1", "lustre.lov_mds_md_v1", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10441     { &hf_lustre_llog_cookie,
10442       { "llog cookie", "lustre.llog_cookie", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10443     { &hf_lustre_mds_md_data,
10444       { "mds md data", "lustre.mds_md_data", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10445     { &hf_lustre_mds_reint_opcode,
10446       { "mds reint opcode", "lustre.mds_reint_opcode", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10447     { &hf_lustre_mds_xattr_eadata,
10448       { "mds xattr eadata", "lustre.mds_xattr_eadata", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10449     { &hf_lustre_reint_name,
10450       { "mds reint name", "lustre.mds_reint_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10451     { &hf_lustre_reint_old_name,
10452       { "mds reint old name", "lustre.mds_reint_old_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10453     { &hf_lustre_reint_new_name,
10454       { "mds reint new name", "lustre.mds_reint_new_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10455
10456
10457     { &hf_lustre_obdo_o_valid,
10458       { "O Valid", "lustre.obdo.o_valid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10459     { &hf_lustre_ldlm_reply_lock_flags,
10460       { "Lock Flags", "lustre.ldlm_reply.lock_flags", FT_UINT32,BASE_HEX, NULL, 0, "", HFILL }},
10461
10462     {&hf_lustre_ldlm_fl_lock_changed, {"LDLM_FL_LOCK_CHANGED", "lustre.ldlm_fl_lock_changed", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_LOCK_CHANGED, "", HFILL } },
10463     {&hf_lustre_ldlm_fl_block_granted, {"LDLM_FL_BLOCK_GRANTED", "lustre.ldlm_fl_block_granted", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BLOCK_GRANTED, "", HFILL } },
10464     {&hf_lustre_ldlm_fl_block_conv, {"LDLM_FL_BLOCK_CONV", "lustre.ldlm_fl_block_conv", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BLOCK_CONV, "", HFILL } },
10465     {&hf_lustre_ldlm_fl_block_wait, {"LDLM_FL_BLOCK_WAIT", "lustre.ldlm_fl_block_wait", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BLOCK_WAIT, "", HFILL } },
10466     {&hf_lustre_ldlm_fl_cbpending, {"LDLM_FL_CBPENDING", "lustre.ldlm_fl_cbpending", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CBPENDING, "", HFILL } },
10467     {&hf_lustre_ldlm_fl_ast_sent, {"LDLM_FL_AST_SENT", "lustre.ldlm_fl_ast_sent", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_AST_SENT, "", HFILL } },
10468     {&hf_lustre_ldlm_fl_wait_noreproc, {"LDLM_FL_WAIT_NOREPROC", "lustre.ldlm_fl_wait_noreproc", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_WAIT_NOREPROC, "", HFILL } },
10469     {&hf_lustre_ldlm_fl_cancel, {"LDLM_FL_CANCEL", "lustre.ldlm_fl_cancel", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CANCEL, "", HFILL } },
10470     {&hf_lustre_ldlm_fl_replay, {"LDLM_FL_REPLAY", "lustre.ldlm_fl_replay", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_REPLAY, "", HFILL } },
10471     {&hf_lustre_ldlm_fl_intent_only, {"LDLM_FL_INTENT_ONLY", "lustre.ldlm_fl_intent_only", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_INTENT_ONLY, "", HFILL } },
10472     {&hf_lustre_ldlm_fl_local_only, {"LDLM_FL_LOCAL_ONLY", "lustre.ldlm_fl_local_only", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_LOCAL_ONLY, "", HFILL } },
10473     {&hf_lustre_ldlm_fl_failed, {"LDLM_FL_FAILED", "lustre.ldlm_fl_failed", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_FAILED, "", HFILL } },
10474     {&hf_lustre_ldlm_fl_has_intent, {"LDLM_FL_HAS_INTENT", "lustre.ldlm_fl_has_intent", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_HAS_INTENT, "", HFILL } },
10475     {&hf_lustre_ldlm_fl_canceling, {"LDLM_FL_CANCELING", "lustre.ldlm_fl_canceling", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CANCELING, "", HFILL } },
10476     {&hf_lustre_ldlm_fl_local, {"LDLM_FL_LOCAL", "lustre.ldlm_fl_local", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_LOCAL, "", HFILL } },
10477     {&hf_lustre_ldlm_fl_warn, {"LDLM_FL_WARN", "lustre.ldlm_fl_warn", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_WARN, "", HFILL } },
10478     {&hf_lustre_ldlm_fl_discard_data, {"LDLM_FL_DISCARD_DATA", "lustre.ldlm_fl_discard_data", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_DISCARD_DATA, "", HFILL } },
10479     {&hf_lustre_ldlm_fl_no_timeout, {"LDLM_FL_NO_TIMEOUT", "lustre.ldlm_fl_no_timeout", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_NO_TIMEOUT, "", HFILL } },
10480     {&hf_lustre_ldlm_fl_block_nowait, {"LDLM_FL_BLOCK_NOWAIT", "lustre.ldlm_fl_block_nowait", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BLOCK_NOWAIT, "", HFILL } },
10481     {&hf_lustre_ldlm_fl_test_lock, {"LDLM_FL_TEST_LOCK", "lustre.ldlm_fl_test_lock", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_TEST_LOCK, "", HFILL } },
10482     {&hf_lustre_ldlm_fl_lvb_ready, {"LDLM_FL_LVB_READY", "lustre.ldlm_fl_lvb_ready", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_LVB_READY, "", HFILL } },
10483     {&hf_lustre_ldlm_fl_kms_ignore, {"LDLM_FL_KMS_IGNORE", "lustre.ldlm_fl_kms_ignore", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_KMS_IGNORE, "", HFILL } },
10484     {&hf_lustre_ldlm_fl_no_lru, {"LDLM_FL_NO_LRU", "lustre.ldlm_fl_no_lru", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_NO_LRU, "", HFILL } },
10485     {&hf_lustre_ldlm_fl_cancel_on_block, {"LDLM_FL_CANCEL_ON_BLOCK", "lustre.ldlm_fl_cancel_on_block", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CANCEL_ON_BLOCK, "", HFILL } },
10486     {&hf_lustre_ldlm_fl_cp_reqd, {"LDLM_FL_CP_REQD", "lustre.ldlm_fl_cp_reqd", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CP_REQD, "", HFILL } },
10487     {&hf_lustre_ldlm_fl_cleaned, {"LDLM_FL_CLEANED", "lustre.ldlm_fl_cleaned", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_CLEANED, "", HFILL } },
10488     {&hf_lustre_ldlm_fl_atomic_cb, {"LDLM_FL_ATOMIC_CB", "lustre.ldlm_fl_atomic_cb", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_ATOMIC_CB, "", HFILL } },
10489     {&hf_lustre_ldlm_fl_bl_ast, {"LDLM_FL_BL_AST", "lustre.ldlm_fl_bl_ast", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BL_AST, "", HFILL } },
10490     {&hf_lustre_ldlm_fl_bl_done, {"LDLM_FL_BL_DONE", "lustre.ldlm_fl_bl_done", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_BL_DONE, "", HFILL } },
10491     {&hf_lustre_ldlm_fl_deny_on_contention, {"LDLM_FL_DENY_ON_CONTENTION", "lustre.ldlm_fl_deny_on_contention", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_DENY_ON_CONTENTION, "", HFILL } },
10492     {&hf_lustre_ldlm_fl_ast_discard_data, {"LDLM_AST_DISCARD_DATA", "lustre.ldlm_ast_discard_data", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), LDLM_FL_AST_DISCARD_DATA, "", HFILL } },
10493
10494     { &hf_lustre_obdo_o_misc,
10495       { "O Misc", "lustre.obdo.o_misc", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10496     { &hf_lustre_ldlm_request_lock_handle,
10497       { "Lock Handle", "lustre.ldlm_request.lock_handle", FT_NONE,
10498                     BASE_NONE, NULL, 0, "", HFILL } },
10499     { &hf_lustre_llog_logid_lgl_oid,
10500       { "Lgl Oid", "lustre.llog_logid.lgl_oid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10501     { &hf_lustre_ldlm_inodebits_bits,
10502       { "Bits", "lustre.ldlm_inodebits.bits", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10503     { &hf_lustre_llog_log_hdr_llh_count,
10504       { "Llh Count", "lustre.llog_log_hdr.llh_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10505     { &hf_lustre_llog_gen_rec_lgr_tail,
10506       { "Lgr Tail", "lustre.llog_gen_rec.lgr_tail", FT_NONE,
10507                     BASE_NONE, NULL, 0, "", HFILL } },
10508     { &hf_lustre_llog_catid_lci_padding3,
10509       { "Lci Padding3", "lustre.llog_catid.lci_padding3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10510     { &hf_lustre_qunit_data_qd_qunit,
10511       { "Qd Qunit", "lustre.qunit_data.qd_qunit", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10512     { &hf_lustre_llog_setattr_rec_padding,
10513       { "Padding", "lustre.llog_setattr_rec.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10514     { &hf_lustre_llog_cookie_lgc_lgl,
10515       { "Lgc Lgl", "lustre.llog_cookie.lgc_lgl", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10516     { &hf_lustre_obd_quotactl_qc_dqinfo,
10517       { "Qc Dqinfo", "lustre.obd_quotactl.qc_dqinfo", FT_NONE,
10518                     BASE_NONE, NULL, 0, "", HFILL } },
10519     { &hf_lustre_llog_log_hdr_llh_bitmap,
10520       { "Llh Bitmap", "lustre.llog_log_hdr.llh_bitmap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10521     { &hf_lustre_obd_quotactl_qc_stat,
10522       { "Qc Stat", "lustre.obd_quotactl.qc_stat", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10523     { &hf_lustre_qunit_data_old2_qd_id,
10524       { "Qd Id", "lustre.qunit_data_old2.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10525     { &hf_lustre_llog_logid_rec_padding2,
10526       { "Padding2", "lustre.llog_logid_rec.padding2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10527     { &hf_lustre_llog_logid_rec_padding5,
10528       { "Padding5", "lustre.llog_logid_rec.padding5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10529     /*-------------------------------------------------------------------------------------------------------------*/
10530     /*all this flags are uint64, but I don't find the way to use something like TFS() with a Uint64*/
10531     /*like TFS() with a Uint64 */
10532                 { &hf_lustre_ldlm_intent_opc_open,
10533       { "open", "lustre.ldlm_intent.opc_open", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_OPEN,  "", HFILL } },
10534     { &hf_lustre_ldlm_intent_opc_creat,
10535       { "creat", "lustre.ldlm_intent.opc_creat", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_CREAT  ,  "", HFILL } },
10536     { &hf_lustre_ldlm_intent_opc_readdir,
10537       { "readdir", "lustre.ldlm_intent.opc_readdir", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_READDIR  ,  "", HFILL } },
10538     { &hf_lustre_ldlm_intent_opc_getattr,
10539       { "getattr", "lustre.ldlm_intent.opc_getattr", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_GETATTR,  "", HFILL } },
10540     { &hf_lustre_ldlm_intent_opc_lookup,
10541       { "lookup", "lustre.ldlm_intent.opc_lookup", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_LOOKUP ,  "", HFILL } },
10542     { &hf_lustre_ldlm_intent_opc_unlink,
10543       { "unlink", "lustre.ldlm_intent.opc_unlink", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_UNLINK ,  "", HFILL } },
10544     { &hf_lustre_ldlm_intent_opc_getxattr,
10545       { "getxattr", "lustre.ldlm_intent.opc_getxattr", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_GETXATTR ,  "", HFILL } },
10546     { &hf_lustre_ldlm_intent_opc_exec,
10547       { "exec", "lustre.ldlm_intent.opc_exec", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_EXEC ,  "", HFILL } },
10548     { &hf_lustre_ldlm_intent_opc_pin,
10549       { "pin", "lustre.ldlm_intent.opc_pin", FT_BOOLEAN, 32, TFS(&lnet_flags_set_truth), IT_PIN ,  "", HFILL } },
10550         /*-------------------------------------------------------------------*/
10551                 { &hf_lustre_ldlm_intent_opc,
10552       { "intent opcode", "lustre.ldlm_intent.opc", FT_NONE, BASE_NONE, NULL, 0,  "", HFILL}},
10553     { &hf_lustre_llog_rec_hdr_lrh_type,
10554       { "Lrh Type", "lustre.llog_rec_hdr.lrh_type", FT_UINT32, BASE_HEX, VALS(lustre_llog_op_type), 0, "", HFILL }},
10555     { &hf_lustre_llog_rec_hdr_lrh_len,
10556       { "Lrh Len", "lustre.llog_rec_hdr.lrh_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10557     { &hf_lustre_llog_setattr_rec_lsr_uid,
10558       { "Lsr Uid", "lustre.llog_setattr_rec.lsr_uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10559     { &hf_lustre_lov_desc_ld_padding_1,
10560       { "Ld Padding 1", "lustre.lov_desc.ld_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10561     { &hf_lustre_obdo_o_padding_4,
10562       { "O Padding 4", "lustre.obdo.o_padding_4", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10563     { &hf_lustre_mgs_target_info_padding,
10564       { "Padding", "lustre.mgs_target_info.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10565     { &hf_lustre_obd_quotactl_qc_dqblk,
10566       { "Qc Dqblk", "lustre.obd_quotactl.qc_dqblk", FT_NONE,
10567                     BASE_NONE, NULL, 0, "", HFILL } },
10568     { &hf_lustre_llogd_conn_body_lgdc_gen,
10569       { "Lgdc Gen", "lustre.llogd_conn_body.lgdc_gen", FT_NONE,
10570                     BASE_NONE, NULL, 0, "", HFILL } },
10571     { &hf_lustre_llog_log_hdr_llh_tail,
10572       { "Llh Tail", "lustre.llog_log_hdr.llh_tail", FT_NONE,
10573                     BASE_NONE, NULL, 0, "", HFILL } },
10574     { &hf_lustre_obdo_o_size,
10575       { "O Size", "lustre.obdo.o_size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10576     { &hf_lustre_ldlm_extent_start,
10577       { "Start", "lustre.ldlm_extent.start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10578     { &hf_lustre_llog_size_change_rec_lsc_hdr,
10579       { "Lsc Hdr", "lustre.llog_size_change_rec.lsc_hdr", FT_NONE,
10580                     BASE_NONE, NULL, 0, "", HFILL } },
10581     { &hf_lustre_llog_logid_lgl_oseq,
10582       { "Lgl SEQ", "lustre.llog_logid.lgl_oseq", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10583     { &hf_lustre_llog_cookie_lgc_padding,
10584       { "Lgc Padding", "lustre.llog_cookie.lgc_padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10585     { &hf_lustre_qunit_data_old_qd_type,
10586       { "Qd Type", "lustre.qunit_data_old.qd_type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10587     { &hf_lustre_ldlm_flock_blocking_export,
10588       { "Blocking Export", "lustre.ldlm_flock.blocking_export", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10589     { &hf_lustre_lov_desc_ld_pattern,
10590       { "Ld Pattern", "lustre.lov_desc.ld_pattern", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10591     { &hf_lustre_qunit_data_qd_id,
10592       { "Qd Id", "lustre.qunit_data.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10593     { &hf_lustre_mgs_target_info_mti_fsname,
10594       { "Mti Fsname", "lustre.mgs_target_info.mti_fsname", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10595     { &hf_lustre_ldlm_request_lock_flags,
10596       { "Lock Flags", "lustre.ldlm_request.lock_flags", FT_UINT32, BASE_HEX, NULL, 0 , "", HFILL }},
10597     { &hf_lustre_obdo_o_mode,
10598       { "O Mode", "lustre.obdo.o_mode", FT_UINT32, BASE_OCT, NULL, 0, "", HFILL }},
10599     { &hf_lustre_mgs_target_info_mti_svname,
10600       { "Mti Svname", "lustre.mgs_target_info.mti_svname", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10601     { &hf_lustre_llogd_body_lgd_logid,
10602       { "Lgd Logid", "lustre.llogd_body.lgd_logid", FT_NONE,
10603                     BASE_NONE, NULL, 0, "", HFILL } },
10604     { &hf_lustre_llog_log_hdr_llh_size,
10605       { "Llh Size", "lustre.llog_log_hdr.llh_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10606     { &hf_lustre_obdo_o_handle,
10607       { "O Handle", "lustre.obdo.o_handle", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10608     { &hf_lustre_obdo_o_atime,
10609       { "O Atime", "lustre.obdo.o_atime",FT_ABSOLUTE_TIME,
10610                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10611     { &hf_lustre_quota_adjust_qunit_qaq_id,
10612       { "Qaq Id", "lustre.quota_adjust_qunit.qaq_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10613     { &hf_lustre_ldlm_lock_desc_l_policy_data,
10614       { "L Policy Data", "lustre.ldlm_lock_desc.l_policy_data", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10615     { &hf_lustre_obd_quotactl_qc_cmd,
10616       { "Qc Cmd", "lustre.obd_quotactl.qc_cmd", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10617     { &hf_lustre_qunit_data_padding,
10618       { "Padding", "lustre.qunit_data.padding", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10619     { &hf_lustre_quota_adjust_qunit_qaq_flags,
10620       { "Qaq Flags", "lustre.quota_adjust_qunit.qaq_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10621     { &hf_lustre_ldlm_lock_desc_l_granted_mode,
10622       { "L Granted Mode", "lustre.ldlm_lock_desc.l_granted_mode", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_mode_t_vals), 0, "", HFILL }},
10623     { &hf_lustre_obdo_o_seq,
10624       { "O SEQ", "lustre.obdo.o_seq", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10625     { &hf_lustre_obdo_o_gid,
10626       { "O Gid", "lustre.obdo.o_gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10627     { &hf_lustre_llog_catid_lci_logid,
10628       { "Lci Logid", "lustre.llog_catid.lci_logid", FT_NONE,
10629                     BASE_NONE, NULL, 0, "", HFILL } },
10630     { &hf_lustre_llog_rec_tail_lrt_index,
10631       { "Lrt Index", "lustre.llog_rec_tail.lrt_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10632     { &hf_lustre_lov_desc_ld_default_stripe_count,
10633       { "Ld Default Stripe Count", "lustre.lov_desc.ld_default_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10634     { &hf_lustre_ldlm_resource_desc_lr_padding,
10635       { "Lr Padding", "lustre.ldlm_resource_desc.lr_padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10636     { &hf_lustre_cfg_marker_cm_vers,
10637       { "Cm Vers", "lustre.cfg_marker.cm_vers", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10638     { &hf_lustre_llog_unlink_rec_lur_hdr,
10639       { "Lur Hdr", "lustre.llog_unlink_rec.lur_hdr", FT_NONE,
10640                     BASE_NONE, NULL, 0, "", HFILL } },
10641     { &hf_lustre_llogd_body_lgd_index,
10642       { "Lgd Index", "lustre.llogd_body.lgd_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10643     { &hf_lustre_cfg_marker_cm_tgtname,
10644       { "Cm Tgtname", "lustre.cfg_marker.cm_tgtname", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10645     { &hf_lustre_llog_setattr_rec_lsr_ogen,
10646       { "Lsr Ogen", "lustre.llog_setattr_rec.lsr_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10647     { &hf_lustre_llog_logid_rec_lid_hdr,
10648       { "Lid Hdr", "lustre.llog_logid_rec.lid_hdr", FT_NONE,
10649                     BASE_NONE, NULL, 0, "", HFILL } },
10650     { &hf_lustre_obdo_o_ioepoch,
10651       { "O IOEpoch", "lustre.obdo.o_ioepoch", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10652     { &hf_lustre_ost_body_oa,
10653       { "Oa", "lustre.ost_body.oa", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10654     { &hf_lustre_llog_logid_rec_padding3,
10655       { "Padding3", "lustre.llog_logid_rec.padding3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10656     { &hf_lustre_llog_log_hdr_llh_flags,
10657       { "Llh Flags", "lustre.llog_log_hdr.llh_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10658     {&hf_lustre_llog_hdr_llh_flag_zap_when_empty,
10659       {"LLOG_F_ZAP_WHEN_EMPTY","lustre.lustre.llog_log_hdr.llh_flag_zap",FT_BOOLEAN,32,TFS(&lnet_flags_set_truth),LLOG_F_ZAP_WHEN_EMPTY,"",HFILL } },
10660     {&hf_lustre_llog_hdr_llh_flag_is_cat,
10661       {"LLOG_F_IS_CAT","lustre.lustre.llog_log_hdr.llh_flag_cat",FT_BOOLEAN,32,TFS(&lnet_flags_set_truth),LLOG_F_IS_CAT,"",HFILL } },
10662     {&hf_lustre_llog_hdr_llh_flag_is_play,
10663       {"LOG_F_IS_PLAIN","lustre.lustre.llog_log_hdr.llh_flag_play",FT_BOOLEAN,32,TFS(&lnet_flags_set_truth),LLOG_F_IS_PLAIN,"",HFILL } },
10664
10665     { &hf_lustre_llog_setattr_rec_lsr_oid,
10666       { "Lsr Oid", "lustre.llog_setattr_rec.lsr_oid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10667     { &hf_lustre_llog_size_change_rec_padding,
10668       { "Padding", "lustre.llog_size_change_rec.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10669     { &hf_lustre_mgs_target_info_mti_config_ver,
10670       { "Mti Config Ver", "lustre.mgs_target_info.mti_config_ver", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10671     { &hf_lustre_cfg_marker_cm_createtime,
10672       { "Cm Createtime", "lustre.cfg_marker.cm_createtime",FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10673     { &hf_lustre_qunit_data_old_qd_count,
10674       { "Qd Count", "lustre.qunit_data_old.qd_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10675     { &hf_lustre_llog_catid_lci_padding1,
10676       { "Lci Padding1", "lustre.llog_catid.lci_padding1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10677     { &hf_lustre_lov_desc_ld_active_tgt_count,
10678       { "Ld Active Tgt Count", "lustre.lov_desc.ld_active_tgt_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10679     { &hf_lustre_obdo_o_lcookie,
10680       { "O Lcookie", "lustre.obdo.o_lcookie", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10681     { &hf_lustre_llog_gen_rec_lgr_gen,
10682       { "Lgr Gen", "lustre.llog_gen_rec.lgr_gen", FT_NONE,
10683                     BASE_NONE, NULL, 0, "", HFILL } },
10684     { &hf_lustre_obdo_o_id,
10685       { "O Id", "lustre.obdo.o_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10686     { &hf_lustre_mgs_target_info_mti_uuid,
10687       { "Mti Uuid", "lustre.mgs_target_info.mti_uuid", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10688     { &hf_lustre_llog_rec_hdr_lrh_index,
10689       { "Lrh Index", "lustre.llog_rec_hdr.lrh_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10690     { &hf_lustre_llog_setattr_rec_lsr_hdr,
10691       { "Lsr Hdr", "lustre.llog_setattr_rec.lsr_hdr", FT_NONE,
10692                     BASE_NONE, NULL, 0, "", HFILL } },
10693     { &hf_lustre_mgs_target_info_mti_stripe_index,
10694       { "Mti Stripe Index", "lustre.mgs_target_info.mti_stripe_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10695     { &hf_lustre_llog_gen_conn_cnt,
10696       { "Conn Cnt", "lustre.llog_gen.conn_cnt", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10697     { &hf_lustre_obdo_o_padding_6,
10698       { "O Padding 6", "lustre.obdo.o_padding_6", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10699     { &hf_lustre_llog_cookie_lgc_index,
10700       { "Lgc Index", "lustre.llog_cookie.lgc_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10701     { &hf_lustre_lov_desc_ld_uuid,
10702       { "Ld Uuid", "lustre.lov_desc.ld_uuid", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10703     { &hf_lustre_ldlm_reply_lock_desc,
10704       { "Lock Desc", "lustre.ldlm_reply.lock_desc", FT_NONE,
10705                     BASE_NONE, NULL, 0, "", HFILL } },
10706     { &hf_lustre_lov_desc_ld_padding_0,
10707       { "Ld Padding 0", "lustre.lov_desc.ld_padding_0", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10708     { &hf_lustre_llog_unlink_rec_lur_ogen,
10709       { "Lur Ogen", "lustre.llog_unlink_rec.lur_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10710     { &hf_lustre_cfg_marker_cm_flags,
10711       { "Cm Flags", "lustre.cfg_marker.cm_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10712     { &hf_lustre_obdo_o_padding_3,
10713       { "O Padding 3", "lustre.obdo.o_padding_3", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10714     { &hf_lustre_ldlm_request_lock_desc,
10715       { "Lock Desc", "lustre.ldlm_request.lock_desc", FT_NONE,
10716                     BASE_NONE, NULL, 0, "", HFILL } },
10717     { &hf_lustre_obdo_o_flags,
10718       { "O Flags", "lustre.obdo.o_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10719     { &hf_lustre_mgs_target_info_mti_params,
10720       { "Mti Params", "lustre.mgs_target_info.mti_params", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10721     { &hf_lustre_llog_logid_lgl_ogen,
10722       { "Lgl Ogen", "lustre.llog_logid.lgl_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10723     { &hf_lustre_cfg_marker_cm_comment,
10724       { "Cm Comment", "lustre.cfg_marker.cm_comment", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10725     { &hf_lustre_llog_unlink_rec_lur_oid,
10726       { "Lur Oid", "lustre.llog_unlink_rec.lur_oid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10727     { &hf_lustre_qunit_data_qd_count,
10728       { "Qd Count", "lustre.qunit_data.qd_count", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10729     { &hf_lustre_obdo_o_mtime,
10730       { "O Mtime", "lustre.obdo.o_mtime",FT_ABSOLUTE_TIME,
10731                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10732     { &hf_lustre_obdo_o_blksize,
10733       { "O Blksize", "lustre.obdo.o_blksize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10734     { &hf_lustre_ldlm_res_id_name,
10735       { "Name", "lustre.ldlm_res_id.name", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10736     { &hf_lustre_ldlm_reply_lock_handle,
10737       { "Lock Handle", "lustre.ldlm_reply.lock_handle", FT_NONE,
10738                     BASE_NONE, NULL, 0, "", HFILL } },
10739     { &hf_lustre_llogd_body_lgd_saved_index,
10740       { "Lgd Saved Index", "lustre.llogd_body.lgd_saved_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10741     { &hf_lustre_qunit_data_old_qd_isblk,
10742       { "Qd Isblk", "lustre.qunit_data_old.qd_isblk", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10743     { &hf_lustre_obdo_o_blocks,
10744       { "O Blocks", "lustre.obdo.o_blocks", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10745     { &hf_lustre_lov_desc_ld_padding_2,
10746       { "Ld Padding 2", "lustre.lov_desc.ld_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10747     { &hf_lustre_llog_logid_rec_lid_tail,
10748       { "Lid Tail", "lustre.llog_logid_rec.lid_tail", FT_NONE,
10749                     BASE_NONE, NULL, 0, "", HFILL } },
10750     { &hf_lustre_obdo_o_grant,
10751       { "O Grant", "lustre.obdo.o_grant", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10752     { &hf_lustre_obdo_o_uid_h,
10753       { "O Uid H", "lustre.obdo.o_uid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10754     { &hf_lustre_obdo_o_gid_h,
10755       { "O Gid H", "lustre.obdo.o_gid_h", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10756     { &hf_lustre_quota_adjust_qunit_qaq_iunit_sz,
10757       { "Qaq Iunit Sz", "lustre.quota_adjust_qunit.qaq_iunit_sz", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10758     { &hf_lustre_llog_unlink_rec_padding,
10759       { "Padding", "lustre.llog_unlink_rec.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10760     { &hf_lustre_ldlm_lock_desc_l_req_mode,
10761       { "L Req Mode", "lustre.ldlm_lock_desc.l_req_mode", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_mode_t_vals), 0, "", HFILL }},
10762     { &hf_lustre_ldlm_extent_end,
10763       { "End", "lustre.ldlm_extent.end", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10764     { &hf_lustre_llog_gen_rec_lgr_hdr,
10765       { "Lgr Hdr", "lustre.llog_gen_rec.lgr_hdr", FT_NONE,
10766                     BASE_NONE, NULL, 0, "", HFILL } },
10767     { &hf_lustre_llogd_body_lgd_llh_flags,
10768       { "Lgd Llh Flags", "lustre.llogd_body.lgd_llh_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10769     { &hf_lustre_llog_log_hdr_llh_cat_idx,
10770       { "Llh Cat Idx", "lustre.llog_log_hdr.llh_cat_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10771     { &hf_lustre_llog_log_hdr_llh_bitmap_offset,
10772       { "Llh Bitmap Offset", "lustre.llog_log_hdr.llh_bitmap_offset", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10773     { &hf_lustre_ldlm_reply_lock_padding,
10774       { "Lock Padding", "lustre.ldlm_reply.lock_padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10775     { &hf_lustre_obd_quotactl_qc_id,
10776       { "Qc Id", "lustre.obd_quotactl.qc_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10777     { &hf_lustre_llog_logid_rec_padding4,
10778       { "Padding4", "lustre.llog_logid_rec.padding4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10779     { &hf_lustre_llog_setattr_rec_lsr_gid,
10780       { "Lsr Gid", "lustre.llog_setattr_rec.lsr_gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10781     { &hf_lustre_obd_quotactl_qc_type,
10782       { "Qc Type", "lustre.obd_quotactl.qc_type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10783     { &hf_lustre_cfg_marker_padding,
10784       { "Padding", "lustre.cfg_marker.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10785     { &hf_lustre_mgs_target_info_mti_nids,
10786       { "Mti Nids", "lustre.mgs_target_info.mti_nids", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10787     { &hf_lustre_obdo_o_stripe_idx,
10788       { "O Stripe Idx", "lustre.obdo.o_stripe_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10789     { &hf_lustre_llogd_conn_body_lgdc_logid,
10790       { "Lgdc Logid", "lustre.llogd_conn_body.lgdc_logid", FT_NONE,
10791                     BASE_NONE, NULL, 0, "", HFILL } },
10792     { &hf_lustre_ldlm_flock_blocking_pid,
10793       { "Blocking Pid", "lustre.ldlm_flock.blocking_pid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10794     { &hf_lustre_lov_desc_ld_tgt_count,
10795       { "Ld Tgt Count", "lustre.lov_desc.ld_tgt_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10796     { &hf_lustre_llogd_body_lgd_cur_offset,
10797       { "Lgd Cur Offset", "lustre.llogd_body.lgd_cur_offset", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10798     { &hf_lustre_qunit_data_old2_qd_count,
10799       { "Qd Count", "lustre.qunit_data_old2.qd_count", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10800     { &hf_lustre_opnum,
10801       { "Operation", "lustre.opnum", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
10802     { &hf_lustre_qunit_data_old2_qd_flags,
10803       { "Qd Flags", "lustre.qunit_data_old2.qd_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10804     { &hf_lustre_ldlm_flock_start,
10805       { "Start", "lustre.ldlm_flock.start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10806     { &hf_lustre_quota_adjust_qunit_qaq_bunit_sz,
10807       { "Qaq Bunit Sz", "lustre.quota_adjust_qunit.qaq_bunit_sz", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10808     { &hf_lustre_ldlm_flock_pid,
10809       { "Pid", "lustre.ldlm_flock.pid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10810     { &hf_lustre_lov_desc_ld_default_stripe_size,
10811       { "Ld Default Stripe Size", "lustre.lov_desc.ld_default_stripe_size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10812     { &hf_lustre_llog_log_hdr_llh_tgtuuid,
10813       { "Llh Tgtuuid", "lustre.llog_log_hdr.llh_tgtuuid", FT_NONE,
10814                     BASE_NONE, NULL, 0, "", HFILL } },
10815     { &hf_lustre_cfg_marker_cm_step,
10816       { "Cm Step", "lustre.cfg_marker.cm_step", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10817     { &hf_lustre_mgs_send_param_mgs_param,
10818       { "Mgs Param", "lustre.mgs_send_param.mgs_param", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10819     { &hf_lustre_lov_desc_ld_default_stripe_offset,
10820       { "Ld Default Stripe Offset", "lustre.lov_desc.ld_default_stripe_offset", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10821     { &hf_lustre_ldlm_resource_desc_lr_name,
10822       { "Lr Name", "lustre.ldlm_resource_desc.lr_name", FT_NONE,
10823                     BASE_NONE, NULL, 0, "", HFILL } },
10824     { &hf_lustre_llog_rec_tail_lrt_len,
10825       { "Lrt Len", "lustre.llog_rec_tail.lrt_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10826     { &hf_lustre_llog_log_hdr_llh_timestamp,
10827       { "Llh Timestamp", "lustre.llog_log_hdr.llh_timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10828     { &hf_lustre_llog_catid_lci_padding2,
10829       { "Lci Padding2", "lustre.llog_catid.lci_padding2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10830     { &hf_lustre_llogd_conn_body_lgdc_ctxt_idx,
10831       { "Lgdc Ctxt Idx", "lustre.llogd_conn_body.lgdc_ctxt_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10832     { &hf_lustre_cfg_marker_cm_canceltime,
10833       { "Cm Canceltime", "lustre.cfg_marker.cm_canceltime",FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10834     { &hf_lustre_mgs_target_info_mti_lustre_ver,
10835       { "Mti Lustre Ver", "lustre.mgs_target_info.mti_lustre_ver", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10836     { &hf_lustre_obdo_o_parent_ver,
10837       { "O Parent VER", "lustre.obdo.o_parent_ver", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
10838     { &hf_lustre_qunit_data_qd_flags,
10839       { "Qd Flags", "lustre.qunit_data.qd_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10840     { &hf_lustre_llog_logid_rec_lid_id,
10841       { "Lid Id", "lustre.llog_logid_rec.lid_id", FT_NONE,
10842                     BASE_NONE, NULL, 0, "", HFILL } },
10843     { &hf_lustre_obdo_o_parent_oid,
10844       { "O Parent OID", "lustre.obdo.o_parent_oid", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
10845     { &hf_lustre_llog_gen_mnt_cnt,
10846       { "Mnt Cnt", "lustre.llog_gen.mnt_cnt", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10847     { &hf_lustre_llog_size_change_rec_lsc_tail,
10848       { "Lsc Tail", "lustre.llog_size_change_rec.lsc_tail", FT_NONE,
10849                     BASE_NONE, NULL, 0, "", HFILL } },
10850     { &hf_lustre_obdo_o_padding_5,
10851       { "O Padding 5", "lustre.obdo.o_padding_5", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10852     { &hf_lustre_ldlm_lock_desc_l_resource,
10853       { "L Resource", "lustre.ldlm_lock_desc.l_resource", FT_NONE,
10854                     BASE_NONE, NULL, 0, "", HFILL } },
10855     { &hf_lustre_obdo_o_parent_seq,
10856       { "O Parent SEQ", "lustre.obdo.o_parent_seq", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL }},
10857     { &hf_lustre_ldlm_request_lock_count,
10858       { "Lock Count", "lustre.ldlm_request.lock_count", FT_UINT32, BASE_HEX_DEC, NULL, 0, "", HFILL }},
10859     { &hf_lustre_ldlm_flock_end,
10860       { "End", "lustre.ldlm_flock.end", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10861     { &hf_lustre_mgs_target_info_mti_nid_count,
10862       { "Mti Nid Count", "lustre.mgs_target_info.mti_nid_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10863     /* -------------------------------------------------------------------- */
10864     { &hf_lustre_mgs_target_info,
10865       { "mgs target info", "lustre.mgs_target_info", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10866     { &hf_lustre_mgs_send_param,
10867       { "mgs send param", "lustre.mgs_send_param", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10868
10869     { &hf_lustre_mgs_config_body,
10870       { "mgs config body", "lustre.mgs_config_body", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10871     { &hf_lustre_mgs_config_body_name,
10872       { "mcb name", "lustre.mgs_config_body.name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
10873     { &hf_lustre_mgs_config_body_offset,
10874       { "mcb offset", "lustre.mgs_config_body.offset", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10875     { &hf_lustre_mgs_config_body_type,
10876       { "mcb type", "lustre.mgs_config_body.type", FT_UINT16, BASE_DEC, VALS(lustre_mgs_config_body_types), 0, "", HFILL }},
10877     { &hf_lustre_mgs_config_body_reserved,
10878       { "mcb reserved", "lustre.mgs_config_body.type", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10879     { &hf_lustre_mgs_config_body_bits,
10880       { "mcb bit shift", "lustre.mgs_config_body.type", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
10881     { &hf_lustre_mgs_config_body_units,
10882       { "mcb units", "lustre.mgs_config_body.type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10883
10884     { &hf_lustre_mgs_config_res,
10885       { "mgs config res", "lustre.mgs_config_res", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10886     { &hf_lustre_mgs_config_res_offset,
10887       { "mcr offset", "lustre.mgs_config_res.offset", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10888     { &hf_lustre_mgs_config_res_size,
10889       { "mcr size", "lustre.mgs_config_res.size", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10890
10891     /* -------------------------------------------------------------------- */
10892     { &hf_lustre_ost_lvb,
10893       { "ost lvb data", "lustre.ost_lvb", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
10894
10895     { &hf_lustre_obdo_o_ctime,
10896       { "O Ctime", "lustre.obdo.o_ctime",FT_ABSOLUTE_TIME,
10897                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10898     { &hf_lustre_ldlm_reply_lock_policy_res2,
10899       { "Lock Policy Res2", "lustre.ldlm_reply.lock_policy_res2", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10900     { &hf_lustre_llogd_body_lgd_ctxt_idx,
10901       { "Lgd Ctxt Idx", "lustre.llogd_body.lgd_ctxt_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10902     { &hf_lustre_lov_desc_ld_qos_maxage,
10903       { "Ld Qos Maxage", "lustre.lov_desc.ld_qos_maxage", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10904     { &hf_lustre_ldlm_resource_desc_lr_type,
10905       { "Lr Type", "lustre.ldlm_resource_desc.lr_type", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_type_t_vals), 0, "", HFILL }},
10906     { &hf_lustre_llog_setattr_rec_lsr_tail,
10907       { "Lsr Tail", "lustre.llog_setattr_rec.lsr_tail", FT_NONE,
10908                     BASE_NONE, NULL, 0, "", HFILL } },
10909     { &hf_lustre_llog_cookie_lgc_subsys,
10910       { "Lgc Subsys", "lustre.llog_cookie.lgc_subsys", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10911     { &hf_lustre_llog_log_hdr_llh_hdr,
10912       { "Llh Hdr", "lustre.llog_log_hdr.llh_hdr", FT_NONE,
10913                     BASE_NONE, NULL, 0, "", HFILL } },
10914     { &hf_lustre_llog_log_hdr_llh_reserved,
10915       { "Llh Reserved", "lustre.llog_log_hdr.llh_reserved", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10916
10917     { &hf_lustre_extra_padding,
10918       { "extra padding", "lustre.msg_v2_extra_padding", FT_NONE, BASE_NONE, NULL, 0, "", HFILL}},
10919     { &hf_lustre_ldlm_reply,
10920       { "ldlm reply", "lustre.ldlm_reply", FT_NONE, BASE_NONE, NULL, 0, "", HFILL}},
10921     { &hf_lustre_ldlm_request,
10922       { "ldlm request", "lustre.ldlm_request", FT_NONE, BASE_NONE, NULL, 0, "", HFILL}},
10923
10924     /* add for lustre_user.h */
10925     { &hf_lustre_obd_dqinfo_dqi_valid,
10926       { "Dqi Valid", "lustre.obd_dqinfo.dqi_valid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10927     { &hf_lustre_obd_dqblk_dqb_isoftlimit,
10928       { "Dqb Isoftlimit", "lustre.obd_dqblk.dqb_isoftlimit", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10929     { &hf_lustre_obd_dqblk_dqb_bhardlimit,
10930       { "Dqb Bhardlimit", "lustre.obd_dqblk.dqb_bhardlimit", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10931     { &hf_lustre_obd_dqblk_dqb_curspace,
10932       { "Dqb Curspace", "lustre.obd_dqblk.dqb_curspace", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10933     { &hf_lustre_obd_dqblk_dqb_itime,
10934       { "Dqb Itime", "lustre.obd_dqblk.dqb_itime", FT_ABSOLUTE_TIME,
10935                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10936     { &hf_lustre_obd_dqblk_dqb_valid,
10937       { "Dqb Valid", "lustre.obd_dqblk.dqb_valid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10938     { &hf_lustre_obd_dqinfo_dqi_igrace,
10939       { "Dqi Igrace", "lustre.obd_dqinfo.dqi_igrace", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10940     { &hf_lustre_obd_dqinfo_dqi_bgrace,
10941       { "Dqi Bgrace", "lustre.obd_dqinfo.dqi_bgrace", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10942     { &hf_lustre_obd_dqblk_padding,
10943       { "Padding", "lustre.obd_dqblk.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10944     { &hf_lustre_obd_dqblk_dqb_curinodes,
10945       { "Dqb Curinodes", "lustre.obd_dqblk.dqb_curinodes", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10946     { &hf_lustre_obd_dqblk_dqb_bsoftlimit,
10947       { "Dqb Bsoftlimit", "lustre.obd_dqblk.dqb_bsoftlimit", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
10948     { &hf_lustre_obd_dqinfo_dqi_flags,
10949       { "Dqi Flags", "lustre.obd_dqinfo.dqi_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
10950     { &hf_lustre_obd_dqblk_dqb_btime,
10951       { "Dqb Btime", "lustre.obd_dqblk.dqb_btime", FT_ABSOLUTE_TIME,
10952                     ABSOLUTE_TIME_LOCAL, NULL, 0, "", HFILL } },
10953     { &hf_lustre_obd_dqblk_dqb_ihardlimit,
10954       { "Dqb Ihardlimit", "lustre.obd_dqblk.dqb_ihardlimit", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL } },
10955
10956     /* seq */
10957     { &hf_lustre_seq_opc,
10958       { "Seq OPC", "lustre.seq_opc", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
10959     { &hf_lustre_seq_range,
10960       { "Seq Range", "lustre.seq_range", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10961     { &hf_lustre_seq_range_start,
10962       { "Seq Range Start", "lustre.seq_range.start", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL } },
10963     { &hf_lustre_seq_range_end,
10964       { "Seq Range End", "lustre.seq_range.end", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL } },
10965     { &hf_lustre_seq_range_index,
10966       { "Seq Range Index", "lustre.seq_range.index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
10967     { &hf_lustre_seq_range_flags,
10968       { "Seq Range Flags", "lustre.seq_range.flags", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
10969
10970     /* fld */
10971     { &hf_lustre_fld_opc,
10972       { "Fld OPC", "lustre.fld_opc", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
10973     { &hf_lustre_fld_range,
10974       { "Fld Range", "lustre.fld_range", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10975     { &hf_lustre_fld_range_start,
10976       { "Fld Range Start", "lustre.fld_range.start", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL } },
10977     { &hf_lustre_fld_range_end,
10978       { "Fld Range End", "lustre.fld_range.end", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL } },
10979     { &hf_lustre_fld_range_index,
10980       { "Fld Range Index", "lustre.fld_range.index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
10981     { &hf_lustre_fld_range_flags,
10982       { "Fld Range Flags", "lustre.fld_range.flags", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
10983
10984     /* struct mdt_ioepoch */
10985     { &hf_lustre_mdt_ioepoch,
10986       { "MDT ioepoch", "lustre.mdt_ioepoch", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10987     { &hf_lustre_mdt_ioepoch_handle,
10988       { "Handle", "lustre.mdt_ioepoch.handle", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10989     { &hf_lustre_mdt_ioepoch_ioepoch,
10990       { "ioepoch", "lustre.mdt_ioepoch.ioepoch", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL } },
10991     { &hf_lustre_mdt_ioepoch_flags,
10992       { "flags", "lustre.mdt_ioepoch.flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
10993     { &hf_lustre_mdt_ioepoch_padding,
10994       { "Padding", "lustre.mdt_ioepoch.padding", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
10995
10996     /* struct lustre_capa */
10997     { &hf_lustre_capa,
10998       { "Capability", "lustre.capa", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
10999     { &hf_lustre_capa_fid,
11000       { "Capa fid", "lustre.capa.fid", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
11001     { &hf_lustre_capa_opc,
11002       { "Capa opc", "lustre.capa.opc", FT_UINT64, BASE_HEX, NULL, 0, "", HFILL } },
11003     { &hf_lustre_capa_uid,
11004       { "Capa uid", "lustre.capa.uid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL } },
11005     { &hf_lustre_capa_gid,
11006       { "Capa gid", "lustre.capa.gid", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL } },
11007     { &hf_lustre_capa_flags,
11008       { "Capa flags", "lustre.capa.flags", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
11009     { &hf_lustre_capa_keyid,
11010       { "Capa keyid", "lustre.capa.keyid", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL } },
11011     { &hf_lustre_capa_timeout,
11012       { "Capa timeout", "lustre.capa.timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
11013     { &hf_lustre_capa_expiry,
11014       { "Capa expiry", "lustre.capa.expiry", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL } },
11015     { &hf_lustre_capa_hmac,
11016       { "Capa hmac", "lustre.capa.hmac", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
11017
11018     /* ACL */
11019     { &hf_lustre_acl,
11020       { "ACL", "lustre.acl", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } },
11021   };
11022
11023
11024   static gint *ett[] = {
11025     &ett_lustre,
11026     &ett_lustre_lustre_handle_cookie,
11027     &ett_lustre_lustre_msg_v1,
11028     &ett_lustre_lustre_handle_v1,
11029     &ett_lustre_lustre_msg_v2,
11030     &ett_lustre_ptlrpc_body,
11031     &ett_lustre_lustre_handle_v2,
11032     &ett_lustre_obd_connect_data,
11033     &ett_lustre_lov_mds_md_v1,
11034     &ett_lustre_lov_ost_data_v1,
11035     &ett_lustre_obd_statfs,
11036     &ett_lustre_obd_ioobj,
11037     &ett_lustre_niobuf_remote,
11038     &ett_lustre_ost_lvb,
11039     &ett_lustre_ll_fid,
11040     &ett_lustre_obd_quotactl,
11041     &ett_lustre_obd_dqinfo,
11042     &ett_lustre_obd_dqblk,
11043     &ett_lustre_quota_adjust_qunit,
11044     &ett_lustre_mdt_body,
11045     &ett_lustre_mdt_rec_setattr,
11046     &ett_lustre_mdt_rec_create,
11047     &ett_lustre_mdt_rec_link,
11048     &ett_lustre_mdt_rec_unlink,
11049     &ett_lustre_mdt_rec_rename,
11050     &ett_lustre_mdt_rec_setxattr,
11051     &ett_lustre_lov_desc,
11052     &ett_lustre_obd_uuid,
11053     &ett_lustre_ldlm_res_id,
11054     &ett_lustre_ldlm_extent,
11055     &ett_lustre_ldlm_inodebits,
11056     &ett_lustre_ldlm_flock,
11057     &ett_lustre_ldlm_intent_opc,
11058     &ett_lustre_ldlm_resource_desc,
11059     &ett_lustre_ldlm_lock_desc,
11060     &ett_lustre_ldlm_request,
11061     &ett_lustre_lustre_handle,
11062     &ett_lustre_ldlm_reply,
11063     &ett_lustre_mgs_send_param,
11064     &ett_lustre_mgs_target_info,
11065     &ett_lustre_mgs_config_body,
11066     &ett_lustre_mgs_config_res,
11067     &ett_lustre_cfg_marker,
11068     &ett_lustre_llog_catid,
11069     &ett_lustre_llog_logid,
11070     &ett_lustre_lov_mds_md,
11071     &ett_lustre_llog_rec_hdr,
11072     &ett_lustre_llog_rec_tail,
11073     &ett_lustre_llog_logid_rec,
11074     &ett_lustre_llog_unlink_rec,
11075     &ett_lustre_llog_setattr_rec,
11076     &ett_lustre_llog_size_change_rec,
11077     &ett_lustre_llog_gen,
11078     &ett_lustre_llog_gen_rec,
11079     &ett_lustre_llog_log_hdr,
11080     &ett_lustre_llog_cookie,
11081     &ett_lustre_llogd_body,
11082     &ett_lustre_llogd_conn_body,
11083     &ett_lustre_obdo,
11084     &ett_lustre_ost_body,
11085     &ett_lustre_qunit_data,
11086     &ett_lustre_qunit_data_old2,
11087     &ett_lustre_qunit_data_old,
11088     &ett_lustre_ldlm_lock_flags,
11089     &ett_lustre_llog_log_llh_flags,
11090     &ett_lustre_seq_range,
11091     &ett_lustre_fld_range,
11092     &ett_lustre_mdt_ioepoch,
11093     &ett_lustre_capa,
11094     &ett_lustre_acl,
11095         };
11096
11097   proto_lustre = proto_register_protocol("Lustre", "lustre", "lustre");
11098   proto_register_field_array(proto_lustre, hf, array_length (hf));
11099   proto_register_subtree_array(ett, array_length(ett));
11100 }
11101
11102
11103 void proto_reg_handoff_lustre(void)
11104 {
11105   dissector_handle_t lustre_handle;
11106   lustre_handle=create_dissector_handle(dissect_lustre, proto_lustre);
11107   /* we use Lustre only if we get ptl_index = One of this code (we have removed the bulk code) */
11108   /* in LNET we test if the message is a put or not before adding an lnet.ptl_index value */
11109   dissector_add("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
11110   dissector_add("lnet.ptl_index", CONNMGR_REQUEST_PORTAL    , lustre_handle);
11111   dissector_add("lnet.ptl_index", CONNMGR_REPLY_PORTAL      , lustre_handle);
11112   dissector_add("lnet.ptl_index", OSC_REPLY_PORTAL          , lustre_handle);
11113   dissector_add("lnet.ptl_index", OST_IO_PORTAL             , lustre_handle);
11114   dissector_add("lnet.ptl_index", OST_CREATE_PORTAL         , lustre_handle);
11115   dissector_add("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
11116   dissector_add("lnet.ptl_index", MDS_REQUEST_PORTAL        , lustre_handle);
11117   dissector_add("lnet.ptl_index", LDLM_CB_REQUEST_PORTAL    , lustre_handle);
11118   dissector_add("lnet.ptl_index", LDLM_CB_REPLY_PORTAL      , lustre_handle);
11119   dissector_add("lnet.ptl_index", LDLM_CANCEL_REQUEST_PORTAL, lustre_handle);
11120   dissector_add("lnet.ptl_index", LDLM_CANCEL_REPLY_PORTAL  , lustre_handle);
11121   dissector_add("lnet.ptl_index", MDS_SETATTR_PORTAL        , lustre_handle);
11122   dissector_add("lnet.ptl_index", MDS_READPAGE_PORTAL       , lustre_handle);
11123   dissector_add("lnet.ptl_index", MGC_REPLY_PORTAL          , lustre_handle);
11124   dissector_add("lnet.ptl_index", MGS_REQUEST_PORTAL        , lustre_handle);
11125   dissector_add("lnet.ptl_index", MGS_REPLY_PORTAL          , lustre_handle);
11126   dissector_add("lnet.ptl_index", OST_REQUEST_PORTAL        , lustre_handle);
11127   dissector_add("lnet.ptl_index", FLD_REQUEST_PORTAL, lustre_handle);
11128   dissector_add("lnet.ptl_index", SEQ_METADATA_PORTAL, lustre_handle);
11129   dissector_add("lnet.ptl_index", SEQ_DATA_PORTAL, lustre_handle);
11130   dissector_add("lnet.ptl_index", SEQ_CONTROLLER_PORTAL, lustre_handle);
11131 }