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