I'm writing a simple UDP chat server in Python 2.7 on Linux 2.6.38.
How can ICMP error messages be read that a host(client) receives when it sends UDP segments to say, an unreachable server?
I tried
sockFd.setsockopt( socket.IPPROTO_IP, socket.IP_RECVERR, 1 )
But socket.IP_RECVERR isn't defined in socket module.
I tried using a timeout on sockFd.recvfrom and doing sendto a second time but that didn't help. Is there an API to read the ICMP errors received by the host?