Whamcloud - gitweb
LU-1434 utils: extend wireshark parsing
[fs/lustre-release.git] / lustre / contrib / wireshark / packet-lustre.c
1 /* packet-lustre.c
2  * Lustre 1.6 dissection (http://www.lustre.org/)
3  * Author: Laurent George <george@ocre.cea.fr>
4  * based on packet-agentx.c and packet-afs.c
5  * partially generated by Pidl
6  * 20080903
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1999 Gerald Combs
10  *
11  * C-Syle: 2 space indents
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  *
27  * Copyright (c) 2011, 2012, Intel Corporation.
28  */
29
30 #ifdef HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33
34
35 #include <glib.h>
36 #include <string.h>
37 #include <epan/packet.h>
38
39 #include <epan/dissectors/packet-windows-common.h>
40
41 const true_false_string lnet_flags_set_truth = { "Set", "Unset" };
42
43 /* --------------------------------------------------------------------------------------- */
44 /* def and macro to know where we are the the lustre payload */
45 #define LUSTRE_MAGIC_OFFSET 8
46 #define LUSTRE_MSG_MAGIC_V1 0x0BD00BD0
47 #define LUSTRE_MSG_MAGIC_V2 0x0BD00BD3
48
49 #define LUSTRE_BUFCOUNT_OFF ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) ? 0 : 60)
50 #define LUSTRE_BUFCOUNT ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) \
51     ? (tvb_get_letohl(tvb, LUSTRE_BUFCOUNT_OFF)) : ((tvb_get_letohl(tvb, LUSTRE_BUFCOUNT_OFF))) )
52 /* remark : BUFLENOFF don't have the same meaning if it's for v1 or v2
53  * v1 : LUSTRE_BUFLEN_OFF = offset buflen[0] - 4 bytes.
54  * v2 : LUSTRE_BUFLEN_OFF = offset buflen[0]
55  */
56 #define LUSTRE_BUFLEN_OFF ((tvb_get_letohl(tvb, LUSTRE_MAGIC_OFFSET)== LUSTRE_MSG_MAGIC_V2) ? 32 : 60)
57
58 /* LUSTRE_BUFFER_LEN(buffnum) */
59 #define LUSTRE_BUFFER_LEN(_n) (LUSTRE_BUFCOUNT <= (_n) ? 0 \
60                                : tvb_get_letohl(tvb, LUSTRE_BUFLEN_OFF+\
61                                                 sizeof(guint32)*(_n)))
62
63 #define LUSTRE_REQ_REC_OFF                     1 /* normal request record offset */
64 #define LUSTRE_REPLY_REC_OFF                   1 /* normal reply record offset */
65
66 #define LUSTRE_DLM_INTENT_IT_OFF               2 /* intent lock it offset */
67 #define LUSTRE_DLM_INTENT_REC_OFF              3 /* intent lock record offset */
68 #define LUSTRE_DLM_LOCKREPLY_OFF               1 /* lockrep offset */
69 #define LUSTRE_DLM_REPLY_REC_OFF               2 /* reply record offset */
70 /* --------------------------------------------------------------------------------------- */
71
72
73 #define LUSTRE_PTLRPC_MSG_VERSION  0x00000003
74 #define LUSTRE_VERSION_MASK 0xffff0000
75 #define LUSTRE_OBD_VERSION  0x00010000
76 #define LUSTRE_MDS_VERSION  0x00020000
77 #define LUSTRE_OST_VERSION  0x00030000
78 #define LUSTRE_DLM_VERSION  0x00040000
79 #define LUSTRE_LOG_VERSION  0x00050000
80 #define LUSTRE_MGS_VERSION  0x00060000
81
82
83
84 #define LOV_MAGIC_V1      0x0BD10BD0
85 #define LOV_MAGIC         LOV_MAGIC_V1
86 #define LOV_MAGIC_JOIN_V1 0x0BD20BD0
87
88 /* defined in lustre/include/lustre/lustre_idl.h */
89 typedef enum {
90         CONNMGR_REQUEST_PORTAL = 1,
91         CONNMGR_REPLY_PORTAL = 2,
92         OSC_REQUEST_PORTAL = 3,
93         OSC_REPLY_PORTAL = 4,
94         OSC_BULK_PORTAL = 5,
95         OST_IO_PORTAL = 6,
96         OST_CREATE_PORTAL = 7,
97         OST_BULK_PORTAL = 8,
98         MDC_REQUEST_PORTAL = 9,
99         MDC_REPLY_PORTAL = 10,
100         MDC_BULK_PORTAL = 11,
101         MDS_REQUEST_PORTAL = 12,
102         MDS_REPLY_PORTAL = 13,
103         MDS_BULK_PORTAL = 14,
104         LDLM_CB_REQUEST_PORTAL = 15,
105         LDLM_CB_REPLY_PORTAL = 16,
106         LDLM_CANCEL_REQUEST_PORTAL = 17,
107         LDLM_CANCEL_REPLY_PORTAL = 18,
108         PTLBD_REQUEST_PORTAL = 19,
109         PTLBD_REPLY_PORTAL = 20,
110         PTLBD_BULK_PORTAL = 21,
111         MDS_SETATTR_PORTAL = 22,
112         MDS_READPAGE_PORTAL = 23,
113         MDS_MDS_PORTAL = 24,
114         MGC_REPLY_PORTAL = 25,
115         MGS_REQUEST_PORTAL = 26,
116         MGS_REPLY_PORTAL = 27,
117         OST_REQUEST_PORTAL = 28,
118         FLD_REQUEST_PORTAL = 29,
119         SEQ_METADATA_PORTAL = 30,
120         SEQ_DATA_PORTAL = 31,
121         SEQ_CONTROLLER_PORTAL = 32,
122         MGS_BULK_PORTAL = 33
123 } portal_index_t;
124
125 static const value_string portal_indices[] = {
126         { CONNMGR_REQUEST_PORTAL, "CONNMGR_REQUEST_PORTAL"},
127         { CONNMGR_REPLY_PORTAL , "CONNMGR_REPLY_PORTAL"},
128         { OSC_REQUEST_PORTAL , "OSC_REQUEST_PORTAL(obsolete)"},
129         { OSC_REPLY_PORTAL , "OSC_REPLY_PORTAL"},
130         { OSC_BULK_PORTAL , "OSC_BULK_PORTAL(obsolete)"},
131         { OST_IO_PORTAL , "OST_IO_PORTAL"},
132         { OST_CREATE_PORTAL , "OST_CREATE_PORTAL"},
133         { OST_BULK_PORTAL , "OST_BULK_PORTAL"},
134         { MDC_REQUEST_PORTAL , "MDC_REQUEST_PORTAL(obsolete)"},
135         { MDC_REPLY_PORTAL , "MDC_REPLY_PORTAL"},
136         { MDC_BULK_PORTAL , "MDC_BULK_PORTAL(obsolete)"},
137         { MDS_REQUEST_PORTAL , "MDS_REQUEST_PORTAL"},
138         { MDS_REPLY_PORTAL , "MDS_REPLY_PORTAL(obsolete)"},
139         { MDS_BULK_PORTAL , "MDS_BULK_PORTAL"},
140         { LDLM_CB_REQUEST_PORTAL , "LDLM_CB_REQUEST_PORTAL"},
141         { LDLM_CB_REPLY_PORTAL , "LDLM_CB_REPLY_PORTAL"},
142         { LDLM_CANCEL_REQUEST_PORTAL , "LDLM_CANCEL_REQUEST_PORTAL"},
143         { LDLM_CANCEL_REPLY_PORTAL , "LDLM_CANCEL_REPLY_PORTAL"},
144         { PTLBD_REQUEST_PORTAL , "PTLBD_REQUEST_PORTAL(obsolete)"},
145         { PTLBD_REPLY_PORTAL , "PTLBD_REPLY_PORTAL(obsolete)"},
146         { PTLBD_BULK_PORTAL , "PTLBD_BULK_PORTAL(obsolete)"},
147         { MDS_SETATTR_PORTAL , "MDS_SETATTR_PORTAL"},
148         { MDS_READPAGE_PORTAL , "MDS_READPAGE_PORTAL"},
149         { MDS_MDS_PORTAL, "MDS_MDS_PORTAL"},
150         { MGC_REPLY_PORTAL , "MGC_REPLY_PORTAL"},
151         { MGS_REQUEST_PORTAL , "MGS_REQUEST_PORTAL"},
152         { MGS_REPLY_PORTAL , "MGS_REPLY_PORTAL"},
153         { OST_REQUEST_PORTAL , "OST_REQUEST_PORTAL"},
154         { FLD_REQUEST_PORTAL , "FLD_REQUEST_PORTAL"},
155         { SEQ_METADATA_PORTAL, "SEQ_METADATA_PORTAL"},
156         { SEQ_DATA_PORTAL, "SEQ_DATA_PORTAL"},
157         { SEQ_CONTROLLER_PORTAL, "SEQ_CONTROLLER_PORTAL"},
158         { MGS_BULK_PORTAL, "MGS_BULK_PORTAL"}
159 };
160
161 typedef enum {
162   OST_REPLY      =  0,       /* reply ? */
163   OST_GETATTR    =  1,
164   OST_SETATTR    =  2,
165   OST_READ       =  3,
166   OST_WRITE      =  4,
167   OST_CREATE     =  5,
168   OST_DESTROY    =  6,
169   OST_GET_INFO   =  7,
170   OST_CONNECT    =  8,
171   OST_DISCONNECT =  9,
172   OST_PUNCH      = 10,
173   OST_OPEN       = 11,
174   OST_CLOSE      = 12,
175   OST_STATFS     = 13,
176   /*      OST_SAN_READ   = 14,    deprecated */
177   /*      OST_SAN_WRITE  = 15,    deprecated */
178   OST_SYNC       = 16,
179   OST_SET_INFO   = 17,
180   OST_QUOTACHECK = 18,
181   OST_QUOTACTL   = 19,
182   OST_QUOTA_ADJUST_QUNIT = 20,
183   OST_LAST_OPC
184 } ost_cmd_t ;
185
186
187 typedef enum {
188   OBD_PING = 400,
189   OBD_LOG_CANCEL,
190   OBD_QC_CALLBACK,
191   OBD_LAST_OPC
192 } obd_cmd_t;
193 #define OBD_FIRST_OPC OBD_PING
194
195 /* must be coherent with same declaration
196  * in lustre/include/lustre/lustre_idl.h
197  */
198 typedef enum {
199   MDS_GETATTR      = 33,
200   MDS_GETATTR_NAME = 34,
201   MDS_CLOSE        = 35,
202   MDS_REINT        = 36,
203   MDS_READPAGE     = 37,
204   MDS_CONNECT      = 38,
205   MDS_DISCONNECT   = 39,
206   MDS_GETSTATUS    = 40,
207   MDS_STATFS       = 41,
208   MDS_PIN          = 42,
209   MDS_UNPIN        = 43,
210   MDS_SYNC         = 44,
211   MDS_DONE_WRITING = 45,
212   MDS_SET_INFO     = 46,
213   MDS_QUOTACHECK   = 47,
214   MDS_QUOTACTL     = 48,
215   MDS_GETXATTR     = 49,
216   MDS_SETXATTR     = 50,
217   MDS_WRITEPAGE    = 51,
218   MDS_IS_SUBDIR    = 52,
219   MDS_GET_INFO     = 53,
220   MDS_LAST_OPC
221 } mds_cmd_t;
222
223 #define IT_OPEN     0x0001
224 #define IT_CREAT    0x0002
225 #define IT_READDIR  0x0004
226 #define IT_GETATTR  0x0008
227 #define IT_LOOKUP   0x0010
228 #define IT_UNLINK   0x0020
229 #define IT_GETXATTR 0x0040
230 #define IT_EXEC     0x0080
231 #define IT_PIN      0x0100
232
233
234
235 #define MDS_FIRST_OPC MDS_GETATTR
236 #define LDLM_FIRST_OPC LDLM_ENQUEUE
237
238 typedef enum {
239   REINT_SETATTR  = 1,
240   REINT_CREATE   = 2,
241   REINT_LINK     = 3,
242   REINT_UNLINK   = 4,
243   REINT_RENAME   = 5,
244   REINT_OPEN     = 6,
245   REINT_SETXATTR = 7,
246   //      REINT_CLOSE    = 8,
247   //      REINT_WRITE    = 9,
248   REINT_MAX
249 } mds_reint_t;
250
251 typedef enum {
252   LDLM_ENQUEUE     = 101,
253   LDLM_CONVERT     = 102,
254   LDLM_CANCEL      = 103,
255   LDLM_BL_CALLBACK = 104,
256   LDLM_CP_CALLBACK = 105,
257   LDLM_GL_CALLBACK = 106,
258   LDLM_LAST_OPC
259 } ldlm_cmd_t;
260 #define LDLM_FIRST_OPC LDLM_ENQUEUE
261
262 enum seq_rpc_opc {
263   SEQ_QUERY        = 700,
264   SEQ_LAST_OPC,
265   SEQ_FIRST_OPC    = SEQ_QUERY
266 };
267
268 enum fld_rpc_opc {
269   FLD_QUERY        = 900,
270   FLD_LAST_OPC,
271   FLD_FIRST_OPC    = FLD_QUERY
272 };
273
274 #define LDLM_FL_LOCK_CHANGED                      0x000001
275 #define LDLM_FL_BLOCK_GRANTED                     0x000002
276 #define LDLM_FL_BLOCK_CONV                        0x000004
277 #define LDLM_FL_BLOCK_WAIT                        0x000008
278 #define LDLM_FL_CBPENDING               0x000010
279 #define LDLM_FL_AST_SENT                          0x000020
280 #define LDLM_FL_WAIT_NOREPROC           0x000040
281 #define LDLM_FL_CANCEL                  0x000080
282 #define LDLM_FL_REPLAY                            0x000100
283 #define LDLM_FL_INTENT_ONLY                       0x000200
284 #define LDLM_FL_LOCAL_ONLY              0x000400
285 #define LDLM_FL_FAILED                  0x000800
286 #define LDLM_FL_HAS_INTENT                        0x001000
287 #define LDLM_FL_CANCELING               0x002000
288 #define LDLM_FL_LOCAL                   0x004000
289 #define LDLM_FL_WARN                    0x008000
290 #define LDLM_FL_DISCARD_DATA                      0x010000
291 #define LDLM_FL_NO_TIMEOUT                        0x020000
292 #define LDLM_FL_BLOCK_NOWAIT                      0x040000
293 #define LDLM_FL_TEST_LOCK                         0x080000
294 #define LDLM_FL_LVB_READY               0x100000
295 #define LDLM_FL_KMS_IGNORE              0x200000
296 #define LDLM_FL_NO_LRU                  0x400000
297 #define LDLM_FL_CANCEL_ON_BLOCK                   0x800000
298 #define LDLM_FL_CP_REQD                 0x1000000
299 #define LDLM_FL_CLEANED                 0x2000000
300 #define LDLM_FL_ATOMIC_CB               0x4000000
301 #define LDLM_FL_BL_AST                  0x10000000
302 #define LDLM_FL_BL_DONE                 0x20000000
303 #define LDLM_FL_DENY_ON_CONTENTION              0x40000000
304 #define LDLM_AST_DISCARD_DATA                   0x80000000
305
306
307 #define LDLM_ENQUEUE (101)
308 #define LDLM_CONVERT (102)
309 #define LDLM_CANCEL (103)
310 #define LDLM_BL_CALLBACK (104)
311 #define LDLM_CP_CALLBACK (105)
312 #define LDLM_GL_CALLBACK (106)
313 #define LCK_MINMODE (0)
314 #define LCK_EX (1)
315 #define LCK_PW (2)
316 #define LCK_PR (4)
317 #define LCK_CW (8)
318 #define LCK_CR (16)
319 #define LCK_NL (32)
320 #define LCK_GROUP (64)
321 #define LDLM_PLAIN (10)
322 #define LDLM_EXTENT (11)
323 #define LDLM_FLOCK (12)
324 #define LDLM_IBITS (13)
325 //#define MGS_CONNECT (250)
326 #define OBD_PING (400)
327
328 /*
329  * Opcodes for mountconf (mgs and mgc)
330  */
331 typedef enum {
332   MGS_CONNECT = 250,
333   MGS_DISCONNECT,
334   MGS_EXCEPTION,         /* node died, etc. */
335   MGS_TARGET_REG,        /* whenever target starts up */
336   MGS_TARGET_DEL,
337   MGS_SET_INFO,
338   MGS_CONFIG_READ,
339   MGS_LAST_OPC
340 } mgs_cmd_t;
341 #define MGS_FIRST_OPC MGS_CONNECT
342
343 /* llog protocol */
344 typedef enum {
345   LLOG_ORIGIN_HANDLE_CREATE       = 501,
346   LLOG_ORIGIN_HANDLE_NEXT_BLOCK   = 502,
347   LLOG_ORIGIN_HANDLE_READ_HEADER  = 503,
348   LLOG_ORIGIN_HANDLE_WRITE_REC    = 504,
349   LLOG_ORIGIN_HANDLE_CLOSE        = 505,
350   LLOG_ORIGIN_CONNECT             = 506,
351   LLOG_CATINFO                    = 507,  /* for lfs catinfo */
352   LLOG_ORIGIN_HANDLE_PREV_BLOCK   = 508,
353   LLOG_ORIGIN_HANDLE_DESTROY      = 509,  /* for destroy llog object*/
354   LLOG_LAST_OPC
355 } llog_cmd_t;
356
357 #define LLOG_FIRST_OPC LLOG_ORIGIN_HANDLE_CREATE
358 /*flag for the LLOG*/
359 #define LLOG_OP_MAGIC 0x10600000
360 #define LLOG_OP_MASK  0xfff00000
361
362 typedef enum {
363   LLOG_PAD_MAGIC   = LLOG_OP_MAGIC | 0x00000,
364   OST_SZ_REC       = LLOG_OP_MAGIC | 0x00f00,
365   OST_RAID1_REC    = LLOG_OP_MAGIC | 0x01000,
366   MDS_UNLINK_REC   = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_UNLINK,
367   MDS_SETATTR_REC  = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_SETATTR,
368   OBD_CFG_REC      = LLOG_OP_MAGIC | 0x20000,
369   PTL_CFG_REC      = LLOG_OP_MAGIC | 0x30000, /* obsolete */
370   LLOG_GEN_REC     = LLOG_OP_MAGIC | 0x40000,
371   LLOG_JOIN_REC    = LLOG_OP_MAGIC | 0x50000, /* obsolete */
372   LLOG_HDR_MAGIC   = LLOG_OP_MAGIC | 0x45539,
373   LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
374 } llog_op_type;
375
376 /* LLOG flag */
377 /*defined in lustre/include/lustre/lustre_idl.h*/
378 #define LLOG_F_ZAP_WHEN_EMPTY   0x1
379 #define LLOG_F_IS_CAT           0x2
380 #define LLOG_F_IS_PLAIN         0x4
381
382 #define PTL_RPC_MSG_REQUEST 4711
383 #define PTL_RPC_MSG_ERR 4712
384 #define PTL_RPC_MSG_REPLY 4713
385
386
387 /* Ett declarations */
388 static gint ett_lustre_llog_log_llh_flags = -1 ;
389 static gint ett_lustre = -1;
390 static gint ett_lustre_lustre_handle_cookie = -1;
391 static gint ett_lustre_lustre_msg_v1 = -1;
392 static gint ett_lustre_lustre_handle_v1 = -1;
393 static gint ett_lustre_lustre_msg_v2 = -1;
394 static gint ett_lustre_ptlrpc_body = -1;
395 static gint ett_lustre_lustre_handle_v2 = -1;
396 static gint ett_lustre_obd_connect_data = -1;
397 static gint ett_lustre_lov_mds_md_v1 = -1;
398 static gint ett_lustre_lov_ost_data_v1 = -1;
399 static gint ett_lustre_obd_statfs = -1;
400 static gint ett_lustre_obd_ioobj = -1;
401 static gint ett_lustre_niobuf_remote = -1;
402 static gint ett_lustre_ost_lvb = -1;
403 static gint ett_lustre_ll_fid = -1;
404 static gint ett_lustre_mdt_body = -1;
405 static gint ett_lustre_mdt_rec_setattr = -1;
406 static gint ett_lustre_mdt_rec_create = -1;
407 static gint ett_lustre_mdt_rec_link = -1;
408 static gint ett_lustre_mdt_rec_unlink = -1;
409 static gint ett_lustre_mdt_rec_rename = -1;
410 static gint ett_lustre_mdt_rec_setxattr = -1;
411 static gint ett_lustre_obd_quotactl = -1;
412 static gint ett_lustre_obd_dqinfo = -1;
413 static gint ett_lustre_obd_dqblk = -1;
414 static gint ett_lustre_quota_adjust_qunit = -1;
415 static gint ett_lustre_lov_desc = -1;
416 static gint ett_lustre_obd_uuid = -1;
417 static gint ett_lustre_ldlm_res_id = -1;
418 static gint ett_lustre_ldlm_extent = -1;
419 static gint ett_lustre_ldlm_inodebits = -1;
420 static gint ett_lustre_ldlm_flock = -1;
421 static gint ett_lustre_ldlm_intent_opc = -1;
422 static gint ett_lustre_ldlm_resource_desc = -1;
423 static gint ett_lustre_ldlm_lock_desc = -1;
424 static gint ett_lustre_ldlm_request = -1;
425 static gint ett_lustre_lustre_handle = -1;
426 static gint ett_lustre_ldlm_reply = -1;
427 static gint ett_lustre_mgs_send_param = -1;
428 static gint ett_lustre_mgs_target_info = -1;
429 static gint ett_lustre_mgs_config_body = -1;
430 static gint ett_lustre_mgs_config_res = -1;
431 static gint ett_lustre_cfg_marker = -1;
432 static gint ett_lustre_llog_catid = -1;
433 static gint ett_lustre_llog_rec_hdr = -1;
434 static gint ett_lustre_llog_logid_rec = -1;
435 static gint ett_lustre_llog_logid = -1;
436 static gint ett_lustre_llog_rec_tail = -1;
437 static gint ett_lustre_lov_mds_md = -1;
438 static gint ett_lustre_llog_create_rec = -1;
439 static gint ett_lustre_llog_orphan_rec = -1;
440 static gint ett_lustre_llog_unlink_rec = -1;
441 static gint ett_lustre_llog_setattr_rec = -1;
442 static gint ett_lustre_llog_size_change_rec = -1;
443 static gint ett_lustre_llog_gen_rec = -1;
444 static gint ett_lustre_llog_log_hdr = -1;
445 static gint ett_lustre_llog_cookie = -1;
446 static gint ett_lustre_llogd_body = -1;
447 static gint ett_lustre_llogd_conn_body = -1;
448 static gint ett_lustre_llog_gen = -1;
449 static gint ett_lustre_obdo = -1;
450 static gint ett_lustre_ost_body = -1;
451 static gint ett_lustre_qunit_data = -1;
452 static gint ett_lustre_qunit_data_old2 = -1;
453 static gint ett_lustre_qunit_data_old = -1;
454 static gint ett_lustre_ldlm_lock_flags = -1 ;
455 static gint ett_lustre_seq_range = -1;
456 static gint ett_lustre_fld_range = -1;
457 static gint ett_lustre_mdt_ioepoch = -1;
458 static gint ett_lustre_capa = -1;
459 static gint ett_lustre_acl = -1;
460
461 /* -----------------------------------------------*/
462 /* Header field declarations */
463 static int hf_lustre_ptlrpc_body_pb = -1 ;
464 static int hf_lustre_ost_body = -1 ;
465 static int hf_lustre_obd_statfs = -1 ;
466 static int hf_lustre_obd_quotactl = -1 ;
467 static int hf_lustre_quota_adjust_qunit = -1 ;
468 static int hf_lustre_extra_padding = -1 ;
469 static int hf_lustre_ldlm_reply = -1 ;
470 static int hf_lustre_ldlm_request = -1 ;
471 static int hf_lustre_obd_uuid = -1 ;
472 static int hf_lustre_obd_connect_data = -1 ;
473 static int hf_lustre_ldlm_intent = -1;
474 static int hf_lustre_obd_ioobj = -1 ;
475 static int hf_lustre_niobuf_remote = -1 ;
476 static int hf_lustre_ost_key = -1 ;
477 static int hf_lustre_nio= -1 ;
478 static int hf_lustre_ost_val= -1;
479 static int hf_lustre_llogd_body = -1;
480 static int hf_lustre_llogd_log_hdr= -1;
481 static int hf_lustre_llog_logid_rec =-1 ;
482 static int hf_lustre_llogd_chunk= -1;
483 static int hf_lustre_llogd_keyword= -1;
484 static int hf_lustre_llogd_client= -1;
485 static int hf_lustre_llogd_name= -1;
486
487 static int hf_lustre_mds_xattr_name = -1;
488 static int hf_lustre_lov_mds_md_v1= -1;
489 static int hf_lustre_llog_cookie= -1;
490 static int hf_lustre_mds_md_data= -1;
491 static int hf_lustre_mds_reint_opcode= -1;
492 static int hf_lustre_mds_xattr_eadata = -1;
493
494 static int hf_lustre_reint_name= -1;
495 static int hf_lustre_reint_old_name= -1;
496 static int hf_lustre_reint_new_name= -1;
497
498 static int hf_lustre_mgs_target_info = -1 ;
499 static int hf_lustre_mgs_send_param = -1;
500
501 static int hf_lustre_mgs_config_body = -1;
502 static int hf_lustre_mgs_config_body_name = -1;
503 static int hf_lustre_mgs_config_body_offset = -1;
504 static int hf_lustre_mgs_config_body_type = -1;
505 static int hf_lustre_mgs_config_body_reserved = -1;
506 static int hf_lustre_mgs_config_body_bits = -1;
507 static int hf_lustre_mgs_config_body_units = -1;
508
509 static int hf_lustre_mgs_config_res = -1;
510 static int hf_lustre_mgs_config_res_offset = -1;
511 static int hf_lustre_mgs_config_res_size = -1;
512
513 static int hf_lustre_ost_lvb = -1 ;
514
515 static int hf_lustre_ldlm_fl_lock_changed        = -1;
516 static int hf_lustre_ldlm_fl_block_granted       = -1;
517 static int hf_lustre_ldlm_fl_block_conv          = -1;
518 static int hf_lustre_ldlm_fl_block_wait          = -1;
519 static int hf_lustre_ldlm_fl_cbpending           = -1;
520 static int hf_lustre_ldlm_fl_ast_sent            = -1;
521 static int hf_lustre_ldlm_fl_wait_noreproc       = -1;
522 static int hf_lustre_ldlm_fl_cancel              = -1;
523 static int hf_lustre_ldlm_fl_replay              = -1;
524 static int hf_lustre_ldlm_fl_intent_only         = -1;
525 static int hf_lustre_ldlm_fl_local_only          = -1;
526 static int hf_lustre_ldlm_fl_failed              = -1;
527 static int hf_lustre_ldlm_fl_has_intent          = -1;
528 static int hf_lustre_ldlm_fl_canceling           = -1;
529 static int hf_lustre_ldlm_fl_local               = -1;
530 static int hf_lustre_ldlm_fl_warn                = -1;
531 static int hf_lustre_ldlm_fl_discard_data        = -1;
532 static int hf_lustre_ldlm_fl_no_timeout          = -1;
533 static int hf_lustre_ldlm_fl_block_nowait        = -1;
534 static int hf_lustre_ldlm_fl_test_lock           = -1;
535 static int hf_lustre_ldlm_fl_lvb_ready           = -1;
536 static int hf_lustre_ldlm_fl_kms_ignore          = -1;
537 static int hf_lustre_ldlm_fl_no_lru              = -1;
538 static int hf_lustre_ldlm_fl_cancel_on_block     = -1;
539 static int hf_lustre_ldlm_fl_cp_reqd             = -1;
540 static int hf_lustre_ldlm_fl_cleaned             = -1;
541 static int hf_lustre_ldlm_fl_atomic_cb           = -1;
542 static int hf_lustre_ldlm_fl_bl_ast              = -1;
543 static int hf_lustre_ldlm_fl_bl_done             = -1;
544 static int hf_lustre_ldlm_fl_deny_on_contention  = -1;
545 static int hf_lustre_ldlm_ast_discard_data       = -1;
546
547 static int hf_lustre_mdt_body = -1 ;
548 static int hf_lustre_mdt_body_fid1 = -1;
549 static int hf_lustre_mdt_body_fid2 = -1;
550 static int hf_lustre_mdt_body_handle = -1;
551 static int hf_lustre_mdt_body_valid = -1;
552 static int hf_lustre_mdt_body_size = -1;
553 static int hf_lustre_mdt_body_mtime = -1;
554 static int hf_lustre_mdt_body_atime = -1;
555 static int hf_lustre_mdt_body_ctime = -1;
556 static int hf_lustre_mdt_body_blocks = -1;
557 static int hf_lustre_mdt_body_ioepoch = -1;
558 static int hf_lustre_mdt_body_ino = -1;
559 static int hf_lustre_mdt_body_fsuid = -1;
560 static int hf_lustre_mdt_body_fsgid = -1;
561 static int hf_lustre_mdt_body_capability = -1;
562 static int hf_lustre_mdt_body_mode = -1;
563 static int hf_lustre_mdt_body_uid = -1;
564 static int hf_lustre_mdt_body_gid = -1;
565 static int hf_lustre_mdt_body_flags = -1;
566 static int hf_lustre_mdt_body_rdev = -1;
567 static int hf_lustre_mdt_body_nlink = -1;
568 static int hf_lustre_mdt_body_generation = -1;
569 static int hf_lustre_mdt_body_suppgid = -1;
570 static int hf_lustre_mdt_body_eadatasize = -1;
571 static int hf_lustre_mdt_body_aclsize = -1;
572 static int hf_lustre_mdt_body_max_mdsize = -1;
573 static int hf_lustre_mdt_body_max_cookiesize = -1;
574 static int hf_lustre_mdt_body_uid_h = -1;
575 static int hf_lustre_mdt_body_gid_h = -1;
576 static int hf_lustre_mdt_body_padding_5 = -1;
577 static int hf_lustre_mdt_body_padding_6 = -1;
578 static int hf_lustre_mdt_body_padding_7 = -1;
579 static int hf_lustre_mdt_body_padding_8 = -1;
580 static int hf_lustre_mdt_body_padding_9 = -1;
581 static int hf_lustre_mdt_body_padding_10 = -1;
582
583 static int hf_lustre_mdt_rec_setattr = -1 ;
584 static int hf_lustre_mdt_rec_setattr_sa_opcode = -1;
585 static int hf_lustre_mdt_rec_setattr_sa_cap = -1;
586 static int hf_lustre_mdt_rec_setattr_sa_fsuid = -1;
587 static int hf_lustre_mdt_rec_setattr_sa_fsuid_h = -1;
588 static int hf_lustre_mdt_rec_setattr_sa_fsgid = -1;
589 static int hf_lustre_mdt_rec_setattr_sa_fsgid_h = -1;
590 static int hf_lustre_mdt_rec_setattr_sa_suppgid = -1;
591 static int hf_lustre_mdt_rec_setattr_sa_suppgid_h = -1;
592 static int hf_lustre_mdt_rec_setattr_sa_padding_1 = -1;
593 static int hf_lustre_mdt_rec_setattr_sa_padding_1_h = -1;
594 static int hf_lustre_mdt_rec_setattr_sa_fid = -1;
595 static int hf_lustre_mdt_rec_setattr_sa_valid = -1;
596 static int hf_lustre_mdt_rec_setattr_sa_uid = -1;
597 static int hf_lustre_mdt_rec_setattr_sa_gid = -1;
598 static int hf_lustre_mdt_rec_setattr_sa_size = -1;
599 static int hf_lustre_mdt_rec_setattr_sa_blocks = -1;
600 static int hf_lustre_mdt_rec_setattr_sa_mtime = -1;
601 static int hf_lustre_mdt_rec_setattr_sa_atime = -1;
602 static int hf_lustre_mdt_rec_setattr_sa_ctime = -1;
603 static int hf_lustre_mdt_rec_setattr_sa_attr_flags = -1;
604 static int hf_lustre_mdt_rec_setattr_sa_mode = -1;
605 static int hf_lustre_mdt_rec_setattr_sa_padding_2 = -1;
606 static int hf_lustre_mdt_rec_setattr_sa_padding_3 = -1;
607 static int hf_lustre_mdt_rec_setattr_sa_padding_4 = -1;
608 static int hf_lustre_mdt_rec_setattr_sa_padding_5 = -1;
609
610 static int hf_lustre_mdt_rec_create = -1 ;
611 static int hf_lustre_mdt_rec_create_cr_opcode = -1;
612 static int hf_lustre_mdt_rec_create_cr_cap = -1;
613 static int hf_lustre_mdt_rec_create_cr_fsuid = -1;
614 static int hf_lustre_mdt_rec_create_cr_fsuid_h = -1;
615 static int hf_lustre_mdt_rec_create_cr_fsgid = -1;
616 static int hf_lustre_mdt_rec_create_cr_fsgid_h = -1;
617 static int hf_lustre_mdt_rec_create_cr_suppgid1 = -1;
618 static int hf_lustre_mdt_rec_create_cr_suppgid1_h = -1;
619 static int hf_lustre_mdt_rec_create_cr_suppgid2 = -1;
620 static int hf_lustre_mdt_rec_create_cr_suppgid2_h = -1;
621 static int hf_lustre_mdt_rec_create_cr_fid1 = -1;
622 static int hf_lustre_mdt_rec_create_cr_fid2 = -1;
623 static int hf_lustre_mdt_rec_create_cr_old_handle = -1;
624 static int hf_lustre_mdt_rec_create_cr_time = -1;
625 static int hf_lustre_mdt_rec_create_cr_rdev = -1;
626 static int hf_lustre_mdt_rec_create_cr_ioepoch = -1;
627 static int hf_lustre_mdt_rec_create_cr_padding_1 = -1;
628 static int hf_lustre_mdt_rec_create_cr_mode = -1;
629 static int hf_lustre_mdt_rec_create_cr_bias = -1;
630 static int hf_lustre_mdt_rec_create_cr_flags_l = -1;
631 static int hf_lustre_mdt_rec_create_cr_flags_h = -1;
632 static int hf_lustre_mdt_rec_create_cr_umask = -1;
633 static int hf_lustre_mdt_rec_create_cr_padding_4 = -1;
634
635 static int hf_lustre_mdt_rec_link = -1 ;
636 static int hf_lustre_mdt_rec_link_lk_opcode = -1;
637 static int hf_lustre_mdt_rec_link_lk_cap = -1;
638 static int hf_lustre_mdt_rec_link_lk_fsuid = -1;
639 static int hf_lustre_mdt_rec_link_lk_fsuid_h = -1;
640 static int hf_lustre_mdt_rec_link_lk_fsgid = -1;
641 static int hf_lustre_mdt_rec_link_lk_fsgid_h = -1;
642 static int hf_lustre_mdt_rec_link_lk_suppgid1 = -1;
643 static int hf_lustre_mdt_rec_link_lk_suppgid1_h = -1;
644 static int hf_lustre_mdt_rec_link_lk_suppgid2 = -1;
645 static int hf_lustre_mdt_rec_link_lk_suppgid2_h = -1;
646 static int hf_lustre_mdt_rec_link_lk_fid1 = -1;
647 static int hf_lustre_mdt_rec_link_lk_fid2 = -1;
648 static int hf_lustre_mdt_rec_link_lk_time = -1;
649 static int hf_lustre_mdt_rec_link_lk_padding_1 = -1;
650 static int hf_lustre_mdt_rec_link_lk_padding_2 = -1;
651 static int hf_lustre_mdt_rec_link_lk_padding_3 = -1;
652 static int hf_lustre_mdt_rec_link_lk_padding_4 = -1;
653 static int hf_lustre_mdt_rec_link_lk_bias = -1;
654 static int hf_lustre_mdt_rec_link_lk_padding_5 = -1;
655 static int hf_lustre_mdt_rec_link_lk_padding_6 = -1;
656 static int hf_lustre_mdt_rec_link_lk_padding_7 = -1;
657 static int hf_lustre_mdt_rec_link_lk_padding_8 = -1;
658 static int hf_lustre_mdt_rec_link_lk_padding_9 = -1;
659
660 static int hf_lustre_mdt_rec_unlink = -1 ;
661 static int hf_lustre_mdt_rec_unlink_ul_opcode = -1;
662 static int hf_lustre_mdt_rec_unlink_ul_cap = -1;
663 static int hf_lustre_mdt_rec_unlink_ul_fsuid = -1;
664 static int hf_lustre_mdt_rec_unlink_ul_fsuid_h = -1;
665 static int hf_lustre_mdt_rec_unlink_ul_fsgid = -1;
666 static int hf_lustre_mdt_rec_unlink_ul_fsgid_h = -1;
667 static int hf_lustre_mdt_rec_unlink_ul_suppgid1 = -1;
668 static int hf_lustre_mdt_rec_unlink_ul_suppgid1_h = -1;
669 static int hf_lustre_mdt_rec_unlink_ul_suppgid2 = -1;
670 static int hf_lustre_mdt_rec_unlink_ul_suppgid2_h = -1;
671 static int hf_lustre_mdt_rec_unlink_ul_fid1 = -1;
672 static int hf_lustre_mdt_rec_unlink_ul_fid2 = -1;
673 static int hf_lustre_mdt_rec_unlink_ul_time = -1;
674 static int hf_lustre_mdt_rec_unlink_ul_padding_2 = -1;
675 static int hf_lustre_mdt_rec_unlink_ul_padding_3 = -1;
676 static int hf_lustre_mdt_rec_unlink_ul_padding_4 = -1;
677 static int hf_lustre_mdt_rec_unlink_ul_padding_5 = -1;
678 static int hf_lustre_mdt_rec_unlink_ul_bias = -1;
679 static int hf_lustre_mdt_rec_unlink_ul_mode = -1;
680 static int hf_lustre_mdt_rec_unlink_ul_padding_6 = -1;
681 static int hf_lustre_mdt_rec_unlink_ul_padding_7 = -1;
682 static int hf_lustre_mdt_rec_unlink_ul_padding_8 = -1;
683 static int hf_lustre_mdt_rec_unlink_ul_padding_9 = -1;
684
685 static int hf_lustre_mdt_rec_rename = -1 ;
686 static int hf_lustre_mdt_rec_rename_rn_opcode = -1;
687 static int hf_lustre_mdt_rec_rename_rn_cap = -1;
688 static int hf_lustre_mdt_rec_rename_rn_fsuid = -1;
689 static int hf_lustre_mdt_rec_rename_rn_fsuid_h = -1;
690 static int hf_lustre_mdt_rec_rename_rn_fsgid = -1;
691 static int hf_lustre_mdt_rec_rename_rn_fsgid_h = -1;
692 static int hf_lustre_mdt_rec_rename_rn_suppgid1 = -1;
693 static int hf_lustre_mdt_rec_rename_rn_suppgid1_h = -1;
694 static int hf_lustre_mdt_rec_rename_rn_suppgid2 = -1;
695 static int hf_lustre_mdt_rec_rename_rn_suppgid2_h = -1;
696 static int hf_lustre_mdt_rec_rename_rn_fid1 = -1;
697 static int hf_lustre_mdt_rec_rename_rn_fid2 = -1;
698 static int hf_lustre_mdt_rec_rename_rn_time = -1;
699 static int hf_lustre_mdt_rec_rename_rn_padding_1 = -1;
700 static int hf_lustre_mdt_rec_rename_rn_padding_2 = -1;
701 static int hf_lustre_mdt_rec_rename_rn_padding_3 = -1;
702 static int hf_lustre_mdt_rec_rename_rn_padding_4 = -1;
703 static int hf_lustre_mdt_rec_rename_rn_bias = -1;
704 static int hf_lustre_mdt_rec_rename_rn_mode = -1;
705 static int hf_lustre_mdt_rec_rename_rn_padding_5 = -1;
706 static int hf_lustre_mdt_rec_rename_rn_padding_6 = -1;
707 static int hf_lustre_mdt_rec_rename_rn_padding_7 = -1;
708 static int hf_lustre_mdt_rec_rename_rn_padding_8 = -1;
709
710 static int hf_lustre_mdt_rec_setxattr = -1 ;
711 static int hf_lustre_mdt_rec_setxattr_sx_opcode = -1;
712 static int hf_lustre_mdt_rec_setxattr_sx_cap = -1;
713 static int hf_lustre_mdt_rec_setxattr_sx_fsuid = -1;
714 static int hf_lustre_mdt_rec_setxattr_sx_fsuid_h = -1;
715 static int hf_lustre_mdt_rec_setxattr_sx_fsgid = -1;
716 static int hf_lustre_mdt_rec_setxattr_sx_fsgid_h = -1;
717 static int hf_lustre_mdt_rec_setxattr_sx_suppgid1 = -1;
718 static int hf_lustre_mdt_rec_setxattr_sx_suppgid1_h = -1;
719 static int hf_lustre_mdt_rec_setxattr_sx_suppgid2 = -1;
720 static int hf_lustre_mdt_rec_setxattr_sx_suppgid2_h = -1;
721 static int hf_lustre_mdt_rec_setxattr_sx_fid = -1;
722 static int hf_lustre_mdt_rec_setxattr_sx_padding_1 = -1;
723 static int hf_lustre_mdt_rec_setxattr_sx_padding_2 = -1;
724 static int hf_lustre_mdt_rec_setxattr_sx_padding_3 = -1;
725 static int hf_lustre_mdt_rec_setxattr_sx_valid = -1;
726 static int hf_lustre_mdt_rec_setxattr_sx_time = -1;
727 static int hf_lustre_mdt_rec_setxattr_sx_padding_5 = -1;
728 static int hf_lustre_mdt_rec_setxattr_sx_padding_6 = -1;
729 static int hf_lustre_mdt_rec_setxattr_sx_padding_7 = -1;
730 static int hf_lustre_mdt_rec_setxattr_sx_size = -1;
731 static int hf_lustre_mdt_rec_setxattr_sx_flags = -1;
732 static int hf_lustre_mdt_rec_setxattr_sx_padding_8 = -1;
733 static int hf_lustre_mdt_rec_setxattr_sx_padding_9 = -1;
734 static int hf_lustre_mdt_rec_setxattr_sx_padding_10 = -1;
735 static int hf_lustre_mdt_rec_setxattr_sx_padding_11 = -1;
736
737 static int hf_lustre_seq_opc = -1;
738 static int hf_lustre_seq_range = -1;
739 static int hf_lustre_seq_range_start = -1;
740 static int hf_lustre_seq_range_end = -1;
741 static int hf_lustre_seq_range_index = -1;
742 static int hf_lustre_seq_range_flags = -1;
743
744 static int hf_lustre_fld_opc = -1;
745 static int hf_lustre_fld_range = -1;
746 static int hf_lustre_fld_range_start = -1;
747 static int hf_lustre_fld_range_end = -1;
748 static int hf_lustre_fld_range_index = -1;
749 static int hf_lustre_fld_range_flags = -1;
750
751 static int hf_lustre_mdt_ioepoch = -1;
752 static int hf_lustre_mdt_ioepoch_handle = -1;
753 static int hf_lustre_mdt_ioepoch_ioepoch = -1;
754 static int hf_lustre_mdt_ioepoch_flags = -1;
755 static int hf_lustre_mdt_ioepoch_padding = -1;
756
757 static int hf_lustre_capa = -1;
758 static int hf_lustre_capa_fid = -1;
759 static int hf_lustre_capa_opc = -1;
760 static int hf_lustre_capa_uid = -1;
761 static int hf_lustre_capa_gid = -1;
762 static int hf_lustre_capa_flags = -1;
763 static int hf_lustre_capa_keyid = -1;
764 static int hf_lustre_capa_timeout = -1;
765 static int hf_lustre_capa_expiry = -1;
766 static int hf_lustre_capa_hmac = -1;
767
768 static int hf_lustre_acl = -1;
769
770 static int hf_lustre_lustre_handle_cookie = -1;
771 static int hf_lustre_ptlrpc_body_pb_last_committed = -1;
772 static int hf_lustre_ptlrpc_body_pb_version = -1;
773 static int hf_lustre_lustre_msg_v1_lm_bufcount = -1;
774 static int hf_lustre_obd_ioobj_ioo_id = -1;
775 static int hf_lustre_ptlrpc_body_pb_slv = -1;
776 static int hf_lustre_ptlrpc_body_pb_pre_version = -1;
777 static int hf_lustre_ptlrpc_body_pb_padding = -1;
778 static int hf_lustre_ptlrpc_body_pb_jobid = -1;
779 static int hf_lustre_lustre_msg_v1_lm_handle = -1;
780 static int hf_lustre_ost_lvb_lvb_atime = -1;
781 static int hf_lustre_ptlrpc_body_pb_timeout = -1;
782 static int hf_lustre_obd_statfs_os_bavail = -1;
783 static int hf_lustre_obd_statfs_os_bsize = -1;
784 static int hf_lustre_lustre_msg_v2_lm_repsize = -1;
785 static int hf_lustre_lov_mds_md_v1_lmm_stripe_size = -1;
786 static int hf_lustre_lustre_msg_v1_lm_last_xid = -1;
787 static int hf_lustre_ll_fid_f_type = -1;
788 static int hf_lustre_lustre_msg_v2_lm_cksum = -1;
789 static int hf_lustre_lustre_msg_v2_lm_buflens = -1;
790 static int hf_lustre_lustre_msg_v1_lm_status = -1;
791 static int hf_lustre_lustre_msg_v1_lm_type = -1;
792 static int hf_lustre_niobuf_remote_len = -1;
793 static int hf_lustre_lov_mds_md_v1_lmm_magic = -1;
794 static int hf_lustre_ptlrpc_body_pb_op_flags = -1;
795 static int hf_lustre_ost_lvb_lvb_ctime = -1;
796 static int hf_lustre_ptlrpc_body_pb_type = -1;
797 static int hf_lustre_obd_connect_data_ocd_nllg = -1;
798 static int hf_lustre_obd_connect_data_ocd_nllu = -1;
799 static int hf_lustre_ll_fid_generation = -1;
800 static int hf_lustre_ost_lvb_lvb_mtime = -1;
801 static int hf_lustre_obd_connect_data_ocd_ibits_known = -1;
802 static int hf_lustre_lustre_msg_v2_lm_padding_3 = -1;
803 static int hf_lustre_ptlrpc_body_pb_flags = -1;
804 static int hf_lustre_obd_statfs_os_spare4 = -1;
805 static int hf_lustre_obd_connect_data_ocd_group = -1;
806 static int hf_lustre_lov_ost_data_v1_l_object_seq = -1;
807 static int hf_lustre_lov_mds_md_v1_lmm_object_seq = -1;
808 static int hf_lustre_obd_connect_data_ocd_brw_size = -1;
809 static int hf_lustre_ptlrpc_body_pb_limit = -1;
810 static int hf_lustre_obd_statfs_os_maxbytes = -1;
811 static int hf_lustre_obd_statfs_os_spare5 = -1;
812 static int hf_lustre_lustre_msg_v2_lm_flags = -1;
813 static int hf_lustre_obd_statfs_os_ffree = -1;
814 static int hf_lustre_obd_statfs_os_files = -1;
815 static int hf_lustre_lov_mds_md_v1_lmm_stripe_count = -1;
816 static int hf_lustre_lustre_msg_v1_lm_flags = -1;
817 static int hf_lustre_lustre_msg_v1_lm_last_committed = -1;
818 static int hf_lustre_obd_statfs_os_spare9 = -1;
819 static int hf_lustre_obd_connect_data_ocd_index = -1;
820 static int hf_lustre_opnum = -1;
821 static int hf_lustre_lustre_msg_v1_lm_buflens = -1;
822 static int hf_lustre_obd_statfs_os_spare1 = -1;
823 static int hf_lustre_obd_statfs_os_spare8 = -1;
824 static int hf_lustre_lustre_msg_v1_lm_conn_cnt = -1;
825 static int hf_lustre_ptlrpc_body_pb_transno = -1;
826 static int hf_lustre_ptlrpc_body_pb_service_time = -1;
827 static int hf_lustre_ptlrpc_body_pb_conn_cnt = -1;
828 static int hf_lustre_ptlrpc_body_pb_opc = -1;
829 static int hf_lustre_obd_connect_data_ocd_connect_flags = -1;
830 static int hf_lustre_lov_ost_data_v1_l_object_id = -1;
831 static int hf_lustre_lov_ost_data_v1_l_ost_gen = -1;
832 static int hf_lustre_obd_statfs_os_bfree = -1;
833 static int hf_lustre_obd_connect_data_ocd_version = -1;
834 static int hf_lustre_lov_mds_md_v1_lmm_objects = -1;
835 static int hf_lustre_obd_statfs_os_namelen = -1;
836 static int hf_lustre_obd_statfs_os_blocks = -1;
837 static int hf_lustre_lustre_msg_v2_lm_secflvr = -1;
838 static int hf_lustre_lustre_msg_v1_lm_transno = -1;
839 static int hf_lustre_lov_mds_md_v1_lmm_pattern = -1;
840 static int hf_lustre_lustre_msg_v1_lm_opc = -1;
841 static int hf_lustre_obd_connect_data_ocd_grant = -1;
842 static int hf_lustre_obd_ioobj_ioo_bufcnt = -1;
843 static int hf_lustre_lustre_msg_v1_lm_version = -1;
844 static int hf_lustre_obd_statfs_os_spare7 = -1;
845 static int hf_lustre_obd_statfs_os_fsid = -1;
846 static int hf_lustre_obd_connect_data_ocd_cksum_types = -1;
847 static int hf_lustre_ost_lvb_lvb_size = -1;
848 static int hf_lustre_obd_statfs_os_type = -1;
849 static int hf_lustre_obd_statfs_os_spare6 = -1;
850 static int hf_lustre_obd_statfs_os_state = -1;
851 static int hf_lustre_obd_statfs_os_spare3 = -1;
852 static int hf_lustre_lustre_msg_v2_lm_magic = -1;
853 static int hf_lustre_lov_mds_md_v1_lmm_object_id = -1;
854 static int hf_lustre_ptlrpc_body_pb_last_seen = -1;
855 static int hf_lustre_obd_ioobj_ioo_type = -1;
856 static int hf_lustre_ptlrpc_body_pb_last_xid = -1;
857 static int hf_lustre_ptlrpc_body_pb_status = -1;
858 static int hf_lustre_niobuf_remote_flags = -1;
859 static int hf_lustre_ll_fid_id = -1;
860 static int hf_lustre_ost_lvb_lvb_blocks = -1;
861 static int hf_lustre_lustre_msg_v2_lm_padding_2 = -1;
862 static int hf_lustre_obd_connect_data_padding1 = -1;
863 static int hf_lustre_lov_ost_data_v1_l_ost_idx = -1;
864 static int hf_lustre_obd_connect_data_padding2 = -1;
865 static int hf_lustre_obd_ioobj_ioo_seq = -1;
866 static int hf_lustre_niobuf_remote_offset=-1;
867 static int hf_lustre_obd_statfs_os_spare2 = -1;
868 static int hf_lustre_lustre_msg_v2_lm_bufcount = -1;
869 static int hf_lustre_ptlrpc_body_pb_handle = -1;
870 static int hf_lustre_obd_connect_data_ocd_transno = -1;
871 static int hf_lustre_lustre_msg_v1_lm_magic = -1;
872 static int hf_lustre_llog_unlink_rec_lur_tail = -1;
873 static int hf_lustre_llog_size_change_rec_lsc_io_epoch = -1;
874 static int hf_lustre_mgs_target_info_mti_flags = -1;
875 static int hf_lustre_ldlm_reply_lock_policy_res1 = -1;
876 static int hf_lustre_llogd_body_lgd_len = -1;
877 static int hf_lustre_qunit_data_old_qd_id = -1;
878 static int hf_lustre_llog_logid_rec_padding1 = -1;
879 static int hf_lustre_quota_adjust_qunit_padding1 = -1;
880 static int hf_lustre_llog_size_change_rec_lsc_fid = -1;
881 static int hf_lustre_llog_rec_hdr_padding = -1;
882 static int hf_lustre_obdo_o_nlink = -1;
883 static int hf_lustre_ldlm_extent_gid = -1;
884 static int hf_lustre_obdo_o_uid = -1;
885 static int hf_lustre_obdo_o_valid = -1;
886 static int hf_lustre_ldlm_reply_lock_flags = -1;
887 static int hf_lustre_obdo_o_misc = -1;
888
889 static int hf_lustre_ldlm_request_lock_handle = -1;
890 static int hf_lustre_llog_logid_lgl_oid = -1;
891 static int hf_lustre_ldlm_inodebits_bits = -1;
892 static int hf_lustre_llog_log_hdr_llh_count = -1;
893 static int hf_lustre_llog_gen_rec_lgr_tail = -1;
894 static int hf_lustre_llog_catid_lci_padding3 = -1;
895 static int hf_lustre_qunit_data_qd_qunit = -1;
896 static int hf_lustre_llog_setattr_rec_padding = -1;
897 static int hf_lustre_llog_cookie_lgc_lgl = -1;
898 static int hf_lustre_obd_quotactl_qc_dqinfo = -1;
899 static int hf_lustre_llog_log_hdr_llh_bitmap = -1;
900 static int hf_lustre_obd_quotactl_qc_stat = -1;
901 static int hf_lustre_qunit_data_old2_qd_id = -1;
902 static int hf_lustre_llog_logid_rec_padding2 = -1;
903 static int hf_lustre_llog_orphan_rec_lor_tail = -1;
904 static int hf_lustre_llog_logid_rec_padding5 = -1;
905 static int hf_lustre_ldlm_intent_opc = -1;
906 static int hf_lustre_llog_rec_hdr_lrh_type = -1;
907 static int hf_lustre_llog_rec_hdr_lrh_len = -1;
908 static int hf_lustre_llog_setattr_rec_lsr_uid = -1;
909 static int hf_lustre_lov_desc_ld_padding_1 = -1;
910 static int hf_lustre_obdo_o_padding_4 = -1;
911 static int hf_lustre_mgs_target_info_padding = -1;
912 static int hf_lustre_obd_quotactl_qc_dqblk = -1;
913 static int hf_lustre_llogd_conn_body_lgdc_gen = -1;
914 static int hf_lustre_llog_log_hdr_llh_tail = -1;
915 static int hf_lustre_obdo_o_size = -1;
916 static int hf_lustre_ldlm_extent_start = -1;
917 static int hf_lustre_llog_size_change_rec_lsc_hdr = -1;
918 static int hf_lustre_llog_create_rec_lcr_tail = -1;
919 static int hf_lustre_llog_logid_lgl_oseq = -1;
920 static int hf_lustre_llog_create_rec_lcr_hdr = -1;
921 static int hf_lustre_llog_cookie_lgc_padding = -1;
922 static int hf_lustre_qunit_data_old_qd_type = -1;
923 static int hf_lustre_ldlm_flock_blocking_export = -1;
924 static int hf_lustre_lov_desc_ld_pattern = -1;
925 static int hf_lustre_qunit_data_qd_id = -1;
926 static int hf_lustre_mgs_target_info_mti_fsname = -1;
927 static int hf_lustre_ldlm_request_lock_flags = -1;
928 static int hf_lustre_obdo_o_mode = -1;
929 static int hf_lustre_mgs_target_info_mti_svname = -1;
930 static int hf_lustre_llogd_body_lgd_logid = -1;
931 static int hf_lustre_llog_log_hdr_llh_size = -1;
932 static int hf_lustre_llog_create_rec_padding = -1;
933 static int hf_lustre_obdo_o_handle = -1;
934 static int hf_lustre_obdo_o_atime = -1;
935 static int hf_lustre_quota_adjust_qunit_qaq_id = -1;
936 static int hf_lustre_ldlm_lock_desc_l_policy_data = -1;
937 static int hf_lustre_obd_quotactl_qc_cmd = -1;
938 static int hf_lustre_qunit_data_padding = -1;
939 static int hf_lustre_quota_adjust_qunit_qaq_flags = -1;
940 static int hf_lustre_ldlm_lock_desc_l_granted_mode = -1;
941 static int hf_lustre_obdo_o_seq = -1;
942 static int hf_lustre_obdo_o_gid = -1;
943 static int hf_lustre_llog_catid_lci_logid = -1;
944 static int hf_lustre_llog_rec_tail_lrt_index = -1;
945 static int hf_lustre_lov_desc_ld_default_stripe_count = -1;
946 static int hf_lustre_ldlm_resource_desc_lr_padding = -1;
947 static int hf_lustre_cfg_marker_cm_vers = -1;
948 static int hf_lustre_llog_unlink_rec_lur_hdr = -1;
949 static int hf_lustre_llogd_body_lgd_index = -1;
950 static int hf_lustre_cfg_marker_cm_tgtname = -1;
951 static int hf_lustre_llog_setattr_rec_lsr_ogen = -1;
952 static int hf_lustre_llog_logid_rec_lid_hdr = -1;
953 static int hf_lustre_obdo_o_ioepoch = -1;
954 static int hf_lustre_ost_body_oa = -1;
955 static int hf_lustre_llog_logid_rec_padding3 = -1;
956 static int hf_lustre_llog_log_hdr_llh_flags = -1;
957 static int hf_lustre_llog_setattr_rec_lsr_oid = -1;
958 static int hf_lustre_llog_size_change_rec_padding = -1;
959 static int hf_lustre_mgs_target_info_mti_config_ver = -1;
960 static int hf_lustre_cfg_marker_cm_createtime = -1;
961 static int hf_lustre_qunit_data_old_qd_count = -1;
962 static int hf_lustre_llog_catid_lci_padding1 = -1;
963 static int hf_lustre_lov_desc_ld_active_tgt_count = -1;
964 static int hf_lustre_obdo_o_lcookie = -1;
965 static int hf_lustre_llog_gen_rec_lgr_gen = -1;
966 static int hf_lustre_obdo_o_id = -1;
967 static int hf_lustre_mgs_target_info_mti_uuid = -1;
968 static int hf_lustre_llog_rec_hdr_lrh_index = -1;
969 static int hf_lustre_llog_setattr_rec_lsr_hdr = -1;
970 static int hf_lustre_mgs_target_info_mti_stripe_index = -1;
971 static int hf_lustre_llog_gen_conn_cnt = -1;
972 static int hf_lustre_obdo_o_padding_6 = -1;
973 static int hf_lustre_llog_cookie_lgc_index = -1;
974 static int hf_lustre_lov_desc_ld_uuid = -1;
975 static int hf_lustre_llog_create_rec_lcr_oid = -1;
976 static int hf_lustre_ldlm_reply_lock_desc = -1;
977 static int hf_lustre_lov_desc_ld_padding_0 = -1;
978 static int hf_lustre_llog_unlink_rec_lur_ogen = -1;
979 static int hf_lustre_llog_orphan_rec_lor_hdr = -1;
980 static int hf_lustre_cfg_marker_cm_flags = -1;
981 static int hf_lustre_obdo_o_padding_3 = -1;
982 static int hf_lustre_ldlm_request_lock_desc = -1;
983 static int hf_lustre_llog_orphan_rec_padding = -1;
984 static int hf_lustre_obdo_o_flags = -1;
985 static int hf_lustre_mgs_target_info_mti_params = -1;
986 static int hf_lustre_llog_logid_lgl_ogen = -1;
987 static int hf_lustre_cfg_marker_cm_comment = -1;
988 static int hf_lustre_llog_unlink_rec_lur_oid = -1;
989 static int hf_lustre_qunit_data_qd_count = -1;
990 static int hf_lustre_obdo_o_mtime = -1;
991 static int hf_lustre_obdo_o_blksize = -1;
992 static int hf_lustre_ldlm_res_id_name = -1;
993 static int hf_lustre_ldlm_reply_lock_handle = -1;
994 static int hf_lustre_llogd_body_lgd_saved_index = -1;
995 static int hf_lustre_qunit_data_old_qd_isblk = -1;
996 static int hf_lustre_obdo_o_blocks = -1;
997 static int hf_lustre_lov_desc_ld_padding_2 = -1;
998 static int hf_lustre_llog_logid_rec_lid_tail = -1;
999 static int hf_lustre_obdo_o_grant = -1;
1000 static int hf_lustre_obdo_o_uid_h = -1;
1001 static int hf_lustre_obdo_o_gid_h = -1;
1002 static int hf_lustre_quota_adjust_qunit_qaq_iunit_sz = -1;
1003 static int hf_lustre_llog_unlink_rec_padding = -1;
1004 static int hf_lustre_ldlm_lock_desc_l_req_mode = -1;
1005 static int hf_lustre_ldlm_extent_end = -1;
1006 static int hf_lustre_llog_gen_rec_lgr_hdr = -1;
1007 static int hf_lustre_llog_orphan_rec_lor_ogen = -1;
1008 static int hf_lustre_llogd_body_lgd_llh_flags = -1;
1009 static int hf_lustre_llog_log_hdr_llh_cat_idx = -1;
1010 static int hf_lustre_llog_log_hdr_llh_bitmap_offset=-1;
1011 static int hf_lustre_llog_orphan_rec_lor_oid = -1;
1012 static int hf_lustre_ldlm_reply_lock_padding = -1;
1013 static int hf_lustre_obd_quotactl_qc_id = -1;
1014 static int hf_lustre_llog_logid_rec_padding4 = -1;
1015 static int hf_lustre_llog_setattr_rec_lsr_gid = -1;
1016 static int hf_lustre_obd_quotactl_qc_type = -1;
1017 static int hf_lustre_cfg_marker_padding = -1;
1018 static int hf_lustre_mgs_target_info_mti_nids = -1;
1019 static int hf_lustre_obdo_o_stripe_idx = -1;
1020 static int hf_lustre_llogd_conn_body_lgdc_logid = -1;
1021 static int hf_lustre_ldlm_flock_blocking_pid = -1;
1022 static int hf_lustre_lov_desc_ld_tgt_count = -1;
1023 static int hf_lustre_llogd_body_lgd_cur_offset=-1;
1024 static int hf_lustre_llog_create_rec_lcr_ogen = -1;
1025 static int hf_lustre_qunit_data_old2_qd_count = -1;
1026 static int hf_lustre_qunit_data_old2_qd_flags = -1;
1027 static int hf_lustre_ldlm_flock_start = -1;
1028 static int hf_lustre_quota_adjust_qunit_qaq_bunit_sz = -1;
1029 static int hf_lustre_ldlm_flock_pid = -1;
1030 static int hf_lustre_lov_desc_ld_default_stripe_size = -1;
1031 static int hf_lustre_llog_log_hdr_llh_tgtuuid = -1;
1032 static int hf_lustre_cfg_marker_cm_step = -1;
1033 static int hf_lustre_mgs_send_param_mgs_param = -1;
1034 static int hf_lustre_llog_create_rec_lcr_fid = -1;
1035 static int hf_lustre_lov_desc_ld_default_stripe_offset=-1;
1036 static int hf_lustre_ldlm_resource_desc_lr_name = -1;
1037 static int hf_lustre_llog_rec_tail_lrt_len = -1;
1038 static int hf_lustre_llog_log_hdr_llh_timestamp = -1;
1039 static int hf_lustre_llog_catid_lci_padding2 = -1;
1040 static int hf_lustre_llogd_conn_body_lgdc_ctxt_idx = -1;
1041 static int hf_lustre_cfg_marker_cm_canceltime = -1;
1042 static int hf_lustre_mgs_target_info_mti_lustre_ver = -1;
1043 static int hf_lustre_obdo_o_parent_ver = -1;
1044 static int hf_lustre_qunit_data_qd_flags = -1;
1045 static int hf_lustre_llog_logid_rec_lid_id = -1;
1046 static int hf_lustre_obdo_o_parent_oid = -1;
1047 static int hf_lustre_llog_gen_mnt_cnt = -1;
1048 static int hf_lustre_llog_size_change_rec_lsc_tail = -1;
1049 static int hf_lustre_obdo_o_padding_5 = -1;
1050 static int hf_lustre_ldlm_lock_desc_l_resource = -1;
1051 static int hf_lustre_obdo_o_parent_seq = -1;
1052 static int hf_lustre_ldlm_request_lock_count = -1;
1053 static int hf_lustre_ldlm_flock_end = -1;
1054 static int hf_lustre_mgs_target_info_mti_nid_count = -1;
1055 static int hf_lustre_obdo_o_ctime = -1;
1056 static int hf_lustre_ldlm_reply_lock_policy_res2 = -1;
1057 static int hf_lustre_llogd_body_lgd_ctxt_idx = -1;
1058 static int hf_lustre_lov_desc_ld_qos_maxage = -1;
1059 static int hf_lustre_ldlm_resource_desc_lr_type = -1;
1060 static int hf_lustre_llog_setattr_rec_lsr_tail = -1;
1061 static int hf_lustre_llog_cookie_lgc_subsys = -1;
1062 static int hf_lustre_llog_log_hdr_llh_hdr = -1;
1063 static int hf_lustre_llog_log_hdr_llh_reserved = -1;
1064
1065 /* Header field declarations for field from lustre_user.h*/
1066 static int hf_lustre_obd_dqinfo_dqi_valid = -1;
1067 static int hf_lustre_obd_dqblk_dqb_isoftlimit = -1;
1068 static int hf_lustre_obd_dqblk_dqb_bhardlimit = -1;
1069 static int hf_lustre_obd_dqblk_dqb_curspace = -1;
1070 static int hf_lustre_obd_dqblk_dqb_itime = -1;
1071 static int hf_lustre_obd_dqblk_dqb_valid = -1;
1072 static int hf_lustre_obd_dqinfo_dqi_igrace = -1;
1073 static int hf_lustre_obd_dqinfo_dqi_bgrace = -1;
1074 static int hf_lustre_obd_dqblk_padding = -1;
1075 static int hf_lustre_obd_dqblk_dqb_curinodes = -1;
1076 static int hf_lustre_obd_dqblk_dqb_bsoftlimit = -1;
1077 static int hf_lustre_obd_dqinfo_dqi_flags = -1;
1078 static int hf_lustre_obd_dqblk_dqb_btime = -1;
1079 static int hf_lustre_obd_dqblk_dqb_ihardlimit = -1;
1080 static int hf_lustre_ldlm_intent_opc_open     = -1 ;
1081 static int hf_lustre_ldlm_intent_opc_creat    = -1;
1082 static int hf_lustre_ldlm_intent_opc_readdir  = -1;
1083 static int hf_lustre_ldlm_intent_opc_getattr  = -1;
1084 static int hf_lustre_ldlm_intent_opc_lookup   = -1;
1085 static int hf_lustre_ldlm_intent_opc_unlink   = -1;
1086 static int hf_lustre_ldlm_intent_opc_getxattr = -1;
1087 static int hf_lustre_ldlm_intent_opc_exec     = -1;
1088 static int hf_lustre_ldlm_intent_opc_pin      = -1;
1089 static int hf_lustre_llog_hdr_llh_flag_zap_when_empty = -1;
1090 static int hf_lustre_llog_hdr_llh_flag_is_cat = -1;
1091 static int hf_lustre_llog_hdr_llh_flag_is_play = -1;
1092 /* --------------------------------------------------------------------*/
1093
1094
1095 /* proto declaration */
1096 static gint proto_lustre = -1;
1097
1098
1099
1100
1101 static int ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_, guint64 intent_opc _U_) ;
1102 static int lustre_dissect_element_ldlm_lock_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_);
1103 static int add_extra_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree * tree _U_) ;
1104
1105
1106 /* ======================================================================== */
1107 /*the value_string*/
1108 const value_string lustre_ldlm_opcode[] = {
1109   { IT_OPEN    ,   "IT_OPEN    "},
1110   { IT_CREAT   ,   "IT_CREAT   "},
1111   { IT_READDIR ,   "IT_READDIR "},
1112   { IT_GETATTR ,   "IT_GETATTR "},
1113   { IT_LOOKUP  ,   "IT_LOOKUP  "},
1114   { IT_UNLINK  ,   "IT_UNLINK  "},
1115   { IT_GETXATTR,   "IT_GETXATTR"},
1116   { IT_EXEC    ,   "IT_EXEC    "},
1117   { IT_PIN     ,   "IT_PIN     "},
1118   { 0, NULL }
1119 };
1120
1121 const value_string lustre_lov_magic[] = {
1122   { LOV_MAGIC_V1,   "LOV_MAGIC_V1" },
1123   {0, NULL}
1124 };
1125
1126 const value_string lustre_ldlm_flags_vals[] = {
1127   {0x000001 , "LDLM_FL_LOCK_CHANGED"},
1128   {0x000002 , "LDLM_FL_BLOCK_GRANTED"},
1129   {0x000004 , "LDLM_FL_BLOCK_CONV"},
1130   {0x000008 , "LDLM_FL_BLOCK_WAIT"},
1131   {0x000010 , "LDLM_FL_CBPENDING"},
1132   {0x000020 , "LDLM_FL_AST_SENT"},
1133   {0x000040 , "LDLM_FL_WAIT_NOREPROC"},
1134   {0x000080 , "LDLM_FL_CANCEL"},
1135   {0x000100 , "LDLM_FL_REPLAY"},
1136   {0x000200 , "LDLM_FL_INTENT_ONLY"},
1137   {0x000400 , "LDLM_FL_LOCAL_ONLY"},
1138   {0x000800 , "LDLM_FL_FAILED"},
1139   {0x001000 , "LDLM_FL_HAS_INTENT"},
1140   {0x002000 , "LDLM_FL_CANCELING"},
1141   {0x004000 , "LDLM_FL_LOCAL"},
1142   {0x008000 , "LDLM_FL_WARN"},
1143   {0x010000 , "LDLM_FL_DISCARD_DATA"},
1144   {0x020000 , "LDLM_FL_NO_TIMEOUT"},
1145   {0x040000 , "LDLM_FL_BLOCK_NOWAIT"},
1146   {0x080000 , "LDLM_FL_TEST_LOCK"},
1147   {0x100000 , "LDLM_FL_LVB_READY"},
1148   {0x200000 , "LDLM_FL_KMS_IGNORE"},
1149   {0x400000 , "LDLM_FL_NO_LRU"},
1150   {0x800000 , "LDLM_FL_CANCEL_ON_BLOCK"},
1151   {0x1000000 , "LDLM_FL_CP_REQD"},
1152   {0x2000000 , "LDLM_FL_CLEANED"},
1153   {0x4000000 , "LDLM_FL_ATOMIC_CB"},
1154   {0x10000000 , "LDLM_FL_BL_AST"},
1155   {0x20000000 , "LDLM_FL_BL_DONE"},
1156   {0x40000000 , "LDLM_FL_DENY_ON_CONTENTION"},
1157   {0x80000000 , "LDLM_AST_DISCARD_DATA"},
1158   { 0, NULL }
1159 };
1160
1161 const value_string lustre_llog_op_type[] = {
1162   {LLOG_PAD_MAGIC   ,"LLOG_PAD_MAGIC  "},
1163   {OST_SZ_REC       ,"OST_SZ_REC      "},
1164   {OST_RAID1_REC    ,"OST_RAID1_REC   "},
1165   {MDS_UNLINK_REC   ,"MDS_UNLINK_REC  "},
1166   {MDS_SETATTR_REC  ,"MDS_SETATTR_REC "},
1167   {OBD_CFG_REC      ,"OBD_CFG_REC     "},
1168   {PTL_CFG_REC      ,"PTL_CFG_REC     "},
1169   {LLOG_GEN_REC     ,"LLOG_GEN_REC    "},
1170   {LLOG_JOIN_REC    ,"LLOG_JOIN_REC   "},
1171   {LLOG_HDR_MAGIC   ,"LLOG_HDR_MAGIC  "},
1172   {LLOG_LOGID_MAGIC ,"LLOG_LOGID_MAGIC"},
1173   { 0, NULL }
1174 };
1175
1176 const value_string lustre_llog_hdr_llh_flags[]= {
1177   {LLOG_F_ZAP_WHEN_EMPTY , "LLOhdr_llh_G_F_ZAP_WHEN_EMPTY"},
1178   {LLOG_F_IS_CAT         , "LLOhdr_llh_G_F_IS_CAT"},
1179   {LLOG_F_IS_PLAIN       , "LLOG_F_IS_PLAIN"},
1180   { 0, NULL }
1181 };
1182
1183 const value_string lustre_mds_flags_vals[] = {
1184   {0x1,        "LUSTRE_BFLAG_UNCOMMITTED_WRITES"},
1185   {0x80000000, "LUSTRE_BFLAG_EXT_FLAGS"},   /* == EXT3_RESERVED_FL */
1186   {0x00000008, "LUSTRE_SYNC_FL        "},   /* Synchronous updates */
1187   {0x00000010, "LUSTRE_IMMUTABLE_FL   "},   /* Immutable file */
1188   {0x00000020, "LUSTRE_APPEND_FL      "},   /* writes to file may only append */
1189   {0x00000080, "LUSTRE_NOATIME_FL     "},   /* do not update atime */
1190   {0x00010000, "LUSTRE_DIRSYNC_FL     "},   /* dirsync behaviour (dir only) */
1191   { 0, NULL }
1192 };
1193
1194 const value_string lustre_mgs_config_body_types[] = {
1195   { 0,  "CONFIG" },
1196   { 1,  "SPTLRPC" },
1197   { 2,  "RECOVER" },
1198   { 3,  "MAX" },
1199   { 0, NULL }
1200 };
1201
1202 const value_string lustre_LMTypes[] = {
1203   { PTL_RPC_MSG_REQUEST, "request"},
1204   { PTL_RPC_MSG_ERR , "error"},
1205   { PTL_RPC_MSG_REPLY , "reply"},
1206   { 0, NULL }
1207 };
1208
1209 const value_string lustre_mds_reint_t_vals[] = {
1210   { REINT_SETATTR, "REINT_SETATTR" },
1211   { REINT_CREATE, "REINT_CREATE" },
1212   { REINT_LINK, "REINT_LINK" },
1213   { REINT_UNLINK, "REINT_UNLINK" },
1214   { REINT_RENAME, "REINT_RENAME" },
1215   { REINT_OPEN, "REINT_OPEN" },
1216   { REINT_SETXATTR, "REINT_SETXATTR" },
1217   { 0, NULL }
1218 };
1219 const value_string lustre_op_codes[] = {
1220   /*OST Opcodes*/
1221   {0 , "OST_REPLY"},
1222   {1 , "OST_GETATTR"},
1223   {2 , "OST_SETATTR"},
1224   {3 , "OST_READ"},
1225   {4 , "OST_WRITE"},
1226   {5 , "OST_CREATE"},
1227   {6 , "OST_DESTROY"},
1228   {7 , "OST_GET_INFO"},
1229   {8 , "OST_CONNECT"},
1230   {9 , "OST_DISCONNECT"},
1231   {10 , "OST_PUNCH"},
1232   {11 , "OST_OPEN"},
1233   {12 , "OST_CLOSE"},
1234   {13 , "OST_STATFS"},
1235   {14 , "OST_SAN_READ(deprecated)"},
1236   {15 , "OST_SAN_WRITE(deprecated)"},
1237   {16 , "OST_SYNC"},
1238   {17 , "OST_SET_INFO"},
1239   {18 , "OST_QUOTACHECK"},
1240   {19 , "OST_QUOTACTL"},
1241   {20 , "OST_LAST_OPC"},
1242   /*MDS Opcodes*/
1243   {33 , "MDS_GETATTR"},
1244   {34 , "MDS_GETATTR_NAME"},
1245   {35 , "MDS_CLOSE"},
1246   {36 , "MDS_REINT"},
1247   {37 , "MDS_READPAGE"},
1248   {38 , "MDS_CONNECT"},
1249   {39 , "MDS_DISCONNECT"},
1250   {40 , "MDS_GETSTATUS"},
1251   {41 , "MDS_STATFS"},
1252   {42 , "MDS_PIN"},
1253   {43 , "MDS_UNPIN"},
1254   {44 , "MDS_SYNC"},
1255   {45 , "MDS_DONE_WRITING"},
1256   {46 , "MDS_SET_INFO"},
1257   {47 , "MDS_QUOTACHECK"},
1258   {48 , "MDS_QUOTACTL"},
1259   {49 , "MDS_GETXATTR"},
1260   {50 , "MDS_SETXATTR"},
1261   {51 , "MDS_LAST_OPC"},
1262   /*LDLM Opcodes*/
1263   {101 , "LDLM_ENQUEUE"},
1264   {102 , "LDLM_CONVERT"},
1265   {103 , "LDLM_CANCEL"},
1266   {104 , "LDLM_BL_CALLBACK"},
1267   {105 , "LDLM_CP_CALLBACK"},
1268   {106 , "LDLM_GL_CALLBACK"},
1269   {107 , "LDLM_LAST_OPC"},
1270   /*MGS Opcodes*/
1271   {250 , "MGS_CONNECT"},
1272   {251 , "MGS_DISCONNECT"},
1273   {252 , "MGS_EXCEPTION"},
1274   {253 , "MGS_TARGET_REG"},
1275   {254 , "MGS_TARGET_DEL"},
1276   {255 , "MGS_SET_INFO"},
1277   {256 , "MGS_CONFIG_READ"},
1278   {257 , "MGS_LAST_OPC"},
1279   /*OBD Opcodes*/
1280   {400 , "OBD_PING"},
1281   {401 , "OBD_LOG_CANCEL"},
1282   {402 , "OBD_QC_CALLBACK"},
1283   {403 , "OBD_LAST_OPC"},
1284   /* LLOG opcodes */
1285   { 501, "LLOG_ORIGIN_HANDLE_CREATE"},
1286   { 502, "LLOG_ORIGIN_HANDLE_NEXT_BLOCK"},
1287   { 503, "LLOG_ORIGIN_HANDLE_READ_HEADER"},
1288   { 504, "LLOG_ORIGIN_HANDLE_WRITE_REC"},
1289   { 505, "LLOG_ORIGIN_HANDLE_CLOSE"},
1290   { 506, "LLOG_ORIGIN_CONNECT"},
1291   { 507, "LLOG_CATINFO"},
1292   { 508, "LLOG_ORIGIN_HANDLE_PREV_BLOCK"},
1293   { 509, "LLOG_ORIGIN_HANDLE_DESTROY"},
1294   /* SEQ RPC opcodes */
1295   { 700, "SEQ_QUERY"},
1296   { 701, "SEQ_LAST_OPC"},
1297   /* FLD RPC opcodes */
1298   { 900, "FLD_QUERY"},
1299   { 901, "FLD_LAST_OPC"},
1300   { 0, NULL }
1301 };
1302 /*const value_string lustre_ldlm_mode_t_vals[] = {*/
1303 /*    { LCK_MINMODE, "MINMODE" },*/
1304 /*    { LCK_EX, "EX" },*/
1305 /*    { LCK_PW, "PW" },*/
1306 /*    { LCK_PR, "PR" },*/
1307 /*    { LCK_CW, "CW" },*/
1308 /*    { LCK_CR, "CR" },*/
1309 /*    { LCK_NL, "NL" },*/
1310 /*    { LCK_GROUP, "GROUP" },*/
1311 /*    { 0, NULL }*/
1312 /*};*/
1313
1314 /* detailled version the information came from : http://wiki.lustre.org/images/e/e5/LustreInternals_Architecture.pdf */
1315 const value_string lustre_ldlm_mode_t_vals[] = {
1316   { LCK_MINMODE, "MINMODE" },
1317   { LCK_EX, "Exclusive" },
1318   { LCK_PW, "Protected Write" },
1319   { LCK_PR, "Protected Read" },
1320   { LCK_CW, "Concurrent Write" },
1321   { LCK_CR, "Concurrent Read" },
1322   { LCK_NL, "Null" },
1323   { LCK_GROUP, "GROUP" },
1324   { 0, NULL }
1325 };
1326
1327 const value_string lustre_ldlm_type_t_vals[] = {
1328   { LDLM_PLAIN, "LDLM_PLAIN" },
1329   { LDLM_EXTENT,"LDLM_EXTENT" },
1330   { LDLM_FLOCK, "LDLM_FLOCK" },
1331   { LDLM_IBITS, "LDLM_IBITS" },
1332   { 0, NULL }
1333 };
1334
1335
1336 const value_string lustre_llog_cmd_t_vals[] = {
1337   { LLOG_ORIGIN_HANDLE_CREATE, "LLOG_ORIGIN_HANDLE_CREATE" },
1338   { LLOG_ORIGIN_HANDLE_NEXT_BLOCK, "LLOG_ORIGIN_HANDLE_NEXT_BLOCK" },
1339   { LLOG_ORIGIN_HANDLE_READ_HEADER, "LLOG_ORIGIN_HANDLE_READ_HEADER" },
1340   { LLOG_ORIGIN_HANDLE_WRITE_REC, "LLOG_ORIGIN_HANDLE_WRITE_REC" },
1341   { LLOG_ORIGIN_HANDLE_CLOSE, "LLOG_ORIGIN_HANDLE_CLOSE" },
1342   { LLOG_ORIGIN_CONNECT, "LLOG_ORIGIN_CONNECT" },
1343   { LLOG_CATINFO, "LLOG_CATINFO" },
1344   { LLOG_ORIGIN_HANDLE_PREV_BLOCK, "LLOG_ORIGIN_HANDLE_PREV_BLOCK" },
1345   { LLOG_ORIGIN_HANDLE_DESTROY, "LLOG_ORIGIN_HANDLE_DESTROY" },
1346   { 0, NULL }
1347 };
1348
1349 #ifndef ENABLE_STATIC
1350 const gchar version[] = VERSION;
1351
1352 /* Start the functions we need for the plugin stuff */
1353
1354 void
1355 plugin_register(void)
1356 {
1357         extern void proto_register_dcerpc_lustre(void);
1358
1359         proto_register_dcerpc_lustre();
1360 }
1361
1362 void
1363 plugin_reg_handoff(void)
1364 {
1365         extern void proto_reg_handoff_lustre(void);
1366
1367         proto_reg_handoff_lustre();
1368 }
1369 #endif
1370
1371
1372 /* ------------------------------------------------------------------- */
1373 /*                display  functions                                   */
1374 /* ------------------------------------------------------------------- */
1375 /* display str in left corner and in COL */
1376 /* TODO : do we need to use inline here ?*/
1377 /* @gint col :  the col where we add the information */
1378 inline static void display_info_str(proto_item *pi, column_info *cinfo, gint col, const gchar* str)
1379 {
1380   if (NULL !=pi)
1381     proto_item_append_text(pi, str);
1382
1383   if (NULL !=cinfo)
1384     if (check_col(cinfo, col))
1385       col_append_str(cinfo, col, str);
1386 }
1387
1388 /*
1389  * Need to be (re)written
1390  */
1391 static void display_info_fstr(proto_item *pi, column_info *cinfo, gint col, const char* format, const gchar * str){
1392
1393   if (NULL !=pi){
1394     //va_start(ap, format);
1395     proto_item_append_text(pi, format, str);
1396     //va_end(ap);
1397   }
1398
1399   if (NULL !=cinfo){
1400     if (check_col(cinfo, col)){
1401       //   va_list ap;
1402       //  va_start(ap, format);
1403       col_append_fstr(cinfo, col,  format, str);
1404       // va_end(ap);
1405     }
1406   }
1407 }
1408
1409
1410 /* ------------------------------ basic dissect functions ------------------------      */
1411 static int
1412 dissect_uint64
1413 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1414 {
1415   proto_tree_add_item(tree, hfindex, tvb, offset, 8, TRUE);
1416   return offset+8;
1417 }
1418
1419 static int
1420 dissect_uint32
1421 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1422 {
1423   proto_tree_add_item(tree, hfindex, tvb, offset, 4, TRUE);
1424   return offset+4;
1425 }
1426
1427 static int
1428 dissect_uint16
1429 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1430 {
1431   proto_tree_add_item(tree, hfindex, tvb, offset, 2, TRUE);
1432   return offset+2;
1433 }
1434
1435 static int
1436 dissect_uint8
1437 (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, int hfindex)
1438 {
1439   proto_tree_add_item(tree, hfindex, tvb, offset, 1, TRUE);
1440   return offset+1;
1441 }
1442 /* -------------------------------------------------------------------------    */
1443
1444 /* dissect raw data */
1445 static int
1446 lustre_dissect_element_data(tvbuff_t *tvb _U_, int offset _U_,
1447                             packet_info *pinfo _U_, proto_tree *parent_tree _U_,
1448                             int hf_index _U_, guint32 buf_num)
1449 {
1450   proto_item *item = NULL;
1451
1452   guint32 data_len;
1453   int old_offset;
1454
1455   old_offset = offset;
1456
1457   data_len = LUSTRE_BUFFER_LEN(buf_num);
1458   if (data_len == 0)
1459     return offset;
1460
1461   proto_tree_add_item(parent_tree, hf_index, tvb, offset, data_len, TRUE);
1462
1463   offset += data_len;
1464   proto_item_set_len(item, offset-old_offset);
1465   offset = add_extra_padding(tvb, offset, pinfo, parent_tree);
1466
1467   return offset;
1468 }
1469
1470 int
1471 lustre_dissect_struct_hmac(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
1472                            proto_tree *parent_tree _U_, int hf_index _U_, int max_length)
1473 {
1474   int i;
1475   int val;
1476   proto_item *item = NULL;
1477
1478   item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 0, TRUE);
1479   for (i=0; i < max_length; ++i) {
1480     val = tvb_get_guint8(tvb, offset+i);
1481     proto_item_append_text(item, (i) ? "%02x" : ": %#02x", val);
1482   }
1483
1484   offset += max_length;
1485   proto_item_set_len(item, max_length);
1486   return offset;
1487 }
1488
1489 /* ------------------------------------------------------------------------ */
1490
1491
1492
1493 /* IDL: struct lustre_handle { */
1494 /* IDL:         uint64 cookie; */
1495 /* IDL: } */
1496
1497 static int
1498 lustre_dissect_element_handle_cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1499 {
1500   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lustre_handle_cookie);
1501
1502   return offset;
1503 }
1504
1505 int
1506 lustre_dissect_struct_handle_cookie(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1507 {
1508   proto_item *item = NULL;
1509   proto_tree *tree = NULL;
1510   int old_offset;
1511
1512   old_offset=offset;
1513
1514   if (parent_tree) {
1515     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1516     tree = proto_item_add_subtree(item, ett_lustre_lustre_handle_cookie);
1517   }
1518
1519   offset=lustre_dissect_element_handle_cookie(tvb, offset, pinfo, tree);
1520
1521
1522   proto_item_set_len(item, offset-old_offset);
1523
1524   return offset;
1525 }
1526
1527 /* IDL: struct obd_connect_data { */
1528 /* IDL:         uint64 ocd_connect_flags; */
1529 /* IDL:         uint32 ocd_version; */
1530 /* IDL:         uint32 ocd_grant; */
1531 /* IDL:         uint32 ocd_index; */
1532 /* IDL:         uint32 ocd_brw_size; */
1533 /* IDL:         uint64 ocd_ibits_known; */
1534 /* IDL:         uint32 ocd_nllu; */
1535 /* IDL:         uint32 ocd_nllg; */
1536 /* IDL:         uint64 ocd_transno; */
1537 /* IDL:         uint32 ocd_group; */
1538 /* IDL:         uint32 ocd_cksum_types; */
1539 /* IDL:         uint64 padding1; */
1540 /* IDL:         uint64 padding2; */
1541 /* IDL: } */
1542
1543 static int
1544 lustre_dissect_element_obd_connect_data_ocd_connect_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1545 {
1546   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_connect_flags);
1547
1548   return offset;
1549 }
1550
1551 static int
1552 lustre_dissect_element_obd_connect_data_ocd_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1553 {
1554   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_version);
1555
1556   return offset;
1557 }
1558
1559 static int
1560 lustre_dissect_element_obd_connect_data_ocd_grant(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1561 {
1562   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_grant);
1563
1564   return offset;
1565 }
1566
1567 static int
1568 lustre_dissect_element_obd_connect_data_ocd_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1569 {
1570   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_index);
1571
1572   return offset;
1573 }
1574
1575 static int
1576 lustre_dissect_element_obd_connect_data_ocd_brw_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1577 {
1578   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_brw_size);
1579
1580   return offset;
1581 }
1582
1583 static int
1584 lustre_dissect_element_obd_connect_data_ocd_ibits_known(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1585 {
1586   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_ibits_known);
1587
1588   return offset;
1589 }
1590
1591 static int
1592 lustre_dissect_element_obd_connect_data_ocd_nllu(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1593 {
1594   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_nllu);
1595
1596   return offset;
1597 }
1598
1599 static int
1600 lustre_dissect_element_obd_connect_data_ocd_nllg(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1601 {
1602   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_nllg);
1603
1604   return offset;
1605 }
1606
1607 static int
1608 lustre_dissect_element_obd_connect_data_ocd_transno(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1609 {
1610   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_transno);
1611
1612   return offset;
1613 }
1614
1615 static int
1616 lustre_dissect_element_obd_connect_data_ocd_group(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1617 {
1618   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_group);
1619
1620   return offset;
1621 }
1622
1623 static int
1624 lustre_dissect_element_obd_connect_data_ocd_cksum_types(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1625 {
1626   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_ocd_cksum_types);
1627
1628   return offset;
1629 }
1630
1631 static int
1632 lustre_dissect_element_obd_connect_data_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1633 {
1634   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_padding1);
1635
1636   return offset;
1637 }
1638
1639 static int
1640 lustre_dissect_element_obd_connect_data_padding2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1641 {
1642   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_connect_data_padding2);
1643
1644   return offset;
1645 }
1646
1647 static int
1648 lustre_dissect_struct_obd_connect_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1649 {
1650   proto_item *item = NULL;
1651   proto_tree *tree = NULL;
1652   int old_offset;
1653
1654
1655
1656   old_offset=offset;
1657
1658   if (parent_tree) {
1659     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1660     tree = proto_item_add_subtree(item, ett_lustre_obd_connect_data);
1661   }
1662
1663   offset=lustre_dissect_element_obd_connect_data_ocd_connect_flags(tvb, offset, pinfo, tree);
1664
1665   offset=lustre_dissect_element_obd_connect_data_ocd_version(tvb, offset, pinfo, tree);
1666
1667   offset=lustre_dissect_element_obd_connect_data_ocd_grant(tvb, offset, pinfo, tree);
1668
1669   offset=lustre_dissect_element_obd_connect_data_ocd_index(tvb, offset, pinfo, tree);
1670
1671   offset=lustre_dissect_element_obd_connect_data_ocd_brw_size(tvb, offset, pinfo, tree);
1672
1673   offset=lustre_dissect_element_obd_connect_data_ocd_ibits_known(tvb, offset, pinfo, tree);
1674
1675   offset=lustre_dissect_element_obd_connect_data_ocd_nllu(tvb, offset, pinfo, tree);
1676
1677   offset=lustre_dissect_element_obd_connect_data_ocd_nllg(tvb, offset, pinfo, tree);
1678
1679   offset=lustre_dissect_element_obd_connect_data_ocd_transno(tvb, offset, pinfo, tree);
1680
1681   offset=lustre_dissect_element_obd_connect_data_ocd_group(tvb, offset, pinfo, tree);
1682
1683   offset=lustre_dissect_element_obd_connect_data_ocd_cksum_types(tvb, offset, pinfo, tree);
1684
1685   offset=lustre_dissect_element_obd_connect_data_padding1(tvb, offset, pinfo, tree);
1686
1687   offset=lustre_dissect_element_obd_connect_data_padding2(tvb, offset, pinfo, tree);
1688
1689
1690   proto_item_set_len(item, offset-old_offset);
1691
1692   return offset;
1693 }
1694
1695
1696 /* IDL: struct lov_ost_data_v1 { */
1697 /* IDL:         uint64 l_object_id; */
1698 /* IDL:         uint64 l_object_seq; */
1699 /* IDL:         uint32 l_ost_gen; */
1700 /* IDL:         uint32 l_ost_idx; */
1701 /* IDL: } */
1702
1703 static int
1704 lustre_dissect_element_lov_ost_data_v1_l_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1705 {
1706   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_object_id);
1707
1708   return offset;
1709 }
1710
1711 static int
1712 lustre_dissect_element_lov_ost_data_v1_l_object_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1713 {
1714   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_object_seq);
1715
1716   return offset;
1717 }
1718
1719 static int
1720 lustre_dissect_element_lov_ost_data_v1_l_ost_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1721 {
1722   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_ost_gen);
1723
1724   return offset;
1725 }
1726
1727 static int
1728 lustre_dissect_element_lov_ost_data_v1_l_ost_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1729 {
1730   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_ost_data_v1_l_ost_idx);
1731
1732   return offset;
1733 }
1734
1735 int
1736 lustre_dissect_struct_lov_ost_data_v1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1737 {
1738   proto_item *item = NULL;
1739   proto_tree *tree = NULL;
1740   int old_offset;
1741
1742
1743
1744   old_offset=offset;
1745
1746   if (parent_tree) {
1747     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1748     tree = proto_item_add_subtree(item, ett_lustre_lov_ost_data_v1);
1749   }
1750
1751   offset=lustre_dissect_element_lov_ost_data_v1_l_object_id(tvb, offset, pinfo, tree);
1752
1753   offset=lustre_dissect_element_lov_ost_data_v1_l_object_seq(tvb, offset, pinfo, tree);
1754
1755   offset=lustre_dissect_element_lov_ost_data_v1_l_ost_gen(tvb, offset, pinfo, tree);
1756
1757   offset=lustre_dissect_element_lov_ost_data_v1_l_ost_idx(tvb, offset, pinfo, tree);
1758
1759
1760   proto_item_set_len(item, offset-old_offset);
1761
1762   return offset;
1763 }
1764
1765 /* IDL: struct lov_mds_md_v1 { */
1766 /* IDL:         uint32 lmm_magic; */
1767 /* IDL:         uint32 lmm_pattern; */
1768 /* IDL:         uint64 lmm_object_id; */
1769 /* IDL:         uint64 lmm_object_seq; */
1770 /* IDL:         uint32 lmm_stripe_size; */
1771 /* IDL:         uint32 lmm_stripe_count; */
1772 /* IDL:         struct lov_ost_data_v1 { */
1773 /* IDL: } lmm_objects[0]; <-- en fait on en a lmm_stripe_count */
1774 /* IDL: } */
1775
1776 static int
1777 lustre_dissect_element_lov_mds_md_v1_lmm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1778 {
1779   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_magic);
1780
1781   return offset;
1782 }
1783
1784 static int
1785 lustre_dissect_element_lov_mds_md_v1_lmm_pattern(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1786 {
1787   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_pattern);
1788
1789   return offset;
1790 }
1791
1792 static int
1793 lustre_dissect_element_lov_mds_md_v1_lmm_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1794 {
1795   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_object_id);
1796
1797   return offset;
1798 }
1799
1800 static int
1801 lustre_dissect_element_lov_mds_md_v1_lmm_object_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1802 {
1803   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_object_seq);
1804
1805   return offset;
1806 }
1807
1808 static int
1809 lustre_dissect_element_lov_mds_md_v1_lmm_stripe_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1810 {
1811   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_stripe_size);
1812
1813   return offset;
1814 }
1815
1816 static int
1817 lustre_dissect_element_lov_mds_md_v1_lmm_stripe_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1818 {
1819   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_v1_lmm_stripe_count);
1820
1821   return offset;
1822 }
1823
1824 static int
1825 lustre_dissect_element_lov_mds_md_v1_lmm_objects_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1826 {
1827   offset=lustre_dissect_struct_lov_ost_data_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1_lmm_objects);
1828   return offset;
1829 }
1830
1831 static int
1832 lustre_dissect_element_lov_mds_md_v1_lmm_objects(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int num)
1833 {
1834   int i;
1835   /*g_print("num = %d", num);*/
1836   for (i = 0; i < num; i++){
1837     offset=lustre_dissect_element_lov_mds_md_v1_lmm_objects_(tvb, offset, pinfo, tree);
1838   }
1839
1840   return offset;
1841 }
1842
1843
1844
1845 int
1846 lustre_dissect_struct_lov_mds_md_v1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
1847 {
1848   proto_item *item = NULL;
1849   proto_tree *tree = NULL;
1850   int old_offset;
1851
1852   guint32 stripe_count ;
1853
1854
1855   old_offset=offset;
1856
1857   if (parent_tree) {
1858     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1859     tree = proto_item_add_subtree(item, ett_lustre_lov_mds_md_v1);
1860   }
1861
1862   offset=lustre_dissect_element_lov_mds_md_v1_lmm_magic(tvb, offset, pinfo, tree);
1863
1864   offset=lustre_dissect_element_lov_mds_md_v1_lmm_pattern(tvb, offset, pinfo, tree);
1865
1866   offset=lustre_dissect_element_lov_mds_md_v1_lmm_object_id(tvb, offset, pinfo, tree);
1867
1868   offset=lustre_dissect_element_lov_mds_md_v1_lmm_object_seq(tvb, offset, pinfo, tree);
1869
1870   offset=lustre_dissect_element_lov_mds_md_v1_lmm_stripe_size(tvb, offset, pinfo, tree);
1871
1872   stripe_count = tvb_get_letohl(tvb,offset);
1873   offset=lustre_dissect_element_lov_mds_md_v1_lmm_stripe_count(tvb, offset, pinfo, tree);
1874
1875   offset=lustre_dissect_element_lov_mds_md_v1_lmm_objects(tvb, offset, pinfo, tree, stripe_count);
1876
1877
1878   proto_item_set_len(item, offset-old_offset);
1879
1880   return offset;
1881 }
1882
1883 int
1884 lustre_dissect_struct_lov_mds_md(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
1885                                  proto_tree *parent_tree _U_,
1886                                  int hf_index _U_, int buff_num _U_)
1887 {
1888   int magic;
1889
1890   if(LUSTRE_BUFFER_LEN(buff_num) == 0)
1891     return offset;
1892
1893   magic=tvb_get_letohl(tvb, offset); /* TODO : replace this with a macro */
1894   switch(magic) {
1895   case LOV_MAGIC_V1:
1896     offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,parent_tree,
1897                                                hf_index);
1898     break;
1899   default:
1900     offset=lustre_dissect_element_data(tvb, offset, pinfo, parent_tree,
1901                                        hf_lustre_extra_padding, buff_num);
1902     break;
1903   };
1904
1905   return offset;
1906 }
1907
1908
1909
1910 /* IDL: struct obd_statfs { */
1911 /* IDL:         uint64 os_type; */
1912 /* IDL:         uint64 os_blocks; */
1913 /* IDL:         uint64 os_bfree; */
1914 /* IDL:         uint64 os_bavail; */
1915 /* IDL:         uint64 os_files; */
1916 /* IDL:         uint64 os_ffree; */
1917 /* IDL:         uint8 os_fsid[40]; */
1918 /* IDL:         uint32 os_bsize; */
1919 /* IDL:         uint32 os_namelen; */
1920 /* IDL:         uint64 os_maxbytes; */
1921 /* IDL:         uint32 os_state; */
1922 /* IDL:         uint32 os_spare1; */
1923 /* IDL:         uint32 os_spare2; */
1924 /* IDL:         uint32 os_spare3; */
1925 /* IDL:         uint32 os_spare4; */
1926 /* IDL:         uint32 os_spare5; */
1927 /* IDL:         uint32 os_spare6; */
1928 /* IDL:         uint32 os_spare7; */
1929 /* IDL:         uint32 os_spare8; */
1930 /* IDL:         uint32 os_spare9; */
1931 /* IDL: } */
1932
1933 static int
1934 lustre_dissect_element_obd_statfs_os_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1935 {
1936   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_type);
1937
1938   return offset;
1939 }
1940
1941 static int
1942 lustre_dissect_element_obd_statfs_os_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1943 {
1944   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_blocks);
1945
1946   return offset;
1947 }
1948
1949 static int
1950 lustre_dissect_element_obd_statfs_os_bfree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1951 {
1952   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bfree);
1953
1954   return offset;
1955 }
1956
1957 static int
1958 lustre_dissect_element_obd_statfs_os_bavail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1959 {
1960   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bavail);
1961
1962   return offset;
1963 }
1964
1965 static int
1966 lustre_dissect_element_obd_statfs_os_files(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1967 {
1968   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_files);
1969
1970   return offset;
1971 }
1972
1973 static int
1974 lustre_dissect_element_obd_statfs_os_ffree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1975 {
1976   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_ffree);
1977
1978   return offset;
1979 }
1980
1981 static int
1982 lustre_dissect_element_obd_statfs_os_fsid_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1983 {
1984   offset=dissect_uint8(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_fsid);
1985
1986   return offset;
1987 }
1988
1989 static int
1990 lustre_dissect_element_obd_statfs_os_fsid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
1991 {
1992   int i;
1993   for (i = 0; i < 40; i++)
1994     offset=lustre_dissect_element_obd_statfs_os_fsid_(tvb, offset, pinfo, tree);
1995
1996   return offset;
1997 }
1998
1999
2000
2001 static int
2002 lustre_dissect_element_obd_statfs_os_bsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2003 {
2004   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_bsize);
2005
2006   return offset;
2007 }
2008
2009 static int
2010 lustre_dissect_element_obd_statfs_os_namelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2011 {
2012   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_namelen);
2013
2014   return offset;
2015 }
2016
2017 static int
2018 lustre_dissect_element_obd_statfs_os_maxbytes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2019 {
2020   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_maxbytes);
2021
2022   return offset;
2023 }
2024
2025 static int
2026 lustre_dissect_element_obd_statfs_os_state(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2027 {
2028   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_state);
2029
2030   return offset;
2031 }
2032
2033 static int
2034 lustre_dissect_element_obd_statfs_os_spare1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2035 {
2036   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare1);
2037
2038   return offset;
2039 }
2040
2041 static int
2042 lustre_dissect_element_obd_statfs_os_spare2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2043 {
2044   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare2);
2045
2046   return offset;
2047 }
2048
2049 static int
2050 lustre_dissect_element_obd_statfs_os_spare3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2051 {
2052   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare3);
2053
2054   return offset;
2055 }
2056
2057 static int
2058 lustre_dissect_element_obd_statfs_os_spare4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2059 {
2060   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare4);
2061
2062   return offset;
2063 }
2064
2065 static int
2066 lustre_dissect_element_obd_statfs_os_spare5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2067 {
2068   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare5);
2069
2070   return offset;
2071 }
2072
2073 static int
2074 lustre_dissect_element_obd_statfs_os_spare6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2075 {
2076   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare6);
2077
2078   return offset;
2079 }
2080
2081 static int
2082 lustre_dissect_element_obd_statfs_os_spare7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2083 {
2084   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare7);
2085
2086   return offset;
2087 }
2088
2089 static int
2090 lustre_dissect_element_obd_statfs_os_spare8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2091 {
2092   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare8);
2093
2094   return offset;
2095 }
2096
2097 static int
2098 lustre_dissect_element_obd_statfs_os_spare9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2099 {
2100   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_statfs_os_spare9);
2101
2102   return offset;
2103 }
2104
2105 int
2106 lustre_dissect_struct_obd_statfs(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2107 {
2108   proto_item *item = NULL;
2109   proto_tree *tree = NULL;
2110   int old_offset;
2111
2112
2113
2114   old_offset=offset;
2115
2116   if (parent_tree) {
2117     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2118     tree = proto_item_add_subtree(item, ett_lustre_obd_statfs);
2119   }
2120
2121   offset=lustre_dissect_element_obd_statfs_os_type(tvb, offset, pinfo, tree);
2122
2123   offset=lustre_dissect_element_obd_statfs_os_blocks(tvb, offset, pinfo, tree);
2124
2125   offset=lustre_dissect_element_obd_statfs_os_bfree(tvb, offset, pinfo, tree);
2126
2127   offset=lustre_dissect_element_obd_statfs_os_bavail(tvb, offset, pinfo, tree);
2128
2129   offset=lustre_dissect_element_obd_statfs_os_files(tvb, offset, pinfo, tree);
2130
2131   offset=lustre_dissect_element_obd_statfs_os_ffree(tvb, offset, pinfo, tree);
2132
2133   offset=lustre_dissect_element_obd_statfs_os_fsid(tvb, offset, pinfo, tree);
2134
2135   offset=lustre_dissect_element_obd_statfs_os_bsize(tvb, offset, pinfo, tree);
2136
2137   offset=lustre_dissect_element_obd_statfs_os_namelen(tvb, offset, pinfo, tree);
2138
2139   offset=lustre_dissect_element_obd_statfs_os_maxbytes(tvb, offset, pinfo, tree);
2140
2141   offset=lustre_dissect_element_obd_statfs_os_state(tvb, offset, pinfo, tree);
2142
2143   offset=lustre_dissect_element_obd_statfs_os_spare1(tvb, offset, pinfo, tree);
2144
2145   offset=lustre_dissect_element_obd_statfs_os_spare2(tvb, offset, pinfo, tree);
2146
2147   offset=lustre_dissect_element_obd_statfs_os_spare3(tvb, offset, pinfo, tree);
2148
2149   offset=lustre_dissect_element_obd_statfs_os_spare4(tvb, offset, pinfo, tree);
2150
2151   offset=lustre_dissect_element_obd_statfs_os_spare5(tvb, offset, pinfo, tree);
2152
2153   offset=lustre_dissect_element_obd_statfs_os_spare6(tvb, offset, pinfo, tree);
2154
2155   offset=lustre_dissect_element_obd_statfs_os_spare7(tvb, offset, pinfo, tree);
2156
2157   offset=lustre_dissect_element_obd_statfs_os_spare8(tvb, offset, pinfo, tree);
2158
2159   offset=lustre_dissect_element_obd_statfs_os_spare9(tvb, offset, pinfo, tree);
2160
2161
2162   proto_item_set_len(item, offset-old_offset);
2163
2164   return offset;
2165 }
2166
2167 /* IDL: struct obd_ioobj { */
2168 /* IDL:         uint64 ioo_id; */
2169 /* IDL:         uint64 ioo_seq; */
2170 /* IDL:         uint32 ioo_type; */
2171 /* IDL:         uint32 ioo_bufcnt; */
2172 /* IDL: } */
2173
2174 static int
2175 lustre_dissect_element_obd_ioobj_ioo_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2176 {
2177   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_id);
2178
2179   return offset;
2180 }
2181
2182 static int
2183 lustre_dissect_element_obd_ioobj_ioo_seq(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2184 {
2185   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_seq);
2186
2187   return offset;
2188 }
2189
2190 static int
2191 lustre_dissect_element_obd_ioobj_ioo_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2192 {
2193   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_type);
2194
2195   return offset;
2196 }
2197
2198 static int
2199 lustre_dissect_element_obd_ioobj_ioo_bufcnt(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2200 {
2201   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_ioobj_ioo_bufcnt);
2202
2203   return offset;
2204 }
2205
2206 int
2207 lustre_dissect_struct_obd_ioobj(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2208 {
2209   proto_item *item = NULL;
2210   proto_tree *tree = NULL;
2211   int old_offset;
2212
2213
2214
2215   old_offset=offset;
2216
2217   if (parent_tree) {
2218     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2219     tree = proto_item_add_subtree(item, ett_lustre_obd_ioobj);
2220   }
2221
2222   offset=lustre_dissect_element_obd_ioobj_ioo_id(tvb, offset, pinfo, tree);
2223
2224   offset=lustre_dissect_element_obd_ioobj_ioo_seq(tvb, offset, pinfo, tree);
2225
2226   offset=lustre_dissect_element_obd_ioobj_ioo_type(tvb, offset, pinfo, tree);
2227
2228   offset=lustre_dissect_element_obd_ioobj_ioo_bufcnt(tvb, offset, pinfo, tree);
2229
2230
2231   proto_item_set_len(item, offset-old_offset);
2232
2233   return offset;
2234 }
2235
2236 /* IDL: struct niobuf_remote { */
2237 /* IDL:         uint64 offset; */
2238 /* IDL:         uint32 len; */
2239 /* IDL:         uint32 flags; */
2240 /* IDL: } */
2241
2242 static int
2243 lustre_dissect_element_niobuf_remote_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2244 {
2245   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_offset);
2246
2247   return offset;
2248 }
2249
2250 static int
2251 lustre_dissect_element_niobuf_remote_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2252 {
2253   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_len);
2254
2255   return offset;
2256 }
2257
2258 static int
2259 lustre_dissect_element_niobuf_remote_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2260 {
2261   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_niobuf_remote_flags);
2262
2263   return offset;
2264 }
2265
2266 int
2267 lustre_dissect_struct_niobuf_remote(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2268 {
2269   proto_item *item = NULL;
2270   proto_tree *tree = NULL;
2271   int old_offset;
2272
2273
2274
2275   old_offset=offset;
2276
2277   if (parent_tree) {
2278     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2279     tree = proto_item_add_subtree(item, ett_lustre_niobuf_remote);
2280   }
2281
2282   offset=lustre_dissect_element_niobuf_remote_offset(tvb, offset, pinfo, tree);
2283
2284   offset=lustre_dissect_element_niobuf_remote_len(tvb, offset, pinfo, tree);
2285
2286   offset=lustre_dissect_element_niobuf_remote_flags(tvb, offset, pinfo, tree);
2287
2288
2289   proto_item_set_len(item, offset-old_offset);
2290
2291   return offset;
2292 }
2293
2294 /* IDL: struct ost_lvb { */
2295 /* IDL:         uint64 lvb_size; */
2296 /* IDL:         uint64 lvb_mtime; */
2297 /* IDL:         uint64 lvb_atime; */
2298 /* IDL:         uint64 lvb_ctime; */
2299 /* IDL:         uint64 lvb_blocks; */
2300 /* IDL: } */
2301
2302 static int
2303 lustre_dissect_element_ost_lvb_lvb_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2304 {
2305   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ost_lvb_lvb_size);
2306
2307   return offset;
2308 }
2309
2310 static int
2311 lustre_dissect_element_ost_lvb_lvb_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2312 {
2313   nstime_t ns;
2314   /* timestamp */
2315   ns.secs = tvb_get_letohl(tvb,offset);
2316   ns.nsecs=0;
2317   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_mtime, tvb, offset, 8, &ns );
2318   offset+=8;
2319   return offset;
2320 }
2321
2322 static int
2323 lustre_dissect_element_ost_lvb_lvb_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2324 {
2325   nstime_t ns;
2326   /* timestamp */
2327   ns.secs = tvb_get_letohl(tvb,offset);
2328   ns.nsecs=0;
2329   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_atime, tvb, offset, 8, &ns );
2330   offset+=8;
2331
2332   return offset;
2333 }
2334
2335 static int
2336 lustre_dissect_element_ost_lvb_lvb_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2337 {
2338   nstime_t ns;
2339   /* timestamp */
2340   ns.secs = tvb_get_letohl(tvb,offset);
2341   ns.nsecs=0;
2342   proto_tree_add_time(tree, hf_lustre_ost_lvb_lvb_ctime, tvb, offset, 8, &ns );
2343   offset+=8;
2344
2345   return offset;
2346 }
2347
2348 static int
2349 lustre_dissect_element_ost_lvb_lvb_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2350 {
2351   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ost_lvb_lvb_blocks);
2352
2353   return offset;
2354 }
2355
2356 int
2357 lustre_dissect_struct_ost_lvb(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2358 {
2359   proto_item *item = NULL;
2360   proto_tree *tree = NULL;
2361   int old_offset;
2362
2363
2364
2365   old_offset=offset;
2366
2367   if (parent_tree) {
2368     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2369     tree = proto_item_add_subtree(item, ett_lustre_ost_lvb);
2370   }
2371
2372   offset=lustre_dissect_element_ost_lvb_lvb_size(tvb, offset, pinfo, tree);
2373
2374   offset=lustre_dissect_element_ost_lvb_lvb_mtime(tvb, offset, pinfo, tree);
2375
2376   offset=lustre_dissect_element_ost_lvb_lvb_atime(tvb, offset, pinfo, tree);
2377
2378   offset=lustre_dissect_element_ost_lvb_lvb_ctime(tvb, offset, pinfo, tree);
2379
2380   offset=lustre_dissect_element_ost_lvb_lvb_blocks(tvb, offset, pinfo, tree);
2381
2382
2383   proto_item_set_len(item, offset-old_offset);
2384
2385   return offset;
2386 }
2387
2388
2389 /* IDL: struct ll_fid { */
2390 /* IDL:         uint64 id; */
2391 /* IDL:         uint32 generation; */
2392 /* IDL:         uint32 f_type; */
2393 /* IDL: } */
2394
2395 static int
2396 lustre_dissect_element_ll_fid_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2397 {
2398   offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_ll_fid_id);
2399
2400   return offset;
2401 }
2402
2403 static int
2404 lustre_dissect_element_ll_fid_generation(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2405 {
2406   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ll_fid_generation);
2407
2408   return offset;
2409 }
2410
2411 static int
2412 lustre_dissect_element_ll_fid_f_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2413 {
2414   offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_ll_fid_f_type);
2415
2416   return offset;
2417 }
2418
2419 int
2420 lustre_dissect_struct_lu_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2421 {
2422   proto_item *item = NULL;
2423   proto_tree *tree = NULL;
2424   int old_offset;
2425
2426   old_offset=offset;
2427
2428   if (parent_tree) {
2429     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2430     tree = proto_item_add_subtree(item, ett_lustre_ll_fid);
2431   }
2432
2433   offset=lustre_dissect_element_ll_fid_id(tvb, offset, pinfo, tree);
2434
2435   offset=lustre_dissect_element_ll_fid_generation(tvb, offset, pinfo, tree);
2436
2437   offset=lustre_dissect_element_ll_fid_f_type(tvb, offset, pinfo, tree);
2438
2439
2440   proto_item_set_len(item, offset-old_offset);
2441
2442   return offset;
2443 }
2444
2445 /* IDL: struct obd_dqinfo { */
2446 /* IDL:   uint64 dqi_bgrace; */
2447 /* IDL:   uint64 dqi_igrace; */
2448 /* IDL:   uint32 dqi_flags; */
2449 /* IDL:   uint32 dqi_valid; */
2450 /* IDL: } */
2451
2452 static int
2453 lustre_dissect_element_obd_dqinfo_dqi_bgrace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2454 {
2455   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_bgrace);
2456
2457   return offset;
2458 }
2459
2460 static int
2461 lustre_dissect_element_obd_dqinfo_dqi_igrace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2462 {
2463   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_igrace);
2464
2465   return offset;
2466 }
2467
2468 static int
2469 lustre_dissect_element_obd_dqinfo_dqi_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2470 {
2471   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_flags);
2472
2473   return offset;
2474 }
2475
2476 static int
2477 lustre_dissect_element_obd_dqinfo_dqi_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2478 {
2479   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqinfo_dqi_valid);
2480
2481   return offset;
2482 }
2483
2484 int
2485 lustre_dissect_struct_obd_dqinfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2486 {
2487   proto_item *item = NULL;
2488   proto_tree *tree = NULL;
2489   int old_offset;
2490
2491
2492
2493   old_offset = offset;
2494
2495   if (parent_tree) {
2496     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2497     tree = proto_item_add_subtree(item, ett_lustre_obd_dqinfo);
2498   }
2499
2500   offset = lustre_dissect_element_obd_dqinfo_dqi_bgrace(tvb, offset, pinfo, tree);
2501
2502   offset = lustre_dissect_element_obd_dqinfo_dqi_igrace(tvb, offset, pinfo, tree);
2503
2504   offset = lustre_dissect_element_obd_dqinfo_dqi_flags(tvb, offset, pinfo, tree);
2505
2506   offset = lustre_dissect_element_obd_dqinfo_dqi_valid(tvb, offset, pinfo, tree);
2507
2508
2509   proto_item_set_len(item, offset-old_offset);
2510
2511   return offset;
2512 }
2513
2514 /* IDL: struct obd_dqblk { */
2515 /* IDL:         uint64 dqb_bhardlimit; */
2516 /* IDL:         uint64 dqb_bsoftlimit; */
2517 /* IDL:         uint64 dqb_curspace; */
2518 /* IDL:         uint64 dqb_ihardlimit; */
2519 /* IDL:         uint64 dqb_isoftlimit; */
2520 /* IDL:         uint64 dqb_curinodes; */
2521 /* IDL:         uint64 dqb_btime; */
2522 /* IDL:         uint64 dqb_itime; */
2523 /* IDL:         uint32 dqb_valid; */
2524 /* IDL:         uint32 padding; */
2525 /* IDL: } */
2526
2527 static int
2528 lustre_dissect_element_obd_dqblk_dqb_bhardlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2529 {
2530   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_bhardlimit);
2531
2532   return offset;
2533 }
2534
2535 static int
2536 lustre_dissect_element_obd_dqblk_dqb_bsoftlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2537 {
2538   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_bsoftlimit);
2539
2540   return offset;
2541 }
2542
2543 static int
2544 lustre_dissect_element_obd_dqblk_dqb_curspace(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2545 {
2546   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_curspace);
2547
2548   return offset;
2549 }
2550
2551 static int
2552 lustre_dissect_element_obd_dqblk_dqb_ihardlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2553 {
2554   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_ihardlimit);
2555
2556   return offset;
2557 }
2558
2559 static int
2560 lustre_dissect_element_obd_dqblk_dqb_isoftlimit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2561 {
2562   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_isoftlimit);
2563
2564   return offset;
2565 }
2566
2567 static int
2568 lustre_dissect_element_obd_dqblk_dqb_curinodes(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2569 {
2570   offset = dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_curinodes);
2571
2572   return offset;
2573 }
2574
2575 static int
2576 lustre_dissect_element_obd_dqblk_dqb_btime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2577 {
2578
2579   nstime_t ns;
2580   /* timestamp */
2581   ns.secs = tvb_get_letohl(tvb,offset);
2582   ns.nsecs=0;
2583   proto_tree_add_time(tree, hf_lustre_obd_dqblk_dqb_btime, tvb, offset, 8, &ns );
2584   offset+=8;
2585   return offset;
2586 }
2587
2588 static int
2589 lustre_dissect_element_obd_dqblk_dqb_itime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2590 {
2591   nstime_t ns;
2592   /* timestamp */
2593   ns.secs = tvb_get_letohl(tvb,offset);
2594   ns.nsecs=0;
2595   proto_tree_add_time(tree, hf_lustre_obd_dqblk_dqb_itime, tvb, offset, 8, &ns );
2596   offset+=8;
2597
2598   return offset;
2599 }
2600
2601 static int
2602 lustre_dissect_element_obd_dqblk_dqb_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2603 {
2604   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_dqb_valid);
2605
2606   return offset;
2607 }
2608
2609 static int
2610 lustre_dissect_element_obd_dqblk_padding(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2611 {
2612   offset = dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_obd_dqblk_padding);
2613
2614   return offset;
2615 }
2616
2617 int
2618 lustre_dissect_struct_obd_dqblk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2619 {
2620   proto_item *item = NULL;
2621   proto_tree *tree = NULL;
2622   int old_offset;
2623
2624
2625
2626   old_offset = offset;
2627
2628   if (parent_tree) {
2629     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2630     tree = proto_item_add_subtree(item, ett_lustre_obd_dqblk);
2631   }
2632
2633   offset = lustre_dissect_element_obd_dqblk_dqb_bhardlimit(tvb, offset, pinfo, tree);
2634
2635   offset = lustre_dissect_element_obd_dqblk_dqb_bsoftlimit(tvb, offset, pinfo, tree);
2636
2637   offset = lustre_dissect_element_obd_dqblk_dqb_curspace(tvb, offset, pinfo, tree);
2638
2639   offset = lustre_dissect_element_obd_dqblk_dqb_ihardlimit(tvb, offset, pinfo, tree);
2640
2641   offset = lustre_dissect_element_obd_dqblk_dqb_isoftlimit(tvb, offset, pinfo, tree);
2642
2643   offset = lustre_dissect_element_obd_dqblk_dqb_curinodes(tvb, offset, pinfo, tree);
2644
2645   offset = lustre_dissect_element_obd_dqblk_dqb_btime(tvb, offset, pinfo, tree);
2646
2647   offset = lustre_dissect_element_obd_dqblk_dqb_itime(tvb, offset, pinfo, tree);
2648
2649   offset = lustre_dissect_element_obd_dqblk_dqb_valid(tvb, offset, pinfo, tree);
2650
2651   offset = lustre_dissect_element_obd_dqblk_padding(tvb, offset, pinfo, tree);
2652
2653
2654   proto_item_set_len(item, offset-old_offset);
2655
2656   return offset;
2657 }
2658
2659
2660 /* IDL: struct obd_quotactl { */
2661 /* IDL:         uint32 qc_cmd; */
2662 /* IDL:         uint32 qc_type; */
2663 /* IDL:         uint32 qc_id; */
2664 /* IDL:         uint32 qc_stat; */
2665 /* IDL:         struct obd_dqinfo { */
2666 /* IDL: } qc_dqinfo; */
2667 /* IDL:         struct obd_dqblk { */
2668 /* IDL: } qc_dqblk; */
2669 /* IDL: } */
2670
2671 static int
2672 lustre_dissect_element_obd_quotactl_qc_cmd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2673 {
2674   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_cmd);
2675
2676   return offset;
2677 }
2678
2679 static int
2680 lustre_dissect_element_obd_quotactl_qc_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2681 {
2682   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_type);
2683
2684   return offset;
2685 }
2686
2687 static int
2688 lustre_dissect_element_obd_quotactl_qc_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2689 {
2690   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_id);
2691
2692   return offset;
2693 }
2694
2695 static int
2696 lustre_dissect_element_obd_quotactl_qc_stat(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2697 {
2698   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_obd_quotactl_qc_stat);
2699
2700   return offset;
2701 }
2702
2703
2704
2705 static int
2706 lustre_dissect_element_obd_quotactl_qc_dqblk(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2707 {
2708   offset=lustre_dissect_struct_obd_dqblk(tvb,offset,pinfo,tree,hf_lustre_obd_quotactl_qc_dqblk);
2709   return offset;
2710 }
2711
2712 static int
2713 lustre_dissect_element_obd_quotactl_qc_dqinfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2714 {
2715   offset=lustre_dissect_struct_obd_dqinfo(tvb,offset,pinfo,tree,hf_lustre_obd_quotactl_qc_dqinfo);
2716   return offset;
2717 }
2718
2719 int
2720 lustre_dissect_struct_obd_quotactl(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2721 {
2722   proto_item *item = NULL;
2723   proto_tree *tree = NULL;
2724   int old_offset;
2725
2726   old_offset=offset;
2727
2728   if (parent_tree) {
2729     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2730     tree = proto_item_add_subtree(item, ett_lustre_obd_quotactl);
2731   }
2732
2733   offset=lustre_dissect_element_obd_quotactl_qc_cmd(tvb, offset, pinfo, tree);
2734
2735   offset=lustre_dissect_element_obd_quotactl_qc_type(tvb, offset, pinfo, tree);
2736
2737   offset=lustre_dissect_element_obd_quotactl_qc_id(tvb, offset, pinfo, tree);
2738
2739   offset=lustre_dissect_element_obd_quotactl_qc_stat(tvb, offset, pinfo, tree);
2740
2741   offset=lustre_dissect_element_obd_quotactl_qc_dqinfo(tvb, offset, pinfo, tree);
2742
2743   offset=lustre_dissect_element_obd_quotactl_qc_dqblk(tvb, offset, pinfo, tree);
2744
2745
2746   proto_item_set_len(item, offset-old_offset);
2747
2748   return offset;
2749 }
2750
2751
2752 /* IDL: struct quota_adjust_qunit { */
2753 /* IDL:         uint32 qaq_flags; */
2754 /* IDL:         uint32 qaq_id; */
2755 /* IDL:         uint64 qaq_bunit_sz; */
2756 /* IDL:         uint64 qaq_iunit_sz; */
2757 /* IDL:         uint64 padding1; */
2758 /* IDL: } */
2759
2760 static int
2761 lustre_dissect_element_quota_adjust_qunit_qaq_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2762 {
2763   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_flags);
2764
2765   return offset;
2766 }
2767
2768 static int
2769 lustre_dissect_element_quota_adjust_qunit_qaq_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2770 {
2771   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_id);
2772
2773   return offset;
2774 }
2775
2776 static int
2777 lustre_dissect_element_quota_adjust_qunit_qaq_bunit_sz(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2778 {
2779   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_bunit_sz);
2780
2781   return offset;
2782 }
2783
2784 static int
2785 lustre_dissect_element_quota_adjust_qunit_qaq_iunit_sz(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2786 {
2787   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_qaq_iunit_sz);
2788
2789   return offset;
2790 }
2791
2792 static int
2793 lustre_dissect_element_quota_adjust_qunit_padding1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2794 {
2795   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_quota_adjust_qunit_padding1);
2796
2797   return offset;
2798 }
2799
2800 int
2801 lustre_dissect_struct_quota_adjust_qunit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
2802 {
2803   proto_item *item = NULL;
2804   proto_tree *tree = NULL;
2805   int old_offset;
2806
2807
2808
2809   old_offset=offset;
2810
2811   if (parent_tree) {
2812     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
2813     tree = proto_item_add_subtree(item, ett_lustre_quota_adjust_qunit);
2814   }
2815
2816   offset=lustre_dissect_element_quota_adjust_qunit_qaq_flags(tvb, offset, pinfo, tree);
2817
2818   offset=lustre_dissect_element_quota_adjust_qunit_qaq_id(tvb, offset, pinfo, tree);
2819
2820   offset=lustre_dissect_element_quota_adjust_qunit_qaq_bunit_sz(tvb, offset, pinfo, tree);
2821
2822   offset=lustre_dissect_element_quota_adjust_qunit_qaq_iunit_sz(tvb, offset, pinfo, tree);
2823
2824   offset=lustre_dissect_element_quota_adjust_qunit_padding1(tvb, offset, pinfo, tree);
2825
2826
2827   proto_item_set_len(item, offset-old_offset);
2828
2829   return offset;
2830 }
2831
2832 /* IDL: struct mdt_body { */
2833 /* IDL:         struct lu_fid { */
2834 /* IDL: } fid1; */
2835 /* IDL:         struct lu_fid { */
2836 /* IDL: } fid2; */
2837 /* IDL:         struct lustre_handle { */
2838 /* IDL: } handle; */
2839 /* IDL:         uint64 valid; */
2840 /* IDL:         uint64 size; */
2841 /* IDL:         uint64 mtime; */
2842 /* IDL:         uint64 atime; */
2843 /* IDL:         uint64 ctime; */
2844 /* IDL:         uint64 blocks; */
2845 /* IDL:         uint64 ioepoch; */
2846 /* IDL:         uint64 ino; */
2847 /* IDL:         uint32 fsuid; */
2848 /* IDL:         uint32 fsgid; */
2849 /* IDL:         uint32 capability; */
2850 /* IDL:         uint32 mode; */
2851 /* IDL:         uint32 uid; */
2852 /* IDL:         uint32 gid; */
2853 /* IDL:         uint32 flags; */
2854 /* IDL:         uint32 rdev; */
2855 /* IDL:         uint32 nlink; */
2856 /* IDL:         uint32 generation; */
2857 /* IDL:         uint32 suppgid; */
2858 /* IDL:         uint32 eadatasize; */
2859 /* IDL:         uint32 aclsize; */
2860 /* IDL:         uint32 max_mdsize; */
2861 /* IDL:         uint32 max_cookiesize; */
2862 /* IDL:         uint32 uid_h; */
2863 /* IDL:         uint32 gid_h; */
2864 /* IDL:         uint32 padding_5; */
2865 /* IDL:         uint64 padding_6; */
2866 /* IDL:         uint64 padding_7; */
2867 /* IDL:         uint64 padding_8; */
2868 /* IDL:         uint64 padding_9; */
2869 /* IDL:         uint64 padding_10; */
2870 /* IDL: } */
2871
2872 static int
2873 lustre_dissect_element_mdt_body_fid1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2874 {
2875   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_body_fid1);
2876   return offset;
2877 }
2878
2879 static int
2880 lustre_dissect_element_mdt_body_fid2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2881 {
2882   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_body_fid2);
2883   return offset;
2884 }
2885
2886 static int
2887 lustre_dissect_element_mdt_body_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2888 {
2889   offset=lustre_dissect_struct_handle_cookie(tvb,offset,pinfo,tree,hf_lustre_mdt_body_handle);
2890
2891   return offset;
2892 }
2893
2894 static int
2895 lustre_dissect_element_mdt_body_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2896 {
2897   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_valid);
2898
2899   return offset;
2900 }
2901
2902 static int
2903 lustre_dissect_element_mdt_body_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2904 {
2905   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_size);
2906
2907   return offset;
2908 }
2909
2910 static int
2911 lustre_dissect_element_mdt_body_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2912 {
2913   nstime_t ns;
2914   /* timestamp */
2915   ns.secs = tvb_get_letohl(tvb,offset);
2916   ns.nsecs=0;
2917   proto_tree_add_time(tree, hf_lustre_mdt_body_mtime, tvb, offset, 8, &ns );
2918   offset+=8;
2919   return offset;
2920 }
2921
2922 static int
2923 lustre_dissect_element_mdt_body_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2924 {
2925   nstime_t ns;
2926   /* timestamp */
2927   ns.secs = tvb_get_letohl(tvb,offset);
2928   ns.nsecs=0;
2929   proto_tree_add_time(tree, hf_lustre_mdt_body_atime, tvb, offset, 8, &ns );
2930   offset+=8;
2931
2932   return offset;
2933 }
2934
2935 static int
2936 lustre_dissect_element_mdt_body_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2937 {
2938   nstime_t ns;
2939   /* timestamp */
2940   ns.secs = tvb_get_letohl(tvb,offset);
2941   ns.nsecs=0;
2942   proto_tree_add_time(tree, hf_lustre_mdt_body_ctime, tvb, offset, 8, &ns );
2943   offset+=8;
2944   return offset;
2945 }
2946
2947 static int
2948 lustre_dissect_element_mdt_body_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2949 {
2950   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_blocks);
2951
2952   return offset;
2953 }
2954
2955 static int
2956 lustre_dissect_element_mdt_body_ioepoch(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2957 {
2958   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_ioepoch);
2959
2960   return offset;
2961 }
2962
2963 static int
2964 lustre_dissect_element_mdt_body_ino(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2965 {
2966   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_ino);
2967
2968   return offset;
2969 }
2970
2971 static int
2972 lustre_dissect_element_mdt_body_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2973 {
2974   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_fsuid);
2975
2976   return offset;
2977 }
2978
2979 static int
2980 lustre_dissect_element_mdt_body_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2981 {
2982   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_fsgid);
2983
2984   return offset;
2985 }
2986
2987 static int
2988 lustre_dissect_element_mdt_body_capability(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2989 {
2990   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_capability);
2991
2992   return offset;
2993 }
2994
2995 static int
2996 lustre_dissect_element_mdt_body_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
2997 {
2998   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_mode);
2999
3000   return offset;
3001 }
3002
3003 static int
3004 lustre_dissect_element_mdt_body_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3005 {
3006   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_uid);
3007
3008   return offset;
3009 }
3010
3011 static int
3012 lustre_dissect_element_mdt_body_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3013 {
3014   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_gid);
3015
3016   return offset;
3017 }
3018
3019 static int
3020 lustre_dissect_element_mdt_body_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3021 {
3022   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_flags);
3023
3024   return offset;
3025 }
3026
3027 static int
3028 lustre_dissect_element_mdt_body_rdev(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3029 {
3030   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_rdev);
3031
3032   return offset;
3033 }
3034
3035 static int
3036 lustre_dissect_element_mdt_body_nlink(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3037 {
3038   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_nlink);
3039
3040   return offset;
3041 }
3042
3043 static int
3044 lustre_dissect_element_mdt_body_generation(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3045 {
3046   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_generation);
3047
3048   return offset;
3049 }
3050
3051 static int
3052 lustre_dissect_element_mdt_body_suppgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3053 {
3054   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_suppgid);
3055
3056   return offset;
3057 }
3058
3059 static int
3060 lustre_dissect_element_mdt_body_eadatasize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3061 {
3062   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_eadatasize);
3063
3064   return offset;
3065 }
3066
3067 static int
3068 lustre_dissect_element_mdt_body_aclsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3069 {
3070   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_aclsize);
3071
3072   return offset;
3073 }
3074
3075 static int
3076 lustre_dissect_element_mdt_body_max_mdsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3077 {
3078   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_max_mdsize);
3079
3080   return offset;
3081 }
3082
3083 static int
3084 lustre_dissect_element_mdt_body_max_cookiesize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3085 {
3086   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_max_cookiesize);
3087
3088   return offset;
3089 }
3090
3091 static int
3092 lustre_dissect_element_mdt_body_uid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3093 {
3094   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_uid_h);
3095
3096   return offset;
3097 }
3098
3099 static int
3100 lustre_dissect_element_mdt_body_gid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3101 {
3102   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_gid_h);
3103
3104   return offset;
3105 }
3106
3107 static int
3108 lustre_dissect_element_mdt_body_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3109 {
3110   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_5);
3111
3112   return offset;
3113 }
3114
3115 static int
3116 lustre_dissect_element_mdt_body_padding_6(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3117 {
3118   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_6);
3119
3120   return offset;
3121 }
3122
3123 static int
3124 lustre_dissect_element_mdt_body_padding_7(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3125 {
3126   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_7);
3127
3128   return offset;
3129 }
3130
3131 static int
3132 lustre_dissect_element_mdt_body_padding_8(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3133 {
3134   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_8);
3135
3136   return offset;
3137 }
3138
3139 static int
3140 lustre_dissect_element_mdt_body_padding_9(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3141 {
3142   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_9);
3143
3144   return offset;
3145 }
3146
3147 static int
3148 lustre_dissect_element_mdt_body_padding_10(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3149 {
3150   offset= dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_body_padding_10);
3151
3152   return offset;
3153 }
3154
3155 int
3156 lustre_dissect_struct_mdt_body(tvbuff_t *tvb _U_, int offset _U_,
3157                                packet_info *pinfo _U_,
3158                                proto_tree *parent_tree _U_,
3159                                int hf_index _U_)
3160 {
3161   proto_item *item = NULL;
3162   proto_tree *tree = NULL;
3163   int old_offset;
3164
3165
3166   old_offset=offset;
3167
3168   if (parent_tree) {
3169     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3170     tree = proto_item_add_subtree(item, ett_lustre_mdt_body);
3171   }
3172
3173   offset=lustre_dissect_element_mdt_body_fid1(tvb, offset, pinfo, tree);
3174
3175   offset=lustre_dissect_element_mdt_body_fid2(tvb, offset, pinfo, tree);
3176
3177   offset=lustre_dissect_element_mdt_body_handle(tvb, offset, pinfo, tree);
3178
3179   offset=lustre_dissect_element_mdt_body_valid(tvb, offset, pinfo, tree);
3180
3181   offset=lustre_dissect_element_mdt_body_size(tvb, offset, pinfo, tree);
3182
3183   offset=lustre_dissect_element_mdt_body_mtime(tvb, offset, pinfo, tree);
3184
3185   offset=lustre_dissect_element_mdt_body_atime(tvb, offset, pinfo, tree);
3186
3187   offset=lustre_dissect_element_mdt_body_ctime(tvb, offset, pinfo, tree);
3188
3189   offset=lustre_dissect_element_mdt_body_blocks(tvb, offset, pinfo, tree);
3190
3191   offset=lustre_dissect_element_mdt_body_ioepoch(tvb, offset, pinfo, tree);
3192
3193   offset=lustre_dissect_element_mdt_body_ino(tvb, offset, pinfo, tree);
3194
3195   offset=lustre_dissect_element_mdt_body_fsuid(tvb, offset, pinfo, tree);
3196
3197   offset=lustre_dissect_element_mdt_body_fsgid(tvb, offset, pinfo, tree);
3198
3199   offset=lustre_dissect_element_mdt_body_capability(tvb, offset, pinfo, tree);
3200
3201   offset=lustre_dissect_element_mdt_body_mode(tvb, offset, pinfo, tree);
3202
3203   offset=lustre_dissect_element_mdt_body_uid(tvb, offset, pinfo, tree);
3204
3205   offset=lustre_dissect_element_mdt_body_gid(tvb, offset, pinfo, tree);
3206
3207   offset=lustre_dissect_element_mdt_body_flags(tvb, offset, pinfo, tree);
3208
3209   offset=lustre_dissect_element_mdt_body_rdev(tvb, offset, pinfo, tree);
3210
3211   offset=lustre_dissect_element_mdt_body_nlink(tvb, offset, pinfo, tree);
3212
3213   offset=lustre_dissect_element_mdt_body_generation(tvb, offset, pinfo, tree);
3214
3215   offset=lustre_dissect_element_mdt_body_suppgid(tvb, offset, pinfo, tree);
3216
3217   offset=lustre_dissect_element_mdt_body_eadatasize(tvb, offset, pinfo, tree);
3218
3219   offset=lustre_dissect_element_mdt_body_aclsize(tvb, offset, pinfo, tree);
3220
3221   offset=lustre_dissect_element_mdt_body_max_mdsize(tvb, offset, pinfo, tree);
3222
3223   offset=lustre_dissect_element_mdt_body_max_cookiesize(tvb, offset, pinfo, tree);
3224
3225   offset=lustre_dissect_element_mdt_body_uid_h(tvb, offset, pinfo, tree);
3226
3227   offset=lustre_dissect_element_mdt_body_gid_h(tvb, offset, pinfo, tree);
3228
3229   offset=lustre_dissect_element_mdt_body_padding_5(tvb, offset, pinfo, tree);
3230
3231   offset=lustre_dissect_element_mdt_body_padding_6(tvb, offset, pinfo, tree);
3232
3233   offset=lustre_dissect_element_mdt_body_padding_7(tvb, offset, pinfo, tree);
3234
3235   offset=lustre_dissect_element_mdt_body_padding_8(tvb, offset, pinfo, tree);
3236
3237   offset=lustre_dissect_element_mdt_body_padding_9(tvb, offset, pinfo, tree);
3238
3239   offset=lustre_dissect_element_mdt_body_padding_10(tvb, offset, pinfo, tree);
3240
3241
3242   proto_item_set_len(item, offset-old_offset);
3243
3244   return offset;
3245 }
3246
3247 /* I don't find where this struct appear on wire.. need to search mdc_setattr_pack() */
3248 /* IDL: struct mdt_rec_setattr { */
3249 /* IDL:         uint32 sa_opcode; */
3250 /* IDL:         uint32 sa_cap; */
3251 /* IDL:         uint32 sa_fsuid; */
3252 /* IDL:         uint32 sa_fsuid_h; */
3253 /* IDL:         uint32 sa_fsgid; */
3254 /* IDL:         uint32 sa_fsgid_h; */
3255 /* IDL:         uint32 sa_suppgid; */
3256 /* IDL:         uint32 sa_suppgid_h; */
3257 /* IDL:         uint32 sa_padding_1; */
3258 /* IDL:         uint32 sa_padding_1_h; */
3259 /* IDL:         struct lu_fid { */
3260 /* IDL: } sa_fid; */
3261 /* IDL:         uint64 sa_valid; */
3262 /* IDL:         uint32 sa_uid; */
3263 /* IDL:         uint32 sa_gid; */
3264 /* IDL:         uint64 sa_size; */
3265 /* IDL:         uint64 sa_blocks; */
3266 /* IDL:         uint64 sa_mtime; */
3267 /* IDL:         uint64 sa_atime; */
3268 /* IDL:         uint64 sa_ctime; */
3269 /* IDL:         uint32 sa_attr_flags; */
3270 /* IDL:         uint32 sa_mode; */
3271 /* IDL:         uint32 sa_padding_2; */
3272 /* IDL:         uint32 sa_padding_3; */
3273 /* IDL:         uint32 sa_padding_4; */
3274 /* IDL:         uint32 sa_padding_5; */
3275 /* IDL: } */
3276
3277 static int
3278 lustre_dissect_element_mdt_rec_setattr_sa_opcode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3279 {
3280   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_opcode);
3281
3282   return offset;
3283 }
3284
3285 static int
3286 lustre_dissect_element_mdt_rec_setattr_sa_cap(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3287 {
3288   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_cap);
3289
3290   return offset;
3291 }
3292
3293 static int
3294 lustre_dissect_element_mdt_rec_setattr_sa_fsuid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3295 {
3296   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsuid);
3297
3298   return offset;
3299 }
3300
3301 static int
3302 lustre_dissect_element_mdt_rec_setattr_sa_fsuid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3303 {
3304   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsuid_h);
3305
3306   return offset;
3307 }
3308
3309 static int
3310 lustre_dissect_element_mdt_rec_setattr_sa_fsgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3311 {
3312   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsgid);
3313
3314   return offset;
3315 }
3316
3317 static int
3318 lustre_dissect_element_mdt_rec_setattr_sa_fsgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3319 {
3320   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_fsgid_h);
3321
3322   return offset;
3323 }
3324
3325 static int
3326 lustre_dissect_element_mdt_rec_setattr_sa_suppgid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3327 {
3328   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_suppgid);
3329
3330   return offset;
3331 }
3332
3333 static int
3334 lustre_dissect_element_mdt_rec_setattr_sa_suppgid_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3335 {
3336   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_suppgid_h);
3337
3338   return offset;
3339 }
3340
3341 static int
3342 lustre_dissect_element_mdt_rec_setattr_sa_padding_1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3343 {
3344   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_1);
3345
3346   return offset;
3347 }
3348
3349 static int
3350 lustre_dissect_element_mdt_rec_setattr_sa_padding_1_h(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3351 {
3352   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_1_h);
3353
3354   return offset;
3355 }
3356
3357 static int
3358 lustre_dissect_element_mdt_rec_setattr_sa_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3359 {
3360   offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_mdt_rec_setattr_sa_fid);
3361
3362   return offset;
3363 }
3364
3365 static int
3366 lustre_dissect_element_mdt_rec_setattr_sa_valid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3367 {
3368   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_valid);
3369
3370   return offset;
3371 }
3372
3373 static int
3374 lustre_dissect_element_mdt_rec_setattr_sa_uid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3375 {
3376   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_uid);
3377
3378   return offset;
3379 }
3380
3381 static int
3382 lustre_dissect_element_mdt_rec_setattr_sa_gid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3383 {
3384   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_gid);
3385
3386   return offset;
3387 }
3388
3389 static int
3390 lustre_dissect_element_mdt_rec_setattr_sa_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3391 {
3392   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_size);
3393
3394   return offset;
3395 }
3396
3397 static int
3398 lustre_dissect_element_mdt_rec_setattr_sa_blocks(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3399 {
3400   offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_blocks);
3401
3402   return offset;
3403 }
3404
3405 static int
3406 lustre_dissect_element_mdt_rec_setattr_sa_mtime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3407 {
3408
3409   nstime_t ns;
3410   /* timestamp */
3411   ns.secs = tvb_get_letohl(tvb,offset);
3412   ns.nsecs=0;
3413   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_mtime, tvb, offset, 8, &ns );
3414   offset+=8;
3415   return offset;
3416 }
3417
3418 static int
3419 lustre_dissect_element_mdt_rec_setattr_sa_atime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3420 {
3421   nstime_t ns;
3422   /* timestamp */
3423   ns.secs = tvb_get_letohl(tvb,offset);
3424   ns.nsecs=0;
3425   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_atime, tvb, offset, 8, &ns );
3426   offset+=8;
3427   return offset;
3428 }
3429
3430 static int
3431 lustre_dissect_element_mdt_rec_setattr_sa_ctime(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3432 {
3433   nstime_t ns;
3434   /* timestamp */
3435   ns.secs = tvb_get_letohl(tvb,offset);
3436   ns.nsecs=0;
3437   proto_tree_add_time(tree, hf_lustre_mdt_rec_setattr_sa_ctime, tvb, offset, 8, &ns );
3438   offset+=8;
3439   return offset;
3440 }
3441
3442 static int
3443 lustre_dissect_element_mdt_rec_setattr_sa_attr_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3444 {
3445   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_attr_flags);
3446
3447   return offset;
3448 }
3449
3450 static int
3451 lustre_dissect_element_mdt_rec_setattr_sa_mode(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3452 {
3453   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_mode);
3454
3455   return offset;
3456 }
3457
3458 static int
3459 lustre_dissect_element_mdt_rec_setattr_sa_padding_2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3460 {
3461   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_2);
3462
3463   return offset;
3464 }
3465
3466 static int
3467 lustre_dissect_element_mdt_rec_setattr_sa_padding_3(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3468 {
3469   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_3);
3470
3471   return offset;
3472 }
3473
3474 static int
3475 lustre_dissect_element_mdt_rec_setattr_sa_padding_4(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3476 {
3477   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_4);
3478
3479   return offset;
3480 }
3481
3482 static int
3483 lustre_dissect_element_mdt_rec_setattr_sa_padding_5(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
3484 {
3485   offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_mdt_rec_setattr_sa_padding_5);
3486
3487   return offset;
3488 }
3489
3490 int
3491 lustre_dissect_struct_mdt_rec_setattr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
3492 {
3493   proto_item *item = NULL;
3494   proto_tree *tree = NULL;
3495   int old_offset;
3496
3497   guint32 sa_opcode ;
3498
3499
3500   old_offset=offset;
3501
3502   if (parent_tree) {
3503     item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
3504     tree = proto_item_add_subtree(item, ett_lustre_mdt_rec_setattr);
3505   }
3506   sa_opcode=tvb_get_letohl(tvb,offset);
3507   display_info_fstr(parent_tree->parent, pinfo->cinfo, COL_INFO, "[%s]", val_to_str(sa_opcode, lustre_mds_reint_t_vals, "Unknown sa_opc"));
3508
3509   offset=lustre_dissect_element_mdt_rec_setattr_sa_opcode(tvb, offset, pinfo, tree);
3510
3511   offset=lustre_dissect_element_mdt_rec_setattr_sa_cap(tvb, offset, pinfo, tree);
3512
3513   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsuid(tvb, offset, pinfo, tree);
3514
3515   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsuid_h(tvb, offset, pinfo, tree);
3516
3517   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsgid(tvb, offset, pinfo, tree);
3518
3519   offset=lustre_dissect_element_mdt_rec_setattr_sa_fsgid_h(tvb, offset, pinfo, tree);
3520
3521   offset=lustre_dissect_element_mdt_rec_setattr_sa_suppgid(tvb, offset, pinfo, tree);
3522
3523   offset=lustre_dissect_element_mdt_rec_setattr_sa_suppgid_h(tvb, offset, pinfo, tree);
3524
3525   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_1(tvb, offset, pinfo, tree);
3526
3527   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_1_h(tvb, offset, pinfo, tree);
3528
3529   offset=lustre_dissect_element_mdt_rec_setattr_sa_fid(tvb, offset, pinfo, tree);
3530
3531   offset=lustre_dissect_element_mdt_rec_setattr_sa_valid(tvb, offset, pinfo, tree);
3532
3533   offset=lustre_dissect_element_mdt_rec_setattr_sa_uid(tvb, offset, pinfo, tree);
3534
3535   offset=lustre_dissect_element_mdt_rec_setattr_sa_gid(tvb, offset, pinfo, tree);
3536
3537   offset=lustre_dissect_element_mdt_rec_setattr_sa_size(tvb, offset, pinfo, tree);
3538
3539   offset=lustre_dissect_element_mdt_rec_setattr_sa_blocks(tvb, offset, pinfo, tree);
3540
3541   offset=lustre_dissect_element_mdt_rec_setattr_sa_mtime(tvb, offset, pinfo, tree);
3542
3543   offset=lustre_dissect_element_mdt_rec_setattr_sa_atime(tvb, offset, pinfo, tree);
3544
3545   offset=lustre_dissect_element_mdt_rec_setattr_sa_ctime(tvb, offset, pinfo, tree);
3546
3547   offset=lustre_dissect_element_mdt_rec_setattr_sa_attr_flags(tvb, offset, pinfo, tree);
3548
3549   offset=lustre_dissect_element_mdt_rec_setattr_sa_mode(tvb, offset, pinfo, tree);
3550
3551   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_2(tvb, offset, pinfo, tree);
3552
3553   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_3(tvb, offset, pinfo, tree);
3554
3555   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_4(tvb, offset, pinfo, tree);
3556
3557   offset=lustre_dissect_element_mdt_rec_setattr_sa_padding_5(tvb, offset, pinfo, tree);
3558
3559
3560   proto_item_set_len(item, offset-old_offset);
3561
3562   return offset;
3563 }
3564
3565 /* IDL: struct mdt_rec_create { */
3566 /* IDL:         uint32 cr_opcode; */
3567 /* IDL:         uint32 cr_cap; */
3568 /* IDL:         uint32 cr_fsuid; */
3569 /* IDL:         uint32 cr_fsuid_h; */
3570 /* IDL:         uint32 cr_fsgid; */
3571 /* IDL:         uint32 cr_fsgid_h; */
3572 /* IDL:         uint32 cr_suppgid1; */
3573 /* IDL:         uint32 cr_suppgid1_h; */