linux/include/uapi/linux/netfilter_bridge/ebtables.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 *  ebtables
 *
 *	Authors:
 *	Bart De Schuymer		<[email protected]>
 *
 *  ebtables.c,v 2.0, April, 2002
 *
 *  This code is strongly inspired by the iptables code which is
 *  Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling
 */

#ifndef _UAPI__LINUX_BRIDGE_EFF_H
#define _UAPI__LINUX_BRIDGE_EFF_H
#include <linux/types.h>
#include <linux/if.h>
#include <linux/netfilter_bridge.h>

#define EBT_TABLE_MAXNAMELEN
#define EBT_CHAIN_MAXNAMELEN
#define EBT_FUNCTION_MAXNAMELEN
#define EBT_EXTENSION_MAXNAMELEN

/* verdicts >0 are "branches" */
#define EBT_ACCEPT
#define EBT_DROP
#define EBT_CONTINUE
#define EBT_RETURN
#define NUM_STANDARD_TARGETS
/* ebtables target modules store the verdict inside an int. We can
 * reclaim a part of this int for backwards compatible extensions.
 * The 4 lsb are more than enough to store the verdict. */
#define EBT_VERDICT_BITS

struct xt_match;
struct xt_target;

struct ebt_counter {};

struct ebt_replace {};

struct ebt_replace_kernel {};

struct ebt_entries {};

/* used for the bitmask of struct ebt_entry */

/* This is a hack to make a difference between an ebt_entry struct and an
 * ebt_entries struct when traversing the entries from start to end.
 * Using this simplifies the code a lot, while still being able to use
 * ebt_entries.
 * Contrary, iptables doesn't use something like ebt_entries and therefore uses
 * different techniques for naming the policy and such. So, iptables doesn't
 * need a hack like this.
 */
#define EBT_ENTRY_OR_ENTRIES
/* these are the normal masks */
#define EBT_NOPROTO
#define EBT_802_3
#define EBT_SOURCEMAC
#define EBT_DESTMAC
#define EBT_F_MASK

#define EBT_IPROTO
#define EBT_IIN
#define EBT_IOUT
#define EBT_ISOURCE
#define EBT_IDEST
#define EBT_ILOGICALIN
#define EBT_ILOGICALOUT
#define EBT_INV_MASK

struct ebt_entry_match {};

struct ebt_entry_watcher {};

struct ebt_entry_target {};

#define EBT_STANDARD_TARGET
struct ebt_standard_target {};

/* one entry */
struct ebt_entry {};

static __inline__ struct ebt_entry_target *
ebt_get_target(struct ebt_entry *e)
{}

/* {g,s}etsockopt numbers */
#define EBT_BASE_CTL

#define EBT_SO_SET_ENTRIES
#define EBT_SO_SET_COUNTERS
#define EBT_SO_SET_MAX

#define EBT_SO_GET_INFO
#define EBT_SO_GET_ENTRIES
#define EBT_SO_GET_INIT_INFO
#define EBT_SO_GET_INIT_ENTRIES
#define EBT_SO_GET_MAX


/* blatently stolen from ip_tables.h
 * fn returns 0 to continue iteration */
#define EBT_MATCH_ITERATE(e, fn, args...)

#define EBT_WATCHER_ITERATE(e, fn, args...)

#define EBT_ENTRY_ITERATE(entries, size, fn, args...)

#endif /* _UAPI__LINUX_BRIDGE_EFF_H */