aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:37:41 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:17 -0400
commit734ab87f632e94dfd4299f4d4d1d10668548f9d8 (patch)
treeda5225f270efbb1e345c9967626893227e6806bf /net/ipv4/udp.c
parent4e7e0c7592cafe5453e5b2f115fc0065d11b3d44 (diff)
[UDP] net/ipv4/udp.c: trivial annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index b63fd3d3902..6d6142f9c47 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -243,8 +243,8 @@ static void udp_v4_unhash(struct sock *sk)
243/* UDP is nearly always wildcards out the wazoo, it makes no sense to try 243/* UDP is nearly always wildcards out the wazoo, it makes no sense to try
244 * harder than this. -DaveM 244 * harder than this. -DaveM
245 */ 245 */
246static struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport, 246static struct sock *udp_v4_lookup_longway(__be32 saddr, __be16 sport,
247 u32 daddr, u16 dport, int dif) 247 __be32 daddr, __be16 dport, int dif)
248{ 248{
249 struct sock *sk, *result = NULL; 249 struct sock *sk, *result = NULL;
250 struct hlist_node *node; 250 struct hlist_node *node;
@@ -288,8 +288,8 @@ static struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport,
288 return result; 288 return result;
289} 289}
290 290
291static __inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport, 291static __inline__ struct sock *udp_v4_lookup(__be32 saddr, __be16 sport,
292 u32 daddr, u16 dport, int dif) 292 __be32 daddr, __be16 dport, int dif)
293{ 293{
294 struct sock *sk; 294 struct sock *sk;
295 295
@@ -302,8 +302,8 @@ static __inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport,
302} 302}
303 303
304static inline struct sock *udp_v4_mcast_next(struct sock *sk, 304static inline struct sock *udp_v4_mcast_next(struct sock *sk,
305 u16 loc_port, u32 loc_addr, 305 __be16 loc_port, __be32 loc_addr,
306 u16 rmt_port, u32 rmt_addr, 306 __be16 rmt_port, __be32 rmt_addr,
307 int dif) 307 int dif)
308{ 308{
309 struct hlist_node *node; 309 struct hlist_node *node;
@@ -498,7 +498,7 @@ out:
498} 498}
499 499
500 500
501static unsigned short udp_check(struct udphdr *uh, int len, unsigned long saddr, unsigned long daddr, unsigned long base) 501static unsigned short udp_check(struct udphdr *uh, int len, __be32 saddr, __be32 daddr, unsigned long base)
502{ 502{
503 return(csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, base)); 503 return(csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, base));
504} 504}
@@ -514,7 +514,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
514 int free = 0; 514 int free = 0;
515 int connected = 0; 515 int connected = 0;
516 __be32 daddr, faddr, saddr; 516 __be32 daddr, faddr, saddr;
517 u16 dport; 517 __be16 dport;
518 u8 tos; 518 u8 tos;
519 int err; 519 int err;
520 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; 520 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE;
@@ -931,7 +931,7 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
931 int iphlen, len; 931 int iphlen, len;
932 932
933 __u8 *udpdata = (__u8 *)uh + sizeof(struct udphdr); 933 __u8 *udpdata = (__u8 *)uh + sizeof(struct udphdr);
934 __u32 *udpdata32 = (__u32 *)udpdata; 934 __be32 *udpdata32 = (__be32 *)udpdata;
935 __u16 encap_type = up->encap_type; 935 __u16 encap_type = up->encap_type;
936 936
937 /* if we're overly short, let UDP handle it */ 937 /* if we're overly short, let UDP handle it */
@@ -1080,7 +1080,7 @@ static int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
1080 * so we don't need to lock the hashes. 1080 * so we don't need to lock the hashes.
1081 */ 1081 */
1082static int udp_v4_mcast_deliver(struct sk_buff *skb, struct udphdr *uh, 1082static int udp_v4_mcast_deliver(struct sk_buff *skb, struct udphdr *uh,
1083 u32 saddr, u32 daddr) 1083 __be32 saddr, __be32 daddr)
1084{ 1084{
1085 struct sock *sk; 1085 struct sock *sk;
1086 int dif; 1086 int dif;
@@ -1121,7 +1121,7 @@ static int udp_v4_mcast_deliver(struct sk_buff *skb, struct udphdr *uh,
1121 * including udp header and folding it to skb->csum. 1121 * including udp header and folding it to skb->csum.
1122 */ 1122 */
1123static void udp_checksum_init(struct sk_buff *skb, struct udphdr *uh, 1123static void udp_checksum_init(struct sk_buff *skb, struct udphdr *uh,
1124 unsigned short ulen, u32 saddr, u32 daddr) 1124 unsigned short ulen, __be32 saddr, __be32 daddr)
1125{ 1125{
1126 if (uh->check == 0) { 1126 if (uh->check == 0) {
1127 skb->ip_summed = CHECKSUM_UNNECESSARY; 1127 skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -1146,8 +1146,8 @@ int udp_rcv(struct sk_buff *skb)
1146 struct udphdr *uh; 1146 struct udphdr *uh;
1147 unsigned short ulen; 1147 unsigned short ulen;
1148 struct rtable *rt = (struct rtable*)skb->dst; 1148 struct rtable *rt = (struct rtable*)skb->dst;
1149 u32 saddr = skb->nh.iph->saddr; 1149 __be32 saddr = skb->nh.iph->saddr;
1150 u32 daddr = skb->nh.iph->daddr; 1150 __be32 daddr = skb->nh.iph->daddr;
1151 int len = skb->len; 1151 int len = skb->len;
1152 1152
1153 /* 1153 /*
@@ -1563,8 +1563,8 @@ void udp_proc_unregister(struct udp_seq_afinfo *afinfo)
1563static void udp4_format_sock(struct sock *sp, char *tmpbuf, int bucket) 1563static void udp4_format_sock(struct sock *sp, char *tmpbuf, int bucket)
1564{ 1564{
1565 struct inet_sock *inet = inet_sk(sp); 1565 struct inet_sock *inet = inet_sk(sp);
1566 unsigned int dest = inet->daddr; 1566 __be32 dest = inet->daddr;
1567 unsigned int src = inet->rcv_saddr; 1567 __be32 src = inet->rcv_saddr;
1568 __u16 destp = ntohs(inet->dport); 1568 __u16 destp = ntohs(inet->dport);
1569 __u16 srcp = ntohs(inet->sport); 1569 __u16 srcp = ntohs(inet->sport);
1570 1570