diff --git a/src/nf-log.c b/src/nf-log.c index c0cffe0..1e2c1e4 100644 --- a/src/nf-log.c +++ b/src/nf-log.c @@ -52,7 +52,6 @@ int main(int argc, char *argv[]) { struct nl_sock *nf_sock; struct nl_sock *rt_sock; - struct nl_cache *link_cache; struct nfnl_log *log; int copy_mode; uint32_t copy_range; @@ -116,7 +115,7 @@ int main(int argc, char *argv[]) rt_sock = nl_cli_alloc_socket(); nl_cli_connect(rt_sock, NETLINK_ROUTE); - link_cache = nl_cli_link_alloc_cache(rt_sock); + nl_cli_link_alloc_cache(rt_sock); while (1) { fd_set rfds; diff --git a/src/nf-queue.c b/src/nf-queue.c index 7151381..b043c80 100644 --- a/src/nf-queue.c +++ b/src/nf-queue.c @@ -60,7 +60,6 @@ static int event_input(struct nl_msg *msg, void *arg) int main(int argc, char *argv[]) { struct nl_sock *rt_sock; - struct nl_cache *link_cache; struct nfnl_queue *queue; int copy_mode; uint32_t copy_range; @@ -116,7 +115,7 @@ int main(int argc, char *argv[]) rt_sock = nl_cli_alloc_socket(); nl_cli_connect(rt_sock, NETLINK_ROUTE); - link_cache = nl_cli_link_alloc_cache(rt_sock); + nl_cli_link_alloc_cache(rt_sock); nl_socket_set_buffer_size(nf_sock, 1024*127, 1024*127); diff --git a/src/nl-monitor.c b/src/nl-monitor.c index fdf6497..16ecac0 100644 --- a/src/nl-monitor.c +++ b/src/nl-monitor.c @@ -35,7 +35,6 @@ static int event_input(struct nl_msg *msg, void *arg) int main(int argc, char *argv[]) { struct nl_sock *sock; - struct nl_cache *link_cache; int err = 1; int i, idx; @@ -92,7 +91,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Warning: Unknown group: %s\n", argv[idx]); } - link_cache = nl_cli_link_alloc_cache(sock); + nl_cli_link_alloc_cache(sock); while (1) { fd_set rfds; diff --git a/src/nl-neightbl-list.c b/src/nl-neightbl-list.c index 5010b92..4c4230f 100644 --- a/src/nl-neightbl-list.c +++ b/src/nl-neightbl-list.c @@ -28,7 +28,7 @@ static void print_usage(void) int main(int argc, char *argv[]) { struct nl_sock *sock; - struct nl_cache *link_cache, *neightbl_cache; + struct nl_cache *neightbl_cache; struct nl_dump_params params = { .dp_type = NL_DUMP_LINE, .dp_fd = stdout, @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) sock = nl_cli_alloc_socket(); nl_cli_connect(sock, NETLINK_ROUTE); - link_cache = nl_cli_link_alloc_cache(sock); + nl_cli_link_alloc_cache(sock); neightbl_cache = nl_cli_alloc_cache(sock, "neighbour table", rtnl_neightbl_alloc_cache); diff --git a/src/nl-route-get.c b/src/nl-route-get.c index 9d9a448..1ee47e4 100644 --- a/src/nl-route-get.c +++ b/src/nl-route-get.c @@ -43,7 +43,6 @@ static int cb(struct nl_msg *msg, void *arg) int main(int argc, char *argv[]) { struct nl_sock *sock; - struct nl_cache *link_cache, *route_cache; struct nl_addr *dst; int err = 1; @@ -52,8 +51,8 @@ int main(int argc, char *argv[]) sock = nl_cli_alloc_socket(); nl_cli_connect(sock, NETLINK_ROUTE); - link_cache = nl_cli_link_alloc_cache(sock); - route_cache = nl_cli_route_alloc_cache(sock, 0); + nl_cli_link_alloc_cache(sock); + nl_cli_route_alloc_cache(sock, 0); dst = nl_cli_addr_parse(argv[1], AF_INET); @@ -83,7 +82,5 @@ int main(int argc, char *argv[]) nl_cli_fatal(err, "%s", nl_geterror(err)); } - //nl_cache_dump(route_cache, ¶ms); - return 0; } diff --git a/src/nl-rule-list.c b/src/nl-rule-list.c index 8b474fa..7c450e2 100644 --- a/src/nl-rule-list.c +++ b/src/nl-rule-list.c @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) { struct nl_sock *sock; struct rtnl_rule *rule; - struct nl_cache *link_cache, *rule_cache; + struct nl_cache *rule_cache; struct nl_dump_params params = { .dp_fd = stdout, .dp_type = NL_DUMP_LINE, @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) sock = nl_cli_alloc_socket(); nl_cli_connect(sock, NETLINK_ROUTE); - link_cache = nl_cli_link_alloc_cache(sock); + nl_cli_link_alloc_cache(sock); rule_cache = nl_cli_rule_alloc_cache(sock); rule = nl_cli_rule_alloc();