static struct in_addr dummy;
+static struct in_addr target;
+
/**
* create a random port number that is not totally
}
else
{
+ send_icmp (my_ip, &target, reply_magic, my_magic);
printf ("%s:%u\n",
inet_ntop (AF_INET,
&sip,
int
main (int argc, char *const *argv)
{
- struct in_addr target;
struct in_addr external;
unsigned int i;
unsigned int pos;
return;
}
memcpy(&sip, &ip_pkt.src_ip, sizeof (sip));
- my_magic = ntohs (udp_pkt.checksum_aka_my_magic);
- reply_magic = ntohs (udp_pkt.mlen_aka_reply_port_magic);
+ reply_magic = ntohs (udp_pkt.checksum_aka_my_magic);
+ my_magic = ntohs (udp_pkt.mlen_aka_reply_port_magic);
fprintf (stderr,
"Received ICMP from `%s' with hints %u and %u\n",
inet_ntop (AF_INET,