Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
nfnetlink_log.c File Reference
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/netdevice.h>
#include <linux/netfilter.h>
#include <linux/netlink.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_log.h>
#include <linux/spinlock.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/security.h>
#include <linux/list.h>
#include <linux/jhash.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <net/sock.h>
#include <net/netfilter/nf_log.h>
#include <net/netfilter/nfnetlink_log.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  nfulnl_instance
 

Macros

#define NFULNL_NLBUFSIZ_DEFAULT   NLMSG_GOODSIZE
 
#define NFULNL_TIMEOUT_DEFAULT   100 /* every second */
 
#define NFULNL_QTHRESH_DEFAULT   100 /* 100 packets */
 
#define NFULNL_COPY_RANGE_MAX   0xFFFF /* max packet size is limited by 16-bit struct nfattr nfa_len field */
 
#define PRINTR(x, args...)
 
#define INSTANCE_BUCKETS   16
 
#define RCV_SKB_FAIL(err)   do { netlink_ack(skb, nlh, (err)); return; } while (0)
 

Functions

void nfulnl_log_packet (u_int8_t pf, unsigned int hooknum, const struct sk_buff *skb, const struct net_device *in, const struct net_device *out, const struct nf_loginfo *li_user, const char *prefix)
 
 EXPORT_SYMBOL_GPL (nfulnl_log_packet)
 
 MODULE_DESCRIPTION ("netfilter userspace logging")
 
 MODULE_AUTHOR ("Harald Welte <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_NFNL_SUBSYS (NFNL_SUBSYS_ULOG)
 
 module_init (nfnetlink_log_init)
 
 module_exit (nfnetlink_log_fini)
 

Macro Definition Documentation

#define INSTANCE_BUCKETS   16

Definition at line 76 of file nfnetlink_log.c.

#define NFULNL_COPY_RANGE_MAX   0xFFFF /* max packet size is limited by 16-bit struct nfattr nfa_len field */

Definition at line 45 of file nfnetlink_log.c.

#define NFULNL_NLBUFSIZ_DEFAULT   NLMSG_GOODSIZE

Definition at line 42 of file nfnetlink_log.c.

#define NFULNL_QTHRESH_DEFAULT   100 /* 100 packets */

Definition at line 44 of file nfnetlink_log.c.

#define NFULNL_TIMEOUT_DEFAULT   100 /* every second */

Definition at line 43 of file nfnetlink_log.c.

#define PRINTR (   x,
  args... 
)
Value:
do { if (net_ratelimit()) \
printk(x, ## args); } while (0);

Definition at line 47 of file nfnetlink_log.c.

#define RCV_SKB_FAIL (   err)    do { netlink_ack(skb, nlh, (err)); return; } while (0)

Definition at line 558 of file nfnetlink_log.c.

Function Documentation

EXPORT_SYMBOL_GPL ( nfulnl_log_packet  )
MODULE_ALIAS_NFNL_SUBSYS ( NFNL_SUBSYS_ULOG  )
MODULE_AUTHOR ( "Harald Welte <[email protected]>"  )
MODULE_DESCRIPTION ( "netfilter userspace logging"  )
module_exit ( nfnetlink_log_fini  )
module_init ( nfnetlink_log_init  )
MODULE_LICENSE ( "GPL"  )
void nfulnl_log_packet ( u_int8_t  pf,
unsigned int  hooknum,
const struct sk_buff skb,
const struct net_device in,
const struct net_device out,
const struct nf_loginfo li_user,
const char prefix 
)

Definition at line 573 of file nfnetlink_log.c.