1 #ifndef _IPXE_GUESTRPC_H
2 #define _IPXE_GUESTRPC_H
6 * VMware GuestRPC mechanism
10 FILE_LICENCE ( GPL2_OR_LATER );
13 #include <ipxe/vmware.h>
15 /** GuestRPC magic number */
16 #define GUESTRPC_MAGIC 0x49435052 /* "RPCI" */
18 /** Open RPC channel */
19 #define GUESTRPC_OPEN 0x00
21 /** Open RPC channel success status */
22 #define GUESTRPC_OPEN_SUCCESS 0x00010000
24 /** Send RPC command length */
25 #define GUESTRPC_COMMAND_LEN 0x01
27 /** Send RPC command length success status */
28 #define GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000
30 /** Send RPC command data */
31 #define GUESTRPC_COMMAND_DATA 0x02
33 /** Send RPC command data success status */
34 #define GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000
36 /** Receive RPC reply length */
37 #define GUESTRPC_REPLY_LEN 0x03
39 /** Receive RPC reply length success status */
40 #define GUESTRPC_REPLY_LEN_SUCCESS 0x00830000
42 /** Receive RPC reply data */
43 #define GUESTRPC_REPLY_DATA 0x04
45 /** Receive RPC reply data success status */
46 #define GUESTRPC_REPLY_DATA_SUCCESS 0x00010000
48 /** Finish receiving RPC reply */
49 #define GUESTRPC_REPLY_FINISH 0x05
51 /** Finish receiving RPC reply success status */
52 #define GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000
54 /** Close RPC channel */
55 #define GUESTRPC_CLOSE 0x06
57 /** Close RPC channel success status */
58 #define GUESTRPC_CLOSE_SUCCESS 0x00010000
60 /** RPC command success status */
61 #define GUESTRPC_SUCCESS 0x2031 /* "1 " */
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,
68 #endif /* _IPXE_GUESTRPC_H */