diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 21:31:32 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:02:02 -0400 |
commit | 63007727e0bb09e8d906f73d36a09b9fac0d5893 (patch) | |
tree | 015d2627d9a28e2b81989d3b82d130c32f138d5f /net | |
parent | c0cda068aac3481d40795b115e4fd36f7d386e3a (diff) |
[IPV4]: trivial igmp 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/ipv4/igmp.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index a2c7b2b1b3fb..6eee71647b7c 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -138,7 +138,7 @@ | |||
138 | time_before(jiffies, (in_dev)->mr_v2_seen))) | 138 | time_before(jiffies, (in_dev)->mr_v2_seen))) |
139 | 139 | ||
140 | static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im); | 140 | static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im); |
141 | static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr); | 141 | static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr); |
142 | static void igmpv3_clear_delrec(struct in_device *in_dev); | 142 | static void igmpv3_clear_delrec(struct in_device *in_dev); |
143 | static int sf_setstate(struct ip_mc_list *pmc); | 143 | static int sf_setstate(struct ip_mc_list *pmc); |
144 | static void sf_markstate(struct ip_mc_list *pmc); | 144 | static void sf_markstate(struct ip_mc_list *pmc); |
@@ -439,7 +439,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc, | |||
439 | if (isquery) | 439 | if (isquery) |
440 | psf->sf_gsresp = 0; | 440 | psf->sf_gsresp = 0; |
441 | 441 | ||
442 | if (AVAILABLE(skb) < sizeof(u32) + | 442 | if (AVAILABLE(skb) < sizeof(__be32) + |
443 | first*sizeof(struct igmpv3_grec)) { | 443 | first*sizeof(struct igmpv3_grec)) { |
444 | if (truncate && !first) | 444 | if (truncate && !first) |
445 | break; /* truncate these */ | 445 | break; /* truncate these */ |
@@ -455,7 +455,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc, | |||
455 | skb = add_grhead(skb, pmc, type, &pgr); | 455 | skb = add_grhead(skb, pmc, type, &pgr); |
456 | first = 0; | 456 | first = 0; |
457 | } | 457 | } |
458 | psrc = (__be32 *)skb_put(skb, sizeof(u32)); | 458 | psrc = (__be32 *)skb_put(skb, sizeof(__be32)); |
459 | *psrc = psf->sf_inaddr; | 459 | *psrc = psf->sf_inaddr; |
460 | scount++; stotal++; | 460 | scount++; stotal++; |
461 | if ((type == IGMPV3_ALLOW_NEW_SOURCES || | 461 | if ((type == IGMPV3_ALLOW_NEW_SOURCES || |
@@ -630,8 +630,8 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, | |||
630 | struct igmphdr *ih; | 630 | struct igmphdr *ih; |
631 | struct rtable *rt; | 631 | struct rtable *rt; |
632 | struct net_device *dev = in_dev->dev; | 632 | struct net_device *dev = in_dev->dev; |
633 | u32 group = pmc ? pmc->multiaddr : 0; | 633 | __be32 group = pmc ? pmc->multiaddr : 0; |
634 | u32 dst; | 634 | __be32 dst; |
635 | 635 | ||
636 | if (type == IGMPV3_HOST_MEMBERSHIP_REPORT) | 636 | if (type == IGMPV3_HOST_MEMBERSHIP_REPORT) |
637 | return igmpv3_send_report(in_dev, pmc); | 637 | return igmpv3_send_report(in_dev, pmc); |
@@ -803,7 +803,7 @@ static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __be32 *srcs) | |||
803 | return 1; | 803 | return 1; |
804 | } | 804 | } |
805 | 805 | ||
806 | static void igmp_heard_report(struct in_device *in_dev, u32 group) | 806 | static void igmp_heard_report(struct in_device *in_dev, __be32 group) |
807 | { | 807 | { |
808 | struct ip_mc_list *im; | 808 | struct ip_mc_list *im; |
809 | 809 | ||
@@ -828,7 +828,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, | |||
828 | struct igmphdr *ih = skb->h.igmph; | 828 | struct igmphdr *ih = skb->h.igmph; |
829 | struct igmpv3_query *ih3 = (struct igmpv3_query *)ih; | 829 | struct igmpv3_query *ih3 = (struct igmpv3_query *)ih; |
830 | struct ip_mc_list *im; | 830 | struct ip_mc_list *im; |
831 | u32 group = ih->group; | 831 | __be32 group = ih->group; |
832 | int max_delay; | 832 | int max_delay; |
833 | int mark = 0; | 833 | int mark = 0; |
834 | 834 | ||
@@ -862,7 +862,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, | |||
862 | ih3 = (struct igmpv3_query *) skb->h.raw; | 862 | ih3 = (struct igmpv3_query *) skb->h.raw; |
863 | if (ih3->nsrcs) { | 863 | if (ih3->nsrcs) { |
864 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query) | 864 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query) |
865 | + ntohs(ih3->nsrcs)*sizeof(__u32))) | 865 | + ntohs(ih3->nsrcs)*sizeof(__be32))) |
866 | return; | 866 | return; |
867 | ih3 = (struct igmpv3_query *) skb->h.raw; | 867 | ih3 = (struct igmpv3_query *) skb->h.raw; |
868 | } | 868 | } |
@@ -985,7 +985,7 @@ drop: | |||
985 | * Add a filter to a device | 985 | * Add a filter to a device |
986 | */ | 986 | */ |
987 | 987 | ||
988 | static void ip_mc_filter_add(struct in_device *in_dev, u32 addr) | 988 | static void ip_mc_filter_add(struct in_device *in_dev, __be32 addr) |
989 | { | 989 | { |
990 | char buf[MAX_ADDR_LEN]; | 990 | char buf[MAX_ADDR_LEN]; |
991 | struct net_device *dev = in_dev->dev; | 991 | struct net_device *dev = in_dev->dev; |
@@ -1005,7 +1005,7 @@ static void ip_mc_filter_add(struct in_device *in_dev, u32 addr) | |||
1005 | * Remove a filter from a device | 1005 | * Remove a filter from a device |
1006 | */ | 1006 | */ |
1007 | 1007 | ||
1008 | static void ip_mc_filter_del(struct in_device *in_dev, u32 addr) | 1008 | static void ip_mc_filter_del(struct in_device *in_dev, __be32 addr) |
1009 | { | 1009 | { |
1010 | char buf[MAX_ADDR_LEN]; | 1010 | char buf[MAX_ADDR_LEN]; |
1011 | struct net_device *dev = in_dev->dev; | 1011 | struct net_device *dev = in_dev->dev; |
@@ -1055,7 +1055,7 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im) | |||
1055 | spin_unlock_bh(&in_dev->mc_tomb_lock); | 1055 | spin_unlock_bh(&in_dev->mc_tomb_lock); |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr) | 1058 | static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr) |
1059 | { | 1059 | { |
1060 | struct ip_mc_list *pmc, *pmc_prev; | 1060 | struct ip_mc_list *pmc, *pmc_prev; |
1061 | struct ip_sf_list *psf, *psf_next; | 1061 | struct ip_sf_list *psf, *psf_next; |
@@ -1829,7 +1829,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
1829 | { | 1829 | { |
1830 | int err; | 1830 | int err; |
1831 | struct ip_mreqn imr; | 1831 | struct ip_mreqn imr; |
1832 | u32 addr = mreqs->imr_multiaddr; | 1832 | __be32 addr = mreqs->imr_multiaddr; |
1833 | struct ip_mc_socklist *pmc; | 1833 | struct ip_mc_socklist *pmc; |
1834 | struct in_device *in_dev = NULL; | 1834 | struct in_device *in_dev = NULL; |
1835 | struct inet_sock *inet = inet_sk(sk); | 1835 | struct inet_sock *inet = inet_sk(sk); |
@@ -1883,7 +1883,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
1883 | rv = !0; | 1883 | rv = !0; |
1884 | for (i=0; i<psl->sl_count; i++) { | 1884 | for (i=0; i<psl->sl_count; i++) { |
1885 | rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, | 1885 | rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, |
1886 | sizeof(__u32)); | 1886 | sizeof(__be32)); |
1887 | if (rv == 0) | 1887 | if (rv == 0) |
1888 | break; | 1888 | break; |
1889 | } | 1889 | } |
@@ -1935,7 +1935,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
1935 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ | 1935 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ |
1936 | for (i=0; i<psl->sl_count; i++) { | 1936 | for (i=0; i<psl->sl_count; i++) { |
1937 | rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, | 1937 | rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, |
1938 | sizeof(__u32)); | 1938 | sizeof(__be32)); |
1939 | if (rv == 0) | 1939 | if (rv == 0) |
1940 | break; | 1940 | break; |
1941 | } | 1941 | } |
@@ -1960,7 +1960,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) | |||
1960 | { | 1960 | { |
1961 | int err = 0; | 1961 | int err = 0; |
1962 | struct ip_mreqn imr; | 1962 | struct ip_mreqn imr; |
1963 | u32 addr = msf->imsf_multiaddr; | 1963 | __be32 addr = msf->imsf_multiaddr; |
1964 | struct ip_mc_socklist *pmc; | 1964 | struct ip_mc_socklist *pmc; |
1965 | struct in_device *in_dev; | 1965 | struct in_device *in_dev; |
1966 | struct inet_sock *inet = inet_sk(sk); | 1966 | struct inet_sock *inet = inet_sk(sk); |
@@ -2044,7 +2044,7 @@ int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, | |||
2044 | { | 2044 | { |
2045 | int err, len, count, copycount; | 2045 | int err, len, count, copycount; |
2046 | struct ip_mreqn imr; | 2046 | struct ip_mreqn imr; |
2047 | u32 addr = msf->imsf_multiaddr; | 2047 | __be32 addr = msf->imsf_multiaddr; |
2048 | struct ip_mc_socklist *pmc; | 2048 | struct ip_mc_socklist *pmc; |
2049 | struct in_device *in_dev; | 2049 | struct in_device *in_dev; |
2050 | struct inet_sock *inet = inet_sk(sk); | 2050 | struct inet_sock *inet = inet_sk(sk); |
@@ -2103,7 +2103,7 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, | |||
2103 | { | 2103 | { |
2104 | int err, i, count, copycount; | 2104 | int err, i, count, copycount; |
2105 | struct sockaddr_in *psin; | 2105 | struct sockaddr_in *psin; |
2106 | u32 addr; | 2106 | __be32 addr; |
2107 | struct ip_mc_socklist *pmc; | 2107 | struct ip_mc_socklist *pmc; |
2108 | struct inet_sock *inet = inet_sk(sk); | 2108 | struct inet_sock *inet = inet_sk(sk); |
2109 | struct ip_sf_socklist *psl; | 2109 | struct ip_sf_socklist *psl; |