You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

guestrpc.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef _IPXE_GUESTRPC_H
  2. #define _IPXE_GUESTRPC_H
  3. /** @file
  4. *
  5. * VMware GuestRPC mechanism
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. #include <ipxe/vmware.h>
  11. /** GuestRPC magic number */
  12. #define GUESTRPC_MAGIC 0x49435052 /* "RPCI" */
  13. /** Open RPC channel */
  14. #define GUESTRPC_OPEN 0x00
  15. /** Open RPC channel success status */
  16. #define GUESTRPC_OPEN_SUCCESS 0x00010000
  17. /** Send RPC command length */
  18. #define GUESTRPC_COMMAND_LEN 0x01
  19. /** Send RPC command length success status */
  20. #define GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000
  21. /** Send RPC command data */
  22. #define GUESTRPC_COMMAND_DATA 0x02
  23. /** Send RPC command data success status */
  24. #define GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000
  25. /** Receive RPC reply length */
  26. #define GUESTRPC_REPLY_LEN 0x03
  27. /** Receive RPC reply length success status */
  28. #define GUESTRPC_REPLY_LEN_SUCCESS 0x00830000
  29. /** Receive RPC reply data */
  30. #define GUESTRPC_REPLY_DATA 0x04
  31. /** Receive RPC reply data success status */
  32. #define GUESTRPC_REPLY_DATA_SUCCESS 0x00010000
  33. /** Finish receiving RPC reply */
  34. #define GUESTRPC_REPLY_FINISH 0x05
  35. /** Finish receiving RPC reply success status */
  36. #define GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000
  37. /** Close RPC channel */
  38. #define GUESTRPC_CLOSE 0x06
  39. /** Close RPC channel success status */
  40. #define GUESTRPC_CLOSE_SUCCESS 0x00010000
  41. /** RPC command success status */
  42. #define GUESTRPC_SUCCESS 0x2031 /* "1 " */
  43. extern int guestrpc_open ( void );
  44. extern void guestrpc_close ( int channel );
  45. extern int guestrpc_command ( int channel, const char *command, char *reply,
  46. size_t reply_len );
  47. #endif /* _IPXE_GUESTRPC_H */