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