Hi David,
The kernel will only pass IP packets that it doesn't recognize to the
transport layer protocol to raw sockets. I believe the exception is ICMP
and IGMP. (ex: how ping works) For what you're trying to do, you'll
want to use a packet capture library like libpcap. It's a portable
way of doing packet captures on various platforms. For an example,
look for the source of tcpdump. (see freshmeat.net and search for
tcpdump)
hope this helps,
Tuan
On Tue, 18 Jan 2000, David Chen wrote:
> Hi,
>
> I am working on an application that needs to receive all UDP packets (regardless of
> port.) How do I do this? Is it by using:
>
> socket(AF_INET, SOCK_RAW, IPPROTO_UDP)
>
> Do I need to bind() before I recv() ?
>
> Very confused and unsure,
>
> David
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]