[NETFILTER]: nf_conntrack_sip: create RTCP expectations
[linux-2.6] / include / linux / netfilter / nfnetlink_log.h
1 #ifndef _NFNETLINK_LOG_H
2 #define _NFNETLINK_LOG_H
3
4 /* This file describes the netlink messages (i.e. 'protocol packets'),
5  * and not any kind of function definitions.  It is shared between kernel and
6  * userspace.  Don't put kernel specific stuff in here */
7
8 #include <linux/types.h>
9 #include <linux/netfilter/nfnetlink.h>
10
11 enum nfulnl_msg_types {
12         NFULNL_MSG_PACKET,              /* packet from kernel to userspace */
13         NFULNL_MSG_CONFIG,              /* connect to a particular queue */
14
15         NFULNL_MSG_MAX
16 };
17
18 struct nfulnl_msg_packet_hdr {
19         __be16          hw_protocol;    /* hw protocol (network order) */
20         u_int8_t        hook;           /* netfilter hook */
21         u_int8_t        _pad;
22 };
23
24 struct nfulnl_msg_packet_hw {
25         __be16          hw_addrlen;
26         u_int16_t       _pad;
27         u_int8_t        hw_addr[8];
28 };
29
30 struct nfulnl_msg_packet_timestamp {
31         aligned_be64    sec;
32         aligned_be64    usec;
33 };
34
35 enum nfulnl_attr_type {
36         NFULA_UNSPEC,
37         NFULA_PACKET_HDR,
38         NFULA_MARK,                     /* u_int32_t nfmark */
39         NFULA_TIMESTAMP,                /* nfulnl_msg_packet_timestamp */
40         NFULA_IFINDEX_INDEV,            /* u_int32_t ifindex */
41         NFULA_IFINDEX_OUTDEV,           /* u_int32_t ifindex */
42         NFULA_IFINDEX_PHYSINDEV,        /* u_int32_t ifindex */
43         NFULA_IFINDEX_PHYSOUTDEV,       /* u_int32_t ifindex */
44         NFULA_HWADDR,                   /* nfulnl_msg_packet_hw */
45         NFULA_PAYLOAD,                  /* opaque data payload */
46         NFULA_PREFIX,                   /* string prefix */
47         NFULA_UID,                      /* user id of socket */
48         NFULA_SEQ,                      /* instance-local sequence number */
49         NFULA_SEQ_GLOBAL,               /* global sequence number */
50         NFULA_GID,                      /* group id of socket */
51
52         __NFULA_MAX
53 };
54 #define NFULA_MAX (__NFULA_MAX - 1)
55
56 enum nfulnl_msg_config_cmds {
57         NFULNL_CFG_CMD_NONE,
58         NFULNL_CFG_CMD_BIND,
59         NFULNL_CFG_CMD_UNBIND,
60         NFULNL_CFG_CMD_PF_BIND,
61         NFULNL_CFG_CMD_PF_UNBIND,
62 };
63
64 struct nfulnl_msg_config_cmd {
65         u_int8_t        command;        /* nfulnl_msg_config_cmds */
66 } __attribute__ ((packed));
67
68 struct nfulnl_msg_config_mode {
69         __be32          copy_range;
70         u_int8_t        copy_mode;
71         u_int8_t        _pad;
72 } __attribute__ ((packed));
73
74 enum nfulnl_attr_config {
75         NFULA_CFG_UNSPEC,
76         NFULA_CFG_CMD,                  /* nfulnl_msg_config_cmd */
77         NFULA_CFG_MODE,                 /* nfulnl_msg_config_mode */
78         NFULA_CFG_NLBUFSIZ,             /* u_int32_t buffer size */
79         NFULA_CFG_TIMEOUT,              /* u_int32_t in 1/100 s */
80         NFULA_CFG_QTHRESH,              /* u_int32_t */
81         NFULA_CFG_FLAGS,                /* u_int16_t */
82         __NFULA_CFG_MAX
83 };
84 #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
85
86 #define NFULNL_COPY_NONE        0x00
87 #define NFULNL_COPY_META        0x01
88 #define NFULNL_COPY_PACKET      0x02
89
90 #define NFULNL_CFG_F_SEQ        0x0001
91 #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
92
93 #endif /* _NFNETLINK_LOG_H */