netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ulogd.h File Reference
#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>
Include dependency graph for ulogd.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_keyalloc_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)
 

Macro Definition Documentation

#define ARRAY_SIZE (   x)    (sizeof(x) / sizeof((x)[0]))
#define GET_FLAGS (   res,
 
)    (res[x].u.source->flags)
#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,
 
)    (res[x].u.source && (GET_FLAGS(res, x) & ULOGD_RETF_VALID))
#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
#define ULOGD_FD_READ   0x0001
#define ULOGD_FD_WRITE   0x0002
#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
Value:
0x0200 /* marked as inactive (i.e. totally
to be ignored by everyone */
#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
Value:
0x0004 /* this parameter is actually needed
* by some downstream plugin */
#define ULOGD_RETF_NONE   0x0000
#define ULOGD_RETF_VALID   0x0001 /* contains a valid result */

Enumeration Type Documentation

Enumerator
ULOGD_DTYPE_NULL 
ULOGD_DTYPE_SOURCE 
ULOGD_DTYPE_RAW 
ULOGD_DTYPE_PACKET 
ULOGD_DTYPE_FLOW 
ULOGD_DTYPE_SUM 
ULOGD_DTYPE_SINK 

Function Documentation

void __ulogd_log ( int  level,
char *  file,
int  line,
const char *  message,
  ... 
)
struct ulogd_key* alloc_ret ( const u_int16_t  type,
const char *   
)
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__().

Here is the call graph for this function:

Here is the caller graph for this function: