Diff for /embedaddon/arping/src/findif_linux.c between versions 1.1.1.1 and 1.1.1.2

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

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>