summaryrefslogtreecommitdiffstats
path: root/tests/nft-table-test.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-09-07 18:02:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-07 20:01:05 +0200
commit0e7b6c4983af4ddd3a50c3ce756638af157c7130 (patch)
tree2a2a0245283905a7540a292c5181926e6070ad4a /tests/nft-table-test.c
parentd549a220dc3cd3294f4b16a5c04c9df298835486 (diff)
src: get rid of _ATTR_ infix in new nfntl_ definitions
The constant names are already large, trim off the _ATTR_ infix in the attribute definitions. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nft-table-test.c')
-rw-r--r--tests/nft-table-test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/nft-table-test.c b/tests/nft-table-test.c
index 9ae8f48..2aad037 100644
--- a/tests/nft-table-test.c
+++ b/tests/nft-table-test.c
@@ -26,14 +26,14 @@ static void print_err(const char *msg)
static void cmp_nftnl_table(struct nftnl_table *a, struct nftnl_table *b)
{
- if (strcmp(nftnl_table_attr_get_str(a, NFTNL_TABLE_ATTR_NAME),
- nftnl_table_attr_get_str(b, NFTNL_TABLE_ATTR_NAME)) != 0)
+ if (strcmp(nftnl_table_attr_get_str(a, NFTNL_TABLE_NAME),
+ nftnl_table_attr_get_str(b, NFTNL_TABLE_NAME)) != 0)
print_err("table name mismatches");
- if (nftnl_table_attr_get_u32(a, NFTNL_TABLE_ATTR_FLAGS) !=
- nftnl_table_attr_get_u32(b, NFTNL_TABLE_ATTR_FLAGS))
+ if (nftnl_table_attr_get_u32(a, NFTNL_TABLE_FLAGS) !=
+ nftnl_table_attr_get_u32(b, NFTNL_TABLE_FLAGS))
print_err("table flags mismatches");
- if (nftnl_table_attr_get_u32(a, NFTNL_TABLE_ATTR_FAMILY) !=
- nftnl_table_attr_get_u32(b, NFTNL_TABLE_ATTR_FAMILY))
+ if (nftnl_table_attr_get_u32(a, NFTNL_TABLE_FAMILY) !=
+ nftnl_table_attr_get_u32(b, NFTNL_TABLE_FAMILY))
print_err("tabke family mismatches");
}
@@ -50,9 +50,9 @@ int main(int argc, char *argv[])
if (a == NULL || b == NULL)
print_err("OOM");
- nftnl_table_attr_set_str(a, NFTNL_TABLE_ATTR_NAME, "test");
- nftnl_table_attr_set_u32(a, NFTNL_TABLE_ATTR_FAMILY, AF_INET);
- nftnl_table_attr_set_u32(a, NFTNL_TABLE_ATTR_FLAGS, 0);
+ nftnl_table_attr_set_str(a, NFTNL_TABLE_NAME, "test");
+ nftnl_table_attr_set_u32(a, NFTNL_TABLE_FAMILY, AF_INET);
+ nftnl_table_attr_set_u32(a, NFTNL_TABLE_FLAGS, 0);
/* cmd extracted from include/linux/netfilter/nf_tables.h */
nlh = nftnl_table_nlmsg_build_hdr(buf, NFT_MSG_NEWTABLE, AF_INET, 0,