Subject: Raw socket functionality
To: None <current-users@NetBSD.ORG>
From: Geir Inge Jensen <Geir.I.Jensen@runit.sintef.no>
List: current-users
Date: 03/13/1998 11:54:42
Hi,

How is IPPROTO_RAW supposed to work? I thought that I could send raw ip
packets unchanged to the network. I use this:

  raw = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);

and use this flag in the IP header:

  ip->ip_p = IPPROTO_TCP;

However, the packet that finally reaches the network has IPPROTO_RAW in
its IP-header! Can I change this functionality?

Can I listen to all tcp packets that my machine receives if I use
SOCK_RAW and IPPROTO_TCP?

This is on vanilla 1.3.

Thanks,
Geir Inge.