[SOLVED] Need program to get ARP table changes via netlink socket
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi Ikshudm, I linked libnl using -lnl in gcc command line. However I still do not know how to parse the message and extract ip address, mac address, device name, state of arp entry. Please let me know ASAP if you have figured it out. I look forward to hearing from you.
Hi Ikshudm, I am able to receive the events when arp is added or deleted. Also nl_object_dump does print the arp entry.
Hi Ikshudm/rigor, However I still do not know how to parse and extract ip address, mac address, device, state of the arp entry from the netlink message. Please let me know if you have any information about that.
Hi, I am able to successfully parse the netlink message. Is there a way to know if the arp update I received is due to arp add, or arp delete or arp replace ?
Theres a tool called Arpwatch which keep track of ethernet/ip address pairings. It syslogs activity and reports certain changes via email. Arpwatch uses pcap to listen for arp packets on a local ethernet interface..
Last edited by justmy2cents; 09-01-2017 at 01:13 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.