iPXE
guestrpc.h
Go to the documentation of this file.
1 #ifndef _IPXE_GUESTRPC_H
2 #define _IPXE_GUESTRPC_H
3 
4 /** @file
5  *
6  * VMware GuestRPC mechanism
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <stdint.h>
13 #include <ipxe/vmware.h>
14 
15 /** GuestRPC magic number */
16 #define GUESTRPC_MAGIC 0x49435052 /* "RPCI" */
17 
18 /** Open RPC channel */
19 #define GUESTRPC_OPEN 0x00
20 
21 /** Open RPC channel success status */
22 #define GUESTRPC_OPEN_SUCCESS 0x00010000
23 
24 /** Send RPC command length */
25 #define GUESTRPC_COMMAND_LEN 0x01
26 
27 /** Send RPC command length success status */
28 #define GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000
29 
30 /** Send RPC command data */
31 #define GUESTRPC_COMMAND_DATA 0x02
32 
33 /** Send RPC command data success status */
34 #define GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000
35 
36 /** Receive RPC reply length */
37 #define GUESTRPC_REPLY_LEN 0x03
38 
39 /** Receive RPC reply length success status */
40 #define GUESTRPC_REPLY_LEN_SUCCESS 0x00830000
41 
42 /** Receive RPC reply data */
43 #define GUESTRPC_REPLY_DATA 0x04
44 
45 /** Receive RPC reply data success status */
46 #define GUESTRPC_REPLY_DATA_SUCCESS 0x00010000
47 
48 /** Finish receiving RPC reply */
49 #define GUESTRPC_REPLY_FINISH 0x05
50 
51 /** Finish receiving RPC reply success status */
52 #define GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000
53 
54 /** Close RPC channel */
55 #define GUESTRPC_CLOSE 0x06
56 
57 /** Close RPC channel success status */
58 #define GUESTRPC_CLOSE_SUCCESS 0x00010000
59 
60 /** RPC command success status */
61 #define GUESTRPC_SUCCESS 0x2031 /* "1 " */
62 
63 extern int guestrpc_open ( void );
64 extern void guestrpc_close ( int channel );
65 extern int guestrpc_command ( int channel, const char *command, char *reply,
66  size_t reply_len );
67 
68 #endif /* _IPXE_GUESTRPC_H */
A command-line command.
Definition: command.h:9
int guestrpc_command(int channel, const char *command, char *reply, size_t reply_len)
Issue GuestRPC command.
Definition: guestrpc.c:242
VMware backdoor mechanism.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t channel
RNDIS channel.
Definition: netvsc.h:14
int guestrpc_open(void)
Open GuestRPC channel.
Definition: guestrpc.c:67
void guestrpc_close(int channel)
Close GuestRPC channel.
Definition: guestrpc.c:213