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