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