From: octo Date: Fri, 19 May 2006 14:40:57 +0000 (+0000) Subject: Display a line of the following form when starting `oping': X-Git-Tag: liboping-0.2.0~2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=947738ef2666e4da5c2c0e920b9dfa4dd0197ef0;p=liboping.git Display a line of the following form when starting `oping': PING www.ipv6.org (2001:6b0:1:ea:202:a5ff:fecd:13a6) 56 bytes of data. --- diff --git a/src/oping.c b/src/oping.c index eb97e5d..975fa5c 100644 --- a/src/oping.c +++ b/src/oping.c @@ -318,6 +318,12 @@ int main (int argc, char **argv) buffer_size = sizeof (context->addr); ping_iterator_get_info (iter, PING_INFO_ADDRESS, context->addr, &buffer_size); + buffer_size = 0; + ping_iterator_get_info (iter, PING_INFO_DATA, NULL, &buffer_size); + + printf ("PING %s (%s) %u bytes of data.\n", + context->host, context->addr, buffer_size); + ping_iterator_set_context (iter, (void *) context); }