guestrpc.h File Reference
`#include <glib.h>`
`#include "vmware/tools/utils.h"`

Go to the source code of this file.

## Data Structures

struct | RpcInData
struct | RpcChannelCallback

## Macros

#define | RPCIN_SETRETVALS RpcChannel_SetRetVals
#define | RPCIN_SETRETVALSF RpcChannel_SetRetValsF

## Typedefs

typedef struct _RpcChannel | RpcChannel
typedef struct RpcInData | RpcInData
typedef enum RpcChannelType | RpcChannelType
typedef gboolean(* | RpcIn_Callback) (RpcInData *data)
typedef struct RpcChannelCallback | RpcChannelCallback
typedef void(* | RpcChannelResetCb) (RpcChannel *chan, gboolean success, gpointer data)

## Enumerations

enum | RpcChannelType { RPCCHANNEL_TYPE_INACTIVE, RPCCHANNEL_TYPE_BKDOOR, RPCCHANNEL_TYPE_PRIV_VSOCK, RPCCHANNEL_TYPE_UNPRIV_VSOCK }

## Functions

gboolean | RpcChannel_Start (RpcChannel *chan)
void | RpcChannel_Stop (RpcChannel *chan)
RpcChannelType | RpcChannel_GetType (RpcChannel *chan)
gboolean | RpcChannel_Send (RpcChannel *chan, char const *data, size_t dataLen, char **result, size_t *resultLen)
void | RpcChannel_Free (void *ptr)
gboolean | RpcChannel_BuildXdrCommand (const char *cmd, void *xdrProc, void *xdrData, char **result, size_t *resultLen)
RpcChannel * | RpcChannel_Create (void)
void | RpcChannel_Shutdown (RpcChannel *chan)
gboolean | RpcChannel_Destroy (RpcChannel *chan)
gboolean | RpcChannel_Dispatch (RpcInData *data)
void | RpcChannel_Setup (RpcChannel *chan, const gchar *appName, GMainContext *mainCtx, gpointer appCtx, RpcChannelResetCb resetCb, gpointer resetData)
void | RpcChannel_RegisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
gboolean | RpcChannel_SetRetVals (RpcInData *data, char const *result, gboolean retVal)
gboolean | RpcChannel_SetRetValsF (RpcInData *data, char *result, gboolean retVal)
void | RpcChannel_UnregisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
gboolean | RpcChannel_SendOneRaw (const char *data, size_t dataLen, char **result, size_t *resultLen)
gboolean | RpcChannel_SendOne (char **reply, size_t *repLen, const char *reqFmt,...)
RpcChannel * | RpcChannel_New (void)
void | RpcChannel_SetBackdoorOnly (void)

## Detailed Description

Defines the interface between applications and the underlying GuestRPC channel. The goal is to have an abstraction so applications can run over the backdoor, vSockets or TCP/IP sockets by just picking up the desired channel at runtime, without the need to modify the code.

For this reason, the behavior of all channels is modeled after the RpcIn channel currently used in Tools, so the socket-based channels won't provide much better functionality than what the backdoor provides (aside from being interrupt-based rather than poll-based).