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