MOS Source Code
Loading...
Searching...
No Matches
internal.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#pragma once
4
5
#include <
librpc/rpc.h
>
6
#include <
mos/types.h
>
7
8
#define RPC_REQUEST_MAGIC MOS_FOURCC('R', 'P', 'C', '>')
9
#define RPC_RESPONSE_MAGIC MOS_FOURCC('R', 'P', 'C', '<')
10
#define RPC_ARG_MAGIC MOS_FOURCC('R', 'P', 'C', 'A')
11
12
typedef
struct
13
{
14
u32
magic
;
// RPC_ARG_MAGIC
15
rpc_argtype_t
argtype
;
16
u32
size
;
17
char
data[];
18
}
__packed
rpc_arg_t
;
19
20
typedef
struct
21
{
22
u32
magic
;
// RPC_REQUEST_MAGIC
23
id_t
call_id
;
24
25
u32
function_id
;
26
u32
args_count
;
27
char
args_array[];
// rpc_arg_t[]
28
}
__packed
rpc_request_t
;
29
30
typedef
struct
31
{
32
u32
magic
;
// RPC_RESPONSE_MAGIC
33
id_t
call_id
;
34
35
rpc_result_code_t
result_code
;
36
size_t
data_size
;
37
char
data[];
38
}
__packed
rpc_response_t
;
__packed
#define __packed
Definition
mos_global.h:29
rpc.h
rpc_argtype_t
rpc_argtype_t
Definition
rpc.h:9
rpc_result_code_t
rpc_result_code_t
Definition
rpc.h:25
rpc_arg_t
Definition
internal.h:13
rpc_arg_t::magic
u32 magic
Definition
internal.h:14
rpc_arg_t::argtype
rpc_argtype_t argtype
Definition
internal.h:15
rpc_arg_t::size
u32 size
Definition
internal.h:16
rpc_request_t
Definition
internal.h:21
rpc_request_t::magic
u32 magic
Definition
internal.h:22
rpc_request_t::call_id
id_t call_id
Definition
internal.h:23
rpc_request_t::args_count
u32 args_count
Definition
internal.h:26
rpc_request_t::function_id
u32 function_id
Definition
internal.h:25
rpc_response_t
Definition
internal.h:31
rpc_response_t::magic
u32 magic
Definition
internal.h:32
rpc_response_t::result_code
rpc_result_code_t result_code
Definition
internal.h:35
rpc_response_t::call_id
id_t call_id
Definition
internal.h:33
rpc_response_t::data_size
size_t data_size
Definition
internal.h:36
types.h
u32
unsigned int u32
Definition
types.h:21
id_t
u32 id_t
Definition
types.h:74
libs
librpc
include-common
librpc
internal.h
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0