ICMP Host-Unreachable

How do I know if ICMP Host Unreachable received after trying to send some data to the UDP port? I want to check open UDP ports on a machine.

+3
source share
1 answer

Use connect(2)- you will receive an error message on the second sending, more about connected UDP sockets .

+1
source

Source: https://habr.com/ru/post/1784387/


All Articles