ARP will only work if the remote IP address is on the same subnet and your network interface is Ethernet or similar (e.g. WiFi).
If the remote IP address might be further afield than the same LAN (i.e. there is a router between you and the remote IP address) then you can't find its MAC address. The same applies if your network interface is PPP, which doesn't use MAC addresses at all. Trying to use the MAC address as authentication will limit you to a connection within the same LAN. If that is sufficient, then ARP is the correct solution, and LWIP should already have the MAC address in its ARP cache, because it will have used it to establish the TCP connection. ----- Original Message ----- From: Bill Auerbach To: 'Mailing list for lwIP users' Sent: Thursday, February 26, 2009 11:36 AM Subject: RE: [lwip-users] How to find remote MAC address from remote IP address Look at the function etharp_find_addr. I think this will do it. Bill From: [email protected] [mailto:[email protected]] On Behalf Of Bandu Sent: Wednesday, February 25, 2009 11:22 AM To: Mailing list for lwIP users Subject: [lwip-users] How to find remote MAC address from remote IP address Hi, How do I find out remote MAC address from remote IP address during TCP connection attempt? I would like to implement MAC address filter on my application. I'm using lwip 1.3.0 with a RAW API thank you very much, -- Bandu [email protected]
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
