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