Operating System - Linux
1832154 Members
3504 Online
110038 Solutions
New Discussion

Re: Equivalen to SO_BSDCOMPAT

 

Equivalen to SO_BSDCOMPAT

SO_BSDCOMPAT is obsolete since the 2.4 kernels and now 2.5 and later
kernels log a warning every time it is used.

Is there some thing equivalent to SO_BSDCOMPAT that can be used to in order to make sure that "ICMP errors recieved for a UDP socket will not be passed"
1 REPLY 1
Mugilvannan
Valued Contributor

Re: Equivalen to SO_BSDCOMPAT

If the target machine discards the message because there is no process reading on the requested port number, it sends an ICMP message to your machine which will cause the next system call on the socket to return
ECONNREFUSED. Since delivery of ICMP messages is not guarenteed you may not recieve this notification on the first transaction.

Remember that your socket must "connected" in order to receive the ICMP errors. Also verify that Linux will return on "unconnected" sockets. This may cause porting problems if your application isn't ready for it, so Alan tells me they've added a SO_BSDCOMPAT flag which can be set for Linux kernels after 2.x
If U need a helping hand, U will find one at the end of your arm