Code

Display a line of the following form when starting `oping':
authorocto <octo>
Fri, 19 May 2006 14:40:57 +0000 (14:40 +0000)
committerocto <octo>
Fri, 19 May 2006 14:40:57 +0000 (14:40 +0000)
  PING www.ipv6.org (2001:6b0:1:ea:202:a5ff:fecd:13a6) 56 bytes of data.

src/oping.c

index eb97e5d28d65957230d71ecfdb9cfbeb628b6fcd..975fa5ccc27f542bacc57c1f9dc2d410542d004b 100644 (file)
@@ -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);
        }