summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 617e45c)
raw | patch | inline | side by side (parent: 617e45c)
author | octo <octo> | |
Thu, 18 May 2006 11:42:58 +0000 (11:42 +0000) | ||
committer | octo <octo> | |
Thu, 18 May 2006 11:42:58 +0000 (11:42 +0000) |
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 5940001bea1407bc1b331ffb1dbdaef23ec1bef0..eb97e5d28d65957230d71ecfdb9cfbeb628b6fcd 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
void print_host (pingobj_iter_t *iter)
{
- double latency;
- uint16_t sequence;
- size_t buffer_len;
+ double latency;
+ unsigned int sequence;
+ size_t buffer_len;
+ size_t data_len;
ping_context_t *context;
buffer_len = sizeof (latency);
ping_iterator_get_info (iter, PING_INFO_SEQUENCE,
&sequence, &buffer_len);
+ data_len = 0;
+ ping_iterator_get_info (iter, PING_INFO_DATA,
+ NULL, &data_len);
+
context = (ping_context_t *) ping_iterator_get_context (iter);
context->req_sent++;
if ((context->latency_min < 0.0) || (context->latency_min > latency))
context->latency_min = latency;
- printf ("echo reply from %s (%s): icmp_seq=%u time=%.2f ms\n",
+ printf ("%u bytes from %s (%s): icmp_seq=%u time=%.2f ms\n",
+ (unsigned int) data_len,
context->host, context->addr,
(unsigned int) sequence, latency);
}