If it's not included in the auxiliary data, fall back to the value
included in the IPv4 header which is provided via the raw socket.
dprintf ("No match found for ident = 0x%04x, seq = %i\n",
ident, seq);
}
dprintf ("No match found for ident = 0x%04x, seq = %i\n",
ident, seq);
}
+
+ ptr->recv_ttl = ip_hdr->ip_ttl;
dprintf ("Read %zi bytes from fd = %i\n", payload_buffer_len, fd);
/* Iterate over all auxiliary data in msghdr */
dprintf ("Read %zi bytes from fd = %i\n", payload_buffer_len, fd);
/* Iterate over all auxiliary data in msghdr */
+ family = ph->addrfamily;
recv_ttl = -1;
for (cmsg = CMSG_FIRSTHDR (&msghdr); /* {{{ */
cmsg != NULL;
recv_ttl = -1;
for (cmsg = CMSG_FIRSTHDR (&msghdr); /* {{{ */
cmsg != NULL;
(int) diff.tv_sec,
(int) diff.tv_usec);
(int) diff.tv_sec,
(int) diff.tv_usec);
+ if (recv_ttl >= 0)
+ host->recv_ttl = recv_ttl;
+
host->latency = ((double) diff.tv_usec) / 1000.0;
host->latency += ((double) diff.tv_sec) * 1000.0;
host->latency = ((double) diff.tv_usec) / 1000.0;
host->latency += ((double) diff.tv_sec) * 1000.0;
- host->recv_ttl = recv_ttl;
-
timerclear (host->timer);
return (0);
timerclear (host->timer);
return (0);