Cross-compiling wpa_supplicant for windows

This is a howto for compiling the ope-source WPA2 supplicant 'wpa_supplicant' for the Windows OS.

Steps

  • Install winpcap devel package
    • Get it from here
    • unpack it into a folder (../pcap)
  • Install mingw
    • apt-get install mingw32*
  • wpa_supplicant .config file must contain :
 CFLAGS += -I../pcap/Include -L../pcap/Lib
 CONFIG_CTRL_IFACE=y
 CONFIG_DRIVER_NDIS=y
 CONFIG_NATIVE_WINDOWS=y
 CFLAGS += -I/usr/i586-mingw32msvc/include/
 LIBS += -L/usr/i586-mingw32msvc/lib  -L../pcap/Lib/
 CONFIG_ELOOP=eloop_win
 CONFIG_OS=win32
 CONFIG_EAP_MD5=y

Note that we only compiled the EAP-MD5 method. Other methods may require OpenSSL library to be installed. Future revisions of this howto will include procedures for compiling other EAP methods.

  • Apply this little patch to “driver_ndis_.c”
  
 --- driver_ndis_.c      2007-03-25 11:09:50.000000000 +0900
 +++ driver_ndis_new.c     2007-12-14 03:58:22.000000000 +0900
 @@ -91,6 +91,7 @@
         }
  }
 
 +#ifdef CONFIG_NDIS_EVENTS_INTEGRATED
 
  void wpa_driver_ndis_event_pipe_cb(void *eloop_data, void *user_data)
  {
 @@ -106,3 +107,5 @@
                            (int) GetLastError());
         }
  }
 +
 +#endif
  • make all
  • Using the binary : The winpcap runtime dlls must be installed before running wpa_supplicant under windows.






Wireless Internet Security Performance RADIUS server


Wireless Internet Security Performance RADIUS server Wireless Internet Security Performance RADIUS server