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