iPXE
|
00001 #ifndef _IPXE_GUESTRPC_H 00002 #define _IPXE_GUESTRPC_H 00003 00004 /** @file 00005 * 00006 * VMware GuestRPC mechanism 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); 00011 00012 #include <stdint.h> 00013 #include <ipxe/vmware.h> 00014 00015 /** GuestRPC magic number */ 00016 #define GUESTRPC_MAGIC 0x49435052 /* "RPCI" */ 00017 00018 /** Open RPC channel */ 00019 #define GUESTRPC_OPEN 0x00 00020 00021 /** Open RPC channel success status */ 00022 #define GUESTRPC_OPEN_SUCCESS 0x00010000 00023 00024 /** Send RPC command length */ 00025 #define GUESTRPC_COMMAND_LEN 0x01 00026 00027 /** Send RPC command length success status */ 00028 #define GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000 00029 00030 /** Send RPC command data */ 00031 #define GUESTRPC_COMMAND_DATA 0x02 00032 00033 /** Send RPC command data success status */ 00034 #define GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000 00035 00036 /** Receive RPC reply length */ 00037 #define GUESTRPC_REPLY_LEN 0x03 00038 00039 /** Receive RPC reply length success status */ 00040 #define GUESTRPC_REPLY_LEN_SUCCESS 0x00830000 00041 00042 /** Receive RPC reply data */ 00043 #define GUESTRPC_REPLY_DATA 0x04 00044 00045 /** Receive RPC reply data success status */ 00046 #define GUESTRPC_REPLY_DATA_SUCCESS 0x00010000 00047 00048 /** Finish receiving RPC reply */ 00049 #define GUESTRPC_REPLY_FINISH 0x05 00050 00051 /** Finish receiving RPC reply success status */ 00052 #define GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000 00053 00054 /** Close RPC channel */ 00055 #define GUESTRPC_CLOSE 0x06 00056 00057 /** Close RPC channel success status */ 00058 #define GUESTRPC_CLOSE_SUCCESS 0x00010000 00059 00060 /** RPC command success status */ 00061 #define GUESTRPC_SUCCESS 0x2031 /* "1 " */ 00062 00063 extern int guestrpc_open ( void ); 00064 extern void guestrpc_close ( int channel ); 00065 extern int guestrpc_command ( int channel, const char *command, char *reply, 00066 size_t reply_len ); 00067 00068 #endif /* _IPXE_GUESTRPC_H */