title: Delphi, my sniffer wont work on WLAN
body: <p>I have a working sniffer program, written in Delphi. Its good in LAN. But when my computer is on WLAN, it wont log anything. Initializing:</p>
  
  <pre><code> if (WSAStartup(MAKEWORD(2,2), Wsa) &lt;&gt; 0) then ErrorMsg ('WSAStartup');
  
   //Create a RAW Socket
   sniffer:= socket(AF_INET, SOCK_RAW, IPPROTO_IP);
   if (sniffer = INVALID_SOCKET) then ErrorMsg ('Socket');
  
   //Retrive the local hostname
   getmem (hostname, 100);
   if (gethostname(hostname, 100) = SOCKET_ERROR) then ErrorMsg ('Gethostname');
  
   //Retrive the available IPs of the local host
   local:= gethostbyname(hostname);
   if (local = nil) then ErrorMsg ('Gethostbyname');
   i:= 0;
   repeat
    i:= i + 1;
    Move (local^.h_addr^[i-1], Addr, sizeof(Tinaddr));
   until (local^.h_addr^[i-1] &lt;&gt; #0);
  
   Players.MyIP:= inet_ntoa(Addr);
   if Players.MyIP = '0.0.0.0' then
          begin
           Showmessage ('No IP!?'); halt;
          end;
   _in:= 0;
   FillChar (Dest, SizeOf(Dest), 0);
   Move (local^.h_addr^[_in], dest.sin_addr.s_addr, sizeof(dest.sin_addr.s_addr));
   dest.sin_family:= AF_INET;
   dest.sin_port  := 0;
  
   if (bind(sniffer, @dest, sizeof(dest))) = SOCKET_ERROR then ErrorMsg ('Bind');
  
   j:= 1;
   if (WSAIoctl(sniffer, SIO_RCVALL, @j,4, nil, 0, LPDWORD(@_in),nil, nil)) = SOCKET_ERROR then ErrorMsg ('WSAIoctl');
  </code></pre>
  
  <p>capturing thread</p>
  
  <pre><code> while not Terminated do
   begin
    mangobyte:= recvfrom (sniffer,Buffer^,65536,0,nil,nil); //Eat as much as u can
    if (mangobyte &gt; 0) then
    begin
     adsasdasd
    end
  </code></pre>
  
  <p>so it wont log anything. Am I missing something?</p>