summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11970f1)
raw | patch | inline | side by side (parent: 11970f1)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 15 Mar 2009 10:24:40 +0000 (11:24 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 15 Mar 2009 10:24:40 +0000 (11:24 +0100) |
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index cfbe18ac59e9d4076cf79318eee5a3fdb3dd968f..bc33c27157d221e8d339d34245459658347e06cd 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
{
double latency;
unsigned int sequence;
+ int recv_ttl;
size_t buffer_len;
size_t data_len;
ping_context_t *context;
+ latency = -1.0;
buffer_len = sizeof (latency);
ping_iterator_get_info (iter, PING_INFO_LATENCY,
&latency, &buffer_len);
+ sequence = 0;
buffer_len = sizeof (sequence);
ping_iterator_get_info (iter, PING_INFO_SEQUENCE,
&sequence, &buffer_len);
+ recv_ttl = -1;
+ buffer_len = sizeof (recv_ttl);
+ ping_iterator_get_info (iter, PING_INFO_RECV_TTL,
+ &recv_ttl, &buffer_len);
+
data_len = 0;
ping_iterator_get_info (iter, PING_INFO_DATA,
NULL, &data_len);
if ((context->latency_min < 0.0) || (context->latency_min > latency))
context->latency_min = latency;
- printf ("%zu bytes from %s (%s): icmp_seq=%u time=%.2f ms\n",
+ printf ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i time=%.2f ms\n",
data_len,
context->host, context->addr,
- sequence, latency);
+ sequence, recv_ttl, latency);
}
else
{