binding to a port in raw socket

sudhakar moharana sudhakar.moharana at gmail.com
Fri Oct 14 12:31:45 UTC 2005


Hi there,

I am facing a problem in binding to a port while receiving data in
raw socket. I have bounded my application to a particular port
( say 6000 ) in UDP socket, but My application is receiving all the UDP
packets irrespective of the port number.
Although the man page of raw(7) clearly states that

" A raw socket can be bound to a specific local address using the
bind(2) call. If it isn't bound all packets with the specified IP
protocol are received. "

My socket is of type (PF_INET,SOCK_RAW,IPPROTO_UDP). Thanks in advance
for valuable response.

thanks & regards
sudhakar




More information about the redhat-list mailing list