2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2016 Google Inc. All rights reserved.
8 * Copyright(c) 2016 Linaro Ltd. All rights reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License version 2 for more details.
21 * Copyright(c) 2016 Google Inc. All rights reserved.
22 * Copyright(c) 2016 Linaro Ltd. All rights reserved.
24 * Redistribution and use in source and binary forms, with or without
25 * modification, are permitted provided that the following conditions
28 * * Redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer.
30 * * Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in
32 * the documentation and/or other materials provided with the
34 * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
35 * its contributors may be used to endorse or promote products
36 * derived from this software without specific prior written
39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
40 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
41 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
42 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
43 * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
45 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
47 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 /* APBridgeA RPC (ARPC) */
59 ARPC_NO_MEMORY = 0x01,
62 ARPC_UNKNOWN_ERROR = 0xff,
65 struct arpc_request_message {
66 __le16 id; /* RPC unique id */
67 __le16 size; /* Size in bytes of header + payload */
68 __u8 type; /* RPC type */
69 __u8 data[0]; /* ARPC data */
72 struct arpc_response_message {
73 __le16 id; /* RPC unique id */
74 __u8 result; /* Result of RPC */
78 #define ARPC_TYPE_CPORT_CONNECTED 0x01
79 #define ARPC_TYPE_CPORT_QUIESCE 0x02
80 #define ARPC_TYPE_CPORT_CLEAR 0x03
81 #define ARPC_TYPE_CPORT_FLUSH 0x04
82 #define ARPC_TYPE_CPORT_SHUTDOWN 0x05
84 struct arpc_cport_connected_req {
88 struct arpc_cport_quiesce_req {
94 struct arpc_cport_clear_req {
98 struct arpc_cport_flush_req {
102 struct arpc_cport_shutdown_req {
108 #endif /* __ARPC_H */