Subject: | return ICMP response information |
It would be nice to include the actual problem, when possible:
-TTL Expired in Transit
-Destination Host Unreachable
-Request Timed Out
-Unknown Host
I think this is relatively easy to implement. In all cases, the requested ICMP
responses include payloads of "Internet Header + 64 bits of Data Datagram".
The first 64 bits of the datagram include the ICMP request header: type, code,
checksum, identifier, and sequence number. That's everything we need to find
the original request.
The rest is decoding the response type and code, and mapping them to some kind
of response.