--- embedaddon/arping/src/findif_linux.c 2012/02/21 22:16:27 1.1.1.1 +++ embedaddon/arping/src/findif_linux.c 2014/06/15 16:26:43 1.1.1.2 @@ -1,6 +1,6 @@ /* arping/src/findif_linux.c * - * Copyright (C) 2000-2009 Thomas Habets + * Copyright (C) 2000-2009 Thomas Habets * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public @@ -16,6 +16,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/** + * Fallback to ugly solution. This should not actually be used, as + * modern systems have getifaddrs(). + */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -29,8 +33,7 @@ * WARNING: non-reentrant */ const char * -arping_lookupdev(const char *ifname, - uint32_t srcip, +arping_lookupdev(uint32_t srcip, uint32_t dstip, char *ebuf) { @@ -41,7 +44,7 @@ arping_lookupdev(const char *ifname, char *p,*p2; int n; - do_libnet_init(ifname); + do_libnet_init(NULL); libnet_addr2name4_r(dstip,0,buf2,1024); libnet_addr2name4_r(srcip,0,buf1,1024); @@ -80,5 +83,11 @@ arping_lookupdev(const char *ifname, *p2 = 0; return p; failed: - return arping_lookupdev_default(ifname,srcip,dstip,ebuf); + return NULL; } +/* ---- Emacs Variables ---- + * Local Variables: + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */