Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 21295 Details for
Bug 34377
iproute -r4 fail to compile with 2.4.22 headers
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
iproute diff for 2.4.22 headers against iproute -r4
iproute2_2.4.22.diff (text/plain), 61.64 KB, created by
Guy Martin (RETIRED)
on 2003-11-25 17:05:37 UTC
(
hide
)
Description:
iproute diff for 2.4.22 headers against iproute -r4
Filename:
MIME Type:
Creator:
Guy Martin (RETIRED)
Created:
2003-11-25 17:05:37 UTC
Size:
61.64 KB
patch
obsolete
>diff -uNr iproute2.orig/Makefile iproute2/Makefile >--- iproute2.orig/Makefile 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/Makefile 2003-11-26 00:15:34.000000000 +0000 >@@ -18,14 +18,14 @@ > #options for ipx > ADDLIB+=ipx_ntop.o ipx_pton.o > >-ifeq ($(LIBC_INCLUDE)/socketbits.h,$(wildcard $(LIBC_INCLUDE)/socketbits.h)) >- ifeq ($(LIBC_INCLUDE)/net/if_packet.h,$(wildcard $(LIBC_INCLUDE)/net/if_packet.h)) >- GLIBCFIX=-I../include-glibc -include ../include-glibc/glibc-bugs.h >- endif >-endif >-ifeq ($(LIBC_INCLUDE)/bits/socket.h,$(wildcard $(LIBC_INCLUDE)/bits/socket.h)) >- GLIBCFIX=-I../include-glibc -include ../include-glibc/glibc-bugs.h >-endif >+#ifeq ($(LIBC_INCLUDE)/socketbits.h,$(wildcard $(LIBC_INCLUDE)/socketbits.h)) >+# ifeq ($(LIBC_INCLUDE)/net/if_packet.h,$(wildcard $(LIBC_INCLUDE)/net/if_packet.h)) >+# GLIBCFIX=-I../include-glibc -include ../include-glibc/glibc-bugs.h >+# endif >+#endif >+#ifeq ($(LIBC_INCLUDE)/bits/socket.h,$(wildcard $(LIBC_INCLUDE)/bits/socket.h)) >+# GLIBCFIX=-I../include-glibc -include ../include-glibc/glibc-bugs.h >+#endif > > CC = gcc > CCOPTS = -D_GNU_SOURCE -O2 -pipe -mschedule=8000 -Wstrict-prototypes -Wall -g >diff -uNr iproute2.orig/doc/api-ip6-flowlabels.tex iproute2/doc/api-ip6-flowlabels.tex >--- iproute2.orig/doc/api-ip6-flowlabels.tex 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/doc/api-ip6-flowlabels.tex 2003-11-26 00:19:35.000000000 +0000 >@@ -207,7 +207,7 @@ > if (c->cmsg_level != SOL_IPV6 || > c->cmsg_type != IPV6_FLOWINFO) > continue; >- ((struct sockaddr_in6*)addr)->sin6_flowinfo = *(__u32*)CMSG_DATA(c); >+ ((struct sockaddr_in6*)addr)->sin6_flowinfo = *(uint32_t*)CMSG_DATA(c); > } > return cc; > } >@@ -269,13 +269,13 @@ > struct in6_flowlabel_req > { > struct in6_addr flr_dst; >- __u32 flr_label; >- __u8 flr_action; >- __u8 flr_share; >+ uint32_t flr_label; >+ uint8_t flr_action; >+ uint8_t flr_share; > __u16 flr_flags; > __u16 flr_expires; > __u16 flr_linger; >- __u32 __flr_reserved; >+ uint32_t __flr_reserved; > /* Options in format of IPV6_PKTOPTIONS */ > }; > \end{verbatim} >@@ -344,7 +344,7 @@ > private flow label. > > \begin{verbatim} >-int get_flow_label(int fd, struct sockaddr_in6 *dst, __u32 fl) >+int get_flow_label(int fd, struct sockaddr_in6 *dst, uint32_t fl) > { > int on = 1; > struct in6_flowlabel_req freq; >diff -uNr iproute2.orig/include/libnetlink.h iproute2/include/libnetlink.h >--- iproute2.orig/include/libnetlink.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include/libnetlink.h 2003-11-26 00:17:07.000000000 +0000 >@@ -10,8 +10,8 @@ > int fd; > struct sockaddr_nl local; > struct sockaddr_nl peer; >- __u32 seq; >- __u32 dump; >+ uint32_t seq; >+ uint32_t dump; > }; > > extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions); >@@ -30,9 +30,9 @@ > extern int rtnl_send(struct rtnl_handle *rth, char *buf, int); > > >-extern int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data); >+extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data); > extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen); >-extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data); >+extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data); > extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen); > > extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); >diff -uNr iproute2.orig/include/linux/pkt_sched.h iproute2/include/linux/pkt_sched.h >--- iproute2.orig/include/linux/pkt_sched.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include/linux/pkt_sched.h 2003-11-26 00:20:10.000000000 +0000 >@@ -29,15 +29,15 @@ > > struct tc_stats > { >- __u64 bytes; /* NUmber of enqueues bytes */ >- __u32 packets; /* Number of enqueued packets */ >- __u32 drops; /* Packets dropped because of lack of resources */ >- __u32 overlimits; /* Number of throttle events when this >+ uint64_t bytes; /* NUmber of enqueues bytes */ >+ uint32_t packets; /* Number of enqueued packets */ >+ uint32_t drops; /* Packets dropped because of lack of resources */ >+ uint32_t overlimits; /* Number of throttle events when this > * flow goes out of allocated bandwidth */ >- __u32 bps; /* Current flow byte rate */ >- __u32 pps; /* Current flow packet rate */ >- __u32 qlen; >- __u32 backlog; >+ uint32_t bps; /* Current flow byte rate */ >+ uint32_t pps; /* Current flow packet rate */ >+ uint32_t qlen; >+ uint32_t backlog; > #ifdef __KERNEL__ > spinlock_t *lock; > #endif >@@ -83,14 +83,14 @@ > unsigned short feature; > short addend; > unsigned short mpu; >- __u32 rate; >+ uint32_t rate; > }; > > /* FIFO section */ > > struct tc_fifo_qopt > { >- __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ >+ uint32_t limit; /* Queue length: bytes for bfifo, packets for pfifo */ > }; > > /* PRIO section */ >@@ -100,7 +100,7 @@ > struct tc_prio_qopt > { > int bands; /* Number of bands */ >- __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ >+ uint8_t priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ > }; > > /* CSZ section */ >@@ -110,7 +110,7 @@ > int flows; /* Maximal number of guaranteed flows */ > unsigned char R_log; /* Fixed point position for round number */ > unsigned char delta_log; /* Log of maximal managed time interval */ >- __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> CSZ band */ >+ uint8_t priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> CSZ band */ > }; > > struct tc_csz_copt >@@ -118,9 +118,9 @@ > struct tc_ratespec slice; > struct tc_ratespec rate; > struct tc_ratespec peakrate; >- __u32 limit; >- __u32 buffer; >- __u32 mtu; >+ uint32_t limit; >+ uint32_t buffer; >+ uint32_t mtu; > }; > > enum >@@ -137,9 +137,9 @@ > { > struct tc_ratespec rate; > struct tc_ratespec peakrate; >- __u32 limit; >- __u32 buffer; >- __u32 mtu; >+ uint32_t limit; >+ uint32_t buffer; >+ uint32_t mtu; > }; > > enum >@@ -161,7 +161,7 @@ > { > unsigned quantum; /* Bytes per round allocated to flow */ > int perturb_period; /* Period of hash perturbation */ >- __u32 limit; /* Maximal packets in queue */ >+ uint32_t limit; /* Maximal packets in queue */ > unsigned divisor; /* Hash divisor */ > unsigned flows; /* Maximal number of flows */ > }; >@@ -186,9 +186,9 @@ > > struct tc_red_qopt > { >- __u32 limit; /* HARD maximal queue length (bytes) */ >- __u32 qth_min; /* Min average length threshold (bytes) */ >- __u32 qth_max; /* Max average length threshold (bytes) */ >+ uint32_t limit; /* HARD maximal queue length (bytes) */ >+ uint32_t qth_min; /* Min average length threshold (bytes) */ >+ uint32_t qth_max; /* Max average length threshold (bytes) */ > unsigned char Wlog; /* log(W) */ > unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ > unsigned char Scell_log; /* cell size for idle damping */ >@@ -198,10 +198,10 @@ > > struct tc_red_xstats > { >- __u32 early; /* Early drops */ >- __u32 pdrop; /* Drops due to queue limits */ >- __u32 other; /* Drops due to drop() calls */ >- __u32 marked; /* Marked packets */ >+ uint32_t early; /* Early drops */ >+ uint32_t pdrop; /* Drops due to queue limits */ >+ uint32_t other; /* Drops due to drop() calls */ >+ uint32_t marked; /* Marked packets */ > }; > > /* GRED section */ >@@ -219,33 +219,33 @@ > #define TCA_SET_OFF TCA_GRED_PARMS > struct tc_gred_qopt > { >- __u32 limit; /* HARD maximal queue length (bytes) >+ uint32_t limit; /* HARD maximal queue length (bytes) > */ >- __u32 qth_min; /* Min average length threshold (bytes) >+ uint32_t qth_min; /* Min average length threshold (bytes) > */ >- __u32 qth_max; /* Max average length threshold (bytes) >+ uint32_t 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; >+ uint32_t DP; /* upto 2^32 DPs */ >+ uint32_t backlog; >+ uint32_t qave; >+ uint32_t forced; >+ uint32_t early; >+ uint32_t other; >+ uint32_t pdrop; > > unsigned char Wlog; /* log(W) */ > unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ > unsigned char Scell_log; /* cell size for idle damping */ >- __u8 prio; /* prio of this VQ */ >- __u32 packets; >- __u32 bytesin; >+ uint8_t prio; /* prio of this VQ */ >+ uint32_t packets; >+ uint32_t bytesin; > }; > /* gred setup */ > struct tc_gred_sopt > { >- __u32 DPs; >- __u32 def_DP; >- __u8 grio; >+ uint32_t DPs; >+ uint32_t def_DP; >+ uint8_t grio; > }; > > /* HTB section */ >@@ -257,21 +257,21 @@ > { > struct tc_ratespec rate; > struct tc_ratespec ceil; >- __u32 buffer; >- __u32 cbuffer; >- __u32 quantum; >- __u32 level; /* out only */ >- __u32 prio; >+ uint32_t buffer; >+ uint32_t cbuffer; >+ uint32_t quantum; >+ uint32_t level; /* out only */ >+ uint32_t prio; > }; > struct tc_htb_glob > { >- __u32 version; /* to match HTB/TC */ >- __u32 rate2quantum; /* bps->quantum divisor */ >- __u32 defcls; /* default class number */ >- __u32 debug; /* debug flags */ >+ uint32_t version; /* to match HTB/TC */ >+ uint32_t rate2quantum; /* bps->quantum divisor */ >+ uint32_t defcls; /* default class number */ >+ uint32_t debug; /* debug flags */ > > /* stats */ >- __u32 direct_pkts; /* count of non shapped packets */ >+ uint32_t direct_pkts; /* count of non shapped packets */ > }; > enum > { >@@ -283,11 +283,11 @@ > }; > struct tc_htb_xstats > { >- __u32 lends; >- __u32 borrows; >- __u32 giants; /* too big packets (rate will not be accurate) */ >- __u32 tokens; >- __u32 ctokens; >+ uint32_t lends; >+ uint32_t borrows; >+ uint32_t giants; /* too big packets (rate will not be accurate) */ >+ uint32_t tokens; >+ uint32_t ctokens; > }; > > /* CBQ section */ >@@ -310,10 +310,10 @@ > #define TCF_CBQ_LSS_MINIDLE 8 > #define TCF_CBQ_LSS_OFFTIME 0x10 > #define TCF_CBQ_LSS_AVPKT 0x20 >- __u32 maxidle; >- __u32 minidle; >- __u32 offtime; >- __u32 avpkt; >+ uint32_t maxidle; >+ uint32_t minidle; >+ uint32_t offtime; >+ uint32_t avpkt; > }; > > struct tc_cbq_wrropt >@@ -322,8 +322,8 @@ > unsigned char priority; > unsigned char cpriority; > unsigned char __reserved; >- __u32 allot; >- __u32 weight; >+ uint32_t allot; >+ uint32_t weight; > }; > > struct tc_cbq_ovl >@@ -335,7 +335,7 @@ > #define TC_CBQ_OVL_DROP 3 > #define TC_CBQ_OVL_RCLASSIC 4 > unsigned char priority2; >- __u32 penalty; >+ uint32_t penalty; > }; > > struct tc_cbq_police >@@ -347,17 +347,17 @@ > > struct tc_cbq_fopt > { >- __u32 split; >- __u32 defmap; >- __u32 defchange; >+ uint32_t split; >+ uint32_t defmap; >+ uint32_t defchange; > }; > > struct tc_cbq_xstats > { >- __u32 borrows; >- __u32 overactions; >- __s32 avgidle; >- __s32 undertime; >+ uint32_t borrows; >+ uint32_t overactions; >+ int32_t avgidle; >+ int32_t undertime; > }; > > enum >diff -uNr iproute2.orig/include/rt_names.h iproute2/include/rt_names.h >--- iproute2.orig/include/rt_names.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include/rt_names.h 2003-11-26 00:28:09.000000000 +0000 >@@ -9,8 +9,8 @@ > int rtnl_rtprot_a2n(int *id, char *arg); > int rtnl_rtscope_a2n(int *id, char *arg); > int rtnl_rttable_a2n(int *id, char *arg); >-int rtnl_rtrealm_a2n(__u32 *id, char *arg); >-int rtnl_dsfield_a2n(__u32 *id, char *arg); >+int rtnl_rtrealm_a2n(int *id, char *arg); >+int rtnl_dsfield_a2n(int *id, char *arg); > > const char *inet_proto_n2a(int proto, char *buf, int len); > int inet_proto_a2n(char *buf); >diff -uNr iproute2.orig/include/rtm_map.h iproute2/include/rtm_map.h >--- iproute2.orig/include/rtm_map.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include/rtm_map.h 2003-11-26 00:17:07.000000000 +0000 >@@ -4,7 +4,7 @@ > char *rtnl_rtntype_n2a(int id, char *buf, int len); > int rtnl_rtntype_a2n(int *id, char *arg); > >-int get_rt_realms(__u32 *realms, char *arg); >+int get_rt_realms(uint32_t *realms, char *arg); > > > #endif /* __RTM_MAP_H__ */ >diff -uNr iproute2.orig/include/utils.h iproute2/include/utils.h >--- iproute2.orig/include/utils.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include/utils.h 2003-11-26 00:19:35.000000000 +0000 >@@ -32,10 +32,10 @@ > > typedef struct > { >- __u8 family; >- __u8 bytelen; >+ uint8_t family; >+ uint8_t bytelen; > __s16 bitlen; >- __u32 data[4]; >+ uint32_t data[4]; > } inet_prefix; > > #define DN_MAXADDL 20 >@@ -56,7 +56,7 @@ > u_int8_t ipx_node[IPX_NODE_LEN]; > }; > >-extern __u32 get_addr32(char *name); >+extern uint32_t get_addr32(char *name); > extern int get_addr_1(inet_prefix *dst, char *arg, int family); > extern int get_prefix_1(inet_prefix *dst, char *arg, int family); > extern int get_addr(inet_prefix *dst, char *arg, int family); >@@ -67,10 +67,10 @@ > #define get_byte get_u8 > #define get_ushort get_u16 > #define get_short get_s16 >-extern int get_u32(__u32 *val, char *arg, int base); >+extern int get_u32(uint32_t *val, char *arg, int base); > extern int get_u16(__u16 *val, char *arg, int base); > extern int get_s16(__s16 *val, char *arg, int base); >-extern int get_u8(__u8 *val, char *arg, int base); >+extern int get_u8(uint8_t *val, char *arg, int base); > extern int get_s8(__s8 *val, char *arg, int base); > > extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); >diff -uNr iproute2.orig/include-glibc/bits/socket.h iproute2/include-glibc/bits/socket.h >--- iproute2.orig/include-glibc/bits/socket.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include-glibc/bits/socket.h 2003-11-26 00:17:07.000000000 +0000 >@@ -252,9 +252,9 @@ > > struct ucred > { >- __u32 pid; >- __u32 uid; >- __u32 gid; >+ uint32_t pid; >+ uint32_t uid; >+ uint32_t gid; > }; > > >diff -uNr iproute2.orig/include-glibc/glibc-bugs.h iproute2/include-glibc/glibc-bugs.h >--- iproute2.orig/include-glibc/glibc-bugs.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include-glibc/glibc-bugs.h 2003-11-26 00:17:07.000000000 +0000 >@@ -13,7 +13,7 @@ > #include <linux/types.h> > > typedef __u16 in_port_t; >-typedef __u32 in_addr_t; >+typedef uint32_t in_addr_t; > > #endif > >diff -uNr iproute2.orig/include-glibc/socketbits.h iproute2/include-glibc/socketbits.h >--- iproute2.orig/include-glibc/socketbits.h 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/include-glibc/socketbits.h 2003-11-26 00:17:07.000000000 +0000 >@@ -252,9 +252,9 @@ > > struct ucred > { >- __u32 pid; >- __u32 uid; >- __u32 gid; >+ uint32_t pid; >+ uint32_t uid; >+ uint32_t gid; > }; > > >Files iproute2.orig/ip/ip and iproute2/ip/ip differ >Files iproute2.orig/ip/ip.o and iproute2/ip/ip.o differ >diff -uNr iproute2.orig/ip/ipaddress.c iproute2/ip/ipaddress.c >--- iproute2.orig/ip/ipaddress.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/ipaddress.c 2003-11-26 00:24:50.000000000 +0000 >@@ -12,6 +12,8 @@ > * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -23,8 +25,6 @@ > #include <linux/netdevice.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > #include <fnmatch.h> > >@@ -722,7 +722,7 @@ > int default_scope(inet_prefix *lcl) > { > if (lcl->family == AF_INET) { >- if (lcl->bytelen >= 1 && *(__u8*)&lcl->data == 127) >+ if (lcl->bytelen >= 1 && *(uint8_t*)&lcl->data == 127) > return RT_SCOPE_HOST; > } > return 0; >Files iproute2.orig/ip/ipaddress.o and iproute2/ip/ipaddress.o differ >diff -uNr iproute2.orig/ip/iplink.c iproute2/ip/iplink.c >--- iproute2.orig/ip/iplink.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/iplink.c 2003-11-26 00:17:07.000000000 +0000 >@@ -77,7 +77,7 @@ > return -1; > } > >-static int do_chflags(char *dev, __u32 flags, __u32 mask) >+static int do_chflags(char *dev, uint32_t flags, uint32_t mask) > { > struct ifreq ifr; > int fd; >@@ -248,8 +248,8 @@ > static int do_set(int argc, char **argv) > { > char *dev = NULL; >- __u32 mask = 0; >- __u32 flags = 0; >+ uint32_t mask = 0; >+ uint32_t flags = 0; > int qlen = -1; > int mtu = -1; > char *newaddr = NULL; >Files iproute2.orig/ip/iplink.o and iproute2/ip/iplink.o differ >diff -uNr iproute2.orig/ip/ipmaddr.c iproute2/ip/ipmaddr.c >--- iproute2.orig/ip/ipmaddr.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/ipmaddr.c 2003-11-26 00:25:41.000000000 +0000 >@@ -10,6 +10,8 @@ > * > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -21,8 +23,6 @@ > #include <linux/if.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > > #include "rt_names.h" >@@ -144,7 +144,7 @@ > if (filter.dev && strcmp(filter.dev, m.name)) > continue; > >- sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users); >+ sscanf(buf, "%08x%d", (uint32_t*)&m.addr.data, &m.users); > > ma = malloc(sizeof(m)); > memcpy(ma, &m, sizeof(m)); >Files iproute2.orig/ip/ipmaddr.o and iproute2/ip/ipmaddr.o differ >diff -uNr iproute2.orig/ip/ipmonitor.c iproute2/ip/ipmonitor.c >--- iproute2.orig/ip/ipmonitor.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/ipmonitor.c 2003-11-26 00:17:07.000000000 +0000 >@@ -56,8 +56,8 @@ > } > if (n->nlmsg_type == 15) { > char *tstr; >- time_t secs = ((__u32*)NLMSG_DATA(n))[0]; >- long usecs = ((__u32*)NLMSG_DATA(n))[1]; >+ time_t secs = ((uint32_t*)NLMSG_DATA(n))[0]; >+ long usecs = ((uint32_t*)NLMSG_DATA(n))[1]; > tstr = asctime(localtime(&secs)); > tstr[strlen(tstr)-1] = 0; > fprintf(fp, "Timestamp: %s %lu us\n", tstr, usecs); >Files iproute2.orig/ip/ipmonitor.o and iproute2/ip/ipmonitor.o differ >diff -uNr iproute2.orig/ip/ipmroute.c iproute2/ip/ipmroute.c >--- iproute2.orig/ip/ipmroute.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/ipmroute.c 2003-11-26 00:26:00.000000000 +0000 >@@ -10,6 +10,8 @@ > * > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -21,8 +23,6 @@ > #include <linux/if.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > > #include "utils.h" >Files iproute2.orig/ip/ipmroute.o and iproute2/ip/ipmroute.o differ >diff -uNr iproute2.orig/ip/ipneigh.c iproute2/ip/ipneigh.c >--- iproute2.orig/ip/ipneigh.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/ipneigh.c 2003-11-26 00:19:35.000000000 +0000 >@@ -86,7 +86,7 @@ > return 0; > } > >-char * nud_state_n2a(__u8 state, char *buf, int len) >+char * nud_state_n2a(uint8_t state, char *buf, int len) > { > switch (state) { > case NUD_NONE: >@@ -193,7 +193,7 @@ > addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen); > > if (lla && strcmp(lla, "null")) { >- __u8 llabuf[16]; >+ uint8_t llabuf[16]; > int l; > > l = ll_addr_a2n(llabuf, sizeof(llabuf), lla); >Files iproute2.orig/ip/ipneigh.o and iproute2/ip/ipneigh.o differ >diff -uNr iproute2.orig/ip/iproute.c iproute2/ip/iproute.c >--- iproute2.orig/ip/iproute.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/iproute.c 2003-11-26 00:17:07.000000000 +0000 >@@ -233,9 +233,9 @@ > if (filter.rprefsrc.family && inet_addr_match(&prefsrc, &filter.rprefsrc, filter.rprefsrc.bitlen)) > return 0; > if (filter.realmmask) { >- __u32 realms = 0; >+ uint32_t realms = 0; > if (tb[RTA_FLOW]) >- realms = *(__u32*)RTA_DATA(tb[RTA_FLOW]); >+ realms = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]); > if ((realms^filter.realm)&filter.realmmask) > return 0; > } >@@ -354,7 +354,7 @@ > abuf, sizeof(abuf))); > } > if (tb[RTA_PRIORITY]) >- fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY])); >+ fprintf(fp, " metric %d ", *(uint32_t*)RTA_DATA(tb[RTA_PRIORITY])); > if (r->rtm_flags & RTNH_F_DEAD) > fprintf(fp, "dead "); > if (r->rtm_flags & RTNH_F_ONLINK) >@@ -367,8 +367,8 @@ > fprintf(fp, "notify "); > > if (tb[RTA_FLOW] && filter.realmmask != ~0U) { >- __u32 to = *(__u32*)RTA_DATA(tb[RTA_FLOW]); >- __u32 from = to>>16; >+ uint32_t to = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]); >+ uint32_t from = to>>16; > to &= 0xFFFF; > fprintf(fp, "realm%s ", from ? "s" : ""); > if (from) { >@@ -379,7 +379,7 @@ > rtnl_rtrealm_n2a(to, b1, sizeof(b1))); > } > if ((r->rtm_flags&RTM_F_CLONED) && r->rtm_family == AF_INET) { >- __u32 flags = r->rtm_flags&~0xFFFF; >+ uint32_t flags = r->rtm_flags&~0xFFFF; > int first = 1; > > fprintf(fp, "%s cache ", _SL_); >@@ -696,7 +696,7 @@ > req.r.rtm_src_len = addr.bitlen; > } else if (strcmp(*argv, "tos") == 0 || > matches(*argv, "dsfield") == 0) { >- __u32 tos; >+ uint32_t tos; > NEXT_ARG(); > if (rtnl_dsfield_a2n(&tos, *argv)) > invarg("\"tos\" value is invalid\n", *argv); >@@ -704,7 +704,7 @@ > } else if (matches(*argv, "metric") == 0 || > matches(*argv, "priority") == 0 || > matches(*argv, "preference") == 0) { >- __u32 metric; >+ uint32_t metric; > NEXT_ARG(); > if (get_u32(&metric, *argv, 0)) > invarg("\"metric\" value is invalid\n", *argv); >@@ -801,7 +801,7 @@ > invarg("\"ssthresh\" value is invalid\n", *argv); > rta_addattr32(mxrta, sizeof(mxbuf), RTAX_SSTHRESH, win); > } else if (matches(*argv, "realms") == 0) { >- __u32 realm; >+ uint32_t realm; > NEXT_ARG(); > if (get_rt_realms(&realm, *argv)) > invarg("\"realm\" value is invalid\n", *argv); >@@ -1003,7 +1003,7 @@ > filter.tb = -1; > } else if (strcmp(*argv, "tos") == 0 || > matches(*argv, "dsfield") == 0) { >- __u32 tos; >+ uint32_t tos; > NEXT_ARG(); > if (rtnl_dsfield_a2n(&tos, *argv)) > invarg("TOS value is invalid\n", *argv); >@@ -1052,7 +1052,7 @@ > NEXT_ARG(); > get_prefix(&filter.rprefsrc, *argv, do_ipv6); > } else if (matches(*argv, "realms") == 0) { >- __u32 realm; >+ uint32_t realm; > NEXT_ARG(); > if (get_rt_realms(&realm, *argv)) > invarg("invalid realms\n", *argv); >@@ -1231,7 +1231,7 @@ > while (argc > 0) { > if (strcmp(*argv, "tos") == 0 || > matches(*argv, "dsfield") == 0) { >- __u32 tos; >+ uint32_t tos; > NEXT_ARG(); > if (rtnl_dsfield_a2n(&tos, *argv)) > invarg("TOS value is invalid\n", *argv); >Files iproute2.orig/ip/iproute.o and iproute2/ip/iproute.o differ >diff -uNr iproute2.orig/ip/iprule.c iproute2/ip/iprule.c >--- iproute2.orig/ip/iprule.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/iprule.c 2003-11-26 00:17:07.000000000 +0000 >@@ -120,7 +120,7 @@ > fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1))); > } > if (tb[RTA_PROTOINFO]) { >- fprintf(fp, "fwmark %8x ", *(__u32*)RTA_DATA(tb[RTA_PROTOINFO])); >+ fprintf(fp, "fwmark %8x ", *(uint32_t*)RTA_DATA(tb[RTA_PROTOINFO])); > } > > if (tb[RTA_IIF]) { >@@ -131,8 +131,8 @@ > fprintf(fp, "lookup %s ", rtnl_rttable_n2a(r->rtm_table, b1, sizeof(b1))); > > if (tb[RTA_FLOW]) { >- __u32 to = *(__u32*)RTA_DATA(tb[RTA_FLOW]); >- __u32 from = to>>16; >+ uint32_t to = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]); >+ uint32_t from = to>>16; > to &= 0xFFFF; > if (from) { > fprintf(fp, "realms %s/", >@@ -231,25 +231,25 @@ > } else if (matches(*argv, "preference") == 0 || > matches(*argv, "order") == 0 || > matches(*argv, "priority") == 0) { >- __u32 pref; >+ uint32_t pref; > NEXT_ARG(); > if (get_u32(&pref, *argv, 0)) > invarg("preference value is invalid\n", *argv); > addattr32(&req.n, sizeof(req), RTA_PRIORITY, pref); > } else if (strcmp(*argv, "tos") == 0) { >- __u32 tos; >+ uint32_t tos; > NEXT_ARG(); > if (rtnl_dsfield_a2n(&tos, *argv)) > invarg("TOS value is invalid\n", *argv); > req.r.rtm_tos = tos; > } else if (strcmp(*argv, "fwmark") == 0) { >- __u32 fwmark; >+ uint32_t fwmark; > NEXT_ARG(); > if (get_u32(&fwmark, *argv, 16)) > invarg("fwmark value is invalid\n", *argv); > addattr32(&req.n, sizeof(req), RTA_PROTOINFO, fwmark); > } else if (matches(*argv, "realms") == 0) { >- __u32 realm; >+ uint32_t realm; > NEXT_ARG(); > if (get_rt_realms(&realm, *argv)) > invarg("invalid realms\n", *argv); >Files iproute2.orig/ip/iprule.o and iproute2/ip/iprule.o differ >diff -uNr iproute2.orig/ip/iptunnel.c iproute2/ip/iptunnel.c >--- iproute2.orig/ip/iptunnel.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/iptunnel.c 2003-11-26 00:25:18.000000000 +0000 >@@ -16,6 +16,8 @@ > * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag > */ > >+#include <netinet/ip.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >@@ -27,8 +29,6 @@ > #include <linux/if.h> > #include <linux/if_arp.h> > #include <netinet/in.h> >-#include <netinet/ip.h> >-#include <arpa/inet.h> > #include <linux/if_tunnel.h> > > #include "rt_names.h" >@@ -283,7 +283,7 @@ > } > } else if (strcmp(*argv, "tos") == 0 || > matches(*argv, "dsfield") == 0) { >- __u32 uval; >+ uint32_t uval; > NEXT_ARG(); > if (strcmp(*argv, "inherit") != 0) { > if (rtnl_dsfield_a2n(&uval, *argv)) >Files iproute2.orig/ip/iptunnel.o and iproute2/ip/iptunnel.o differ >Files iproute2.orig/ip/rtacct and iproute2/ip/rtacct differ >diff -uNr iproute2.orig/ip/rtacct.c iproute2/ip/rtacct.c >--- iproute2.orig/ip/rtacct.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/rtacct.c 2003-11-26 00:26:46.000000000 +0000 >@@ -26,7 +26,7 @@ > { > int i; > int fd; >- __u32 buffer[256*4]; >+ int buffer[256*4]; > char b1[64]; > int rlist[argc]; > int rhwm = 0; >@@ -66,7 +66,7 @@ > > if (rhwm == 0) { > for (i=0; i<256; i++) { >- __u32 *p = &buffer[i*4]; >+ int *p = &buffer[i*4]; > > if (!p[0] && !p[1] && !p[2] && !p[3]) > continue; >@@ -84,7 +84,7 @@ > int k; > > for (k=0; k<rhwm; k++) { >- __u32 *p; >+ int *p; > > i = rlist[k]; > p = &buffer[i*4]; >Files iproute2.orig/ip/rtacct.o and iproute2/ip/rtacct.o differ >diff -uNr iproute2.orig/ip/rtm_map.c iproute2/ip/rtm_map.c >--- iproute2.orig/ip/rtm_map.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/rtm_map.c 2003-11-26 00:17:08.000000000 +0000 >@@ -93,9 +93,9 @@ > return 0; > } > >-int get_rt_realms(__u32 *realms, char *arg) >+int get_rt_realms(uint32_t *realms, char *arg) > { >- __u32 realm = 0; >+ uint32_t realm = 0; > char *p = strchr(arg, '/'); > > *realms = 0; >Files iproute2.orig/ip/rtm_map.o and iproute2/ip/rtm_map.o differ >Files iproute2.orig/ip/rtmon and iproute2/ip/rtmon differ >diff -uNr iproute2.orig/ip/rtmon.c iproute2/ip/rtmon.c >--- iproute2.orig/ip/rtmon.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/ip/rtmon.c 2003-11-26 00:17:08.000000000 +0000 >@@ -41,8 +41,8 @@ > n1->nlmsg_pid = 0; > n1->nlmsg_len = NLMSG_LENGTH(4*2); > gettimeofday(&tv, NULL); >- ((__u32*)NLMSG_DATA(n1))[0] = tv.tv_sec; >- ((__u32*)NLMSG_DATA(n1))[1] = tv.tv_usec; >+ ((uint32_t*)NLMSG_DATA(n1))[0] = tv.tv_sec; >+ ((uint32_t*)NLMSG_DATA(n1))[1] = tv.tv_usec; > fwrite((void*)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp); > } > >Files iproute2.orig/ip/rtmon.o and iproute2/ip/rtmon.o differ >Files iproute2.orig/lib/dnet_ntop.o and iproute2/lib/dnet_ntop.o differ >Files iproute2.orig/lib/dnet_pton.o and iproute2/lib/dnet_pton.o differ >diff -uNr iproute2.orig/lib/inet_proto.c iproute2/lib/inet_proto.c >--- iproute2.orig/lib/inet_proto.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/inet_proto.c 2003-11-26 00:19:35.000000000 +0000 >@@ -52,7 +52,7 @@ > return icache; > > if (buf[0] >= '0' && buf[0] <= '9') { >- __u8 ret; >+ uint8_t ret; > if (get_u8(&ret, buf, 10)) > return -1; > return ret; >Files iproute2.orig/lib/inet_proto.o and iproute2/lib/inet_proto.o differ >Files iproute2.orig/lib/ipx_ntop.o and iproute2/lib/ipx_ntop.o differ >Files iproute2.orig/lib/ipx_pton.o and iproute2/lib/ipx_pton.o differ >Files iproute2.orig/lib/libnetlink.a and iproute2/lib/libnetlink.a differ >diff -uNr iproute2.orig/lib/libnetlink.c iproute2/lib/libnetlink.c >--- iproute2.orig/lib/libnetlink.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/libnetlink.c 2003-11-26 00:17:08.000000000 +0000 >@@ -448,7 +448,7 @@ > } > } > >-int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data) >+int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) > { > int len = RTA_LENGTH(4); > struct rtattr *rta; >@@ -477,7 +477,7 @@ > return 0; > } > >-int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data) >+int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) > { > int len = RTA_LENGTH(4); > struct rtattr *subrta; >Files iproute2.orig/lib/libnetlink.o and iproute2/lib/libnetlink.o differ >Files iproute2.orig/lib/libutil.a and iproute2/lib/libutil.a differ >diff -uNr iproute2.orig/lib/ll_addr.c iproute2/lib/ll_addr.c >--- iproute2.orig/lib/ll_addr.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/ll_addr.c 2003-11-26 00:24:09.000000000 +0000 >@@ -9,6 +9,8 @@ > * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -20,8 +22,6 @@ > #include <linux/netdevice.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > > #include "utils.h" >Files iproute2.orig/lib/ll_addr.o and iproute2/lib/ll_addr.o differ >Files iproute2.orig/lib/ll_map.o and iproute2/lib/ll_map.o differ >diff -uNr iproute2.orig/lib/ll_proto.c iproute2/lib/ll_proto.c >--- iproute2.orig/lib/ll_proto.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/ll_proto.c 2003-11-26 00:23:52.000000000 +0000 >@@ -9,6 +9,8 @@ > * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -20,8 +22,6 @@ > #include <linux/netdevice.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > > #include "utils.h" >Files iproute2.orig/lib/ll_proto.o and iproute2/lib/ll_proto.o differ >diff -uNr iproute2.orig/lib/ll_types.c iproute2/lib/ll_types.c >--- iproute2.orig/lib/ll_types.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/ll_types.c 2003-11-26 00:23:21.000000000 +0000 >@@ -9,6 +9,8 @@ > * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> > */ > >+#include <netinet/in.h> >+#include <arpa/inet.h> > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> >@@ -20,8 +22,6 @@ > #include <linux/netdevice.h> > #include <linux/if_arp.h> > #include <linux/sockios.h> >-#include <netinet/in.h> >-#include <arpa/inet.h> > #include <string.h> > > char * ll_type_n2a(int type, char *buf, int len) >Files iproute2.orig/lib/ll_types.o and iproute2/lib/ll_types.o differ >diff -uNr iproute2.orig/lib/rt_names.c iproute2/lib/rt_names.c >--- iproute2.orig/lib/rt_names.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/rt_names.c 2003-11-26 00:22:41.000000000 +0000 >@@ -95,7 +95,7 @@ > return buf; > } > >-int rtnl_rtprot_a2n(__u32 *id, char *arg) >+int rtnl_rtprot_a2n(int *id, char *arg) > { > static char *cache = NULL; > static unsigned long res; >@@ -162,7 +162,7 @@ > return buf; > } > >-int rtnl_rtscope_a2n(__u32 *id, char *arg) >+int rtnl_rtscope_a2n(int *id, char *arg) > { > static char *cache = NULL; > static unsigned long res; >@@ -226,7 +226,7 @@ > } > > >-int rtnl_rtrealm_a2n(__u32 *id, char *arg) >+int rtnl_rtrealm_a2n(int *id, char *arg) > { > static char *cache = NULL; > static unsigned long res; >@@ -291,7 +291,7 @@ > return buf; > } > >-int rtnl_rttable_a2n(__u32 *id, char *arg) >+int rtnl_rttable_a2n(int *id, char *arg) > { > static char *cache = NULL; > static unsigned long res; >@@ -354,7 +354,7 @@ > } > > >-int rtnl_dsfield_a2n(__u32 *id, char *arg) >+int rtnl_dsfield_a2n(int *id, char *arg) > { > static char *cache = NULL; > static unsigned long res; >Files iproute2.orig/lib/rt_names.o and iproute2/lib/rt_names.o differ >diff -uNr iproute2.orig/lib/utils.c iproute2/lib/utils.c >--- iproute2.orig/lib/utils.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/lib/utils.c 2003-11-26 00:19:35.000000000 +0000 >@@ -57,7 +57,7 @@ > return 0; > } > >-int get_u32(__u32 *val, char *arg, int base) >+int get_u32(uint32_t *val, char *arg, int base) > { > unsigned long res; > char *ptr; >@@ -85,7 +85,7 @@ > return 0; > } > >-int get_u8(__u8 *val, char *arg, int base) >+int get_u8(uint8_t *val, char *arg, int base) > { > unsigned long res; > char *ptr; >@@ -258,7 +258,7 @@ > return 0; > } > >-__u32 get_addr32(char *name) >+uint32_t get_addr32(char *name) > { > inet_prefix addr; > if (get_addr_1(&addr, name, AF_INET)) { >@@ -302,8 +302,8 @@ > > int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits) > { >- __u32 *a1 = a->data; >- __u32 *a2 = b->data; >+ uint32_t *a1 = a->data; >+ uint32_t *a2 = b->data; > int words = bits >> 0x05; > > bits &= 0x1f; >@@ -313,8 +313,8 @@ > return -1; > > if (bits) { >- __u32 w1, w2; >- __u32 mask; >+ uint32_t w1, w2; >+ uint32_t mask; > > w1 = a1[words]; > w2 = a2[words]; >Files iproute2.orig/lib/utils.o and iproute2/lib/utils.o differ >diff -uNr iproute2.orig/tc/f_fw.c iproute2/tc/f_fw.c >--- iproute2.orig/tc/f_fw.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/tc/f_fw.c 2003-11-26 00:17:08.000000000 +0000 >@@ -84,7 +84,7 @@ > return 0; > } > >-static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 handle) >+static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t handle) > { > struct rtattr *tb[TCA_FW_MAX+1]; > >@@ -100,7 +100,7 @@ > > if (tb[TCA_FW_CLASSID]) { > SPRINT_BUF(b1); >- fprintf(f, "classid %s ", sprint_tc_classid(*(__u32*)RTA_DATA(tb[TCA_FW_CLASSID]), b1)); >+ fprintf(f, "classid %s ", sprint_tc_classid(*(uint32_t*)RTA_DATA(tb[TCA_FW_CLASSID]), b1)); > } > > if (tb[TCA_FW_POLICE]) >Files iproute2.orig/tc/f_fw.o and iproute2/tc/f_fw.o differ >diff -uNr iproute2.orig/tc/f_route.c iproute2/tc/f_route.c >--- iproute2.orig/tc/f_route.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/tc/f_route.c 2003-11-26 00:17:08.000000000 +0000 >@@ -39,8 +39,8 @@ > struct tc_police tp; > struct tcmsg *t = NLMSG_DATA(n); > struct rtattr *tail; >- __u32 fh = 0xFFFF8000; >- __u32 order = 0; >+ uint32_t fh = 0xFFFF8000; >+ uint32_t order = 0; > > memset(&tp, 0, sizeof(tp)); > >@@ -59,7 +59,7 @@ > > while (argc > 0) { > if (matches(*argv, "to") == 0) { >- __u32 id; >+ uint32_t id; > NEXT_ARG(); > if (rtnl_rtrealm_a2n(&id, *argv)) { > fprintf(stderr, "Illegal \"to\"\n"); >@@ -69,7 +69,7 @@ > fh &= ~0x80FF; > fh |= id&0xFF; > } else if (matches(*argv, "from") == 0) { >- __u32 id; >+ uint32_t id; > NEXT_ARG(); > if (rtnl_rtrealm_a2n(&id, *argv)) { > fprintf(stderr, "Illegal \"from\"\n"); >@@ -80,7 +80,7 @@ > fh |= id<<16; > } else if (matches(*argv, "fromif") == 0) { > struct rtnl_handle rth; >- __u32 id; >+ uint32_t id; > NEXT_ARG(); > if (rtnl_open(&rth, 0) == 0) { > ll_init_map(&rth); >@@ -135,7 +135,7 @@ > return 0; > } > >-static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 handle) >+static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t handle) > { > struct rtattr *tb[TCA_ROUTE4_MAX+1]; > SPRINT_BUF(b1); >@@ -154,12 +154,12 @@ > > if (tb[TCA_ROUTE4_CLASSID]) { > SPRINT_BUF(b1); >- fprintf(f, "flowid %s ", sprint_tc_classid(*(__u32*)RTA_DATA(tb[TCA_ROUTE4_CLASSID]), b1)); >+ fprintf(f, "flowid %s ", sprint_tc_classid(*(uint32_t*)RTA_DATA(tb[TCA_ROUTE4_CLASSID]), b1)); > } > if (tb[TCA_ROUTE4_TO]) >- fprintf(f, "to %s ", rtnl_rtrealm_n2a(*(__u32*)RTA_DATA(tb[TCA_ROUTE4_TO]), b1, sizeof(b1))); >+ fprintf(f, "to %s ", rtnl_rtrealm_n2a(*(uint32_t*)RTA_DATA(tb[TCA_ROUTE4_TO]), b1, sizeof(b1))); > if (tb[TCA_ROUTE4_FROM]) >- fprintf(f, "from %s ", rtnl_rtrealm_n2a(*(__u32*)RTA_DATA(tb[TCA_ROUTE4_FROM]), b1, sizeof(b1))); >+ fprintf(f, "from %s ", rtnl_rtrealm_n2a(*(uint32_t*)RTA_DATA(tb[TCA_ROUTE4_FROM]), b1, sizeof(b1))); > if (tb[TCA_ROUTE4_IIF]) > fprintf(f, "fromif %s", ll_index_to_name(*(int*)RTA_DATA(tb[TCA_ROUTE4_IIF]))); > if (tb[TCA_ROUTE4_POLICE]) >Files iproute2.orig/tc/f_route.o and iproute2/tc/f_route.o differ >diff -uNr iproute2.orig/tc/f_rsvp.c iproute2/tc/f_rsvp.c >--- iproute2.orig/tc/f_rsvp.c 2003-11-26 00:14:51.000000000 +0000 >+++ iproute2/tc/f_rsvp.c 2003-11-26 00:17:08.000000000 +0000 >@@ -54,11 +54,11 @@ > > if (dir == 0) { > /* Source port: u16 at offset 0 */ >- pi->key = htonl(((__u32)tmp)<<16); >+ pi->key = htonl(((uint32_t)tmp)<<16); > pi->mask = htonl(0xFFFF0000); > } else { > /* Destination port: u16 at offset 2 */ >- pi->key = htonl(((__u32)tmp)); >+ pi->key = htonl(((uint32_t)tmp)); > pi->mask = htonl(0x0000FFFF); > } > pi->offset = 0; >@@ -76,7 +76,7 @@ > > if (strcmp(*argv, "spi/ah") == 0 || > strcmp(*argv, "gpi/ah") == 0) { >- __u32 gpi; >+ uint32_t gpi; > NEXT_ARG(); > if (get_u32(&gpi, *argv, 0)) > return -1; >@@ -88,7 +88,7 @@ > argc--; argv++; > } else if (strcmp(*argv, "spi/esp") == 0 || > strcmp(*argv, "gpi/esp") == 0) { >- __u32 gpi; >+ uint32_t gpi; > NEXT_ARG(); > if (get_u32(&gpi, *argv, 0)) > return -1; >@@ -99,7 +99,7 @@ > pinfo->protocol = IPPROTO_ESP; > argc--; argv++; > } else if (strcmp(*argv, "flowlabel") == 0) { >- __u32 flabel; >+ uint32_t flabel; > NEXT_ARG(); > if (get_u32(&flabel, *argv, 0)) > return -1; >@@ -113,8 +113,8 @@ > strcmp(*argv, "u16") == 0 || > strcmp(*argv, "u8") == 0) { > int sz = 1; >- __u32 tmp; >- __u32 mask = 0xff; >+ uint32_t tmp; >+ uint32_t mask = 0xff; > if (strcmp(*argv, "u32") == 0) { > sz = 4; > mask = 0xffff; >@@ -313,7 +313,7 @@ > return buf; > } > >-static int rsvp_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 handle) >+static int rsvp_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t handle) > { > int family = strcmp(qu->id, "rsvp") == 0 ? AF_INET : AF_INET6; > struct rtattr *tb[TCA_RSVP_MAX+1]; >@@ -339,9 +339,9 @@ > if (tb[TCA_RSVP_CLASSID]) { > SPRINT_BUF(b1); > if (!pinfo || pinfo->tunnelhdr == 0) >- fprintf(f, "flowid %s ", sprint_tc_classid(*(__u32*)RTA_DATA(tb[TCA_RSVP_CLASSID]), b1)); >+ fprintf(f, "flowid %s ", sprint_tc_classid(*(uint32_t*)RTA_DATA(tb[TCA_RSVP_CLASSID]), b1)); > else >- fprintf(f, "tunnel %d skip %d ", *(__u32*)RTA_DATA(tb[TCA_RSVP_CLASSID]), pinfo->tunnelhdr); >+ fprintf(f, "tunnel %d skip %d ", *(uint32_t*)RTA_DATA(tb[TCA_RSVP_CLASSID]), pinfo->tunnelhdr); > } else if (pinfo && pinfo->tunnelhdr) > fprintf(f, "tunnel [BAD] skip %d ", pinfo->tunnelhdr); > >Files iproute2.orig/tc/f_rsvp.o and iproute2/tc/f_rsvp.o differ >diff -uNr iproute2.orig/tc/f_tcindex.c iproute2/tc/f_tcindex.c >--- iproute2.orig/tc/f_tcindex.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/f_tcindex.c 2003-11-26 00:17:08.000000000 +0000 >@@ -93,7 +93,7 @@ > sizeof(value)); > } > else if (!strcmp(*argv,"classid")) { >- __u32 handle; >+ uint32_t handle; > > NEXT_ARG(); > if (get_tc_classid(&handle,*argv)) { >@@ -123,7 +123,7 @@ > > > static int tcindex_print_opt(struct filter_util *qu, FILE *f, >- struct rtattr *opt, __u32 handle) >+ struct rtattr *opt, uint32_t handle) > { > struct rtattr *tb[TCA_TCINDEX_MAX+1]; > >@@ -168,7 +168,7 @@ > } > if (tb[TCA_TCINDEX_CLASSID]) { > SPRINT_BUF(b1); >- fprintf(f, "classid %s ",sprint_tc_classid(*(__u32 *) >+ fprintf(f, "classid %s ",sprint_tc_classid(*(uint32_t *) > RTA_DATA(tb[TCA_TCINDEX_CLASSID]), b1)); > } > if (tb[TCA_TCINDEX_POLICE]) { >Files iproute2.orig/tc/f_tcindex.o and iproute2/tc/f_tcindex.o differ >diff -uNr iproute2.orig/tc/f_u32.c iproute2/tc/f_u32.c >--- iproute2.orig/tc/f_u32.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/f_u32.c 2003-11-26 00:17:08.000000000 +0000 >@@ -38,9 +38,9 @@ > > #define usage() return(-1) > >-int get_u32_handle(__u32 *handle, char *str) >+int get_u32_handle(uint32_t *handle, char *str) > { >- __u32 htid=0, hash=0, nodeid=0; >+ uint32_t htid=0, hash=0, nodeid=0; > char *tmp = strchr(str, ':'); > > if (tmp == NULL) { >@@ -73,12 +73,12 @@ > return 0; > } > >-char * sprint_u32_handle(__u32 handle, char *buf) >+char * sprint_u32_handle(uint32_t handle, char *buf) > { > int bsize = SPRINT_BSIZE-1; >- __u32 htid = TC_U32_HTID(handle); >- __u32 hash = TC_U32_HASH(handle); >- __u32 nodeid = TC_U32_NODE(handle); >+ uint32_t htid = TC_U32_HTID(handle); >+ uint32_t hash = TC_U32_HASH(handle); >+ uint32_t nodeid = TC_U32_NODE(handle); > char *b = buf; > > if (handle == 0) { >@@ -107,7 +107,7 @@ > return buf; > } > >-static int pack_key(struct tc_u32_sel *sel, __u32 key, __u32 mask, int off, int offmask) >+static int pack_key(struct tc_u32_sel *sel, uint32_t key, uint32_t mask, int off, int offmask) > { > int i; > int hwm = sel->nkeys; >@@ -116,7 +116,7 @@ > > for (i=0; i<hwm; i++) { > if (sel->keys[i].off == off && sel->keys[i].offmask == offmask) { >- __u32 intersect = mask&sel->keys[i].mask; >+ uint32_t intersect = mask&sel->keys[i].mask; > > if ((key^sel->keys[i].val) & intersect) > return -1; >@@ -138,14 +138,14 @@ > return 0; > } > >-static int pack_key32(struct tc_u32_sel *sel, __u32 key, __u32 mask, int off, int offmask) >+static int pack_key32(struct tc_u32_sel *sel, uint32_t key, uint32_t mask, int off, int offmask) > { > key = htonl(key); > mask = htonl(mask); > return pack_key(sel, key, mask, off, offmask); > } > >-static int pack_key16(struct tc_u32_sel *sel, __u32 key, __u32 mask, int off, int offmask) >+static int pack_key16(struct tc_u32_sel *sel, uint32_t key, uint32_t mask, int off, int offmask) > { > if (key > 0xFFFF || mask > 0xFFFF) > return -1; >@@ -161,7 +161,7 @@ > return pack_key(sel, key, mask, off, offmask); > } > >-static int pack_key8(struct tc_u32_sel *sel, __u32 key, __u32 mask, int off, int offmask) >+static int pack_key8(struct tc_u32_sel *sel, uint32_t key, uint32_t mask, int off, int offmask) > { > if (key > 0xFF || mask > 0xFF) > return -1; >@@ -218,8 +218,8 @@ > int res = -1; > int argc = *argc_p; > char **argv = *argv_p; >- __u32 key; >- __u32 mask; >+ uint32_t key; >+ uint32_t mask; > > if (argc < 2) > return -1; >@@ -249,8 +249,8 @@ > int res = -1; > int argc = *argc_p; > char **argv = *argv_p; >- __u32 key; >- __u32 mask; >+ uint32_t key; >+ uint32_t mask; > > if (argc < 2) > return -1; >@@ -279,8 +279,8 @@ > int res = -1; > int argc = *argc_p; > char **argv = *argv_p; >- __u32 key; >- __u32 mask; >+ uint32_t key; >+ uint32_t mask; > > if (argc < 2) > return -1; >@@ -314,7 +314,7 @@ > int argc = *argc_p; > char **argv = *argv_p; > inet_prefix addr; >- __u32 mask; >+ uint32_t mask; > int offmask = 0; > > if (argc < 1) >@@ -371,7 +371,7 @@ > if ((res = pack_key(sel, addr.data[i/32], 0xFFFFFFFF, off+4*(i/32), offmask)) < 0) > return -1; > } else if (i<plen) { >- __u32 mask = htonl(0xFFFFFFFF<<(32-(plen-i))); >+ uint32_t mask = htonl(0xFFFFFFFF<<(32-(plen-i))); > if ((res = pack_key(sel, addr.data[i/32], mask, off+4*(i/32), offmask)) < 0) > return -1; > } >@@ -705,7 +705,7 @@ > > while (argc > 0) { > if (matches(*argv, "mask") == 0) { >- __u32 mask; >+ uint32_t mask; > NEXT_ARG(); > if (get_u32(&mask, *argv, 16)) > return -1; >@@ -739,8 +739,8 @@ > struct rtattr *tail; > int sel_ok = 0; > int sample_ok = 0; >- __u32 htid = 0; >- __u32 order = 0; >+ uint32_t htid = 0; >+ uint32_t order = 0; > > memset(&sel, 0, sizeof(sel)); > >@@ -831,7 +831,7 @@ > else > htid = (handle&0xFFFFF000); > } else if (strcmp(*argv, "sample") == 0) { >- __u32 hash; >+ uint32_t hash; > struct { > struct tc_u32_sel sel; > struct tc_u32_key keys[4]; >@@ -885,7 +885,7 @@ > return 0; > } > >-static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 handle) >+static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t handle) > { > struct rtattr *tb[TCA_U32_MAX+1]; > struct tc_u32_sel *sel = NULL; >@@ -913,9 +913,9 @@ > } > > if (tb[TCA_U32_DIVISOR]) { >- fprintf(f, "ht divisor %d ", *(__u32*)RTA_DATA(tb[TCA_U32_DIVISOR])); >+ fprintf(f, "ht divisor %d ", *(uint32_t*)RTA_DATA(tb[TCA_U32_DIVISOR])); > } else if (tb[TCA_U32_HASH]) { >- __u32 htid = *(__u32*)RTA_DATA(tb[TCA_U32_HASH]); >+ uint32_t htid = *(uint32_t*)RTA_DATA(tb[TCA_U32_HASH]); > fprintf(f, "key ht %x bkt %x ", TC_U32_USERHTID(htid), TC_U32_HASH(htid)); > } else { > fprintf(f, "??? "); >@@ -924,13 +924,13 @@ > SPRINT_BUF(b1); > fprintf(f, "%sflowid %s ", > !sel || !(sel->flags&TC_U32_TERMINAL) ? "*" : "", >- sprint_tc_classid(*(__u32*)RTA_DATA(tb[TCA_U32_CLASSID]), b1)); >+ sprint_tc_classid(*(uint32_t*)RTA_DATA(tb[TCA_U32_CLASSID]), b1)); > } else if (sel && sel->flags&TC_U32_TERMINAL) { > fprintf(f, "terminal flowid ??? "); > } > if (tb[TCA_U32_LINK]) { > SPRINT_BUF(b1); >- fprintf(f, "link %s ", sprint_u32_handle(*(__u32*)RTA_DATA(tb[TCA_U32_LINK]), b1)); >+ fprintf(f, "link %s ", sprint_u32_handle(*(uint32_t*)RTA_DATA(tb[TCA_U32_LINK]), b1)); > } > if (tb[TCA_U32_POLICE]) { > fprintf(f, "\n"); >Files iproute2.orig/tc/f_u32.o and iproute2/tc/f_u32.o differ >Files iproute2.orig/tc/libtc.a and iproute2/tc/libtc.a differ >Files iproute2.orig/tc/m_estimator.o and iproute2/tc/m_estimator.o differ >diff -uNr iproute2.orig/tc/m_police.c iproute2/tc/m_police.c >--- iproute2.orig/tc/m_police.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/m_police.c 2003-11-26 00:17:08.000000000 +0000 >@@ -114,9 +114,9 @@ > int res = -1; > int ok=0; > struct tc_police p; >- __u32 rtab[256]; >- __u32 ptab[256]; >- __u32 avrate = 0; >+ uint32_t rtab[256]; >+ uint32_t ptab[256]; >+ uint32_t avrate = 0; > int presult = 0; > unsigned buffer=0, mtu=0, mpu=0; > int Rcell_log=-1, Pcell_log = -1; >@@ -321,7 +321,7 @@ > if (p->peakrate.rate) > fprintf(f, "peakrate %s ", sprint_rate(p->peakrate.rate, b1)); > if (tb[TCA_POLICE_AVRATE]) >- fprintf(f, "avrate %s ", sprint_rate(*(__u32*)RTA_DATA(tb[TCA_POLICE_AVRATE]), b1)); >+ fprintf(f, "avrate %s ", sprint_rate(*(uint32_t*)RTA_DATA(tb[TCA_POLICE_AVRATE]), b1)); > > return 0; > } >Files iproute2.orig/tc/m_police.o and iproute2/tc/m_police.o differ >diff -uNr iproute2.orig/tc/q_atm.c iproute2/tc/q_atm.c >--- iproute2.orig/tc/q_atm.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_atm.c 2003-11-26 00:17:08.000000000 +0000 >@@ -55,7 +55,7 @@ > struct atm_qos qos; > struct atm_sap sap; > unsigned char hdr[MAX_HDR_LEN]; >- __u32 excess = 0; >+ uint32_t excess = 0; > struct rtattr *tail; > int sndbuf = 0; > int hdr_len = -1; >@@ -220,12 +220,12 @@ > fprintf(f," "); > } > if (tb[TCA_ATM_EXCESS]) { >- __u32 excess; >+ uint32_t excess; > > if (RTA_PAYLOAD(tb[TCA_ATM_EXCESS]) < sizeof(excess)) > fprintf(stderr,"ATM: excess class ID too short\n"); > else { >- excess = *(__u32 *) RTA_DATA(tb[TCA_ATM_EXCESS]); >+ excess = *(uint32_t *) RTA_DATA(tb[TCA_ATM_EXCESS]); > if (!excess) fprintf(f,"excess clp "); > else { > char buf[64]; >diff -uNr iproute2.orig/tc/q_cbq.c iproute2/tc/q_cbq.c >--- iproute2.orig/tc/q_cbq.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_cbq.c 2003-11-26 00:17:08.000000000 +0000 >@@ -51,7 +51,7 @@ > { > struct tc_ratespec r; > struct tc_cbq_lssopt lss; >- __u32 rtab[256]; >+ uint32_t rtab[256]; > unsigned mpu=0, avpkt=0, allot=0; > int cell_log=-1; > int ewma_log=-1; >@@ -174,7 +174,7 @@ > struct tc_cbq_wrropt wrr; > struct tc_cbq_fopt fopt; > struct tc_cbq_ovl ovl; >- __u32 rtab[256]; >+ uint32_t rtab[256]; > unsigned mpu=0; > int cell_log=-1; > int ewma_log=-1; >Files iproute2.orig/tc/q_cbq.o and iproute2/tc/q_cbq.o differ >diff -uNr iproute2.orig/tc/q_dsmark.c iproute2/tc/q_dsmark.c >--- iproute2.orig/tc/q_dsmark.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_dsmark.c 2003-11-26 00:19:35.000000000 +0000 >@@ -95,7 +95,7 @@ > struct nlmsghdr *n) > { > struct rtattr *tail; >- __u8 tmp; >+ uint8_t tmp; > char *end; > > tail = (struct rtattr *) (((void *) n)+NLMSG_ALIGN(n->nlmsg_len)); >@@ -143,13 +143,13 @@ > if (!RTA_PAYLOAD(tb[TCA_DSMARK_MASK])) > fprintf(stderr,"dsmark: empty mask\n"); > else fprintf(f,"mask 0x%02x ", >- *(__u8 *) RTA_DATA(tb[TCA_DSMARK_MASK])); >+ *(uint8_t *) RTA_DATA(tb[TCA_DSMARK_MASK])); > } > if (tb[TCA_DSMARK_VALUE]) { > if (!RTA_PAYLOAD(tb[TCA_DSMARK_VALUE])) > fprintf(stderr,"dsmark: empty value\n"); > else fprintf(f,"value 0x%02x ", >- *(__u8 *) RTA_DATA(tb[TCA_DSMARK_VALUE])); >+ *(uint8_t *) RTA_DATA(tb[TCA_DSMARK_VALUE])); > } > if (tb[TCA_DSMARK_INDICES]) { > if (RTA_PAYLOAD(tb[TCA_DSMARK_INDICES]) < sizeof(__u16)) >Files iproute2.orig/tc/q_dsmark.o and iproute2/tc/q_dsmark.o differ >Files iproute2.orig/tc/q_fifo.o and iproute2/tc/q_fifo.o differ >diff -uNr iproute2.orig/tc/q_gred.c iproute2/tc/q_gred.c >--- iproute2.orig/tc/q_gred.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_gred.c 2003-11-26 00:19:35.000000000 +0000 >@@ -125,7 +125,7 @@ > double probability = 0.02; > unsigned rate = 0; > int wlog; >- __u8 sbuf[256]; >+ uint8_t sbuf[256]; > struct rtattr *tail; > > memset(&opt, 0, sizeof(opt)); >Files iproute2.orig/tc/q_gred.o and iproute2/tc/q_gred.o differ >diff -uNr iproute2.orig/tc/q_htb.c iproute2/tc/q_htb.c >--- iproute2.orig/tc/q_htb.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_htb.c 2003-11-26 00:17:08.000000000 +0000 >@@ -100,7 +100,7 @@ > { > int ok=0; > struct tc_htb_opt opt; >- __u32 rtab[256],ctab[256]; >+ uint32_t rtab[256],ctab[256]; > unsigned buffer=0,cbuffer=0; > int cell_log=-1,ccell_log = -1,mtu; > struct rtattr *tail; >Files iproute2.orig/tc/q_htb.o and iproute2/tc/q_htb.o differ >Files iproute2.orig/tc/q_ingress.o and iproute2/tc/q_ingress.o differ >Files iproute2.orig/tc/q_prio.o and iproute2/tc/q_prio.o differ >diff -uNr iproute2.orig/tc/q_red.c iproute2/tc/q_red.c >--- iproute2.orig/tc/q_red.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_red.c 2003-11-26 00:19:35.000000000 +0000 >@@ -43,7 +43,7 @@ > unsigned rate = 0; > int ecn_ok = 0; > int wlog; >- __u8 sbuf[256]; >+ uint8_t sbuf[256]; > struct rtattr *tail; > > memset(&opt, 0, sizeof(opt)); >Files iproute2.orig/tc/q_red.o and iproute2/tc/q_red.o differ >Files iproute2.orig/tc/q_sfq.o and iproute2/tc/q_sfq.o differ >diff -uNr iproute2.orig/tc/q_tbf.c iproute2/tc/q_tbf.c >--- iproute2.orig/tc/q_tbf.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/q_tbf.c 2003-11-26 00:17:08.000000000 +0000 >@@ -41,8 +41,8 @@ > { > int ok=0; > struct tc_tbf_qopt opt; >- __u32 rtab[256]; >- __u32 ptab[256]; >+ uint32_t rtab[256]; >+ uint32_t ptab[256]; > unsigned buffer=0, mtu=0, mpu=0, latency=0; > int Rcell_log=-1, Pcell_log = -1; > struct rtattr *tail; >Files iproute2.orig/tc/q_tbf.o and iproute2/tc/q_tbf.o differ >Files iproute2.orig/tc/tc and iproute2/tc/tc differ >diff -uNr iproute2.orig/tc/tc.c iproute2/tc/tc.c >--- iproute2.orig/tc/tc.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc.c 2003-11-26 00:17:08.000000000 +0000 >@@ -55,7 +55,7 @@ > return 0; > } > >-static int print_nofopt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 fhandle) >+static int print_nofopt(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t fhandle) > { > if (opt && RTA_PAYLOAD(opt)) > fprintf(f, "fh %08x [Unknown filter, optlen=%u] ", fhandle, RTA_PAYLOAD(opt)); >@@ -66,7 +66,7 @@ > > static int parse_nofopt(struct filter_util *qu, char *fhandle, int argc, char **argv, struct nlmsghdr *n) > { >- __u32 handle; >+ uint32_t handle; > > if (argc) { > fprintf(stderr, "Unknown filter \"%s\", hence option \"%s\" is unparsable\n", qu->id, *argv); >Files iproute2.orig/tc/tc.o and iproute2/tc/tc.o differ >Files iproute2.orig/tc/tc_cbq.o and iproute2/tc/tc_cbq.o differ >diff -uNr iproute2.orig/tc/tc_class.c iproute2/tc/tc_class.c >--- iproute2.orig/tc/tc_class.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_class.c 2003-11-26 00:17:08.000000000 +0000 >@@ -70,7 +70,7 @@ > duparg("dev", *argv); > strncpy(d, *argv, sizeof(d)-1); > } else if (strcmp(*argv, "classid") == 0) { >- __u32 handle; >+ uint32_t handle; > NEXT_ARG(); > if (req.t.tcm_handle) > duparg("classid", *argv); >@@ -84,7 +84,7 @@ > } > req.t.tcm_parent = TC_H_ROOT; > } else if (strcmp(*argv, "parent") == 0) { >- __u32 handle; >+ uint32_t handle; > NEXT_ARG(); > if (req.t.tcm_parent) > duparg("parent", *argv); >@@ -174,7 +174,7 @@ > } > > int filter_ifindex; >-__u32 filter_qdisc; >+uint32_t filter_qdisc; > > int print_class(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) > { >@@ -287,7 +287,7 @@ > } > t.tcm_parent = TC_H_ROOT; > } else if (strcmp(*argv, "parent") == 0) { >- __u32 handle; >+ uint32_t handle; > if (t.tcm_parent) > duparg("parent", *argv); > NEXT_ARG(); >Files iproute2.orig/tc/tc_class.o and iproute2/tc/tc_class.o differ >diff -uNr iproute2.orig/tc/tc_core.c iproute2/tc/tc_core.c >--- iproute2.orig/tc/tc_core.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_core.c 2003-11-26 00:17:08.000000000 +0000 >@@ -23,8 +23,8 @@ > > #include "tc_core.h" > >-static __u32 t2us=1; >-static __u32 us2t=1; >+static uint32_t t2us=1; >+static uint32_t us2t=1; > static double tick_in_usec = 1; > > long tc_core_usec2tick(long usec) >@@ -46,7 +46,7 @@ > rtab[pkt_len>>cell_log] = pkt_xmit_time > */ > >-int tc_calc_rtable(unsigned bps, __u32 *rtab, int cell_log, unsigned mtu, >+int tc_calc_rtable(unsigned bps, uint32_t *rtab, int cell_log, unsigned mtu, > unsigned mpu) > { > int i; >diff -uNr iproute2.orig/tc/tc_core.h iproute2/tc/tc_core.h >--- iproute2.orig/tc/tc_core.h 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_core.h 2003-11-26 00:17:08.000000000 +0000 >@@ -7,7 +7,7 @@ > long tc_core_usec2tick(long usec); > long tc_core_tick2usec(long tick); > unsigned tc_calc_xmittime(unsigned rate, unsigned size); >-int tc_calc_rtable(unsigned bps, __u32 *rtab, int cell_log, unsigned mtu, unsigned mpu); >+int tc_calc_rtable(unsigned bps, uint32_t *rtab, int cell_log, unsigned mtu, unsigned mpu); > > int tc_setup_estimator(unsigned A, unsigned time_const, struct tc_estimator *est); > >Files iproute2.orig/tc/tc_core.o and iproute2/tc/tc_core.o differ >Files iproute2.orig/tc/tc_estimator.o and iproute2/tc/tc_estimator.o differ >diff -uNr iproute2.orig/tc/tc_filter.c iproute2/tc/tc_filter.c >--- iproute2.orig/tc/tc_filter.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_filter.c 2003-11-26 00:17:08.000000000 +0000 >@@ -56,8 +56,8 @@ > char buf[4096]; > } req; > struct filter_util *q = NULL; >- __u32 prio = 0; >- __u32 protocol = 0; >+ uint32_t prio = 0; >+ uint32_t protocol = 0; > char *fhandle = NULL; > char d[16]; > char k[16]; >@@ -87,7 +87,7 @@ > } > req.t.tcm_parent = TC_H_ROOT; > } else if (strcmp(*argv, "parent") == 0) { >- __u32 handle; >+ uint32_t handle; > NEXT_ARG(); > if (req.t.tcm_parent) > duparg("parent", *argv); >@@ -176,10 +176,10 @@ > return 0; > } > >-static __u32 filter_parent; >+static uint32_t filter_parent; > static int filter_ifindex; >-static __u32 filter_prio; >-static __u32 filter_protocol; >+static uint32_t filter_prio; >+static uint32_t filter_protocol; > > int print_filter(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) > { >@@ -224,8 +224,8 @@ > } > } > if (t->tcm_info) { >- __u32 protocol = TC_H_MIN(t->tcm_info); >- __u32 prio = TC_H_MAJ(t->tcm_info)>>16; >+ uint32_t protocol = TC_H_MIN(t->tcm_info); >+ uint32_t prio = TC_H_MAJ(t->tcm_info)>>16; > if (!filter_protocol || filter_protocol != protocol) { > if (protocol) { > SPRINT_BUF(b1); >@@ -267,8 +267,8 @@ > struct tcmsg t; > struct rtnl_handle rth; > char d[16]; >- __u32 prio = 0; >- __u32 protocol = 0; >+ uint32_t prio = 0; >+ uint32_t protocol = 0; > char *fhandle = NULL; > > memset(&t, 0, sizeof(t)); >@@ -288,7 +288,7 @@ > } > filter_parent = t.tcm_parent = TC_H_ROOT; > } else if (strcmp(*argv, "parent") == 0) { >- __u32 handle; >+ uint32_t handle; > NEXT_ARG(); > if (t.tcm_parent) > duparg("parent", *argv); >Files iproute2.orig/tc/tc_filter.o and iproute2/tc/tc_filter.o differ >diff -uNr iproute2.orig/tc/tc_qdisc.c iproute2/tc/tc_qdisc.c >--- iproute2.orig/tc/tc_qdisc.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_qdisc.c 2003-11-26 00:29:25.000000000 +0000 >@@ -20,6 +20,7 @@ > #include <arpa/inet.h> > #include <string.h> > #include <math.h> >+#include <linux/stddef.h> > > #include "utils.h" > #include "tc_util.h" >@@ -71,7 +72,7 @@ > duparg("dev", *argv); > strncpy(d, *argv, sizeof(d)-1); > } else if (strcmp(*argv, "handle") == 0) { >- __u32 handle; >+ uint32_t handle; > if (req.t.tcm_handle) > duparg("handle", *argv); > NEXT_ARG(); >@@ -95,7 +96,7 @@ > q = get_qdisc_kind(k); > #endif > } else if (strcmp(*argv, "parent") == 0) { >- __u32 handle; >+ uint32_t handle; > NEXT_ARG(); > if (req.t.tcm_parent) > duparg("parent", *argv); >Files iproute2.orig/tc/tc_qdisc.o and iproute2/tc/tc_qdisc.o differ >diff -uNr iproute2.orig/tc/tc_red.c iproute2/tc/tc_red.c >--- iproute2.orig/tc/tc_red.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_red.c 2003-11-26 00:19:35.000000000 +0000 >@@ -69,7 +69,7 @@ > Stab[t>>Scell_log] = -log(1-W) * t/xmit_time > */ > >-int tc_red_eval_idle_damping(int Wlog, unsigned avpkt, unsigned bps, __u8 *sbuf) >+int tc_red_eval_idle_damping(int Wlog, unsigned avpkt, unsigned bps, uint8_t *sbuf) > { > double xmit_time = tc_core_usec2tick(1000000*(double)avpkt/bps); > double lW = -log(1.0 - 1.0/(1<<Wlog))/xmit_time; >diff -uNr iproute2.orig/tc/tc_red.h iproute2/tc/tc_red.h >--- iproute2.orig/tc/tc_red.h 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_red.h 2003-11-26 00:19:35.000000000 +0000 >@@ -3,6 +3,6 @@ > > extern int tc_red_eval_P(unsigned qmin, unsigned qmax, double prob); > extern int tc_red_eval_ewma(unsigned qmin, unsigned burst, unsigned avpkt); >-extern int tc_red_eval_idle_damping(int wlog, unsigned avpkt, unsigned bandwidth, __u8 *sbuf); >+extern int tc_red_eval_idle_damping(int wlog, unsigned avpkt, unsigned bandwidth, uint8_t *sbuf); > > #endif >Files iproute2.orig/tc/tc_red.o and iproute2/tc/tc_red.o differ >diff -uNr iproute2.orig/tc/tc_util.c iproute2/tc/tc_util.c >--- iproute2.orig/tc/tc_util.c 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_util.c 2003-11-26 00:17:08.000000000 +0000 >@@ -24,9 +24,9 @@ > #include "utils.h" > #include "tc_util.h" > >-int get_qdisc_handle(__u32 *h, char *str) >+int get_qdisc_handle(uint32_t *h, char *str) > { >- __u32 maj; >+ uint32_t maj; > char *p; > > maj = TC_H_UNSPEC; >@@ -43,9 +43,9 @@ > return 0; > } > >-int get_tc_classid(__u32 *h, char *str) >+int get_tc_classid(uint32_t *h, char *str) > { >- __u32 maj, min; >+ uint32_t maj, min; > char *p; > > maj = TC_H_ROOT; >@@ -75,7 +75,7 @@ > return 0; > } > >-int print_tc_classid(char *buf, int len, __u32 h) >+int print_tc_classid(char *buf, int len, uint32_t h) > { > if (h == TC_H_ROOT) > sprintf(buf, "root"); >@@ -90,7 +90,7 @@ > return 0; > } > >-char * sprint_tc_classid(__u32 h, char *buf) >+char * sprint_tc_classid(uint32_t h, char *buf) > { > if (print_tc_classid(buf, SPRINT_BSIZE-1, h)) > strcpy(buf, "???"); >@@ -154,7 +154,7 @@ > } > > >-int print_rate(char *buf, int len, __u32 rate) >+int print_rate(char *buf, int len, uint32_t rate) > { > double tmp = (double)rate*8; > >@@ -167,7 +167,7 @@ > return 0; > } > >-char * sprint_rate(__u32 rate, char *buf) >+char * sprint_rate(uint32_t rate, char *buf) > { > if (print_rate(buf, SPRINT_BSIZE-1, rate)) > strcpy(buf, "???"); >@@ -202,7 +202,7 @@ > } > > >-int print_usecs(char *buf, int len, __u32 usec) >+int print_usecs(char *buf, int len, uint32_t usec) > { > double tmp = usec; > >@@ -215,7 +215,7 @@ > return 0; > } > >-char * sprint_usecs(__u32 usecs, char *buf) >+char * sprint_usecs(uint32_t usecs, char *buf) > { > if (print_usecs(buf, SPRINT_BSIZE-1, usecs)) > strcpy(buf, "???"); >@@ -277,7 +277,7 @@ > return 0; > } > >-int print_size(char *buf, int len, __u32 sz) >+int print_size(char *buf, int len, uint32_t sz) > { > double tmp = sz; > >@@ -290,20 +290,20 @@ > return 0; > } > >-char * sprint_size(__u32 size, char *buf) >+char * sprint_size(uint32_t size, char *buf) > { > if (print_size(buf, SPRINT_BSIZE-1, size)) > strcpy(buf, "???"); > return buf; > } > >-int print_qdisc_handle(char *buf, int len, __u32 h) >+int print_qdisc_handle(char *buf, int len, uint32_t h) > { > snprintf(buf, len, "%x:", TC_H_MAJ(h)>>16); > return 0; > } > >-char * sprint_qdisc_handle(__u32 h, char *buf) >+char * sprint_qdisc_handle(uint32_t h, char *buf) > { > if (print_qdisc_handle(buf, SPRINT_BSIZE-1, h)) > strcpy(buf, "???"); >diff -uNr iproute2.orig/tc/tc_util.h iproute2/tc/tc_util.h >--- iproute2.orig/tc/tc_util.h 2003-11-26 00:14:52.000000000 +0000 >+++ iproute2/tc/tc_util.h 2003-11-26 00:17:08.000000000 +0000 >@@ -22,33 +22,33 @@ > struct filter_util *next; > char id[16]; > 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); >+ int (*print_fopt)(struct filter_util *qu, FILE *f, struct rtattr *opt, uint32_t fhandle); > }; > > > extern struct qdisc_util *get_qdisc_kind(char *str); > extern struct filter_util *get_filter_kind(char *str); > >-extern int get_qdisc_handle(__u32 *h, char *str); >+extern int get_qdisc_handle(uint32_t *h, char *str); > extern int get_rate(unsigned *rate, char *str); > extern int get_size(unsigned *size, char *str); > extern int get_size_and_cell(unsigned *size, int *cell_log, char *str); > extern int get_usecs(unsigned *usecs, char *str); >-extern int print_rate(char *buf, int len, __u32 rate); >-extern int print_size(char *buf, int len, __u32 size); >-extern int print_qdisc_handle(char *buf, int len, __u32 h); >-extern int print_usecs(char *buf, int len, __u32 usecs); >-extern char * sprint_rate(__u32 rate, char *buf); >-extern char * sprint_size(__u32 size, char *buf); >-extern char * sprint_qdisc_handle(__u32 h, char *buf); >-extern char * sprint_tc_classid(__u32 h, char *buf); >-extern char * sprint_usecs(__u32 usecs, char *buf); >+extern int print_rate(char *buf, int len, uint32_t rate); >+extern int print_size(char *buf, int len, uint32_t size); >+extern int print_qdisc_handle(char *buf, int len, uint32_t h); >+extern int print_usecs(char *buf, int len, uint32_t usecs); >+extern char * sprint_rate(uint32_t rate, char *buf); >+extern char * sprint_size(uint32_t size, char *buf); >+extern char * sprint_qdisc_handle(uint32_t h, char *buf); >+extern char * sprint_tc_classid(uint32_t h, char *buf); >+extern char * sprint_usecs(uint32_t usecs, char *buf); > > extern void print_tcstats(FILE *fp, struct tc_stats *st); > >-extern int get_tc_classid(__u32 *h, char *str); >-extern int print_tc_classid(char *buf, int len, __u32 h); >-extern char * sprint_tc_classid(__u32 h, char *buf); >+extern int get_tc_classid(uint32_t *h, char *str); >+extern int print_tc_classid(char *buf, int len, uint32_t h); >+extern char * sprint_tc_classid(uint32_t h, char *buf); > > extern int tc_print_police(FILE *f, struct rtattr *tb); > extern int parse_police(int *, char ***, int, struct nlmsghdr *); >Files iproute2.orig/tc/tc_util.o and iproute2/tc/tc_util.o differ
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34377
: 21295