arping: change a few message strings to be closer to iputils arping
ARPING 192.168.1.1 from 192.168.1.172 wlan0 Unicast reply from 192.168.1.1 [F4:F2:6D:52:A8:DE] 1.672ms Sent 1 probes (1 broadcast(s)) Received 1 response(s) ARPING 192.168.1.1 from 192.168.1.172 wlan0 Unicast reply from 192.168.1.1 [f4:f2:6d:52:a8:de] 1.152ms Sent 1 probe(s) (1 broadcast(s)) Received 1 response(s) (0 request(s), 0 broadcast(s)) function old new delta finish 120 100 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f5d50fbd2f
commit
a3ec3bd0f8
@ -142,10 +142,10 @@ static void finish(void)
|
||||
{
|
||||
if (!(option_mask32 & QUIET)) {
|
||||
printf("Sent %u probe(s) (%u broadcast(s))\n"
|
||||
"Received %u repl%s"
|
||||
"Received %u response(s)"
|
||||
" (%u request(s), %u broadcast(s))\n",
|
||||
sent, brd_sent,
|
||||
received, (received == 1) ? "ies" : "y",
|
||||
received,
|
||||
req_recv, brd_recv);
|
||||
}
|
||||
if (option_mask32 & DAD)
|
||||
@ -245,6 +245,7 @@ static void recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
|
||||
if (!(option_mask32 & QUIET)) {
|
||||
int s_printed = 0;
|
||||
|
||||
//TODO: arping from iputils-s20160308 print upprcase hex in MAC, follow them?
|
||||
printf("%scast re%s from %s [%02x:%02x:%02x:%02x:%02x:%02x]",
|
||||
FROM->sll_pkttype == PACKET_HOST ? "Uni" : "Broad",
|
||||
ah->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest",
|
||||
@ -408,8 +409,8 @@ int arping_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
if (!(option_mask32 & QUIET)) {
|
||||
/* inet_ntoa uses static storage, can't use in same printf */
|
||||
printf("ARPING to %s", inet_ntoa(dst));
|
||||
printf(" from %s via %s\n", inet_ntoa(src), device);
|
||||
printf("ARPING %s", inet_ntoa(dst));
|
||||
printf(" from %s %s\n", inet_ntoa(src), device);
|
||||
}
|
||||
|
||||
signal_SA_RESTART_empty_mask(SIGINT, (void (*)(int))finish);
|
||||
|
Loading…
Reference in New Issue
Block a user