open-vm-tools 9.4.6
Data Structures | Macros | Typedefs | Functions
GuestRPC functions

Functions related to reading and writing data on a GuestRPC channel. More...

Data Structures

struct  RpcInData
struct  RpcChannelCallback
struct  RpcChannel

Macros

#define RPCIN_SETRETVALS   RpcChannel_SetRetVals
#define RPCIN_SETRETVALSF   RpcChannel_SetRetValsF

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 const *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 const *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 const *result, gboolean retVal)
gboolean RpcChannel_SetRetValsF (RpcInData *data, char *result, gboolean retVal)
void RpcChannel_UnregisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
RpcChannelBackdoorChannel_New (void)

Detailed Description

Functions related to reading and writing data on a GuestRPC channel.

Macro Definition Documentation

#define RPCIN_SETRETVALS   RpcChannel_SetRetVals

Aliases.

Typedef Documentation

typedef struct RpcChannel RpcChannel

Defines the interface between the application and the RPC channel.

Defines the registration data for a GuestRPC application.

typedef void(* RpcChannelResetCb)(struct RpcChannel *chan, gboolean success, gpointer data)

Signature for the callback function called after a channel reset.

Parameters
[in]chanThe RPC channel.
[in]successWhether reset was successful.
[in]dataClient data.
typedef gboolean(* RpcIn_Callback)(RpcInData *data)

Type for RpcIn callbacks. The callback function is responsible for allocating memory for the result string.

typedef struct RpcInData RpcInData

Data structure passed to RPC callbacks.

Function Documentation

G_INLINE_FUNC gboolean RpcChannel_Send ( RpcChannel chan,
char const *  data,
size_t  dataLen,
char **  result,
size_t *  resultLen 
)

Wrapper for the send function of an RPC channel struct.

Parameters
[in]chanThe RPC channel instance.
[in]dataData to send.
[in]dataLenNumber of bytes to send.
[out]resultResponse from other side (should be freed by caller).
[out]resultLenNumber of bytes in response.
Returns
The status from the remote end (TRUE if call was successful).
G_INLINE_FUNC gboolean RpcChannel_Start ( RpcChannel chan)

Wrapper for the start function of an RPC channel struct.

Parameters
[in]chanThe RPC channel instance.
Returns
TRUE on success.
G_INLINE_FUNC void RpcChannel_Stop ( RpcChannel chan)

Wrapper for the stop function of an RPC channel struct.

Parameters
[in]chanThe RPC channel instance.