Subject: Re: Processing of IGMP packets in ip_input
To: None <dattatri@pipalsys.com>
From: Hitoshi Asaeda <Hitoshi.Asaeda@sophia.inria.fr>
List: tech-net
Date: 12/05/2002 10:53:55
> >>Currently the code in ip_input assumes that user-land will get IGMP raw
> >>packet only if MRT_INIT is done. I suggest we move the lines
> >>
> >>if (ip->ip_p == IPPROTO_IGMP)
> >>	goto ours;
> >>
> >>after the if(ip_mrouter) {...} so that userland can get IGMP packets
> >>without doing MRT_INIT.
> > 
> > No. It should not.
> 
> Why should it not? Is there some reason behind it or you mean
> currently it is needed only for mcast routing daemon.

I already mentioned the reason.
I said, an end-node only needs to receive multicast packets including
IGMP whose destination is one of the belonging group address. For an
end-node, it is unneeded to receive IGMP packet it doesn't join. This
*is* multicast.
But for multicast router, it must receive and check every IGMP packet
since it needs to recognize any join/leave.

> > Checking IPPROTO_IGMP should be able only for a multicast router,
> > since a multicast router needs to receive "every" IGMP packet whether
> > or not it belongs to the destination groups.
> 
> Mrouted or any other mcast routing daemon ofcourse needs the IGMP
> packets. We then are putting the limitation that no other process
> can open a RAW IGMP socket and get a feed into the incoming IGMP
> packets. One could also use other mechanisms to get these packets...
> 
> But, it is possible to get other protocol packets to user-land
> via a RAW socket. A RAW socket should be able to get the packet
> whether a mcast routing daemon is running or not. However, in
> almost all the cases it is reqd only for mcast routing daemon.

You may talk about a packet capturing? If so, you can use bpf.
Using raw socket doesn't relate above.
--
Hitoshi Asaeda