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