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