TABLE OF CONTENTS
- 1. libram/libram_config_detail
- 2. libram/libram_flags
- 3. libram/libram_module
- 4. libram/ram_bh
- 5. libram/ram_cb
- 6. libram/ram_fh
libram/libram_config_detail [ Structures ]
[ Top ] [ libram ] [ Structures ]
NAME
libram_config_detail
DESCRIPTION
This enum defines the possible information that libram_config(3) can return.
SOURCE
enum libram_config_detail { LIBRAM_NAME, LIBRAM_VERSION, LIBRAM_STRING, LIBRAM_CONFIGURE, LIBRAM_MODULEDIR, LIBRAM_BUGREPORT, };
SEE ALSO
libram(3), libram_config(3), libram_printconfig(3)
libram/libram_flags [ Structures ]
[ Top ] [ libram ] [ Structures ]
NAME
libram_flags - flags for libram
DESCRIPTION
These flags are used to signal libram the use of minor protocol variants. There are two areas of libram where minor protocol variants are in use:
- libram_init(): initialization functions
- libram_open(), libram_data(), libram_close(): data transfer functions
SOURCE
#define LIBRAM_SYNCHRONOUS 0x01 #define LIBRAM_NONBLOCK 0x02 #define LIBRAM_RECONNECT 0x04 #define LIBRAM_DISCARD_RESULT 0x10
ATTRIBUTES
- LIBRAM_SYNCHRONOUS: This flag is used in libram_init()
With this mode the client blocks until an answer from the analysis module is available. The client can use the return value of libram_open(), libram_data(), or libram_close() directly and does not have to call libram_wait(3) or libram_process(3). The result of the last reply code can still be requested with libram_wait(3) or libram_process(3). The value still needs to be freed with libram_free(3).
See libram-synchronous(3) and libram-asynchronous(3) for a detailed description of the synchronous and aysynchronous mode.
* LIBRAM_NONBLOCK: This flag is used in libram_init(3).
With this mode the client uses non-blocking mode for communication with remote analysis components.
* LIBRAM_RECONNECT: This flag is used in libram_init(3).
With this mode the client tries to autmatically reconnect to the remote analysis module if the connection was interrupted.
* LIBRAM_DISCARD_RESULT: This flag is used in libram_open(3),
libram_data(3), and libram_close(3).
This flag tells the analysis component, that the client is not interested in a result value of the libram_open(), libram_data(), or libram_close() functions. The analysis module will therefor not return a result value.
SEE ALSO
libram_open(3), libram_data(3). libram_close(3), libram_init(3), libram_exit(3), ram_fh(3), libram_fd(3), libram_fdset(3), libram_process(3), libram_wait(3), libram_poll(3), libram-synchronous(3), libram-asynchronous(3), libram(3)
libram/libram_module [ Structures ]
[ Top ] [ libram ] [ Structures ]
NAME
libram_module - libram backend module structure
DESCRIPTION
The libram_module structure defines the module backend interface to the libram analysis and modifiation modules. The structure consists of initializing and finalizing functions, as well as of functions that transfer the content to the analysis and modification modules. The third part of functions are functions needed for event handling, that allows the client to requests listening sockets and file set masks.
SOURCE
struct libram_module { char *libram_modulename; struct libram_module *libram_next; ram_bh (*libram_init)(char *connect, int *flags); int (*libram_exit)(ram_bh bh); struct reply* (*libram_open)(ram_bh bh, int flags, long id, struct conn_hdr* h, struct conn_payload *d); struct reply* (*libram_data)(ram_bh bh, int flags, long id, struct conn_payload* d); struct reply* (*libram_close)(ram_bh bh, int flags, long id, struct conn_payload* d); int (*libram_fd)(ram_bh bh); struct reply* (*libram_process)(ram_bh bh, fd_set *); struct reply* (*libram_wait)(ram_bh bh, int timeout); void (*libram_free)(ram_bh bh, struct reply *res); }; #define LIBRAM_BLOCK_WAIT (-1) #define LIBRAM_REPLY_UNAVAILABLE ((struct reply*)0) #define LIBRAM_REPLY_FAILURE ((struct reply*)-1) #define LIBRAM_IS_VALID_REPLY(r) ( ( (r) != LIBRAM_REPLY_UNAVAILABLE ) && \ ( (r) != LIBRAM_REPLY_FAILURE ) ) #define LIBRAM_REPLY_IS_UNAVAILABLE(r) ((r) == LIBRAM_REPLY_UNAVAILABLE)
ATTRIBUTES
- libram_modulename: name of the backend module
- libram_next: pointer to next libram module
- libram_init: initalization function for backend module
- libram_exit: finalization function for backend module
- libram_open: function called on new tcp or udp session
- libram_data: function called on data on tcp or udp session
- libram_close: function called on end of tcp of udp session
- libram_fd: function to get the internal file descriptor
- libram_process: function to process data available on file descriptor
- libram_free: function to free data from libram_process, libram_wait, or libram_poll
- libram_wait: wait for results from rpcserver
SEE ALSO
libram(3), libram_init(3), libram_exit(3), ram_bh(3), ram_fh(3)
libram/ram_bh [ Structures ]
[ Top ] [ libram ] [ Structures ]
NAME
ram_bh - libram backend handle
DESCRIPTION
Libram does not include analysis or modification logic itself, but relies on backend modules perform these task. The ram_bh type is used as a handle to communicate with the backend modules.
SOURCE
typedef void* ram_bh;
SEE ALSO
libram_load(3), libram_init(3), libram_libram_exit(3), ram_fh(3), libram(3)
libram/ram_cb [ Generics ]
[ Top ] [ libram ] [ Generics ]
NAME
ram_cb - handle for callback list
DESCRIPTION
This typedef defines an opaque hendle for the libram-cb(3) interface.
SOURCE
typedef void *ram_cb;
SEE ALSO
libram_cb_init(3), libram_cb_exit(3), libram-cb(3), _ram_cb(3), libram(3)
libram/ram_fh [ Structures ]
[ Top ] [ libram ] [ Structures ]
NAME
ram_fh - libram client handle
DESCRIPTION
Libram does not include analysis or modification logic itself, but relies on backend modules perform these task. The ram_fh structure combines the ram_bh(3) backend handle with the module structure to build a so called client handle to the libram(3) clients.
SOURCE
typedef struct _ram_fh { struct libram_module *module; ram_bh handle; int flags; int fd; char *connect; struct libram_list replylist; } *ram_fh;
ATTRIBUTES
- module: pointer to the libram backend module
- bh; handle to the backend module
- flags: flags from libram_init()
- fd: file descriptor for select emulation
- connect: copy of connect string passed to libram_init(3)
- replylist: anchor of list of reply structures
SEE ALSO
libram_load(3), libram_init(3), libram_exit(3), libram_module(3) ram_bh(3), libram(3),