netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
handlers.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <sys/types.h>
#include <netlink/netlink-compat.h>
#include <netlink/netlink-kernel.h>
Include dependency graph for handlers.h:
This graph shows which files directly or indirectly include this file:

Macros

#define NL_CB_KIND_MAX   (__NL_CB_KIND_MAX - 1)
 
#define NL_CB_TYPE_MAX   (__NL_CB_TYPE_MAX - 1)
 

Typedefs

Callback Typedefs
typedef int(* nl_recvmsg_msg_cb_t )(struct nl_msg *msg, void *arg)
 nl_recvmsgs() callback for message processing customization More...
 
typedef int(* nl_recvmsg_err_cb_t )(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg)
 nl_recvmsgs() callback for error message processing customization More...
 

Enumerations

enum  nl_cb_action {
  NL_OK,
  NL_SKIP,
  NL_STOP
}
 Callback actions. More...
 
enum  nl_cb_kind {
  NL_CB_DEFAULT,
  NL_CB_VERBOSE,
  NL_CB_DEBUG,
  NL_CB_CUSTOM,
  __NL_CB_KIND_MAX
}
 Callback kinds. More...
 
enum  nl_cb_type {
  NL_CB_VALID,
  NL_CB_FINISH,
  NL_CB_OVERRUN,
  NL_CB_SKIPPED,
  NL_CB_ACK,
  NL_CB_MSG_IN,
  NL_CB_MSG_OUT,
  NL_CB_INVALID,
  NL_CB_SEQ_CHECK,
  NL_CB_SEND_ACK,
  __NL_CB_TYPE_MAX
}
 Callback types. More...
 

Functions

struct nl_cbnl_cb_alloc (enum nl_cb_kind)
 Allocate a new callback handle. More...
 
struct nl_cbnl_cb_clone (struct nl_cb *)
 Clone an existing callback handle. More...
 
struct nl_cbnl_cb_get (struct nl_cb *)
 
void nl_cb_put (struct nl_cb *)
 
int nl_cb_set (struct nl_cb *, enum nl_cb_type, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *)
 Set up a callback. More...
 
int nl_cb_set_all (struct nl_cb *, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *)
 Set up a all callbacks. More...
 
int nl_cb_err (struct nl_cb *, enum nl_cb_kind, nl_recvmsg_err_cb_t, void *)
 Set up an error callback. More...
 
void nl_cb_overwrite_recvmsgs (struct nl_cb *, int(*func)(struct nl_sock *, struct nl_cb *))
 Overwrite internal calls to nl_recvmsgs() More...
 
void nl_cb_overwrite_recv (struct nl_cb *, int(*func)(struct nl_sock *, struct sockaddr_nl *, unsigned char **, struct ucred **))
 Overwrite internal calls to nl_recv() More...
 
void nl_cb_overwrite_send (struct nl_cb *, int(*func)(struct nl_sock *, struct nl_msg *))
 Overwrite internal calls to nl_send() More...
 

Macro Definition Documentation

#define NL_CB_KIND_MAX   (__NL_CB_KIND_MAX - 1)

Referenced by nl_cb_alloc(), nl_cb_err(), and nl_cb_set().

#define NL_CB_TYPE_MAX   (__NL_CB_TYPE_MAX - 1)