OpenVAS Scanner 23.23.1
ipc_pipe.h File Reference

Go to the source code of this file.

Data Structures

struct  ipc_pipe_context

Functions

int ipc_pipe_send (struct ipc_pipe_context *context, const char *msg, int len)
 sends given msg via the given context. Do not use this method directly, use ipc_send of ipc.h instead.
char * ipc_pipe_retrieve (struct ipc_pipe_context *context)
 retrieves message from the given context. Do not use this method directly, use ipc_retrieve of ipc.h instead.
int ipc_pipe_destroy (struct ipc_pipe_context *context)
 destroys given context. Do not use this method directly, use ipc_destroy of ipc.h instead.
int ipc_pipe_close (struct ipc_pipe_context *context)
 closes given context. Do not use this method directly, use ipc_close of ipc.h instead.
struct ipc_pipe_contextipc_init_pipe (void)
 initializes a new context. Do not use this method directly, use ipc_init of ipc.h instead.

Function Documentation

◆ ipc_init_pipe()

struct ipc_pipe_context * ipc_init_pipe ( void )

initializes a new context. Do not use this method directly, use ipc_init of ipc.h instead.

Returns
a heap allocated ipc_pipe_context or NULL on failure.

◆ ipc_pipe_close()

int ipc_pipe_close ( struct ipc_pipe_context * context)

closes given context. Do not use this method directly, use ipc_close of ipc.h instead.

Parameters
contextthe ipc_pipe_context to be closed.
Returns
0 on success, -1 on failure.

◆ ipc_pipe_destroy()

int ipc_pipe_destroy ( struct ipc_pipe_context * context)

destroys given context. Do not use this method directly, use ipc_destroy of ipc.h instead.

Parameters
contextthe ipc_pipe_context to be destroyed.
Returns
0 on success, -1 on failure.

◆ ipc_pipe_retrieve()

char * ipc_pipe_retrieve ( struct ipc_pipe_context * context)

retrieves message from the given context. Do not use this method directly, use ipc_retrieve of ipc.h instead.

Parameters
contextthe ipc_pipe_context to be used; must be previously initialized via ipc_pipe_init.
Returns
a heap allocated char array or NULL on failure.

◆ ipc_pipe_send()

int ipc_pipe_send ( struct ipc_pipe_context * context,
const char * msg,
int len )

sends given msg via the given context. Do not use this method directly, use ipc_send of ipc.h instead.

Parameters
contextthe ipc_pipe_context to be used; must be previously initialized via ipc_pipe_init.
msgthe message to send
lenthe length of msg
Returns
bytes written, 1 on write error