summaryrefslogtreecommitdiffstats
path: root/examples/nft-table-get.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nft-table-get.c')
-rw-r--r--examples/nft-table-get.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/nft-table-get.c b/examples/nft-table-get.c
index c0c8454..58eca9c 100644
--- a/examples/nft-table-get.c
+++ b/examples/nft-table-get.c
@@ -65,6 +65,8 @@ int main(int argc, char *argv[])
family = NFPROTO_IPV4;
else if (strcmp(argv[1], "ip6") == 0)
family = NFPROTO_IPV6;
+ else if (strcmp(argv[1], "inet") == 0)
+ family = NFPROTO_INET;
else if (strcmp(argv[1], "bridge") == 0)
family = NFPROTO_BRIDGE;
else if (strcmp(argv[1], "arp") == 0)
@@ -72,7 +74,7 @@ int main(int argc, char *argv[])
else if (strcmp(argv[1], "unspec") == 0)
family = NFPROTO_UNSPEC;
else {
- fprintf(stderr, "Unknown family: ip, ip6, bridge, arp, unspec\n");
+ fprintf(stderr, "Unknown family: ip, ip6, inet, bridge, arp, unspec\n");
exit(EXIT_FAILURE);
}
@@ -86,11 +88,11 @@ int main(int argc, char *argv[])
seq = time(NULL);
if (t == NULL) {
- nlh = nftnl_table_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, family,
- NLM_F_DUMP, seq);
+ nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, family,
+ NLM_F_DUMP, seq);
} else {
- nlh = nftnl_table_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, family,
- NLM_F_ACK, seq);
+ nlh = nftnl_nlmsg_build_hdr(buf, NFT_MSG_GETTABLE, family,
+ NLM_F_ACK, seq);
nftnl_table_set_str(t, NFTNL_TABLE_NAME, argv[2]);
nftnl_table_nlmsg_build_payload(nlh, t);
nftnl_table_free(t);