blob: c8a489971a8c51e2c9b9c036ed88c05cb00a604a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
/* SPDX-License-Identifier: LGPL-2.1-only */
/*
* Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
* Copyright (c) 2013 Sassano Systems LLC <joe@sassanosystems.com>
*/
#ifndef __LIB_NETFILTER_NL_NETFILTER_H__
#define __LIB_NETFILTER_NL_NETFILTER_H__
#include <netlink/netfilter/ct.h>
#include "nl-priv-dynamic-core/object-api.h"
union nfnl_ct_proto {
struct {
uint16_t src;
uint16_t dst;
} port;
struct {
uint16_t id;
uint8_t type;
uint8_t code;
} icmp;
};
struct nfnl_ct_dir {
struct nl_addr *src;
struct nl_addr *dst;
union nfnl_ct_proto proto;
uint64_t packets;
uint64_t bytes;
};
union nfnl_ct_protoinfo {
struct {
uint8_t state;
} tcp;
};
struct nfnl_ct {
NLHDR_COMMON
uint8_t ct_family;
uint8_t ct_proto;
union nfnl_ct_protoinfo ct_protoinfo;
uint32_t ct_status;
uint32_t ct_status_mask;
uint32_t ct_timeout;
uint32_t ct_mark;
uint32_t ct_use;
uint32_t ct_id;
uint16_t ct_zone;
struct nfnl_ct_dir ct_orig;
struct nfnl_ct_dir ct_repl;
struct nfnl_ct_timestamp ct_tstamp;
};
union nfnl_exp_protodata {
struct {
uint16_t src;
uint16_t dst;
} port;
struct {
uint16_t id;
uint8_t type;
uint8_t code;
} icmp;
};
// Allow for different master/expect l4 protocols
struct nfnl_exp_proto {
uint8_t l4protonum;
union nfnl_exp_protodata l4protodata;
};
struct nfnl_exp_dir {
struct nl_addr *src;
struct nl_addr *dst;
struct nfnl_exp_proto proto;
};
struct nfnl_exp {
NLHDR_COMMON
uint8_t exp_family;
uint32_t exp_timeout;
uint32_t exp_id;
uint16_t exp_zone;
uint32_t exp_class;
uint32_t exp_flags;
char *exp_helper_name;
char *exp_fn;
uint8_t exp_nat_dir;
struct nfnl_exp_dir exp_expect;
struct nfnl_exp_dir exp_master;
struct nfnl_exp_dir exp_mask;
struct nfnl_exp_dir exp_nat;
};
struct nfnl_log_msg {
NLHDR_COMMON
uint8_t log_msg_family;
uint8_t log_msg_hook;
uint16_t log_msg_hwproto;
uint32_t log_msg_mark;
struct timeval log_msg_timestamp;
uint32_t log_msg_indev;
uint32_t log_msg_outdev;
uint32_t log_msg_physindev;
uint32_t log_msg_physoutdev;
uint8_t log_msg_hwaddr[8];
int log_msg_hwaddr_len;
void *log_msg_payload;
int log_msg_payload_len;
char *log_msg_prefix;
uint32_t log_msg_uid;
uint32_t log_msg_gid;
uint32_t log_msg_seq;
uint32_t log_msg_seq_global;
uint16_t log_msg_hwtype;
uint16_t log_msg_hwlen;
void *log_msg_hwheader;
int log_msg_hwheader_len;
uint16_t log_msg_vlan_tag;
uint16_t log_msg_vlan_proto;
uint32_t log_msg_ct_info;
struct nfnl_ct *log_msg_ct;
};
struct nfnl_queue_msg {
NLHDR_COMMON
uint16_t queue_msg_group;
uint8_t queue_msg_family;
uint8_t queue_msg_hook;
uint16_t queue_msg_hwproto;
uint32_t queue_msg_packetid;
uint32_t queue_msg_mark;
struct timeval queue_msg_timestamp;
uint32_t queue_msg_indev;
uint32_t queue_msg_outdev;
uint32_t queue_msg_physindev;
uint32_t queue_msg_physoutdev;
uint8_t queue_msg_hwaddr[8];
int queue_msg_hwaddr_len;
void *queue_msg_payload;
int queue_msg_payload_len;
uint32_t queue_msg_verdict;
};
#endif /* __LIB_NETFILTER_NL_NETFILTER_H__*/
|