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