1#compdef arping
2
3if _pick_variant iputils=iputils unix -V; then
4
5_arguments -s \
6  '-f[quit on first reply]' \
7  '-q[be quiet]' \
8  '-b[keep broadcasting, do not go unicast]' \
9  '-D[duplicate address detection mode]'\
10  '-U[unsolicited ARP mode, update your neighbours]' \
11  '-A[ARP answer mode, update your neighbours]' \
12  '-V[print version and exit]' \
13  '-c[how many packets to send]:count' \
14  '-w[how long to wait for a reply]:timeout' \
15  '-I[interface]:ethernet interface:_net_interfaces' \
16  '-s[source ip address]:source IP address:_hosts' \
17  ':destination:_hosts'
18
19else
20
21_arguments -s \
22  '(-)-h[display help information]' \
23  '-q[only display error messages]' \
24  '-a[audible ping]' \
25  '*-v[verbose output]' \
26  '-r[raw output: only the MAC/IP address displayed]' \
27  '-R[like -r but shows "the other one"]' \
28  '-d[find duplicate replies]' \
29  '(:)-B[255.255.255.255]' \
30  '-0[source 0.0.0.0]' \
31  '-b[source 255.255.255.255]' \
32  '-S[set source IP]:source IP address:_hosts' \
33  '-T[target IP]:target IP address:_hosts' \
34  '-p[turn on promiscuous mode]' \
35  '-s[set source MAC address]:source MAC address' \
36  '-t[set target MAC address]:target MAC address' \
37  '-c[send this many requests]:count' \
38  '-I[interface]:interface:_net_interfaces' \
39  '-A[only count addresses matching requested address]' \
40  '(-B):address:_hosts'
41 
42fi
43