<span style="font-family: georgia;">Hi Pavlin,<br><br>Sorry for very late response. I was bit busy with other works.<br>Please look for inline comments. %suresh :<br><br>Thanks,<br>Regards,<br>Suresh kannan.<br></span><br>
<div><span class="gmail_quote">On 2/16/07, <b class="gmail_sendername">Pavlin Radoslavov</b> &lt;<a href="mailto:pavlin@icir.org">pavlin@icir.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sachin K &lt;<a href="mailto:sachinutd@gmail.com">sachinutd@gmail.com</a>&gt; wrote:<br><br>&gt; How does the XORP multicast router sniff IGMP/MLD messages from the network?<br>&gt;<br>&gt; I checked the some routers&#39; code. Most of them just open a RAW socket with
<br>&gt; protocol set to IPPROTO_IGMP. But using this the router gets the<br>&gt; packets addressed to <a href="http://224.0.0.1">224.0.0.1</a> only.<br>&gt;<br>&gt; How does it receive IGMPv2 and IGMPv3 membership reports sent by other hosts?
<br><br>The kernel gets all multicast packets because the interface is set<br>in ALLMULTI mode (i.e., snoop all multicast packets). This happens<br>after the multicast routing socket has been opened with<br>setsockopt(..., MRT_INIT, ...) and then each interface is added with
<br>setsockopt(..., MRT_ADD_VIF, ...).</blockquote><div><br><span style="font-family: georgia;">%Suresh : In FreeBSD, IGMP packets are handled in from ipintr() in ip_input.c where it directly goes to igmp_input() (igmp.c). From here, it puts packet to applications via rip_input call. So, I guess to receive IGMP packets we no need to setsockopt though IGMP ( XORP,etc) adds to VIF; thats to enable Mrouting on that interface. Not particularly to receive IGMP control packets. Please correct me if I&#39;m wrong here. 
</span><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Then the userland program can receive the IGMP packets with opening<br>
a raw IPPROTO_IGMP socket.<br><br>BTW, note that there could be only one multicast routing socket open<br>at a time (across all processes).<br><br>Regards,<br>Pavlin<br><br><br>_______________________________________________
<br>Xorp-hackers mailing list<br><a href="mailto:Xorp-hackers@icir.org">Xorp-hackers@icir.org</a><br><a href="http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers">http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
</a><br></blockquote></div><br>