40#define EPROTO_OPEN __einfo_error ( EINFO_EPROTO_OPEN )
41#define EINFO_EPROTO_OPEN \
42 __einfo_uniqify ( EINFO_EPROTO, 0x00, "GuestRPC open failed" )
43#define EPROTO_COMMAND_LEN __einfo_error ( EINFO_EPROTO_COMMAND_LEN )
44#define EINFO_EPROTO_COMMAND_LEN \
45 __einfo_uniqify ( EINFO_EPROTO, 0x01, "GuestRPC command length failed" )
46#define EPROTO_COMMAND_DATA __einfo_error ( EINFO_EPROTO_COMMAND_DATA )
47#define EINFO_EPROTO_COMMAND_DATA \
48 __einfo_uniqify ( EINFO_EPROTO, 0x02, "GuestRPC command data failed" )
49#define EPROTO_REPLY_LEN __einfo_error ( EINFO_EPROTO_REPLY_LEN )
50#define EINFO_EPROTO_REPLY_LEN \
51 __einfo_uniqify ( EINFO_EPROTO, 0x03, "GuestRPC reply length failed" )
52#define EPROTO_REPLY_DATA __einfo_error ( EINFO_EPROTO_REPLY_DATA )
53#define EINFO_EPROTO_REPLY_DATA \
54 __einfo_uniqify ( EINFO_EPROTO, 0x04, "GuestRPC reply data failed" )
55#define EPROTO_REPLY_FINISH __einfo_error ( EINFO_EPROTO_REPLY_FINISH )
56#define EINFO_EPROTO_REPLY_FINISH \
57 __einfo_uniqify ( EINFO_EPROTO, 0x05, "GuestRPC reply finish failed" )
58#define EPROTO_CLOSE __einfo_error ( EINFO_EPROTO_CLOSE )
59#define EINFO_EPROTO_CLOSE \
60 __einfo_uniqify ( EINFO_EPROTO, 0x06, "GuestRPC close failed" )
99 &discard_d, &discard_b );
102 "length %zd failed: status %08x\n",
124 &discard_d, &discard_b );
127 "data %08x failed: status %08x\n",
176 "%d data failed: status %08x\n",
198 &discard_d, &discard_b );
220 &discard_d, &discard_b );
245 uint8_t *reply_bytes = ( (
void * ) reply );
247 int orig_reply_len = reply_len;
250 size_t status_len =
sizeof (
status );
263 assert ( ( reply !=
NULL ) || ( reply_len == 0 ) );
272 for ( i =
sizeof (
data ) ; i ; i-- ) {
275 *(command_bytes++) );
291 for ( remaining =
len ; remaining > 0 ; remaining -=
sizeof (
data ) ) {
296 for ( i =
sizeof (
data ) ; i ; i-- ) {
298 *(status_bytes++) = (
data & 0xff );
301 }
else if ( reply_len ) {
302 *(reply_bytes++) = (
data & 0xff );
317 ( (
len < orig_reply_len ) ?
len : orig_reply_len ) );
322 "(status %04x, reply id %d, reply length %d):\n",
327 ( (
len < orig_reply_len ) ?
len : orig_reply_len ));
#define NULL
NULL pointer (VOID *)
struct arbelprm_rc_send_wqe rc
#define assert(condition)
Assert a condition at run-time.
uint8_t data[48]
Additional event data.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define EIO
Input/output error.
static int guestrpc_reply_data(int channel, uint16_t reply_id, uint32_t *data)
Receive GuestRPC reply data.
#define EPROTO_COMMAND_DATA
#define EPROTO_REPLY_FINISH
#define EPROTO_COMMAND_LEN
#define EPROTO_REPLY_DATA
static int guestrpc_command_data(int channel, uint32_t data)
Send GuestRPC command data.
static int guestrpc_command_len(int channel, size_t len)
Send GuestRPC command length.
int guestrpc_open(void)
Open GuestRPC channel.
static int guestrpc_reply_finish(int channel, uint16_t reply_id)
Finish receiving GuestRPC reply.
static int guestrpc_reply_len(int channel, uint16_t *reply_id)
Receive GuestRPC reply length.
void guestrpc_close(int channel)
Close GuestRPC channel.
int guestrpc_command(int channel, const char *command, char *reply, size_t reply_len)
Issue GuestRPC command.
VMware GuestRPC mechanism.
#define GUESTRPC_COMMAND_LEN
Send RPC command length.
#define GUESTRPC_MAGIC
GuestRPC magic number.
#define GUESTRPC_SUCCESS
RPC command success status.
#define GUESTRPC_OPEN
Open RPC channel.
#define GUESTRPC_REPLY_DATA_SUCCESS
Receive RPC reply data success status.
#define GUESTRPC_CLOSE_SUCCESS
Close RPC channel success status.
#define GUESTRPC_COMMAND_DATA
Send RPC command data.
#define GUESTRPC_REPLY_DATA
Receive RPC reply data.
#define GUESTRPC_OPEN_SUCCESS
Open RPC channel success status.
#define GUESTRPC_CLOSE
Close RPC channel.
#define GUESTRPC_REPLY_FINISH
Finish receiving RPC reply.
#define GUESTRPC_COMMAND_LEN_SUCCESS
Send RPC command length success status.
#define GUESTRPC_REPLY_LEN_SUCCESS
Receive RPC reply length success status.
#define GUESTRPC_REPLY_FINISH_SUCCESS
Finish receiving RPC reply success status.
#define GUESTRPC_COMMAND_DATA_SUCCESS
Send RPC command data success status.
#define GUESTRPC_REPLY_LEN
Receive RPC reply length.
uint32_t channel
RNDIS channel.
size_t strlen(const char *src)
Get length of string.
VMware backdoor mechanism.