open-vm-tools 12.1.5: GuestRPC functions

open-vm-tools 12.1.5

Data Structures | Macros | Typedefs | Enumerations | Functions
GuestRPC functions

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

## Data Structures
struct | RpcInData
struct | RpcChannelCallback

## Macros
#define | RPCIN_SETRETVALS RpcChannel_SetRetVals
#define | RPCIN_SETRETVALSF RpcChannel_SetRetValsF
#define | RPCCHANNEL_SEND_PERMISSION_DENIED "Permission denied"

## 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)
typedef void(* | RpcChannelFailureCb) (gpointer _state)

## 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)
gboolean | RpcChannel_Dispatch (RpcInData *data)
void | RpcChannel_Setup (RpcChannel *chan, const gchar *appName, GMainContext *mainCtx, gpointer appCtx, RpcChannelResetCb resetCb, gpointer resetData, RpcChannelFailureCb failureCb, guint maxFailures)
void | RpcChannel_RegisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
void | RpcChannel_UnregisterCallback (RpcChannel *chan, RpcChannelCallback *rpc)
RpcChannel * | RpcChannel_Create (void)
void | RpcChannel_Destroy (RpcChannel *chan)
gboolean | RpcChannel_SetRetVals (RpcInData *data, char const *result, gboolean retVal)
gboolean | RpcChannel_SetRetValsF (RpcInData *data, char *result, gboolean retVal)
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)
RpcChannel * | BackdoorChannel_New (void)

## Detailed Description

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

## Macro Definition Documentation

## ◆ RPCCHANNEL_SEND_PERMISSION_DENIED

#define RPCCHANNEL_SEND_PERMISSION_DENIED "Permission denied"

Error messages returned by RpcChannel Send APIs

## ◆ RPCIN_SETRETVALS

#define RPCIN_SETRETVALS RpcChannel_SetRetVals

Aliases.

## Typedef Documentation

## ◆ RpcChannelCallback

typedef struct RpcChannelCallback RpcChannelCallback

Defines the registration data for a GuestRPC application.

## ◆ RpcChannelFailureCb

typedef void(* RpcChannelFailureCb) (gpointer _state)

Signature for the application callback function when unable to establish an RpcChannel connection.

Parameters

  [in] | _state | Client data.

## ◆ RpcChannelResetCb

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

Signature for the callback function called after a channel reset.

Parameters

  [in] | chan | The RPC channel.
  [in] | success | Whether reset was successful.
  [in] | data | Client data.

## ◆ RpcIn_Callback

typedef gboolean(* RpcIn_Callback) (RpcInData *data)

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

## ◆ RpcInData

typedef struct RpcInData RpcInData

Data structure passed to RPC callbacks.