4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.gnu.org/licenses/gpl-2.0.html
23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Use is subject to license terms.
26 * Copyright (c) 2011, 2014, Intel Corporation.
28 * Copyright 2015 Cray Inc, all rights reserved.
31 * We assume all nodes are either little-endian or big-endian, and we
32 * always send messages in the sender's native format. The receiver
33 * detects the message format by checking the 'magic' field of the message
34 * (see lustre_msg_swabbed() below).
36 * Each type has corresponding 'lustre_swab_xxxtypexxx()' routines
37 * are implemented in ptlrpc/pack_generic.c. These 'swabbers' convert the
38 * type from "other" endian, in-place in the message buffer.
40 * A swabber takes a single pointer argument. The caller must already have
41 * verified that the length of the message buffer >= sizeof (type).
43 * For variable length types, a second 'lustre_swab_v_xxxtypexxx()' routine
44 * may be defined that swabs just the variable part, after the caller has
45 * verified that the message buffer is large enough.
51 #include <uapi/linux/lustre/lustre_idl.h>
54 void lustre_swab_lu_fid(struct lu_fid *fid);
55 void lustre_swab_ost_id(struct ost_id *oid);
56 void lustre_swab_ll_fid(struct ll_fid *fid);
57 void lustre_swab_llogd_body(struct llogd_body *d);
58 void lustre_swab_llog_hdr(struct llog_log_hdr *h);
59 void lustre_swab_llogd_conn_body(struct llogd_conn_body *d);
60 void lustre_swab_llog_rec(struct llog_rec_hdr *rec);
61 void lustre_swab_llog_id(struct llog_logid *lid);
62 void lustre_swab_lu_seq_range(struct lu_seq_range *range);
63 void lustre_swab_update_ops(struct update_ops *uops, unsigned int op_count);
64 void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);
65 void lustre_swab_cfg_marker(struct cfg_marker *marker,