Data Structures | Defines | Typedefs | Functions

lib/include/vmware/tools/guestrpc.h File Reference

#include <glib.h>
#include "vmware/tools/utils.h"
Include dependency graph for guestrpc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RpcInData
struct  RpcChannelCallback
struct  RpcChannel

Defines

#define RPCIN_SETRETVALS   RpcChannel_SetRetVals

Typedefs

typedef struct RpcInData RpcInData
typedef gboolean(* RpcIn_Callback )(RpcInData *data)
typedef struct RpcChannelCallback RpcChannelCallback
typedef gboolean(* RpcChannelStartFn )(struct RpcChannel *)
typedef void(* RpcChannelStopFn )(struct RpcChannel *)
typedef void(* RpcChannelShutdownFn )(struct RpcChannel *)
typedef gboolean(* RpcChannelSendFn )(struct RpcChannel *, char *data, size_t dataLen, char **result, size_t *resultLen)
typedef void(* RpcChannelSetupFn )(struct RpcChannel *chan, GMainContext *mainCtx, const char *appName, gpointer appCtx)
typedef void(* RpcChannelResetCb )(struct RpcChannel *chan, gboolean success, gpointer data)
typedef struct RpcChannel RpcChannel

Functions

G_INLINE_FUNC gboolean RpcChannel_Start (RpcChannel *chan)
G_INLINE_FUNC void RpcChannel_Stop (RpcChannel *chan)
G_INLINE_FUNC gboolean RpcChannel_Send (RpcChannel *chan, char *data, size_t dataLen, char **result, size_t *resultLen)
gboolean RpcChannel_BuildXdrCommand (const char *cmd, void *xdrProc, void *xdrData, char **result, size_t *resultLen)
RpcChannelRpcChannel_Create (void)
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 *result, gboolean retVal)
void RpcChannel_UnregisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
RpcChannelBackdoorChannel_New (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, VMCI sockets 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).