Click here to Skip to main content
13,195,564 members (59,347 online)
Rate this:
Please Sign up or sign in to vote.

after wasting nearly two days by searching for a solution I try my luck here.

I am using the sniffer from A Little Sniffer that Uses WSA Sockets (Windows Sockets)[^].

My problem is that the call in WSAIoctl returns WSAEINVAL (10022) under Windows Server 2003 (NOT R2!!!), SP2 (the problem occures in both x64 and x86). I did not modify the code from the sample in the link above.

This all works well on Win7, Win Server 2008, Win Server 2003 R2 (yes, here it works!), Win2K. (I didn't have the opportunity to test XP yet)

So now, what is wrong with Win2K3 Server that WSAIoctl does not work? Anyone knowing this problem?

Posted 5-Jun-11 23:28pm
Updated 5-Jun-11 23:53pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

the docs say Setting this IOCTL requires Administrator privilege on the local computer[^]

It may be that the network card you have doesn't support promiscuous mode - either way, have you established it is possible on that server with something like MS's Network Monitor?[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

after keeping searching and testing it seems that Win2K3 is not the problem. Either MS Network Monitor, also Wireshark do not work in any way with this hardware.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171019.1 | Last Updated 8 Jun 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100