linux/include/uapi/linux/netfilter_arp/arp_tables.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * 	Format of an ARP firewall descriptor
 *
 * 	src, tgt, src_mask, tgt_mask, arpop, arpop_mask are always stored in
 *	network byte order.
 * 	flags are stored in host byte order (of course).
 */

#ifndef _UAPI_ARPTABLES_H
#define _UAPI_ARPTABLES_H

#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/if.h>
#include <linux/netfilter_arp.h>

#include <linux/netfilter/x_tables.h>

#ifndef __KERNEL__
#define ARPT_FUNCTION_MAXNAMELEN
#define ARPT_TABLE_MAXNAMELEN
#define arpt_entry_target
#define arpt_standard_target
#define arpt_error_target
#define ARPT_CONTINUE
#define ARPT_RETURN
#define arpt_counters_info
#define arpt_counters
#define ARPT_STANDARD_TARGET
#define ARPT_ERROR_TARGET
#define ARPT_ENTRY_ITERATE
#endif

#define ARPT_DEV_ADDR_LEN_MAX

struct arpt_devaddr_info {};

/* Yes, Virginia, you have to zero the padding. */
struct arpt_arp {};

/* Values for "flag" field in struct arpt_ip (general arp structure).
 * No flags defined yet.
 */
#define ARPT_F_MASK

/* Values for "inv" field in struct arpt_arp. */
#define ARPT_INV_VIA_IN
#define ARPT_INV_VIA_OUT
#define ARPT_INV_SRCIP
#define ARPT_INV_TGTIP
#define ARPT_INV_SRCDEVADDR
#define ARPT_INV_TGTDEVADDR
#define ARPT_INV_ARPOP
#define ARPT_INV_ARPHRD
#define ARPT_INV_ARPPRO
#define ARPT_INV_ARPHLN
#define ARPT_INV_MASK

/* This structure defines each of the firewall rules.  Consists of 3
   parts which are 1) general ARP header stuff 2) match specific
   stuff 3) the target to perform if the rule matches */
struct arpt_entry
{};

/*
 * New IP firewall options for [gs]etsockopt at the RAW IP level.
 * Unlike BSD Linux inherits IP options so you don't have to use a raw
 * socket for this. Instead we check rights in the calls.
 *
 * ATTENTION: check linux/in.h before adding new number here.
 */
#define ARPT_BASE_CTL

#define ARPT_SO_SET_REPLACE
#define ARPT_SO_SET_ADD_COUNTERS
#define ARPT_SO_SET_MAX

#define ARPT_SO_GET_INFO
#define ARPT_SO_GET_ENTRIES
/* #define ARPT_SO_GET_REVISION_MATCH	(APRT_BASE_CTL + 2) */
#define ARPT_SO_GET_REVISION_TARGET
#define ARPT_SO_GET_MAX

/* The argument to ARPT_SO_GET_INFO */
struct arpt_getinfo {};

/* The argument to ARPT_SO_SET_REPLACE. */
struct arpt_replace {};

/* The argument to ARPT_SO_GET_ENTRIES. */
struct arpt_get_entries {};

/* Helper functions */
static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e)
{}

/*
 *	Main firewall chains definitions and global var's definitions.
 */
#endif /* _UAPI_ARPTABLES_H */