Deleted Added
full compact
2,3c2,3
< * Copyright (c) 2002 - 2003
< * NetGroup, Politecnico di Torino (Italy)
---
> * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
> * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
15,17c15,18
< * 3. Neither the name of the Politecnico di Torino nor the names of its
< * contributors may be used to endorse or promote products derived from
< * this software without specific prior written permission.
---
> * 3. Neither the name of the Politecnico di Torino, CACE Technologies
> * nor the names of its contributors may be used to endorse or promote
> * products derived from this software without specific prior written
> * permission.
35c36
< "@(#) $Header: /tcpdump/master/libpcap/fad-win32.c,v 1.11.2.1 2005/09/01 22:07:41 risso Exp $ (LBL)";
---
> "@(#) $Header: /tcpdump/master/libpcap/fad-win32.c,v 1.11.2.3 2006/02/22 17:09:32 gianluca Exp $ (LBL)";
44c45
< #include <packet32.h>
---
> #include <Packet32.h>
227c228
< if(!PacketGetAdapterNames(NULL, &NameLength) && NameLength == 0)
---
> if (!PacketGetAdapterNames(NULL, &NameLength))
229,235c230,238
< /*
< * If PacketGetAdapterNames *and* sets the lenght of the buffer to zero,
< * it means there was an error.
< */
< snprintf(errbuf, PCAP_ERRBUF_SIZE, "PacketGetAdapterNames failed: %s", pcap_win32strerror());
< *alldevsp = NULL;
< return -1;
---
> DWORD last_error = GetLastError();
>
> if (last_error != ERROR_INSUFFICIENT_BUFFER)
> {
> snprintf(errbuf, PCAP_ERRBUF_SIZE,
> "PacketGetAdapterNames: %s",
> pcap_win32strerror());
> return (-1);
> }
242d244
< snprintf(errbuf, PCAP_ERRBUF_SIZE, "no adapters found.");