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