TABLE OF CONTENTS


libram-rpc/libram-rpc [ Generics ]

[ Top ] [ Generics ]

NAME

libram-rpc - rpc backend to libram

DESCRIPTION

libram-rpc is a backend module for libram, that can be used to implement a remote analysis and modification module.

libram-rpc is the client side onc/rpc side. The server side onc/rpc is implemented in libram-rpcserver(3). The analysis component can include libram-rpcserver(3) to get the data from the libram-rpc(3) module. The connection string for the libram-rpc(3) module consists of:

NOTES

The protocol version v4+v6 may not work on all operating systems.

SEE ALSO

libram(3), libram-rpcserver(3), libramrpc_init(3), libramrpc(3)


libram-rpc/libramrpc [ Variables ]

[ Top ] [ libram-rpc ] [ Variables ]

NAME

libramrpc - libram_module structure for libram-rpc module

DESCRIPTION

This variable define the libram_module(3) structure of the libram-rpc(3) module.

SOURCE

struct libram_module libramrpc = {
        "rpc",
        NULL,

        libramrpc_init,
        libramrpc_exit,

        libramrpc_open,
        libramrpc_data,
        libramrpc_close,

        libramrpc_fd,
        libramrpc_process,
        libramrpc_wait,
        libramrpc_free,
};

SEE ALSO

libram(3), libram_module(3)


