aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:36:36 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:14 -0400
commited9bad06eec5ee7842851f9abeb406e9a73084e8 (patch)
treeb1bb4dd10f067bd42fc2a367080c612d4a6c34d8 /net
parentbd6d610a14f2ed896b76dfb61fbdec829e44b8d3 (diff)
[IPV4] net/ipv4/arp.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')
-rw-r--r--net/bridge/netfilter/ebt_arpreply.c2
-rw-r--r--net/ipv4/arp.c30
2 files changed, 16 insertions, 16 deletions
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index d19fc4b328dc..0aa7b9910a86 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -20,7 +20,7 @@ static int ebt_target_reply(struct sk_buff **pskb, unsigned int hooknr,
20 const void *data, unsigned int datalen) 20 const void *data, unsigned int datalen)
21{ 21{
22 struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data; 22 struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data;
23 u32 _sip, *siptr, _dip, *diptr; 23 __be32 _sip, *siptr, _dip, *diptr;
24 struct arphdr _ah, *ap; 24 struct arphdr _ah, *ap;
25 unsigned char _sha[ETH_ALEN], *shp; 25 unsigned char _sha[ETH_ALEN], *shp;
26 struct sk_buff *skb = *pskb; 26 struct sk_buff *skb = *pskb;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 2a29a5ebc978..cfe5c8474286 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -385,7 +385,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
385} 385}
386 386
387static int arp_ignore(struct in_device *in_dev, struct net_device *dev, 387static int arp_ignore(struct in_device *in_dev, struct net_device *dev,
388 u32 sip, u32 tip) 388 __be32 sip, __be32 tip)
389{ 389{
390 int scope; 390 int scope;
391 391
@@ -420,7 +420,7 @@ static int arp_ignore(struct in_device *in_dev, struct net_device *dev,
420 return !inet_confirm_addr(dev, sip, tip, scope); 420 return !inet_confirm_addr(dev, sip, tip, scope);
421} 421}
422 422
423static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev) 423static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
424{ 424{
425 struct flowi fl = { .nl_u = { .ip4_u = { .daddr = sip, 425 struct flowi fl = { .nl_u = { .ip4_u = { .daddr = sip,
426 .saddr = tip } } }; 426 .saddr = tip } } };
@@ -449,7 +449,7 @@ static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev)
449 * is allowed to use this function, it is scheduled to be removed. --ANK 449 * is allowed to use this function, it is scheduled to be removed. --ANK
450 */ 450 */
451 451
452static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, struct net_device * dev) 452static int arp_set_predefined(int addr_hint, unsigned char * haddr, __be32 paddr, struct net_device * dev)
453{ 453{
454 switch (addr_hint) { 454 switch (addr_hint) {
455 case RTN_LOCAL: 455 case RTN_LOCAL:
@@ -511,7 +511,7 @@ int arp_bind_neighbour(struct dst_entry *dst)
511 if (dev == NULL) 511 if (dev == NULL)
512 return -EINVAL; 512 return -EINVAL;
513 if (n == NULL) { 513 if (n == NULL) {
514 u32 nexthop = ((struct rtable*)dst)->rt_gateway; 514 __be32 nexthop = ((struct rtable*)dst)->rt_gateway;
515 if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT)) 515 if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT))
516 nexthop = 0; 516 nexthop = 0;
517 n = __neigh_lookup_errno( 517 n = __neigh_lookup_errno(
@@ -560,8 +560,8 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt)
560 * Create an arp packet. If (dest_hw == NULL), we create a broadcast 560 * Create an arp packet. If (dest_hw == NULL), we create a broadcast
561 * message. 561 * message.
562 */ 562 */
563struct sk_buff *arp_create(int type, int ptype, u32 dest_ip, 563struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
564 struct net_device *dev, u32 src_ip, 564 struct net_device *dev, __be32 src_ip,
565 unsigned char *dest_hw, unsigned char *src_hw, 565 unsigned char *dest_hw, unsigned char *src_hw,
566 unsigned char *target_hw) 566 unsigned char *target_hw)
567{ 567{
@@ -675,8 +675,8 @@ void arp_xmit(struct sk_buff *skb)
675/* 675/*
676 * Create and send an arp packet. 676 * Create and send an arp packet.
677 */ 677 */
678void arp_send(int type, int ptype, u32 dest_ip, 678void arp_send(int type, int ptype, __be32 dest_ip,
679 struct net_device *dev, u32 src_ip, 679 struct net_device *dev, __be32 src_ip,
680 unsigned char *dest_hw, unsigned char *src_hw, 680 unsigned char *dest_hw, unsigned char *src_hw,
681 unsigned char *target_hw) 681 unsigned char *target_hw)
682{ 682{
@@ -969,13 +969,13 @@ out_of_mem:
969 969
970static int arp_req_set(struct arpreq *r, struct net_device * dev) 970static int arp_req_set(struct arpreq *r, struct net_device * dev)
971{ 971{
972 u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; 972 __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
973 struct neighbour *neigh; 973 struct neighbour *neigh;
974 int err; 974 int err;
975 975
976 if (r->arp_flags&ATF_PUBL) { 976 if (r->arp_flags&ATF_PUBL) {
977 u32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr; 977 __be32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr;
978 if (mask && mask != 0xFFFFFFFF) 978 if (mask && mask != htonl(0xFFFFFFFF))
979 return -EINVAL; 979 return -EINVAL;
980 if (!dev && (r->arp_flags & ATF_COM)) { 980 if (!dev && (r->arp_flags & ATF_COM)) {
981 dev = dev_getbyhwaddr(r->arp_ha.sa_family, r->arp_ha.sa_data); 981 dev = dev_getbyhwaddr(r->arp_ha.sa_family, r->arp_ha.sa_data);
@@ -1063,7 +1063,7 @@ static unsigned arp_state_to_flags(struct neighbour *neigh)
1063 1063
1064static int arp_req_get(struct arpreq *r, struct net_device *dev) 1064static int arp_req_get(struct arpreq *r, struct net_device *dev)
1065{ 1065{
1066 u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; 1066 __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
1067 struct neighbour *neigh; 1067 struct neighbour *neigh;
1068 int err = -ENXIO; 1068 int err = -ENXIO;
1069 1069
@@ -1084,13 +1084,13 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
1084static int arp_req_delete(struct arpreq *r, struct net_device * dev) 1084static int arp_req_delete(struct arpreq *r, struct net_device * dev)
1085{ 1085{
1086 int err; 1086 int err;
1087 u32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; 1087 __be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
1088 struct neighbour *neigh; 1088 struct neighbour *neigh;
1089 1089
1090 if (r->arp_flags & ATF_PUBL) { 1090 if (r->arp_flags & ATF_PUBL) {
1091 u32 mask = 1091 __be32 mask =
1092 ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; 1092 ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
1093 if (mask == 0xFFFFFFFF) 1093 if (mask == htonl(0xFFFFFFFF))
1094 return pneigh_delete(&arp_tbl, &ip, dev); 1094 return pneigh_delete(&arp_tbl, &ip, dev);
1095 if (mask == 0) { 1095 if (mask == 0) {
1096 if (dev == NULL) { 1096 if (dev == NULL) {