mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-11-04 07:21:06 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
#compdef arping
 | 
						|
 | 
						|
if _pick_variant iputils=iputils thabets -V; then
 | 
						|
 | 
						|
_arguments -s \
 | 
						|
  '-f[quit on first reply]' \
 | 
						|
  '-q[be quiet]' \
 | 
						|
  '-b[keep broadcasting, do not go unicast]' \
 | 
						|
  '-D[duplicate address detection mode]'\
 | 
						|
  '-U[unsolicited ARP mode, update your neighbours]' \
 | 
						|
  '-A[ARP answer mode, update your neighbours]' \
 | 
						|
  '-V[print version and exit]' \
 | 
						|
  '-c[how many packets to send]:count' \
 | 
						|
  '-w[how long to wait for a reply]:timeout' \
 | 
						|
  '-I[interface]:ethernet interface:_net_interfaces' \
 | 
						|
  '-s[source ip address]:source IP address:_hosts' \
 | 
						|
  ':destination:_hosts'
 | 
						|
 | 
						|
else
 | 
						|
 | 
						|
_arguments -s -S  -A "-*" \
 | 
						|
  '(-)'{-h,--help}'[display help information]' \
 | 
						|
  '-q[only display error messages]' \
 | 
						|
  '-a[audible ping]' \
 | 
						|
  '*-v[verbose output]' \
 | 
						|
  '-r[raw output: only the MAC/IP address displayed]' \
 | 
						|
  '-R[like -r but shows "the other one"]' \
 | 
						|
  '-d[find duplicate replies]' \
 | 
						|
  '-D[display answers as exclamation marks and missing packets as dots]' \
 | 
						|
  '-e[like -a but beep when there is no reply]' \
 | 
						|
  "-F[don't try to be smart about the interface name]" \
 | 
						|
  '-m+[specify type of timestamp for incoming packets]:timestamp type' \
 | 
						|
  '(:)-B[255.255.255.255]' \
 | 
						|
  '-0[source 0.0.0.0]' \
 | 
						|
  '-b[source 255.255.255.255]' \
 | 
						|
  '-S+[set source IP]:source IP address:_hosts' \
 | 
						|
  '-T+[target IP]:target IP address:_hosts' \
 | 
						|
  '-p[turn on promiscuous mode]' \
 | 
						|
  '-s[set source MAC address]:source MAC address' \
 | 
						|
  '-t[set target MAC address]:target MAC address' \
 | 
						|
  '-c[send this many requests]:count' \
 | 
						|
  '-C[only wait for specified replies]:reply count' \
 | 
						|
  '-i+[interface]:interface:_net_interfaces' \
 | 
						|
  '-A[only count addresses matching requested address]' \
 | 
						|
  '-P[send ARP replies instead of requests]' \
 | 
						|
  '-u[show index=received/sent instead of just index=received when pinging MACs]' \
 | 
						|
  '-U[send unsolicited ARP]' \
 | 
						|
  '-w+[specify time to wait between pings (ms)]:time (ms)' \
 | 
						|
  '-W+[specify time to wait between pings (seconds)]:time (seconds)' \
 | 
						|
  '(-B):address:_hosts'
 | 
						|
 
 | 
						|
fi
 |