mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
[IPV4]: trivial igmp annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c0cda068aa
commit
63007727e0
@ -140,7 +140,7 @@ struct ip_sf_socklist
|
||||
};
|
||||
|
||||
#define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \
|
||||
(count) * sizeof(__u32))
|
||||
(count) * sizeof(__be32))
|
||||
|
||||
#define IP_SFBLOCK 10 /* allocate this many at once */
|
||||
|
||||
|
@ -138,7 +138,7 @@
|
||||
time_before(jiffies, (in_dev)->mr_v2_seen)))
|
||||
|
||||
static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im);
|
||||
static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr);
|
||||
static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr);
|
||||
static void igmpv3_clear_delrec(struct in_device *in_dev);
|
||||
static int sf_setstate(struct ip_mc_list *pmc);
|
||||
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,
|
||||
if (isquery)
|
||||
psf->sf_gsresp = 0;
|
||||
|
||||
if (AVAILABLE(skb) < sizeof(u32) +
|
||||
if (AVAILABLE(skb) < sizeof(__be32) +
|
||||
first*sizeof(struct igmpv3_grec)) {
|
||||
if (truncate && !first)
|
||||
break; /* truncate these */
|
||||
@ -455,7 +455,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
|
||||
skb = add_grhead(skb, pmc, type, &pgr);
|
||||
first = 0;
|
||||
}
|
||||
psrc = (__be32 *)skb_put(skb, sizeof(u32));
|
||||
psrc = (__be32 *)skb_put(skb, sizeof(__be32));
|
||||
*psrc = psf->sf_inaddr;
|
||||
scount++; stotal++;
|
||||
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,
|
||||
struct igmphdr *ih;
|
||||
struct rtable *rt;
|
||||
struct net_device *dev = in_dev->dev;
|
||||
u32 group = pmc ? pmc->multiaddr : 0;
|
||||
u32 dst;
|
||||
__be32 group = pmc ? pmc->multiaddr : 0;
|
||||
__be32 dst;
|
||||
|
||||
if (type == IGMPV3_HOST_MEMBERSHIP_REPORT)
|
||||
return igmpv3_send_report(in_dev, pmc);
|
||||
@ -803,7 +803,7 @@ static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __be32 *srcs)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void igmp_heard_report(struct in_device *in_dev, u32 group)
|
||||
static void igmp_heard_report(struct in_device *in_dev, __be32 group)
|
||||
{
|
||||
struct ip_mc_list *im;
|
||||
|
||||
@ -828,7 +828,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
|
||||
struct igmphdr *ih = skb->h.igmph;
|
||||
struct igmpv3_query *ih3 = (struct igmpv3_query *)ih;
|
||||
struct ip_mc_list *im;
|
||||
u32 group = ih->group;
|
||||
__be32 group = ih->group;
|
||||
int max_delay;
|
||||
int mark = 0;
|
||||
|
||||
@ -862,7 +862,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
|
||||
ih3 = (struct igmpv3_query *) skb->h.raw;
|
||||
if (ih3->nsrcs) {
|
||||
if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)
|
||||
+ ntohs(ih3->nsrcs)*sizeof(__u32)))
|
||||
+ ntohs(ih3->nsrcs)*sizeof(__be32)))
|
||||
return;
|
||||
ih3 = (struct igmpv3_query *) skb->h.raw;
|
||||
}
|
||||
@ -985,7 +985,7 @@ drop:
|
||||
* Add a filter to a device
|
||||
*/
|
||||
|
||||
static void ip_mc_filter_add(struct in_device *in_dev, u32 addr)
|
||||
static void ip_mc_filter_add(struct in_device *in_dev, __be32 addr)
|
||||
{
|
||||
char buf[MAX_ADDR_LEN];
|
||||
struct net_device *dev = in_dev->dev;
|
||||
@ -1005,7 +1005,7 @@ static void ip_mc_filter_add(struct in_device *in_dev, u32 addr)
|
||||
* Remove a filter from a device
|
||||
*/
|
||||
|
||||
static void ip_mc_filter_del(struct in_device *in_dev, u32 addr)
|
||||
static void ip_mc_filter_del(struct in_device *in_dev, __be32 addr)
|
||||
{
|
||||
char buf[MAX_ADDR_LEN];
|
||||
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)
|
||||
spin_unlock_bh(&in_dev->mc_tomb_lock);
|
||||
}
|
||||
|
||||
static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr)
|
||||
static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr)
|
||||
{
|
||||
struct ip_mc_list *pmc, *pmc_prev;
|
||||
struct ip_sf_list *psf, *psf_next;
|
||||
@ -1829,7 +1829,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
|
||||
{
|
||||
int err;
|
||||
struct ip_mreqn imr;
|
||||
u32 addr = mreqs->imr_multiaddr;
|
||||
__be32 addr = mreqs->imr_multiaddr;
|
||||
struct ip_mc_socklist *pmc;
|
||||
struct in_device *in_dev = NULL;
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
@ -1883,7 +1883,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
|
||||
rv = !0;
|
||||
for (i=0; i<psl->sl_count; i++) {
|
||||
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
|
||||
sizeof(__u32));
|
||||
sizeof(__be32));
|
||||
if (rv == 0)
|
||||
break;
|
||||
}
|
||||
@ -1935,7 +1935,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
|
||||
rv = 1; /* > 0 for insert logic below if sl_count is 0 */
|
||||
for (i=0; i<psl->sl_count; i++) {
|
||||
rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
|
||||
sizeof(__u32));
|
||||
sizeof(__be32));
|
||||
if (rv == 0)
|
||||
break;
|
||||
}
|
||||
@ -1960,7 +1960,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
|
||||
{
|
||||
int err = 0;
|
||||
struct ip_mreqn imr;
|
||||
u32 addr = msf->imsf_multiaddr;
|
||||
__be32 addr = msf->imsf_multiaddr;
|
||||
struct ip_mc_socklist *pmc;
|
||||
struct in_device *in_dev;
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
@ -2044,7 +2044,7 @@ int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
|
||||
{
|
||||
int err, len, count, copycount;
|
||||
struct ip_mreqn imr;
|
||||
u32 addr = msf->imsf_multiaddr;
|
||||
__be32 addr = msf->imsf_multiaddr;
|
||||
struct ip_mc_socklist *pmc;
|
||||
struct in_device *in_dev;
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
@ -2103,7 +2103,7 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
|
||||
{
|
||||
int err, i, count, copycount;
|
||||
struct sockaddr_in *psin;
|
||||
u32 addr;
|
||||
__be32 addr;
|
||||
struct ip_mc_socklist *pmc;
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
struct ip_sf_socklist *psl;
|
||||
|
Loading…
Reference in New Issue
Block a user