• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #ifndef LAPI_IP_TABLES__
4 #define LAPI_IP_TABLES__
5 
6 #include "config.h"
7 
8 #include <net/if.h>
9 #include <linux/netfilter_ipv4/ip_tables.h>
10 
11 #ifndef HAVE_STRUCT_XT_ENTRY_MATCH
12 struct xt_entry_match {
13 	union {
14 		struct {
15 			uint16_t match_size;
16 			char name[29];
17 			uint8_t revision;
18 		} user;
19 		struct {
20 			uint16_t match_size;
21 			void *match;
22 		} kernel;
23 		uint16_t match_size;
24 	} u;
25 	unsigned char data[0];
26 };
27 #endif
28 
29 #ifndef HAVE_STRUCT_XT_ENTRY_TARGET
30 struct xt_entry_target {
31 	union {
32 		struct {
33 			uint16_t target_size;
34 			char name[29];
35 			uint8_t revision;
36 		} user;
37 		struct {
38 			uint16_t target_size;
39 			void *target;
40 		} kernel;
41 		uint16_t target_size;
42 	} u;
43 	unsigned char data[0];
44 };
45 #endif
46 
47 #endif /* LAPI_IP_TABLES__ */
48