# ARP Table in Freebsd



## ssg (Aug 29, 2010)

Hi,

does anyone know where the ARP entries are stored in FreeBSD.im assuming it will be written to some sort of a table or file,


----------



## aragon (Aug 29, 2010)

ssg said:
			
		

> does anyone know where the ARP entries are stored in FreeBSD.im assuming it will be written to some sort of a table or file,


In kernel memory.

What are you trying to do?


----------



## mk (Aug 29, 2010)

install arpwatch from ports. it's logging ip+mac and tracking any changes. and arping if you need it..


----------



## gordon@ (Aug 30, 2010)

The arp(8) utility can dump the current arp table. Use something like arp -a to just dump the entire table. If you are interested in getting arp entries programmatically, check out the source for arp.


----------



## shitson (Aug 30, 2010)

```
arp -a
```

should give you a dump of the arp table


----------



## ssg (Aug 31, 2010)

hi,
thnx for ur replies...i need to get the current IP-MAC address allocation programmatically..i have looked into arpresolve function and arplookup function...am i on the right track..

thnx


----------



## ssg (Aug 31, 2010)

hi,
does anybody know, for a known IP address how can we get the particular MAC address from ARP table...any particular function that i can use for it...i have looked into router.h in /netfolder and if_ether.c in /netinet folder.i'm still bit confused how to implement it...if anyone can guide me to other resources etc to get an idea about it...thanx heaps


----------



## SirDice (Aug 31, 2010)

Use the source Luke!

http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/arp/arp.c?rev=1.76


----------

