iPXE
|
VMware GuestRPC mechanism. More...
Go to the source code of this file.
Macros | |
#define | GUESTRPC_MAGIC 0x49435052 /* "RPCI" */ |
GuestRPC magic number. More... | |
#define | GUESTRPC_OPEN 0x00 |
Open RPC channel. More... | |
#define | GUESTRPC_OPEN_SUCCESS 0x00010000 |
Open RPC channel success status. More... | |
#define | GUESTRPC_COMMAND_LEN 0x01 |
Send RPC command length. More... | |
#define | GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000 |
Send RPC command length success status. More... | |
#define | GUESTRPC_COMMAND_DATA 0x02 |
Send RPC command data. More... | |
#define | GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000 |
Send RPC command data success status. More... | |
#define | GUESTRPC_REPLY_LEN 0x03 |
Receive RPC reply length. More... | |
#define | GUESTRPC_REPLY_LEN_SUCCESS 0x00830000 |
Receive RPC reply length success status. More... | |
#define | GUESTRPC_REPLY_DATA 0x04 |
Receive RPC reply data. More... | |
#define | GUESTRPC_REPLY_DATA_SUCCESS 0x00010000 |
Receive RPC reply data success status. More... | |
#define | GUESTRPC_REPLY_FINISH 0x05 |
Finish receiving RPC reply. More... | |
#define | GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000 |
Finish receiving RPC reply success status. More... | |
#define | GUESTRPC_CLOSE 0x06 |
Close RPC channel. More... | |
#define | GUESTRPC_CLOSE_SUCCESS 0x00010000 |
Close RPC channel success status. More... | |
#define | GUESTRPC_SUCCESS 0x2031 /* "1 " */ |
RPC command success status. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | guestrpc_open (void) |
Open GuestRPC channel. More... | |
void | guestrpc_close (int channel) |
Close GuestRPC channel. More... | |
int | guestrpc_command (int channel, const char *command, char *reply, size_t reply_len) |
Issue GuestRPC command. More... | |
VMware GuestRPC mechanism.
Definition in file guestrpc.h.
#define GUESTRPC_MAGIC 0x49435052 /* "RPCI" */ |
GuestRPC magic number.
Definition at line 16 of file guestrpc.h.
#define GUESTRPC_OPEN 0x00 |
Open RPC channel.
Definition at line 19 of file guestrpc.h.
#define GUESTRPC_OPEN_SUCCESS 0x00010000 |
Open RPC channel success status.
Definition at line 22 of file guestrpc.h.
#define GUESTRPC_COMMAND_LEN 0x01 |
Send RPC command length.
Definition at line 25 of file guestrpc.h.
#define GUESTRPC_COMMAND_LEN_SUCCESS 0x00810000 |
Send RPC command length success status.
Definition at line 28 of file guestrpc.h.
#define GUESTRPC_COMMAND_DATA 0x02 |
Send RPC command data.
Definition at line 31 of file guestrpc.h.
#define GUESTRPC_COMMAND_DATA_SUCCESS 0x00010000 |
Send RPC command data success status.
Definition at line 34 of file guestrpc.h.
#define GUESTRPC_REPLY_LEN 0x03 |
Receive RPC reply length.
Definition at line 37 of file guestrpc.h.
#define GUESTRPC_REPLY_LEN_SUCCESS 0x00830000 |
Receive RPC reply length success status.
Definition at line 40 of file guestrpc.h.
#define GUESTRPC_REPLY_DATA 0x04 |
Receive RPC reply data.
Definition at line 43 of file guestrpc.h.
#define GUESTRPC_REPLY_DATA_SUCCESS 0x00010000 |
Receive RPC reply data success status.
Definition at line 46 of file guestrpc.h.
#define GUESTRPC_REPLY_FINISH 0x05 |
Finish receiving RPC reply.
Definition at line 49 of file guestrpc.h.
#define GUESTRPC_REPLY_FINISH_SUCCESS 0x00010000 |
Finish receiving RPC reply success status.
Definition at line 52 of file guestrpc.h.
#define GUESTRPC_CLOSE 0x06 |
Close RPC channel.
Definition at line 55 of file guestrpc.h.
#define GUESTRPC_CLOSE_SUCCESS 0x00010000 |
Close RPC channel success status.
Definition at line 58 of file guestrpc.h.
#define GUESTRPC_SUCCESS 0x2031 /* "1 " */ |
RPC command success status.
Definition at line 61 of file guestrpc.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int guestrpc_open | ( | void | ) |
Open GuestRPC channel.
channel | Channel number, or negative error |
Definition at line 67 of file guestrpc.c.
References channel, DBGC, EPROTO_OPEN, GUESTRPC_MAGIC, GUESTRPC_OPEN, GUESTRPC_OPEN_SUCCESS, and status.
Referenced by guestinfo_init(), and vmconsole_init().
void guestrpc_close | ( | int | channel | ) |
Close GuestRPC channel.
channel | Channel number |
Definition at line 213 of file guestrpc.c.
References channel, DBGC, GUESTRPC_CLOSE, GUESTRPC_CLOSE_SUCCESS, GUESTRPC_MAGIC, and status.
int guestrpc_command | ( | int | channel, |
const char * | command, | ||
char * | reply, | ||
size_t | reply_len | ||
) |
Issue GuestRPC command.
channel | Channel number |
command | Command |
reply | Reply buffer |
reply_len | Length of reply buffer |
len | Length of reply, or negative error |
The actual length of the reply will be returned even if the buffer was too small.
Definition at line 242 of file guestrpc.c.
References assert(), channel, command_len, data, DBGC, DBGC2, DBGC2_HDA, DBGC_HDA, EIO, guestrpc_command_data(), guestrpc_command_len(), GUESTRPC_MAGIC, guestrpc_reply_data(), guestrpc_reply_finish(), guestrpc_reply_len(), GUESTRPC_SUCCESS, len, NULL, rc, status, and strlen().
Referenced by guestinfo_fetch_type(), and vmconsole_putchar().