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