title: How to write a kernel module to lookup route table and arp cache in kernel?
body: <p>I want to write a module to lookup the route table in kernel for getting the gateway ip, and use the ip to lookup arp cache for getting the gateway's mac address.</p>