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