#include <ulogd/linuxlist.h>
#include <ulogd/conffile.h>
#include <ulogd/ipfix_protocol.h>
#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <inttypes.h>
#include <string.h>
#include <config.h>
#include <ulogd/timer.h>
Data Structures | |
struct | ulogd_key |
struct | ulogd_keyset |
struct | ulogd_plugin_handle |
struct | ulogd_plugin |
struct | ulogd_pluginstance |
struct | ulogd_pluginstance_stack |
struct | ulogd_fd |
Macros | |
#define | ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
#define | ULOGD_RET_NONE 0x0000 |
#define | ULOGD_RET_INT8 0x0001 |
#define | ULOGD_RET_INT16 0x0002 |
#define | ULOGD_RET_INT32 0x0003 |
#define | ULOGD_RET_INT64 0x0004 |
#define | ULOGD_RET_UINT8 0x0011 |
#define | ULOGD_RET_UINT16 0x0012 |
#define | ULOGD_RET_UINT32 0x0013 |
#define | ULOGD_RET_UINT64 0x0014 |
#define | ULOGD_RET_BOOL 0x0050 |
#define | ULOGD_RET_IPADDR 0x0100 |
#define | ULOGD_RET_IP6ADDR 0x0200 |
#define | ULOGD_RET_STRING 0x8020 |
#define | ULOGD_RET_RAW 0x8030 |
#define | ULOGD_RET_RAWSTR 0x8040 |
#define | ULOGD_RETF_NONE 0x0000 |
#define | ULOGD_RETF_VALID 0x0001 /* contains a valid result */ |
#define | ULOGD_RETF_FREE 0x0002 /* ptr needs to be free()d */ |
#define | ULOGD_RETF_NEEDED |
#define | ULOGD_KEYF_OPTIONAL 0x0100 /* this key is optional */ |
#define | ULOGD_KEYF_INACTIVE |
#define | ULOGD_MAX_KEYLEN 31 |
#define | ULOGD_DEBUG 1 /* debugging information */ |
#define | ULOGD_INFO 3 |
#define | ULOGD_NOTICE 5 /* abnormal/unexpected condition */ |
#define | ULOGD_ERROR 7 /* error condition, requires user action */ |
#define | ULOGD_FATAL 8 /* fatal, program aborted */ |
#define | ULOGD_IRET_ERR -1 |
#define | ULOGD_IRET_STOP -2 |
#define | ULOGD_IRET_OK 0 |
#define | ulogd_log(level, format, args...) __ulogd_log(level, __FILE__, __LINE__, format, ## args) |
#define | ulogd_error(format, args...) ulogd_log(ULOGD_ERROR, format, ## args) |
#define | IS_VALID(x) ((x).flags & ULOGD_RETF_VALID) |
#define | SET_VALID(x) (x.flags |= ULOGD_RETF_VALID) |
#define | IS_NEEDED(x) (x.flags & ULOGD_RETF_NEEDED) |
#define | SET_NEEDED(x) (x.flags |= ULOGD_RETF_NEEDED) |
#define | GET_FLAGS(res, x) (res[x].u.source->flags) |
#define | pp_is_valid(res, x) (res[x].u.source && (GET_FLAGS(res, x) & ULOGD_RETF_VALID)) |
#define | ULOGD_FD_READ 0x0001 |
#define | ULOGD_FD_WRITE 0x0002 |
#define | ULOGD_FD_EXCEPT 0x0004 |
#define | IPPROTO_DCCP 33 |
#define | IPPROTO_UDPLITE 136 |
Enumerations | |
enum | ulogd_dtype { ULOGD_DTYPE_NULL = 0x0000, ULOGD_DTYPE_SOURCE = 0x0001, ULOGD_DTYPE_RAW = 0x0002, ULOGD_DTYPE_PACKET = 0x0004, ULOGD_DTYPE_FLOW = 0x0008, ULOGD_DTYPE_SUM = 0x0010, ULOGD_DTYPE_SINK = 0x0020 } |
Functions | |
void | ulogd_propagate_results (struct ulogd_pluginstance *pi) |
void | ulogd_register_plugin (struct ulogd_plugin *me) |
struct ulogd_key * | alloc_ret (const u_int16_t type, const char *) |
void | __ulogd_log (int level, char *file, int line, const char *message,...) |
int | ulogd_key_size (struct ulogd_key *key) |
int | ulogd_wildcard_inputkeys (struct ulogd_pluginstance *upi) |
int | ulogd_register_fd (struct ulogd_fd *ufd) |
void | ulogd_unregister_fd (struct ulogd_fd *ufd) |
int | ulogd_select_main (struct timeval *tv) |
#define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof((x)[0])) |
#define IPPROTO_DCCP 33 |
#define IPPROTO_UDPLITE 136 |
#define IS_NEEDED | ( | x | ) | (x.flags & ULOGD_RETF_NEEDED) |
#define IS_VALID | ( | x | ) | ((x).flags & ULOGD_RETF_VALID) |
#define pp_is_valid | ( | res, | |
x | |||
) | (res[x].u.source && (GET_FLAGS(res, x) & ULOGD_RETF_VALID)) |
Referenced by printflow_print(), printpkt_arp(), and printpkt_print().
#define SET_NEEDED | ( | x | ) | (x.flags |= ULOGD_RETF_NEEDED) |
#define SET_VALID | ( | x | ) | (x.flags |= ULOGD_RETF_VALID) |
#define ULOGD_DEBUG 1 /* debugging information */ |
#define ULOGD_ERROR 7 /* error condition, requires user action */ |
#define ulogd_error | ( | format, | |
args... | |||
) | ulogd_log(ULOGD_ERROR, format, ## args) |
#define ULOGD_FATAL 8 /* fatal, program aborted */ |
#define ULOGD_FD_EXCEPT 0x0004 |
Referenced by ulogd_register_fd(), ulogd_select_main(), and ulogd_unregister_fd().
#define ULOGD_FD_READ 0x0001 |
Referenced by ulogd_register_fd(), ulogd_select_main(), and ulogd_unregister_fd().
#define ULOGD_FD_WRITE 0x0002 |
Referenced by ulogd_register_fd(), ulogd_select_main(), and ulogd_unregister_fd().
#define ULOGD_INFO 3 |
#define ULOGD_IRET_ERR -1 |
Referenced by ulogd_propagate_results().
#define ULOGD_IRET_OK 0 |
Referenced by ulogd_propagate_results().
#define ULOGD_IRET_STOP -2 |
Referenced by ulogd_propagate_results().
#define ULOGD_KEYF_INACTIVE |
#define ULOGD_KEYF_OPTIONAL 0x0100 /* this key is optional */ |
Referenced by get_plugin_infos().
#define ulogd_log | ( | level, | |
format, | |||
args... | |||
) | __ulogd_log(level, __FILE__, __LINE__, format, ## args) |
#define ULOGD_MAX_KEYLEN 31 |
#define ULOGD_NOTICE 5 /* abnormal/unexpected condition */ |
#define ULOGD_RET_BOOL 0x0050 |
#define ULOGD_RET_INT16 0x0002 |
#define ULOGD_RET_INT32 0x0003 |
#define ULOGD_RET_INT64 0x0004 |
#define ULOGD_RET_INT8 0x0001 |
#define ULOGD_RET_IP6ADDR 0x0200 |
Referenced by ulogd_key_size().
#define ULOGD_RET_IPADDR 0x0100 |
#define ULOGD_RET_NONE 0x0000 |
#define ULOGD_RET_RAW 0x8030 |
#define ULOGD_RET_RAWSTR 0x8040 |
#define ULOGD_RET_STRING 0x8020 |
#define ULOGD_RET_UINT16 0x0012 |
#define ULOGD_RET_UINT32 0x0013 |
#define ULOGD_RET_UINT64 0x0014 |
#define ULOGD_RET_UINT8 0x0011 |
#define ULOGD_RETF_FREE 0x0002 /* ptr needs to be free()d */ |
#define ULOGD_RETF_NEEDED |
#define ULOGD_RETF_NONE 0x0000 |
#define ULOGD_RETF_VALID 0x0001 /* contains a valid result */ |
enum ulogd_dtype |
void __ulogd_log | ( | int | level, |
char * | file, | ||
int | line, | ||
const char * | message, | ||
... | |||
) |
References loglevel_ce, NULL, config_entry::u, and config_entry::value.
References ulogd_key::len, ulogd_key::name, ulogd_key::type, ulogd_key::u, ULOGD_ERROR, ulogd_log, ULOGD_RET_BOOL, ULOGD_RET_INT16, ULOGD_RET_INT32, ULOGD_RET_INT64, ULOGD_RET_INT8, ULOGD_RET_IP6ADDR, ULOGD_RET_IPADDR, ULOGD_RET_RAW, ULOGD_RET_STRING, ULOGD_RET_UINT16, ULOGD_RET_UINT32, ULOGD_RET_UINT64, ULOGD_RET_UINT8, and ulogd_key::value.
Referenced by build_template_for_bitmask().
void ulogd_propagate_results | ( | struct ulogd_pluginstance * | pi | ) |
References ulogd_fd::fd, flags, ulogd_fd::list, ULOGD_FD_EXCEPT, ULOGD_FD_READ, ULOGD_FD_WRITE, and ulogd_fd::when.
void ulogd_register_plugin | ( | struct ulogd_plugin * | me | ) |
References get_plugin_infos(), ulogd_plugin::list, ulogd_plugin::name, ULOGD_DEBUG, ulogd_log, ULOGD_NOTICE, and ulogd_plugin::version.
Referenced by __attribute__().
int ulogd_select_main | ( | struct timeval * | tv | ) |
References ulogd_fd::cb, ulogd_fd::data, ulogd_fd::fd, flags, ulogd_fd::list, llist_for_each_entry, ULOGD_FD_EXCEPT, ULOGD_FD_READ, and ULOGD_FD_WRITE.
References ulogd_fd::fd, ulogd_fd::list, llist_for_each_entry, ULOGD_FD_EXCEPT, ULOGD_FD_READ, ULOGD_FD_WRITE, and ulogd_fd::when.
int ulogd_wildcard_inputkeys | ( | struct ulogd_pluginstance * | upi | ) |
References ulogd_pluginstance::id, ulogd_pluginstance::input, ulogd_keyset::keys, ulogd_pluginstance::list, ulogd_pluginstance_stack::list, llist_for_each_entry, ulogd_keyset::num_keys, ulogd_plugin::output, ulogd_pluginstance::output, ulogd_pluginstance::plugin, ulogd_pluginstance::stack, ULOGD_DEBUG, and ulogd_log.