~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/net/netfilter/nf_log.h

Version: ~ [ linux-5.8 ] ~ [ linux-5.7.14 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.57 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.138 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.193 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.232 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.232 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _NF_LOG_H
  2 #define _NF_LOG_H
  3 
  4 #include <linux/netfilter.h>
  5 
  6 /* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
  7  * disappear once iptables is replaced with pkttables.  Please DO NOT use them
  8  * for any new code! */
  9 #define NF_LOG_TCPSEQ           0x01    /* Log TCP sequence numbers */
 10 #define NF_LOG_TCPOPT           0x02    /* Log TCP options */
 11 #define NF_LOG_IPOPT            0x04    /* Log IP options */
 12 #define NF_LOG_UID              0x08    /* Log UID owning local socket */
 13 #define NF_LOG_MASK             0x0f
 14 
 15 #define NF_LOG_TYPE_LOG         0x01
 16 #define NF_LOG_TYPE_ULOG        0x02
 17 
 18 struct nf_loginfo {
 19         u_int8_t type;
 20         union {
 21                 struct {
 22                         u_int32_t copy_len;
 23                         u_int16_t group;
 24                         u_int16_t qthreshold;
 25                 } ulog;
 26                 struct {
 27                         u_int8_t level;
 28                         u_int8_t logflags;
 29                 } log;
 30         } u;
 31 };
 32 
 33 typedef void nf_logfn(struct net *net,
 34                       u_int8_t pf,
 35                       unsigned int hooknum,
 36                       const struct sk_buff *skb,
 37                       const struct net_device *in,
 38                       const struct net_device *out,
 39                       const struct nf_loginfo *li,
 40                       const char *prefix);
 41 
 42 struct nf_logger {
 43         struct module   *me;
 44         nf_logfn        *logfn;
 45         char            *name;
 46         struct list_head        list[NFPROTO_NUMPROTO];
 47 };
 48 
 49 /* Function to register/unregister log function. */
 50 int nf_log_register(u_int8_t pf, struct nf_logger *logger);
 51 void nf_log_unregister(struct nf_logger *logger);
 52 
 53 void nf_log_set(struct net *net, u_int8_t pf,
 54                 const struct nf_logger *logger);
 55 void nf_log_unset(struct net *net, const struct nf_logger *logger);
 56 
 57 int nf_log_bind_pf(struct net *net, u_int8_t pf,
 58                    const struct nf_logger *logger);
 59 void nf_log_unbind_pf(struct net *net, u_int8_t pf);
 60 
 61 /* Calls the registered backend logging function */
 62 __printf(8, 9)
 63 void nf_log_packet(struct net *net,
 64                    u_int8_t pf,
 65                    unsigned int hooknum,
 66                    const struct sk_buff *skb,
 67                    const struct net_device *in,
 68                    const struct net_device *out,
 69                    const struct nf_loginfo *li,
 70                    const char *fmt, ...);
 71 
 72 #endif /* _NF_LOG_H */
 73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp