{
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;
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;
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;
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);
int main(int argc, char *argv[])
{
struct nl_sock *sock;
- struct nl_cache *link_cache;
int err = 1;
int i, idx;
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;
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,
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);
int main(int argc, char *argv[])
{
struct nl_sock *sock;
- struct nl_cache *link_cache, *route_cache;
struct nl_addr *dst;
int err = 1;
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);
nl_cli_fatal(err, "%s", nl_geterror(err));
}
- //nl_cache_dump(route_cache, ¶ms);
-
return 0;
}
{
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,
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();