+ /* grab ICMP ECHO content */
+ memcpy (&icmp_echo, &buf[off], sizeof (struct icmp_echo_header));
+ port = (uint16_t) ntohl (icmp_echo.reserved);
+ break;
+ case IPPROTO_UDP:
+ if (have !=
+ (sizeof (struct ip_header) * 2 +
+ sizeof (struct icmp_ttl_exceeded_header) + sizeof (struct udp_header)))
+ {
+ /* malformed */
+ return;
+ }
+ /* grab UDP content */
+ memcpy (&udp_pkt, &buf[off], sizeof (struct udp_header));
+ port = ntohs (udp_pkt.length);
+ break;
+ default:
+ /* different type than what we want */
+ return;
+ }
+
+ ssize = sizeof (buf);
+ WSAAddressToString ((LPSOCKADDR) & source_ip, sizeof (source_ip), NULL, buf,
+ &ssize);