#include <xtables.h>
#include <linux/netfilter_arp/arpt_mangle.h>
#include "iptables/nft.h"
-#include "iptables/nft-arp.h"
static void arpmangle_print_help(void)
{
#include <linux/netfilter/nf_tables.h>
#include "nft-shared.h"
-#include "nft-arp.h"
#include "nft.h"
-
-/* a few names */
-char *arp_opcodes[] =
-{
- "Request",
- "Reply",
- "Request_Reverse",
- "Reply_Reverse",
- "DRARP_Request",
- "DRARP_Reply",
- "DRARP_Error",
- "InARP_Request",
- "ARP_NAK",
-};
+#include "xshared.h"
static bool need_devaddr(struct arpt_devaddr_info *info)
{
printf("%s%s", sep, fw->arp.invflags & IPT_INV_ARPOP
? "! " : "");
- if (tmp <= NUMOPCODES && !(format & FMT_NUMERIC))
+ if (tmp <= ARP_NUMOPCODES && !(format & FMT_NUMERIC))
printf("--opcode %s", arp_opcodes[tmp-1]);
else
printf("--opcode %d", tmp);
&cs->arp.arp.arpop_mask, 10)) {
int i;
- for (i = 0; i < NUMOPCODES; i++)
+ for (i = 0; i < ARP_NUMOPCODES; i++)
if (!strcasecmp(arp_opcodes[i],
args->arp_opcode))
break;
- if (i == NUMOPCODES)
+ if (i == ARP_NUMOPCODES)
xtables_error(PARAMETER_PROBLEM,
"Problem with specified opcode");
cs->arp.arp.arpop = htons(i+1);
#include <signal.h>
#include "xshared.h"
+/* a few arp opcode names */
+char *arp_opcodes[] =
+{
+ "Request",
+ "Reply",
+ "Request_Reverse",
+ "Reply_Reverse",
+ "DRARP_Request",
+ "DRARP_Reply",
+ "DRARP_Error",
+ "InARP_Request",
+ "ARP_NAK",
+};
+
/*
* Print out any special helps. A user might like to be able to add a --help
* to the commandline, and see expected results. So we call help for all
void ipv6_post_parse(int command, struct iptables_command_state *cs,
struct xtables_args *args);
+extern char *arp_opcodes[];
+#define ARP_NUMOPCODES 9
+
#endif /* IPTABLES_XSHARED_H */