libram-rpc/libramrpc_close [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_close - libram_close function for libram-rpc

SYNOPSIS

struct reply *libramrpc_close(ram_bh bh, int flags, long id, conn_payloadp d)

DESCRIPTION

libramrpc_close implements the libram_close function for the libram-rpc module.

It passes the parameters to the rpcserver side component using onc/rpc.

ARGUMENTS

RETURN

SEE ALSO

libramrpc_init(3), libramrpc_exit(3), libram_flags(3), libramrpc_open(3), libramrpc_data(3), libramrpc_reconnect(3), ram_bh(3), conn_payload(3), libram(3)


libram-rpc/libramrpc_connect [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_connect - connect to libramrpc-server

SYNOPSIS

ram_bh libramrpc_connect(struct ramrpc_bh *libram_bh)

DESCRIPTION

libramrpc_connect opens the socket and connects to the libramrpc-server. It then uses this socket to create a rpc client for this connection.

ARGUMENTS

RETURN

SEE ALSO

libram-rpc(3), libram_init(3), ramrpc_bh(3), libramrpc_disconnect(3), strtok(3),


libram-rpc/libramrpc_data [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_data - libram_data function for libram-rpc

SYNOPSIS

struct reply *libramrpc_data(ram_bh bh, int flags, long id, conn_payload* d)

DESCRIPTION

libramrpc_data implements the libram_data function for the libram-rpc module.

It passes the parameters to the rpcserver side component using onc/rpc.

ARGUMENTS

RETURN

SEE ALSO

libramrpc_init(3), libramrpc_exit(3), ram_bh(3), libram_flags(3), libramrpc_open(3), libramrpc_data(3), libramrpc_close(3), libramrpc_reconnect(3), conn_payload(3), libram(3)


libram-rpc/libramrpc_disconnect [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_disconnect - disconnect from libramrpc-server

SYNOPSIS

void libramrpc_disconnect(struct ramrpc_bh *libram_bh)

DESCRIPTION

libramrpc_disconnect(3) disconnects from the libramrpc-server by destroing the client and closing the socket.

ARGUMENTS

RETURN

0

SEE ALSO

libramrpc_connect(3), libramrpc_disconnect(3), ramrpc_bh(3), libram-rpc(3)


libram-rpc/libramrpc_exit [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_exit - libram_exit function for libram-rpc

SYNOPSIS

int libramrpc_exit(ram_bh bh)

DESCRIPTION

libramrpc_exit implements the libram_exit function for the libram-rpc module. It closes the onc/rpc connection opened by libramrpc_connect(3) with libramrpc_disconnect(3), and frees the ramrpc_bh handle.

ARGUMENTS

RETURN

0

SEE ALSO

libramrpc_connect(3), libramrpc_disconnect(3), ramrpc_bh(3), libram-rpc(3)


libram-rpc/libramrpc_fd [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_fd - get filedescriptor used by libramrpc

SYNOPSIS

int libramrpc_fd(ram_bh bh)

DESCRIPTION

libramrpc_fd is used to get the file descriptor used internally in libram-rpc.

ARGUMENTS

RETURN

SEE ALSO

libram-rpc(3), libramrpc_process(3), libramrpc_wait(3), libram(3)


libram-rpc/libramrpc_free [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_free - free reply strucutre from libram_process and libram_wait

SYNOPSIS

void libramrpc_free(ram_bh bh, struct reply *res)

DESCRIPTION

libramrpc_free frees the memory allocated with libramrpc_process or libramrpc_wait.

ARGUMENTS

SEE ALSO

libram-rpc(3), libramrpc_process(3), libramrpc_fd(3), libramrpc_wait(3), libram(3)


libram-rpc/libramrpc_init [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_init - libram_init function for libram-rpc

SYNOPSIS

ram_bh libramrpc_init(char *conn, int *flags)

DESCRIPTION

libramrpc_init implements the libram_init function for the libram-rpc module. See libram_init(3) for a general description of the conn and flags parameter. See libram-rpc(3) for a description of the connect and flag parameters specific for the libram-rpc(3) module.

libramrpc_init parses and checks the parameters and does the necessary host and port lookups using getaddrinfo(3). When the connection parameters are determined it calls libramrpc_connect(3) to connect to the libramrcp-server.

ARGUMENTS

RETURN

NOTES

connect is parsed with strtok(3). strtok(3) alters the string and adds null characters to the string.

SEE ALSO

libram-rpc(3), libram(3), libram_init(3), libram_port(3), libramrpc_connect(3), libramrpc_disconnect(3), ramrpc_bh(3), getaddrinfo(3), strtok(3)


libram-rpc/libramrpc_open [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_open - libram_open function for libram-rpc

SYNOPSIS

struct reply *libramrpc_open(ram_bh bh, int flags,
                        long id, conn_hdr* hdr, conn_payload* d)

DESCRIPTION

libramrpc_open implements the libram_open function for the libram-rpc module.

It passes the parameters to the rpcserver side component using onc/rpc.

ARGUMENTS

RETURN

SEE ALSO

libramrpc_init(3), libramrpc_exit(3), ram_bh(3), libram_flags(3), libramrpc_open(3), libramrpc_data(3), libramrpc_close(3), libramrpc_reconnect(3), conn_hdr(3), conn_payload(3), libram(3)


libram-rpc/libramrpc_process [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_process - process input on libramrpc file descriptor

SYNOPSIS

struct reply *libramrpc_process(ram_bh bh, fd_set *fds)

DESCRIPTION

libramrpc_process handles input on the libramrpc file descriptor. It reads incoming data with libramrpc_readreply(3).

ARGUMENTS

RETURN

NOTES

libramrpc_process expects that data can be read from the socket. libramrpc_process may block in read if this is not the case.

SEE ALSO

libram-rpc(3), libramrpc_fd(3), libramrpc_wait(3), libram(3)


libram-rpc/libramrpc_readreply [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_readreply - read input on libramrpc file descriptor

SYNOPSIS

static struct reply *libramrpc_readreply(ram_bh bh, fd_set *fds)

DESCRIPTION

libramrpc_readreply handles input on the libramrpc file descriptor. It checks if it's file descriptor is set in the fd_set fds and decodes incoming responses from the libram-rpcserver.

ARGUMENTS

RETURN

NOTES

libramrpc_process expects that data can be read from the socket. libramrpc_process may block in read if this is not the case.

SEE ALSO

libram-rpc(3), libramrpc_fd(3), libramrpc_process(3), libramrpc_wait(3), libram(3)


libram-rpc/libramrpc_reconnect [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_reconnect - reconnect to libramrpc-server

SYNOPSIS

ram_bh libramrpc_reconnect(struct ramrpc_bh *libram_bh)

DESCRIPTION

libramrpc_reconnect(3) tries to reconnect to the libramrpc-server by disconnecting and connecting again.

ARGUMENTS

RETURN

0

SEE ALSO

libramrpc_connect(3), libramrpc_disconnect(3), ramrpc_bh(3), libram-rpc(3)


libram-rpc/libramrpc_result [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_result - result postprecessing for libramrpc callbacks

SYNOPSIS

struct reply * libramrpc_result(ram_bh bh, int flags,
                struct reply *r, char *routine)

DESCRIPTION

libramrpc_result does postprocessing for libramrpc callbacks. The postprocessing includes:

ARGUMENTS

RETURN

SEE ALSO

libramrpc_init(3), libramrpc_exit(3), ram_bh(3), libram_flags(3), libramrpc_open(3), libramrpc_data(3), libramrpc_close(3), libramrpc_wait(3), libramrpc_process(3), libramrpc_free(3)


libram-rpc/libramrpc_wait [ Functions ]

[ Top ] [ libram-rpc ] [ Functions ]

NAME

libramrpc_wait - wait for answer from libramrpc call

SYNOPSIS

struct reply *libramrpc_wait(ram_bh bh, int timeout)

DESCRIPTION

libramrpc_wait waits for an answer from a libramrpc remote procedure call. It decodes the reply message and returns the result.

ARGUMENTS

RETURN

NOTES

The timeout is used for each select(3) call. This it gives no upper limit for the timeout in libramrpc_wait(3)

SEE ALSO

libram-rpc(3), libramrpc_process(3), libramrpc_fd(3), libram(3)