Remove trailing whitespace
Go through source files and remove all trailing whitespace
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 8360617..1050593 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -65,7 +65,7 @@
struct ip6tables_target
{
struct ip6tables_target *next;
-
+
ip6t_chainlabel name;
const char *version;
@@ -87,7 +87,7 @@
int (*parse)(int c, char **argv, int invert, unsigned int *flags,
const struct ip6t_entry *entry,
struct ip6t_entry_target **target);
-
+
/* Final check; exit if not ok. */
void (*final_check)(unsigned int flags);
diff --git a/include/iptables.h b/include/iptables.h
index 25f36ae..dd844c1 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -170,7 +170,7 @@
extern int delete_chain(const ipt_chainlabel chain, int verbose,
iptc_handle_t *handle);
-extern int flush_entries(const ipt_chainlabel chain, int verbose,
+extern int flush_entries(const ipt_chainlabel chain, int verbose,
iptc_handle_t *handle);
extern int for_each_chain(int (*fn)(const ipt_chainlabel, int, iptc_handle_t *),
int verbose, int builtinstoo, iptc_handle_t *handle);
diff --git a/include/iptables_common.h b/include/iptables_common.h
index ed5b9c0..82b0feb 100644
--- a/include/iptables_common.h
+++ b/include/iptables_common.h
@@ -10,16 +10,16 @@
extern void exit_printhelp(void) __attribute__((noreturn));
extern void exit_tryhelp(int) __attribute__((noreturn));
int check_inverse(const char option[], int *invert, int *optind, int argc);
-extern int string_to_number(const char *,
- unsigned int,
+extern int string_to_number(const char *,
+ unsigned int,
unsigned int,
unsigned int *);
-extern int string_to_number_l(const char *,
- unsigned long int,
+extern int string_to_number_l(const char *,
+ unsigned long int,
unsigned long int,
unsigned long *);
-extern int string_to_number_ll(const char *,
- unsigned long long int,
+extern int string_to_number_ll(const char *,
+ unsigned long long int,
unsigned long long int,
unsigned long long *);
extern int iptables_insmod(const char *modname, const char *modprobe);
diff --git a/include/libnetlink.h b/include/libnetlink.h
index 9de3a0b..49e248e 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -23,7 +23,7 @@
extern int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type);
extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len);
-typedef int (*rtnl_filter_t)(const struct sockaddr_nl *,
+typedef int (*rtnl_filter_t)(const struct sockaddr_nl *,
struct nlmsghdr *n, void *);
extern int rtnl_dump_filter(struct rtnl_handle *rth, rtnl_filter_t filter,
void *arg1,
@@ -48,7 +48,7 @@
#define parse_rtattr_nested(tb, max, rta) \
(parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta)))
-extern int rtnl_listen(struct rtnl_handle *, rtnl_filter_t handler,
+extern int rtnl_listen(struct rtnl_handle *, rtnl_filter_t handler,
void *jarg);
extern int rtnl_from_file(FILE *, rtnl_filter_t handler,
void *jarg);
diff --git a/include/ll_map.h b/include/ll_map.h
index d085813..c4d5c6d 100644
--- a/include/ll_map.h
+++ b/include/ll_map.h
@@ -1,7 +1,7 @@
#ifndef __LL_MAP_H__
#define __LL_MAP_H__ 1
-extern int ll_remember_index(const struct sockaddr_nl *who,
+extern int ll_remember_index(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
extern int ll_init_map(struct rtnl_handle *rth);
extern unsigned ll_name_to_index(const char *name);
diff --git a/include/utils.h b/include/utils.h
index 0f1d1f6..a4133c9 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -55,7 +55,7 @@
#define AF_DECnet 12
#endif
-struct dn_naddr
+struct dn_naddr
{
unsigned short a_len;
unsigned char a_addr[DN_MAXADDL];
@@ -89,9 +89,9 @@
extern char* hexstring_n2a(const __u8 *str, int len, char *buf, int blen);
extern __u8* hexstring_a2n(const char *str, __u8 *buf, int blen);
-extern const char *format_host(int af, int len, const void *addr,
+extern const char *format_host(int af, int len, const void *addr,
char *buf, int buflen);
-extern const char *rt_addr_n2a(int af, int len, const void *addr,
+extern const char *rt_addr_n2a(int af, int len, const void *addr,
char *buf, int buflen);
void missarg(const char *) __attribute__((noreturn));
diff --git a/ip/ifcfg b/ip/ifcfg
index fb0fe51..083d9df 100644
--- a/ip/ifcfg
+++ b/ip/ifcfg
@@ -129,7 +129,7 @@
( sleep 2 ;
arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
-ip route add unreachable 224.0.0.0/24 >& /dev/null
+ip route add unreachable 224.0.0.0/24 >& /dev/null
ip route add unreachable 255.255.255.255 >& /dev/null
if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
diff --git a/ip/ip.c b/ip/ip.c
index 091e9ef..c084292 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -145,7 +145,7 @@
basename = argv[0];
else
basename++;
-
+
while (argc > 1) {
char *opt = argv[1];
if (strcmp(opt,"--") == 0) {
@@ -220,16 +220,16 @@
_SL_ = oneline ? "\\" : "\n" ;
- if (batch_file)
+ if (batch_file)
return batch(batch_file);
-
+
if (rtnl_open(&rth, 0) < 0)
exit(1);
- if (strlen(basename) > 2)
+ if (strlen(basename) > 2)
return do_cmd(basename+2, argc, argv);
- if (argc > 1)
+ if (argc > 1)
return do_cmd(argv[1], argc-1, argv+1);
rtnl_close(&rth);
diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 488afcb..6468d99 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -1,16 +1,16 @@
/*
* Copyright (C)2006 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -24,7 +24,7 @@
* Author:
* Masahide NAKAMURA @USAGI
*/
-
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -72,7 +72,7 @@
{
char remote[64];
char local[64];
-
+
inet_ntop(AF_INET6, &p->raddr, remote, sizeof(remote));
inet_ntop(AF_INET6, &p->laddr, local, sizeof(local));
@@ -353,8 +353,8 @@
return tnl_del_ioctl(p.name[0] ? p.name : "ip6tnl0", p.name, &p);
}
-int do_ip6tunnel(int argc, char **argv)
-{
+int do_ip6tunnel(int argc, char **argv)
+{
switch (preferred_family) {
case AF_UNSPEC:
preferred_family = AF_INET6;
diff --git a/ip/ip_common.h b/ip/ip_common.h
index aeb9994..5bfd9b9 100644
--- a/ip/ip_common.h
+++ b/ip/ip_common.h
@@ -1,8 +1,8 @@
-extern int print_linkinfo(const struct sockaddr_nl *who,
- struct nlmsghdr *n,
+extern int print_linkinfo(const struct sockaddr_nl *who,
+ struct nlmsghdr *n,
void *arg);
extern int print_addrinfo(const struct sockaddr_nl *who,
- struct nlmsghdr *n,
+ struct nlmsghdr *n,
void *arg);
extern int print_neigh(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
@@ -16,7 +16,7 @@
extern void ipaddr_reset_filter(int);
extern void ipneigh_reset_filter(void);
extern void ipntable_reset_filter(void);
-extern int print_route(const struct sockaddr_nl *who,
+extern int print_route(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
extern int print_prefix(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 3729892..cae1fcd 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -120,7 +120,7 @@
memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, name);
- if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) {
+ if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) {
perror("SIOCGIFXQLEN");
close(s);
return;
@@ -131,7 +131,7 @@
printf("qlen %d", ifr.ifr_qlen);
}
-int print_linkinfo(const struct sockaddr_nl *who,
+int print_linkinfo(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg)
{
FILE *fp = (FILE*)arg;
@@ -195,7 +195,7 @@
#endif
if (filter.showqueue)
print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME]));
-
+
if (!filter.family || filter.family == AF_PACKET) {
SPRINT_BUF(b1);
fprintf(fp, "%s", _SL_);
@@ -290,7 +290,7 @@
return 0;
}
-int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,
+int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
FILE *fp = (FILE*)arg;
@@ -474,7 +474,7 @@
if (n->nlmsg_len < NLMSG_LENGTH(sizeof(ifa)))
return -1;
- if (ifa->ifa_index != ifindex ||
+ if (ifa->ifa_index != ifindex ||
(filter.family && filter.family != ifa->ifa_family))
continue;
@@ -484,7 +484,7 @@
}
-static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n,
+static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
struct nlmsg_list **linfo = (struct nlmsg_list**)arg;
@@ -667,7 +667,7 @@
struct nlmsghdr *n = &a->h;
struct ifaddrmsg *ifa = NLMSG_DATA(n);
- if (ifa->ifa_index != ifi->ifi_index ||
+ if (ifa->ifa_index != ifi->ifi_index ||
(filter.family && filter.family != ifa->ifa_family))
continue;
if ((filter.scope^ifa->ifa_scope)&filter.scopemask)
diff --git a/ip/iplink.c b/ip/iplink.c
index ffc9f06..8f82a08 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -140,8 +140,8 @@
return -1;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, dev, IFNAMSIZ);
- ifr.ifr_qlen = qlen;
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+ ifr.ifr_qlen = qlen;
if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) {
perror("SIOCSIFXQLEN");
close(s);
@@ -149,7 +149,7 @@
}
close(s);
- return 0;
+ return 0;
}
static int set_mtu(const char *dev, int mtu)
@@ -162,8 +162,8 @@
return -1;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, dev, IFNAMSIZ);
- ifr.ifr_mtu = mtu;
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+ ifr.ifr_mtu = mtu;
if (ioctl(s, SIOCSIFMTU, &ifr) < 0) {
perror("SIOCSIFMTU");
close(s);
@@ -171,7 +171,7 @@
}
close(s);
- return 0;
+ return 0;
}
static int get_address(const char *dev, int *htype)
@@ -182,7 +182,7 @@
int s;
s = socket(PF_PACKET, SOCK_DGRAM, 0);
- if (s < 0) {
+ if (s < 0) {
perror("socket(PF_PACKET)");
return -1;
}
@@ -216,7 +216,7 @@
return me.sll_halen;
}
-static int parse_address(const char *dev, int hatype, int halen,
+static int parse_address(const char *dev, int hatype, int halen,
char *lla, struct ifreq *ifr)
{
int alen;
@@ -231,7 +231,7 @@
fprintf(stderr, "Wrong address (%s) length: expected %d bytes\n", lla, halen);
return -1;
}
- return 0;
+ return 0;
}
static int set_address(struct ifreq *ifr, int brd)
@@ -247,7 +247,7 @@
return -1;
}
close(s);
- return 0;
+ return 0;
}
@@ -379,7 +379,7 @@
}
if (newbrd) {
if (parse_address(dev, htype, halen, newbrd, &ifr1) < 0)
- return -1;
+ return -1;
}
}
@@ -388,18 +388,18 @@
return -1;
dev = newname;
}
- if (qlen != -1) {
+ if (qlen != -1) {
if (set_qlen(dev, qlen) < 0)
- return -1;
+ return -1;
}
- if (mtu != -1) {
+ if (mtu != -1) {
if (set_mtu(dev, mtu) < 0)
- return -1;
+ return -1;
}
if (newaddr || newbrd) {
if (newbrd) {
if (set_address(&ifr1, 1) < 0)
- return -1;
+ return -1;
}
if (newaddr) {
if (set_address(&ifr0, 0) < 0)
diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
index e6bd625..1014f83 100644
--- a/ip/ipmaddr.c
+++ b/ip/ipmaddr.c
@@ -212,7 +212,7 @@
fprintf(fp, "family %d ", list->addr.family);
break;
}
- fprintf(fp, "%s",
+ fprintf(fp, "%s",
format_host(list->addr.family,
-1,
list->addr.data,
@@ -298,7 +298,7 @@
usage();
if (ifr.ifr_hwaddr.sa_data[0])
duparg("address", *argv);
- if (ll_addr_a2n(ifr.ifr_hwaddr.sa_data,
+ if (ll_addr_a2n(ifr.ifr_hwaddr.sa_data,
14, *argv) < 0) {
fprintf(stderr, "Error: \"%s\" is not a legal ll address.\n", *argv);
exit(1);
diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index 951a54f..8f4b061 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -66,7 +66,7 @@
if (sscanf(buf, "%d%s", &vifi, dev) < 2)
continue;
-
+
if (vifi<0 || vifi>31)
continue;
@@ -109,7 +109,7 @@
if (filter.msrc.family && inet_addr_match(&msrc, &filter.msrc, filter.msrc.bitlen))
continue;
- snprintf(obuf, sizeof(obuf), "(%s, %s)",
+ snprintf(obuf, sizeof(obuf), "(%s, %s)",
format_host(AF_INET, 4, &msrc.data[0], sbuf, sizeof(sbuf)),
format_host(AF_INET, 4, &maddr.data[0], mbuf, sizeof(mbuf)));
diff --git a/ip/ipneigh.c b/ip/ipneigh.c
index 249ee68..bb1ce35 100644
--- a/ip/ipneigh.c
+++ b/ip/ipneigh.c
@@ -197,7 +197,7 @@
if (n->nlmsg_type != RTM_NEWNEIGH && n->nlmsg_type != RTM_DELNEIGH) {
fprintf(stderr, "Not RTM_NEWNEIGH: %08x %08x %08x\n",
n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
-
+
return 0;
}
len -= NLMSG_LENGTH(sizeof(*r));
@@ -254,7 +254,7 @@
}
if (tb[NDA_DST]) {
- fprintf(fp, "%s ",
+ fprintf(fp, "%s ",
format_host(r->ndm_family,
RTA_PAYLOAD(tb[NDA_DST]),
RTA_DATA(tb[NDA_DST]),
diff --git a/ip/ipntable.c b/ip/ipntable.c
index 5655d93..141ad42 100644
--- a/ip/ipntable.c
+++ b/ip/ipntable.c
@@ -1,16 +1,16 @@
/*
* Copyright (C)2006 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/ipprefix.c b/ip/ipprefix.c
index 61d12f9..cb1f582 100644
--- a/ip/ipprefix.c
+++ b/ip/ipprefix.c
@@ -1,16 +1,16 @@
/*
* Copyright (C)2005 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -78,7 +78,7 @@
pfx = (struct in6_addr *)RTA_DATA(tb[PREFIX_ADDRESS]);
memset(abuf, '\0', sizeof(abuf));
- fprintf(fp, "%s", rt_addr_n2a(family, sizeof(*pfx), pfx,
+ fprintf(fp, "%s", rt_addr_n2a(family, sizeof(*pfx), pfx,
abuf, sizeof(abuf)));
}
fprintf(fp, "/%u ", prefix->prefix_len);
diff --git a/ip/iproute.c b/ip/iproute.c
index 16c398a..6fe4a70 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -281,7 +281,7 @@
if ((oif^filter.oif)&filter.oifmask)
return 0;
}
- if (filter.flushb &&
+ if (filter.flushb &&
r->rtm_family == AF_INET6 &&
r->rtm_dst_len == 0 &&
r->rtm_type == RTN_UNREACHABLE &&
@@ -363,7 +363,7 @@
}
if (tb[RTA_GATEWAY] && filter.rvia.bitlen != host_len) {
- fprintf(fp, "via %s ",
+ fprintf(fp, "via %s ",
format_host(r->rtm_family,
RTA_PAYLOAD(tb[RTA_GATEWAY]),
RTA_DATA(tb[RTA_GATEWAY]),
@@ -384,7 +384,7 @@
/* Do not use format_host(). It is our local addr
and symbolic name will not be useful.
*/
- fprintf(fp, " src %s ",
+ fprintf(fp, " src %s ",
rt_addr_n2a(r->rtm_family,
RTA_PAYLOAD(tb[RTA_PREFSRC]),
RTA_DATA(tb[RTA_PREFSRC]),
@@ -557,7 +557,7 @@
if (nh->rtnh_len > sizeof(*nh)) {
parse_rtattr(tb, RTA_MAX, RTNH_DATA(nh), nh->rtnh_len - sizeof(*nh));
if (tb[RTA_GATEWAY]) {
- fprintf(fp, " via %s ",
+ fprintf(fp, " via %s ",
format_host(r->rtm_family,
RTA_PAYLOAD(tb[RTA_GATEWAY]),
RTA_DATA(tb[RTA_GATEWAY]),
@@ -1020,7 +1020,7 @@
}
len = strlen (buffer);
-
+
if ((write (flush_fd, (void *)buffer, len)) < len) {
fprintf (stderr, "Cannot flush routing cache\n");
return -1;
@@ -1292,7 +1292,7 @@
req.r.rtm_src_len = 0;
req.r.rtm_dst_len = 0;
req.r.rtm_tos = 0;
-
+
while (argc > 0) {
if (strcmp(*argv, "tos") == 0 ||
matches(*argv, "dsfield") == 0) {
@@ -1434,7 +1434,7 @@
{
if (argc < 1)
return iproute_list_or_flush(0, NULL, 0);
-
+
if (matches(*argv, "add") == 0)
return iproute_modify(RTM_NEWROUTE, NLM_F_CREATE|NLM_F_EXCL,
argc-1, argv+1);
diff --git a/ip/iprule.c b/ip/iprule.c
index c584b18..591112e 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -155,7 +155,7 @@
if (r->rtm_type == RTN_NAT) {
if (tb[RTA_GATEWAY]) {
- fprintf(fp, "map-to %s ",
+ fprintf(fp, "map-to %s ",
format_host(r->rtm_family,
RTA_PAYLOAD(tb[RTA_GATEWAY]),
RTA_DATA(tb[RTA_GATEWAY]),
diff --git a/ip/iptunnel.c b/ip/iptunnel.c
index 57a6ab0..828d80a 100644
--- a/ip/iptunnel.c
+++ b/ip/iptunnel.c
@@ -262,7 +262,7 @@
return tnl_add_ioctl(cmd, "gre0", p.name, &p);
case IPPROTO_IPV6:
return tnl_add_ioctl(cmd, "sit0", p.name, &p);
- default:
+ default:
fprintf(stderr, "cannot determine tunnel mode (ipip, gre or sit)\n");
return -1;
}
@@ -283,7 +283,7 @@
return tnl_del_ioctl("gre0", p.name, &p);
case IPPROTO_IPV6:
return tnl_del_ioctl("sit0", p.name, &p);
- default:
+ default:
return tnl_del_ioctl(p.name, p.name, &p);
}
return -1;
@@ -318,7 +318,7 @@
printf(" ttl %d ", p->iph.ttl);
else
printf(" ttl inherit ");
-
+
if (p->iph.tos) {
SPRINT_BUF(b1);
printf(" tos");
@@ -427,7 +427,7 @@
return -1;
switch (p.iph.protocol) {
- case IPPROTO_IPIP:
+ case IPPROTO_IPIP:
err = tnl_get_ioctl(p.name[0] ? p.name : "tunl0", &p);
break;
case IPPROTO_GRE:
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 9c8b4bd..0f322d4 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -2,17 +2,17 @@
/*
* Copyright (C)2004 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -59,7 +59,7 @@
static void usage(void)
{
- fprintf(stderr,
+ fprintf(stderr,
"Usage: ip xfrm XFRM_OBJECT { COMMAND | help }\n"
"where XFRM_OBJECT := { state | policy | monitor }\n");
exit(-1);
@@ -349,7 +349,7 @@
time_t t;
struct tm *tp;
- /* XXX: treat time in the same manner of kernel's
+ /* XXX: treat time in the same manner of kernel's
* net/xfrm/xfrm_{user,state}.c
*/
t = (long)time;
@@ -690,7 +690,7 @@
memset(abuf, '\0', sizeof(abuf));
fprintf(fp, "%s",
- rt_addr_n2a(family, sizeof(*coa), coa,
+ rt_addr_n2a(family, sizeof(*coa), coa,
abuf, sizeof(abuf)));
fprintf(fp, "%s", _SL_);
}
diff --git a/ip/rtmon.c b/ip/rtmon.c
index 5ce7731..8c464cb 100644
--- a/ip/rtmon.c
+++ b/ip/rtmon.c
@@ -46,7 +46,7 @@
fwrite((void*)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp);
}
-static int dump_msg(const struct sockaddr_nl *who, struct nlmsghdr *n,
+static int dump_msg(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
FILE *fp = (FILE*)arg;
diff --git a/ip/tunnel.c b/ip/tunnel.c
index 92b234b..5fede2c 100644
--- a/ip/tunnel.c
+++ b/ip/tunnel.c
@@ -1,16 +1,16 @@
/*
* Copyright (C)2006 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/tunnel.h b/ip/tunnel.h
index 72512e8..1b58834 100644
--- a/ip/tunnel.h
+++ b/ip/tunnel.h
@@ -1,16 +1,16 @@
/*
* Copyright (C)2006 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/xfrm.h b/ip/xfrm.h
index 03db37b..d1959bb 100644
--- a/ip/xfrm.h
+++ b/ip/xfrm.h
@@ -2,17 +2,17 @@
/*
* Copyright (C)2004 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/xfrm_monitor.c b/ip/xfrm_monitor.c
index b4fda02..154bbee 100644
--- a/ip/xfrm_monitor.c
+++ b/ip/xfrm_monitor.c
@@ -2,17 +2,17 @@
/*
* Copyright (C)2005 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index 44aff79..ddbda78 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -2,17 +2,17 @@
/*
* Copyright (C)2004 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index 57dc4b5..42e3949 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -2,17 +2,17 @@
/*
* Copyright (C)2004 USAGI/WIDE Project
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -82,7 +82,7 @@
fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
fprintf(stderr, "FLAG := [ noecn | decap-dscp | wildrecv ]\n");
-
+
fprintf(stderr, "ENCAP := ENCAP-TYPE SPORT DPORT OADDR\n");
fprintf(stderr, "ENCAP-TYPE := espinudp | espinudp-nonike\n");
@@ -669,7 +669,7 @@
rta = XFRMSID_RTA(xsid);
else if (n->nlmsg_type == XFRM_MSG_EXPIRE)
rta = XFRMEXP_RTA(xexp);
- else
+ else
rta = XFRMS_RTA(xsinfo);
parse_rtattr(tb, XFRMA_MAX, rta, len);
diff --git a/lib/ipx_ntop.c b/lib/ipx_ntop.c
index b2d6790..7b6d728 100644
--- a/lib/ipx_ntop.c
+++ b/lib/ipx_ntop.c
@@ -38,7 +38,7 @@
*(str + pos) = '.';
pos++;
-
+
for(i = 0; i < 6; i++) {
if (do_digit(str + pos, addr->ipx_node[i], 1, &pos, len))
return str;
diff --git a/lib/ll_map.c b/lib/ll_map.c
index 1acbf8f..dee498f 100644
--- a/lib/ll_map.c
+++ b/lib/ll_map.c
@@ -36,7 +36,7 @@
static struct idxmap *idxmap[16];
-int ll_remember_index(const struct sockaddr_nl *who,
+int ll_remember_index(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg)
{
int h;
diff --git a/lib/ll_proto.c b/lib/ll_proto.c
index 98c67fe..e61763c 100644
--- a/lib/ll_proto.c
+++ b/lib/ll_proto.c
@@ -35,63 +35,63 @@
const char *name;
} llproto_names[] = {
__PF(LOOP,loop)
-__PF(PUP,pup)
+__PF(PUP,pup)
#ifdef ETH_P_PUPAT
__PF(PUPAT,pupat)
-#endif
+#endif
__PF(IP,ip)
__PF(X25,x25)
__PF(ARP,arp)
__PF(BPQ,bpq)
#ifdef ETH_P_IEEEPUP
__PF(IEEEPUP,ieeepup)
-#endif
+#endif
#ifdef ETH_P_IEEEPUPAT
__PF(IEEEPUPAT,ieeepupat)
-#endif
-__PF(DEC,dec)
-__PF(DNA_DL,dna_dl)
-__PF(DNA_RC,dna_rc)
-__PF(DNA_RT,dna_rt)
-__PF(LAT,lat)
-__PF(DIAG,diag)
-__PF(CUST,cust)
-__PF(SCA,sca)
-__PF(RARP,rarp)
-__PF(ATALK,atalk)
-__PF(AARP,aarp)
-__PF(IPX,ipx)
-__PF(IPV6,ipv6)
+#endif
+__PF(DEC,dec)
+__PF(DNA_DL,dna_dl)
+__PF(DNA_RC,dna_rc)
+__PF(DNA_RT,dna_rt)
+__PF(LAT,lat)
+__PF(DIAG,diag)
+__PF(CUST,cust)
+__PF(SCA,sca)
+__PF(RARP,rarp)
+__PF(ATALK,atalk)
+__PF(AARP,aarp)
+__PF(IPX,ipx)
+__PF(IPV6,ipv6)
#ifdef ETH_P_PPP_DISC
__PF(PPP_DISC,ppp_disc)
-#endif
+#endif
#ifdef ETH_P_PPP_SES
__PF(PPP_SES,ppp_ses)
-#endif
+#endif
#ifdef ETH_P_ATMMPOA
__PF(ATMMPOA,atmmpoa)
#endif
#ifdef ETH_P_ATMFATE
__PF(ATMFATE,atmfate)
-#endif
+#endif
-__PF(802_3,802_3)
-__PF(AX25,ax25)
-__PF(ALL,all)
-__PF(802_2,802_2)
-__PF(SNAP,snap)
-__PF(DDCMP,ddcmp)
-__PF(WAN_PPP,wan_ppp)
-__PF(PPP_MP,ppp_mp)
-__PF(LOCALTALK,localtalk)
-__PF(PPPTALK,ppptalk)
-__PF(TR_802_2,tr_802_2)
-__PF(MOBITEX,mobitex)
-__PF(CONTROL,control)
-__PF(IRDA,irda)
+__PF(802_3,802_3)
+__PF(AX25,ax25)
+__PF(ALL,all)
+__PF(802_2,802_2)
+__PF(SNAP,snap)
+__PF(DDCMP,ddcmp)
+__PF(WAN_PPP,wan_ppp)
+__PF(PPP_MP,ppp_mp)
+__PF(LOCALTALK,localtalk)
+__PF(PPPTALK,ppptalk)
+__PF(TR_802_2,tr_802_2)
+__PF(MOBITEX,mobitex)
+__PF(CONTROL,control)
+__PF(IRDA,irda)
#ifdef ETH_P_ECONET
__PF(ECONET,econet)
-#endif
+#endif
{ 0x8100, "802.1Q" },
{ ETH_P_IP, "ipv4" },
diff --git a/lib/utils.c b/lib/utils.c
index 773e959..4f35a60 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -582,15 +582,15 @@
{
size_t cc;
char *cp;
-
+
if ((cc = getline(linep, lenp, in)) < 0)
return cc; /* eof or error */
++cmdlineno;
cp = strchr(*linep, '#');
- if (cp)
+ if (cp)
*cp = '\0';
-
+
while ((cp = strstr(*linep, "\\\n")) != NULL) {
char *line1 = NULL;
size_t len1 = 0;
@@ -605,7 +605,7 @@
*cp = 0;
cp = strchr(line1, '#');
- if (cp)
+ if (cp)
*cp = '\0';
*linep = realloc(*linep, strlen(*linep) + strlen(line1) + 1);
diff --git a/misc/arpd.c b/misc/arpd.c
index 4fd226e..71cd082 100644
--- a/misc/arpd.c
+++ b/misc/arpd.c
@@ -42,7 +42,7 @@
DB *dbase;
char *dbname = "/var/lib/arpd/arpd.db";
-int ifnum;
+int ifnum;
int *ifvec;
char **ifnames;
@@ -53,7 +53,7 @@
};
#define IS_NEG(x) (((__u8*)(x))[0] == 0xFF)
-#define NEG_TIME(x) (((x)[2]<<24)|((x)[3]<<16)|((x)[4]<<8)|(x)[5])
+#define NEG_TIME(x) (((x)[2]<<24)|((x)[3]<<16)|((x)[4]<<8)|(x)[5])
#define NEG_AGE(x) ((__u32)time(NULL) - NEG_TIME((__u8*)x))
#define NEG_VALID(x) (NEG_AGE(x) < negative_timeout)
#define NEG_CNT(x) (((__u8*)(x))[1])
@@ -485,7 +485,7 @@
DBT dbkey, dbdat;
int n;
- n = recvfrom(pset[0].fd, buf, sizeof(buf), MSG_DONTWAIT,
+ n = recvfrom(pset[0].fd, buf, sizeof(buf), MSG_DONTWAIT,
(struct sockaddr*)&sll, &sll_len);
if (n < 0) {
if (errno != EINTR && errno != EAGAIN)
@@ -510,7 +510,7 @@
key.iface = sll.sll_ifindex;
memcpy(&key.addr, (char*)(a+1) + a->ar_hln, 4);
- /* DAD message, ignore. */
+ /* DAD message, ignore. */
if (key.addr == 0)
return;
@@ -538,7 +538,7 @@
sa.sa_handler = handler;
#ifdef SA_INTERRUPT
sa.sa_flags = SA_INTERRUPT;
-#endif
+#endif
sigaction(sig, &sa, NULL);
}
@@ -728,7 +728,7 @@
DBT dbkey, dbdat;
printf("%-8s %-15s %s\n", "#Ifindex", "IP", "MAC");
while (dbase->seq(dbase, &dbkey, &dbdat, R_NEXT) == 0) {
- struct dbkey *key = dbkey.data;
+ struct dbkey *key = dbkey.data;
if (handle_if(key->iface)) {
if (!IS_NEG(dbdat.data)) {
char b1[18];
diff --git a/misc/ifstat.c b/misc/ifstat.c
index 4b87994..68dfdee 100644
--- a/misc/ifstat.c
+++ b/misc/ifstat.c
@@ -77,7 +77,7 @@
return 0;
}
-static int get_nlmsg(const struct sockaddr_nl *who,
+static int get_nlmsg(const struct sockaddr_nl *who,
struct nlmsghdr *m, void *arg)
{
struct ifinfomsg *ifi = NLMSG_DATA(m);
@@ -442,11 +442,11 @@
int i;
for (i = 0; i < MAXS; i++) {
if ((long)(h1->ival[i] - n->ival[i]) < 0) {
- memset(n->ival, 0, sizeof(n->ival));
+ memset(n->ival, 0, sizeof(n->ival));
break;
}
}
- for (i = 0; i < MAXS; i++) {
+ for (i = 0; i < MAXS; i++) {
double sample;
unsigned long incr = h1->ival[i] - n->ival[i];
n->val[i] += incr;
diff --git a/misc/lnstat.c b/misc/lnstat.c
index 460540e..4dc1072 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -119,7 +119,7 @@
fps->params[j].lf->file->interval.tv_sec =
interval;
if (!fps->params[j].print.width)
- fps->params[j].print.width =
+ fps->params[j].print.width =
FIELD_WIDTH_DEFAULT;
j++;
}
@@ -204,7 +204,7 @@
}
return 0;
}
-
+
int main(int argc, char **argv)
{
@@ -222,10 +222,10 @@
static struct field_params fp;
int num_req_files = 0;
char *req_files[LNSTAT_MAX_FILES];
-
+
/* backwards compatibility mode for old tools */
basename = strrchr(argv[0], '/');
- if (basename)
+ if (basename)
basename += 1; /* name after slash */
else
basename = argv[0]; /* no slash */
@@ -240,7 +240,7 @@
num_req_files = 1;
}
- while ((c = getopt_long(argc, argv,"Vc:df:h?i:k:s:w:",
+ while ((c = getopt_long(argc, argv,"Vc:df:h?i:k:s:w:",
opts, NULL)) != -1) {
int i, len = 0;
char *tmp, *tok;
@@ -256,7 +256,7 @@
req_files[num_req_files++] = strdup(optarg);
break;
case '?':
- case 'h':
+ case 'h':
usage(argv[0], 0);
break;
case 'i':
@@ -315,12 +315,12 @@
if (!map_field_params(lnstat_files, &fp, interval))
exit(1);
-
+
header = build_hdr_string(lnstat_files, &fp, 80);
if (!header)
exit(1);
- if (interval < 1 )
+ if (interval < 1 )
interval=1;
for (i = 0; i < count; i++) {
diff --git a/misc/lnstat_util.c b/misc/lnstat_util.c
index 59c5e96..9492baf 100644
--- a/misc/lnstat_util.c
+++ b/misc/lnstat_util.c
@@ -49,12 +49,12 @@
num_lines++;
- fgets(buf, sizeof(buf)-1, lf->fp);
+ fgets(buf, sizeof(buf)-1, lf->fp);
gettimeofday(&lf->last_read, NULL);
for (j = 0; j < lf->num_fields; j++) {
unsigned long f = strtoul(ptr, &ptr, 16);
- if (j == 0)
+ if (j == 0)
lf->fields[j].values[i] = f;
else
lf->fields[j].values[i] += f;
@@ -63,8 +63,8 @@
return num_lines;
}
-static int time_after(struct timeval *last,
- struct timeval *tout,
+static int time_after(struct timeval *last,
+ struct timeval *tout,
struct timeval *now)
{
if (now->tv_sec > last->tv_sec + tout->tv_sec)
@@ -98,7 +98,7 @@
}
scan_lines(lf, 1);
- for (i = 0, lfi = &lf->fields[i];
+ for (i = 0, lfi = &lf->fields[i];
i < lf->num_fields; i++, lfi = &lf->fields[i]) {
if (i == 0)
lfi->result = lfi->values[1];
@@ -211,7 +211,7 @@
if (!path)
path = PROC_NET_STAT;
-
+
dir = opendir(path);
if (!dir) {
struct lnstat_file *lf;
@@ -307,7 +307,7 @@
file = NULL;
field = name;
}
-
+
for (lf = lnstat_files; lf; lf = lf->next) {
int i;
diff --git a/misc/nstat.c b/misc/nstat.c
index fc4b03b..228bce2 100644
--- a/misc/nstat.c
+++ b/misc/nstat.c
@@ -373,7 +373,7 @@
struct pollfd p;
p.fd = fd;
p.events = p.revents = POLLIN;
-
+
sprintf(info_source, "%d.%lu sampling_interval=%d time_const=%d",
getpid(), (unsigned long)random(), scan_interval/1000, time_constant/1000);
diff --git a/misc/rtacct.c b/misc/rtacct.c
index 0d8ff7b..e6399d0 100644
--- a/misc/rtacct.c
+++ b/misc/rtacct.c
@@ -168,7 +168,7 @@
"%-10s "
"%-10s "
"\n"
- , "Realm", "BytesTo", "PktsTo", "BytesFrom", "PktsFrom");
+ , "Realm", "BytesTo", "PktsTo", "BytesFrom", "PktsFrom");
fprintf(fp,
"%-10s "
"%-10s "
@@ -176,7 +176,7 @@
"%-10s "
"%-10s "
"\n"
- , "", "BPSTo", "PPSTo", "BPSFrom", "PPSFrom");
+ , "", "BPSTo", "PPSTo", "BPSFrom", "PPSFrom");
}
@@ -207,10 +207,10 @@
fprintf(fp, "%-10s", rtnl_rtrealm_n2a(realm, b1, sizeof(b1)));
for (i = 0; i < 4; i++)
- format_count(fp, val[i]);
+ format_count(fp, val[i]);
fprintf(fp, "\n%-10s", "");
for (i = 0; i < 4; i++)
- format_rate(fp, rate[i]);
+ format_rate(fp, rate[i]);
fprintf(fp, "\n");
}
}
@@ -230,7 +230,7 @@
"%-10s "
"%-10s "
"\n"
- , "Realm", "BytesTo", "PktsTo", "BytesFrom", "PktsFrom");
+ , "Realm", "BytesTo", "PktsTo", "BytesFrom", "PktsFrom");
fprintf(fp,
"%-10s "
"%-10s "
@@ -238,7 +238,7 @@
"%-10s "
"%-10s "
"\n"
- , "", "BPSTo", "PPSTo", "BPSFrom", "PPSFrom");
+ , "", "BPSTo", "PPSTo", "BPSFrom", "PPSFrom");
}
for (realm=0; realm<256; realm++) {
@@ -282,10 +282,10 @@
fprintf(fp, "%-10s", rtnl_rtrealm_n2a(realm, b1, sizeof(b1)));
for (i = 0; i < 4; i++)
- format_count(fp, rval[i]);
+ format_count(fp, rval[i]);
fprintf(fp, "\n%-10s", "");
for (i = 0; i < 4; i++)
- format_rate(fp, rate[i]);
+ format_rate(fp, rate[i]);
fprintf(fp, "\n");
}
}
@@ -297,7 +297,7 @@
{
}
-/* Server side only: read kernel data, update tables, calculate rates. */
+/* Server side only: read kernel data, update tables, calculate rates. */
void update_db(int interval)
{
@@ -368,9 +368,9 @@
p.fd = fd;
p.events = p.revents = POLLIN;
- sprintf(kern_db->signature,
+ sprintf(kern_db->signature,
"%u.%lu sampling_interval=%d time_const=%d",
- (unsigned) getpid(), (unsigned long)random(),
+ (unsigned) getpid(), (unsigned long)random(),
scan_interval/1000, time_constant/1000);
pad_kern_table(kern_db, read_kern_table(kern_db->ival));
diff --git a/misc/ss.c b/misc/ss.c
index f902560..ec272f4 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -296,7 +296,7 @@
struct slabstat slabstat;
-static const char *slabstat_ids[] =
+static const char *slabstat_ids[] =
{
"sock",
"tcp_bind_bucket",
@@ -480,7 +480,7 @@
if (!ip_local_port_min) {
FILE *f = fdopen(ephemeral_ports_open(), "r");
if (f) {
- fscanf(f, "%d %d",
+ fscanf(f, "%d %d",
&ip_local_port_min, &ip_local_port_max);
fclose(f);
} else {
@@ -508,7 +508,7 @@
if (!notfirst) {
setservent(1);
notfirst = 1;
- }
+ }
se = getservbyport(htons(port), dg_proto);
if (se)
return se->s_name;
@@ -537,7 +537,7 @@
const char *res;
int hash = (port^(((unsigned long)dg_proto)>>2))&255;
- for (c = &cache[hash]; c; c = c->next) {
+ for (c = &cache[hash]; c; c = c->next) {
if (c->port == port &&
c->proto == dg_proto) {
if (c->name)
@@ -647,7 +647,7 @@
char *p;
memcpy(&p, s->local.data, sizeof(p));
return p == NULL || (p[0] == '@' && strlen(p) == 6 &&
- strspn(p+1, "0123456789abcdef") == 5);
+ strspn(p+1, "0123456789abcdef") == 5);
}
if (s->local.family == AF_PACKET)
return s->lport == 0 && s->local.data == 0;
@@ -690,7 +690,7 @@
do {
if (!inet2_addr_match(&s->local, &a->addr, a->addr.bitlen))
return 1;
- } while ((a = a->next) != NULL);
+ } while ((a = a->next) != NULL);
return 0;
}
return 1;
@@ -728,7 +728,7 @@
}
}
-/* Relocate external jumps by reloc. */
+/* Relocate external jumps by reloc. */
static void ssfilter_patch(char *a, int len, int reloc)
{
while (len > 0) {
@@ -868,7 +868,7 @@
static int remember_he(struct aafilter *a, struct hostent *he)
{
- char **ptr = he->h_addr_list;
+ char **ptr = he->h_addr_list;
int cnt = 0;
int len;
@@ -1110,28 +1110,28 @@
char opt[256];
int n;
char *p;
-
+
if ((p = strchr(line, ':')) == NULL)
return -1;
loc = p+2;
-
+
if ((p = strchr(loc, ':')) == NULL)
return -1;
p[5] = 0;
rem = p+6;
-
+
if ((p = strchr(rem, ':')) == NULL)
return -1;
p[5] = 0;
data = p+6;
-
+
do {
int state = (data[1] >= 'A') ? (data[1] - 'A' + 10) : (data[1] - '0');
if (!(f->states & (1<<state)))
return 0;
} while (0);
-
+
s.local.family = s.remote.family = family;
if (family == AF_INET) {
sscanf(loc, "%x:%x", s.local.data, (unsigned*)&s.lport);
@@ -1152,37 +1152,37 @@
&s.rport);
s.local.bytelen = s.remote.bytelen = 16;
}
-
+
if (f->f && run_ssfilter(f->f, &s) == 0)
return 0;
-
+
opt[0] = 0;
n = sscanf(data, "%x %x:%x %x:%x %x %d %d %d %d %llx %d %d %d %d %d %[^\n]\n",
&s.state, &s.wq, &s.rq,
&s.timer, &s.timeout, &s.retrs, &s.uid, &s.probes, &s.ino,
&s.refcnt, &s.sk, &s.rto, &s.ato, &s.qack,
&s.cwnd, &s.ssthresh, opt);
-
+
if (n < 17)
opt[0] = 0;
-
+
if (n < 12) {
s.rto = 0;
s.cwnd = 2;
s.ssthresh = -1;
s.ato = s.qack = 0;
}
-
+
if (netid_width)
printf("%-*s ", netid_width, "tcp");
if (state_width)
printf("%-*s ", state_width, sstate_name[s.state]);
-
+
printf("%-6d %-6d ", s.rq, s.wq);
-
+
formatted_print(&s.local, s.lport);
formatted_print(&s.remote, s.rport);
-
+
if (show_options) {
if (s.timer) {
if (s.timer > 4)
@@ -1288,10 +1288,10 @@
outerr:
return -1;
}
-
+
static char *sprint_bw(char *buf, double bw)
{
- if (bw > 1000000.)
+ if (bw > 1000000.)
sprintf(buf,"%.1fM", bw / 1000000.);
else if (bw > 1000.)
sprintf(buf,"%.1fK", bw / 1000.);
@@ -1344,7 +1344,7 @@
if (tb[INET_DIAG_CONG])
printf("%s", (char *) RTA_DATA(tb[INET_DIAG_CONG]));
- if (info->tcpi_options & TCPI_OPT_WSCALE)
+ if (info->tcpi_options & TCPI_OPT_WSCALE)
printf(" wscale:%d,%d", info->tcpi_snd_wscale,
info->tcpi_rcv_wscale);
if (info->tcpi_rto && info->tcpi_rto != 3000000)
@@ -1364,7 +1364,7 @@
const struct tcpvegas_info *vinfo
= RTA_DATA(tb[INET_DIAG_VEGASINFO]);
- if (vinfo->tcpv_enabled &&
+ if (vinfo->tcpv_enabled &&
vinfo->tcpv_rtt && vinfo->tcpv_rtt != 0x7fffffff)
rtt = vinfo->tcpv_rtt;
}
@@ -1477,7 +1477,7 @@
req.r.idiag_family = AF_INET;
req.r.idiag_states = f->states;
if (show_mem)
- req.r.idiag_ext |= (1<<(INET_DIAG_MEMINFO-1));
+ req.r.idiag_ext |= (1<<(INET_DIAG_MEMINFO-1));
if (show_tcpinfo) {
req.r.idiag_ext |= (1<<(INET_DIAG_INFO-1));
@@ -1485,9 +1485,9 @@
req.r.idiag_ext |= (1<<(INET_DIAG_CONG-1));
}
- iov[0] = (struct iovec){
- .iov_base = &req,
- .iov_len = sizeof(req)
+ iov[0] = (struct iovec){
+ .iov_base = &req,
+ .iov_len = sizeof(req)
};
if (f->f) {
bclen = ssfilter_bytecompile(f->f, &bc);
@@ -1499,18 +1499,18 @@
}
msg = (struct msghdr) {
- .msg_name = (void*)&nladdr,
+ .msg_name = (void*)&nladdr,
.msg_namelen = sizeof(nladdr),
- .msg_iov = iov,
+ .msg_iov = iov,
.msg_iovlen = f->f ? 3 : 1,
};
if (sendmsg(fd, &msg, 0) < 0)
return -1;
- iov[0] = (struct iovec){
- .iov_base = buf,
- .iov_len = sizeof(buf)
+ iov[0] = (struct iovec){
+ .iov_base = buf,
+ .iov_len = sizeof(buf)
};
while (1) {
@@ -1938,13 +1938,13 @@
if (strcmp(peer, "*") == 0)
memset(tst.remote.data, 0, sizeof(peer));
else
- memcpy(tst.remote.data, &peer, sizeof(peer));
+ memcpy(tst.remote.data, &peer, sizeof(peer));
if (run_ssfilter(f->f, &tst) == 0)
continue;
}
if (netid_width)
- printf("%-*s ", netid_width,
+ printf("%-*s ", netid_width,
s->type == SOCK_STREAM ? "u_str" : "u_dgr");
if (state_width)
printf("%-*s ", state_width, sstate_name[s->state]);
@@ -1974,7 +1974,7 @@
return -1;
fgets(buf, sizeof(buf)-1, fp);
- if (memcmp(buf, "Peer", 4) == 0)
+ if (memcmp(buf, "Peer", 4) == 0)
newformat = 1;
cnt = 0;
@@ -2085,7 +2085,7 @@
}
if (netid_width)
- printf("%-*s ", netid_width,
+ printf("%-*s ", netid_width,
type == SOCK_RAW ? "p_raw" : "p_dgr");
if (state_width)
printf("%-*s ", state_width, "UNCONN");
@@ -2094,7 +2094,7 @@
printf("%*s:", addr_width, "*");
} else {
char tb[16];
- printf("%*s:", addr_width,
+ printf("%*s:", addr_width,
ll_proto_n2a(htons(prot), tb, sizeof(tb)));
}
if (iface == 0) {
@@ -2153,7 +2153,7 @@
}
if (netid_width)
- printf("%-*s ", netid_width, "nl");
+ printf("%-*s ", netid_width, "nl");
if (state_width)
printf("%-*s ", state_width, "UNCONN");
printf("%-6d %-6d ", rq, wq);
@@ -2179,7 +2179,7 @@
getenv("PROC_ROOT") ? : "/proc", pid);
if ((fp = fopen(procname, "r")) != NULL) {
if (fscanf(fp, "%*d (%[^)])", procname) == 1) {
- sprintf(procname+strlen(procname), "/%d", pid);
+ sprintf(procname+strlen(procname), "/%d", pid);
printf("%-*s ", serv_width, procname);
done = 1;
}
@@ -2353,7 +2353,7 @@
printf("RAW %-9d %-9d %-9d\n", s.raw4+s.raw6, s.raw4, s.raw6);
printf("UDP %-9d %-9d %-9d\n", s.udp4+s.udp6, s.udp4, s.udp6);
printf("TCP %-9d %-9d %-9d\n", s.tcp4_hashed+s.tcp6_hashed, s.tcp4_hashed, s.tcp6_hashed);
- printf("INET %-9d %-9d %-9d\n",
+ printf("INET %-9d %-9d %-9d\n",
s.raw4+s.udp4+s.tcp4_hashed+
s.raw6+s.udp6+s.tcp6_hashed,
s.raw4+s.udp4+s.tcp4_hashed,
@@ -2459,7 +2459,7 @@
{ "version", 0, 0, 'V' },
{ "help", 0, 0, 'h' },
{ 0 }
-
+
};
int main(int argc, char *argv[])
@@ -2565,7 +2565,7 @@
p = p1 = optarg;
do {
if ((p1 = strchr(p, ',')) != NULL)
- *p1 = 0;
+ *p1 = 0;
if (strcmp(p, "all") == 0) {
current_filter.dbs = ALL_DB;
} else if (strcmp(p, "inet") == 0) {
@@ -2788,7 +2788,7 @@
if (addrp_width < 15+serv_width+1)
addrp_width = 15+serv_width+1;
- addr_width = addrp_width - serv_width - 1;
+ addr_width = addrp_width - serv_width - 1;
if (netid_width)
printf("%-*s ", netid_width, "Netid");
diff --git a/misc/ssfilter.y b/misc/ssfilter.y
index 8be5368..2e9d962 100644
--- a/misc/ssfilter.y
+++ b/misc/ssfilter.y
@@ -55,7 +55,7 @@
$$ = alloc_node(SSF_DCOND, $2);
}
| SCOND HOSTCOND
- {
+ {
$$ = alloc_node(SSF_SCOND, $2);
}
| DPORT GEQ HOSTCOND
diff --git a/tc/em_cmp.c b/tc/em_cmp.c
index c636c53..b8f9b46 100644
--- a/tc/em_cmp.c
+++ b/tc/em_cmp.c
@@ -63,7 +63,7 @@
align = TCF_EM_ALIGN_U32;
else
return PARSE_ERR(args, "cmp: invalid alignment");
-
+
for (a = bstr_next(args); a; a = bstr_next(a)) {
if (!bstrcmp(a, "at")) {
if (a->next == NULL)
@@ -111,7 +111,7 @@
opnd = TCF_EM_OPND_GT;
else if (!bstrcmp(a, "lt"))
opnd = TCF_EM_OPND_LT;
-
+
if (a->next == NULL)
return PARSE_ERR(a, "cmp: missing argument");
a = bstr_next(a);
diff --git a/tc/em_meta.c b/tc/em_meta.c
index bd1e151..5fc0c59 100644
--- a/tc/em_meta.c
+++ b/tc/em_meta.c
@@ -131,7 +131,7 @@
if (!bstrcmp(kind, meta_table[i].kind) &&
meta_table[i].id != 0)
return &meta_table[i];
-
+
return NULL;
}
@@ -142,7 +142,7 @@
for (i = 0; i < (sizeof(meta_table)/sizeof(meta_table[0])); i++)
if (meta_table[i].id == id)
return &meta_table[i];
-
+
return NULL;
}
@@ -171,12 +171,12 @@
{
char *p;
struct meta_entry *entry;
-
+
entry = lookup_meta_entry_byid(TCF_META_ID(what->kind));
if (entry == NULL)
return 0;
-
+
for (p = entry->mask; p; p++)
if (map_type(*p) == TCF_META_TYPE(needed->kind))
return 1;
@@ -244,7 +244,7 @@
{
return (TCF_META_TYPE(dst->kind) << 12) | TCF_META_ID(src->kind);
}
-
+
static inline struct bstr *
parse_object(struct bstr *args, struct bstr *arg, struct tcf_meta_val *obj,
@@ -280,7 +280,7 @@
if (left) {
struct tcf_meta_val *right = obj;
-
+
if (TCF_META_TYPE(right->kind) == TCF_META_TYPE(left->kind))
goto compatible;
@@ -301,7 +301,7 @@
right->kind = overwrite_type(right, left);
else
goto not_compatible;
- } else
+ } else
goto not_compatible;
}
@@ -318,7 +318,7 @@
return PARSE_FAILURE;
}
a = bstr_next(a);
-
+
shift = bstrtoul(a);
if (shift == LONG_MAX) {
PARSE_ERR(a, "meta: invalid shift, must " \
@@ -336,7 +336,7 @@
return PARSE_FAILURE;
}
a = bstr_next(a);
-
+
mask = bstrtoul(a);
if (mask == LONG_MAX) {
PARSE_ERR(a, "meta: invalid mask, must be " \
@@ -400,7 +400,7 @@
return -1;
else if (a != NULL)
return PARSE_ERR(a, "meta: unexpected trailer");
-
+
addraw_l(n, MAX_MSG, hdr, sizeof(*hdr));
diff --git a/tc/em_nbyte.c b/tc/em_nbyte.c
index e0ed5ba..98f9883 100644
--- a/tc/em_nbyte.c
+++ b/tc/em_nbyte.c
@@ -92,7 +92,7 @@
if (offset_present == 0)
return PARSE_ERR(a, "nbyte: offset required");
-
+
nb.len = needle->len;
nb.layer = (__u8) layer;
nb.off = (__u16) offset;
@@ -131,7 +131,7 @@
for (i = 0; i < nb->len; i++)
fprintf(fd, "%c", isprint(needle[i]) ? needle[i] : '.');
fprintf(fd, "\" at %d layer %d", nb->off, nb->layer);
-
+
return 0;
}
diff --git a/tc/em_u32.c b/tc/em_u32.c
index b8857f1..402bea0 100644
--- a/tc/em_u32.c
+++ b/tc/em_u32.c
@@ -96,7 +96,7 @@
offset = bstrtoul(a);
} else
offset = bstrtoul(a);
-
+
if (offset == ULONG_MAX)
return PARSE_ERR(a, "u32: invalid offset");
diff --git a/tc/emp_ematch.l b/tc/emp_ematch.l
index 09d535d..0184753 100644
--- a/tc/emp_ematch.l
+++ b/tc/emp_ematch.l
@@ -77,7 +77,7 @@
return ERROR;
}
strbuf_index = 0;
-
+
BEGIN(str);
}
@@ -90,7 +90,7 @@
<str>\\[0-7]{1,3} { /* octal escape sequence */
int res;
-
+
sscanf(yytext + 1, "%o", &res);
if (res > 0xFF) {
fprintf(stderr, "error: octal escape sequence" \
@@ -107,9 +107,9 @@
<str>\\x[0-9a-fA-F]{1,2} {
int res;
-
+
sscanf(yytext + 2, "%x", &res);
-
+
if (res > 0xFF) {
fprintf(stderr, "error: hexadecimal escape " \
"sequence out of range\n");
diff --git a/tc/f_basic.c b/tc/f_basic.c
index 264f358..19a7edf 100644
--- a/tc/f_basic.c
+++ b/tc/f_basic.c
@@ -52,7 +52,7 @@
return -1;
}
}
-
+
t->tcm_handle = h;
tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
diff --git a/tc/f_fw.c b/tc/f_fw.c
index 5a56098..046f614 100644
--- a/tc/f_fw.c
+++ b/tc/f_fw.c
@@ -125,7 +125,7 @@
struct rtattr *idev = tb[TCA_FW_INDEV];
fprintf(f, "input dev %s ",(char *)RTA_DATA(idev));
}
-
+
if (tb[TCA_FW_ACT]) {
fprintf(f, "\n");
tc_print_action(f, tb[TCA_FW_ACT]);
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 9d527fc..aa83ba0 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -833,7 +833,7 @@
} else if (matches(*argv, "divisor") == 0) {
unsigned divisor;
NEXT_ARG();
- if (get_unsigned(&divisor, *argv, 0) ||
+ if (get_unsigned(&divisor, *argv, 0) ||
divisor == 0 ||
divisor > 0x100 || ((divisor - 1) & divisor)) {
fprintf(stderr, "Illegal \"divisor\"\n");
diff --git a/tc/m_action.c b/tc/m_action.c
index 3808a86..9f24022 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -6,8 +6,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
* TODO:
* - parse to be passed a filedescriptor for logging purposes
*
@@ -65,7 +65,7 @@
static int print_noaopt(struct action_util *au, FILE *f, struct rtattr *opt)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "[Unknown action, optlen=%u] ",
+ fprintf(f, "[Unknown action, optlen=%u] ",
(unsigned) RTA_PAYLOAD(opt));
return 0;
}
@@ -139,7 +139,7 @@
}
int
-new_cmd(char **argv)
+new_cmd(char **argv)
{
if ((matches(*argv, "change") == 0) ||
(matches(*argv, "replace") == 0)||
@@ -203,7 +203,7 @@
goto done;
}
- if (NULL == a) {
+ if (NULL == a) {
goto bad_val;
}
@@ -235,7 +235,7 @@
*argv_p = argv;
return 0;
bad_val:
- /* no need to undo things, returning from here should
+ /* no need to undo things, returning from here should
* cause enough pain */
fprintf(stderr, "parse_action: bad value (%d:%s)!\n",argc,*argv);
return -1;
@@ -337,11 +337,11 @@
if (n->nlmsg_type != RTM_GETACTION)
fprintf(stderr, "print_action: NULL kind\n");
return -1;
- }
+ }
if (n->nlmsg_type == RTM_DELACTION) {
if (n->nlmsg_flags & NLM_F_ROOT) {
- fprintf(fp, "Flushed table ");
+ fprintf(fp, "Flushed table ");
tab_flush = 1;
} else {
fprintf(fp, "deleted action ");
@@ -403,7 +403,7 @@
strncpy(k, *argv, sizeof (k) - 1);
a = get_action_kind(k);
- if (NULL == a) {
+ if (NULL == a) {
fprintf(stderr, "Error: non existent action: %s\n",k);
ret = -1;
goto bad_val;
@@ -536,7 +536,7 @@
}
#endif
a = get_action_kind(k);
- if (NULL == a) {
+ if (NULL == a) {
fprintf(stderr,"bad action %s\n",k);
goto bad_val;
}
@@ -553,7 +553,7 @@
msg_size = NLMSG_ALIGN(req.n.nlmsg_len) - NLMSG_ALIGN(sizeof(struct nlmsghdr));
- if (event == RTM_GETACTION) {
+ if (event == RTM_GETACTION) {
if (rtnl_dump_request(&rth, event, (void *)&req.t, msg_size) < 0) {
perror("Cannot send dump request");
return 1;
@@ -561,7 +561,7 @@
ret = rtnl_dump_filter(&rth, print_action, stdout, NULL, NULL);
}
- if (event == RTM_DELACTION) {
+ if (event == RTM_DELACTION) {
req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len);
req.n.nlmsg_type = RTM_DELACTION;
req.n.nlmsg_flags |= NLM_F_ROOT;
diff --git a/tc/m_ematch.c b/tc/m_ematch.c
index 44c621b..da4f22b 100644
--- a/tc/m_ematch.c
+++ b/tc/m_ematch.c
@@ -45,7 +45,7 @@
"Error: Unable to find ematch \"%s\" in %s\n" \
"Please assign a unique ID to the ematch kind the suggested " \
"entry is:\n" \
- "\t%d\t%s\n",
+ "\t%d\t%s\n",
kind, EMATCH_MAP, num, kind);
}
@@ -66,7 +66,7 @@
p++;
if (*p == '#' || *p == '\n' || *p == 0)
continue;
-
+
if (sscanf(p, "%d %s", &id, namebuf) != 2) {
fprintf(stderr, "ematch map %s corrupted at %s\n",
file, p);
@@ -104,7 +104,7 @@
p++;
if (*p == '#' || *p == '\n' || *p == 0)
continue;
-
+
if (sscanf(p, "%d %s", &id, namebuf) != 2) {
fprintf(stderr, "ematch map %s corrupted at %s\n",
file, p);
@@ -185,7 +185,7 @@
if (t->inverted)
hdr.flags |= TCF_EM_INVERT;
-
+
addattr_l(n, MAX_MSG, index++, NULL, 0);
if (t->child) {
@@ -278,7 +278,7 @@
begin_argv++;
begin_argc--;
}
-
+
fprintf(stderr, "...\n");
if (args) {
@@ -437,7 +437,7 @@
i++;
}
-
+
return 0;
}
diff --git a/tc/m_ematch.h b/tc/m_ematch.h
index ed98446..2b5d293 100644
--- a/tc/m_ematch.h
+++ b/tc/m_ematch.h
@@ -68,7 +68,7 @@
memcpy(buf, b->data, b->len);
buf[b->len] = '\0';
-
+
l = strtol(buf, &inv, 0);
if (l == ULONG_MAX || inv == buf)
return LONG_MAX;
diff --git a/tc/m_estimator.c b/tc/m_estimator.c
index 78eda7a..d931551 100644
--- a/tc/m_estimator.c
+++ b/tc/m_estimator.c
@@ -39,7 +39,7 @@
int argc = *p_argc;
char **argv = *p_argv;
unsigned A, time_const;
-
+
NEXT_ARG();
if (est->ewma_log)
duparg("estimator", *argv);
diff --git a/tc/m_gact.c b/tc/m_gact.c
index cfbaf87..9f07851 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -1,13 +1,13 @@
/*
- * m_gact.c generic actions module
+ * m_gact.c generic actions module
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#include <stdio.h>
@@ -27,7 +27,7 @@
/* define to turn on probablity stuff */
#ifdef CONFIG_GACT_PROB
-static const char *prob_n2a(int p)
+static const char *prob_n2a(int p)
{
if (p == PGACT_NONE)
return "none";
diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index ca39555..e1f68b3 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -1,5 +1,5 @@
/*
- * m_ipt.c iptables based targets
+ * m_ipt.c iptables based targets
* utilities mostly ripped from iptables <duh, its the linux way>
*
* This program is free software; you can distribute it and/or
@@ -7,8 +7,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
* TODO: bad bad hardcoding IPT_LIB_DIR and PROC_SYS_MODPROBE
*
*/
@@ -126,7 +126,7 @@
return buf;
}
-int string_to_number_ll(const char *s, unsigned long long min,
+int string_to_number_ll(const char *s, unsigned long long min,
unsigned long long max,
unsigned long long *ret)
{
@@ -341,7 +341,7 @@
name[IPT_FUNCTION_MAXNAMELEN - 1] = revision;
}
-/*
+/*
* we may need to check for version mismatch
*/
int
@@ -372,7 +372,7 @@
return -1;
}
-static int parse_ipt(struct action_util *a,int *argc_p,
+static int parse_ipt(struct action_util *a,int *argc_p,
char ***argv_p, int tca_id, struct nlmsghdr *n)
{
struct iptables_target *m = NULL;
@@ -503,7 +503,7 @@
argv += optind;
*argc_p = rargc - iargc;
*argv_p = argv;
-
+
optind = 1;
free_opts(opts);
@@ -578,7 +578,7 @@
struct tcf_t *tm = RTA_DATA(tb[TCA_IPT_TM]);
print_tm(f,tm);
}
- }
+ }
fprintf(f, " \n");
}
diff --git a/tc/m_mirred.c b/tc/m_mirred.c
index ed87c81..226df4d 100644
--- a/tc/m_mirred.c
+++ b/tc/m_mirred.c
@@ -1,13 +1,13 @@
/*
- * m_egress.c ingress/egress packet mirror/redir actions module
+ * m_egress.c ingress/egress packet mirror/redir actions module
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
* TODO: Add Ingress support
*
*/
@@ -247,7 +247,7 @@
}
return -1;
-
+
}
int
diff --git a/tc/m_pedit.c b/tc/m_pedit.c
index 5ac84a5..7499846 100644
--- a/tc/m_pedit.c
+++ b/tc/m_pedit.c
@@ -1,18 +1,18 @@
/*
- * m_pedit.c generic packet editor actions module
+ * m_pedit.c generic packet editor actions module
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
- * TODO:
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
+ * TODO:
* 1) Big endian broken in some spots
* 2) A lot of this stuff was added on the fly; get a big double-double
* and clean it up at some point.
- *
+ *
*/
#include <stdio.h>
@@ -37,7 +37,7 @@
{
fprintf(stderr, "Usage: ... pedit munge <MUNGE>\n");
fprintf(stderr,
- "Where: MUNGE := <RAW>|<LAYERED>\n"
+ "Where: MUNGE := <RAW>|<LAYERED>\n"
"\t<RAW>:= <OFFSETC>[ATC]<CMD>\n "
"\t\tOFFSETC:= offset <offval> <u8|u16|u32>\n "
"\t\tATC:= at <atval> offmask <maskval> shift <shiftval>\n "
@@ -58,8 +58,8 @@
exit(-1);
}
-static int
-pedit_parse_nopopt (int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey)
+static int
+pedit_parse_nopopt (int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey)
{
int argc = *argc_p;
char **argv = *argv_p;
@@ -73,7 +73,7 @@
}
-struct m_pedit_util
+struct m_pedit_util
*get_pedit_kind(char *str)
{
static void *pBODY;
@@ -227,7 +227,7 @@
retain <<= stride;
tkey->mask = retain|m[ind];
tkey->off &= ~3;
-
+
if (pedit_debug)
printf("pack_key8: Final word off %d val %08x mask %08x \n",tkey->off , tkey->val,tkey->mask);
return pack_key(sel,tkey);
@@ -293,7 +293,7 @@
} else if (matches(*argv, "preserve") == 0) {
retain = mask = o;
} else {
- if (matches(*argv, "clear") != 0)
+ if (matches(*argv, "clear") != 0)
return -1;
}
@@ -390,7 +390,7 @@
tkey->at = atv;
NEXT_ARG();
-
+
if (get_u32(&offmask, *argv, 16))
return -1;
tkey->offmask = offmask;
@@ -595,7 +595,7 @@
return 0;
}
-int
+int
pedit_print_xstats(struct action_util *au, FILE *f, struct rtattr *xstats)
{
return 0;
diff --git a/tc/m_pedit.h b/tc/m_pedit.h
index 0a6d24e..1698c95 100644
--- a/tc/m_pedit.h
+++ b/tc/m_pedit.h
@@ -1,13 +1,13 @@
/*
- * m_pedit.h generic packet editor actions module
+ * m_pedit.h generic packet editor actions module
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#ifndef _ACT_PEDIT_H_
diff --git a/tc/m_police.c b/tc/m_police.c
index 7b80367..93f317c 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -7,8 +7,8 @@
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
- * FIXES: 19990619 - J Hadi Salim (hadi@cyberus.ca)
- * simple addattr packaging fix.
+ * FIXES: 19990619 - J Hadi Salim (hadi@cyberus.ca)
+ * simple addattr packaging fix.
* 2002: J Hadi Salim - Add tc action extensions syntax
*
*/
@@ -37,8 +37,8 @@
fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
fprintf(stderr, " [ peakrate BPS ] [ avrate BPS ]\n");
fprintf(stderr, " [ ACTIONTERM ]\n");
- fprintf(stderr, "Old Syntax ACTIONTERM := action <EXCEEDACT>[/NOTEXCEEDACT] \n");
- fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT] \n");
+ fprintf(stderr, "Old Syntax ACTIONTERM := action <EXCEEDACT>[/NOTEXCEEDACT] \n");
+ fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT] \n");
fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n");
fprintf(stderr, "Where: pipe is only valid for new syntax \n");
exit(-1);
@@ -133,7 +133,7 @@
__u32 avrate = 0;
int presult = 0;
unsigned buffer=0, mtu=0, mpu=0;
- int Rcell_log=-1, Pcell_log = -1;
+ int Rcell_log=-1, Pcell_log = -1;
struct rtattr *tail;
memset(&p, 0, sizeof(p));
@@ -304,7 +304,7 @@
return act_parse_police(NULL,argc_p,argv_p,tca_id,n);
}
-int
+int
print_police(struct action_util *a, FILE *f, struct rtattr *arg)
{
SPRINT_BUF(b1);
@@ -350,7 +350,7 @@
return 0;
}
-int
+int
tc_print_police(FILE *f, struct rtattr *arg) {
return print_police(&police_action_util,f,arg);
}
diff --git a/tc/p_icmp.c b/tc/p_icmp.c
index f9ddbe3..a4b80c2 100644
--- a/tc/p_icmp.c
+++ b/tc/p_icmp.c
@@ -6,8 +6,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#include <stdio.h>
diff --git a/tc/p_ip.c b/tc/p_ip.c
index 1b2a440..08fdbaa 100644
--- a/tc/p_ip.c
+++ b/tc/p_ip.c
@@ -1,13 +1,13 @@
/*
- * m_pedit.c packet editor: IPV4/6 header
+ * m_pedit.c packet editor: IPV4/6 header
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#include <stdio.h>
diff --git a/tc/p_tcp.c b/tc/p_tcp.c
index aab37a6..7f4b6f4 100644
--- a/tc/p_tcp.c
+++ b/tc/p_tcp.c
@@ -6,8 +6,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#include <stdio.h>
diff --git a/tc/p_udp.c b/tc/p_udp.c
index 95ed993..1776289 100644
--- a/tc/p_udp.c
+++ b/tc/p_udp.c
@@ -6,8 +6,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim (hadi@cyberus.ca)
- *
+ * Authors: J Hadi Salim (hadi@cyberus.ca)
+ *
*/
#include <stdio.h>
diff --git a/tc/q_cbq.c b/tc/q_cbq.c
index a456eda..bc7e8ba 100644
--- a/tc/q_cbq.c
+++ b/tc/q_cbq.c
@@ -53,7 +53,7 @@
struct tc_cbq_lssopt lss;
__u32 rtab[256];
unsigned mpu=0, avpkt=0, allot=0;
- int cell_log=-1;
+ int cell_log=-1;
int ewma_log=-1;
struct rtattr *tail;
@@ -176,7 +176,7 @@
struct tc_cbq_ovl ovl;
__u32 rtab[256];
unsigned mpu=0;
- int cell_log=-1;
+ int cell_log=-1;
int ewma_log=-1;
unsigned bndw = 0;
unsigned minburst=0, maxburst=0;
@@ -451,7 +451,7 @@
if (tb[TCA_CBQ_OVL_STRATEGY]) {
if (RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]) < sizeof(*ovl))
fprintf(stderr, "CBQ: too short overlimit strategy %u/%u\n",
- (unsigned) RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]),
+ (unsigned) RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]),
(unsigned) sizeof(*ovl));
else
ovl = RTA_DATA(tb[TCA_CBQ_OVL_STRATEGY]);
diff --git a/tc/q_gred.c b/tc/q_gred.c
index 0526c75..4aaa29b 100644
--- a/tc/q_gred.c
+++ b/tc/q_gred.c
@@ -6,9 +6,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Authors: J Hadi Salim(hadi@nortelnetworks.com)
- * code ruthlessly ripped from
- * Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: J Hadi Salim(hadi@nortelnetworks.com)
+ * code ruthlessly ripped from
+ * Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
*/
@@ -140,7 +140,7 @@
return -1;
}
return init_gred(qu,argc-1, argv+1,n);
-
+
} else if (strcmp(*argv, "min") == 0) {
NEXT_ARG();
if (get_size(&opt.qth_min, *argv)) {
@@ -276,7 +276,7 @@
fprintf(f,"\n GRED received message smaller than expected\n");
return -1;
}
-
+
/* Bad hack! should really return a proper message as shown above*/
for (i=0;i<MAX_DPs;i++, qopt++) {
diff --git a/tc/q_hfsc.c b/tc/q_hfsc.c
index f09c606..4e8c09b 100644
--- a/tc/q_hfsc.c
+++ b/tc/q_hfsc.c
@@ -260,7 +260,7 @@
usc = RTA_DATA(tb[TCA_HFSC_USC]);
}
-
+
if (rsc != NULL && fsc != NULL &&
memcmp(rsc, fsc, sizeof(*rsc)) == 0)
hfsc_print_sc(f, "sc", rsc);
@@ -275,7 +275,7 @@
return 0;
}
-
+
struct qdisc_util hfsc_qdisc_util = {
.id = "hfsc",
.parse_qopt = hfsc_parse_opt,
diff --git a/tc/q_htb.c b/tc/q_htb.c
index 828d4b1..d5f85c3 100644
--- a/tc/q_htb.c
+++ b/tc/q_htb.c
@@ -216,7 +216,7 @@
}
opt.buffer = tc_calc_xmittime(opt.rate.rate, buffer);
opt.rate.cell_log = cell_log;
-
+
if ((ccell_log = tc_calc_rtable(opt.ceil.rate, ctab, cell_log, mtu, mpu)) < 0) {
fprintf(stderr, "htb: failed to calculate ceil rate table.\n");
return -1;
@@ -279,14 +279,14 @@
fprintf(f, "cburst %s ", sprint_size(cbuffer, b1));
}
if (show_raw)
- fprintf(f, "buffer [%08x] cbuffer [%08x] ",
+ fprintf(f, "buffer [%08x] cbuffer [%08x] ",
hopt->buffer,hopt->cbuffer);
}
if (tb[TCA_HTB_INIT]) {
gopt = RTA_DATA(tb[TCA_HTB_INIT]);
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
- fprintf(f, "r2q %d default %x direct_packets_stat %u",
+ fprintf(f, "r2q %d default %x direct_packets_stat %u",
gopt->rate2quantum,gopt->defcls,gopt->direct_pkts);
if (show_details)
fprintf(f," ver %d.%d",gopt->version >> 16,gopt->version & 0xffff);
@@ -304,7 +304,7 @@
return -1;
st = RTA_DATA(xstats);
- fprintf(f, " lended: %u borrowed: %u giants: %u\n",
+ fprintf(f, " lended: %u borrowed: %u giants: %u\n",
st->lends,st->borrows,st->giants);
fprintf(f, " tokens: %d ctokens: %d\n", st->tokens,st->ctokens);
return 0;
diff --git a/tc/q_netem.c b/tc/q_netem.c
index 7fbc771..a3ae71c 100644
--- a/tc/q_netem.c
+++ b/tc/q_netem.c
@@ -27,7 +27,7 @@
static void explain(void)
{
- fprintf(stderr,
+ fprintf(stderr,
"Usage: ... netem [ limit PACKETS ] \n" \
" [ delay TIME [ JITTER [CORRELATION]]]\n" \
" [ distribution {uniform|normal|pareto|paretonormal} ]\n" \
@@ -62,11 +62,11 @@
snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type);
if ((f = fopen(name, "r")) == NULL) {
- fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+ fprintf(stderr, "No distribution data for %s (%s: %s)\n",
type, name, strerror(errno));
return -1;
}
-
+
n = 0;
while (getline(&line, &len, f) != -1) {
char *p, *endp;
@@ -75,7 +75,7 @@
for (p = line; ; p = endp) {
x = strtol(p, &endp, 0);
- if (endp == p)
+ if (endp == p)
break;
if (n >= MAXDIST) {
@@ -93,7 +93,7 @@
return n;
}
-static int isnumber(const char *arg)
+static int isnumber(const char *arg)
{
char *p;
(void) strtod(arg, &p);
@@ -102,7 +102,7 @@
#define NEXT_IS_NUMBER() (NEXT_ARG_OK() && isnumber(argv[1]))
-/* Adjust for the fact that psched_ticks aren't always usecs
+/* Adjust for the fact that psched_ticks aren't always usecs
(based on kernel PSCHED_CLOCK configuration */
static int get_ticks(__u32 *ticks, const char *str)
{
@@ -110,7 +110,7 @@
if(get_usecs(&t, str))
return -1;
-
+
if (tc_core_usec2big(t)) {
fprintf(stderr, "Illegal %d usecs (too large)\n", t);
return -1;
@@ -126,7 +126,7 @@
}
-static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
+static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
struct nlmsghdr *n)
{
size_t dist_size = 0;
@@ -167,7 +167,7 @@
if (NEXT_IS_NUMBER()) {
NEXT_ARG();
- if (get_percent(&cor.delay_corr,
+ if (get_percent(&cor.delay_corr,
*argv)) {
explain1("latency");
return -1;
@@ -317,7 +317,7 @@
struct rtattr *tb[TCA_NETEM_MAX+1];
parse_rtattr(tb, TCA_NETEM_MAX, RTA_DATA(opt) + sizeof(qopt),
len);
-
+
if (tb[TCA_NETEM_CORR]) {
if (RTA_PAYLOAD(tb[TCA_NETEM_CORR]) < sizeof(*cor))
return -1;
@@ -359,20 +359,20 @@
if (cor && cor->dup_corr)
fprintf(f, " %s", sprint_percent(cor->dup_corr, b1));
}
-
+
if (reorder && reorder->probability) {
- fprintf(f, " reorder %s",
+ fprintf(f, " reorder %s",
sprint_percent(reorder->probability, b1));
if (reorder->correlation)
- fprintf(f, " %s",
+ fprintf(f, " %s",
sprint_percent(reorder->correlation, b1));
}
if (corrupt && corrupt->probability) {
- fprintf(f, " corrupt %s",
+ fprintf(f, " corrupt %s",
sprint_percent(corrupt->probability, b1));
if (corrupt->correlation)
- fprintf(f, " %s",
+ fprintf(f, " %s",
sprint_percent(corrupt->correlation, b1));
}
diff --git a/tc/q_red.c b/tc/q_red.c
index 1743f6c..6f93b26 100644
--- a/tc/q_red.c
+++ b/tc/q_red.c
@@ -205,7 +205,7 @@
fprintf(f, " marked %u early %u pdrop %u other %u",
st->marked, st->early, st->pdrop, st->other);
return 0;
-
+
#endif
return 0;
}
diff --git a/tc/q_tbf.c b/tc/q_tbf.c
index 6ed5e0b..b8251cb 100644
--- a/tc/q_tbf.c
+++ b/tc/q_tbf.c
@@ -44,7 +44,7 @@
__u32 rtab[256];
__u32 ptab[256];
unsigned buffer=0, mtu=0, mpu=0, latency=0;
- int Rcell_log=-1, Pcell_log = -1;
+ int Rcell_log=-1, Pcell_log = -1;
struct rtattr *tail;
memset(&opt, 0, sizeof(opt));
diff --git a/tc/tc.c b/tc/tc.c
index 789f6f6..6672e18 100644
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -42,11 +42,11 @@
static struct qdisc_util * qdisc_list;
static struct filter_util * filter_list;
-static int print_noqopt(struct qdisc_util *qu, FILE *f,
+static int print_noqopt(struct qdisc_util *qu, FILE *f,
struct rtattr *opt)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "[Unknown qdisc, optlen=%u] ",
+ fprintf(f, "[Unknown qdisc, optlen=%u] ",
(unsigned) RTA_PAYLOAD(opt));
return 0;
}
@@ -63,7 +63,7 @@
static int print_nofopt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 fhandle)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "fh %08x [Unknown filter, optlen=%u] ",
+ fprintf(f, "fh %08x [Unknown filter, optlen=%u] ",
fhandle, (unsigned) RTA_PAYLOAD(opt));
else if (fhandle)
fprintf(f, "fh %08x ", fhandle);
@@ -206,8 +206,8 @@
usage();
return 0;
}
-
- fprintf(stderr, "Object \"%s\" is unknown, try \"tc help\".\n",
+
+ fprintf(stderr, "Object \"%s\" is unknown, try \"tc help\".\n",
*argv);
return -1;
}
diff --git a/tc/tc_class.c b/tc/tc_class.c
index 049584e..fb0b6b2 100644
--- a/tc/tc_class.c
+++ b/tc/tc_class.c
@@ -147,7 +147,7 @@
int filter_ifindex;
__u32 filter_qdisc;
-int print_class(const struct sockaddr_nl *who,
+int print_class(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg)
{
FILE *fp = (FILE*)arg;
@@ -213,7 +213,7 @@
fprintf(fp, "\n");
if (show_stats) {
struct rtattr *xstats = NULL;
-
+
if (tb[TCA_STATS] || tb[TCA_STATS2]) {
print_tcstats_attr(fp, tb, " ", &xstats);
fprintf(fp, "\n");
diff --git a/tc/tc_filter.c b/tc/tc_filter.c
index 3341b13..3e102cd 100644
--- a/tc/tc_filter.c
+++ b/tc/tc_filter.c
@@ -177,7 +177,7 @@
static __u32 filter_protocol;
int print_filter(const struct sockaddr_nl *who,
- struct nlmsghdr *n,
+ struct nlmsghdr *n,
void *arg)
{
FILE *fp = (FILE*)arg;
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 76c78f2..0b16923 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -154,7 +154,7 @@
req.t.tcm_ifindex = idx;
}
- if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0)
+ if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0)
return 2;
return 0;
@@ -162,8 +162,8 @@
static int filter_ifindex;
-int print_qdisc(const struct sockaddr_nl *who,
- struct nlmsghdr *n,
+int print_qdisc(const struct sockaddr_nl *who,
+ struct nlmsghdr *n,
void *arg)
{
FILE *fp = (FILE*)arg;
@@ -209,13 +209,13 @@
if (t->tcm_info != 1) {
fprintf(fp, "refcnt %d ", t->tcm_info);
}
- /* pfifo_fast is generic enough to warrant the hardcoding --JHS */
-
+ /* pfifo_fast is generic enough to warrant the hardcoding --JHS */
+
if (0 == strcmp("pfifo_fast", RTA_DATA(tb[TCA_KIND])))
q = get_qdisc_kind("prio");
else
q = get_qdisc_kind(RTA_DATA(tb[TCA_KIND]));
-
+
if (tb[TCA_OPTIONS]) {
if (q)
q->print_qopt(q, fp, tb[TCA_OPTIONS]);
@@ -249,7 +249,7 @@
memset(&t, 0, sizeof(t));
t.tcm_family = AF_UNSPEC;
memset(&d, 0, sizeof(d));
-
+
while (argc > 0) {
if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
diff --git a/tc/tc_util.c b/tc/tc_util.c
index 9cde144..8cdb9a1 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -450,7 +450,7 @@
fprintf(fp, " (dropped %u, overlimits %u requeues %u) ",
q.drops, q.overlimits, q.requeues);
}
-
+
if (tbs[TCA_STATS_RATE_EST]) {
struct gnet_stats_rate_est re = {0};
memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST]), sizeof(re)));
@@ -490,7 +490,7 @@
memcpy(&st, RTA_DATA(tb[TCA_STATS]), MIN(RTA_PAYLOAD(tb[TCA_STATS]), sizeof(st)));
fprintf(fp, "%sSent %llu bytes %u pkts (dropped %u, overlimits %u) ",
- prefix, (unsigned long long)st.bytes, st.packets, st.drops,
+ prefix, (unsigned long long)st.bytes, st.packets, st.drops,
st.overlimits);
if (st.bps || st.pps || st.qlen || st.backlog) {
diff --git a/tc/tc_util.h b/tc/tc_util.h
index 1aa1bda..0778693 100644
--- a/tc/tc_util.h
+++ b/tc/tc_util.h
@@ -23,7 +23,7 @@
{
struct filter_util *next;
char id[16];
- int (*parse_fopt)(struct filter_util *qu, char *fhandle, int argc,
+ int (*parse_fopt)(struct filter_util *qu, char *fhandle, int argc,
char **argv, struct nlmsghdr *n);
int (*print_fopt)(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 fhandle);
};
@@ -32,7 +32,7 @@
{
struct action_util *next;
char id[16];
- int (*parse_aopt)(struct action_util *a, int *argc, char ***argv,
+ int (*parse_aopt)(struct action_util *a, int *argc, char ***argv,
int code, struct nlmsghdr *n);
int (*print_aopt)(struct action_util *au, FILE *f, struct rtattr *opt);
int (*print_xstats)(struct action_util *au, FILE *f, struct rtattr *xstats);
@@ -72,9 +72,9 @@
extern char *action_n2a(int action, char *buf, int len);
extern int action_a2n(char *arg, int *result);
extern int act_parse_police(struct action_util *a,int *, char ***, int, struct nlmsghdr *);
-extern int print_police(struct action_util *a, FILE *f,
+extern int print_police(struct action_util *a, FILE *f,
struct rtattr *tb);
-extern int police_print_xstats(struct action_util *a,FILE *f,
+extern int police_print_xstats(struct action_util *a,FILE *f,
struct rtattr *tb);
extern int tc_print_action(FILE *f, const struct rtattr *tb);
extern int tc_print_ipt(FILE *f, const struct rtattr *tb);