Diff for /embedaddon/libnet/src/libnet_link_win32.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 22:14:23 version 1.1.1.2, 2013/07/22 11:54:42
Line 36 Line 36
 #include "../include/config.h"  #include "../include/config.h"
 #endif  #endif
 #include <winsock2.h>  #include <winsock2.h>
#include <iphlpapi.h> // From the Microsoft Platform SDK #include <iphlpapi.h> /* From the Microsoft Platform SDK */
 #include "../include/win32/libnet.h"  #include "../include/win32/libnet.h"
 #include <assert.h>  #include <assert.h>
 #include <Packet32.h>  #include <Packet32.h>
Line 139  libnet_close_link_interface(libnet_t *l) Line 139  libnet_close_link_interface(libnet_t *l)
 }  }
   
 int  int
libnet_write_link(libnet_t *l, u_int8_t *packet, u_int32_t size)libnet_write_link(libnet_t *l, const uint8_t *packet, uint32_t size)
 {  {
     LPPACKET   lpPacket;      LPPACKET   lpPacket;
     DWORD      BytesTransfered;       DWORD      BytesTransfered; 
Line 234  libnet_get_hwaddr(libnet_t *l) Line 234  libnet_get_hwaddr(libnet_t *l)
   
 struct hostent *gethostbyname2(const int8_t *name, int af)   struct hostent *gethostbyname2(const int8_t *name, int af) 
 {  {
   // XXX not implemented   /* XXX not implemented */
    return(NULL);     return(NULL);
 }  }
   
Line 312  BYTE * libnet_win32_read_arp_table(DWORD DestIP) Line 312  BYTE * libnet_win32_read_arp_table(DWORD DestIP)
   
         if(status == NO_ERROR)          if(status == NO_ERROR)
         {          {
                // set current interface                /* set current interface */
                 ci = pIpNetTable->table[0].dwIndex;                  ci = pIpNetTable->table[0].dwIndex;
   
                 for (i = 0; i < pIpNetTable->dwNumEntries; ++i)                  for (i = 0; i < pIpNetTable->dwNumEntries; ++i)
Line 320  BYTE * libnet_win32_read_arp_table(DWORD DestIP) Line 320  BYTE * libnet_win32_read_arp_table(DWORD DestIP)
                         if (pIpNetTable->table[i].dwIndex != ci)                          if (pIpNetTable->table[i].dwIndex != ci)
                             ci = pIpNetTable->table[i].dwIndex;                              ci = pIpNetTable->table[i].dwIndex;
   
                        if(pIpNetTable->table[i].dwAddr == DestIP) // found IP in arp cache                        if(pIpNetTable->table[i].dwAddr == DestIP) /* found IP in arp cache */
                         {                          {
                                 memcpy(buffMAC, pIpNetTable->table[i].bPhysAddr, sizeof(buffMAC));                                  memcpy(buffMAC, pIpNetTable->table[i].bPhysAddr, sizeof(buffMAC));
                                 free(pIpNetTable);                                  free(pIpNetTable);

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


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