summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-08-08 10:04:01 (GMT)
committerThomas Haller <thaller@redhat.com>2016-08-12 21:06:27 (GMT)
commitc52087601198f3fb8ec97839e30c6f6309f0d680 (patch)
treea5646cac6bbe847f242dc4d8853a1257d9a70f84 /src
parent625c8f13cf793ba61365c510970f4569a483f2ba (diff)
downloadlibnl-c52087601198f3fb8ec97839e30c6f6309f0d680.zip
libnl-c52087601198f3fb8ec97839e30c6f6309f0d680.tar.gz
libnl-c52087601198f3fb8ec97839e30c6f6309f0d680.tar.bz2
trivial: whitespace-only fixes for src and lib
Fixes alignment, lines with just whitespace and mixed tab/space indentation. Searched, reviewed and optionally fixed in vim using regex ^\t* [\t ]*\([^*us ]\|$\)\|\t\+$ http://lists.infradead.org/pipermail/libnl/2016-August/002183.html Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/genl-ctrl-list.c10
-rw-r--r--src/nf-ct-list.c10
-rw-r--r--src/nf-exp-add.c44
-rw-r--r--src/nf-exp-delete.c28
-rw-r--r--src/nf-exp-list.c12
-rw-r--r--src/nl-addr-add.c12
-rw-r--r--src/nl-addr-delete.c4
-rw-r--r--src/nl-class-add.c12
-rw-r--r--src/nl-class-delete.c10
-rw-r--r--src/nl-class-list.c12
-rw-r--r--src/nl-classid-lookup.c4
-rw-r--r--src/nl-cls-add.c12
-rw-r--r--src/nl-cls-delete.c12
-rw-r--r--src/nl-cls-list.c12
-rw-r--r--src/nl-neigh-add.c12
-rw-r--r--src/nl-neigh-delete.c10
-rw-r--r--src/nl-neigh-list.c10
-rw-r--r--src/nl-neightbl-list.c8
-rw-r--r--src/nl-pktloc-lookup.c4
-rw-r--r--src/nl-qdisc-add.c12
-rw-r--r--src/nl-qdisc-delete.c10
-rw-r--r--src/nl-qdisc-list.c10
22 files changed, 135 insertions, 135 deletions
diff --git a/src/genl-ctrl-list.c b/src/genl-ctrl-list.c
index 0895bcc..078c30c 100644
--- a/src/genl-ctrl-list.c
+++ b/src/genl-ctrl-list.c
@@ -14,7 +14,7 @@
static struct nl_cache *alloc_genl_family_cache(struct nl_sock *sk)
{
return nl_cli_alloc_cache(sk, "generic netlink family",
- genl_ctrl_alloc_cache);
+ genl_ctrl_alloc_cache);
}
static void print_usage(void)
@@ -38,11 +38,11 @@ int main(int argc, char *argv[])
.dp_type = NL_DUMP_LINE,
.dp_fd = stdout,
};
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_GENERIC);
family_cache = alloc_genl_family_cache(sock);
-
+
for (;;) {
int c, optidx = 0;
static struct option long_opts[] = {
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
{ "version", 0, 0, 'v' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "df:hv", long_opts, &optidx);
if (c == -1)
break;
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
case 'h': print_usage(); break;
case 'v': nl_cli_print_version(); break;
}
- }
+ }
nl_cache_dump(family_cache, &params);
diff --git a/src/nf-ct-list.c b/src/nf-ct-list.c
index 5f72998..bc6a337 100644
--- a/src/nf-ct-list.c
+++ b/src/nf-ct-list.c
@@ -54,9 +54,9 @@ int main(int argc, char *argv[])
.dp_type = NL_DUMP_LINE,
.dp_fd = stdout,
};
-
- ct = nl_cli_ct_alloc();
-
+
+ ct = nl_cli_ct_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
{ "refcnt", 1, 0, ARG_REFCNT },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
if (c == -1)
break;
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
case ARG_REFCNT: nl_cli_ct_parse_use(ct, optarg); break;
case ARG_FLAGS: nl_cli_ct_parse_status(ct, optarg); break;
}
- }
+ }
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_NETFILTER);
diff --git a/src/nf-exp-add.c b/src/nf-exp-add.c
index 4b7f9d9..a81147e 100644
--- a/src/nf-exp-add.c
+++ b/src/nf-exp-add.c
@@ -64,8 +64,8 @@ int main(int argc, char *argv[])
};
int err, nlflags = NLM_F_CREATE;
- exp = nl_cli_exp_alloc();
-
+ exp = nl_cli_exp_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -86,12 +86,12 @@ int main(int argc, char *argv[])
ARG_MASK_SPORT,
ARG_MASK_DST,
ARG_MASK_DPORT,
- ARG_NAT_PROTO,
- ARG_NAT_SRC,
- ARG_NAT_SPORT,
- ARG_NAT_DST,
- ARG_NAT_DPORT,
- ARG_NAT_DIR,
+ ARG_NAT_PROTO,
+ ARG_NAT_SRC,
+ ARG_NAT_SPORT,
+ ARG_NAT_DST,
+ ARG_NAT_DPORT,
+ ARG_NAT_DIR,
ARG_TIMEOUT,
ARG_HELPER_NAME,
ARG_REPLACE,
@@ -118,19 +118,19 @@ int main(int argc, char *argv[])
{ "mask-sport", 1, 0, ARG_MASK_SPORT },
{ "mask-dst", 1, 0, ARG_MASK_DST },
{ "mask-dport", 1, 0, ARG_MASK_DPORT },
- { "nat-proto", 1, 0, ARG_NAT_PROTO },
- { "nat-src", 1, 0, ARG_NAT_SRC },
- { "nat-sport", 1, 0, ARG_NAT_SPORT },
- { "nat-dst", 1, 0, ARG_NAT_DST },
- { "nat-dport", 1, 0, ARG_NAT_DPORT },
- { "nat-dir", 1, 0, ARG_NAT_DIR },
+ { "nat-proto", 1, 0, ARG_NAT_PROTO },
+ { "nat-src", 1, 0, ARG_NAT_SRC },
+ { "nat-sport", 1, 0, ARG_NAT_SPORT },
+ { "nat-dst", 1, 0, ARG_NAT_DST },
+ { "nat-dport", 1, 0, ARG_NAT_DPORT },
+ { "nat-dir", 1, 0, ARG_NAT_DIR },
{ "family", 1, 0, 'F' },
{ "timeout", 1, 0, ARG_TIMEOUT },
{ "helper", 1, 0, ARG_HELPER_NAME },
{ "flags", 1, 0, ARG_FLAGS},
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
if (c == -1)
break;
@@ -159,18 +159,18 @@ int main(int argc, char *argv[])
case ARG_MASK_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
case ARG_MASK_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
case ARG_MASK_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
- case ARG_NAT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
- case ARG_NAT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
- case ARG_NAT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
- case ARG_NAT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
- case ARG_NAT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
- case ARG_NAT_DIR: nl_cli_exp_parse_nat_dir(exp, optarg); break;
+ case ARG_NAT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DIR: nl_cli_exp_parse_nat_dir(exp, optarg); break;
case 'F': nl_cli_exp_parse_family(exp, optarg); break;
case ARG_TIMEOUT: nl_cli_exp_parse_timeout(exp, optarg); break;
case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
}
- }
+ }
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_NETFILTER);
diff --git a/src/nf-exp-delete.c b/src/nf-exp-delete.c
index 2ec45ae..0965e90 100644
--- a/src/nf-exp-delete.c
+++ b/src/nf-exp-delete.c
@@ -63,8 +63,8 @@ int main(int argc, char *argv[])
};
int err, nlflags = 0;
- exp = nl_cli_exp_alloc();
-
+ exp = nl_cli_exp_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -80,17 +80,17 @@ int main(int argc, char *argv[])
ARG_MASTER_SPORT,
ARG_MASTER_DST,
ARG_MASTER_DPORT,
- ARG_MASK_PROTO,
- ARG_MASK_SRC,
+ ARG_MASK_PROTO,
+ ARG_MASK_SRC,
ARG_MASK_SPORT,
ARG_MASK_DST,
ARG_MASK_DPORT,
ARG_TIMEOUT,
- ARG_HELPER_NAME,
+ ARG_HELPER_NAME,
ARG_FLAGS,
};
static struct option long_opts[] = {
- { "quiet", 0, 0, 'q' },
+ { "quiet", 0, 0, 'q' },
{ "help", 0, 0, 'h' },
{ "version", 0, 0, 'v' },
{ "id", 1, 0, 'i' },
@@ -105,17 +105,17 @@ int main(int argc, char *argv[])
{ "master-dst", 1, 0, ARG_MASTER_DST },
{ "master-dport", 1, 0, ARG_MASTER_DPORT },
{ "mask-proto", 1, 0, ARG_MASK_PROTO },
- { "mask-src", 1, 0, ARG_MASK_SRC },
- { "mask-sport", 1, 0, ARG_MASK_SPORT },
- { "mask-dst", 1, 0, ARG_MASK_DST },
- { "mask-dport", 1, 0, ARG_MASK_DPORT },
+ { "mask-src", 1, 0, ARG_MASK_SRC },
+ { "mask-sport", 1, 0, ARG_MASK_SPORT },
+ { "mask-dst", 1, 0, ARG_MASK_DST },
+ { "mask-dport", 1, 0, ARG_MASK_DPORT },
{ "family", 1, 0, 'F' },
{ "timeout", 1, 0, ARG_TIMEOUT },
{ "helper", 1, 0, ARG_HELPER_NAME },
- { "flags", 1, 0, ARG_FLAGS},
+ { "flags", 1, 0, ARG_FLAGS},
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
if (c == -1)
break;
@@ -142,13 +142,13 @@ int main(int argc, char *argv[])
case ARG_MASK_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
case ARG_MASK_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
case ARG_MASK_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
- case ARG_MASK_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
case 'F': nl_cli_exp_parse_family(exp, optarg); break;
case ARG_TIMEOUT: nl_cli_exp_parse_timeout(exp, optarg); break;
case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
}
- }
+ }
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_NETFILTER);
diff --git a/src/nf-exp-list.c b/src/nf-exp-list.c
index 1c6ec69..7f5624d 100644
--- a/src/nf-exp-list.c
+++ b/src/nf-exp-list.c
@@ -54,9 +54,9 @@ int main(int argc, char *argv[])
.dp_type = NL_DUMP_LINE,
.dp_fd = stdout,
};
-
- exp = nl_cli_exp_alloc();
-
+
+ exp = nl_cli_exp_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
ARG_MASTER_DST,
ARG_MASTER_DPORT,
ARG_TIMEOUT,
- ARG_HELPER_NAME,
+ ARG_HELPER_NAME,
ARG_FLAGS,
};
static struct option long_opts[] = {
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
{ "flags", 1, 0, ARG_FLAGS},
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
if (c == -1)
break;
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
}
- }
+ }
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_NETFILTER);
diff --git a/src/nl-addr-add.c b/src/nl-addr-add.c
index 52995ec..19d07b3 100644
--- a/src/nl-addr-add.c
+++ b/src/nl-addr-add.c
@@ -50,12 +50,12 @@ int main(int argc, char *argv[])
.dp_fd = stdout,
};
int err, nlflags = NLM_F_CREATE;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- addr = nl_cli_addr_alloc();
-
+ addr = nl_cli_addr_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
{ "valid", 1, 0, ARG_VALID },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhva:d:", long_opts, &optidx);
if (c == -1)
break;
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
case ARG_PREFERRED: nl_cli_addr_parse_preferred(addr, optarg); break;
case ARG_VALID: nl_cli_addr_parse_valid(addr, optarg); break;
}
- }
+ }
if ((err = rtnl_addr_add(sock, addr, nlflags)) < 0)
nl_cli_fatal(err, "Unable to add address: %s",
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
if (!quiet) {
printf("Added ");
nl_object_dump(OBJ_CAST(addr), &dp);
- }
+ }
return 0;
}
diff --git a/src/nl-addr-delete.c b/src/nl-addr-delete.c
index 2849c01..981930f 100644
--- a/src/nl-addr-delete.c
+++ b/src/nl-addr-delete.c
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
{ "valid", 1, 0, ARG_VALID },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "iqhva:d:", long_opts, &optidx);
if (c == -1)
break;
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
case ARG_PREFERRED: nl_cli_addr_parse_preferred(addr, optarg); break;
case ARG_VALID: nl_cli_addr_parse_valid(addr, optarg); break;
}
- }
+ }
nl_cache_foreach_filter(addr_cache, OBJ_CAST(addr), delete_cb, NULL);
diff --git a/src/nl-class-add.c b/src/nl-class-add.c
index b9a17dc..4593471 100644
--- a/src/nl-class-add.c
+++ b/src/nl-class-add.c
@@ -62,15 +62,15 @@ int main(int argc, char *argv[])
struct rtnl_tc_ops *ops;
int err, flags = NLM_F_CREATE | NLM_F_EXCL;
char *kind, *id = NULL;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- class = nl_cli_class_alloc();
+ class = nl_cli_class_alloc();
tc = (struct rtnl_tc *) class;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
{ "linktype", 1, 0, ARG_LINKTYPE },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "+qhvd:p:i:",
long_opts, &optidx);
if (c == -1)
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;
}
- }
+ }
if (optind >= argc)
print_usage();
@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
if (!quiet) {
printf("Adding ");
nl_object_dump(OBJ_CAST(class), &dp);
- }
+ }
if ((err = rtnl_class_add(sock, class, flags)) < 0)
nl_cli_fatal(EINVAL, "Unable to add class: %s", nl_geterror(err));
diff --git a/src/nl-class-delete.c b/src/nl-class-delete.c
index 37657a4..e4be2c0 100644
--- a/src/nl-class-delete.c
+++ b/src/nl-class-delete.c
@@ -70,13 +70,13 @@ int main(int argc, char *argv[])
struct rtnl_class *class;
struct rtnl_tc *tc;
struct nl_cache *link_cache, *class_cache;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- class = nl_cli_class_alloc();
+ class = nl_cli_class_alloc();
tc = (struct rtnl_tc *) class;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
{ "kind", 1, 0, 'k' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
}
- }
+ }
if (!rtnl_tc_get_ifindex(tc))
nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
diff --git a/src/nl-class-list.c b/src/nl-class-list.c
index c2423fb..e8cc71a 100644
--- a/src/nl-class-list.c
+++ b/src/nl-class-list.c
@@ -65,15 +65,15 @@ int main(int argc, char *argv[])
struct rtnl_tc *tc;
struct nl_cache *link_cache;
int ifindex;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- class = nl_cli_class_alloc();
+ class = nl_cli_class_alloc();
tc = (struct rtnl_tc *) class;
params.dp_fd = stdout;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
{ "kind", 1, 0, 'k' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "hvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -106,11 +106,11 @@ int main(int argc, char *argv[])
case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
}
- }
+ }
if ((ifindex = rtnl_tc_get_ifindex(tc)))
__dump_class(ifindex, class);
- else
+ else
nl_cache_foreach(link_cache, dump_class, class);
return 0;
diff --git a/src/nl-classid-lookup.c b/src/nl-classid-lookup.c
index 1d45d0b..1493ebf 100644
--- a/src/nl-classid-lookup.c
+++ b/src/nl-classid-lookup.c
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
{ "raw", 0, 0, ARG_RAW },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "hvr", long_opts, &optidx);
if (c == -1)
break;
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
case 'r': reverse = 1; break;
case ARG_RAW: raw = 1; break;
}
- }
+ }
if (optind >= argc)
print_usage();
diff --git a/src/nl-cls-add.c b/src/nl-cls-add.c
index ada234d..6ac8590 100644
--- a/src/nl-cls-add.c
+++ b/src/nl-cls-add.c
@@ -62,15 +62,15 @@ int main(int argc, char *argv[])
struct rtnl_tc_ops *ops;
int err, flags = NLM_F_CREATE | NLM_F_EXCL;
char *kind, *id = NULL;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- cls = nl_cli_cls_alloc();
+ cls = nl_cli_cls_alloc();
tc = (struct rtnl_tc *) cls;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
{ "linktype", 1, 0, ARG_LINKTYPE },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "+qhvd:p:i:",
long_opts, &optidx);
if (c == -1)
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
break;
}
- }
+ }
if (optind >= argc)
print_usage();
@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
if (!quiet) {
printf("Adding ");
nl_object_dump(OBJ_CAST(cls), &dp);
- }
+ }
if ((err = rtnl_cls_add(sock, cls, flags)) < 0)
nl_cli_fatal(EINVAL, "Unable to add classifier: %s", nl_geterror(err));
diff --git a/src/nl-cls-delete.c b/src/nl-cls-delete.c
index c6abac7..78b93ec 100644
--- a/src/nl-cls-delete.c
+++ b/src/nl-cls-delete.c
@@ -91,13 +91,13 @@ int main(int argc, char *argv[])
struct rtnl_tc *tc;
struct nl_cache *link_cache;
int ifindex;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- cls = nl_cli_cls_alloc();
+ cls = nl_cli_cls_alloc();
tc = (struct rtnl_tc *) cls;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
{ "prio", 1, 0, ARG_PRIO },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -141,11 +141,11 @@ int main(int argc, char *argv[])
rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
break;
}
- }
+ }
if ((ifindex = rtnl_tc_get_ifindex(tc)))
__delete_link(ifindex, cls);
- else
+ else
nl_cache_foreach(link_cache, delete_link, cls);
if (!quiet)
diff --git a/src/nl-cls-list.c b/src/nl-cls-list.c
index cae7e27..08956e0 100644
--- a/src/nl-cls-list.c
+++ b/src/nl-cls-list.c
@@ -69,15 +69,15 @@ int main(int argc, char *argv[])
struct rtnl_tc *tc;
struct nl_cache *link_cache;
int ifindex;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- cls = nl_cli_cls_alloc();
+ cls = nl_cli_cls_alloc();
tc = (struct rtnl_tc *) cls;
params.dp_fd = stdout;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
{ "prio", 1, 0, ARG_PRIO },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "hvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -118,11 +118,11 @@ int main(int argc, char *argv[])
rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
break;
}
- }
+ }
if ((ifindex = rtnl_tc_get_ifindex(tc)))
__dump_link(ifindex, cls);
- else
+ else
nl_cache_foreach(link_cache, dump_link, cls);
return 0;
diff --git a/src/nl-neigh-add.c b/src/nl-neigh-add.c
index 4cddabe..09cef9a 100644
--- a/src/nl-neigh-add.c
+++ b/src/nl-neigh-add.c
@@ -51,12 +51,12 @@ int main(int argc, char *argv[])
.dp_fd = stdout,
};
int err, ok = 0, nlflags = NLM_F_REPLACE | NLM_F_CREATE;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- neigh = nl_cli_neigh_alloc();
-
+ neigh = nl_cli_neigh_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
{ "state", 1, 0, ARG_STATE },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhva:l:d:", long_opts, &optidx);
if (c == -1)
break;
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
case 'd': nl_cli_neigh_parse_dev(neigh, link_cache, optarg); break;
case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
}
- }
+ }
if (!ok)
print_usage();
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
if (!quiet) {
printf("Added ");
nl_object_dump(OBJ_CAST(neigh), &dp);
- }
+ }
return 0;
}
diff --git a/src/nl-neigh-delete.c b/src/nl-neigh-delete.c
index c418608..b6be44c 100644
--- a/src/nl-neigh-delete.c
+++ b/src/nl-neigh-delete.c
@@ -67,13 +67,13 @@ int main(int argc, char *argv[])
{
struct rtnl_neigh *neigh;
struct nl_cache *link_cache, *neigh_cache;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
neigh_cache = nl_cli_neigh_alloc_cache(sock);
- neigh = nl_cli_neigh_alloc();
-
+ neigh = nl_cli_neigh_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -94,7 +94,7 @@ int main(int argc, char *argv[])
{ "state", 1, 0, ARG_STATE },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhva:l:d:", long_opts, &optidx);
if (c == -1)
break;
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
case ARG_FAMILY: nl_cli_neigh_parse_family(neigh, optarg); break;
case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
}
- }
+ }
nl_cache_foreach_filter(neigh_cache, OBJ_CAST(neigh), delete_cb, NULL);
diff --git a/src/nl-neigh-list.c b/src/nl-neigh-list.c
index 8390d4b..c99d237 100644
--- a/src/nl-neigh-list.c
+++ b/src/nl-neigh-list.c
@@ -42,13 +42,13 @@ int main(int argc, char *argv[])
.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_flags(sock, NL_CACHE_AF_ITER);
neigh_cache = nl_cli_neigh_alloc_cache(sock);
- neigh = nl_cli_neigh_alloc();
-
+ neigh = nl_cli_neigh_alloc();
+
for (;;) {
int c, optidx = 0;
enum {
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
{ "state", 1, 0, ARG_STATE },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "f:hva:l:d:", long_opts, &optidx);
if (c == -1)
break;
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
case ARG_FAMILY: nl_cli_neigh_parse_family(neigh, optarg); break;
case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
}
- }
+ }
nl_cache_dump_filter(neigh_cache, &params, OBJ_CAST(neigh));
diff --git a/src/nl-neightbl-list.c b/src/nl-neightbl-list.c
index 4c4230f..2380e01 100644
--- a/src/nl-neightbl-list.c
+++ b/src/nl-neightbl-list.c
@@ -33,13 +33,13 @@ int main(int argc, char *argv[])
.dp_type = NL_DUMP_LINE,
.dp_fd = stdout,
};
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
nl_cli_link_alloc_cache(sock);
neightbl_cache = nl_cli_alloc_cache(sock, "neighbour table",
rtnl_neightbl_alloc_cache);
-
+
for (;;) {
int c, optidx = 0;
static struct option long_opts[] = {
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
{ "version", 0, 0, 'v' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "f:hv", long_opts, &optidx);
if (c == -1)
break;
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
case 'h': print_usage(); break;
case 'v': nl_cli_print_version(); break;
}
- }
+ }
nl_cache_dump(neightbl_cache, &params);
diff --git a/src/nl-pktloc-lookup.c b/src/nl-pktloc-lookup.c
index 17c867b..7d24402 100644
--- a/src/nl-pktloc-lookup.c
+++ b/src/nl-pktloc-lookup.c
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
{ "u32", 1, 0, ARG_U32 },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "hvl", long_opts, &optidx);
if (c == -1)
break;
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
uvalue = nl_cli_parse_u32(optarg);
break;
}
- }
+ }
if (optind >= argc)
print_usage();
diff --git a/src/nl-qdisc-add.c b/src/nl-qdisc-add.c
index c2a7c9f..d8a1f73 100644
--- a/src/nl-qdisc-add.c
+++ b/src/nl-qdisc-add.c
@@ -59,15 +59,15 @@ int main(int argc, char *argv[])
struct rtnl_tc_ops *ops;
int err, flags = NLM_F_CREATE | NLM_F_EXCL;
char *kind, *id = NULL;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
- qdisc = nl_cli_qdisc_alloc();
+ qdisc = nl_cli_qdisc_alloc();
tc = (struct rtnl_tc *) qdisc;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
{ "update-only", 0, 0, ARG_UPDATE_ONLY },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "+qhvd:p:i:",
long_opts, &optidx);
if (c == -1)
@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
case ARG_UPDATE_ONLY: flags = 0; break;
case ARG_REPLACE_ONLY: flags = NLM_F_REPLACE; break;
}
- }
+ }
if (optind >= argc)
print_usage();
@@ -137,7 +137,7 @@ int main(int argc, char *argv[])
if (!quiet) {
printf("Adding ");
nl_object_dump(OBJ_CAST(qdisc), &dp);
- }
+ }
if ((err = rtnl_qdisc_add(sock, qdisc, flags)) < 0)
nl_cli_fatal(EINVAL, "Unable to add qdisc: %s", nl_geterror(err));
diff --git a/src/nl-qdisc-delete.c b/src/nl-qdisc-delete.c
index 2f945bb..c4acbfe 100644
--- a/src/nl-qdisc-delete.c
+++ b/src/nl-qdisc-delete.c
@@ -71,14 +71,14 @@ int main(int argc, char *argv[])
struct rtnl_tc *tc;
struct nl_cache *link_cache, *qdisc_cache;
int nfilter = 0;
-
+
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
- qdisc = nl_cli_qdisc_alloc();
+ qdisc = nl_cli_qdisc_alloc();
tc = (struct rtnl_tc *) qdisc;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
{ "kind", 1, 0, 'k' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
nl_cli_tc_parse_kind(tc, optarg);
break;
}
- }
+ }
if (nfilter == 0 && !interactive && !default_yes) {
nl_cli_fatal(EINVAL,
diff --git a/src/nl-qdisc-list.c b/src/nl-qdisc-list.c
index 5b0a3f0..b8110f1 100644
--- a/src/nl-qdisc-list.c
+++ b/src/nl-qdisc-list.c
@@ -129,15 +129,15 @@ int main(int argc, char *argv[])
struct rtnl_qdisc *qdisc;
struct rtnl_tc *tc;
struct nl_cache *link_cache, *qdisc_cache;
-
+
params.dp_fd = stdout;
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_ROUTE);
link_cache = nl_cli_link_alloc_cache(sock);
qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
- qdisc = nl_cli_qdisc_alloc();
+ qdisc = nl_cli_qdisc_alloc();
tc = (struct rtnl_tc *) qdisc;
-
+
for (;;) {
int c, optidx = 0;
enum {
@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
{ "kind", 1, 0, 'k' },
{ 0, 0, 0, 0 }
};
-
+
c = getopt_long(argc, argv, "rhvd:p:i:k:", long_opts, &optidx);
if (c == -1)
break;
@@ -172,7 +172,7 @@ int main(int argc, char *argv[])
case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
}
- }
+ }
if (recursive)
nl_cache_foreach_filter(qdisc_cache, OBJ_CAST(qdisc), list_qdisc, NULL);