diff options
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/ipaddress.c | 12 | ||||
-rw-r--r-- | networking/libiproute/iplink.c | 2 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 18 | ||||
-rw-r--r-- | networking/libiproute/linux/pkt_sched.h | 14 | ||||
-rw-r--r-- | networking/libiproute/ll_proto.c | 16 | ||||
-rw-r--r-- | networking/libiproute/ll_types.c | 10 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 4 |
7 files changed, 38 insertions, 38 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index c6115b356..c5e6e4ea5 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -54,8 +54,8 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown) | |||
54 | fprintf(fp, "<"); | 54 | fprintf(fp, "<"); |
55 | flags &= ~IFF_RUNNING; | 55 | flags &= ~IFF_RUNNING; |
56 | #define _PF(f) if (flags&IFF_##f) { \ | 56 | #define _PF(f) if (flags&IFF_##f) { \ |
57 | flags &= ~IFF_##f ; \ | 57 | flags &= ~IFF_##f ; \ |
58 | fprintf(fp, #f "%s", flags ? "," : ""); } | 58 | fprintf(fp, #f "%s", flags ? "," : ""); } |
59 | _PF(LOOPBACK); | 59 | _PF(LOOPBACK); |
60 | _PF(BROADCAST); | 60 | _PF(BROADCAST); |
61 | _PF(POINTOPOINT); | 61 | _PF(POINTOPOINT); |
@@ -74,7 +74,7 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown) | |||
74 | #endif | 74 | #endif |
75 | _PF(UP); | 75 | _PF(UP); |
76 | #undef _PF | 76 | #undef _PF |
77 | if (flags) | 77 | if (flags) |
78 | fprintf(fp, "%x", flags); | 78 | fprintf(fp, "%x", flags); |
79 | if (mdown) | 79 | if (mdown) |
80 | fprintf(fp, ",M-DOWN"); | 80 | fprintf(fp, ",M-DOWN"); |
@@ -636,9 +636,9 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
636 | "anycast", "scope", "dev", "label", "local", 0 }; | 636 | "anycast", "scope", "dev", "label", "local", 0 }; |
637 | struct rtnl_handle rth; | 637 | struct rtnl_handle rth; |
638 | struct { | 638 | struct { |
639 | struct nlmsghdr n; | 639 | struct nlmsghdr n; |
640 | struct ifaddrmsg ifa; | 640 | struct ifaddrmsg ifa; |
641 | char buf[256]; | 641 | char buf[256]; |
642 | } req; | 642 | } req; |
643 | char *d = NULL; | 643 | char *d = NULL; |
644 | char *l = NULL; | 644 | char *l = NULL; |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index b4493d67d..91c85820c 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -289,7 +289,7 @@ static int do_set(int argc, char **argv) | |||
289 | NEXT_ARG(); | 289 | NEXT_ARG(); |
290 | newaddr = *argv; | 290 | newaddr = *argv; |
291 | } else { | 291 | } else { |
292 | if (strcmp(*argv, "dev") == 0) { | 292 | if (strcmp(*argv, "dev") == 0) { |
293 | NEXT_ARG(); | 293 | NEXT_ARG(); |
294 | } | 294 | } |
295 | if (dev) | 295 | if (dev) |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index b622afd47..1c4f75520 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -286,9 +286,9 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) | |||
286 | { | 286 | { |
287 | struct rtnl_handle rth; | 287 | struct rtnl_handle rth; |
288 | struct { | 288 | struct { |
289 | struct nlmsghdr n; | 289 | struct nlmsghdr n; |
290 | struct rtmsg r; | 290 | struct rtmsg r; |
291 | char buf[1024]; | 291 | char buf[1024]; |
292 | } req; | 292 | } req; |
293 | char mxbuf[256]; | 293 | char mxbuf[256]; |
294 | struct rtattr * mxrta = (void*)mxbuf; | 294 | struct rtattr * mxrta = (void*)mxbuf; |
@@ -648,15 +648,15 @@ static int iproute_get(int argc, char **argv) | |||
648 | { | 648 | { |
649 | struct rtnl_handle rth; | 649 | struct rtnl_handle rth; |
650 | struct { | 650 | struct { |
651 | struct nlmsghdr n; | 651 | struct nlmsghdr n; |
652 | struct rtmsg r; | 652 | struct rtmsg r; |
653 | char buf[1024]; | 653 | char buf[1024]; |
654 | } req; | 654 | } req; |
655 | char *idev = NULL; | 655 | char *idev = NULL; |
656 | char *odev = NULL; | 656 | char *odev = NULL; |
657 | int connected = 0; | 657 | int connected = 0; |
658 | int from_ok = 0; | 658 | int from_ok = 0; |
659 | static const char * const options[] = | 659 | static const char * const options[] = |
660 | { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; | 660 | { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; |
661 | 661 | ||
662 | memset(&req, 0, sizeof(req)); | 662 | memset(&req, 0, sizeof(req)); |
@@ -816,8 +816,8 @@ static int iproute_get(int argc, char **argv) | |||
816 | 816 | ||
817 | int do_iproute(int argc, char **argv) | 817 | int do_iproute(int argc, char **argv) |
818 | { | 818 | { |
819 | static const char * const ip_route_commands[] = | 819 | static const char * const ip_route_commands[] = |
820 | { "add", "append", "change", "chg", "delete", "del", "get", | 820 | { "add", "append", "change", "chg", "delete", "del", "get", |
821 | "list", "show", "prepend", "replace", "test", "flush", 0 }; | 821 | "list", "show", "prepend", "replace", "test", "flush", 0 }; |
822 | int command_num = 7; | 822 | int command_num = 7; |
823 | unsigned int flags = 0; | 823 | unsigned int flags = 0; |
diff --git a/networking/libiproute/linux/pkt_sched.h b/networking/libiproute/linux/pkt_sched.h index 70cbabc26..ec5b3fddd 100644 --- a/networking/libiproute/linux/pkt_sched.h +++ b/networking/libiproute/linux/pkt_sched.h | |||
@@ -256,8 +256,8 @@ struct tc_gred_sopt | |||
256 | 256 | ||
257 | struct tc_htb_opt | 257 | struct tc_htb_opt |
258 | { | 258 | { |
259 | struct tc_ratespec rate; | 259 | struct tc_ratespec rate; |
260 | struct tc_ratespec ceil; | 260 | struct tc_ratespec ceil; |
261 | __u32 buffer; | 261 | __u32 buffer; |
262 | __u32 cbuffer; | 262 | __u32 cbuffer; |
263 | __u32 quantum; /* out only */ | 263 | __u32 quantum; /* out only */ |
@@ -268,9 +268,9 @@ struct tc_htb_opt | |||
268 | }; | 268 | }; |
269 | struct tc_htb_glob | 269 | struct tc_htb_glob |
270 | { | 270 | { |
271 | __u32 rate2quantum; /* bps->quantum divisor */ | 271 | __u32 rate2quantum; /* bps->quantum divisor */ |
272 | __u32 defcls; /* default class number */ | 272 | __u32 defcls; /* default class number */ |
273 | __u32 use_dcache; /* use dequeue cache ? */ | 273 | __u32 use_dcache; /* use dequeue cache ? */ |
274 | __u32 debug; /* debug flags */ | 274 | __u32 debug; /* debug flags */ |
275 | 275 | ||
276 | 276 | ||
@@ -311,8 +311,8 @@ struct tc_cbq_lssopt | |||
311 | unsigned char flags; | 311 | unsigned char flags; |
312 | #define TCF_CBQ_LSS_BOUNDED 1 | 312 | #define TCF_CBQ_LSS_BOUNDED 1 |
313 | #define TCF_CBQ_LSS_ISOLATED 2 | 313 | #define TCF_CBQ_LSS_ISOLATED 2 |
314 | unsigned char ewma_log; | 314 | unsigned char ewma_log; |
315 | unsigned char level; | 315 | unsigned char level; |
316 | #define TCF_CBQ_LSS_FLAGS 1 | 316 | #define TCF_CBQ_LSS_FLAGS 1 |
317 | #define TCF_CBQ_LSS_EWMA 2 | 317 | #define TCF_CBQ_LSS_EWMA 2 |
318 | #define TCF_CBQ_LSS_MAXIDLE 4 | 318 | #define TCF_CBQ_LSS_MAXIDLE 4 |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 104fbca25..873253050 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
@@ -92,23 +92,23 @@ __PF(ECONET,econet) | |||
92 | 92 | ||
93 | const char * ll_proto_n2a(unsigned short id, char *buf, int len) | 93 | const char * ll_proto_n2a(unsigned short id, char *buf, int len) |
94 | { | 94 | { |
95 | int i; | 95 | int i; |
96 | 96 | ||
97 | id = ntohs(id); | 97 | id = ntohs(id); |
98 | 98 | ||
99 | for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) { | 99 | for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) { |
100 | if (llproto_names[i].id == id) | 100 | if (llproto_names[i].id == id) |
101 | return llproto_names[i].name; | 101 | return llproto_names[i].name; |
102 | } | 102 | } |
103 | snprintf(buf, len, "[%d]", id); | 103 | snprintf(buf, len, "[%d]", id); |
104 | return buf; | 104 | return buf; |
105 | } | 105 | } |
106 | 106 | ||
107 | int ll_proto_a2n(unsigned short *id, char *buf) | 107 | int ll_proto_a2n(unsigned short *id, char *buf) |
108 | { | 108 | { |
109 | int i; | 109 | int i; |
110 | for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) { | 110 | for (i=0; i<sizeof(llproto_names)/sizeof(llproto_names[0]); i++) { |
111 | if (strcasecmp(llproto_names[i].name, buf) == 0) { | 111 | if (strcasecmp(llproto_names[i].name, buf) == 0) { |
112 | *id = htons(llproto_names[i].id); | 112 | *id = htons(llproto_names[i].id); |
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c index 6b42426d5..fc5a01530 100644 --- a/networking/libiproute/ll_types.c +++ b/networking/libiproute/ll_types.c | |||
@@ -105,11 +105,11 @@ __PF(VOID,void) | |||
105 | }; | 105 | }; |
106 | #undef __PF | 106 | #undef __PF |
107 | 107 | ||
108 | int i; | 108 | int i; |
109 | for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) { | 109 | for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) { |
110 | if (arphrd_names[i].type == type) | 110 | if (arphrd_names[i].type == type) |
111 | return arphrd_names[i].name; | 111 | return arphrd_names[i].name; |
112 | } | 112 | } |
113 | snprintf(buf, len, "[%d]", type); | 113 | snprintf(buf, len, "[%d]", type); |
114 | return buf; | 114 | return buf; |
115 | } | 115 | } |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index 3d223edf6..0a3a06c15 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -46,8 +46,8 @@ typedef struct | |||
46 | 46 | ||
47 | struct dn_naddr | 47 | struct dn_naddr |
48 | { | 48 | { |
49 | unsigned short a_len; | 49 | unsigned short a_len; |
50 | unsigned char a_addr[DN_MAXADDL]; | 50 | unsigned char a_addr[DN_MAXADDL]; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #define IPX_NODE_LEN 6 | 53 | #define IPX_NODE_LEN 6 |