]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: rename opcodes to arp_opcodes
authorFlorian Westphal <fw@strlen.de>
Fri, 8 Jun 2018 13:19:18 +0000 (15:19 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 19 Nov 2018 17:38:35 +0000 (18:38 +0100)
way too generic name.

Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft-arp.c
iptables/nft-arp.h
iptables/xtables-arp.c

index 37850bd328b71d9585d1e56c5bd9f93b3a863972..399f83afff5cc36ce98f14d8b41a07fa9ab50b88 100644 (file)
@@ -29,7 +29,7 @@
 #include "nft.h"
 
 /* a few names */
-char *opcodes[] =
+char *arp_opcodes[] =
 {
        "Request",
        "Reply",
@@ -539,7 +539,7 @@ after_devdst:
                printf("%s", fw->arp.invflags & ARPT_INV_ARPOP
                        ? "! " : "");
                if (tmp <= NUMOPCODES && !(format & FMT_NUMERIC))
-                       printf("--opcode %s", opcodes[tmp-1]);
+                       printf("--opcode %s", arp_opcodes[tmp-1]);
                else
                        printf("--opcode %d", tmp);
 
index da6bd380162c307fd32eacc7306c39c220650776..3411fc3d7c7b336732f5a842fb1279d07c465f92 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _NFT_ARP_H_
 #define _NFT_ARP_H_
 
-extern char *opcodes[];
+extern char *arp_opcodes[];
 #define NUMOPCODES 9
 
 #endif
index 819e7e6c940347314285fbbf0edc35b97b0d6774..5a9924ca564425fceb9f71a4114695142d98c707 100644 (file)
@@ -485,7 +485,7 @@ exit_printhelp(void)
 "[!] --version -V              print package version.\n");
        printf(" opcode strings: \n");
         for (i = 0; i < NUMOPCODES; i++)
-                printf(" %d = %s\n", i + 1, opcodes[i]);
+                printf(" %d = %s\n", i + 1, arp_opcodes[i]);
         printf(
 " hardware type string: 1 = Ethernet\n"
 " protocol type string: 0x800 = IPv4\n");
@@ -1121,7 +1121,7 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table,
                                int i;
 
                                for (i = 0; i < NUMOPCODES; i++)
-                                       if (!strcasecmp(opcodes[i], optarg))
+                                       if (!strcasecmp(arp_opcodes[i], optarg))
                                                break;
                                if (i == NUMOPCODES)
                                        xtables_error(PARAMETER_PROBLEM, "Problem with specified opcode");