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