Question

I want to include an IP packet in Socket programming. I have a readymade Ip packet which contains igmp packet. I don't want to design igmp protocol but want to use that packet to sent igmp query. By some how the Ip packet I have must be recognize as IP packet and not as TCP/UDP data.

Was it helpful?

Solution

You have to use the raw socket with sendmsg. This need root permission.

OTHER TIPS

And if you want to send IGMP packets you should use the setsockopt() API to do so.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top