Erste Seite Zurück Weiter Letzte Seite Übersicht Grafik
How to process error messages
Enable IP_RECVERR on the socket
Do normal IO (sendmsg, recvmsg, etc.)
On error do a recvmsg with MSG_ERRQUEUE and a msg_control buffer.
Original destination is in msg_name, error message in a IP_RECVERR control message, original payload in msg_iov. Process it.
Do another recvmsg/poll on the socket. If it has still an error set repeat.