I am trying to open a raw socket to capture IP packets.
When I use the option, "IPPROTO_TCP" I am able to capture the tcp packets, and similarly IPPROTO_UDP works for udp packets. However, when I use IPPROTO_RAW I am not capturing any packets. I am using Ubuntu Linux. What could be wrong here?
When using IPPROTO_IP, I am getting an error( 93 - Protocol not supported)
sock_raw = socket(AF_INET , SOCK_RAW , IPPROTO_RAW);