*/
#define DUMMY_IP "192.0.2.86"
+/**
+ * Default Port
+ */
+#define NAT_TRAV_PORT 22225
+
/**
* TTL to use for our outgoing messages.
*/
send_icmp_echo (const struct in_addr *my_ip)
{
char packet[sizeof (struct ip_header) + sizeof (struct icmp_echo_header)];
- struct icmp_ttl_exceeded_header icmp_echo;
+ struct icmp_echo_header icmp_echo;
struct ip_header ip_pkt;
struct sockaddr_in dst;
size_t off;
ssize_t have;
struct in_addr source_ip;
struct ip_header ip_pkt;
- struct icmp_ttl_exceeded_header icmp_pkt;
+ struct icmp_ttl_exceeded_header icmp_ttl;
struct icmp_echo_header icmp_echo;
struct udp_header udp_pkt;
size_t off;
strerror (errno));
return;
}
- have_port = 0;
#if VERBOSE
fprintf (stderr,
"Received message of %u bytes\n",
addr.sin_addr = *my_ip;
addr.sin_port = htons (NAT_TRAV_PORT);
if (0 != bind (ret,
- &addr,
+ (struct sockaddr *)&addr,
sizeof(addr)))
{
fprintf (stderr,
WSADATA wsaData;
unsigned int alt;
+ alt = 0;
if (2 != argc)
{
fprintf (stderr,