summaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/Makefile2
-rw-r--r--networking/libiproute/Makefile.in2
-rw-r--r--networking/libiproute/ip_parse_common_args.c2
-rw-r--r--networking/libiproute/ipaddress.c8
-rw-r--r--networking/libiproute/iplink.c30
-rw-r--r--networking/libiproute/iproute.c8
-rw-r--r--networking/libiproute/iptunnel.c6
-rw-r--r--networking/libiproute/libnetlink.c4
-rw-r--r--networking/libiproute/linux/pkt_sched.h20
-rw-r--r--networking/libiproute/ll_proto.c72
-rw-r--r--networking/libiproute/utils.h2
11 files changed, 78 insertions, 78 deletions
diff --git a/networking/libiproute/Makefile b/networking/libiproute/Makefile
index c1f18be..0dc7191 100644
--- a/networking/libiproute/Makefile
+++ b/networking/libiproute/Makefile
@@ -1,6 +1,6 @@
# Makefile for busybox
#
-# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# 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
diff --git a/networking/libiproute/Makefile.in b/networking/libiproute/Makefile.in
index f39eeb3..d6f9504 100644
--- a/networking/libiproute/Makefile.in
+++ b/networking/libiproute/Makefile.in
@@ -1,6 +1,6 @@
# Makefile for busybox
#
-# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# 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
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c
index 1f3d739..a76df48 100644
--- a/networking/libiproute/ip_parse_common_args.c
+++ b/networking/libiproute/ip_parse_common_args.c
@@ -47,7 +47,7 @@ void ip_parse_common_args(int *argcp, char ***argvp)
if (matches(opt, "-family") == 0) {
argc--;
argv++;
- if (! argv[1])
+ if (! argv[1])
bb_show_usage();
if (strcmp(argv[1], "inet") == 0)
preferred_family = AF_INET;
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 44e871e..7e0c757 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -91,7 +91,7 @@ static void print_queuelen(char *name)
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;
@@ -166,7 +166,7 @@ static int print_linkinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg
#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_);
@@ -378,7 +378,7 @@ static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo, FILE *
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;
@@ -564,7 +564,7 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush)
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/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index daab693..44b546d 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -128,8 +128,8 @@ static int set_qlen(char *dev, int qlen)
return -1;
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, dev);
- ifr.ifr_qlen = qlen;
+ strcpy(ifr.ifr_name, dev);
+ ifr.ifr_qlen = qlen;
if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) {
perror("SIOCSIFXQLEN");
close(s);
@@ -137,7 +137,7 @@ static int set_qlen(char *dev, int qlen)
}
close(s);
- return 0;
+ return 0;
}
static int set_mtu(char *dev, int mtu)
@@ -150,8 +150,8 @@ static int set_mtu(char *dev, int mtu)
return -1;
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, dev);
- ifr.ifr_mtu = mtu;
+ strcpy(ifr.ifr_name, dev);
+ ifr.ifr_mtu = mtu;
if (ioctl(s, SIOCSIFMTU, &ifr) < 0) {
perror("SIOCSIFMTU");
close(s);
@@ -159,7 +159,7 @@ static int set_mtu(char *dev, int mtu)
}
close(s);
- return 0;
+ return 0;
}
static int get_address(char *dev, int *htype)
@@ -170,7 +170,7 @@ static int get_address(char *dev, int *htype)
int s;
s = socket(PF_PACKET, SOCK_DGRAM, 0);
- if (s < 0) {
+ if (s < 0) {
perror("socket(PF_PACKET)");
return -1;
}
@@ -218,7 +218,7 @@ static int parse_address(char *dev, int hatype, int halen, char *lla, struct ifr
bb_error_msg("Wrong address (%s) length: expected %d bytes", lla, halen);
return -1;
}
- return 0;
+ return 0;
}
static int set_address(struct ifreq *ifr, int brd)
@@ -234,7 +234,7 @@ static int set_address(struct ifreq *ifr, int brd)
return -1;
}
close(s);
- return 0;
+ return 0;
}
@@ -311,7 +311,7 @@ static int do_set(int argc, char **argv)
}
if (newbrd) {
if (parse_address(dev, htype, halen, newbrd, &ifr1) < 0)
- return -1;
+ return -1;
}
}
@@ -320,18 +320,18 @@ static int do_set(int argc, char **argv)
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/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 0fdf798..7adbfcd 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -76,7 +76,7 @@ static int print_route(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
inet_prefix src;
int host_len = -1;
SPRINT_BUF(b1);
-
+
if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
fprintf(stderr, "Not a route: %08x %08x %08x\n",
@@ -228,7 +228,7 @@ static int print_route(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
fprintf(fp, "from 0/%u ", r->rtm_src_len);
}
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]),
@@ -242,7 +242,7 @@ static int print_route(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
/* 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]),
@@ -665,7 +665,7 @@ static int iproute_get(int argc, char **argv)
req.r.rtm_src_len = 0;
req.r.rtm_dst_len = 0;
req.r.rtm_tos = 0;
-
+
while (argc > 0) {
switch (compare_string_array(options, *argv)) {
case 0: /* from */
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index eae5bb0..3f5d05a 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -354,7 +354,7 @@ static int do_add(int cmd, int argc, char **argv)
return do_add_ioctl(cmd, "gre0", &p);
case IPPROTO_IPV6:
return do_add_ioctl(cmd, "sit0", &p);
- default:
+ default:
bb_error_msg("cannot determine tunnel mode (ipip, gre or sit)");
return -1;
}
@@ -375,7 +375,7 @@ int do_del(int argc, char **argv)
return do_del_ioctl("gre0", &p);
case IPPROTO_IPV6:
return do_del_ioctl("sit0", &p);
- default:
+ default:
return do_del_ioctl(p.name, &p);
}
return -1;
@@ -506,7 +506,7 @@ static int do_show(int argc, char **argv)
return -1;
switch (p.iph.protocol) {
- case IPPROTO_IPIP:
+ case IPPROTO_IPIP:
err = do_get_ioctl(p.name[0] ? p.name : "tunl0", &p);
break;
case IPPROTO_GRE:
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
index 9390e56..861daef 100644
--- a/networking/libiproute/libnetlink.c
+++ b/networking/libiproute/libnetlink.c
@@ -317,7 +317,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
}
}
-int rtnl_listen(struct rtnl_handle *rtnl,
+int rtnl_listen(struct rtnl_handle *rtnl,
int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
void *jarg)
{
@@ -389,7 +389,7 @@ int rtnl_listen(struct rtnl_handle *rtnl,
}
}
-int rtnl_from_file(FILE *rtnl,
+int rtnl_from_file(FILE *rtnl,
int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
void *jarg)
{
diff --git a/networking/libiproute/linux/pkt_sched.h b/networking/libiproute/linux/pkt_sched.h
index e174588..70cbabc 100644
--- a/networking/libiproute/linux/pkt_sched.h
+++ b/networking/libiproute/linux/pkt_sched.h
@@ -221,19 +221,19 @@ enum
#define TCA_SET_OFF TCA_GRED_PARMS
struct tc_gred_qopt
{
- __u32 limit; /* HARD maximal queue length (bytes)
+ __u32 limit; /* HARD maximal queue length (bytes)
*/
- __u32 qth_min; /* Min average length threshold (bytes)
+ __u32 qth_min; /* Min average length threshold (bytes)
*/
- __u32 qth_max; /* Max average length threshold (bytes)
+ __u32 qth_max; /* Max average length threshold (bytes)
*/
__u32 DP; /* upto 2^32 DPs */
- __u32 backlog;
- __u32 qave;
- __u32 forced;
- __u32 early;
- __u32 other;
- __u32 pdrop;
+ __u32 backlog;
+ __u32 qave;
+ __u32 forced;
+ __u32 early;
+ __u32 other;
+ __u32 pdrop;
unsigned char Wlog; /* log(W) */
unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
@@ -294,7 +294,7 @@ struct tc_htb_xstats
__u32 lends;
__u32 borrows;
__u32 giants; /* too big packets (rate will not be accurate) */
- __u32 injects; /* how many times leaf used injected bw */
+ __u32 injects; /* how many times leaf used injected bw */
__u32 tokens;
__u32 ctokens;
};
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c
index 45afdb8..9b5260b 100644
--- a/networking/libiproute/ll_proto.c
+++ b/networking/libiproute/ll_proto.c
@@ -26,62 +26,62 @@ static struct {
char *name;
} llproto_names[] = {
__PF(LOOP,loop)
-__PF(PUP,pup)
+__PF(PUP,pup)
#ifdef ETH_P_PUPAT
-__PF(PUPAT,pupat)
+__PF(PUPAT,pupat)
#endif
__PF(IP,ip)
__PF(X25,x25)
__PF(ARP,arp)
__PF(BPQ,bpq)
#ifdef ETH_P_IEEEPUP
-__PF(IEEEPUP,ieeepup)
+__PF(IEEEPUP,ieeepup)
#endif
#ifdef ETH_P_IEEEPUPAT
-__PF(IEEEPUPAT,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)
+__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)
+__PF(PPP_DISC,ppp_disc)
#endif
#ifdef ETH_P_PPP_SES
-__PF(PPP_SES,ppp_ses)
+__PF(PPP_SES,ppp_ses)
#endif
#ifdef ETH_P_ATMMPOA
-__PF(ATMMPOA,atmmpoa)
+__PF(ATMMPOA,atmmpoa)
#endif
#ifdef ETH_P_ATMFATE
-__PF(ATMFATE,atmfate)
+__PF(ATMFATE,atmfate)
#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)
+__PF(ECONET,econet)
#endif
{ 0x8100, "802.1Q" },
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h
index b51e07b..e79e177 100644
--- a/networking/libiproute/utils.h
+++ b/networking/libiproute/utils.h
@@ -43,7 +43,7 @@ typedef struct
#define AF_DECnet 12
#endif
-struct dn_naddr
+struct dn_naddr
{
unsigned short a_len;
unsigned char a_addr[DN_MAXADDL];