Post by habibielwa7id-Would you tell me why you want to clear the ARP cache?
A common reason would be unplugging one embedded device and plugging
in a different one with the same ip address but a different MAC
address. If you don't delete the arp entry you have to wait a bit
before you can talk to it.
I second the recommendation for looking at the source of arp.c... it's
not very long. Looks to me like if there's no global delete function
in the kernel, you could get the cache out of /proc/net/arp and simply
issue an SIOCDARP ioctl on each entry.
You could also perform this with a shoprt shell script to parse the /
proc/net/arp and run arp -d on each entry. Actually I think it can
be done in one line with grep and xargs, but must admit I'm not
getting it to work. You will of course need superuser permission.