[Winpcap-users] Winpcap and Sockets

Gianluca Varenni gianluca.varenni at cacetech.com
Mon Mar 19 19:56:43 GMT 2007


Ian,

can you please send a very tiny C app showing the issue?

Have a nice day
GV

----- Original Message ----- 
From: "Ian Basham" <ianb at proconex.com>
To: <winpcap-users at winpcap.org>
Sent: Monday, March 19, 2007 12:31 PM
Subject: [Winpcap-users] Winpcap and Sockets


> Hi,
> 
> We are having a problem with Winpcap and Sockets.  I found a post from 
> Aug 28 2006 that implies there should be no problem with sockets and 
> Winpcap, and yet....
> 
> 
> In one part of our program, we are setting up a socket as follows (some 
> details omitted):
>  - call WSAStartup
>  - call socket
>  - call bind
>  - call listen
>  - call accept
> 
> Now another computer communicates with our program over that socket.  
> When it finishes, the connection is closed down.  Our program  then does 
> the following:
> 
>  - call shutdown
>  - call closesocket
>  - call WSACleanup
> 
> This tears down the socket connection.  Then we start another socket all 
> over again with:
>  - call WSAStartup
>  - call socket
>  - call bind
>  - call listen
>  - call accept
> 
> So far so good.  This has been working for many years.  The other 
> computer has no problem communicating with our program. 
> 
> Now the problem.  If we call pcap_open, then pcap_close,  the socket 
> portion of our program fails.  Specifically, the call to bind fails with 
> WSAEADDRINUSE.
> 
> This occurs on WinXP, with Winpcap 3.1 and 4, using MS Visual C++ 6.0.
> 
> Does anyone have any idea what is going on here?
> 
> Thanks,
> 
> Ian B.
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users


More information about the Winpcap-users mailing list